@deephaven/embed-widget 0.85.43 → 0.85.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{App-G2O4p57M.js → App-DmgHIOVv.js} +2 -2
- package/build/assets/{App-G2O4p57M.js.map → App-DmgHIOVv.js.map} +1 -1
- package/build/assets/{Chart-6Eu2utuu.js → Chart-BrbzoecO.js} +2 -2
- package/build/assets/{Chart-6Eu2utuu.js.map → Chart-BrbzoecO.js.map} +1 -1
- package/build/assets/{IrisGrid-VRiqUHxh.js → IrisGrid-BZ5n6ttC.js} +5 -5
- package/build/assets/IrisGrid-BZ5n6ttC.js.map +1 -0
- package/build/assets/{IrisGridThemeProvider-aaur-4Dr.js → IrisGridThemeProvider-Do-6EVPi.js} +2 -2
- package/build/assets/{IrisGridThemeProvider-aaur-4Dr.js.map → IrisGridThemeProvider-Do-6EVPi.js.map} +1 -1
- package/build/assets/{LocalWorkspaceStorage-BpHR1ywH.js → LocalWorkspaceStorage-DjNDJGTB.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-BpHR1ywH.js.map → LocalWorkspaceStorage-DjNDJGTB.js.map} +1 -1
- package/build/assets/{LogPanel-CNVKNNAa.js → LogPanel-D4DK423D.js} +3 -3
- package/build/assets/{LogPanel-CNVKNNAa.js.map → LogPanel-D4DK423D.js.map} +1 -1
- package/build/assets/{MarkdownEditor-C83XwDEP.js → MarkdownEditor-uAi0M9H2.js} +2 -2
- package/build/assets/{MarkdownEditor-C83XwDEP.js.map → MarkdownEditor-uAi0M9H2.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-CPKohxAA.js → MarkdownNotebook-CJCP_3Nr.js} +2 -2
- package/build/assets/{MarkdownNotebook-CPKohxAA.js.map → MarkdownNotebook-CJCP_3Nr.js.map} +1 -1
- package/build/assets/Plot-DnZeyE8Y.js +2 -0
- package/build/assets/{Plot-9MEtok1o.js.map → Plot-DnZeyE8Y.js.map} +1 -1
- package/build/assets/{Plotly-gH-FXxbq.js → Plotly-Bm2NEaUV.js} +2 -2
- package/build/assets/{Plotly-gH-FXxbq.js.map → Plotly-Bm2NEaUV.js.map} +1 -1
- package/build/assets/{index-DrrfzYW3.js → index-BCtp1fv0.js} +2 -2
- package/build/assets/{index-DrrfzYW3.js.map → index-BCtp1fv0.js.map} +1 -1
- package/build/assets/{index-X8Ql7aB6.js → index-CAyLOfUy.js} +3 -3
- package/build/assets/{index-X8Ql7aB6.js.map → index-CAyLOfUy.js.map} +1 -1
- package/build/assets/{index-NSYd_ti_.js → index-Cpm7FxLO.js} +6 -6
- package/build/assets/{index-NSYd_ti_.js.map → index-Cpm7FxLO.js.map} +1 -1
- package/build/assets/plotly-DgUZJAQ3.js +7 -0
- package/build/assets/{plotly-BNi-gO9O.js.map → plotly-DgUZJAQ3.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +7 -7
- package/build/assets/IrisGrid-VRiqUHxh.js.map +0 -1
- package/build/assets/Plot-9MEtok1o.js +0 -2
- package/build/assets/plotly-BNi-gO9O.js +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{g as Ci,c as TM}from"./helpers-BosuxZz1.js";import{r as kM,p as AM,a as t_,f as dt,t as wa,d as ft,g as r_,b as Bl,i as MM,c as a_,e as zh,h as i_,m as SM,j as n_,k as o_,l as LM,n as CM,o as DM,q as PM,s as l_,u as EM,v as RM,w as zM,x as IM,y as FM,z as $M,A as NM,B as Ih,C as s_}from"./vendor-DrtWDXhi.js";var f_={};(function(t){function e(x){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},e(x)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r=o(kM),a=i(AM);function i(x){return x&&x.__esModule?x:{default:x}}function n(x){if(typeof WeakMap!="function")return null;var _=new WeakMap,k=new WeakMap;return(n=function(S){return S?k:_})(x)}function o(x,_){if(x&&x.__esModule)return x;if(x===null||e(x)!=="object"&&typeof x!="function")return{default:x};var k=n(_);if(k&&k.has(x))return k.get(x);var T={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var D in x)if(D!=="default"&&Object.prototype.hasOwnProperty.call(x,D)){var L=S?Object.getOwnPropertyDescriptor(x,D):null;L&&(L.get||L.set)?Object.defineProperty(T,D,L):T[D]=x[D]}return T.default=x,k&&k.set(x,T),T}function l(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function s(x,_){for(var k=0;k<_.length;k++){var T=_[k];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(x,T.key,T)}}function f(x,_,k){return _&&s(x.prototype,_),Object.defineProperty(x,"prototype",{writable:!1}),x}function c(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),Object.defineProperty(x,"prototype",{writable:!1}),_&&u(x,_)}function u(x,_){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,S){return T.__proto__=S,T},u(x,_)}function v(x){var _=p();return function(){var T=m(x),S;if(_){var D=m(this).constructor;S=Reflect.construct(T,arguments,D)}else S=T.apply(this,arguments);return h(this,S)}}function h(x,_){if(_&&(e(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(x)}function d(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function m(x){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)},m(x)}var y=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],b=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],w=typeof window<"u";function g(x){var _=function(k){c(S,k);var T=v(S);function S(D){var L;return l(this,S),L=T.call(this,D),L.p=Promise.resolve(),L.resizeHandler=null,L.handlers={},L.syncWindowResize=L.syncWindowResize.bind(d(L)),L.syncEventHandlers=L.syncEventHandlers.bind(d(L)),L.attachUpdateEvents=L.attachUpdateEvents.bind(d(L)),L.getRef=L.getRef.bind(d(L)),L.handleUpdate=L.handleUpdate.bind(d(L)),L.figureCallback=L.figureCallback.bind(d(L)),L.updatePlotly=L.updatePlotly.bind(d(L)),L}return f(S,[{key:"updatePlotly",value:function(L,R,z){var N=this;this.p=this.p.then(function(){if(!N.unmounting){if(!N.el)throw new Error("Missing element reference");return x.react(N.el,{data:N.props.data,layout:N.props.layout,config:N.props.config,frames:N.props.frames})}}).then(function(){N.unmounting||(N.syncWindowResize(L),N.syncEventHandlers(),N.figureCallback(R),z&&N.attachUpdateEvents())}).catch(function(H){N.props.onError&&N.props.onError(H)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(L){this.unmounting=!1;var R=L.frames&&L.frames.length?L.frames.length:0,z=this.props.frames&&this.props.frames.length?this.props.frames.length:0,N=!(L.layout===this.props.layout&&L.data===this.props.data&&L.config===this.props.config&&z===R),H=L.revision!==void 0,$=L.revision!==this.props.revision;!N&&(!H||H&&!$)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&w&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),x.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var L=this;!this.el||!this.el.removeListener||b.forEach(function(R){L.el.on(R,L.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var L=this;!this.el||!this.el.removeListener||b.forEach(function(R){L.el.removeListener(R,L.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(L){if(typeof L=="function"){var R=this.el,z=R.data,N=R.layout,H=this.el._transitionData?this.el._transitionData._frames:null,$={data:z,layout:N,frames:H};L($,this.el)}}},{key:"syncWindowResize",value:function(L){var R=this;w&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return x.Plots.resize(R.el)},window.addEventListener("resize",this.resizeHandler),L&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(L){this.el=L,this.props.debug&&w&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var L=this;y.forEach(function(R){var z=L.props["on"+R],N=L.handlers[R],H=!!N;z&&!H?L.addEventHandler(R,z):!z&&H?L.removeEventHandler(R):z&&H&&z!==N&&(L.removeEventHandler(R),L.addEventHandler(R,z))})}},{key:"addEventHandler",value:function(L,R){this.handlers[L]=R,this.el.on(this.getPlotlyEventName(L),this.handlers[L])}},{key:"removeEventHandler",value:function(L){this.el.removeListener(this.getPlotlyEventName(L),this.handlers[L]),delete this.handlers[L]}},{key:"getPlotlyEventName",value:function(L){return"plotly_"+L.toLowerCase()}},{key:"render",value:function(){return r.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),S}(r.Component);return _.propTypes={data:a.default.arrayOf(a.default.object),config:a.default.object,layout:a.default.object,frames:a.default.arrayOf(a.default.object),revision:a.default.number,onInitialized:a.default.func,onPurge:a.default.func,onError:a.default.func,onUpdate:a.default.func,debug:a.default.bool,style:a.default.object,className:a.default.string,useResizeHandler:a.default.bool,divId:a.default.string},y.forEach(function(k){_.propTypes["on"+k]=a.default.func}),_.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},_}})(f_);const ZB=Ci(f_);var c_={},Pc={};Pc.version="2.29.1";var u_={exports:{}},Yt={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,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:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"},Xt={},_n=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")},HM=t_.decode,OM=_n,Fh=Array.isArray,jM=ArrayBuffer,BM=DataView;function v_(t){return jM.isView(t)&&!(t instanceof BM)}Xt.isTypedArray=v_;function Qf(t){return Fh(t)||v_(t)}Xt.isArrayOrTypedArray=Qf;function GM(t){return!Qf(t[0])}Xt.isArray1D=GM;Xt.ensureArray=function(t,e){return Fh(t)||(t=[]),t.length=e,t};var sr={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};sr.uint8c=sr.u1c;sr.uint8=sr.u1;sr.int8=sr.i1;sr.uint16=sr.u2;sr.int16=sr.i2;sr.uint32=sr.u4;sr.int32=sr.i4;sr.float32=sr.f4;sr.float64=sr.f8;function $h(t){return t.constructor===ArrayBuffer}Xt.isArrayBuffer=$h;Xt.decodeTypedArraySpec=function(t){var e=[],r=UM(t),a=r.dtype,i=sr[a];if(!i)throw new Error('Error in dtype: "'+a+'"');var n=i.BYTES_PER_ELEMENT,o=r.bdata;$h(o)||(o=HM(o));var l=r.shape===void 0?[o.byteLength/n]:(""+r.shape).split(",");l.reverse();var s=l.length,f,c,u=+l[0],v=n*u,h=0;if(s===1)e=new i(o);else if(s===2)for(f=+l[1],c=0;c<f;c++)e[c]=new i(o,h,u),h+=v;else if(s===3){f=+l[1];for(var d=+l[2],p=0;p<d;p++)for(e[p]=[],c=0;c<f;c++)e[p][c]=new i(o,h,u),h+=v}else throw new Error("ndim: "+s+'is not supported with the shape:"'+r.shape+'"');return e.bdata=r.bdata,e.dtype=r.dtype,e.shape=l.reverse().join(","),t._inputArray=e,e};Xt.isTypedArraySpec=function(t){return OM(t)&&t.hasOwnProperty("dtype")&&typeof t.dtype=="string"&&t.hasOwnProperty("bdata")&&(typeof t.bdata=="string"||$h(t.bdata))&&(t.shape===void 0||t.hasOwnProperty("shape")&&(typeof t.shape=="string"||typeof t.shape=="number"))};function UM(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}Xt.concat=function(){var t=[],e=!0,r=0,a,i,n,o,l,s,f,c;for(n=0;n<arguments.length;n++)o=arguments[n],s=o.length,s&&(i?t.push(o):(i=o,l=s),Fh(o)?a=!1:(e=!1,r?a!==o.constructor&&(a=!1):a=o.constructor),r+=s);if(!r)return[];if(!t.length)return i;if(e)return i.concat.apply(i,t);if(a){for(f=new a(r),f.set(i),n=0;n<t.length;n++)o=t[n],f.set(o,l),l+=o.length;return f}for(f=new Array(r),c=0;c<i.length;c++)f[c]=i[c];for(n=0;n<t.length;n++){for(o=t[n],c=0;c<o.length;c++)f[l+c]=o[c];l+=c}return f};Xt.maxRowLength=function(t){return d_(t,Math.max,0)};Xt.minRowLength=function(t){return d_(t,Math.min,1/0)};function d_(t,e,r){if(Qf(t))if(Qf(t[0])){for(var a=r,i=0;i<t.length;i++)a=e(a,t[i].length);return a}else return t.length;return 0}var h_=dt,Nh=Xt.isArrayOrTypedArray,Hh=function(e,r){if(h_(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";var a=r.split("."),i,n,o,l;for(l=0;l<a.length;l++)if(String(a[l]).slice(0,2)==="__")throw"bad property string";for(l=0;l<a.length;){if(i=String(a[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),i){if(i[1])a[l]=i[1];else if(l===0)a.splice(0,1);else throw"bad property string";for(n=i[2].substr(1,i[2].length-2).split("]["),o=0;o<n.length;o++)l++,a.splice(l,0,Number(n[o]))}l++}return typeof e!="object"?WM(e,r,a):{set:m_(e,a,r),get:p_(e,a),astr:r,parts:a,obj:e}};function p_(t,e){return function(){var r=t,a,i,n,o,l;for(o=0;o<e.length-1;o++){if(a=e[o],a===-1){for(i=!0,n=[],l=0;l<r.length;l++)n[l]=p_(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!Nh(r)||(r=r[a],typeof r!="object"||r===null))return}if(!(typeof r!="object"||r===null)&&(n=r[e[o]],n!==null))return n}}var VM=/(^|\.)args\[/;function Ld(t,e){return t===void 0||t===null&&!e.match(VM)}function m_(t,e,r){return function(a){var i=t,n="",o=Ld(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Nh(i))throw"array index but container is not an array";if(l===-1){if(o=!YM(i,e.slice(s+1),a,r),o)break;return}if(!y_(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=XM(n,l)}if(o){if(s===e.length-1&&(delete i[e[s]],Array.isArray(i)&&+e[s]===i.length-1))for(;i.length&&i[i.length-1]===void 0;)i.pop()}else i[e[s]]=a}}function XM(t,e){var r=e;return h_(e)?r="["+e+"]":t&&(r="."+e),t+r}function YM(t,e,r,a){var i=Nh(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:Ld(r,l),f=e[0],c;for(c=0;c<t.length;c++)l=a.replace("-1",c),i&&(o=r[c%r.length],s=Ld(o,l)),s&&(n=!1),y_(t,c,f,s)&&m_(t[c],e,a.replace("-1",c))(o);return n}function y_(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function WM(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var zn=Hh,qM=/^\w*$/,ZM=0,km=1,Ss=2,Am=3,Ui=4,KM=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=zn(e,r),o=l.get()):o=e,r=r||"";var f={};if(o)for(n=0;n<o.length;n++)f[o[n][a]]=n;var c=qM.test(i),u={set:function(v,h){var d=h===null?Ui:ZM;if(!o){if(!l||d===Ui)return;o=[],l.set(o)}var p=f[v];if(p===void 0){if(d===Ui)return;d=d|Am,p=o.length,f[v]=p}else h!==(c?o[p][i]:zn(o[p],i).get())&&(d=d|Ss);var m=o[p]=o[p]||{};return m[a]=v,c?m[i]=h:zn(m,i).set(h),h!==null&&(d=d&~Ui),s[p]=s[p]|d,u},get:function(v){if(o){var h=f[v];if(h!==void 0)return c?o[h][i]:zn(o[h],i).get()}},rename:function(v,h){var d=f[v];return d===void 0||(s[d]=s[d]|km,f[h]=d,delete f[v],o[d][a]=h),u},remove:function(v){var h=f[v];if(h===void 0)return u;var d=o[h];if(Object.keys(d).length>2)return s[h]=s[h]|Ss,u.set(v,null);if(c){for(n=h;n<o.length;n++)s[n]=s[n]|Am;for(n=h;n<o.length;n++)f[o[n][a]]--;o.splice(h,1),delete f[v]}else zn(d,i).set(null),s[h]=s[h]|Ss|Ui;return u},constructUpdate:function(){for(var v,h,d={},p=Object.keys(s),m=0;m<p.length;m++)h=p[m],v=r+"["+h+"]",o[h]?(s[h]&km&&(d[v+"."+a]=o[h][a]),s[h]&Ss&&(c?d[v+"."+i]=s[h]&Ui?null:o[h][i]:d[v+"."+i]=s[h]&Ui?null:zn(o[h],i).get())):d[v]=null;return d}};return u},QM=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,JM=/^[^\.\[\]]+$/,eS=function(t,e){for(;e;){var r=t.match(QM);if(r)t=r[1];else if(t.match(JM))t="";else throw new Error("bad relativeAttr call:"+[t,e]);if(e.charAt(0)==="^")e=e.slice(1);else break}return t&&e.charAt(0)!=="["?t+"."+e:t+e},tS=dt,Oh=function(e,r){if(e>0)return Math.log(e)/Math.LN10;var a=Math.log(Math.min(r[0],r[1]))/Math.LN10;return tS(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},Mm=Xt.isArrayOrTypedArray,el=_n,rS=function t(e,r){for(var a in r){var i=r[a],n=e[a];if(n!==i)if(a.charAt(0)==="_"||typeof i=="function"){if(a in e)continue;e[a]=i}else if(Mm(i)&&Mm(n)&&el(i[0])){if(a==="customdata"||a==="ids")continue;for(var o=Math.min(i.length,n.length),l=0;l<o;l++)n[l]!==i[l]&&el(i[l])&&el(n[l])&&t(n[l],i[l])}else el(i)&&el(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function aS(t,e){var r=t%e;return r<0?r+e:r}function iS(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var ss={mod:aS,modHalf:iS},g_={},vr=function(t){var e=t.editType,r=t.colorEditType;r===void 0&&(r=e);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:e,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:r},editType:e,description:""+(t.description||"")};return t.autoSize&&(a.size.dflt="auto"),t.autoColor&&(a.color.dflt="auto"),t.arrayOk&&(a.family.arrayOk=!0,a.size.arrayOk=!0,a.color.arrayOk=!0),a},Ec={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},b_=Ec,x_=vr,jh=x_({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});jh.family.dflt=b_.HOVERFONT;jh.size.dflt=b_.HOVERFONTSIZE;var fs={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:jh,grouptitlefont:x_({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}},Nt={},Sm=_n,tl=Array.isArray;function nS(t,e){var r,a;for(r=0;r<t.length;r++){if(a=t[r],a!==null&&typeof a=="object")return!1;a!==void 0&&(e[r]=a)}return!0}Nt.extendFlat=function(){return cs(arguments,!1,!1,!1)};Nt.extendDeep=function(){return cs(arguments,!0,!1,!1)};Nt.extendDeepAll=function(){return cs(arguments,!0,!0,!1)};Nt.extendDeepNoArrays=function(){return cs(arguments,!0,!1,!0)};function cs(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,u,v;if(n===2&&tl(i)&&tl(t[1])&&i.length===0){if(v=nS(t[1],i),v)return i;i.splice(0,i.length)}for(var h=1;h<n;h++){o=t[h];for(l in o)s=i[l],f=o[l],a&&tl(f)?i[l]=f:e&&f&&(Sm(f)||(c=tl(f)))?(c?(c=!1,u=s&&tl(s)?s:[]):u=s&&Sm(s)?s:{},i[l]=cs([u,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var oS=vr,Ls=fs.hoverlabel,Cs=Nt.extendFlat,Rc={hoverlabel:{bgcolor:Cs({},Ls.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:Cs({},Ls.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:oS({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:Cs({},Ls.align,{arrayOk:!0}),namelength:Cs({},Ls.namelength,{arrayOk:!0}),editType:"none"}},lS=vr,sS=Rc,oa={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legend:{valType:"subplotid",dflt:"legend",editType:"style",description:["Sets the reference to a legend to show this trace in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:lS({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")},legendwidth:{valType:"number",min:0,editType:"style",description:"Sets the width (in px or fraction) of the legend for this trace."},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appears as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:sS.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}},fS=wa,zc={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)"]]},__=zc.RdBu;function cS(t,e){if(e||(e=__),!t)return e;function r(){try{t=zc[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),w_(t)?t:e}function w_(t){var e=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;r<t.length;r++){var a=t[r];if(a.length!==2||+a[0]<e||!fS(a[1]).isValid())return!1;e=+a[0]}return!0}function uS(t){return zc[t]!==void 0?!0:w_(t)}var Ho={scales:zc,defaultScale:__,get:cS,isValid:uS},T_={exports:{}},xr={};xr.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];xr.defaultLine="#444";xr.lightLine="#eee";xr.background="#fff";xr.borderLine="#BEC8D9";xr.lightFraction=100*10/11;var ba=wa,vS=dt,dS=Xt.isTypedArray,lr=T_.exports={},Ic=xr;lr.defaults=Ic.defaults;var hS=lr.defaultLine=Ic.defaultLine;lr.lightLine=Ic.lightLine;var Cd=lr.background=Ic.background;lr.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};lr.rgb=function(t){return lr.tinyRGB(ba(t))};lr.opacity=function(t){return t?ba(t).getAlpha():0};lr.addOpacity=function(t,e){var r=ba(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};lr.combine=function(t,e){var r=ba(t).toRgb();if(r.a===1)return ba(t).toRgbString();var a=ba(e||Cd).toRgb(),i=a.a===1?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},n={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 ba(n).toRgbString()};lr.contrast=function(t,e,r){var a=ba(t);a.getAlpha()!==1&&(a=ba(lr.combine(t,Cd)));var i=a.isDark()?e?a.lighten(e):Cd:r?a.darken(r):hS;return i.toString()};lr.stroke=function(t,e){var r=ba(e);t.style({stroke:lr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};lr.fill=function(t,e){var r=ba(e);t.style({fill:lr.tinyRGB(r),"fill-opacity":r.getAlpha()})};lr.clean=function(t){if(!(!t||typeof t!="object")){var e=Object.keys(t),r,a,i,n;for(r=0;r<e.length;r++)if(i=e[r],n=t[i],i.substr(i.length-5)==="color")if(Array.isArray(n))for(a=0;a<n.length;a++)n[a]=ku(n[a]);else t[i]=ku(n);else if(i.substr(i.length-10)==="colorscale"&&Array.isArray(n))for(a=0;a<n.length;a++)Array.isArray(n[a])&&(n[a][1]=ku(n[a][1]));else if(Array.isArray(n)){var o=n[0];if(!Array.isArray(o)&&o&&typeof o=="object")for(a=0;a<n.length;a++)lr.clean(n[a])}else n&&typeof n=="object"&&!dS(n)&&lr.clean(n)}};function ku(t){if(vS(t)||typeof t!="string")return t;var e=t.trim();if(e.substr(0,3)!=="rgb")return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var a=r[1].trim().split(/\s*[\s,]\s*/),i=e.charAt(3)==="a"&&a.length===4;if(!i&&a.length!==3)return t;for(var n=0;n<a.length;n++){if(!a[n].length||(a[n]=Number(a[n]),!(a[n]>=0)))return t;if(n===3)a[n]>1&&(a[n]=1);else if(a[n]>=1)return t}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return i?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}var ot=T_.exports,us={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},Oo={};Oo.counter=function(t,e,r,a){var i=(e||"")+(r?"":"$"),n=a===!1?"":"^";return t==="xy"?new RegExp(n+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(n+t+"([2-9]|[1-9][0-9]+)?"+i)};(function(t){var e=dt,r=wa,a=oa,i=Ho,n=ot,o=us.DESELECTDIM,l=Hh,s=Oo.counter,f=ss.modHalf,c=Xt.isArrayOrTypedArray,u=Xt.isTypedArraySpec,v=Xt.decodeTypedArraySpec;t.valObjectMeta={data_array:{description:["An {array} of data.","The value must represent an {array} or it will be ignored,","but this array can be provided in several forms:","(1) a regular {array} object","(2) a typed array (e.g. Float32Array)","(3) an object with keys dtype, bdata, and optionally shape.","In this 3rd form, dtype is one of","*f8*, *f4*.","*i4*, *u4*,","*i2*, *u2*,","*i1*, *u1* or *u1c* for Uint8ClampedArray.","In addition to shorthand `dtype` above one could also use the following forms:","*float64*, *float32*,","*int32*, *uint32*,","*int16*, *uint16*,","*int8*, *uint8* or *uint8c* for Uint8ClampedArray.","`bdata` is either a base64-encoded string or the ArrayBuffer of","an integer or float typed array.","For either multi-dimensional arrays you must also","provide its dimensions separated by comma via `shape`.","For example using `dtype`: *f4* and `shape`: *5,100* you can","declare a 2-D array that has 5 rows and 100 columns","containing float32 values i.e. 4 bits per value.","`shape` is optional for one dimensional arrays."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(d,p,m){p.set(c(d)?d:u(d)?v(d):m)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(d,p,m,y){y.coerceNumber&&(d=+d),y.values.indexOf(d)===-1?p.set(m):p.set(d)},validateFunction:function(d,p){p.coerceNumber&&(d=+d);for(var m=p.values,y=0;y<m.length;y++){var b=String(m[y]);if(b.charAt(0)==="/"&&b.charAt(b.length-1)==="/"){var w=new RegExp(b.substr(1,b.length-2));if(w.test(d))return!0}else if(d===m[y])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(d,p,m){d===!0||d===!1?p.set(d):p.set(m)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(d,p,m,y){!e(d)||y.min!==void 0&&d<y.min||y.max!==void 0&&d>y.max?p.set(m):p.set(+d)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(d,p,m,y){d%1||!e(d)||y.min!==void 0&&d<y.min||y.max!==void 0&&d>y.max?p.set(m):p.set(+d)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(d,p,m,y){if(typeof d!="string"){var b=typeof d=="number";y.strict===!0||!b?p.set(m):p.set(String(d))}else y.noBlank&&!d?p.set(m):p.set(d)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(d,p,m){r(d).isValid()?p.set(d):p.set(m)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(d,p,m){function y(b){return r(b).isValid()}!Array.isArray(d)||!d.length?p.set(m):d.every(y)?p.set(d):p.set(m)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(i.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(d,p,m){p.set(i.get(d,m))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(d,p,m){d==="auto"?p.set("auto"):e(d)?p.set(f(+d,360)):p.set(m)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(d,p,m,y){var b=y.regex||s(m);if(typeof d=="string"&&b.test(d)){p.set(d);return}p.set(m)},validateFunction:function(d,p){var m=p.dflt;return d===m?!0:typeof d!="string"?!1:!!s(m).test(d)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(d,p,m,y){if((y.extras||[]).indexOf(d)!==-1){p.set(d);return}if(typeof d!="string"){p.set(m);return}for(var b=d.split("+"),w=0;w<b.length;){var g=b[w];y.flags.indexOf(g)===-1||b.indexOf(g)<w?b.splice(w,1):w++}b.length?p.set(b.join("+")):p.set(m)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(d,p,m){d===void 0?p.set(m):p.set(u(d)?v(d):d)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(d,p,m,y){function b($,P,A){var M,C={set:function(E){M=E}};return A===void 0&&(A=P.dflt),t.valObjectMeta[P.valType].coerceFunction($,C,A,P),M}if(u(d)&&(d=v(d)),!c(d)){p.set(m);return}var w=y.dimensions===2||y.dimensions==="1-2"&&Array.isArray(d)&&c(d[0]),g=y.items,x=[],_=Array.isArray(g),k=_&&w&&c(g[0]),T=w&&_&&!k,S=_&&!T?g.length:d.length,D,L,R,z,N,H;if(m=Array.isArray(m)?m:[],w)for(D=0;D<S;D++)for(x[D]=[],R=c(d[D])?d[D]:[],T?N=g.length:_?N=g[D].length:N=R.length,L=0;L<N;L++)T?z=g[L]:_?z=g[D][L]:z=g,H=b(R[L],z,(m[D]||[])[L]),H!==void 0&&(x[D][L]=H);else for(D=0;D<S;D++)H=b(d[D],_?g[D]:g,m[D]),H!==void 0&&(x[D]=H);p.set(x)},validateFunction:function(d,p){if(!c(d))return!1;var m=p.items,y=Array.isArray(m),b=p.dimensions===2;if(!p.freeLength&&d.length!==m.length)return!1;for(var w=0;w<d.length;w++)if(b){if(!c(d[w])||!p.freeLength&&d[w].length!==m[w].length)return!1;for(var g=0;g<d[w].length;g++)if(!h(d[w][g],y?m[w][g]:m))return!1}else if(!h(d[w],y?m[w]:m))return!1;return!0}}},t.coerce=function(d,p,m,y,b){var w=l(m,y).get(),g=l(d,y),x=l(p,y),_=g.get(),k=p._template;if(_===void 0&&k&&(_=l(k,y).get(),k=0),b===void 0&&(b=w.dflt),w.arrayOk){if(c(_))return x.set(_),_;if(u(_))return _=v(_),x.set(_),_}var T=t.valObjectMeta[w.valType].coerceFunction;T(_,x,b,w);var S=x.get();return k&&S===b&&!h(_,w)&&(_=l(k,y).get(),T(_,x,b,w),S=x.get()),S},t.coerce2=function(d,p,m,y,b){var w=l(d,y),g=t.coerce(d,p,m,y,b),x=w.get();return x!=null?g:!1},t.coerceFont=function(d,p,m){var y={};return m=m||{},y.family=d(p+".family",m.family),y.size=d(p+".size",m.size),y.color=d(p+".color",m.color),y},t.coercePattern=function(d,p,m,y){var b=d(p+".shape");if(b){d(p+".solidity"),d(p+".size");var w=d(p+".fillmode"),g=w==="overlay";if(!y){var x=d(p+".bgcolor",g?m:void 0);d(p+".fgcolor",g?n.contrast(x):m)}d(p+".fgopacity",g?.5:1)}},t.coerceHoverinfo=function(d,p,m){var y=p._module.attributes,b=y.hoverinfo?y:a,w=b.hoverinfo,g;if(m._dataLength===1){var x=w.dflt==="all"?w.flags.slice():w.dflt.split("+");x.splice(x.indexOf("name"),1),g=x.join("+")}return t.coerce(d,p,b,"hoverinfo",g)},t.coerceSelectionMarkerOpacity=function(d,p){if(d.marker){var m=d.marker.opacity;if(m!==void 0){var y,b;!c(m)&&!d.selected&&!d.unselected&&(y=m,b=o*m),p("selected.marker.opacity",y),p("unselected.marker.opacity",b)}}};function h(d,p){var m=t.valObjectMeta[p.valType];if(p.arrayOk&&c(d))return!0;if(m.validateFunction)return m.validateFunction(d,p);var y={},b=y,w={set:function(g){b=g}};return m.coerceFunction(d,w,y,p),b!==y}t.validate=h})(g_);var k_={},A_={exports:{}},M_={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},editSelection:{valType:"boolean",dflt:!0,description:"Enables moving selections."},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","<path-to-plotly.js>/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},S_={};function L_(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),L_(a,e[r]))}}L_(M_,S_);var jo={configAttributes:M_,dfltConfig:S_},Au=ft,pS=dt,rl=[],C_=function(t,e){if(rl.indexOf(t)!==-1)return;rl.push(t);var r=1e3;pS(e)?r=e:e==="long"&&(r=3e3);var a=Au.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(rl);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=rl.indexOf(l);s!==-1&&rl.splice(s,1),Au.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Au.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(n)});for(var s=l.append("p"),f=o.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?l.transition().duration(350).style("opacity",1):l.transition().duration(700).style("opacity",1).transition().delay(r).call(n)})},Mo=jo.dfltConfig,Bh=C_,Gh=A_.exports={};Gh.log=function(){var t;if(Mo.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Mo.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Bh(r.join("<br>"),"long")}};Gh.warn=function(){var t;if(Mo.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Mo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Bh(r.join("<br>"),"stick")}};Gh.error=function(){var t;if(Mo.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(Mo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Bh(r.join("<br>"),"stick")}};var Bo=A_.exports,Je={},Uh=function(){},D_=function(e,r){if(r instanceof RegExp){for(var a=r.toString(),i=0;i<e.length;i++)if(e[i]instanceof RegExp&&e[i].toString()===a)return e;e.push(r)}else(r||r===0)&&e.indexOf(r)===-1&&e.push(r);return e},Fc={};(function(t){var e=r_;t.init2dArray=function(r,a){for(var i=new Array(r),n=0;n<r;n++)i[n]=new Array(a);return i},t.transposeRagged=function(r){var a=0,i=r.length,n,o;for(n=0;n<i;n++)a=Math.max(a,r[n].length);var l=new Array(a);for(n=0;n<a;n++)for(l[n]=new Array(i),o=0;o<i;o++)l[n][o]=r[o][n];return l},t.dot=function(r,a){if(!(r.length&&a.length)||r.length!==a.length)return null;var i=r.length,n,o;if(r[0].length)for(n=new Array(i),o=0;o<i;o++)n[o]=t.dot(r[o],a);else if(a[0].length){var l=t.transposeRagged(a);for(n=new Array(l.length),o=0;o<l.length;o++)n[o]=t.dot(r,l[o])}else for(n=0,o=0;o<i;o++)n+=r[o]*a[o];return n},t.translationMatrix=function(r,a){return[[1,0,r],[0,1,a],[0,0,1]]},t.rotationMatrix=function(r){var a=r*Math.PI/180;return[[Math.cos(a),-Math.sin(a),0],[Math.sin(a),Math.cos(a),0],[0,0,1]]},t.rotationXYMatrix=function(r,a,i){return t.dot(t.dot(t.translationMatrix(a,i),t.rotationMatrix(r)),t.translationMatrix(-a,-i))},t.apply3DTransform=function(r){return function(){var a=arguments,i=arguments.length===1?a[0]:[a[0],a[1],a[2]||0];return t.dot(r,[i[0],i[1],i[2],1]).slice(0,3)}},t.apply2DTransform=function(r){return function(){var a=arguments;a.length===3&&(a=a[0]);var i=arguments.length===1?a[0]:[a[0],a[1]];return t.dot(r,[i[0],i[1],1]).slice(0,2)}},t.apply2DTransform2=function(r){var a=t.apply2DTransform(r);return function(i){return a(i.slice(0,2)).concat(a(i.slice(2,4)))}},t.convertCssMatrix=function(r){if(r){var a=r.length;if(a===16)return r;if(a===6)return[r[0],r[1],0,0,r[2],r[3],0,0,0,0,1,0,r[4],r[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},t.inverseTransformMatrix=function(r){var a=[];return e.invert(a,r),[[a[0],a[1],a[2],a[3]],[a[4],a[5],a[6],a[7]],[a[8],a[9],a[10],a[11]],[a[12],a[13],a[14],a[15]]]}})(Fc);var mS=ft,yS=Bo,gS=Fc,bS=r_;function xS(t){var e;if(typeof t=="string"){if(e=document.getElementById(t),e===null)throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}else if(t==null)throw new Error("DOM element provided is null or undefined");return t}function _S(t){var e=mS.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function P_(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function wS(t,e){E_("global",t,e)}function E_(t,e,r){var a="plotly.js-style-"+t,i=document.getElementById(a);i||(i=document.createElement("style"),i.setAttribute("id",a),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var n=i.sheet;n.insertRule?n.insertRule(e+"{"+r+"}",0):n.addRule?n.addRule(e,r,0):yS.warn("addStyleRule failed")}function TS(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&P_(r)}function kS(t){var e=z_(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(a){var i=R_(a);if(i){var n=gS.convertCssMatrix(i);r=bS.multiply(r,r,n)}}),r}function R_(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function z_(t){for(var e=[];AS(t);)e.push(t),t=t.parentNode;return e}function AS(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function MS(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var $c={getGraphDiv:xS,isPlotDiv:_S,removeElement:P_,addStyleRule:wS,addRelatedStyleRule:E_,deleteRelatedStyleRule:TS,getFullTransformMatrix:kS,getElementTransformMatrix:R_,getElementAndAncestors:z_,equalDomRects:MS},Nc={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}},I_=Nt.extendFlat,SS=_n,F_={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},$_={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},LS=F_.flags.slice().concat(["fullReplot"]),CS=$_.flags.slice().concat("layoutReplot"),Ia={traces:F_,layout:$_,traceFlags:function(){return Lm(LS)},layoutFlags:function(){return Lm(CS)},update:function(t,e){var r=e.editType;if(r&&r!=="none")for(var a=r.split("+"),i=0;i<a.length;i++)t[a[i]]=!0},overrideAll:N_};function Lm(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function N_(t,e,r){var a=I_({},t);for(var i in a){var n=a[i];SS(n)&&(a[i]=H_(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function H_(t,e,r,a){if(t.valType){var i=I_({},t);if(i.editType=e,Array.isArray(t.items)){i.items=new Array(t.items.length);for(var n=0;n<t.items.length;n++)i.items[n]=H_(t.items[n],e)}return i}else return N_(t,e,a.charAt(0)==="_"?"nested":"from-root")}var Hr={};Hr.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")};Hr.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")};var mr={},O_={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"},j_=O_,B_=j_.FORMAT_LINK,G_=j_.DATE_FORMAT_LINK;function U_(t){var e=t&&t.supportOther;return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,B_,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,G_,"for details on the date formatting syntax."].join(" ")}function DS(){return["Variables are inserted using %{variable},",'for example "x0: %{x0}".',`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{x0:$.2f}". See`,B_,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{x0|%m %b %Y}". See`,G_,"for details on the date formatting syntax.","A single multiplication or division operation may be applied to numeric variables, and combined with",'d3 number formatting, for example "Length in cm: %{x0*2.54}", "%{slope*60:.1f} meters per second."',"For log axes, variable values are given in log units.","For date axes, x/y coordinate variables and center variables use datetimes, while all other variable values use values in ms."].join(" ")}function Vh(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var a=[],i=0;i<r.length;i++)a[i]="`"+r[i]+"`";e=e+"Finally, the template string has access to ",r.length===1?e=e+"variable "+a[0]:e=e+"variables "+a.slice(0,-1).join(", ")+" and "+a.slice(-1)+"."}return e}mr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=Vh(e),a={valType:"string",dflt:"",editType:t.editType||"none",description:["Template string used for rendering the information that appear on hover box.","Note that this will override `hoverinfo`.",U_({supportOther:!0}),"The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data.","Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r,'Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>".',"To hide the secondary box completely, use an empty tag `<extra></extra>`."].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};mr.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=Vh(e),a={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",U_(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};mr.shapeTexttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=t.newshape?"new ":"",a=Vh(e),i={valType:"string",dflt:"",editType:t.editType||"arraydraw",description:["Template string used for rendering the "+r+"shape's label.","Note that this will override `text`.",DS(),a].join(" ")};return i};function Mi(t,e){return e?e.d2l(t):t}function V_(t,e){return e?e.l2d(t):t}function PS(t){return t.x0}function ES(t){return t.x1}function RS(t){return t.y0}function zS(t){return t.y1}function Hc(t,e){return Mi(t.x1,e)-Mi(t.x0,e)}function Oc(t,e,r){return Mi(t.y1,r)-Mi(t.y0,r)}function IS(t,e){return Math.abs(Hc(t,e))}function FS(t,e,r){return Math.abs(Oc(t,e,r))}function $S(t,e,r){return t.type!=="line"?void 0:Math.sqrt(Math.pow(Hc(t,e),2)+Math.pow(Oc(t,e,r),2))}function NS(t,e){return V_((Mi(t.x1,e)+Mi(t.x0,e))/2,e)}function HS(t,e,r){return V_((Mi(t.y1,r)+Mi(t.y0,r))/2,r)}function OS(t,e,r){return t.type!=="line"?void 0:Oc(t,e,r)/Hc(t,e)}var Xh={x0:PS,x1:ES,y0:RS,y1:zS,slope:OS,dx:Hc,dy:Oc,width:IS,height:FS,length:$S,xcenter:NS,ycenter:HS},jS=Ia.overrideAll,Vi=oa,Cm=vr,BS=Hr.dash,oi=Nt.extendFlat,GS=mr.shapeTexttemplateAttrs,US=Xh,VS=jS({newshape:{visible:oi({},Vi.visible,{description:["Determines whether or not new shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,description:["Determines whether or not new","shape is shown in the legend."].join(" ")},legend:oi({},Vi.legend,{description:["Sets the reference to a legend to show new shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:oi({},Vi.legendgroup,{description:["Sets the legend group for new shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:oi({},Vi.legendgrouptitle.text,{}),font:Cm({description:["Sets this legend group's title font."].join(" ")})},legendrank:oi({},Vi.legendrank,{description:["Sets the legend rank for new shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")}),legendwidth:oi({},Vi.legendwidth,{description:"Sets the width (in px or fraction) of the legend for new shape."}),line:{color:{valType:"color",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,description:"Sets the line width (in px)."},dash:oi({},BS,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},name:oi({},Vi.name,{description:["Sets new shape name.","The name appears as the legend item."].join(" ")}),label:{text:{valType:"string",dflt:"",description:["Sets the text to display with the new shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:GS({newshape:!0},{keys:Object.keys(US)}),font:Cm({description:"Sets the new shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],description:["Sets the position of the label text relative to the new shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","new shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","new shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,description:"Sets padding (in px) between edge of label and edge of new shape."}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,description:"Sets the opacity of the active shape."}}},"none","from-root"),XS=Hr.dash,YS=Nt.extendFlat,WS={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none",description:["Describes how a new selection is created.","If `immediate`, a new selection is created after first mouse up.","If `gradual`, a new selection is not created after first mouse.","By adding to and subtracting from the initial selection,","this option allows declaring extra outlines of the selection."].join(" ")},line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:1,dflt:1,editType:"none",description:"Sets the line width (in px)."},dash:YS({},XS,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:"Sets the color filling the active selection' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active selection."},editType:"none"}},Yh=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}},Dd=vr,qS=Nc,Pf=xr,Dm=VS,Pm=WS,ZS=Yh,Em=Nt.extendFlat,jc=Dd({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});jc.family.dflt='"Open Sans", verdana, arial, sans-serif';jc.size.dflt=12;jc.color.dflt=Pf.defaultLine;var vs={font:jc,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Dd({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:Em(ZS({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether the title can automatically push the figure margins.","If `yref='paper'` then the margin will expand to ensure that the title doesn’t","overlap with the edges of the container. If `yref='container'` then the margins","will ensure that the title doesn’t overlap with the plot area, tick labels,","and axis titles. If `automargin=true` and the margins need to be expanded,","then y will be set to a default 1 and yanchor will be set to an appropriate","default to ensure that minimal margin space is needed. Note that when `yref='paper'`,","only 1 or 0 are allowed y values. Invalid values will be reset to the default 1."].join(" ")},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum width of the plot with margin.automargin applied (in px)"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot",description:"Minimum height of the plot with margin.automargin applied (in px)"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:Pf.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:Pf.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:Pf.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:Dm.newshape,activeshape:Dm.activeshape,newselection:Pm.newselection,activeselection:Pm.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:Em({},qS.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:Dd({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}};(function(t){var e=Bo,r=Uh,a=D_,i=_n,n=$c.addStyleRule,o=Nt,l=oa,s=vs,f=o.extendFlat,c=o.extendDeepAll;t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.transformsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(_){if(t.collectableSubplotTypes=null,_)_&&!Array.isArray(_)&&(_=[_]);else throw new Error("No argument passed to Plotly.register.");for(var k=0;k<_.length;k++){var T=_[k];if(!T)throw new Error("Invalid module was attempted to be registered!");switch(T.moduleType){case"trace":u(T);break;case"transform":d(T);break;case"component":h(T);break;case"locale":p(T);break;case"apiMethod":var S=T.name;t.apiMethodRegistry[S]=T.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(x){var _=t.modules[g(x)];return _?_._module:!1},t.traceIs=function(x,_){if(x=g(x),x==="various")return!1;var k=t.modules[x];return k||(x&&e.log("Unrecognized trace type "+x+"."),k=t.modules[l.type.dflt]),!!k.categories[_]},t.getTransformIndices=function(x,_){for(var k=[],T=x.transforms||[],S=0;S<T.length;S++)T[S].type===_&&k.push(S);return k},t.hasTransform=function(x,_){for(var k=x.transforms||[],T=0;T<k.length;T++)if(k[T].type===_)return!0;return!1},t.getComponentMethod=function(x,_){var k=t.componentsRegistry[x];return k&&k[_]||r},t.call=function(){var x=arguments[0],_=[].slice.call(arguments,1);return t.apiMethodRegistry[x].apply(null,_)};function u(x){var _=x.name,k=x.categories,T=x.meta;if(t.modules[_]){e.log("Type "+_+" already registered");return}t.subplotsRegistry[x.basePlotModule.name]||v(x.basePlotModule);for(var S={},D=0;D<k.length;D++)S[k[D]]=!0,t.allCategories[k[D]]=!0;t.modules[_]={_module:x,categories:S},T&&Object.keys(T).length&&(t.modules[_].meta=T),t.allTypes.push(_);for(var L in t.componentsRegistry)y(L,_);x.layoutAttributes&&f(t.traceLayoutAttributes,x.layoutAttributes);var R=x.basePlotModule,z=R.name;if(z==="mapbox"){var N=R.constants.styleRules;for(var H in N)n(".js-plotly-plot .plotly .mapboxgl-"+H,N[H])}(z==="geo"||z==="mapbox")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function v(x){var _=x.name;if(t.subplotsRegistry[_]){e.log("Plot type "+_+" already registered.");return}m(x),t.subplotsRegistry[_]=x;for(var k in t.componentsRegistry)w(k,x.name)}function h(x){if(typeof x.name!="string")throw new Error("Component module *name* must be a string.");var _=x.name;t.componentsRegistry[_]=x,x.layoutAttributes&&(x.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,_),m(x));for(var k in t.modules)y(_,k);for(var T in t.subplotsRegistry)w(_,T);for(var S in t.transformsRegistry)b(_,S);x.schema&&x.schema.layout&&c(s,x.schema.layout)}function d(x){if(typeof x.name!="string")throw new Error("Transform module *name* must be a string.");var _="Transform module "+x.name,k=typeof x.transform=="function",T=typeof x.calcTransform=="function";if(!k&&!T)throw new Error(_+" is missing a *transform* or *calcTransform* method.");k&&T&&e.log([_+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(x.attributes)||e.log(_+" registered without an *attributes* object."),typeof x.supplyDefaults!="function"&&e.log(_+" registered without a *supplyDefaults* method."),t.transformsRegistry[x.name]=x;for(var S in t.componentsRegistry)b(S,x.name)}function p(x){var _=x.name,k=_.split("-")[0],T=x.dictionary,S=x.format,D=T&&Object.keys(T).length,L=S&&Object.keys(S).length,R=t.localeRegistry,z=R[_];if(z||(R[_]=z={}),k!==_){var N=R[k];N||(R[k]=N={}),D&&N.dictionary===z.dictionary&&(N.dictionary=T),L&&N.format===z.format&&(N.format=S)}D&&(z.dictionary=T),L&&(z.format=S)}function m(x){if(x.layoutAttributes){var _=x.layoutAttributes._arrayAttrRegexps;if(_)for(var k=0;k<_.length;k++)a(t.layoutArrayRegexes,_[k])}}function y(x,_){var k=t.componentsRegistry[x].schema;if(!(!k||!k.traces)){var T=k.traces[_];T&&c(t.modules[_]._module.attributes,T)}}function b(x,_){var k=t.componentsRegistry[x].schema;if(!(!k||!k.transforms)){var T=k.transforms[_];T&&c(t.transformsRegistry[_].attributes,T)}}function w(x,_){var k=t.componentsRegistry[x].schema;if(!(!k||!k.subplots)){var T=t.subplotsRegistry[_],S=T.layoutAttributes,D=T.attr==="subplot"?T.name:T.attr;Array.isArray(D)&&(D=D[0]);var L=k.subplots[D];S&&L&&c(S,L)}}function g(x){return typeof x=="object"&&(x=x.type),x}})(Je);(function(t){var e=Bl.timeFormat,r=dt,a=Bo,i=ss.mod,n=Yt,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,u=n.EPOCHJD,v=Je,h=Bl.utcFormat,d=/^\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,p=/^\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,m=new Date().getFullYear()-70;function y(P){return P&&v.componentsRegistry.calendars&&typeof P=="string"&&P!=="gregorian"}t.dateTick0=function(P,A){var M=b(P,!!A);if(A<2)return M;var C=t.dateTime2ms(M,P);return C+=l*(A-1),t.ms2DateTime(C,0,P)};function b(P,A){return y(P)?A?v.getComponentMethod("calendars","CANONICAL_SUNDAY")[P]:v.getComponentMethod("calendars","CANONICAL_TICK")[P]:A?"2000-01-02":"2000-01-01"}t.dfltRange=function(P){return y(P)?v.getComponentMethod("calendars","DFLTRANGE")[P]:["2000-01-01","2001-01-01"]},t.isJSDate=function(P){return typeof P=="object"&&P!==null&&typeof P.getTime=="function"};var w,g;t.dateTime2ms=function(P,A){if(t.isJSDate(P)){var M=P.getTimezoneOffset()*f,C=(P.getUTCMinutes()-P.getMinutes())*f+(P.getUTCSeconds()-P.getSeconds())*c+(P.getUTCMilliseconds()-P.getMilliseconds());if(C){var E=3*f;M=M-E/2+i(C-M+E/2,E)}return P=Number(P)-M,P>=w&&P<=g?P:o}if(typeof P!="string"&&typeof P!="number")return o;P=String(P);var F=y(A),j=P.charAt(0);F&&(j==="G"||j==="g")&&(P=P.substr(1),A="");var B=F&&A.substr(0,7)==="chinese",G=P.match(B?p:d);if(!G)return o;var O=G[1],W=G[3]||"1",V=Number(G[5]||1),Z=Number(G[7]||0),X=Number(G[9]||0),Q=Number(G[11]||0);if(F){if(O.length===2)return o;O=Number(O);var te;try{var xe=v.getComponentMethod("calendars","getCal")(A);if(B){var ue=W.charAt(W.length-1)==="i";W=parseInt(W,10),te=xe.newDate(O,xe.toMonthIndex(O,W,ue),V)}else te=xe.newDate(O,Number(W),V)}catch{return o}return te?(te.toJD()-u)*l+Z*s+X*f+Q*c:o}O.length===2?O=(Number(O)+2e3-m)%100+m:O=Number(O),W-=1;var ae=new Date(Date.UTC(2e3,W,V,Z,X));return ae.setUTCFullYear(O),ae.getUTCMonth()!==W||ae.getUTCDate()!==V?o:ae.getTime()+Q*c},w=t.MIN_MS=t.dateTime2ms("-9999"),g=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(P,A){return t.dateTime2ms(P,A)!==o};function x(P,A){return String(P+Math.pow(10,A)).substr(1)}var _=90*l,k=3*s,T=5*f;t.ms2DateTime=function(P,A,M){if(typeof P!="number"||!(P>=w&&P<=g))return o;A||(A=0);var C=Math.floor(i(P+.05,1)*10),E=Math.round(P-C/10),F,j,B,G,O,W;if(y(M)){var V=Math.floor(E/l)+u,Z=Math.floor(i(P,l));try{F=v.getComponentMethod("calendars","getCal")(M).fromJD(V).formatDate("yyyy-mm-dd")}catch{F=h("G%Y-%m-%d")(new Date(E))}if(F.charAt(0)==="-")for(;F.length<11;)F="-0"+F.substr(1);else for(;F.length<10;)F="0"+F;j=A<_?Math.floor(Z/s):0,B=A<_?Math.floor(Z%s/f):0,G=A<k?Math.floor(Z%f/c):0,O=A<T?Z%c*10+C:0}else W=new Date(E),F=h("%Y-%m-%d")(W),j=A<_?W.getUTCHours():0,B=A<_?W.getUTCMinutes():0,G=A<k?W.getUTCSeconds():0,O=A<T?W.getUTCMilliseconds()*10+C:0;return S(F,j,B,G,O)},t.ms2DateTimeLocal=function(P){if(!(P>=w+l&&P<=g-l))return o;var A=Math.floor(i(P+.05,1)*10),M=new Date(Math.round(P-A/10)),C=e("%Y-%m-%d")(M),E=M.getHours(),F=M.getMinutes(),j=M.getSeconds(),B=M.getUTCMilliseconds()*10+A;return S(C,E,F,j,B)};function S(P,A,M,C,E){if((A||M||C||E)&&(P+=" "+x(A,2)+":"+x(M,2),(C||E)&&(P+=":"+x(C,2),E))){for(var F=4;E%10===0;)F-=1,E/=10;P+="."+x(E,F)}return P}t.cleanDate=function(P,A,M){if(P===o)return A;if(t.isJSDate(P)||typeof P=="number"&&isFinite(P)){if(y(M))return a.error("JS Dates and milliseconds are incompatible with world calendars",P),A;if(P=t.ms2DateTimeLocal(+P),!P&&A!==void 0)return A}else if(!t.isDateTime(P,M))return a.error("unrecognized date",P),A;return P};var D=/%\d?f/g,L=/%h/g,R={1:"1",2:"1",3:"2",4:"2"};function z(P,A,M,C){P=P.replace(D,function(F){var j=Math.min(+F.charAt(1)||6,6),B=(A/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return B});var E=new Date(Math.floor(A+.05));if(P=P.replace(L,function(){return R[M("%q")(E)]}),y(C))try{P=v.getComponentMethod("calendars","worldCalFmt")(P,A,C)}catch{return"Invalid"}return M(P)(E)}var N=[59,59.9,59.99,59.999,59.9999];function H(P,A){var M=i(P+.05,l),C=x(Math.floor(M/s),2)+":"+x(i(Math.floor(M/f),60),2);if(A!=="M"){r(A)||(A=0);var E=Math.min(i(P/c,60),N[A]),F=(100+E).toFixed(A).substr(1);A>0&&(F=F.replace(/0+$/,"").replace(/[\.]$/,"")),C+=":"+F}return C}t.formatDate=function(P,A,M,C,E,F){if(E=y(E)&&E,!A)if(M==="y")A=F.year;else if(M==="m")A=F.month;else if(M==="d")A=F.dayMonth+`
|
|
2
|
-
`+F.year;else return H(P,M)+`
|
|
3
|
-
`+z(F.dayMonthYear,P,C,E);return z(A,P,C,E)};var $=3*l;t.incrementMonth=function(P,A,M){M=y(M)&&M;var C=i(P,l);if(P=Math.round(P-C),M)try{var E=Math.round(P/l)+u,F=v.getComponentMethod("calendars","getCal")(M),j=F.fromJD(E);return A%12?F.add(j,A,"m"):F.add(j,A/12,"y"),(j.toJD()-u)*l+C}catch{a.error("invalid ms "+P+" in calendar "+M)}var B=new Date(P+$);return B.setUTCMonth(B.getUTCMonth()+A)+C-$},t.findExactDates=function(P,A){for(var M=0,C=0,E=0,F=0,j,B,G=y(A)&&v.getComponentMethod("calendars","getCal")(A),O=0;O<P.length;O++){if(B=P[O],!r(B)){F++;continue}if(!(B%l))if(G)try{j=G.fromJD(B/l+u),j.day()===1?j.month()===1?M++:C++:E++}catch{}else j=new Date(B),j.getUTCDate()===1?j.getUTCMonth()===0?M++:C++:E++}C+=M,E+=C;var W=P.length-F;return{exactYears:M/W,exactMonths:C/W,exactDays:E/W}}})(k_);var Wh={},X_=function(e){return e};(function(t){var e=dt,r=Bo,a=X_,i=Yt.BADNUM,n=1e-9;t.findBin=function(c,u,v){if(e(u.start))return v?Math.ceil((c-u.start)/u.size-n)-1:Math.floor((c-u.start)/u.size+n);var h=0,d=u.length,p=0,m=d>1?(u[d-1]-u[0])/(d-1):1,y,b;for(m>=0?b=v?o:l:b=v?f:s,c+=m*n*(v?-1:1)*(m>=0?1:-1);h<d&&p++<100;)y=Math.floor((h+d)/2),b(u[y],c)?h=y+1:d=y;return p>90&&r.log("Long binary search..."),h-1};function o(c,u){return c<u}function l(c,u){return c<=u}function s(c,u){return c>u}function f(c,u){return c>=u}t.sorterAsc=function(c,u){return c-u},t.sorterDes=function(c,u){return u-c},t.distinctVals=function(c){var u=c.slice();u.sort(t.sorterAsc);var v;for(v=u.length-1;v>-1&&u[v]===i;v--);for(var h=u[v]-u[0]||1,d=h/(v||1)/1e4,p=[],m,y=0;y<=v;y++){var b=u[y],w=b-m;m===void 0?(p.push(b),m=b):w>d&&(h=Math.min(h,w),p.push(b),m=b)}return{vals:p,minDiff:h}},t.roundUp=function(c,u,v){for(var h=0,d=u.length-1,p,m=0,y=v?0:1,b=v?1:0,w=v?Math.ceil:Math.floor;h<d&&m++<100;)p=w((h+d)/2),u[p]<=c?h=p+y:d=p-b;return u[h]},t.sort=function(c,u){for(var v=0,h=0,d=1;d<c.length;d++){var p=u(c[d],c[d-1]);if(p<0?v=1:p>0&&(h=1),v&&h)return c.sort(u)}return h?c:c.reverse()},t.findIndexOfMin=function(c,u){u=u||a;for(var v=1/0,h,d=0;d<c.length;d++){var p=u(c[d]);p<v&&(v=p,h=d)}return h}})(Wh);var qh=function(e){return Object.keys(e).sort()},Y_={};(function(t){var e=dt,r=Xt.isArrayOrTypedArray;t.aggNums=function(a,i,n,o){var l,s;if((!o||o>n.length)&&(o=n.length),e(i)||(i=!1),r(n[0])){for(s=new Array(o),l=0;l<o;l++)s[l]=t.aggNums(a,i,n[l]);n=s}for(l=0;l<o;l++)e(i)?e(n[l])&&(i=a(+i,+n[l])):i=n[l];return i},t.len=function(a){return t.aggNums(function(i){return i+1},0,a)},t.mean=function(a,i){return i||(i=t.len(a)),t.aggNums(function(n,o){return n+o},0,a)/i},t.midRange=function(a){if(!(a===void 0||a.length===0))return(t.aggNums(Math.max,null,a)+t.aggNums(Math.min,null,a))/2},t.variance=function(a,i,n){return i||(i=t.len(a)),e(n)||(n=t.mean(a,i)),t.aggNums(function(o,l){return o+Math.pow(l-n,2)},0,a)/i},t.stdev=function(a,i,n){return Math.sqrt(t.variance(a,i,n))},t.median=function(a){var i=a.slice().sort();return t.interp(i,.5)},t.interp=function(a,i){if(!e(i))throw"n should be a finite number";if(i=i*a.length-.5,i<0)return a[0];if(i>a.length-1)return a[a.length-1];var n=i%1;return n*a[Math.ceil(i)]+(1-n)*a[Math.floor(i)]}})(Y_);var W_=ss,Mu=W_.mod,KS=W_.modHalf,Gl=Math.PI,bi=2*Gl;function QS(t){return t/180*Gl}function JS(t){return t/Gl*180}function Zh(t){return Math.abs(t[1]-t[0])>bi-1e-14}function q_(t,e){return KS(e-t,bi)}function eL(t,e){return Math.abs(q_(t,e))}function Z_(t,e){if(Zh(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=Mu(r,bi),a=Mu(a,bi),r>a&&(a+=bi);var i=Mu(t,bi),n=i+bi;return i>=r&&i<=a||n>=r&&n<=a}function tL(t,e,r,a){if(!Z_(e,a))return!1;var i,n;return r[0]<r[1]?(i=r[0],n=r[1]):(i=r[1],n=r[0]),t>=i&&t<=n}function Kh(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Zh([r,a]),s,f,c,u,v;l?(s=0,f=Gl,c=bi):r<a?(s=r,c=a):(s=a,c=r),t<e?(u=t,v=e):(u=e,v=t);function h(y,b){return[y*Math.cos(b)+i,n-y*Math.sin(b)]}var d=Math.abs(c-s)<=Gl?0:1;function p(y,b,w){return"A"+[y,y]+" "+[0,d,w]+" "+h(y,b)}var m;return l?u===null?m="M"+h(v,s)+p(v,f,0)+p(v,c,0)+"Z":m="M"+h(u,s)+p(u,f,0)+p(u,c,0)+"ZM"+h(v,s)+p(v,f,1)+p(v,c,1)+"Z":u===null?(m="M"+h(v,s)+p(v,c,0),o&&(m+="L0,0Z")):m="M"+h(u,s)+"L"+h(v,s)+p(v,c,0)+"L"+h(u,c)+p(u,s,1)+"Z",m}function rL(t,e,r,a,i){return Kh(null,t,e,r,a,i,0)}function aL(t,e,r,a,i){return Kh(null,t,e,r,a,i,1)}function iL(t,e,r,a,i,n){return Kh(t,e,r,a,i,n,1)}var nL={deg2rad:QS,rad2deg:JS,angleDelta:q_,angleDist:eL,isFullCircle:Zh,isAngleInsideSector:Z_,isPtInsideSector:tL,pathArc:rL,pathSector:aL,pathAnnulus:iL},wn={};wn.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};wn.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};wn.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};wn.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};wn.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};wn.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var Tn={},Su=ss.mod;Tn.segmentsIntersect=K_;function K_(t,e,r,a,i,n,o,l){var s=r-t,f=i-t,c=o-i,u=a-e,v=n-e,h=l-n,d=s*h-c*u;if(d===0)return null;var p=(f*h-c*v)/d,m=(f*u-s*v)/d;return m<0||m>1||p<0||p>1?null:{x:t+s*p,y:e+u*p}}Tn.segmentDistance=function(e,r,a,i,n,o,l,s){if(K_(e,r,a,i,n,o,l,s))return 0;var f=a-e,c=i-r,u=l-n,v=s-o,h=f*f+c*c,d=u*u+v*v,p=Math.min(Ds(f,c,h,n-e,o-r),Ds(f,c,h,l-e,s-r),Ds(u,v,d,e-n,r-o),Ds(u,v,d,a-n,i-o));return Math.sqrt(p)};function Ds(t,e,r,a,i){var n=a*t+i*e;if(n<0)return a*a+i*i;if(n>r){var o=a-t,l=i-e;return o*o+l*l}else{var s=a*e-i*t;return s*s/r}}var Ps,Pd,Rm;Tn.getTextLocation=function(e,r,a,i){if((e!==Pd||i!==Rm)&&(Ps={},Pd=e,Rm=i),Ps[a])return Ps[a];var n=e.getPointAtLength(Su(a-i/2,r)),o=e.getPointAtLength(Su(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(Su(a,r)),f=(s.x*4+n.x+o.x)/6,c=(s.y*4+n.y+o.y)/6,u={x:f,y:c,theta:l};return Ps[a]=u,u};Tn.clearLocationCache=function(){Pd=null};Tn.getVisibleSegment=function(e,r,a){var i=r.left,n=r.right,o=r.top,l=r.bottom,s=0,f=e.getTotalLength(),c=f,u,v;function h(p){var m=e.getPointAtLength(p);p===0?u=m:p===f&&(v=m);var y=m.x<i?i-m.x:m.x>n?m.x-n:0,b=m.y<o?o-m.y:m.y>l?m.y-l:0;return Math.sqrt(y*y+b*b)}for(var d=h(s);d;){if(s+=d+a,s>c)return;d=h(s)}for(d=h(c);d;){if(c-=d+a,s>c)return;d=h(c)}return{min:s,max:c,len:c-s,total:f,isClosed:s===0&&c===f&&Math.abs(u.x-v.x)<.1&&Math.abs(u.y-v.y)<.1}};Tn.findPointOnPath=function(e,r,a,i){i=i||{};for(var n=i.pathLength||e.getTotalLength(),o=i.tolerance||.001,l=i.iterationLimit||30,s=e.getPointAtLength(0)[a]>e.getPointAtLength(n)[a]?-1:1,f=0,c=0,u=n,v,h,d;f<l;){if(v=(c+u)/2,h=e.getPointAtLength(v),d=h[a]-r,Math.abs(d)<o)return h;s*d>0?u=v:c=v,f++}return h};var Bc={};(function(t){var e={};t.throttle=function(i,n,o){var l=e[i],s=Date.now();if(!l){for(var f in e)e[f].ts<s-6e4&&delete e[f];l=e[i]={ts:0,timer:null}}r(l);function c(){o(),l.ts=Date.now(),l.onDone&&(l.onDone(),l.onDone=null)}if(s>l.ts+n){c();return}l.timer=setTimeout(function(){c(),l.timer=null},n)},t.done=function(a){var i=e[a];return!i||!i.timer?Promise.resolve():new Promise(function(n){var o=i.onDone;i.onDone=function(){o&&o(),n(),i.onDone=null}})},t.clear=function(a){if(a)r(e[a]),delete e[a];else for(var i in e)t.clear(i)};function r(a){a&&a.timer!==null&&(clearTimeout(a.timer),a.timer=null)}})(Bc);var oL=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},lL=dt,sL=MM,fL=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=cL(),typeof r!="string")return!0;var a=sL({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!a)for(var i=r.split(" "),n=1;n<i.length;n++){var o=i[n];if(o.indexOf("Safari")!==-1)for(var l=n-1;l>-1;l--){var s=i[l];if(s.substr(0,8)==="Version/"){var f=s.substr(8).split(".")[0];if(lL(f)&&(f=+f),f>=13)return!0}}}return a};function cL(){var t;return typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),t}var uL=ft,vL=function(e,r,a){var i=e.selectAll("g."+a.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",a),i.order();var n=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(o){o[0][n]=uL.select(this)}),i},dL=Je,hL=function(e,r){for(var a=e._context.locale,i=0;i<2;i++){for(var n=e._context.locales,o=0;o<2;o++){var l=(n[a]||{}).dictionary;if(l){var s=l[r];if(s)return s}n=dL.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},pL=function(e){for(var r={},a=[],i=0,n=0;n<e.length;n++){var o=e[n];r[o]!==1&&(r[o]=1,a[i++]=o)}return a},mL=function(e){for(var r=bL(e)?gL:yL,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function yL(t){return t.visible===!0}function gL(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function bL(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var xL=function(e,r){if(!r)return e;var a=1/Math.abs(r),i=a>1?(a*e+a*r)/a:e+r,n=String(i).length;if(n>16){var o=String(r).length,l=String(e).length;if(n>=l+o){var s=parseFloat(i).toPrecision(12);s.indexOf("e+")===-1&&(i=+s)}}return i},_L=dt,wL=Yt.BADNUM,TL=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,kL=function(e){return typeof e=="string"&&(e=e.replace(TL,"")),_L(e)?Number(e):wL},Ll=ft,AL=Bl.utcFormat,ML=a_.format,Q_=dt,J_=Yt,ew=J_.FP_SAFE,SL=-ew,zm=J_.BADNUM,J=u_.exports={};J.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:e==="0.f"?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var Im={};J.warnBadFormat=function(t){var e=String(t);Im[e]||(Im[e]=1,J.warn('encountered bad format: "'+e+'"'))};J.noFormat=function(t){return String(t)};J.numberFormat=function(t){var e;try{e=ML(J.adjustFormat(t))}catch{return J.warnBadFormat(t),J.noFormat}return e};J.nestedProperty=Hh;J.keyedContainer=KM;J.relativeAttr=eS;J.isPlainObject=_n;J.toLogRange=Oh;J.relinkPrivateKeys=rS;var Di=Xt;J.isArrayBuffer=Di.isArrayBuffer;J.isTypedArray=Di.isTypedArray;J.isArrayOrTypedArray=Di.isArrayOrTypedArray;J.isArray1D=Di.isArray1D;J.ensureArray=Di.ensureArray;J.concat=Di.concat;J.maxRowLength=Di.maxRowLength;J.minRowLength=Di.minRowLength;var tw=ss;J.mod=tw.mod;J.modHalf=tw.modHalf;var Pi=g_;J.valObjectMeta=Pi.valObjectMeta;J.coerce=Pi.coerce;J.coerce2=Pi.coerce2;J.coerceFont=Pi.coerceFont;J.coercePattern=Pi.coercePattern;J.coerceHoverinfo=Pi.coerceHoverinfo;J.coerceSelectionMarkerOpacity=Pi.coerceSelectionMarkerOpacity;J.validate=Pi.validate;var Gr=k_;J.dateTime2ms=Gr.dateTime2ms;J.isDateTime=Gr.isDateTime;J.ms2DateTime=Gr.ms2DateTime;J.ms2DateTimeLocal=Gr.ms2DateTimeLocal;J.cleanDate=Gr.cleanDate;J.isJSDate=Gr.isJSDate;J.formatDate=Gr.formatDate;J.incrementMonth=Gr.incrementMonth;J.dateTick0=Gr.dateTick0;J.dfltRange=Gr.dfltRange;J.findExactDates=Gr.findExactDates;J.MIN_MS=Gr.MIN_MS;J.MAX_MS=Gr.MAX_MS;var kn=Wh;J.findBin=kn.findBin;J.sorterAsc=kn.sorterAsc;J.sorterDes=kn.sorterDes;J.distinctVals=kn.distinctVals;J.roundUp=kn.roundUp;J.sort=kn.sort;J.findIndexOfMin=kn.findIndexOfMin;J.sortObjectKeys=qh;var Ei=Y_;J.aggNums=Ei.aggNums;J.len=Ei.len;J.mean=Ei.mean;J.median=Ei.median;J.midRange=Ei.midRange;J.variance=Ei.variance;J.stdev=Ei.stdev;J.interp=Ei.interp;var Ta=Fc;J.init2dArray=Ta.init2dArray;J.transposeRagged=Ta.transposeRagged;J.dot=Ta.dot;J.translationMatrix=Ta.translationMatrix;J.rotationMatrix=Ta.rotationMatrix;J.rotationXYMatrix=Ta.rotationXYMatrix;J.apply3DTransform=Ta.apply3DTransform;J.apply2DTransform=Ta.apply2DTransform;J.apply2DTransform2=Ta.apply2DTransform2;J.convertCssMatrix=Ta.convertCssMatrix;J.inverseTransformMatrix=Ta.inverseTransformMatrix;var Fa=nL;J.deg2rad=Fa.deg2rad;J.rad2deg=Fa.rad2deg;J.angleDelta=Fa.angleDelta;J.angleDist=Fa.angleDist;J.isFullCircle=Fa.isFullCircle;J.isAngleInsideSector=Fa.isAngleInsideSector;J.isPtInsideSector=Fa.isPtInsideSector;J.pathArc=Fa.pathArc;J.pathSector=Fa.pathSector;J.pathAnnulus=Fa.pathAnnulus;var Go=wn;J.isLeftAnchor=Go.isLeftAnchor;J.isCenterAnchor=Go.isCenterAnchor;J.isRightAnchor=Go.isRightAnchor;J.isTopAnchor=Go.isTopAnchor;J.isMiddleAnchor=Go.isMiddleAnchor;J.isBottomAnchor=Go.isBottomAnchor;var Uo=Tn;J.segmentsIntersect=Uo.segmentsIntersect;J.segmentDistance=Uo.segmentDistance;J.getTextLocation=Uo.getTextLocation;J.clearLocationCache=Uo.clearLocationCache;J.getVisibleSegment=Uo.getVisibleSegment;J.findPointOnPath=Uo.findPointOnPath;var Gc=Nt;J.extendFlat=Gc.extendFlat;J.extendDeep=Gc.extendDeep;J.extendDeepAll=Gc.extendDeepAll;J.extendDeepNoArrays=Gc.extendDeepNoArrays;var Qh=Bo;J.log=Qh.log;J.warn=Qh.warn;J.error=Qh.error;var LL=Oo;J.counterRegex=LL.counter;var Jh=Bc;J.throttle=Jh.throttle;J.throttleDone=Jh.done;J.clearThrottle=Jh.clear;var $a=$c;J.getGraphDiv=$a.getGraphDiv;J.isPlotDiv=$a.isPlotDiv;J.removeElement=$a.removeElement;J.addStyleRule=$a.addStyleRule;J.addRelatedStyleRule=$a.addRelatedStyleRule;J.deleteRelatedStyleRule=$a.deleteRelatedStyleRule;J.getFullTransformMatrix=$a.getFullTransformMatrix;J.getElementTransformMatrix=$a.getElementTransformMatrix;J.getElementAndAncestors=$a.getElementAndAncestors;J.equalDomRects=$a.equalDomRects;J.clearResponsive=oL;J.preserveDrawingBuffer=fL;J.makeTraceGroups=vL;J._=hL;J.notifier=C_;J.filterUnique=pL;J.filterVisible=mL;J.pushUnique=D_;J.increment=xL;J.cleanNumber=kL;J.ensureNumber=function(e){return Q_(e)?(e=Number(e),e>ew||e<SL?zm:e):zm};J.isIndex=function(t,e){return e!==void 0&&t>=e?!1:Q_(t)&&t>=0&&t%1===0};J.noop=Uh;J.identity=X_;J.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};J.swapAttrs=function(t,e,r,a){r||(r="x"),a||(a="y");for(var i=0;i<e.length;i++){var n=e[i],o=J.nestedProperty(t,n.replace("?",r)),l=J.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};J.raiseToTop=function(e){e.parentNode.appendChild(e)};J.cancelTransition=function(t){return t.transition().duration(0)};J.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};J.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r};J.simpleMap=function(t,e,r,a,i){for(var n=t.length,o=new Array(n),l=0;l<n;l++)o[l]=e(t[l],r,a,i);return o};J.randstr=function t(e,r,a,i){if(a||(a=16),r===void 0&&(r=24),r<=0)return"0";var n=Math.log(Math.pow(2,r))/Math.log(a),o="",l,s,f;for(l=2;n===1/0;l*=2)n=Math.log(Math.pow(2,r/l))/Math.log(a)*l;var c=n-Math.floor(n);for(l=0;l<Math.floor(n);l++)f=Math.floor(Math.random()*a).toString(a),o=f+o;c&&(s=Math.pow(a,c),f=Math.floor(Math.random()*s).toString(a),o=f+o);var u=parseInt(o,a);return e&&e[o]||u!==1/0&&u>=Math.pow(2,r)?i>10?(J.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};J.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(a){a[e]=t,r[a.name]=a,r.optionList.push(a)},r["_"+e]=t,r};J.smooth=function(t,e){if(e=Math.round(e)||0,e<2)return t;var r=t.length,a=2*r,i=2*e-1,n=new Array(i),o=new Array(r),l,s,f,c;for(l=0;l<i;l++)n[l]=(1-Math.cos(Math.PI*(l+1)/e))/(2*e);for(l=0;l<r;l++){for(c=0,s=0;s<i;s++)f=l+s+1-e,f<-r?f-=a*Math.round(f/a):f>=a&&(f-=a*Math.floor(f/a)),f<0?f=-1-f:f>=r&&(f=a-1-f),c+=t[f]*n[s];o[l]=c}return o};J.syncOrAsync=function(t,e,r){var a,i;function n(){return J.syncOrAsync(t,e,r)}for(;t.length;)if(i=t.splice(0,1)[0],a=i(e),a&&a.then)return a.then(n);return r&&r(e)};J.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};J.noneOrAll=function(t,e,r){if(t){var a=!1,i=!0,n,o;for(n=0;n<r.length;n++)o=t[r[n]],o!=null?a=!0:i=!1;if(a&&!i)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}};J.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(J.isArrayOrTypedArray(t))for(var n=Math.min(t.length,e.length),o=0;o<n;o++){var l=t[o];e[o][r]=i?a(l):l}};J.mergeArrayCastPositive=function(t,e,r){return J.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};J.fillArray=function(t,e,r,a){if(a=a||J.identity,J.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};J.castOption=function(t,e,r,a){a=a||J.identity;var i=J.nestedProperty(t,r).get();return J.isArrayOrTypedArray(i)?Array.isArray(e)&&J.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};J.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=J.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function rw(t){var e={};for(var r in t)for(var a=t[r],i=0;i<a.length;i++)e[a[i]]=+r;return e}J.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=rw(i));function o(u){return u!==void 0&&u<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(J.isIndex(s)||J.isArrayOrTypedArray(s)&&J.isIndex(s[0])&&J.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};J.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=rw(r),i=[],n=0;n<e.length;n++){var o=e[n];if(J.isIndex(o)){var l=a[o];J.isIndex(l)&&i.push(l)}}return i}else return e};J.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=J.nestedProperty(t,r).get();return J.isArrayOrTypedArray(a)?a:!1}else if(J.isArrayOrTypedArray(r))return r;return!1};function aw(t,e,r){var a={};typeof e!="object"&&(e={});var i=r==="pieLike"?-1:3,n=Object.keys(t),o,l,s;for(o=0;o<n.length;o++)l=n[o],s=t[l],!(l.charAt(0)==="_"||typeof s=="function")&&(l==="module"?a[l]=s:Array.isArray(s)?l==="colorscale"||i===-1?a[l]=s.slice():a[l]=s.slice(0,i):J.isTypedArray(s)?i===-1?a[l]=s.subarray():a[l]=s.subarray(0,i):s&&typeof s=="object"?a[l]=aw(t[l],e[l],r):a[l]=s);for(n=Object.keys(e),o=0;o<n.length;o++)l=n[o],s=e[l],(typeof s!="object"||!(l in a)||typeof a[l]!="object")&&(a[l]=s);return a}J.minExtend=aw;J.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};J.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};J.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var CL=/Version\/[\d\.]+.*Safari/;J.isSafari=function(){return CL.test(window.navigator.userAgent)};var DL=/iPad|iPhone|iPod/;J.isIOS=function(){return DL.test(window.navigator.userAgent)};var PL=/Firefox\/(\d+)\.\d+/;J.getFirefoxVersion=function(){var t=PL.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};J.isD3Selection=function(t){return t instanceof Ll.selection};J.ensureSingle=function(t,e,r,a){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var n=t.append(e);return r&&n.classed(r,!0),a&&n.call(a),n};J.ensureSingleById=function(t,e,r,a){var i=t.select(e+"#"+r);if(i.size())return i;var n=t.append(e).attr("id",r);return a&&n.call(a),n};J.objectFromPath=function(t,e){for(var r=t.split("."),a,i=a={},n=0;n<r.length;n++){var o=r[n],l=null,s=r[n].match(/(.*)\[([0-9]+)\]/);s?(o=s[1],l=s[2],a=a[o]=[],n===r.length-1?a[l]=e:a[l]={},a=a[l]):(n===r.length-1?a[o]=e:a[o]={},a=a[o])}return i};var EL=/^([^\[\.]+)\.(.+)?/,RL=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function Es(t){return t.slice(0,2)==="__"}J.expandObjectPaths=function(t){var e,r,a,i,n,o,l;if(typeof t=="object"&&!Array.isArray(t)){for(r in t)if(t.hasOwnProperty(r))if(e=r.match(EL)){if(i=t[r],a=e[1],Es(a))continue;delete t[r],t[a]=J.extendDeepNoArrays(t[a]||{},J.objectFromPath(r,J.expandObjectPaths(i))[a])}else if(e=r.match(RL)){if(i=t[r],a=e[1],Es(a))continue;if(n=parseInt(e[2]),delete t[r],t[a]=t[a]||[],e[3]===".")l=e[4],o=t[a][n]=t[a][n]||{},J.extendDeepNoArrays(o,J.objectFromPath(l,J.expandObjectPaths(i)));else{if(Es(a))continue;t[a][n]=J.expandObjectPaths(i)}}else{if(Es(r))continue;t[r]=J.expandObjectPaths(t[r])}}return t};J.numSeparate=function(t,e,r){if(r||(r=!1),typeof e!="string"||e.length===0)throw new Error("Separator string required for formatting!");typeof t=="number"&&(t=String(t));var a=/(\d+)(\d{3})/,i=e.charAt(0),n=e.charAt(1),o=t.split("."),l=o[0],s=o.length>1?i+o[1]:"";if(n&&(o.length>1||l.length>4||r))for(;a.test(l);)l=l.replace(a,"$1"+n+"$2");return l+s};J.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var iw=/^\w*$/;J.templateString=function(t,e){var r={};return t.replace(J.TEMPLATE_STRING_REGEX,function(a,i){var n;return iw.test(i)?n=e[i]:(r[i]=r[i]||J.nestedProperty(e,i).get,n=r[i]()),J.isValidTextValue(n)?n:""})};var zL={max:10,count:0,name:"hovertemplate"};J.hovertemplateString=function(){return ep.apply(zL,arguments)};var IL={max:10,count:0,name:"texttemplate"};J.texttemplateString=function(){return ep.apply(IL,arguments)};var FL=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $L(t){var e=t.match(FL);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}var NL={max:10,count:0,name:"texttemplate",parseMultDiv:!0};J.texttemplateStringForShapes=function(){return ep.apply(NL,arguments)};var Fm=/^[:|\|]/;function ep(t,e,r){var a=this,i=arguments;e||(e={});var n={};return t.replace(J.TEMPLATE_STRING_REGEX,function(o,l,s){var f=l==="xother"||l==="yother",c=l==="_xother"||l==="_yother",u=l==="_xother_"||l==="_yother_",v=l==="xother_"||l==="yother_",h=f||c||v||u,d=l;(c||u)&&(d=d.substring(1)),(v||u)&&(d=d.substring(0,d.length-1));var p=null,m=null;if(a.parseMultDiv){var y=$L(d);d=y.key,p=y.op,m=y.number}var b;if(h){if(b=e[d],b===void 0)return""}else{var w,g;for(g=3;g<i.length;g++)if(w=i[g],!!w){if(w.hasOwnProperty(d)){b=w[d];break}if(iw.test(d)||(b=J.nestedProperty(w,d).get(),b=n[d]||J.nestedProperty(w,d).get(),b&&(n[d]=b)),b!==void 0)break}}if(b!==void 0&&(p==="*"&&(b*=m),p==="/"&&(b/=m)),b===void 0&&a)return a.count<a.max&&(J.warn("Variable '"+d+"' in "+a.name+" could not be found!"),b=o),a.count===a.max&&J.warn("Too many "+a.name+" warnings - additional warnings will be suppressed"),a.count++,o;if(s){var x;if(s[0]===":"&&(x=r?r.numberFormat:J.numberFormat,b=x(s.replace(Fm,""))(b)),s[0]==="|"){x=r?r.timeFormat:AL;var _=J.dateTime2ms(b);b=J.formatDate(_,s.replace(Fm,""),!1,x)}}else{var k=d+"Label";e.hasOwnProperty(k)&&(b=e[k])}return h&&(b="("+b+")",(c||u)&&(b=" "+b),(v||u)&&(b=b+" ")),b})}var Rs=48,$m=57;J.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,a=0,i=0,n=0;n<r;n++){var o=t.charCodeAt(n)||0,l=e.charCodeAt(n)||0,s=o>=Rs&&o<=$m,f=l>=Rs&&l<=$m;if(s&&(a=10*a+o-Rs),f&&(i=10*i+l-Rs),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var io=2e9;J.seedPseudoRandom=function(){io=2e9};J.pseudoRandom=function(){var t=io;return io=(69069*io+1)%4294967296,Math.abs(io-t)<429496729?J.pseudoRandom():io/4294967296};J.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=J.extractOption(t,e,"htx","hovertext");if(J.isValidTextValue(i))return a(i);var n=J.extractOption(t,e,"tx","text");if(J.isValidTextValue(n))return a(n)};J.isValidTextValue=function(t){return t||t===0};J.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",a=0;a<e;a++)r.indexOf(".")!==-1&&(r=r.replace("0%","%"),r=r.replace(".%","%"));return r};J.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};J.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};J.strRotate=function(t){return t?"rotate("+t+")":""};J.strScale=function(t){return t!==1?"scale("+t+")":""};J.getTextTransform=function(t){var e=t.noCenter,r=t.textX,a=t.textY,i=t.targetX,n=t.targetY,o=t.anchorX||0,l=t.anchorY||0,s=t.rotate,f=t.scale;return f?f>1&&(f=1):f=0,J.strTranslate(i-f*(r+o),n-f*(a+l))+J.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};J.setTransormAndDisplay=function(t,e){t.attr("transform",J.getTextTransform(e)),t.style("display",e.scale?null:"none")};J.ensureUniformFontSize=function(t,e){var r=J.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};J.join2=function(t,e,r){var a=t.length;return a>1?t.slice(0,-1).join(e)+r+t[a-1]:t.join(e)};J.bigFont=function(t){return Math.round(1.2*t)};var Nm=J.getFirefoxVersion(),HL=Nm!==null&&Nm<86;J.getPositionFromD3Event=function(){return HL?[Ll.event.layerX,Ll.event.layerY]:[Ll.event.offsetX,Ll.event.offsetY]};var me=u_.exports,OL=me,Hm={"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 Om in Hm){var jL=Om.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");OL.addStyleRule(jL,Hm[Om])}var It={},tp={},Lu=zh.EventEmitter,BL={init:function(t){if(t._ev instanceof Lu)return t;var e=new Lu,r=new Lu;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(a,i){typeof jQuery<"u"&&jQuery(t).trigger(a,i),e.emit(a,i),r.emit(a,i)},t},triggerHandler:function(t,e,r){var a,i;typeof jQuery<"u"&&(a=jQuery(t).triggerHandler(e,r));var n=t._ev;if(!n)return a;var o=n._events[e];if(!o)return a;function l(f){if(f.listener){if(n.removeListener(e,f.listener),!f.fired)return f.fired=!0,f.listener.apply(n,[r])}else return f.apply(n,[r])}o=Array.isArray(o)?o:[o];var s;for(s=0;s<o.length-1;s++)l(o[s]);return i=l(o[s]),a!==void 0?a:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}},ds=BL,jm=me,GL=jo.dfltConfig;function UL(t,e){for(var r=[],a,i=0;i<e.length;i++)a=e[i],a===t?r[i]=a:typeof a=="object"?r[i]=Array.isArray(a)?jm.extendDeep([],a):jm.extendDeepAll({},a):r[i]=a;return r}var Ja={};Ja.add=function(t,e,r,a,i){var n,o;if(t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},o=t.undoQueue.index,t.autoplay){t.undoQueue.inSequence||(t.autoplay=!1);return}!t.undoQueue.sequence||t.undoQueue.beginSequence?(n={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(o,t.undoQueue.queue.length-o,n),t.undoQueue.index+=1):n=t.undoQueue.queue[o-1],t.undoQueue.beginSequence=!1,n&&(n.undo.calls.unshift(e),n.undo.args.unshift(r),n.redo.calls.push(a),n.redo.args.push(i)),t.undoQueue.queue.length>GL.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)};Ja.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0};Ja.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1};Ja.undo=function(e){var r,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,r=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a<r.undo.calls.length;a++)Ja.plotDo(e,r.undo.calls[a],r.undo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1}};Ja.redo=function(e){var r,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index>=e.undoQueue.queue.length)){for(r=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a<r.redo.calls.length;a++)Ja.plotDo(e,r.redo.calls[a],r.redo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}};Ja.plotDo=function(t,e,r){t.autoplay=!0,r=UL(t,r),e.apply(null,r)};var VL=Ja,Vo={},nw={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}};(function(t){var e=Je,r=me,a=oa,i=vs,n=nw,o=Nc,l=jo.configAttributes,s=Ia,f=r.extendDeepAll,c=r.isPlainObject,u=r.isArrayOrTypedArray,v=r.nestedProperty,h=r.valObjectMeta,d="_isSubplotObj",p="_isLinkedToArray",m="_arrayAttrRegexps",y="_deprecated",b=[d,p,m,y];t.IS_SUBPLOT_OBJ=d,t.IS_LINKED_TO_ARRAY=p,t.DEPRECATED=y,t.UNDERSCORE_ATTRS=b,t.get=function(){var $={};e.allTypes.forEach(function(A){$[A]=_(A)});var P={};return Object.keys(e.transformsRegistry).forEach(function(A){P[A]=T(A)}),{defs:{valObjects:h,metaKeys:b.concat(["description","role","editType","impliedEdits"]),editType:{traces:s.traces,layout:s.layout},impliedEdits:{description:["Sometimes when an attribute is changed, other attributes","must be altered as well in order to achieve the intended","result. For example, when `range` is specified, it is","important to set `autorange` to `false` or the new `range`","value would be lost in the redraw. `impliedEdits` is the","mechanism to do this: `impliedEdits: {autorange: false}`.","Each key is a relative paths to the attribute string to","change, using *^* to ascend into the parent container,","for example `range[0]` has `impliedEdits: {*^autorange*: false}`.","A value of `undefined` means that the attribute will not be","changed, but its previous value should be recorded in case","we want to reverse this change later. For example, `autorange`","has `impliedEdits: {*range[0]*: undefined, *range[1]*:undefined}","because the range will likely be changed by redraw."].join(" ")}},traces:$,layout:k(),transforms:P,frames:S(),animation:D(o),config:D(l)}},t.crawl=function($,P,A,M){var C=A||0;M=M||"",Object.keys($).forEach(function(E){var F=$[E];if(b.indexOf(E)===-1){var j=(M?M+".":"")+E;P(F,E,$,C,j),!t.isValObject(F)&&c(F)&&E!=="impliedEdits"&&t.crawl(F,P,C+1,j)}})},t.isValObject=function($){return $&&$.valType!==void 0},t.findArrayAttributes=function($){var P=[],A=[],M=[],C,E;function F(V,Z,X,Q){A=A.slice(0,Q).concat([Z]),M=M.slice(0,Q).concat([V&&V._isLinkedToArray]);var te=V&&(V.valType==="data_array"||V.arrayOk===!0)&&!(A[Q-1]==="colorbar"&&(Z==="ticktext"||Z==="tickvals"));te&&j(C,0,"")}function j(V,Z,X){var Q=V[A[Z]],te=X+A[Z];if(Z===A.length-1)u(Q)&&P.push(E+te);else if(M[Z]){if(Array.isArray(Q))for(var xe=0;xe<Q.length;xe++)c(Q[xe])&&j(Q[xe],Z+1,te+"["+xe+"].")}else c(Q)&&j(Q,Z+1,te+".")}C=$,E="",t.crawl(a,F),$._module&&$._module.attributes&&t.crawl($._module.attributes,F);var B=$.transforms;if(B)for(var G=0;G<B.length;G++){var O=B[G],W=O._module;W&&(E="transforms["+G+"].",C=O,t.crawl(W.attributes,F))}return P},t.getTraceValObject=function($,P){var A=P[0],M=1,C,E;if(A==="transforms"){if(P.length===1)return a.transforms;var F=$.transforms;if(!Array.isArray(F)||!F.length)return!1;var j=P[1];if(!x(j)||j>=F.length)return!1;C=(e.transformsRegistry[F[j].type]||{}).attributes,E=C&&C[P[2]],M=3}else{var B=$._module;if(B||(B=(e.modules[$.type||a.type.dflt]||{})._module),!B)return!1;if(C=B.attributes,E=C&&C[A],!E){var G=B.basePlotModule;G&&G.attributes&&(E=G.attributes[A])}E||(E=a[A])}return g(E,P,M)},t.getLayoutValObject=function($,P){var A=w($,P[0]);return g(A,P,1)};function w($,P){var A,M,C,E,F=$._basePlotModules;if(F){var j;for(A=0;A<F.length;A++){if(C=F[A],C.attrRegex&&C.attrRegex.test(P)){if(C.layoutAttrOverrides)return C.layoutAttrOverrides;!j&&C.layoutAttributes&&(j=C.layoutAttributes)}var B=C.baseLayoutAttrOverrides;if(B&&P in B)return B[P]}if(j)return j}var G=$._modules;if(G){for(A=0;A<G.length;A++)if(E=G[A].layoutAttributes,E&&P in E)return E[P]}for(M in e.componentsRegistry){if(C=e.componentsRegistry[M],C.name==="colorscale"&&P.indexOf("coloraxis")===0)return C.layoutAttributes[P];if(!C.schema&&P===C.name)return C.layoutAttributes}return P in i?i[P]:!1}function g($,P,A){if(!$)return!1;if($._isLinkedToArray){if(x(P[A]))A++;else if(A<P.length)return!1}for(;A<P.length;A++){var M=$[P[A]];if(c(M))$=M;else break;if(A===P.length-1)break;if($._isLinkedToArray){if(A++,!x(P[A]))return!1}else if($.valType==="info_array"){A++;var C=P[A];if(!x(C))return!1;var E=$.items;if(Array.isArray(E)){if(C>=E.length)return!1;if($.dimensions===2){if(A++,P.length===A)return $;var F=P[A];if(!x(F))return!1;$=E[C][F]}else $=E[C]}else $=E}}return $}function x($){return $===Math.round($)&&$>=0}function _($){var P,A;P=e.modules[$]._module,A=P.basePlotModule;var M={};M.type=null;var C=f({},a),E=f({},P.attributes);t.crawl(E,function(B,G,O,W,V){v(C,V).set(void 0),B===void 0&&v(E,V).set(void 0)}),f(M,C),e.traceIs($,"noOpacity")&&delete M.opacity,e.traceIs($,"showLegend")||(delete M.showlegend,delete M.legendgroup),e.traceIs($,"noHover")&&(delete M.hoverinfo,delete M.hoverlabel),P.selectPoints||delete M.selectedpoints,f(M,E),A.attributes&&f(M,A.attributes),M.type=$;var F={meta:P.meta||{},categories:P.categories||{},animatable:!!P.animatable,type:$,attributes:D(M)};if(P.layoutAttributes){var j={};f(j,P.layoutAttributes),F.layoutAttributes=D(j)}return P.animatable||t.crawl(F,function(B){t.isValObject(B)&&"anim"in B&&delete B.anim}),F}function k(){var $={},P,A;f($,i);for(P in e.subplotsRegistry)if(A=e.subplotsRegistry[P],!!A.layoutAttributes)if(Array.isArray(A.attr))for(var M=0;M<A.attr.length;M++)N($,A,A.attr[M]);else{var C=A.attr==="subplot"?A.name:A.attr;N($,A,C)}for(P in e.componentsRegistry){A=e.componentsRegistry[P];var E=A.schema;if(E&&(E.subplots||E.layout)){var F=E.subplots;if(F&&F.xaxis&&!F.yaxis)for(var j in F.xaxis)delete $.yaxis[j];delete $.xaxis.shift,delete $.xaxis.autoshift}else A.name==="colorscale"?f($,A.layoutAttributes):A.layoutAttributes&&H($,A.layoutAttributes,A.name)}return{layoutAttributes:D($)}}function T($){var P=e.transformsRegistry[$],A=f({},P.attributes);return Object.keys(e.componentsRegistry).forEach(function(M){var C=e.componentsRegistry[M];C.schema&&C.schema.transforms&&C.schema.transforms[$]&&Object.keys(C.schema.transforms[$]).forEach(function(E){H(A,C.schema.transforms[$][E],E)})}),{attributes:D(A)}}function S(){var $={frames:f({},n)};return D($),$.frames}function D($){return L($),R($),z($),$}function L($){function P(M){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+M+"`.",editType:"none"}}function A(M,C,E){t.isValObject(M)?(M.arrayOk===!0||M.valType==="data_array")&&(E[C+"src"]=P(C)):c(M)&&(M.role="object")}t.crawl($,A)}function R($){function P(A,M,C){if(A){var E=A[p];E&&(delete A[p],C[M]={items:{}},C[M].items[E]=A,C[M].role="object")}}t.crawl($,P)}function z($){function P(A){for(var M in A)if(c(A[M]))P(A[M]);else if(Array.isArray(A[M]))for(var C=0;C<A[M].length;C++)P(A[M][C]);else A[M]instanceof RegExp&&(A[M]=A[M].toString())}P($)}function N($,P,A){var M=v($,A),C=f({},P.layoutAttributes);C[d]=!0,M.set(C)}function H($,P,A){var M=v($,A);M.set(f(M.get()||{},P))}})(Vo);var ow={exports:{}},Lt={},_o=me,XL=oa,wi="templateitemname",Ed={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};Ed[wi]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")};Lt.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=Ed.name,e[wi]=Ed[wi],e};Lt.traceTemplater=function(t){var e={},r,a;for(r in t)a=t[r],Array.isArray(a)&&a.length&&(e[r]=0);function i(n){r=_o.coerce(n,{},XL,"type");var o={type:r,_template:null};if(r in e){a=t[r];var l=e[r]%a.length;e[r]++,o._template=a[l]}return o}return{newTrace:i}};Lt.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);_o.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};Lt.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[lw(e)],n=a&&a[e];(!Array.isArray(n)||!n.length)&&(n=[]);var o={};function l(f){var c={name:f.name,_input:f},u=c[wi]=f[wi];if(!Bm(u))return c._template=i,c;for(var v=0;v<n.length;v++){var h=n[v];if(h.name===u)return o[u]=1,c._template=h,c}return c[r]=f[r]||!1,c._template=!1,c}function s(){for(var f=[],c=0;c<n.length;c++){var u=n[c],v=u.name;if(Bm(v)&&!o[v]){var h={_template:u,name:v,_input:{_templateitemname:v}};h[wi]=u[wi],f.push(h),o[v]=1}}return f}return{newItem:l,defaultItems:s}};function Bm(t){return t&&typeof t=="string"}function lw(t){var e=t.length-1;return t.charAt(e)!=="s"&&_o.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}Lt.arrayDefaultKey=lw;Lt.arrayEditor=function(t,e,r){var a=(_o.nestedProperty(t,e).get()||[]).length,i=r._index,n=i>=a&&(r._input||{})._templateitemname;n&&(i=a);var o=e+"["+i+"]",l;function s(){l={},n&&(l[o]={},l[o][wi]=n)}s();function f(h,d){l[h]=d}function c(h,d){n?_o.nestedProperty(l[o],h).set(d):l[o+"."+h]=d}function u(){var h=l;return s(),h}function v(h,d){h&&c(h,d);var p=u();for(var m in p)_o.nestedProperty(t,m).set(p[m])}return{modifyBase:f,modifyItem:c,getUpdateObj:u,applyUpdate:v}};var Wt={},al=Oo.counter,Lr={idRegex:{x:al("x","( domain)?"),y:al("y","( domain)?")},attrRegex:al("[xy]axis"),xAxisMatch:al("xaxis"),yAxisMatch:al("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"}};(function(t){var e=Je,r=Lr;t.id2name=function(n){if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))){var o=n.split(" ")[0].substr(1);return o==="1"&&(o=""),n.charAt(0)+"axis"+o}},t.name2id=function(n){if(n.match(r.AX_NAME_PATTERN)){var o=n.substr(5);return o==="1"&&(o=""),n.charAt(0)+o}},t.cleanId=function(n,o,l){var s=/( domain)$/.test(n);if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))&&!(o&&n.charAt(0)!==o)&&!(s&&!l)){var f=n.split(" ")[0].substr(1).replace(/^0+/,"");return f==="1"&&(f=""),n.charAt(0)+f+(s&&l?" domain":"")}},t.list=function(i,n,o){var l=i._fullLayout;if(!l)return[];var s=t.listIds(i,n),f=new Array(s.length),c;for(c=0;c<s.length;c++){var u=s[c];f[c]=l[u.charAt(0)+"axis"+u.substr(1)]}if(!o){var v=l._subplots.gl3d||[];for(c=0;c<v.length;c++){var h=l[v[c]];n?f.push(h[n+"axis"]):f.push(h.xaxis,h.yaxis,h.zaxis)}}return f},t.listIds=function(i,n){var o=i._fullLayout;if(!o)return[];var l=o._subplots;return n?l[n+"axis"]:l.xaxis.concat(l.yaxis)},t.getFromId=function(i,n,o){var l=i._fullLayout;return n=n===void 0||typeof n!="string"?n:n.replace(" domain",""),o==="x"?n=n.replace(/y[0-9]*/,""):o==="y"&&(n=n.replace(/x[0-9]*/,"")),l[t.id2name(n)]},t.getFromTrace=function(i,n,o){var l=i._fullLayout,s=null;if(e.traceIs(n,"gl3d")){var f=n.scene;f.substr(0,5)==="scene"&&(s=l[f][o+"axis"])}else s=t.getFromId(i,n[o+"axis"]||o);return s},t.idSort=function(i,n){var o=i.charAt(0),l=n.charAt(0);return o!==l?o>l?1:-1:+(i.substr(1)||1)-+(n.substr(1)||1)},t.ref2id=function(i){return/^[xyz]/.test(i)?i.split(" ")[0]:!1};function a(i,n){if(n&&n.length){for(var o=0;o<n.length;o++)if(n[o][i])return!0}return!1}t.isLinked=function(i,n){return a(n,i._axisMatchGroups)||a(n,i._axisConstraintGroups)}})(Wt);function YL(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function WL(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}var An={clearOutlineControllers:YL,clearOutline:WL},rp={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc",description:["Determines how scatter points at the same location coordinate","are displayed on the graph.","With *group*, the scatter points are plotted next to one another","centered around the shared location.","With *overlay*, the scatter points are plotted over one another,","you might need to reduce *opacity* to see multiple scatter points."].join(" ")},scattergap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between scatter points of","adjacent location coordinates.","Defaults to `bargap`."].join(" ")}},hs={},Pl=Je,qL=Lr.SUBPLOT_PATTERN;hs.getSubplotCalcData=function(t,e,r){var a=Pl.subplotsRegistry[e];if(!a)return[];for(var i=a.attr,n=[],o=0;o<t.length;o++){var l=t[o],s=l[0].trace;s[i]===r&&n.push(l)}return n};hs.getModuleCalcData=function(t,e){var r=[],a=[],i;if(typeof e=="string"?i=Pl.getModule(e).plot:typeof e=="function"?i=e:i=e.plot,!i)return[r,t];for(var n=0;n<t.length;n++){var o=t[n],l=o[0].trace;l.visible!==!0||l._length===0||(l._module&&l._module.plot===i?r.push(o):a.push(o))}return[r,a]};hs.getSubplotData=function(e,r,a){if(!Pl.subplotsRegistry[r])return[];var i=Pl.subplotsRegistry[r].attr,n=[],o,l,s;if(r==="gl2d"){var f=a.match(qL);l="x"+f[1],s="y"+f[2]}for(var c=0;c<e.length;c++)o=e[c],r==="gl2d"&&Pl.traceIs(o,"gl2d")?o[i[0]]===l&&o[i[1]]===s&&n.push(o):o[i]===a&&n.push(o);return n};var Cu={},Gm;function ZL(){return Gm||(Gm=1,function(t){var e=Je,r=me;t.manageCommandObserver=function(s,f,c,u){var v={},h=!0;f&&f._commandObserver&&(v=f._commandObserver),v.cache||(v.cache={}),v.lookupTable={};var d=t.hasSimpleAPICommandBindings(s,c,v.lookupTable);if(f&&f._commandObserver){if(d)return v;if(f._commandObserver.remove)return f._commandObserver.remove(),f._commandObserver=null,v}if(d){a(s,d,v.cache),v.check=function(){if(h){var b=a(s,d,v.cache);return b.changed&&u&&v.lookupTable[b.value]!==void 0&&(v.disable(),Promise.resolve(u({value:b.value,type:d.type,prop:d.prop,traces:d.traces,index:v.lookupTable[b.value]})).then(v.enable,v.enable)),b.changed}};for(var p=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],m=0;m<p.length;m++)s._internalOn(p[m],v.check);v.remove=function(){for(var y=0;y<p.length;y++)s._removeInternalListener(p[y],v.check)}}else r.log("Unable to automatically bind plot updates to API command"),v.lookupTable={},v.remove=function(){};return v.disable=function(){h=!1},v.enable=function(){h=!0},f&&(f._commandObserver=v),v},t.hasSimpleAPICommandBindings=function(s,f,c){var u,v=f.length,h;for(u=0;u<v;u++){var d,p=f[u],m=p.method,y=p.args;if(Array.isArray(y)||(y=[]),!m)return!1;var b=t.computeAPICommandBindings(s,m,y);if(b.length!==1)return!1;if(!h)h=b[0],Array.isArray(h.traces)&&h.traces.sort();else{if(d=b[0],d.type!==h.type||d.prop!==h.prop)return!1;if(Array.isArray(h.traces))if(Array.isArray(d.traces)){d.traces.sort();for(var w=0;w<h.traces.length;w++)if(h.traces[w]!==d.traces[w])return!1}else return!1;else if(d.prop!==h.prop)return!1}d=b[0];var g=d.value;if(Array.isArray(g))if(g.length===1)g=g[0];else return!1;c&&(c[g]=u)}return h};function a(s,f,c){var u,v,h,d=!1;if(f.type==="data")u=s._fullData[f.traces!==null?f.traces[0]:0];else if(f.type==="layout")u=s._fullLayout;else return!1;return v=r.nestedProperty(u,f.prop).get(),h=c[f.type]=c[f.type]||{},h.hasOwnProperty(f.prop)&&h[f.prop]!==v&&(d=!0),h[f.prop]=v,{changed:d,value:v}}t.executeAPICommand=function(s,f,c){if(f==="skip")return Promise.resolve();var u=e.apiMethodRegistry[f],v=[s];Array.isArray(c)||(c=[]);for(var h=0;h<c.length;h++)v.push(c[h]);return u.apply(null,v).catch(function(d){return r.warn("API call to Plotly."+f+" rejected.",d),Promise.reject(d)})},t.computeAPICommandBindings=function(s,f,c){var u;switch(Array.isArray(c)||(c=[]),f){case"restyle":u=o(s,c);break;case"relayout":u=n(s,c);break;case"update":u=o(s,[c[0],c[2]]).concat(n(s,[c[1]]));break;case"animate":u=i(s,c);break;default:u=[]}return u};function i(s,f){return Array.isArray(f[0])&&f[0].length===1&&["string","number"].indexOf(typeof f[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:f[0][0].toString()}]:[]}function n(s,f){var c=[],u=f[0],v={};if(typeof u=="string")v[u]=f[1];else if(r.isPlainObject(u))v=u;else return c;return l(v,function(h,d,p){c.push({type:"layout",prop:h,value:p})},"",0),c}function o(s,f){var c,u,v,h,d=[];if(u=f[0],v=f[1],c=f[2],h={},typeof u=="string")h[u]=v;else if(r.isPlainObject(u))h=u,c===void 0&&(c=v);else return d;return c===void 0&&(c=null),l(h,function(p,m,y){var b,w;if(Array.isArray(y)){w=y.slice();var g=Math.min(w.length,s.data.length);c&&(g=Math.min(g,c.length)),b=[];for(var x=0;x<g;x++)b[x]=c?c[x]:x}else w=y,b=c?c.slice():null;if(b===null)Array.isArray(w)&&(w=w[0]);else if(Array.isArray(b)){if(!Array.isArray(w)){var _=w;w=[];for(var k=0;k<b.length;k++)w[k]=_}w.length=Math.min(b.length,w.length)}d.push({type:"data",prop:p,traces:b,value:w})},"",0),d}function l(s,f,c,u){Object.keys(s).forEach(function(v){var h=s[v];if(v[0]!=="_"){var d=c+(u>0?".":"")+v;r.isPlainObject(h)?l(h,f,d,u+1):f(d,v,h)}})}}(Cu)),Cu}var sw=ft,KL=Bl.timeFormatLocale,QL=a_.formatLocale,El=dt,JL=t_,bt=Je,fw=Vo,eC=Lt,Xe=me,cw=ot,Um=Yt.BADNUM,Fr=Wt,tC=An.clearOutline,rC=rp,ap=Nc,aC=nw,iC=hs.getModuleCalcData,Rd=Xe.relinkPrivateKeys,In=Xe._,Fe=ow.exports={};Xe.extendFlat(Fe,bt);Fe.attributes=oa;Fe.attributes.type.values=Fe.allTypes;Fe.fontAttrs=vr;Fe.layoutAttributes=vs;Fe.fontWeight="normal";var Uc=Fe.transformsRegistry,Vc=ZL();Fe.executeAPICommand=Vc.executeAPICommand;Fe.computeAPICommandBindings=Vc.computeAPICommandBindings;Fe.manageCommandObserver=Vc.manageCommandObserver;Fe.hasSimpleAPICommandBindings=Vc.hasSimpleAPICommandBindings;Fe.redrawText=function(t){return t=Xe.getGraphDiv(t),new Promise(function(e){setTimeout(function(){t._fullLayout&&(bt.getComponentMethod("annotations","draw")(t),bt.getComponentMethod("legend","draw")(t),bt.getComponentMethod("colorbar","draw")(t),e(Fe.previousPromises(t)))},300)})};Fe.resize=function(t){t=Xe.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||Xe.isHidden(t))&&i(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=a,t._redrawTimer=setTimeout(function(){if(!t.layout||t.layout.width&&t.layout.height||Xe.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,bt.call("relayout",t,{autosize:!0}).then(function(){t.changed=n,t._resolveResize===a&&(delete t._resolveResize,a(t))})},100)});return e&&e(r),r};Fe.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};Fe.addLinks=function(t){if(!(!t._context.showLink&&!t._context.showSources)){var e=t._fullLayout,r=Xe.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:cw.defaultLine,"pointer-events":"all"}).each(function(){var f=sw.select(this);f.append("tspan").classed("js-link-to-tool",!0),f.append("tspan").classed("js-link-spacer",!0),f.append("tspan").classed("js-sourcelinks",!0)})}),a=r.node(),i={y:e._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=e.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=e._paper.attr("width")-7),r.attr(i);var n=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&nC(t,n),o.text(n.text()&&l.text()?" - ":"")}};function nC(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" »");if(t._context.sendData)r.on("click",function(){Fe.sendDataToCloud(t)});else{var a=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+i})}}Fe.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=sw.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"}),i=a.append("input").attr({type:"text",name:"data"});return i.node().value=Fe.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var oC=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],lC=["year","month","dayMonth","dayMonthYear"];Fe.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,a=t._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var i=t._fullLayout={},n=t.layout||{},o=t._fullData||[],l=t._fullData=[],s=t.data||[],f=t.calcdata||[],c=t._context||{},u;t._transitionData||Fe.createTransitionData(t),i._dfltTitle={plot:In(t,"Click to enter Plot title"),x:In(t,"Click to enter X axis title"),y:In(t,"Click to enter Y axis title"),colorbar:In(t,"Click to enter Colorscale title"),annotation:In(t,"new text")},i._traceWord=In(t,"trace");var v=Vm(t,oC);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var h=a.width,d=a.height;Fe.supplyLayoutGlobalDefaults(n,i,v),n.width||(i.width=h),n.height||(i.height=d),Fe.sanitizeMargins(i)}else{Fe.supplyLayoutGlobalDefaults(n,i,v);var p=!n.width||!n.height,m=i.autosize,y=c.autosizable,b=p&&(m||y);b?Fe.plotAutoSize(t,n,i):p&&Fe.sanitizeMargins(i),!m&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=cC(v,i.separators),i._extraFormat=Vm(t,lC),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var w=i._subplots=fC(),g=i._splomAxes={x:{},y:{}},x=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=sC(o,s),i._globalTransforms=(t._context||{}).globalTransforms,Fe.supplyDataDefaults(s,l,n,i);var _=Object.keys(g.x),k=Object.keys(g.y);if(_.length>1&&k.length>1){for(bt.getComponentMethod("grid","sizeDefaults")(n,i),u=0;u<_.length;u++)Xe.pushUnique(w.xaxis,_[u]);for(u=0;u<k.length;u++)Xe.pushUnique(w.yaxis,k[u]);for(var T in x)Xe.pushUnique(w.cartesian,T)}if(i._has=Fe._hasPlotType.bind(i),o.length===l.length)for(u=0;u<l.length;u++)Rd(l[u],o[u]);Fe.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var S=i._visibleModules,D=[];for(u=0;u<S.length;u++){var L=S[u].crossTraceDefaults;L&&Xe.pushUnique(D,L)}for(u=0;u<D.length;u++)D[u](l,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&_.length>15&&k.length>15&&i.shapes.length===0&&i.images.length===0,Fe.linkSubplots(l,i,o,a),Fe.cleanPlot(l,i,o,a);var R=!!(a._has&&a._has("gl2d")),z=!!(i._has&&i._has("gl2d")),N=!!(a._has&&a._has("cartesian")),H=!!(i._has&&i._has("cartesian")),$=N||R,P=H||z;$&&!P?a._bgLayer.remove():P&&!$&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&tC({_fullLayout:a}),uC(l,i),Rd(i,a),bt.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var A=i._tracePreGUI,M={},C;for(C in A)M[C]="old";for(u=0;u<l.length;u++)C=l[u]._fullInput.uid,M[C]||(A[C]={}),M[C]="new";for(C in M)M[C]==="old"&&delete A[C];vw(i),bt.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&Fe.supplyDefaultsUpdateCalc(f,l)};Fe.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var a=e[r],i=(t[r]||[])[0];if(i&&i.trace){var n=i.trace;if(n._hasCalcTransform){var o=n._arrayAttrs,l,s,f;for(l=0;l<o.length;l++)s=o[l],f=Xe.nestedProperty(n,s).get().slice(),Xe.nestedProperty(a,s).set(f)}i.trace=a}}};function sC(t,e){var r=e.length,a=[],i,n;for(i=0;i<t.length;i++){var o=t[i]._fullInput;o!==n&&a.push(o),n=o}var l=a.length,s=new Array(r),f={};function c(h,d){s[d]=h,f[h]=1}function u(h,d){if(h&&typeof h=="string"&&!f[h])return c(h,d),!0}for(i=0;i<r;i++){var v=e[i].uid;typeof v=="number"&&(v=String(v)),!u(v,i)&&(i<l&&u(a[i].uid,i)||c(Xe.randstr(f),i))}return s}function fC(){var t=bt.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=bt.subplotsRegistry;for(var n in i){var o=i[n],l=o.attr;if(l&&(t.push(n),Array.isArray(l)))for(a=0;a<l.length;a++)Xe.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function Vm(t,e){var r=t._context.locale;r||(r="en-US");var a=!1,i={};function n(u){for(var v=!0,h=0;h<e.length;h++){var d=e[h];i[d]||(u[d]?i[d]=u[d]:v=!1)}v&&(a=!0)}for(var o=0;o<2;o++){for(var l=t._context.locales,s=0;s<2;s++){var f=(l[r]||{}).format;if(f&&(n(f),a))break;l=bt.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(bt.localeRegistry.en.format),i}function cC(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=QL(t).format(Xe.adjustFormat(r))}catch{return Xe.warnBadFormat(r),Xe.noFormat}return r},timeFormat:KL(t).utcFormat}}function uC(t,e){var r,a=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var n=t[i];n.meta?a[n.index]=n._meta={meta:n.meta}:e.meta&&(n._meta={meta:e.meta}),e.meta&&(n._meta.layout={meta:e.meta})}a.length&&(r||(r=e._meta={}),r.data=a)}Fe.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])};Fe._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var a=this._modules||[];for(e=0;e<a.length;e++){var i=a[e].name;if(i===t)return!0;var n=bt.modules[i];if(n&&n.categories[t])return!0}return!1};Fe.cleanPlot=function(t,e,r,a){var i,n,o=a._basePlotModules||[];for(i=0;i<o.length;i++){var l=o[i];l.clean&&l.clean(t,e,r,a)}var s=a._has&&a._has("gl"),f=e._has&&e._has("gl");s&&!f&&a._glcontainer!==void 0&&(a._glcontainer.selectAll(".gl-canvas").remove(),a._glcontainer.selectAll(".no-webgl").remove(),a._glcanvas=null);var c=!!a._infolayer;e:for(i=0;i<r.length;i++){var u=r[i],v=u.uid;for(n=0;n<t.length;n++){var h=t[n];if(v===h.uid)continue e}c&&a._infolayer.select(".cb"+v).remove()}};Fe.linkSubplots=function(t,e,r,a){var i,n,o=a._plots||{},l=e._plots={},s=e._subplots,f={_fullData:t,_fullLayout:e},c=s.cartesian.concat(s.gl2d||[]);for(i=0;i<c.length;i++){var u=c[i],v=o[u],h=Fr.getFromId(f,u,"x"),d=Fr.getFromId(f,u,"y"),p;for(v?p=l[u]=v:(p=l[u]={},p.id=u),h._counterAxes.push(d._id),d._counterAxes.push(h._id),h._subplotsWith.push(u),d._subplotsWith.push(u),p.xaxis=h,p.yaxis=d,p._hasClipOnAxisFalse=!1,n=0;n<t.length;n++){var m=t[n];if(m.xaxis===p.xaxis._id&&m.yaxis===p.yaxis._id&&m.cliponaxis===!1){p._hasClipOnAxisFalse=!0;break}}}var y=Fr.list(f,null,!0),b;for(i=0;i<y.length;i++){b=y[i];var w=null;b.overlaying&&(w=Fr.getFromId(f,b.overlaying),w&&w.overlaying&&(b.overlaying=!1,w=null)),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis=b.anchor==="free"?null:Fr.getFromId(f,b.anchor)}for(i=0;i<y.length;i++)if(b=y[i],b._counterAxes.sort(Fr.idSort),b._subplotsWith.sort(Xe.subplotSort),b._mainSubplot=vC(b,e),b._counterAxes.length&&(b.spikemode&&b.spikemode.indexOf("across")!==-1||b.automargin&&b.mirror&&b.anchor!=="free"||bt.getComponentMethod("rangeslider","isVisible")(b))){var g=1,x=0;for(n=0;n<b._counterAxes.length;n++){var _=Fr.getFromId(f,b._counterAxes[n]);g=Math.min(g,_.domain[0]),x=Math.max(x,_.domain[1])}g<x&&(b._counterDomainMin=g,b._counterDomainMax=x)}};function vC(t,e){var r={_fullLayout:e},a=t._id.charAt(0)==="x",i=t._mainAxis._anchorAxis,n="",o="",l="";if(i&&(l=i._mainAxis._id,n=a?t._id+l:l+t._id),!n||!e._plots[n]){n="";for(var s=t._counterAxes,f=0;f<s.length;f++){var c=s[f],u=a?t._id+c:c+t._id;o||(o=u);var v=Fr.getFromId(r,c);if(l&&v.overlaying===l){n=u;break}}}return n||o}Fe.clearExpandedTraceDefaultColors=function(t){var e,r,a;function i(o,l,s,f){r[f]=l,r.length=f+1,o.valType==="color"&&o.dflt===void 0&&e.push(r.join("."))}for(r=[],e=t._module._colorAttrs,e||(t._module._colorAttrs=e=[],fw.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=Xe.nestedProperty(t,"_input."+e[a]);n.get()||Xe.nestedProperty(t,e[a]).set(null)}};Fe.supplyDataDefaults=function(t,e,r,a){var i=a._modules,n=a._visibleModules,o=a._basePlotModules,l=0,s=0,f,c,u;a._transformModules=[];function v(k){e.push(k);var T=k._module;T&&(Xe.pushUnique(i,T),k.visible===!0&&Xe.pushUnique(n,T),Xe.pushUnique(o,k._module.basePlotModule),l++,k._input.visible!==!1&&s++)}var h={},d=[],p=(r.template||{}).data||{},m=eC.traceTemplater(p);for(f=0;f<t.length;f++){if(u=t[f],c=m.newTrace(u),c.uid=a._traceUids[f],Fe.supplyTraceDefaults(u,c,s,a,f),c.index=f,c._input=u,c._expandedIndex=l,c.transforms&&c.transforms.length)for(var y=u.visible!==!1&&c.visible===!1,b=dC(c,e,r,a),w=0;w<b.length;w++){var g=b[w],x={_template:c._template,type:c.type,uid:c.uid+w};y&&g.visible===!1&&delete g.visible,Fe.supplyTraceDefaults(g,x,l,a,f),Rd(x,g),x.index=f,x._input=u,x._fullInput=c,x._expandedIndex=l,x._expandedInput=g,v(x)}else c._fullInput=c,c._expandedInput=c,v(c);bt.traceIs(c,"carpetAxis")&&(h[c.carpet]=c),bt.traceIs(c,"carpetDependent")&&d.push(f)}for(f=0;f<d.length;f++)if(c=e[d[f]],!!c.visible){var _=h[c.carpet];if(c._carpet=_,!_||!_.visible){c.visible=!1;continue}c.xaxis=_.xaxis,c.yaxis=_.yaxis}};Fe.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return Xe.coerce(t||{},r,ap,i,n)}if(a("mode"),a("direction"),a("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=Fe.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=Fe.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=Fe.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=Fe.supplyAnimationTransitionDefaults(t.transition||{});return r};Fe.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t||{},e,ap.frame,a,i)}return r("duration"),r("redraw"),e};Fe.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t||{},e,ap.transition,a,i)}return r("duration"),r("easing"),e};Fe.supplyFrameDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t,e,aC,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};Fe.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||cw.defaults,o=n[r%n.length],l;function s(w,g){return Xe.coerce(t,e,Fe.attributes,w,g)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=Fe.getModule(e);if(e._module=c,c){var u=c.basePlotModule,v=u.attr,h=u.attributes;if(v&&h){var d=a._subplots,p="";if(f||u.name!=="gl2d"){if(Array.isArray(v))for(l=0;l<v.length;l++){var m=v[l],y=Xe.coerce(t,e,h,m);d[m]&&Xe.pushUnique(d[m],y),p+=y}else p=Xe.coerce(t,e,h,v);d[u.name]&&Xe.pushUnique(d[u.name],p)}}}if(f){if(s("customdata"),s("ids"),s("meta"),bt.traceIs(e,"showLegend")?(Xe.coerce(t,e,c.attributes.showlegend?c.attributes:Fe.attributes,"showlegend"),s("legend"),s("legendwidth"),s("legendgroup"),s("legendgrouptitle.text"),s("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,c&&c.supplyDefaults(t,e,o,a),bt.traceIs(e,"noOpacity")||s("opacity"),bt.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),bt.traceIs(e,"noHover")||(e.hovertemplate||Xe.coerceHoverinfo(t,e,a),e.type!=="parcats"&&bt.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints){var b=s("selectedpoints");Xe.isTypedArray(b)&&(e.selectedpoints=Array.from(b))}Fe.supplyTransformDefaults(t,e,a)}return e};function uw(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var a=e[r],i=a._module||Uc[a.type];if(i&&i.makesData)return!0}return!1}Fe.hasMakesDataTransform=uw;Fe.supplyTransformDefaults=function(t,e,r){if(e._length||uw(t)){var a=r._globalTransforms||[],i=r._transformModules||[];if(!(!Array.isArray(t.transforms)&&a.length===0))for(var n=t.transforms||[],o=a.concat(n),l=e.transforms=[],s=0;s<o.length;s++){var f=o[s],c=f.type,u=Uc[c],v,h=!(f._module&&f._module===u),d=u&&typeof u.transform=="function";u||Xe.warn("Unrecognized transform type "+c+"."),u&&u.supplyDefaults&&(h||d)?(v=u.supplyDefaults(f,e,r,t),v.type=c,v._module=u,Xe.pushUnique(i,u)):v=Xe.extendFlat({},f),l.push(v)}}};function dC(t,e,r,a){for(var i=t.transforms,n=[t],o=0;o<i.length;o++){var l=i[o],s=Uc[l.type];s&&s.transform&&(n=s.transform(n,{transform:l,fullTrace:t,fullData:e,layout:r,fullLayout:a,transformIndex:o}))}return n}Fe.supplyLayoutGlobalDefaults=function(t,e,r){function a(u,v){return Xe.coerce(t,e,Fe.layoutAttributes,u,v)}var i=t.template;Xe.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=Xe.coerceFont(a,"font"),o=n.size;Xe.coerceFont(a,"title.font",Xe.extendFlat({},n,{size:Math.round(o*1.4)})),a("title.text",e._dfltTitle.plot),a("title.xref");var l=a("title.yref");a("title.pad.t"),a("title.pad.r"),a("title.pad.b"),a("title.pad.l");var s=a("title.automargin");a("title.x"),a("title.xanchor"),a("title.y"),a("title.yanchor"),s&&(l==="paper"&&(e.title.y!==0&&(e.title.y=1),e.title.yanchor==="auto"&&(e.title.yanchor=e.title.y===0?"top":"bottom")),l==="container"&&(e.title.y==="auto"&&(e.title.y=1),e.title.yanchor==="auto"&&(e.title.yanchor=e.title.y<.5?"bottom":"top")));var f=a("uniformtext.mode");f&&a("uniformtext.minsize"),a("autosize",!(t.width&&t.height)),a("width"),a("height"),a("minreducedwidth"),a("minreducedheight"),a("margin.l"),a("margin.r"),a("margin.t"),a("margin.b"),a("margin.pad"),a("margin.autoexpand"),t.width&&t.height&&Fe.sanitizeMargins(e),bt.getComponentMethod("grid","sizeDefaults")(t,e),a("paper_bgcolor"),a("separators",r.decimal+r.thousands),a("hidesources"),a("colorway"),a("datarevision");var c=a("uirevision");a("editrevision",c),a("selectionrevision",c),bt.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),bt.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),bt.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,a),a("meta"),Xe.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),bt.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),bt.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a),Xe.coerce(t,e,rC,"scattermode")};function zs(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}Fe.plotAutoSize=function(e,r,a){var i=e._context||{},n=i.frameMargins,o,l,s=Xe.isPlotDiv(e);if(s&&e.emit("plotly_autosize"),i.fillFrame)o=window.innerWidth,l=window.innerHeight,document.body.style.overflow="hidden";else{var f=s?window.getComputedStyle(e):{};if(o=zs(f.width)||zs(f.maxWidth)||a.width,l=zs(f.height)||zs(f.maxHeight)||a.height,El(n)&&n>0){var c=1-2*n;o=Math.round(c*o),l=Math.round(c*l)}}var u=Fe.layoutAttributes.width.min,v=Fe.layoutAttributes.height.min;o<u&&(o=u),l<v&&(l=v);var h=!r.width&&Math.abs(a.width-o)>1,d=!r.height&&Math.abs(a.height-l)>1;(d||h)&&(h&&(a.width=o),d&&(a.height=l)),e._initialAutoSize||(e._initialAutoSize={width:o,height:l}),Fe.sanitizeMargins(a)};Fe.supplyLayoutModuleDefaults=function(t,e,r,a){var i=bt.componentsRegistry,n=e._basePlotModules,o,l,s,f=bt.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(bt.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(Xe.subplotSort);for(l=0;l<n.length;l++)s=n[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var u=e._modules;for(l=0;l<u.length;l++)s=u[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var v=e._transformModules;for(l=0;l<v.length;l++)s=v[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r,a);for(o in i)s=i[o],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r)};Fe.purge=function(t){var e=t._fullLayout||{};e._glcontainer!==void 0&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),Xe.clearThrottle(),Xe.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()};Fe.style=function(t){var e=t._fullLayout._visibleModules,r=[],a;for(a=0;a<e.length;a++){var i=e[a];i.style&&Xe.pushUnique(r,i.style)}for(a=0;a<r.length;a++)r[a](t)};Fe.sanitizeMargins=function(t){if(!(!t||!t.margin)){var e=t.width,r=t.height,a=t.margin,i=e-(a.l+a.r),n=r-(a.t+a.b),o;i<0&&(o=(e-1)/(a.l+a.r),a.l=Math.floor(o*a.l),a.r=Math.floor(o*a.r)),n<0&&(o=(r-1)/(a.t+a.b),a.t=Math.floor(o*a.t),a.b=Math.floor(o*a.b))}};Fe.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};Fe.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function vw(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={}),t._reservedMargin||(t._reservedMargin={})}var dw=2,hw=2;Fe.autoMargin=function(t,e,r){var a=t._fullLayout,i=a.width,n=a.height,o=a.margin,l=a.minreducedwidth,s=a.minreducedheight,f=Xe.constrain(i-o.l-o.r,dw,l),c=Xe.constrain(n-o.t-o.b,hw,s),u=Math.max(0,i-f),v=Math.max(0,n-c),h=a._pushmargin,d=a._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete h[e],delete d[e];else{var p=r.pad;if(p===void 0&&(p=Math.min(12,o.l,o.r,o.t,o.b)),u){var m=(r.l+r.r)/u;m>1&&(r.l/=m,r.r/=m)}if(v){var y=(r.t+r.b)/v;y>1&&(r.t/=y,r.b/=y)}var b=r.xl!==void 0?r.xl:r.x,w=r.xr!==void 0?r.xr:r.x,g=r.yt!==void 0?r.yt:r.y,x=r.yb!==void 0?r.yb:r.y;h[e]={l:{val:b,size:r.l+p},r:{val:w,size:r.r+p},b:{val:x,size:r.b+p},t:{val:g,size:r.t+p}},d[e]=1}if(!a._replotting)return Fe.doAutoMargin(t)}};function hC(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=Fr.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}Fe.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),vw(e);var i=e._size,n=e.margin,o={t:0,b:0,l:0,r:0},l=Xe.extendFlat({},i),s=n.l,f=n.r,c=n.t,u=n.b,v=e._pushmargin,h=e._pushmarginIds,d=e.minreducedwidth,p=e.minreducedheight;if(n.autoexpand!==!1){for(var m in v)h[m]||delete v[m];var y=t._fullLayout._reservedMargin;for(var b in y)for(var w in y[b]){var g=y[b][w];o[w]=Math.max(o[w],g)}v.base={l:{val:0,size:s},r:{val:1,size:f},t:{val:1,size:c},b:{val:0,size:u}};for(var x in o){var _=0;for(var k in v)k!=="base"&&El(v[k][x].size)&&(_=v[k][x].size>_?v[k][x].size:_);var T=Math.max(0,n[x]-_);o[x]=Math.max(0,o[x]-T)}for(var S in v){var D=v[S].l||{},L=v[S].b||{},R=D.val,z=D.size,N=L.val,H=L.size,$=r-o.r-o.l,P=a-o.t-o.b;for(var A in v){if(El(z)&&v[A].r){var M=v[A].r.val,C=v[A].r.size;if(M>R){var E=(z*M+(C-$)*R)/(M-R),F=(C*(1-R)+(z-$)*(1-M))/(M-R);E+F>s+f&&(s=E,f=F)}}if(El(H)&&v[A].t){var j=v[A].t.val,B=v[A].t.size;if(j>N){var G=(H*j+(B-P)*N)/(j-N),O=(B*(1-N)+(H-P)*(1-j))/(j-N);G+O>u+c&&(u=G,c=O)}}}}}var W=Xe.constrain(r-n.l-n.r,dw,d),V=Xe.constrain(a-n.t-n.b,hw,p),Z=Math.max(0,r-W),X=Math.max(0,a-V);if(Z){var Q=(s+f)/Z;Q>1&&(s/=Q,f/=Q)}if(X){var te=(u+c)/X;te>1&&(u/=te,c/=te)}if(i.l=Math.round(s)+o.l,i.r=Math.round(f)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(u)+o.b,i.p=Math.round(n.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(a)-i.t-i.b,!e._replotting&&(Fe.didMarginChange(l,i)||hC(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var xe=3*(1+Object.keys(h).length);if(e._redrawFromAutoMarginCount<xe)return bt.call("_doPlot",t);e._size=l,Xe.warn("Too many auto-margin redraws.")}pC(t)};function pC(t){var e=Fr.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var Xm=["l","r","t","b","p","w","h"];Fe.didMarginChange=function(t,e){for(var r=0;r<Xm.length;r++){var a=Xm[r],i=t[a],n=e[a];if(!El(i)||Math.abs(n-i)>1)return!0}return!1};Fe.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&Fe.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function f(v,h){if(typeof v=="function")return h?"_function_":null;if(Xe.isPlainObject(v)){var d={},p;return Object.keys(v).sort().forEach(function(w){if(["_","["].indexOf(w.charAt(0))===-1){if(typeof v[w]=="function"){h&&(d[w]="_function");return}if(r==="keepdata"){if(w.substr(w.length-3)==="src")return}else if(r==="keepstream"){if(p=v[w+"src"],typeof p=="string"&&p.indexOf(":")>0&&!Xe.isPlainObject(v.stream))return}else if(r!=="keepall"&&(p=v[w+"src"],typeof p=="string"&&p.indexOf(":")>0))return;d[w]=f(v[w],h)}}),d}var m=Array.isArray(v),y=Xe.isTypedArray(v);if((m||y)&&v.dtype&&v.shape){var b=v.bdata;return f({dtype:v.dtype,shape:v.shape,bdata:Xe.isArrayBuffer(b)?JL.encode(b):b},h)}return m?v.map(function(w){return f(w,h)}):y?Xe.simpleMap(v,Xe.identity):Xe.isJSDate(v)?Xe.ms2DateTimeLocal(+v):v}var c={data:(o||[]).map(function(v){var h=f(v);return e&&delete h.fit,h})};if(!e&&(c.layout=f(l),i)){var u=l._size;c.layout.computed={margin:{b:u.b,l:u.l,r:u.r,t:u.t}}}return s&&(c.frames=f(s)),n&&(c.config=f(t._context,!0)),a==="object"?c:JSON.stringify(c)};Fe.modifyFrames=function(t,e){var r,a,i,n=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch(a=e[r],a.type){case"replace":i=a.value;var l=(n[a.index]||{}).name,s=i.name;n[a.index]=o[s]=i,s!==l&&(delete o[l],o[s]=i);break;case"insert":i=a.value,o[i.name]=i,n.splice(a.index,0,i);break;case"delete":i=n[a.index],delete o[i.name],n.splice(a.index,1);break}return Promise.resolve()};Fe.computeFrame=function(t,e){var r=t._transitionData._frameHash,a,i,n,o;if(!e)throw new Error("computeFrame must be given a string frame name");var l=r[e.toString()];if(!l)return!1;for(var s=[l],f=[l.name];l.baseframe&&(l=r[l.baseframe.toString()])&&f.indexOf(l.name)===-1;)s.push(l),f.push(l.name);for(var c={};l=s.pop();)if(l.layout&&(c.layout=Fe.extendLayout(c.layout,l.layout)),l.data){if(c.data||(c.data=[]),i=l.traces,!i)for(i=[],a=0;a<l.data.length;a++)i[a]=a;for(c.traces||(c.traces=[]),a=0;a<l.data.length;a++)n=i[a],n!=null&&(o=c.traces.indexOf(n),o===-1&&(o=c.data.length,c.traces[o]=n),c.data[o]=Fe.extendTrace(c.data[o],l.data[a]))}return c};Fe.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,a=0;a<r.length;a++){var i=r[a];i&&i.name&&(e[i.name]=i)}};Fe.extendObjectWithContainers=function(t,e,r){var a,i,n,o,l,s,f,c,u=Xe.extendDeepNoArrays({},e||{}),v=Xe.expandObjectPaths(u),h={};if(r&&r.length)for(n=0;n<r.length;n++)a=Xe.nestedProperty(v,r[n]),i=a.get(),i===void 0?Xe.nestedProperty(h,r[n]).set(null):(a.set(null),Xe.nestedProperty(h,r[n]).set(i));if(t=Xe.extendDeepNoArrays(t||{},v),r&&r.length){for(n=0;n<r.length;n++)if(l=Xe.nestedProperty(h,r[n]),f=l.get(),!!f){for(s=Xe.nestedProperty(t,r[n]),c=s.get(),Array.isArray(c)||(c=[],s.set(c)),o=0;o<f.length;o++){var d=f[o];d===null?c[o]=null:c[o]=Fe.extendObjectWithContainers(c[o],d)}s.set(c)}}return t};Fe.dataArrayContainers=["transforms","dimensions"];Fe.layoutArrayContainers=bt.layoutArrayContainers;Fe.extendTrace=function(t,e){return Fe.extendObjectWithContainers(t,e,Fe.dataArrayContainers)};Fe.extendLayout=function(t,e){return Fe.extendObjectWithContainers(t,e,Fe.layoutArrayContainers)};Fe.transition=function(t,e,r,a,i,n){var o={redraw:i.redraw},l={},s=[];return o.prepareFn=function(){for(var f=Array.isArray(e)?e.length:0,c=a.slice(0,f),u=0;u<c.length;u++){var v=c[u],h=t._fullData[v],d=h._module;if(d){if(d.animatable){var p=d.basePlotModule.name;l[p]||(l[p]=[]),l[p].push(v)}t.data[c[u]]=Fe.extendTrace(t.data[c[u]],e[u])}}var m=Xe.expandObjectPaths(Xe.extendDeepNoArrays({},r)),y=/^[xy]axis[0-9]*$/;for(var b in m)y.test(b)&&delete m[b].range;Fe.extendLayout(t.layout,m),delete t.calcdata,Fe.supplyDefaults(t),Fe.doCalcdata(t);var w=Xe.expandObjectPaths(r);if(w){var g=t._fullLayout._plots;for(var x in g){var _=g[x],k=_.xaxis,T=_.yaxis,S=k.range.slice(),D=T.range.slice(),L=null,R=null,z=null,N=null;Array.isArray(w[k._name+".range"])?L=w[k._name+".range"].slice():Array.isArray((w[k._name]||{}).range)&&(L=w[k._name].range.slice()),Array.isArray(w[T._name+".range"])?R=w[T._name+".range"].slice():Array.isArray((w[T._name]||{}).range)&&(R=w[T._name].range.slice()),S&&L&&(k.r2l(S[0])!==k.r2l(L[0])||k.r2l(S[1])!==k.r2l(L[1]))&&(z={xr0:S,xr1:L}),D&&R&&(T.r2l(D[0])!==T.r2l(R[0])||T.r2l(D[1])!==T.r2l(R[1]))&&(N={yr0:D,yr1:R}),(z||N)&&s.push(Xe.extendFlat({plotinfo:_},z,N))}}return Promise.resolve()},o.runFn=function(f){var c,u=t._fullLayout._basePlotModules,v=s.length,h;if(r)for(h=0;h<u.length;h++)u[h].transitionAxes&&u[h].transitionAxes(t,s,n,f);v?(c=Xe.extendFlat({},n),c.duration=0,delete l.cartesian):c=n;for(var d in l){var p=l[d],m=t._fullData[p[0]]._module;m.basePlotModule.plot(t,p,c,f)}},pw(t,n,o)};Fe.transitionFromReact=function(t,e,r,a){var i=t._fullLayout,n=i.transition,o={},l=[];return o.prepareFn=function(){var s=i._plots;o.redraw=!1,e.anim==="some"&&(o.redraw=!0),r.anim==="some"&&(o.redraw=!0);for(var f in s){var c=s[f],u=c.xaxis,v=c.yaxis,h=a[u._name].range.slice(),d=a[v._name].range.slice(),p=u.range.slice(),m=v.range.slice();u.setScale(),v.setScale();var y=null,b=null;(u.r2l(h[0])!==u.r2l(p[0])||u.r2l(h[1])!==u.r2l(p[1]))&&(y={xr0:h,xr1:p}),(v.r2l(d[0])!==v.r2l(m[0])||v.r2l(d[1])!==v.r2l(m[1]))&&(b={yr0:d,yr1:m}),(y||b)&&l.push(Xe.extendFlat({plotinfo:c},y,b))}return Promise.resolve()},o.runFn=function(s){for(var f=t._fullData,c=t._fullLayout,u=c._basePlotModules,v,h,d,p=[],m=0;m<f.length;m++)p.push(m);function y(){if(t._fullLayout)for(var w=0;w<u.length;w++)u[w].transitionAxes&&u[w].transitionAxes(t,l,v,s)}function b(){if(t._fullLayout)for(var w=0;w<u.length;w++)u[w].plot(t,d,h,s)}l.length&&e.anim?n.ordering==="traces first"?(v=Xe.extendFlat({},n,{duration:0}),d=p,h=n,setTimeout(y,n.duration),b()):(v=n,d=null,h=Xe.extendFlat({},n,{duration:0}),setTimeout(b,v.duration),y()):l.length?(v=n,y()):e.anim&&(d=p,h=n,b())},pw(t,n,o)};function pw(t,e,r){var a=!1;function i(u){var v=Promise.resolve();if(!u)return v;for(;u.length;)v=v.then(u.shift());return v}function n(u){if(u)for(;u.length;)u.shift()}function o(){return t.emit("plotly_transitioning",[]),new Promise(function(u){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){a=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return bt.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var v=0,h=0;function d(){return v++,function(){h++,!a&&h===v&&l(u)}}r.runFn(d),setTimeout(d())})}function l(u){if(t._transitionData)return n(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return bt.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(u)}function s(){if(t._transitionData)return t._transitioning=!1,i(t._transitionData._interruptCallbacks)}var f=[Fe.previousPromises,s,r.prepareFn,Fe.rehover,Fe.reselect,o],c=Xe.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}Fe.doCalcdata=function(t,e){var r=Fr.list(t),a=t._fullData,i=t._fullLayout,n,o,l,s,f=new Array(a.length),c=(t.calcdata||[]).slice();for(t.calcdata=f,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},l=0;l<a.length;l++)if(Array.isArray(e)&&e.indexOf(l)===-1){f[l]=c[l];continue}for(l=0;l<a.length;l++)n=a[l],n._arrayAttrs=fw.findArrayAttributes(n),n._extremes={};var u=i._subplots.polar||[];for(l=0;l<u.length;l++)r.push(i[u[l]].radialaxis,i[u[l]].angularaxis);for(var v in i._colorAxes){var h=i[v];h.cauto!==!1&&(delete h.cmin,delete h.cmax)}var d=!1;function p(b){if(n=a[b],o=n._module,n.visible===!0&&n.transforms){if(o&&o.calc){var w=o.calc(t,n);w[0]&&w[0].t&&w[0].t._scene&&delete w[0].t._scene.dirty}for(s=0;s<n.transforms.length;s++){var g=n.transforms[s];o=Uc[g.type],o&&o.calcTransform&&(n._hasCalcTransform=!0,d=!0,o.calcTransform(t,n,g))}}}function m(b,w){if(n=a[b],o=n._module,!!o.isContainer===w){var g=[];if(n.visible===!0&&n._length!==0){delete n._indexToPoints;var x=n.transforms||[];for(s=x.length-1;s>=0;s--)if(x[s].enabled){n._indexToPoints=x[s]._indexToPoints;break}o&&o.calc&&(g=o.calc(t,n))}(!Array.isArray(g)||!g[0])&&(g=[{x:Um,y:Um}]),g[0].t||(g[0].t={}),g[0].trace=n,f[b]=g}}for(Ym(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)p(l);for(d&&Ym(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)m(l,!1);Wm(t);var y=yC(r,t);if(y.length){for(i._numBoxes=0,i._numViolins=0,l=0;l<y.length;l++)m(y[l],!0);for(l=0;l<y.length;l++)m(y[l],!1);Wm(t)}bt.getComponentMethod("fx","calc")(t),bt.getComponentMethod("errorbars","calc")(t)};var mC=/(total|sum|min|max|mean|median) (ascending|descending)/;function yC(t,e){var r=[],a,i,n,o,l;function s(A,M,C){var E=M._id.charAt(0);if(A==="histogram2dcontour"){var F=M._counterAxes[0],j=Fr.getFromId(e,F),B=E==="x"||F==="x"&&j.type==="category",G=E==="y"||F==="y"&&j.type==="category";return function(O,W){return O===0||W===0||B&&O===C[W].length-1||G&&W===C.length-1?-1:(E==="y"?W:O)-1}}else return function(O,W){return E==="y"?W:O}}var f={min:function(A){return Xe.aggNums(Math.min,null,A)},max:function(A){return Xe.aggNums(Math.max,null,A)},sum:function(A){return Xe.aggNums(function(M,C){return M+C},null,A)},total:function(A){return Xe.aggNums(function(M,C){return M+C},null,A)},mean:function(A){return Xe.mean(A)},median:function(A){return Xe.median(A)}};function c(A,M){return A[1]-M[1]}function u(A,M){return M[1]-A[1]}for(a=0;a<t.length;a++){var v=t[a];if(v.type==="category"){var h=v.categoryorder.match(mC);if(h){var d=h[1],p=h[2],m=v._id.charAt(0),y=m==="x",b=[];for(i=0;i<v._categories.length;i++)b.push([v._categories[i],[]]);for(i=0;i<v._traceIndices.length;i++){var w=v._traceIndices[i],g=e._fullData[w];if(g.visible===!0){var x=g.type;bt.traceIs(g,"histogram")&&(delete g._xautoBinFinished,delete g._yautoBinFinished);var _=x==="splom",k=x==="scattergl",T=e.calcdata[w];for(n=0;n<T.length;n++){var S=T[n],D,L;if(_){var R=g._axesDim[v._id];if(!y){var z=g._diag[R][0];z&&(v=e._fullLayout[Fr.id2name(z)])}var N=S.trace.dimensions[R].values;for(o=0;o<N.length;o++)for(D=v._categoriesMap[N[o]],l=0;l<S.trace.dimensions.length;l++)if(l!==R){var H=S.trace.dimensions[l];b[D][1].push(H.values[o])}}else if(k){for(o=0;o<S.t.x.length;o++)y?(D=S.t.x[o],L=S.t.y[o]):(D=S.t.y[o],L=S.t.x[o]),b[D][1].push(L);S.t&&S.t._scene&&delete S.t._scene.dirty}else if(S.hasOwnProperty("z")){L=S.z;var $=s(g.type,v,L);for(o=0;o<L.length;o++)for(l=0;l<L[o].length;l++)D=$(l,o),D+1&&b[D][1].push(L[o][l])}else for(D=S.p,D===void 0&&(D=S[m]),L=S.s,L===void 0&&(L=S.v),L===void 0&&(L=y?S.y:S.x),Array.isArray(L)||(L===void 0?L=[]:L=[L]),o=0;o<L.length;o++)b[D][1].push(L[o])}}}v._categoriesValue=b;var P=[];for(i=0;i<b.length;i++)P.push([b[i][0],f[d](b[i][1])]);P.sort(p==="descending"?u:c),v._categoriesAggregatedValue=P,v._initialCategories=P.map(function(A){return A[0]}),r=r.concat(v.sortByInitialCategories())}}}return r}function Ym(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}Xe.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[Fr.id2name(l)])}function Wm(t){var e=t._fullLayout,r=e._visibleModules,a={},i,n,o;for(n=0;n<r.length;n++){var l=r[n],s=l.crossTraceCalc;if(s){var f=l.basePlotModule.name;a[f]?Xe.pushUnique(a[f],s):a[f]=[s]}}for(o in a){var c=a[o],u=e._subplots[o];if(Array.isArray(u))for(i=0;i<u.length;i++){var v=u[i],h=o==="cartesian"?e._plots[v]:e[v];for(n=0;n<c.length;n++)c[n](t,h,v)}else for(n=0;n<c.length;n++)c[n](t)}}Fe.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};Fe.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};Fe.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,a=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(a);bt.getComponentMethod("selections","reselect")(t,i)};Fe.generalUpdatePerTraceModule=function(t,e,r,a){var i=e.traceHash,n={},o;for(o=0;o<r.length;o++){var l=r[o],s=l[0].trace;s.visible&&(n[s.type]=n[s.type]||[],n[s.type].push(l))}for(var f in i)if(!n[f]){var c=i[f][0],u=c[0].trace;u.visible=!1,n[f]=[c]}for(var v in n){var h=n[v],d=h[0][0].trace._module;d.plot(t,e,Xe.filterVisible(h),a)}e.traceHash=n};Fe.plotBasePlot=function(t,e,r,a,i){var n=bt.getModule(t),o=iC(e.calcdata,n)[0];n.plot(e,o,a,i)};Fe.cleanBasePlot=function(t,e,r,a,i){var n=i._has&&i._has(t),o=r._has&&r._has(t);n&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()};var Qt=ow.exports,mw={exports:{}},nr={},Mn={};(function(t){t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}})(Mn);var Cr={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"}};(function(t){var e=ft,r=me,a=r.strTranslate,i=Mn,n=Cr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(M,C,E){var F=M.text(),j=!M.attr("data-notex")&&C&&C._context.typesetMath&&typeof MathJax<"u"&&F.match(o),B=e.select(M.node().parentNode);if(B.empty())return;var G=M.attr("class")?M.attr("class").split(" ")[0]:"text";G+="-math",B.selectAll("svg."+G).remove(),B.selectAll("g."+G+"-group").remove(),M.style("display",null).attr({"data-unformatted":F,"data-math":"N"});function O(){B.empty()||(G=M.attr("class")+"-math",B.select("svg."+G).remove()),M.text("").style("white-space","pre");var W=H(M.node(),F);W&&M.style("pointer-events","all"),t.positionText(M),E&&E.call(M)}return j?(C&&C._promises||[]).push(new Promise(function(W){M.style("display","none");var V=parseInt(M.node().style.fontSize,10),Z={fontSize:V};u(j[2],Z,function(X,Q,te){B.selectAll("svg."+G).remove(),B.selectAll("g."+G+"-group").remove();var xe=X&&X.select("svg");if(!xe||!xe.node()){O(),W();return}var ue=B.append("g").classed(G+"-group",!0).attr({"pointer-events":"none","data-unformatted":F,"data-math":"Y"});ue.node().appendChild(xe.node()),Q&&Q.node()&&xe.node().insertBefore(Q.node().cloneNode(!0),xe.node().firstChild);var ae=te.width,le=te.height;xe.attr({class:G,height:le,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var de=M.node().style.fill||"black",be=xe.select("g");be.attr({fill:de,stroke:de});var Te=be.node().getBoundingClientRect(),Le=Te.width,_e=Te.height;(Le>ae||_e>le)&&(xe.style("overflow","hidden"),Te=xe.node().getBoundingClientRect(),Le=Te.width,_e=Te.height);var Ie=+M.attr("x"),ce=+M.attr("y"),ye=V||M.node().getBoundingClientRect().height,Ee=-ye/4;if(G[0]==="y")ue.attr({transform:"rotate("+[-90,Ie,ce]+")"+a(-Le/2,Ee-_e/2)});else if(G[0]==="l")ce=Ee-_e/2;else if(G[0]==="a"&&G.indexOf("atitle")!==0)Ie=0,ce=Ee;else{var ze=M.attr("text-anchor");Ie=Ie-Le*(ze==="middle"?.5:ze==="end"?1:0),ce=ce+Ee-_e/2}xe.attr({x:Ie,y:ce}),E&&E.call(M,ue),W(ue)})})):O(),M};var l=/(<|<|<)/g,s=/(>|>|>)/g;function f(M){return M.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function u(M,C,E){var F=parseInt((MathJax.version||"").split(".")[0]);if(F!==2&&F!==3){r.warn("No MathJax version:",MathJax.version);return}var j,B,G,O,W=function(){return B=r.extendDeepAll({},MathJax.Hub.config),G=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:c},displayAlign:"left"})},V=function(){B=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c},Z=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},X=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},Q=function(){var de="math-output-"+r.randstr({},64);O=e.select("body").append("div").attr({id:de}).style({visibility:"hidden",position:"absolute","font-size":C.fontSize+"px"}).text(f(M));var be=O.node();return F===2?MathJax.Hub.Typeset(be):MathJax.typeset([be])},te=function(){var de=O.select(F===2?".MathJax_SVG":".MathJax"),be=!de.empty()&&O.select("svg").node();if(!be)r.log("There was an error in the tex syntax.",M),E();else{var Te=be.getBoundingClientRect(),Le;F===2?Le=e.select("body").select("#MathJax_SVG_glyphs"):Le=de.select("defs"),E(de,Le,Te)}O.remove()},xe=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},ue=function(){j!=="svg"&&(MathJax.config.startup.output=j)},ae=function(){return G!==void 0&&(MathJax.Hub.processSectionDelay=G),MathJax.Hub.Config(B)},le=function(){MathJax.config=B};F===2?MathJax.Hub.Queue(W,Z,Q,te,xe,ae):F===3&&(V(),X(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){Q(),te(),ue(),le()}))}var v={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},h={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},p="",m=["http:","https:","mailto:","",void 0,":"],y=t.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,g=/<br(\s+.*)?>/i;t.BR_TAG_ALL=/<br(\s+.*)?>/gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(M,C){if(!M)return null;var E=M.match(C),F=E&&(E[3]||E[4]);return F&&z(F)}var D=/(^|;)\s*color:/;t.plainText=function(M,C){C=C||{};for(var E=C.len!==void 0&&C.len!==-1?C.len:1/0,F=C.allowedTags!==void 0?C.allowedTags:["br"],j="...",B=j.length,G=M.split(b),O=[],W="",V=0,Z=0;Z<G.length;Z++){var X=G[Z],Q=X.match(w),te=Q&&Q[2].toLowerCase();if(te)F.indexOf(te)!==-1&&(O.push(X),W=te);else{var xe=X.length;if(V+xe<E)O.push(X),V+=xe;else if(V<E){var ue=E-V;W&&(W!=="br"||ue<=B||xe<=B)&&O.pop(),E>B?O.push(X.substr(0,ue-B)+j):O.push(X.substr(0,ue));break}W=""}}return O.join("")};var L={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},R=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function z(M){return M.replace(R,function(C,E){var F;return E.charAt(0)==="#"?F=N(E.charAt(1)==="x"?parseInt(E.substr(2),16):parseInt(E.substr(1),10)):F=L[E],F||C})}t.convertEntities=z;function N(M){if(!(M>1114111)){var C=String.fromCodePoint;if(C)return C(M);var E=String.fromCharCode;return M<=65535?E(M):E((M>>10)+55232,M%1024+56320)}}function H(M,C){C=C.replace(y," ");var E=!1,F=[],j,B=-1;function G(){B++;var _e=document.createElementNS(i.svg,"tspan");e.select(_e).attr({class:"line",dy:B*n+"em"}),M.appendChild(_e),j=_e;var Ie=F;if(F=[{node:_e}],Ie.length>1)for(var ce=1;ce<Ie.length;ce++)O(Ie[ce])}function O(_e){var Ie=_e.type,ce={},ye;if(Ie==="a"){ye="a";var Ee=_e.target,ze=_e.href,K=_e.popup;ze&&(ce={"xlink:xlink:show":Ee==="_blank"||Ee.charAt(0)!=="_"?"new":"replace",target:Ee,"xlink:xlink:href":ze},K&&(ce.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+K+'");return false;'))}else ye="tspan";_e.style&&(ce.style=_e.style);var ke=document.createElementNS(i.svg,ye);if(Ie==="sup"||Ie==="sub"){W(j,p),j.appendChild(ke);var re=document.createElementNS(i.svg,"tspan");W(re,p),e.select(re).attr("dy",d[Ie]),ce.dy=h[Ie],j.appendChild(ke),j.appendChild(re)}else j.appendChild(ke);e.select(ke).attr(ce),j=_e.node=ke,F.push(_e)}function W(_e,Ie){_e.appendChild(document.createTextNode(Ie))}function V(_e){if(F.length===1){r.log("Ignoring unexpected end tag </"+_e+">.",C);return}var Ie=F.pop();_e!==Ie.type&&r.log("Start tag <"+Ie.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",C),j=F[F.length-1].node}var Z=g.test(C);Z?G():(j=M,F=[{node:M}]);for(var X=C.split(b),Q=0;Q<X.length;Q++){var te=X[Q],xe=te.match(w),ue=xe&&xe[2].toLowerCase(),ae=v[ue];if(ue==="br")G();else if(ae===void 0)W(j,z(te));else if(xe[1])V(ue);else{var le=xe[4],de={type:ue},be=S(le,x);if(be?(be=be.replace(D,"$1 fill:"),ae&&(be+=";"+ae)):ae&&(be=ae),be&&(de.style=be),ue==="a"){E=!0;var Te=S(le,_);if(Te){var Le=$(Te);Le&&(de.href=Le,de.target=S(le,k)||"_blank",de.popup=S(le,T))}}O(de)}}return E}function $(M){var C=encodeURI(decodeURI(M)),E=document.createElement("a"),F=document.createElement("a");E.href=M,F.href=C;var j=E.protocol,B=F.protocol;return m.indexOf(j)!==-1&&m.indexOf(B)!==-1?C:""}t.sanitizeHTML=function(C){C=C.replace(y," ");for(var E=document.createElement("p"),F=E,j=[],B=C.split(b),G=0;G<B.length;G++){var O=B[G],W=O.match(w),V=W&&W[2].toLowerCase();if(V in v)if(W[1])j.length&&(F=j.pop());else{var Z=W[4],X=S(Z,x),Q=X?{style:X}:{};if(V==="a"){var te=S(Z,_);if(te){var xe=$(te);if(xe){Q.href=xe;var ue=S(Z,k);ue&&(Q.target=ue)}}}var ae=document.createElement(V);F.appendChild(ae),e.select(ae).attr(Q),F=ae,j.push(ae)}else F.appendChild(document.createTextNode(z(O)))}var le="innerHTML";return E[le]},t.lineCount=function(C){return C.selectAll("tspan.line").size()||1},t.positionText=function(C,E,F){return C.each(function(){var j=e.select(this);function B(W,V){return V===void 0?(V=j.attr(W),V===null&&(j.attr(W,0),V=0)):j.attr(W,V),V}var G=B("x",E),O=B("y",F);this.nodeName==="text"&&j.selectAll("tspan.line").attr({x:G,y:O})})};function P(M,C,E){var F=E.horizontalAlign,j=E.verticalAlign||"top",B=M.node().getBoundingClientRect(),G=C.node().getBoundingClientRect(),O,W,V;return j==="bottom"?W=function(){return B.bottom-O.height}:j==="middle"?W=function(){return B.top+(B.height-O.height)/2}:W=function(){return B.top},F==="right"?V=function(){return B.right-O.width}:F==="center"?V=function(){return B.left+(B.width-O.width)/2}:V=function(){return B.left},function(){O=this.node().getBoundingClientRect();var Z=V()-G.left,X=W()-G.top,Q=E.gd||{};if(E.gd){Q._fullLayout._calcInverseTransform(Q);var te=r.apply3DTransform(Q._fullLayout._invTransform)(Z,X);Z=te[0],X=te[1]}return this.style({top:X+"px",left:Z+"px","z-index":1e3}),this}}var A="1px ";t.makeTextShadow=function(M){var C=A,E=A,F=A;return C+E+F+M+", -"+C+"-"+E+F+M+", "+C+"-"+E+F+M+", -"+C+E+F+M},t.makeEditable=function(M,C){var E=C.gd,F=C.delegate,j=e.dispatch("edit","input","cancel"),B=F||M;if(M.style({"pointer-events":F?"none":"all"}),M.size()!==1)throw new Error("boo");function G(){W(),M.style({opacity:0});var V=B.attr("class"),Z;V?Z="."+V.split(" ")[0]+"-math-group":Z="[class*=-math-group]",Z&&e.select(M.node().parentNode).select(Z).style({opacity:0})}function O(V){var Z=V.node(),X=document.createRange();X.selectNodeContents(Z);var Q=window.getSelection();Q.removeAllRanges(),Q.addRange(X),Z.focus()}function W(){var V=e.select(E),Z=V.select(".svg-container"),X=Z.append("div"),Q=M.node().style,te=parseFloat(Q.fontSize||12),xe=C.text;xe===void 0&&(xe=M.attr("data-unformatted")),X.classed("plugin-editable editable",!0).style({position:"absolute","font-family":Q.fontFamily||"Arial","font-size":te,color:C.fill||Q.fill||"black",opacity:1,"background-color":C.background||"transparent",outline:"#ffffff33 1px solid",margin:[-te/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(xe).call(P(M,Z,C)).on("blur",function(){E._editing=!1,M.text(this.textContent).style({opacity:1});var ue=e.select(this).attr("class"),ae;ue?ae="."+ue.split(" ")[0]+"-math-group":ae="[class*=-math-group]",ae&&e.select(M.node().parentNode).select(ae).style({opacity:0});var le=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),j.edit.call(M,le)}).on("focus",function(){var ue=this;E._editing=!0,e.select(document).on("mouseup",function(){if(e.event.target===ue)return!1;document.activeElement===X.node()&&X.node().blur()})}).on("keyup",function(){e.event.which===27?(E._editing=!1,M.style({opacity:1}),e.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),j.cancel.call(M,this.textContent)):(j.input.call(M,this.textContent),e.select(this).call(P(M,Z,C)))}).on("keydown",function(){e.event.which===13&&this.blur()}).call(O)}return C.immediate?G():B.on("click",G),e.rebind(M,j,"on")}})(nr);var yw={exports:{}},gC=ft,Ef=wa,Rl=dt,Is=me,qm=ot,bC=Ho.isValid;function xC(t,e,r){var a=e?Is.nestedProperty(t,e).get()||{}:t,i=a[r||"color"];i&&i._inputArray&&(i=i._inputArray);var n=!1;if(Is.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(Rl(i[o])){n=!0;break}}return Is.isPlainObject(a)&&(n||a.showscale===!0||Rl(a.cmin)&&Rl(a.cmax)||bC(a.colorscale)||Is.isPlainObject(a.colorbar))}var Zm=["showscale","autocolorscale","colorscale","reversescale","colorbar"],il=["min","max","mid","auto"];function gw(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Zm.length;n++)o=Zm[n],a[o]=r[o];if(e)for(i="c",n=0;n<il.length;n++)o=il[n],a[o]=r["c"+o];else{var l;for(n=0;n<il.length;n++){if(o=il[n],l="c"+o,l in r){a[o]=r[l];continue}l="z"+o,l in r&&(a[o]=r[l])}i=l.charAt(0)}return a._sync=function(s,f){var c=il.indexOf(s)!==-1?i+s:s;r[c]=r["_"+c]=f},a}function bw(t){for(var e=gw(t),r=e.min,a=e.max,i=e.reversescale?xw(e.colorscale):e.colorscale,n=i.length,o=new Array(n),l=new Array(n),s=0;s<n;s++){var f=i[s];o[s]=r+f[0]*(a-r),l[s]=f[1]}return{domain:o,range:l}}function xw(t){for(var e=t.length,r=new Array(e),a=e-1,i=0;a>=0;a--,i++){var n=t[a];r[i]=[1-n[0],n[1]]}return r}function _w(t,e){e=e||{};for(var r=t.domain,a=t.range,i=a.length,n=new Array(i),o=0;o<i;o++){var l=Ef(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=gC.scale.linear().domain(r).range(n).clamp(!0),f=e.noNumericCheck,c=e.returnArray,u;return f&&c?u=s:f?u=function(v){return Km(s(v))}:c?u=function(v){return Rl(v)?s(v):Ef(v).isValid()?v:qm.defaultLine}:u=function(v){return Rl(v)?Km(s(v)):Ef(v).isValid()?v:qm.defaultLine},u.domain=s.domain,u.range=function(){return a},u}function _C(t,e){return _w(bw(t),e)}function Km(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return Ef(e).toRgbString()}var ka={hasColorscale:xC,extractOpts:gw,extractScale:bw,flipScale:xw,makeColorScaleFunc:_w,makeColorScaleFuncFromTrace:_C},ww=O_,wC=ww.FORMAT_LINK,TC=ww.DATE_FORMAT_LINK;function kC(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?Tw:kw)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function Tw(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+wC+"."].join(" ")}function kw(t,e){return Tw(t,e)+[" And for dates see: "+TC+".","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(" ")}var Xo={axisHoverFormat:kC,descriptionWithDates:kw},Du=vr,vo=xr,Aw=Hr.dash,ip=Nt.extendFlat,Qm=Lt.templatedArray,Jm=Xo.descriptionWithDates,AC=Yt.ONEDAY,Pa=Lr,Pu=Pa.HOUR_PATTERN,Eu=Pa.WEEKDAY_PATTERN,Rf={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},MC=ip({},Rf,{values:Rf.values.slice().concat(["sync"]),description:[Rf.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function ey(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")}}var ty={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L<f>* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},ry={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L<f>*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M<n>* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},ay={valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},iy={valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")};function ny(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function oy(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var ly={valType:"color",dflt:vo.defaultLine,editType:"ticks",description:"Sets the tick color."},sy={valType:"color",dflt:vo.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function fy(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the width (in px) of the grid lines."};return t||(e.dflt=1),e}var cy=ip({},Aw,{editType:"ticks"}),uy={valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")},Na={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:vo.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Du({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided and it has a value for both the","lower and upper bound, `autorange` is set to *false*.","Using *min* applies autorange only to set the minimum.","Using *max* applies autorange only to set the maximum.","Using *min reversed* applies autorange only to set the minimum on a reversed axis.","Using *max reversed* applies autorange only to set the maximum on a reversed axis.","Using *reversed* applies autorange on both ends and reverses the axis direction."].join(" ")},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange minimum."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Use this value exactly as autorange maximum."].join(" ")},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange minimum if it goes beyond this value.","Has no effect when `autorangeoptions.minallowed` is provided."].join(" ")},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Clip autorange maximum if it goes beyond this value.","Has no effect when `autorangeoptions.maxallowed` is provided."].join(" ")},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Ensure this value is included in autorange."].join(" ")},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},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,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears.","Leaving either or both elements `null` impacts the default `autorange`."].join(" ")},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the minimum range of this axis."].join(" ")},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1},description:["Determines the maximum range of this axis."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Could be used to set the desired inside range of this axis","(excluding the labels) when `ticklabelposition` of","the anchored axis has *inside*.","Not implemented for axes with `type` *log*.","This would be ignored when `range` is provided."].join(" ")},scaleanchor:{valType:"enumerated",values:[Pa.idRegex.x.toString(),Pa.idRegex.y.toString(),!1],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Setting `false` allows to remove a default constraint (occasionally,","you may need to prevent a default `scaleanchor` constraint from",'being applied, eg. when having an image trace `yaxis: {scaleanchor: "x"}`',"is set automatically in order for pixels to be rendered as squares,","setting `yaxis: {scaleanchor: false}` allows to remove the constraint)."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[Pa.idRegex.x.toString(),Pa.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:Qm("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[Eu,Pu,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+Eu+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+Pu+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+Eu+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+Pu+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:AC,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:MC,nticks:ey(),tick0:ty,dtick:ry,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:ay,ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:iy,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},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",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:ny(),tickwidth:oy(),tickcolor:ly,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},labelalias:{valType:"any",dflt:!1,editType:"ticks",description:["Replacement text for specific tick or hover labels.","For example using {US: 'USA', CA: 'Canada'} changes US to USA","and CA to Canada. The labels we would have shown must match","the keys exactly, after adding any tickprefix or ticksuffix.","For negative numbers the minus sign symbol used (U+2212) is wider than the regular ascii dash.","That means you need to use −1 instead of -1.","labelalias can be used with any axis type, and both keys (if needed)","and values (if desired) can include html-like tags or MathJax."].join(" ")},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:ip({},Aw,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:Du({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks",description:["When `tickangle` is set to *auto*, it will be set to the first","angle in this array that is large enough to prevent label","overlap."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Jm("tick label")},tickformatstops:Qm("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Jm("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:vo.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:uy,gridcolor:sy,gridwidth:fy(),griddash:cy,zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:vo.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:vo.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",Pa.idRegex.x.toString(),Pa.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",Pa.idRegex.x.toString(),Pa.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},minor:{tickmode:Rf,nticks:ey("minor"),tick0:ty,dtick:ry,tickvals:ay,ticks:iy,ticklen:ny("minor"),tickwidth:oy("minor"),tickcolor:ly,gridcolor:sy,gridwidth:fy("minor"),griddash:cy,showgrid:uy,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},autoshift:{valType:"boolean",dflt:!1,editType:"plot",description:["Automatically reposition the axis to avoid","overlap with other axes with the same `overlaying` value.","This repositioning will account for any `shift` amount applied to other","axes on the same side with `autoshift` is set to true.","Only has an effect if `anchor` is set to *free*."].join(" ")},shift:{valType:"number",editType:"plot",description:["Moves the axis a given number of pixels from where it would have been otherwise.","Accepts both positive and negative values, which will shift the axis either right","or left, respectively.","If `autoshift` is set to true, then this defaults to a padding of -3 if `side` is set to *left*.","and defaults to +3 if `side` is set to *right*. Defaults to 0 if `autoshift` is set to false.","Only has an effect if `anchor` is set to *free*."].join(" ")},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",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:Du({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},zt=Na,Ru=vr,vy=Nt.extendFlat,SC=Ia.overrideAll,np=SC({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",description:["Sets the x position with respect to `xref` of the color bar (in plot fraction).","When `xref` is *paper*, defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*.","When `xref` is *container*, defaults to *1* when `orientation` is *v* and","0.5 when `orientation` is *h*.","Must be between *0* and *1* if `xref` is *container*","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",description:["Sets the y position with respect to `yref` of the color bar (in plot fraction).","When `yref` is *paper*, defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*.","When `yref` is *container*, defaults to 0.5 when `orientation` is *v* and","1 when `orientation` is *h*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:zt.linecolor,outlinewidth:zt.linewidth,bordercolor:zt.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:zt.minor.tickmode,nticks:zt.nticks,tick0:zt.tick0,dtick:zt.dtick,tickvals:zt.tickvals,ticktext:zt.ticktext,ticks:vy({},zt.ticks,{dflt:""}),ticklabeloverflow:vy({},zt.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:zt.ticklen,tickwidth:zt.tickwidth,tickcolor:zt.tickcolor,ticklabelstep:zt.ticklabelstep,showticklabels:zt.showticklabels,labelalias:zt.labelalias,tickfont:Ru({description:"Sets the color bar's tick label font"}),tickangle:zt.tickangle,tickformat:zt.tickformat,tickformatstops:zt.tickformatstops,tickprefix:zt.tickprefix,showtickprefix:zt.showtickprefix,ticksuffix:zt.ticksuffix,showticksuffix:zt.showticksuffix,separatethousands:zt.separatethousands,exponentformat:zt.exponentformat,minexponent:zt.minexponent,showexponent:zt.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Ru({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:Ru({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root"),LC=np,CC=Oo.counter,DC=qh,Mw=Ho.scales,PC=DC(Mw);function nl(t){return"`"+t+"`"}var Sn=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:!!e,n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",l=typeof r.colorscaleDflt=="string"?Mw[r.colorscaleDflt]:null,s=r.editTypeOverride||"",f=e?e+".":"",c,u;"colorAttr"in r?(c=r.colorAttr,u=r.colorAttr):(c={z:"z",c:"color"}[a],u="in "+nl(f+c));var v=i?" Has an effect only if "+u+" is set to a numerical array.":"",h=a+"auto",d=a+"min",p=a+"max",m=a+"mid",y=nl(f+h),b=nl(f+d),w=nl(f+p),g=b+" and "+w,x={};x[d]=x[p]=void 0;var _={};_[h]=!1;var k={};return c==="color"&&(k.color={valType:"color",arrayOk:!0,editType:s||"style",description:["Sets the",e,"color.","It accepts either a specific color","or an array of numbers that are mapped to the colorscale","relative to the max and min values of the array or relative to",g,"if set."].join(" ")},r.anim&&(k.color.anim=!0)),k[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:x,description:["Determines whether or not the color domain is computed","with respect to the input data (here "+u+") or the bounds set in",g+v,"Defaults to `false` when",g,"are set by the user."].join(" ")},k[d]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_,description:["Sets the lower bound of the color domain."+v,"Value should have the same units as",u,"and if set,",w,"must be set as well."].join(" ")},k[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:_,description:["Sets the upper bound of the color domain."+v,"Value should have the same units as",u,"and if set,",b,"must be set as well."].join(" ")},k[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:x,description:["Sets the mid-point of the color domain by scaling",b,"and/or",w,"to be equidistant to this point."+v,"Value should have the same units as",u+".","Has no effect when",y,"is `false`."].join(" ")},k.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale."+v,"The colorscale must be an array containing","arrays mapping a normalized value to an","rgb, rgba, hex, hsl, hsv, or named color string.","At minimum, a mapping for the lowest (0) and highest (1)","values are required. For example,","`[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`.","To control the bounds of the colorscale in color space,","use",g+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+PC+"."].join(" ")},k.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)","or the palette determined by",nl(f+"colorscale")+"."+v,"In case `colorscale` is unspecified or `autocolorscale` is true, the default","palette will be chosen according to whether numbers in the `color` array are","all positive, all negative or mixed."].join(" ")},k.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true."+v,"If true,",b,"will correspond to the last color","in the array and",w,"will correspond to the first color."].join(" ")},n||(k.showscale={valType:"boolean",dflt:o,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace."+v].join(" ")},k.colorbar=LC),r.noColorAxis||(k.coloraxis={valType:"subplotid",regex:CC("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),k},EC=Nt.extendFlat,RC=Sn,zu=Ho.scales,Iu="Note that `autocolorscale` must be true for this attribute to work.",Sw={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:zu.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",Iu].join(" ")},sequentialminus:{valType:"colorscale",dflt:zu.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",Iu].join(" ")},diverging:{valType:"colorscale",dflt:zu.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",Iu].join(" ")}},coloraxis:EC({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},RC("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},zC=me,Lw=function(e){return zC.isPlainObject(e.colorbar)},Xc={},zd=dt,dy=me,Cw=Yt,IC=Cw.ONEDAY,FC=Cw.ONEWEEK;Xc.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?IC:1;if(!t)return n;if(zd(t))return t=Number(t),t<=0?n:i?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return n;var o=t.charAt(0),l=t.substr(1);return l=zd(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||r&&o==="L"||r&&o==="D"&&(l===1||l===2))?n:t};Xc.tick0=function(t,e,r,a){if(e==="date")return dy.cleanDate(t,dy.dateTick0(r,a%FC===0?1:0));if(!(a==="D1"||a==="D2"))return zd(t)?Number(t):0};var hy=Xc,$C=me.isArrayOrTypedArray,NC=Xt.isTypedArraySpec,HC=Xt.decodeTypedArraySpec,Dw=function(e,r,a,i,n){n||(n={});var o=n.isMinor,l=o?e.minor||{}:e,s=o?r.minor:r,f=o?"minor.":"";function c(b){var w=l[b];return NC(w)&&(w=HC(w)),w!==void 0?w:(s._template||{})[b]}var u=c("tick0"),v=c("dtick"),h=c("tickvals"),d=$C(h)?"array":v?"linear":"auto",p=a(f+"tickmode",d);if(p==="auto"||p==="sync")a(f+"nticks");else if(p==="linear"){var m=s.dtick=hy.dtick(v,i);s.tick0=hy.tick0(u,i,r.calendar,m)}else if(i!=="multicategory"){var y=a(f+"tickvals");y===void 0?s.tickmode="auto":o||a("ticktext")}},Fu=me,py=Na,Pw=function(e,r,a,i){var n=i.isMinor,o=n?e.minor||{}:e,l=n?r.minor:r,s=n?py.minor:py,f=n?"minor.":"",c=Fu.coerce2(o,l,s,"ticklen",n?(r.ticklen||5)*.6:void 0),u=Fu.coerce2(o,l,s,"tickwidth",n?r.tickwidth||1:void 0),v=Fu.coerce2(o,l,s,"tickcolor",(n?r.tickcolor:void 0)||l.color),h=a(f+"ticks",!n&&i.outerTicks||c||u||v?"outside":"");h||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)},Ew=function(e){var r=["showexponent","showtickprefix","showticksuffix"],a=r.filter(function(n){return e[n]!==void 0}),i=function(n){return e[n]===e[a[0]]};if(a.every(i)||a.length===1)return e[a[0]]},Fs=me,OC=Lt,Ha=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=Fs.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=OC.arrayTemplater(r,i,n),c,u;for(c=0;c<l.length;c++){var v=l[c];Fs.isPlainObject(v)?u=f.newItem(v):(u=f.newItem({}),u[n]=!1),u._index=c,u[n]!==!1&&a.handleItemDefaults(v,u,r,a),s.push(u)}var h=f.defaultItems();for(c=0;c<h.length;c++)u=h[c],u._index=s.length,a.handleItemDefaults({},u,r,a,{}),s.push(u);if(Fs.isArrayOrTypedArray(o)){var d=Math.min(o.length,s.length);for(c=0;c<d;c++)Fs.relinkPrivateKeys(s[c],o[c])}return s},Id=me,jC=ot.contrast,Rw=Na,BC=Ew,GC=Ha,zw=function(e,r,a,i,n){n||(n={});var o=a("labelalias");Id.isPlainObject(o)||delete r.labelalias;var l=BC(e),s=a("showticklabels");if(s){var f=n.font||{},c=r.color,u=r.ticklabelposition||"",v=u.indexOf("inside")!==-1?jC(n.bgColor):c&&c!==Rw.color.dflt?c:f.color;if(Id.coerceFont(a,"tickfont",{family:f.family,size:f.size,color:v}),!n.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&a("ticklabelstep"),!n.noAng){var h=a("tickangle");!n.noAutotickangles&&h==="auto"&&a("autotickangles")}if(i!=="category"){var d=a("tickformat");GC(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:UC}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!d&&i!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function UC(t,e){function r(i,n){return Id.coerce(t,e,Rw.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var VC=Ew,Iw=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=VC(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},li=me,XC=Lt,YC=Dw,WC=Pw,qC=zw,ZC=Iw,KC=np,Fw=function(e,r,a){var i=XC.newContainer(r,"colorbar"),n=e.colorbar||{};function o(L,R){return li.coerce(n,i,KC,L,R)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,f=a.height-l.t-l.b,c=o("orientation"),u=c==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(u?s:f):30);var h=o("lenmode");o("len",h==="fraction"?1:u?f:s);var d=o("yref"),p=o("xref"),m=d==="paper",y=p==="paper",b,w,g,x="left";u?(g="middle",x=y?"left":"right",b=y?1.02:1,w=.5):(g=m?"bottom":"top",x="center",b=.5,w=m?1.02:1),li.coerce(n,i,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:b}},"x"),li.coerce(n,i,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:w}},"y"),o("xanchor",x),o("xpad"),o("yanchor",g),o("ypad"),li.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var _=li.coerce(n,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",_.indexOf("inside")!==-1?"hide past domain":"hide past div"),YC(n,i,o,"linear");var k=a.font,T={noAutotickangles:!0,font:k};_.indexOf("inside")!==-1&&(T.bgColor="black"),ZC(n,i,o,"linear",T),qC(n,i,o,"linear",T),WC(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var S=i.showticklabels?i.tickfont:k,D=li.extendFlat({},S,{color:k.color,size:li.bigFont(S.size)});li.coerceFont(o,"title.font",D),o("title.side",u?"top":"right")},my=dt,Fd=me,QC=Lw,JC=Fw,yy=Ho.isValid,eD=Je.traceIs;function $u(t,e){var r=e.slice(0,e.length-1);return e?Fd.nestedProperty(t,r).get()||{}:t}var ps=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=$u(e,o),c=$u(r,o),u=$u(r._template||{},o)||{},v=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,a,i,n)};if(s){var h=a._colorAxes||{},d=i(o+"coloraxis");if(d){var p=eD(r,"contour")&&Fd.nestedProperty(r,"contours.coloring").get()||"heatmap",m=h[d];m?(m[2].push(v),m[0]!==p&&(m[0]=!1,Fd.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):h[d]=[p,r,[v]];return}}var y=f[l+"min"],b=f[l+"max"],w=my(y)&&my(b)&&y<b,g=i(o+l+"auto",!w);g?i(o+l+"mid"):(i(o+l+"min"),i(o+l+"max"));var x=f.colorscale,_=u.colorscale,k;if(x!==void 0&&(k=!yy(x)),_!==void 0&&(k=!yy(_)),i(o+"autocolorscale",k),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var T;o&&s&&(T=QC(f));var S=i(o+"showscale",T);S&&(o&&u&&(c._template=u),JC(f,c,a))}},gy=me,tD=Lt,by=Sw,rD=ps,aD=function(e,r){function a(u,v){return gy.coerce(e,r,by,u,v)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(u,v){return gy.coerce(n,o,by.coloraxis,u,v)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=tD.newContainer(r,s,"coloraxis"),o._name=s,rD(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},iD=me,nD=ka.hasColorscale,oD=ka.extractOpts,lD=function(e,r){function a(c,u){var v=c["_"+u];v!==void 0&&(c[u]=v)}function i(c,u){var v=u.container?iD.nestedProperty(c,u.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var h=oD(v),d=h.auto;(d||h.min===void 0)&&a(v,u.min),(d||h.max===void 0)&&a(v,u.max),h.autocolorscale&&a(v,"colorscale")}}for(var n=0;n<e.length;n++){var o=e[n],l=o._module.colorbar;if(l)if(Array.isArray(l))for(var s=0;s<l.length;s++)i(o,l[s]);else i(o,l);nD(o,"marker.line")&&i(o,{container:"marker.line",min:"cmin",max:"cmax"})}for(var f in r._colorAxes)i(r[f],{min:"cmin",max:"cmax"})},xy=dt,Nu=me,sD=ka.extractOpts,op=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?Nu.nestedProperty(r,o).get():r,s=sD(l),f=s.auto!==!1,c=s.min,u=s.max,v=s.mid,h=function(){return Nu.aggNums(Math.min,null,n)},d=function(){return Nu.aggNums(Math.max,null,n)};if(c===void 0?c=h():f&&(l._colorAx&&xy(c)?c=Math.min(c,h()):c=h()),u===void 0?u=d():f&&(l._colorAx&&xy(u)?u=Math.max(u,d()):u=d()),f&&v!==void 0&&(u-v>v-c?c=v-(u-v):u-v<v-c&&(u=v+(v-c))),c===u&&(c-=.5,u+=.5),s._sync("min",c),s._sync("max",u),s.autocolorscale){var p;c*u<0?p=i.colorscale.diverging:c>=0?p=i.colorscale.sequential:p=i.colorscale.sequentialminus,s._sync("colorscale",p)}},$s=Ho,Fn=ka,So={moduleType:"component",name:"colorscale",attributes:Sn,layoutAttributes:Sw,supplyLayoutDefaults:aD,handleDefaults:ps,crossTraceDefaults:lD,calc:op,scales:$s.scales,defaultScale:$s.defaultScale,getScale:$s.get,isValidScale:$s.isValid,hasColorscale:Fn.hasColorscale,extractOpts:Fn.extractOpts,extractScale:Fn.extractScale,flipScale:Fn.flipScale,makeColorScaleFunc:Fn.makeColorScaleFunc,makeColorScaleFuncFromTrace:Fn.makeColorScaleFuncFromTrace},_y=me,fD=Xt.isTypedArraySpec,_r={hasLines:function(t){return t.visible&&t.mode&&t.mode.indexOf("lines")!==-1},hasMarkers:function(t){return t.visible&&(t.mode&&t.mode.indexOf("markers")!==-1||t.type==="splom")},hasText:function(t){return t.visible&&t.mode&&t.mode.indexOf("text")!==-1},isBubble:function(t){var e=t.marker;return _y.isPlainObject(e)&&(_y.isArrayOrTypedArray(e.size)||fD(e.size))}},cD=dt,$w=function(e,r){r||(r=2);var a=e.marker,i=a.sizeref||1,n=a.sizemin||0,o=a.sizemode==="area"?function(l){return Math.sqrt(l/i)}:function(l){return l/i};return function(l){var s=o(l/r);return cD(s)&&s>0?Math.max(s,n):0}},la={};(function(t){var e=me;t.getSubplot=function(l){return l.subplot||l.xaxis+l.yaxis||l.geo},t.isTraceInSubplots=function(l,s){if(l.type==="splom"){for(var f=l.xaxes||[],c=l.yaxes||[],u=0;u<f.length;u++)for(var v=0;v<c.length;v++)if(s.indexOf(f[u]+c[v])!==-1)return!0;return!1}return s.indexOf(t.getSubplot(l))!==-1},t.flat=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=s;return f},t.p2c=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=l[c].p2c(s);return f},t.getDistanceFunction=function(l,s,f,c){return l==="closest"?c||t.quadrature(s,f):l.charAt(0)==="x"?s:f},t.getClosest=function(l,s,f){if(f.index!==!1)f.index>=0&&f.index<l.length?f.distance=0:f.index=!1;else for(var c=0;c<l.length;c++){var u=s(l[c]);u<=f.distance&&(f.index=c,f.distance=u)}return f},t.inbox=function(l,s,f){return l*s<0||l===0?f:1/0},t.quadrature=function(l,s){return function(f){var c=l(f),u=s(f);return Math.sqrt(c*c+u*u)}},t.makeEventData=function(l,s,f){var c="index"in l?l.index:l.pointNumber,u={data:s._input,fullData:s,curveNumber:s.index,pointNumber:c};if(s._indexToPoints){var v=s._indexToPoints[c];v.length===1?u.pointIndex=v[0]:u.pointIndices=v}else u.pointIndex=c;return s._module.eventData?u=s._module.eventData(u,l,s,f,c):("xVal"in l?u.x=l.xVal:"x"in l&&(u.x=l.x),"yVal"in l?u.y=l.yVal:"y"in l&&(u.y=l.y),l.xa&&(u.xaxis=l.xa),l.ya&&(u.yaxis=l.ya),l.zLabelVal!==void 0&&(u.z=l.zLabelVal)),t.appendArrayPointValue(u,s,c),u},t.appendArrayPointValue=function(l,s,f){var c=s._arrayAttrs;if(c)for(var u=0;u<c.length;u++){var v=c[u],h=a(v);if(l[h]===void 0){var d=e.nestedProperty(s,v).get(),p=i(d,f);p!==void 0&&(l[h]=p)}}},t.appendArrayMultiPointValues=function(l,s,f){var c=s._arrayAttrs;if(c)for(var u=0;u<c.length;u++){var v=c[u],h=a(v);if(l[h]===void 0){for(var d=e.nestedProperty(s,v).get(),p=new Array(f.length),m=0;m<f.length;m++)p[m]=i(d,f[m]);l[h]=p}}};var r={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(l){return r[l]||l}function i(l,s){if(Array.isArray(s)){if(Array.isArray(l)&&Array.isArray(l[s[0]]))return l[s[0]][s[1]]}else return l[s]}var n={x:!0,y:!0},o={"x unified":!0,"y unified":!0};t.isUnifiedHover=function(l){return typeof l!="string"?!1:!!o[l]},t.isXYhover=function(l){return typeof l!="string"?!1:!!n[l]}})(la);var Hu,wy;function uD(){if(wy)return Hu;wy=1;var t=i_,e=ft.round,r="M0,0Z",a=Math.sqrt(2),i=Math.sqrt(3),n=Math.PI,o=Math.cos,l=Math.sin;Hu={circle:{n:0,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b="M"+y+",0A"+y+","+y+" 0 1,1 0,-"+y+"A"+y+","+y+" 0 0,1 "+y+",0Z";return m?h(p,m,b):b}},square:{n:1,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"H-"+y+"V-"+y+"H"+y+"Z")}},diamond:{n:2,f:function(d,p,m){if(s(p))return r;var y=e(d*1.3,2);return h(p,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"Z")}},cross:{n:3,f:function(d,p,m){if(s(p))return r;var y=e(d*.4,2),b=e(d*1.2,2);return h(p,m,"M"+b+","+y+"H"+y+"V"+b+"H-"+y+"V"+y+"H-"+b+"V-"+y+"H-"+y+"V-"+b+"H"+y+"V-"+y+"H"+b+"Z")}},x:{n:4,f:function(d,p,m){if(s(p))return r;var y=e(d*.8/a,2),b="l"+y+","+y,w="l"+y+",-"+y,g="l-"+y+",-"+y,x="l-"+y+","+y;return h(p,m,"M0,"+y+b+w+g+w+g+x+g+x+b+x+b+"Z")}},"triangle-up":{n:5,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,m,"M-"+y+","+b+"H"+y+"L0,-"+w+"Z")}},"triangle-down":{n:6,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,m,"M-"+y+",-"+b+"H"+y+"L0,"+w+"Z")}},"triangle-left":{n:7,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,m,"M"+b+",-"+y+"V"+y+"L-"+w+",0Z")}},"triangle-right":{n:8,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),b=e(d/2,2),w=e(d,2);return h(p,m,"M-"+b+",-"+y+"V"+y+"L"+w+",0Z")}},"triangle-ne":{n:9,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M-"+b+",-"+y+"H"+y+"V"+b+"Z")}},"triangle-se":{n:10,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M"+y+",-"+b+"V"+y+"H-"+b+"Z")}},"triangle-sw":{n:11,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M"+b+","+y+"H-"+y+"V-"+b+"Z")}},"triangle-nw":{n:12,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),b=e(d*1.2,2);return h(p,m,"M-"+y+","+b+"V-"+y+"H"+b+"Z")}},pentagon:{n:13,f:function(d,p,m){if(s(p))return r;var y=e(d*.951,2),b=e(d*.588,2),w=e(-d,2),g=e(d*-.309,2),x=e(d*.809,2);return h(p,m,"M"+y+","+g+"L"+b+","+x+"H-"+b+"L-"+y+","+g+"L0,"+w+"Z")}},hexagon:{n:14,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d/2,2),w=e(d*i/2,2);return h(p,m,"M"+w+",-"+b+"V"+b+"L0,"+y+"L-"+w+","+b+"V-"+b+"L0,-"+y+"Z")}},hexagon2:{n:15,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d/2,2),w=e(d*i/2,2);return h(p,m,"M-"+b+","+w+"H"+b+"L"+y+",0L"+b+",-"+w+"H-"+b+"L-"+y+",0Z")}},octagon:{n:16,f:function(d,p,m){if(s(p))return r;var y=e(d*.924,2),b=e(d*.383,2);return h(p,m,"M-"+b+",-"+y+"H"+b+"L"+y+",-"+b+"V"+b+"L"+b+","+y+"H-"+b+"L-"+y+","+b+"V-"+b+"Z")}},star:{n:17,f:function(d,p,m){if(s(p))return r;var y=d*1.4,b=e(y*.225,2),w=e(y*.951,2),g=e(y*.363,2),x=e(y*.588,2),_=e(-y,2),k=e(y*-.309,2),T=e(y*.118,2),S=e(y*.809,2),D=e(y*.382,2);return h(p,m,"M"+b+","+k+"H"+w+"L"+g+","+T+"L"+x+","+S+"L0,"+D+"L-"+x+","+S+"L-"+g+","+T+"L-"+w+","+k+"H-"+b+"L0,"+_+"Z")}},hexagram:{n:18,f:function(d,p,m){if(s(p))return r;var y=e(d*.66,2),b=e(d*.38,2),w=e(d*.76,2);return h(p,m,"M-"+w+",0l-"+b+",-"+y+"h"+w+"l"+b+",-"+y+"l"+b+","+y+"h"+w+"l-"+b+","+y+"l"+b+","+y+"h-"+w+"l-"+b+","+y+"l-"+b+",-"+y+"h-"+w+"Z")}},"star-triangle-up":{n:19,f:function(d,p,m){if(s(p))return r;var y=e(d*i*.8,2),b=e(d*.8,2),w=e(d*1.6,2),g=e(d*4,2),x="A "+g+","+g+" 0 0 1 ";return h(p,m,"M-"+y+","+b+x+y+","+b+x+"0,-"+w+x+"-"+y+","+b+"Z")}},"star-triangle-down":{n:20,f:function(d,p,m){if(s(p))return r;var y=e(d*i*.8,2),b=e(d*.8,2),w=e(d*1.6,2),g=e(d*4,2),x="A "+g+","+g+" 0 0 1 ";return h(p,m,"M"+y+",-"+b+x+"-"+y+",-"+b+x+"0,"+w+x+y+",-"+b+"Z")}},"star-square":{n:21,f:function(d,p,m){if(s(p))return r;var y=e(d*1.1,2),b=e(d*2,2),w="A "+b+","+b+" 0 0 1 ";return h(p,m,"M-"+y+",-"+y+w+"-"+y+","+y+w+y+","+y+w+y+",-"+y+w+"-"+y+",-"+y+"Z")}},"star-diamond":{n:22,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2),b=e(d*1.9,2),w="A "+b+","+b+" 0 0 1 ";return h(p,m,"M-"+y+",0"+w+"0,"+y+w+y+",0"+w+"0,-"+y+w+"-"+y+",0Z")}},"diamond-tall":{n:23,f:function(d,p,m){if(s(p))return r;var y=e(d*.7,2),b=e(d*1.4,2);return h(p,m,"M0,"+b+"L"+y+",0L0,-"+b+"L-"+y+",0Z")}},"diamond-wide":{n:24,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2),b=e(d*.7,2);return h(p,m,"M0,"+b+"L"+y+",0L0,-"+b+"L-"+y+",0Z")}},hourglass:{n:25,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"H-"+y+"L"+y+",-"+y+"H-"+y+"Z")},noDot:!0},bowtie:{n:26,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"V-"+y+"L-"+y+","+y+"V-"+y+"Z")},noDot:!0},"circle-cross":{n:27,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y+"M"+y+",0A"+y+","+y+" 0 1,1 0,-"+y+"A"+y+","+y+" 0 0,1 "+y+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d/a,2);return h(p,m,"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b+"M"+y+",0A"+y+","+y+" 0 1,1 0,-"+y+"A"+y+","+y+" 0 0,1 "+y+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y+"M"+y+","+y+"H-"+y+"V-"+y+"H"+y+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"L-"+y+",-"+y+"M"+y+",-"+y+"L-"+y+","+y+"M"+y+","+y+"H-"+y+"V-"+y+"H"+y+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(d,p,m){if(s(p))return r;var y=e(d*1.3,2);return h(p,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"ZM0,-"+y+"V"+y+"M-"+y+",0H"+y)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(d,p,m){if(s(p))return r;var y=e(d*1.3,2),b=e(d*.65,2);return h(p,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"ZM-"+b+",-"+b+"L"+b+","+b+"M-"+b+","+b+"L"+b+",-"+b)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"L-"+y+",-"+y+"M"+y+",-"+y+"L-"+y+","+y)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*.85,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y+"M"+b+","+b+"L-"+b+",-"+b+"M"+b+",-"+b+"L-"+b+","+b)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(d,p,m){if(s(p))return r;var y=e(d/2,2),b=e(d,2);return h(p,m,"M"+y+","+b+"V-"+b+"M"+(y-b)+",-"+b+"V"+b+"M"+b+","+y+"H-"+b+"M-"+b+","+(y-b)+"H"+b)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M-"+y+","+w+"L0,0M"+y+","+w+"L0,0M0,-"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M-"+y+",-"+w+"L0,0M"+y+",-"+w+"L0,0M0,"+b+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M"+w+","+y+"L0,0M"+w+",-"+y+"L0,0M-"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(d,p,m){if(s(p))return r;var y=e(d*1.2,2),b=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M-"+w+","+y+"L0,0M-"+w+",-"+y+"L0,0M"+b+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2);return h(p,m,"M"+y+",0H-"+y)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2);return h(p,m,"M0,"+y+"V-"+y)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+",-"+y+"L-"+y+","+y)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(d,p,m){if(s(p))return r;var y=e(d,2);return h(p,m,"M"+y+","+y+"L-"+y+",-"+y)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M0,0L-"+y+","+b+"H"+y+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M0,0L-"+y+",-"+b+"H"+y+"Z")},noDot:!0},"arrow-left":{n:47,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,0L"+y+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-right":{n:48,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,0L-"+y+",-"+b+"V"+b+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M-"+y+",0H"+y+"M0,0L-"+y+","+b+"H"+y+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(d,p,m){if(s(p))return r;var y=e(d,2),b=e(d*2,2);return h(p,m,"M-"+y+",0H"+y+"M0,0L-"+y+",-"+b+"H"+y+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,-"+b+"V"+b+"M0,0L"+y+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),b=e(d,2);return h(p,m,"M0,-"+b+"V"+b+"M0,0L-"+y+",-"+b+"V"+b+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(d,p,m){if(s(p))return r;var y=n/2.5,b=2*d*o(y),w=2*d*l(y);return h(p,m,"M0,0L"+-b+","+w+"L"+b+","+w+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(d,p,m){if(s(p))return r;var y=n/4,b=2*d*o(y),w=2*d*l(y);return h(p,m,"M0,0L"+-b+","+w+"A "+2*d+","+2*d+" 0 0 1 "+b+","+w+"Z")},backoff:.4,noDot:!0}};function s(d){return d===null}var f,c,u,v;function h(d,p,m){if((!d||d%360===0)&&!p)return m;if(u===d&&v===p&&f===m)return c;u=d,v=p,f=m;function y(N,H){var $=o(N),P=l(N),A=H[0],M=H[1]+(p||0);return[A*$-M*P,A*P+M*$]}for(var b=d/180*n,w=0,g=0,x=t(m),_="",k=0;k<x.length;k++){var T=x[k],S=T[0],D=w,L=g;if(S==="M"||S==="L")w=+T[1],g=+T[2];else if(S==="m"||S==="l")w+=+T[1],g+=+T[2];else if(S==="H")w=+T[1];else if(S==="h")w+=+T[1];else if(S==="V")g=+T[1];else if(S==="v")g+=+T[1];else if(S==="A"){w=+T[1],g=+T[2];var R=y(b,[+T[6],+T[7]]);T[6]=R[0],T[7]=R[1],T[3]=+T[3]+d}(S==="H"||S==="V")&&(S="L"),(S==="h"||S==="v")&&(S="l"),(S==="m"||S==="l")&&(w-=D,g-=L);var z=y(b,[w,g]);(S==="H"||S==="V")&&(S="L"),(S==="M"||S==="L"||S==="m"||S==="l")&&(T[1]=z[0],T[2]=z[1]),T[0]=S,_+=T[0]+T.slice(1).join(",")}return c=_,_}return Hu}var ir=ft,St=me,vD=St.numberFormat,mn=dt,$d=wa,Yc=Je,pr=ot,dD=So,Ul=St.strTranslate,lp=nr,hD=Mn,pD=Cr,mD=pD.LINE_SPACING,Nw=us.DESELECTDIM,yD=_r,gD=$w,bD=la.appendArrayPointValue,$e=yw.exports={};$e.font=function(t,e,r,a){St.isPlainObject(e)&&(a=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),a&&t.call(pr.fill,a)};$e.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};$e.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};$e.setRect=function(t,e,r,a,i){t.call($e.setPosition,e,r).call($e.setSize,a,i)};$e.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(mn(i)&&mn(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",Ul(i,n));else return!1;return!0};$e.translatePoints=function(t,e,r){t.each(function(a){var i=ir.select(this);$e.translatePoint(a,i,e,r)})};$e.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};$e.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,a=e.yaxis;t.each(function(i){var n=i[0].trace,o=n.xcalendar,l=n.ycalendar,s=Yc.traceIs(n,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(f){$e.hideOutsideRangePoint(f,ir.select(this),r,a,o,l)})})}};$e.crispRound=function(t,e,r){return!e||!mn(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};$e.singleLineStyle=function(t,e,r,a,i){e.style("fill","none");var n=(((t||[])[0]||{}).trace||{}).line||{},o=r||n.width||0,l=i||n.dash||"";pr.stroke(e,a||n.color),$e.dashLine(e,l,o)};$e.lineGroupStyle=function(t,e,r,a){t.style("fill","none").each(function(i){var n=(((i||[])[0]||{}).trace||{}).line||{},o=e||n.width||0,l=a||n.dash||"";ir.select(this).call(pr.stroke,r||n.color).call($e.dashLine,l,o)})};$e.dashLine=function(t,e,r){r=+r||0,e=$e.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};$e.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return t==="solid"?t="":t==="dot"?t=r+"px,"+r+"px":t==="dash"?t=3*r+"px,"+3*r+"px":t==="longdash"?t=5*r+"px,"+5*r+"px":t==="dashdot"?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":t==="longdashdot"&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t};function Hw(t,e,r){var a=e.fillpattern,i=a&&$e.getPatternAttr(a.shape,0,"");if(i){var n=$e.getPatternAttr(a.bgcolor,0,null),o=$e.getPatternAttr(a.fgcolor,0,null),l=a.fgopacity,s=$e.getPatternAttr(a.size,0,8),f=$e.getPatternAttr(a.solidity,0,.3),c=e.uid;$e.pattern(t,"point",r,c,i,s,f,void 0,a.fillmode,n,o,l)}else e.fillcolor&&t.call(pr.fill,e.fillcolor)}$e.singleFillStyle=function(t,e){var r=ir.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};Hw(t,i,e)};$e.fillGroupStyle=function(t,e){t.style("stroke-width",0).each(function(r){var a=ir.select(this);r[0].trace&&Hw(a,r[0].trace,e)})};var Ty=uD();$e.symbolNames=[];$e.symbolFuncs=[];$e.symbolBackOffs=[];$e.symbolNeedLines={};$e.symbolNoDot={};$e.symbolNoFill={};$e.symbolList=[];Object.keys(Ty).forEach(function(t){var e=Ty[t],r=e.n;$e.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),$e.symbolNames[r]=t,$e.symbolFuncs[r]=e.f,$e.symbolBackOffs[r]=e.backoff||0,e.needLine&&($e.symbolNeedLines[r]=!0),e.noDot?$e.symbolNoDot[r]=!0:$e.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&($e.symbolNoFill[r]=!0)});var xD=$e.symbolNames.length,_D="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";$e.symbolNumber=function(t){if(mn(t))t=+t;else if(typeof t=="string"){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=$e.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=xD||t>=400?0:Math.floor(Math.max(t,0))};function Ow(t,e,r,a){var i=t%100;return $e.symbolFuncs[i](e,r,a)+(t>=200?_D:"")}var ky={x1:1,x2:0,y1:0,y2:0},Ay={x1:0,x2:0,y1:1,y2:0},My=vD("~f"),jw={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:ky},horizontalreversed:{node:"linearGradient",attrs:ky,reversed:!0},vertical:{node:"linearGradient",attrs:Ay},verticalreversed:{node:"linearGradient",attrs:Ay,reversed:!0}};$e.gradient=function(t,e,r,a,i,n){for(var o=i.length,l=jw[a],s=new Array(o),f=0;f<o;f++)l.reversed?s[o-1-f]=[My((1-i[f][0])*100),i[f][1]]:s[f]=[My(i[f][0]*100),i[f][1]];var c=e._fullLayout,u="g"+c._uid+"-"+r,v=c._defs.select(".gradients").selectAll("#"+u).data([a+s.join(";")],St.identity);v.exit().remove(),v.enter().append(l.node).each(function(){var h=ir.select(this);l.attrs&&h.attr(l.attrs),h.attr("id",u);var d=h.selectAll("stop").data(s);d.exit().remove(),d.enter().append("stop"),d.each(function(p){var m=$d(p[1]);ir.select(this).attr({offset:p[0]+"%","stop-color":pr.tinyRGB(m),"stop-opacity":m.getAlpha()})})}),t.style(n,sp(u,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)};$e.pattern=function(t,e,r,a,i,n,o,l,s,f,c,u){var v=e==="legend";l&&(s==="overlay"?(f=l,c=pr.contrast(f)):(f=void 0,c=l));var h=r._fullLayout,d="p"+h._uid+"-"+a,p,m,y=function(z,N,H,$,P){return $+(P-$)*(z-N)/(H-N)},b,w,g,x,_={},k=$d(c),T=pr.tinyRGB(k),S=k.getAlpha(),D=u*S;switch(i){case"/":p=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M-"+p/4+","+m/4+"l"+p/2+",-"+m/2+"M0,"+m+"L"+p+",0M"+p/4*3+","+m/4*5+"l"+p/2+",-"+m/2,w=o*n,x="path",_={d:b,opacity:D,stroke:T,"stroke-width":w+"px"};break;case"\\":p=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M"+p/4*3+",-"+m/4+"l"+p/2+","+m/2+"M0,0L"+p+","+m+"M-"+p/4+","+m/4*3+"l"+p/2+","+m/2,w=o*n,x="path",_={d:b,opacity:D,stroke:T,"stroke-width":w+"px"};break;case"x":p=n*Math.sqrt(2),m=n*Math.sqrt(2),b="M-"+p/4+","+m/4+"l"+p/2+",-"+m/2+"M0,"+m+"L"+p+",0M"+p/4*3+","+m/4*5+"l"+p/2+",-"+m/2+"M"+p/4*3+",-"+m/4+"l"+p/2+","+m/2+"M0,0L"+p+","+m+"M-"+p/4+","+m/4*3+"l"+p/2+","+m/2,w=n-n*Math.sqrt(1-o),x="path",_={d:b,opacity:D,stroke:T,"stroke-width":w+"px"};break;case"|":p=n,m=n,x="path",b="M"+p/2+",0L"+p/2+","+m,w=o*n,x="path",_={d:b,opacity:D,stroke:T,"stroke-width":w+"px"};break;case"-":p=n,m=n,x="path",b="M0,"+m/2+"L"+p+","+m/2,w=o*n,x="path",_={d:b,opacity:D,stroke:T,"stroke-width":w+"px"};break;case"+":p=n,m=n,x="path",b="M"+p/2+",0L"+p/2+","+m+"M0,"+m/2+"L"+p+","+m/2,w=n-n*Math.sqrt(1-o),x="path",_={d:b,opacity:D,stroke:T,"stroke-width":w+"px"};break;case".":p=n,m=n,o<Math.PI/4?g=Math.sqrt(o*n*n/Math.PI):g=y(o,Math.PI/4,1,n/2,n/Math.sqrt(2)),x="circle",_={cx:p/2,cy:m/2,r:g,opacity:D,fill:T};break}var L=[i||"noSh",f||"noBg",c||"noFg",n,o].join(";"),R=h._defs.select(".patterns").selectAll("#"+d).data([L],St.identity);R.exit().remove(),R.enter().append("pattern").each(function(){var z=ir.select(this);if(z.attr({id:d,width:p+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:v?"scale(0.8)":""}),f){var N=$d(f),H=pr.tinyRGB(N),$=N.getAlpha(),P=z.selectAll("rect").data([0]);P.exit().remove(),P.enter().append("rect").attr({width:p+"px",height:m+"px",fill:H,"fill-opacity":$})}var A=z.selectAll(x).data([0]);A.exit().remove(),A.enter().append(x).attr(_)}),t.style("fill",sp(d,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};$e.initGradients=function(t){var e=t._fullLayout,r=St.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),ir.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};$e.initPatterns=function(t){var e=t._fullLayout,r=St.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),ir.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};$e.getPatternAttr=function(t,e,r){return t&&St.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};$e.pointStyle=function(t,e,r,a){if(t.size()){var i=$e.makePointStyleFns(e);t.each(function(n){$e.singlePointStyle(n,ir.select(this),e,i,r,a)})}};$e.singlePointStyle=function(t,e,r,a,i,n){var o=r.marker,l=o.line;if(n&&n.i>=0&&t.i===void 0&&(t.i=n.i),e.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(t):t.mo===void 0?o.opacity:t.mo),a.ms2mrc){var s;t.ms==="various"||o.size==="various"?s=3:s=a.ms2mrc(t.ms),t.mrc=s,a.selectedSizeFn&&(s=t.mrc=a.selectedSizeFn(t));var f=$e.symbolNumber(t.mx||o.symbol)||0;t.om=f%200>=100;var c=cp(t,r),u=fp(t,r);e.attr("d",Ow(f,s,c,u))}var v=!1,h,d,p;if(t.so)p=l.outlierwidth,d=l.outliercolor,h=o.outliercolor;else{var m=(l||{}).width;p=(t.mlw+1||m+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in t?d=t.mlcc=a.lineScale(t.mlc):St.isArrayOrTypedArray(l.color)?d=pr.defaultLine:d=l.color,St.isArrayOrTypedArray(o.color)&&(h=pr.defaultLine,v=!0),"mc"in t?h=t.mcc=a.markerScale(t.mc):h=o.color||o.colors||"rgba(0,0,0,0)",a.selectedColorFn&&(h=a.selectedColorFn(t))}if(t.om)e.call(pr.stroke,h).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:p)+"px");var y=o.gradient,b=t.mgt;b?v=!0:b=y&&y.type,St.isArrayOrTypedArray(b)&&(b=b[0],jw[b]||(b=0));var w=o.pattern,g=w&&$e.getPatternAttr(w.shape,t.i,"");if(b&&b!=="none"){var x=t.mgc;x?v=!0:x=y.color;var _=r.uid;v&&(_+="-"+t.i),$e.gradient(e,i,_,b,[[0,x],[1,h]],"fill")}else if(g){var k=!1,T=w.fgcolor;!T&&n&&n.color&&(T=n.color,k=!0);var S=$e.getPatternAttr(T,t.i,n&&n.color||null),D=$e.getPatternAttr(w.bgcolor,t.i,null),L=w.fgopacity,R=$e.getPatternAttr(w.size,t.i,8),z=$e.getPatternAttr(w.solidity,t.i,.3);k=k||t.mcc||St.isArrayOrTypedArray(w.shape)||St.isArrayOrTypedArray(w.bgcolor)||St.isArrayOrTypedArray(w.fgcolor)||St.isArrayOrTypedArray(w.size)||St.isArrayOrTypedArray(w.solidity);var N=r.uid;k&&(N+="-"+t.i),$e.pattern(e,"point",i,N,g,R,z,t.mcc,w.fillmode,D,S,L)}else St.isArrayOrTypedArray(h)?pr.fill(e,h[t.i]):pr.fill(e,h);p&&pr.stroke(e,d)}};$e.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=$e.tryColorscale(r,""),e.lineScale=$e.tryColorscale(r,"line"),Yc.traceIs(t,"symbols")&&(e.ms2mrc=yD.isBubble(t)?gD(t):function(){return(r.size||6)/2}),t.selectedpoints&&St.extendFlat(e,$e.makeSelectedPointStyleFns(t)),e};$e.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.marker||{},n=r.marker||{},o=a.marker||{},l=i.opacity,s=n.opacity,f=o.opacity,c=s!==void 0,u=f!==void 0;(St.isArrayOrTypedArray(l)||c||u)&&(e.selectedOpacityFn=function(g){var x=g.mo===void 0?i.opacity:g.mo;return g.selected?c?s:x:u?f:Nw*x});var v=i.color,h=n.color,d=o.color;(h||d)&&(e.selectedColorFn=function(g){var x=g.mcc||v;return g.selected?h||x:d||x});var p=i.size,m=n.size,y=o.size,b=m!==void 0,w=y!==void 0;return Yc.traceIs(t,"symbols")&&(b||w)&&(e.selectedSizeFn=function(g){var x=g.mrc||p/2;return g.selected?b?m/2:x:w?y/2:x}),e};$e.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.textfont||{},n=r.textfont||{},o=a.textfont||{},l=i.color,s=n.color,f=o.color;return e.selectedTextColorFn=function(c){var u=c.tc||l;return c.selected?s||u:f||(s?u:pr.addOpacity(u,Nw))},e};$e.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=$e.makeSelectedPointStyleFns(e),a=e.marker||{},i=[];r.selectedOpacityFn&&i.push(function(n,o){n.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(n,o){pr.fill(n,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(n,o){var l=o.mx||a.symbol||0,s=r.selectedSizeFn(o);n.attr("d",Ow($e.symbolNumber(l),s,cp(o,e),fp(o,e))),o.mrc2=s}),i.length&&t.each(function(n){for(var o=ir.select(this),l=0;l<i.length;l++)i[l](o,n)})}};$e.tryColorscale=function(t,e){var r=e?St.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&St.isArrayOrTypedArray(a))return dD.makeColorScaleFuncFromTrace(r)}return St.identity};var Ou={start:1,end:-1,middle:0,bottom:1,top:-1};function Bw(t,e,r,a,i){var n=ir.select(t.node().parentNode),o=e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle",l=e.indexOf("left")!==-1?"end":e.indexOf("right")!==-1?"start":"middle",s=a?a/.8+1:0,f=(lp.lineCount(t)-1)*mD+1,c=Ou[l]*s,u=r*.75+Ou[o]*s+(Ou[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",Ul(c,u))}function Gw(t,e){var r=t.ts||e.textfont.size;return mn(r)&&r>0?r:0}$e.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=$e.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=ir.select(this),f=n?St.extractOption(l,e,"txt","texttemplate"):St.extractOption(l,e,"tx","text");if(!f&&f!==0){s.remove();return}if(n){var c=e._module.formatLabels,u=c?c(l,e,o):{},v={};bD(v,e,l.i);var h=e._meta||{};f=St.texttemplateString(f,u,o._d3locale,v,l,h)}var d=l.tp||e.textposition,p=Gw(l,e),m=a?a(l):l.tc||e.textfont.color;s.call($e.font,l.tf||e.textfont.family,p,m).text(f).call(lp.convertToTspans,r).call(Bw,d,p,l.mrc)})}};$e.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=$e.makeSelectedTextStyleFns(e);t.each(function(a){var i=ir.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=Gw(a,e);pr.fill(i,n);var s=Yc.traceIs(e,"bar-like");Bw(i,o,l,a.mrc2||a.mrc,s)})}};var Sy=.5;$e.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r="M"+t[0],a=[],i;for(i=1;i<t.length-1;i++)a.push(zf(t[i-1],t[i],t[i+1],e));for(r+="Q"+a[0][0]+" "+t[1],i=2;i<t.length-1;i++)r+="C"+a[i-2][1]+" "+a[i-1][0]+" "+t[i];return r+="Q"+a[t.length-3][1]+" "+t[t.length-1],r};$e.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[zf(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(zf(t[n-1],t[n],t[n+1],e));for(i.push(zf(t[a-1],t[a],t[0],e)),n=1;n<=a;n++)r+="C"+i[n-1][1]+" "+i[n][0]+" "+t[n];return r+="C"+i[a][1]+" "+i[0][0]+" "+t[0]+"Z",r};var Uw,Vw;function ho(t,e,r){return r&&(t=Xw(t)),e?cn(t[1]):fn(t[0])}function fn(t){var e=ir.round(t,2);return Uw=e,e}function cn(t){var e=ir.round(t,2);return Vw=e,e}function zf(t,e,r,a){var i=t[0]-e[0],n=t[1]-e[1],o=r[0]-e[0],l=r[1]-e[1],s=Math.pow(i*i+n*n,Sy/2),f=Math.pow(o*o+l*l,Sy/2),c=(f*f*i-s*s*o)*a,u=(f*f*n-s*s*l)*a,v=3*f*(s+f),h=3*s*(s+f);return[[fn(e[0]+(v&&c/v)),cn(e[1]+(v&&u/v))],[fn(e[0]-(h&&c/h)),cn(e[1]-(h&&u/h))]]}var wD={hv:function(t,e,r){return"H"+fn(e[0])+"V"+ho(e,1,r)},vh:function(t,e,r){return"V"+cn(e[1])+"H"+ho(e,0,r)},hvh:function(t,e,r){return"H"+fn((t[0]+e[0])/2)+"V"+cn(e[1])+"H"+ho(e,0,r)},vhv:function(t,e,r){return"V"+cn((t[1]+e[1])/2)+"H"+fn(e[0])+"V"+ho(e,1,r)}},TD=function(t,e,r){return"L"+ho(e,0,r)+","+ho(e,1,r)};$e.steps=function(t){var e=wD[t]||TD;return function(r){for(var a="M"+fn(r[0][0])+","+cn(r[0][1]),i=r.length,n=1;n<i;n++)a+=e(r[n-1],r[n],n===i-1);return a}};function Xw(t,e){var r=t.backoff,a=t.trace,i=t.d,n=t.i;if(r&&a&&a.marker&&a.marker.angle%360===0&&a.line&&a.line.shape!=="spline"){var o=St.isArrayOrTypedArray(r),l=t,s=e?e[0]:Uw||0,f=e?e[1]:Vw||0,c=l[0],u=l[1],v=c-s,h=u-f,d=Math.atan2(h,v),p=o?r[n]:r;if(p==="auto"){var m=l.i;a.type==="scatter"&&m--;var y=l.marker,b=y.symbol;St.isArrayOrTypedArray(b)&&(b=b[m]);var w=y.size;St.isArrayOrTypedArray(w)&&(w=w[m]),p=y?$e.symbolBackOffs[$e.symbolNumber(b)]*w:0,p+=$e.getMarkerStandoff(i[m],a)||0}var g=c-p*Math.cos(d),x=u-p*Math.sin(d);(g<=c&&g>=s||g>=c&&g<=s)&&(x<=u&&x>=f||x>=u&&x<=f)&&(t=[g,x])}return t}$e.applyBackoff=Xw;$e.makeTester=function(){var t=St.ensureSingleById(ir.select("body"),"svg","js-plotly-tester",function(r){r.attr(hD.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=St.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});$e.tester=t,$e.testref=e};$e.savedBBoxes={};var ju=0,kD=1e4;$e.bBox=function(t,e,r){r||(r=Ly(t));var a;if(r){if(a=$e.savedBBoxes[r],a)return St.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=Ly(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=$e.bBox(i,!1,r);return n&&(s.left+=n,s.right+=n),o&&(s.top+=o,s.bottom+=o),s}if(r+="~"+n+"~"+o+"~"+l,a=$e.savedBBoxes[r],a)return St.extendFlat({},a)}}var f,c;e?f=t:(c=$e.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),ir.select(f).attr("transform",null).call(lp.positionText,0,0);var u=f.getBoundingClientRect(),v=$e.testref.node().getBoundingClientRect();e||c.removeChild(f);var h={height:u.height,width:u.width,left:u.left-v.left,top:u.top-v.top,right:u.right-v.left,bottom:u.bottom-v.top};return ju>=kD&&($e.savedBBoxes={},ju=0),r&&($e.savedBBoxes[r]=h),ju++,St.extendFlat({},h)};function Ly(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}$e.setClipUrl=function(t,e,r){t.attr("clip-path",sp(e,r))};function sp(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}$e.getTranslate=function(t){var e=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",a=t[r]("transform")||"",i=a.replace(e,function(n,o,l){return[o,l].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};$e.setTranslate=function(t,e,r){var a=/(\btranslate\(.*?\);?)/,i=t.attr?"attr":"getAttribute",n=t.attr?"attr":"setAttribute",o=t[i]("transform")||"";return e=e||0,r=r||0,o=o.replace(a,"").trim(),o+=Ul(e,r),o=o.trim(),t[n]("transform",o),o};$e.getScale=function(t){var e=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",a=t[r]("transform")||"",i=a.replace(e,function(n,o,l){return[o,l].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};$e.setScale=function(t,e,r){var a=/(\bscale\(.*?\);?)/,i=t.attr?"attr":"getAttribute",n=t.attr?"attr":"setAttribute",o=t[i]("transform")||"";return e=e||1,r=r||1,o=o.replace(a,"").trim(),o+="scale("+e+","+r+")",o=o.trim(),t[n]("transform",o),o};var AD=/\s*sc.*/;$e.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,!!t){var a=e===1&&r===1?"":"scale("+e+","+r+")";t.each(function(){var i=(this.getAttribute("transform")||"").replace(AD,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var MD=/translate\([^)]*\)\s*$/;$e.setTextPointsScale=function(t,e,r){t&&t.each(function(){var a,i=ir.select(this),n=i.select("text");if(n.node()){var o=parseFloat(n.attr("x")||0),l=parseFloat(n.attr("y")||0),s=(i.attr("transform")||"").match(MD);e===1&&r===1?a=[]:a=[Ul(o,l),"scale("+e+","+r+")",Ul(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};function fp(t,e){var r;return t&&(r=t.mf),r===void 0&&(r=e.marker&&e.marker.standoff||0),!e._geo&&!e._xA?-r:r}$e.getMarkerStandoff=fp;var ol=Math.atan2,rn=Math.cos,po=Math.sin;function Cy(t,e){var r=e[0],a=e[1];return[r*rn(t)-a*po(t),r*po(t)+a*rn(t)]}var Dy,Py,Ey,Ry,Bu,Gu;function cp(t,e){var r=t.ma;r===void 0&&(r=e.marker.angle,(!r||St.isArrayOrTypedArray(r))&&(r=0));var a,i,n=e.marker.angleref;if(n==="previous"||n==="north"){if(e._geo){var o=e._geo.project(t.lonlat);a=o[0],i=o[1]}else{var l=e._xA,s=e._yA;if(l&&s)a=l.c2p(t.x),i=s.c2p(t.y);else return 90}if(e._geo){var f=t.lonlat[0],c=t.lonlat[1],u=e._geo.project([f,c+1e-5]),v=e._geo.project([f+1e-5,c]),h=ol(v[1]-i,v[0]-a),d=ol(u[1]-i,u[0]-a),p;if(n==="north")p=r/180*Math.PI;else if(n==="previous"){var m=f/180*Math.PI,y=c/180*Math.PI,b=Dy/180*Math.PI,w=Py/180*Math.PI,g=b-m,x=rn(w)*po(g),_=po(w)*rn(y)-rn(w)*po(y)*rn(g);p=-ol(x,_)-Math.PI,Dy=f,Py=c}var k=Cy(h,[rn(p),0]),T=Cy(d,[po(p),0]);r=ol(k[1]+T[1],k[0]+T[0])/Math.PI*180,n==="previous"&&!(Gu===e.uid&&t.i===Bu+1)&&(r=null)}if(n==="previous"&&!e._geo)if(Gu===e.uid&&t.i===Bu+1&&mn(a)&&mn(i)){var S=a-Ey,D=i-Ry,L=e.line&&e.line.shape||"",R=L.slice(L.length-1);R==="h"&&(D=0),R==="v"&&(S=0),r+=ol(D,S)/Math.PI*180+90}else r=null}return Ey=a,Ry=i,Bu=t.i,Gu=e.uid,r}$e.getMarkerAngle=cp;var xt=yw.exports,Ns=ft,SD=dt,zy=Qt,Iy=Je,no=me,Fy=no.strTranslate,$y=xt,Ny=ot,Uu=nr,Hy=us,LD=Cr.OPPOSITE_SIDE,Oy=/ [XY][0-9]* /;function CD(t,e,r){var a=r.propContainer,i=r.propName,n=r.placeholder,o=r.traceIndex,l=r.avoid||{},s=r.attributes,f=r.transform,c=r.containerGroup,u=t._fullLayout,v=1,h=!1,d=a.title,p=(d&&d.text?d.text:"").trim(),m=d&&d.font?d.font:{},y=m.family,b=m.size,w=m.color,g;i==="title.text"?g="titleText":i.indexOf("axis")!==-1?g="axisTitleText":i.indexOf("colorbar"!==-1)&&(g="colorbarTitleText");var x=t._context.edits[g];p===""?v=0:p.replace(Oy," % ")===n.replace(Oy," % ")&&(v=.2,h=!0,x||(p="")),r._meta?p=no.templateString(p,r._meta):u._meta&&(p=no.templateString(p,u._meta));var _=p||x,k;c||(c=no.ensureSingle(u._infolayer,"g","g-"+e),k=u._hColorbarMoveTitle);var T=c.selectAll("text").data(_?[0]:[]);if(T.enter().append("text"),T.text(p).attr("class",e),T.exit().remove(),!_)return c;function S(z){no.syncOrAsync([D,L],z)}function D(z){var N;return!f&&k&&(f={}),f?(N="",f.rotate&&(N+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||k)&&(N+=Fy(0,(f.offset||0)-(k||0)))):N=null,z.attr("transform",N),z.style({"font-family":y,"font-size":Ns.round(b,2)+"px",fill:Ny.rgb(w),opacity:v*Ny.opacity(w),"font-weight":zy.fontWeight}).attr(s).call(Uu.convertToTspans,t),zy.previousPromises(t)}function L(z){var N=Ns.select(z.node().parentNode);if(l&&l.selection&&l.side&&p){N.attr("transform",null);var H=LD[l.side],$=l.side==="left"||l.side==="top"?-1:1,P=SD(l.pad)?l.pad:2,A=$y.bBox(N.node()),M={t:0,b:0,l:0,r:0},C=t._fullLayout._reservedMargin;for(var E in C)for(var F in C[E]){var j=C[E][F];M[F]=Math.max(M[F],j)}var B={left:M.l,top:M.t,right:u.width-M.r,bottom:u.height-M.b},G=l.maxShift||$*(B[l.side]-A[l.side]),O=0;if(G<0)O=G;else{var W=l.offsetLeft||0,V=l.offsetTop||0;A.left-=W,A.right-=W,A.top-=V,A.bottom-=V,l.selection.each(function(){var X=$y.bBox(this);no.bBoxIntersect(A,X,P)&&(O=Math.max(O,$*(X[l.side]-A[H])+P))}),O=Math.min(G,O),a._titleScoot=Math.abs(O)}if(O>0||G<0){var Z={left:[-O,0],right:[O,0],top:[0,-O],bottom:[0,O]}[l.side];N.attr("transform",Fy(Z[0],Z[1]))}}}T.call(S);function R(){v=0,h=!0,T.text(n).on("mouseover.opacity",function(){Ns.select(this).transition().duration(Hy.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Ns.select(this).transition().duration(Hy.HIDE_PLACEHOLDER).style("opacity",0)})}return x&&(p?T.on(".opacity",null):R(),T.call(Uu.makeEditable,{gd:t}).on("edit",function(z){o!==void 0?Iy.call("_guiRestyle",t,i,z,o):Iy.call("_guiRelayout",t,i,z)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(S)}).on("input",function(z){this.text(z||" ").call(Uu.positionText,s.x,s.y)})),T.classed("js-placeholder",h),c}var Wc={draw:CD},DD=ft,PD=Bl.utcFormat,Et=me,ED=Et.numberFormat,Ma=dt,si=Et.cleanNumber,RD=Et.ms2DateTime,jy=Et.dateTime2ms,Sa=Et.ensureNumber,By=Et.isArrayOrTypedArray,Ri=Yt,Hs=Ri.FP_SAFE,ca=Ri.BADNUM,zD=Ri.LOG_CLIP,ID=Ri.ONEWEEK,Os=Ri.ONEDAY,js=Ri.ONEHOUR,Gy=Ri.ONEMIN,Uy=Ri.ONESEC,Bs=Wt,Jf=Lr,Gs=Jf.HOUR_PATTERN,Us=Jf.WEEKDAY_PATTERN;function ll(t){return Math.pow(10,t)}function Vu(t){return t!=null}var up=function(e,r){r=r||{};var a=e._id||"x",i=a.charAt(0);function n(g,x){if(g>0)return Math.log(g)/Math.LN10;if(g<=0&&x&&e.range&&e.range.length===2){var _=e.range[0],k=e.range[1];return .5*(_+k-2*zD*Math.abs(_-k))}else return ca}function o(g,x,_,k){if((k||{}).msUTC&&Ma(g))return+g;var T=jy(g,_||e.calendar);if(T===ca)if(Ma(g)){g=+g;var S=Math.floor(Et.mod(g+.05,1)*10),D=Math.round(g-S/10);T=jy(new Date(D))+S/10}else return ca;return T}function l(g,x,_){return RD(g,x,_||e.calendar)}function s(g){return e._categories[Math.round(g)]}function f(g){if(Vu(g)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[g]!==void 0)return e._categoriesMap[g];e._categories.push(typeof g=="number"?String(g):g);var x=e._categories.length-1;return e._categoriesMap[g]=x,x}return ca}function c(g,x){for(var _=new Array(x),k=0;k<x;k++){var T=(g[0]||[])[k],S=(g[1]||[])[k];_[k]=u([T,S])}return _}function u(g){if(e._categoriesMap)return e._categoriesMap[g]}function v(g){var x=u(g);if(x!==void 0)return x;if(Ma(g))return+g}function h(g){return Ma(g)?+g:u(g)}function d(g,x,_){return DD.round(_+x*g,2)}function p(g,x,_){return(g-_)/x}var m=function(x){return Ma(x)?d(x,e._m,e._b):ca},y=function(g){return p(g,e._m,e._b)};if(e.rangebreaks){var b=i==="y";m=function(g){if(!Ma(g))return ca;var x=e._rangebreaks.length;if(!x)return d(g,e._m,e._b);var _=b;e.range[0]>e.range[1]&&(_=!_);for(var k=_?-1:1,T=k*g,S=0,D=0;D<x;D++){var L=k*e._rangebreaks[D].min,R=k*e._rangebreaks[D].max;if(T<L)break;if(T>R)S=D+1;else{S=T<(L+R)/2?D:D+1;break}}var z=e._B[S]||0;return isFinite(z)?d(g,e._m2,z):0},y=function(g){var x=e._rangebreaks.length;if(!x)return p(g,e._m,e._b);for(var _=0,k=0;k<x&&!(g<e._rangebreaks[k].pmin);k++)g>e._rangebreaks[k].pmax&&(_=k+1);return p(g,e._m2,e._B[_])}}e.c2l=e.type==="log"?n:Sa,e.l2c=e.type==="log"?ll:Sa,e.l2p=m,e.p2l=y,e.c2p=e.type==="log"?function(g,x){return m(n(g,x))}:m,e.p2c=e.type==="log"?function(g){return ll(y(g))}:y,["linear","-"].indexOf(e.type)!==-1?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=si,e.c2d=e.c2r=e.l2d=e.l2r=Sa,e.d2p=e.r2p=function(g){return e.l2p(si(g))},e.p2d=e.p2r=y,e.cleanPos=Sa):e.type==="log"?(e.d2r=e.d2l=function(g,x){return n(si(g),x)},e.r2d=e.r2c=function(g){return ll(si(g))},e.d2c=e.r2l=si,e.c2d=e.l2r=Sa,e.c2r=n,e.l2d=ll,e.d2p=function(g,x){return e.l2p(e.d2r(g,x))},e.p2d=function(g){return ll(y(g))},e.r2p=function(g){return e.l2p(si(g))},e.p2r=y,e.cleanPos=Sa):e.type==="date"?(e.d2r=e.r2d=Et.identity,e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=l,e.d2p=e.r2p=function(g,x,_){return e.l2p(o(g,0,_))},e.p2d=e.p2r=function(g,x,_){return l(y(g),x,_)},e.cleanPos=function(g){return Et.cleanDate(g,ca,e.calendar)}):e.type==="category"?(e.d2c=e.d2l=f,e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=v,e.r2c=function(g){var x=h(g);return x!==void 0?x:e.fraction2r(.5)},e.l2r=e.c2r=Sa,e.r2l=h,e.d2p=function(g){return e.l2p(e.r2c(g))},e.p2d=function(g){return s(y(g))},e.r2p=e.d2p,e.p2r=y,e.cleanPos=function(g){return typeof g=="string"&&g!==""?g:Sa(g)}):e.type==="multicategory"&&(e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=v,e.r2c=function(g){var x=v(g);return x!==void 0?x:e.fraction2r(.5)},e.r2c_just_indices=u,e.l2r=e.c2r=Sa,e.r2l=v,e.d2p=function(g){return e.l2p(e.r2c(g))},e.p2d=function(g){return s(y(g))},e.r2p=e.d2p,e.p2r=y,e.cleanPos=function(g){return Array.isArray(g)||typeof g=="string"&&g!==""?g:Sa(g)},e.setupMultiCategory=function(g){var x=e._traceIndices,_,k,T=e._matchGroup;if(T&&e._categories.length===0){for(var S in T)if(S!==a){var D=r[Bs.id2name(S)];x=x.concat(D._traceIndices)}}var L=[[0,{}],[0,{}]],R=[];for(_=0;_<x.length;_++){var z=g[x[_]];if(i in z){var N=z[i],H=z._length||Et.minRowLength(N);if(By(N[0])&&By(N[1]))for(k=0;k<H;k++){var $=N[0][k],P=N[1][k];Vu($)&&Vu(P)&&(R.push([$,P]),$ in L[0][1]||(L[0][1][$]=L[0][0]++),P in L[1][1]||(L[1][1][P]=L[1][0]++))}}}for(R.sort(function(A,M){var C=L[0][1],E=C[A[0]]-C[M[0]];if(E)return E;var F=L[1][1];return F[A[1]]-F[M[1]]}),_=0;_<R.length;_++)f(R[_])}),e.fraction2r=function(g){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return e.l2r(x+g*(_-x))},e.r2fraction=function(g){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return(e.r2l(g)-x)/(_-x)},e.limitRange=function(g){var x=e.minallowed,_=e.maxallowed;if(!(x===void 0&&_===void 0)){g||(g="range");var k=Et.nestedProperty(e,g).get(),T=Et.simpleMap(k,e.r2l),S=T[1]<T[0];S&&T.reverse();var D=Et.simpleMap([x,_],e.r2l);if(x!==void 0&&T[0]<D[0]&&(k[S?1:0]=x),_!==void 0&&T[1]>D[1]&&(k[S?0:1]=_),k[0]===k[1]){var L=e.l2r(x),R=e.l2r(_);if(x!==void 0){var z=L+1;_!==void 0&&(z=Math.min(z,R)),k[S?1:0]=z}if(_!==void 0){var N=R+1;x!==void 0&&(N=Math.max(N,L)),k[S?0:1]=N}}}},e.cleanRange=function(g,x){e._cleanRange(g,x),e.limitRange(g)},e._cleanRange=function(g,x){x||(x={}),g||(g="range");var _=Et.nestedProperty(e,g).get(),k,T;if(e.type==="date"?T=Et.dfltRange(e.calendar):i==="y"?T=Jf.DFLTRANGEY:e._name==="realaxis"?T=[0,1]:T=x.dfltRange||Jf.DFLTRANGEX,T=T.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(T[0]=0),!_||_.length!==2){Et.nestedProperty(e,g).set(T);return}var S=_[0]===null,D=_[1]===null;for(e.type==="date"&&!e.autorange&&(_[0]=Et.cleanDate(_[0],ca,e.calendar),_[1]=Et.cleanDate(_[1],ca,e.calendar)),k=0;k<2;k++)if(e.type==="date"){if(!Et.isDateTime(_[k],e.calendar)){e[g]=T;break}if(e.r2l(_[0])===e.r2l(_[1])){var L=Et.constrain(e.r2l(_[0]),Et.MIN_MS+1e3,Et.MAX_MS-1e3);_[0]=e.l2r(L-1e3),_[1]=e.l2r(L+1e3);break}}else{if(!Ma(_[k]))if(!(S||D)&&Ma(_[1-k]))_[k]=_[1-k]*(k?10:.1);else{e[g]=T;break}if(_[k]<-Hs?_[k]=-Hs:_[k]>Hs&&(_[k]=Hs),_[0]===_[1]){var R=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=R,_[1]+=R}}},e.setScale=function(g){var x=r._size;if(e.overlaying){var _=Bs.getFromId({_fullLayout:r},e.overlaying);e.domain=_.domain}var k=g&&e._r?"_r":"range",T=e.calendar;e.cleanRange(k);var S=e.r2l(e[k][0],T),D=e.r2l(e[k][1],T),L=i==="y";if(L?(e._offset=x.t+(1-e.domain[1])*x.h,e._length=x.h*(e.domain[1]-e.domain[0]),e._m=e._length/(S-D),e._b=-e._m*D):(e._offset=x.l+e.domain[0]*x.w,e._length=x.w*(e.domain[1]-e.domain[0]),e._m=e._length/(D-S),e._b=-e._m*S),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks){var R,z;if(e._rangebreaks=e.locateBreaks(Math.min(S,D),Math.max(S,D)),e._rangebreaks.length){for(R=0;R<e._rangebreaks.length;R++)z=e._rangebreaks[R],e._lBreaks+=Math.abs(z.max-z.min);var N=L;S>D&&(N=!N),N&&e._rangebreaks.reverse();var H=N?-1:1;for(e._m2=H*e._length/(Math.abs(D-S)-e._lBreaks),e._B.push(-e._m2*(L?D:S)),R=0;R<e._rangebreaks.length;R++)z=e._rangebreaks[R],e._B.push(e._B[e._B.length-1]-H*e._m2*(z.max-z.min));for(R=0;R<e._rangebreaks.length;R++)z=e._rangebreaks[R],z.pmin=m(z.min),z.pmax=m(z.max)}}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw r._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(g){var x=e.rangebreaks||[],_,k,T,S,D;x._cachedPatterns||(x._cachedPatterns=x.map(function(C){return C.enabled&&C.bounds?Et.simpleMap(C.bounds,C.pattern?si:e.d2c):null})),x._cachedValues||(x._cachedValues=x.map(function(C){return C.enabled&&C.values?Et.simpleMap(C.values,e.d2c).sort(Et.sorterAsc):null}));for(var L=0;L<x.length;L++){var R=x[L];if(R.enabled){if(R.bounds){var z=R.pattern;switch(_=x._cachedPatterns[L],k=_[0],T=_[1],z){case Us:D=new Date(g),S=D.getUTCDay(),k>T&&(T+=7,S<k&&(S+=7));break;case Gs:D=new Date(g);var N=D.getUTCHours(),H=D.getUTCMinutes(),$=D.getUTCSeconds(),P=D.getUTCMilliseconds();S=N+(H/60+$/3600+P/36e5),k>T&&(T+=24,S<k&&(S+=24));break;case"":S=g;break}if(S>=k&&S<T)return ca}else for(var A=x._cachedValues[L],M=0;M<A.length;M++)if(k=A[M],T=k+R.dvalue,g>=k&&g<T)return ca}}return g},e.locateBreaks=function(g,x){var _,k,T,S,D=[];if(!e.rangebreaks)return D;var L=e.rangebreaks.slice().sort(function(F,j){return F.pattern===Us&&j.pattern===Gs?-1:j.pattern===Us&&F.pattern===Gs?1:0}),R=function(F,j){if(F=Et.constrain(F,g,x),j=Et.constrain(j,g,x),F!==j){for(var B=!0,G=0;G<D.length;G++){var O=D[G];F<O.max&&j>=O.min&&(F<O.min&&(O.min=F),j>O.max&&(O.max=j),B=!1)}B&&D.push({min:F,max:j})}};for(_=0;_<L.length;_++){var z=L[_];if(z.enabled)if(z.bounds){var N=g,H=x;z.pattern&&(N=Math.floor(N)),k=Et.simpleMap(z.bounds,z.pattern?si:e.r2l),T=k[0],S=k[1];var $=new Date(N),P,A;switch(z.pattern){case Us:A=ID,P=((S<T?7:0)+(S-T))*Os,N+=T*Os-($.getUTCDay()*Os+$.getUTCHours()*js+$.getUTCMinutes()*Gy+$.getUTCSeconds()*Uy+$.getUTCMilliseconds());break;case Gs:A=Os,P=((S<T?24:0)+(S-T))*js,N+=T*js-($.getUTCHours()*js+$.getUTCMinutes()*Gy+$.getUTCSeconds()*Uy+$.getUTCMilliseconds());break;default:N=Math.min(k[0],k[1]),H=Math.max(k[0],k[1]),A=H-N,P=A}for(var M=N;M<H;M+=A)R(M,M+P)}else for(var C=Et.simpleMap(z.values,e.d2c),E=0;E<C.length;E++)T=C[E],S=T+z.dvalue,R(T,S)}return D.sort(function(F,j){return F.min-j.min}),D},e.makeCalcdata=function(g,x,_){var k,T,S,D,L=e.type,R=L==="date"&&g[x+"calendar"];if(x in g){if(k=g[x],D=g._length||Et.minRowLength(k),Et.isTypedArray(k)&&(L==="linear"||L==="log")){if(D===k.length)return k;if(k.subarray)return k.subarray(0,D)}if(L==="multicategory")return c(k,D);for(T=new Array(D),S=0;S<D;S++)T[S]=e.d2c(k[S],0,R,_)}else{var z=x+"0"in g?e.d2c(g[x+"0"],0,R):0,N=g["d"+x]?Number(g["d"+x]):1;for(k=g[{x:"y",y:"x"}[x]],D=g._length||k.length,T=new Array(D),S=0;S<D;S++)T[S]=z+S*N}if(e.rangebreaks)for(S=0;S<D;S++)T[S]=e.maskBreaks(T[S]);return T},e.isValidRange=function(g,x){return Array.isArray(g)&&g.length===2&&(x&&g[0]===null||Ma(e.r2l(g[0])))&&(x&&g[1]===null||Ma(e.r2l(g[1])))},e.getAutorangeDflt=function(g,x){var _=!e.isValidRange(g,"nullOk");return _&&x&&x.reverseDflt?_="reversed":g&&(g[0]===null&&g[1]===null?_=!0:g[0]===null&&g[1]!==null?_="min":g[0]!==null&&g[1]===null&&(_="max")),_},e.isReversed=function(){var g=e.autorange;return g==="reversed"||g==="min reversed"||g==="max reversed"},e.isPtWithinRange=function(g,x){var _=e.c2l(g[i],null,x),k=e.r2l(e.range[0]),T=e.r2l(e.range[1]);return k<T?k<=_&&_<=T:T<=_&&_<=k},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var g=e._matchGroup;if(g){var x=null,_=null;for(var k in g){var T=r[Bs.id2name(k)];if(T._categories){x=T._categories,_=T._categoriesMap;break}}x&&_?(e._categories=x,e._categoriesMap=_):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var S=0;S<e._initialCategories.length;S++)f(e._initialCategories[S])},e.sortByInitialCategories=function(){var g=[];if(e._emptyCategories(),e._initialCategories)for(var x=0;x<e._initialCategories.length;x++)f(e._initialCategories[x]);g=g.concat(e._traceIndices);var _=e._matchGroup;for(var k in _)if(a!==k){var T=r[Bs.id2name(k)];T._categories=e._categories,T._categoriesMap=e._categoriesMap,g=g.concat(T._traceIndices)}return g};var w=r._d3locale;e.type==="date"&&(e._dateFormat=w?w.timeFormat:PD,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=w?w.numberFormat:ED,delete e._minDtick,delete e._forceTick0},Yw=dt,vp=me,FD=Yt.BADNUM,ec=vp.isArrayOrTypedArray,$D=vp.isDateTime,ND=vp.cleanNumber,Ww=Math.round,qw=function(e,r,a){var i=e,n=a.noMultiCategory;if(ec(i)&&!i.length)return"-";if(!n&&GD(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(ec(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(jD(i,r))return"date";var f=a.autotypenumbers!=="strict";return BD(i,f)?"category":OD(i,f)?"linear":"-"};function HD(t,e){return e?Yw(t):typeof t=="number"}function OD(t,e){for(var r=t.length,a=0;a<r;a++)if(HD(t[a],e))return!0;return!1}function jD(t,e){for(var r=t.length,a=Zw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Ww(l),f=t[s],c=String(f);o[c]||(o[c]=1,$D(f,e)&&i++,Yw(f)&&n++)}return i>n*2}function Zw(t){return Math.max(1,(t-1)/1e3)}function BD(t,e){for(var r=t.length,a=Zw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Ww(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var u=typeof f;u==="boolean"?n++:(e?ND(f)!==FD:u==="number")?i++:u==="string"&&n++}}return n>i*2}function GD(t){return ec(t[0])&&ec(t[1])}var UD=ft,Kw=dt,ki=me,If=Yt.FP_SAFE,VD=Je,XD=xt,Qw=Wt,YD=Qw.getFromId,WD=Qw.isLinked,ms={applyAutorangeOptions:eT,getAutoRange:Nd,makePadFn:Hd,doAutoRange:ZD,findExtremes:KD,concatExtremes:dp};function Nd(t,e){var r,a,i=[],n=t._fullLayout,o=Hd(n,e,0),l=Hd(n,e,1),s=dp(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return ki.simpleMap(e.range,e.r2l);var u=f[0].val,v=c[0].val;for(r=1;r<f.length&&u===v;r++)u=Math.min(u,f[r].val);for(r=1;r<c.length&&u===v;r++)v=Math.max(v,c[r].val);var h=e.autorange,d=h==="reversed"||h==="min reversed"||h==="max reversed";if(!d&&e.range){var p=ki.simpleMap(e.range,e.r2l);d=p[1]<p[0]}e.autorange==="reversed"&&(e.autorange=!0);var m=e.rangemode,y=m==="tozero",b=m==="nonnegative",w=e._length,g=w/10,x=0,_,k,T,S,D,L;for(r=0;r<f.length;r++)for(_=f[r],a=0;a<c.length;a++)k=c[a],L=k.val-_.val-Vy(e,_.val,k.val),L>0&&(D=w-o(_)-l(k),D>g?L/D>x&&(T=_,S=k,x=L/D):L/w>x&&(T={val:_.val,nopad:1},S={val:k.val,nopad:1},x=L/w));function R(P,A){return Math.max(P,l(A))}if(u===v){var z=u-1,N=u+1;if(y)if(u===0)i=[0,1];else{var H=(u>0?c:f).reduce(R,0),$=u/(1-Math.min(.5,H/w));i=u>0?[0,$]:[$,0]}else b?i=[Math.max(0,z),Math.max(1,N)]:i=[z,N]}else y?(T.val>=0&&(T={val:0,nopad:1}),S.val<=0&&(S={val:0,nopad:1})):b&&(T.val-x*o(T)<0&&(T={val:0,nopad:1}),S.val<=0&&(S={val:1,nopad:1})),x=(S.val-T.val-Vy(e,_.val,k.val))/(w-o(T)-l(S)),i=[T.val-x*o(T),S.val+x*l(S)];return i=eT(i,e),e.limitRange&&e.limitRange(),d&&i.reverse(),ki.simpleMap(i,e.l2r||Number)}function Vy(t,e,r){var a=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),n=0;n<i.length;n++){var o=i[n];a+=o.max-o.min}return a}function Hd(t,e,r){var a=.05*e._length,i=e._anchorAxis||{};if((e.ticklabelposition||"").indexOf("inside")!==-1||(i.ticklabelposition||"").indexOf("inside")!==-1){var n=e.isReversed();if(!n){var o=ki.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return WD(t,e._id)||(l=qD(t,e,r)),a=Math.max(l,a),e.constrain==="domain"&&e._inputDomain&&(a*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(f){return f.nopad?0:f.pad+(f.extrapad?a:l)}}var Xy=3;function qD(t,e,r){var a=0,i=e._id.charAt(0)==="x";for(var n in t._plots){var o=t._plots[n];if(!(e._id!==o.xaxis._id&&e._id!==o.yaxis._id)){var l=(i?o.yaxis:o.xaxis)||{};if((l.ticklabelposition||"").indexOf("inside")!==-1&&(!r&&(l.side==="left"||l.side==="bottom")||r&&(l.side==="top"||l.side==="right"))){if(l._vals){var s=ki.deg2rad(l._tickAngles[l._id+"tick"]||0),f=Math.abs(Math.cos(s)),c=Math.abs(Math.sin(s));if(!l._vals[0].bb){var u=l._id+"tick",v=l._selections[u];v.each(function(b){var w=UD.select(this),g=w.select(".text-math-group");g.empty()&&(b.bb=XD.bBox(w.node()))})}for(var h=0;h<l._vals.length;h++){var d=l._vals[h],p=d.bb;if(p){var m=2*Xy+p.width,y=2*Xy+p.height;a=Math.max(a,i?Math.max(m*f,y*c):Math.max(y*f,m*c))}}}l.ticks==="inside"&&l.ticklabelposition==="inside"&&(a+=l.ticklen||0)}}}return a}function dp(t,e,r){var a=e._id,i=t._fullData,n=t._fullLayout,o=[],l=[],s,f,c;function u(m,y){for(s=0;s<y.length;s++){var b=m[y[s]],w=(b._extremes||{})[a];if(b.visible===!0&&w){for(f=0;f<w.min.length;f++)c=w.min[f],Od(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<w.max.length;f++)c=w.max[f],jd(l,c.val,c.pad,{extrapad:c.extrapad})}}}if(u(i,e._traceIndices),u(n.annotations||[],e._annIndices||[]),u(n.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r){for(var v in e._matchGroup)if(v!==e._id){var h=YD(t,v),d=dp(t,h,!0),p=e._length/h._length;for(f=0;f<d.min.length;f++)c=d.min[f],Od(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<d.max.length;f++)c=d.max[f],jd(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function ZD(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():Nd(t,e),e._r=e.range.slice(),e._rl=ki.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,VD.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),a.range=e.range.slice(),a.autorange=e.autorange}var n=e._anchorAxis;if(n&&n.rangeslider){var o=n.rangeslider[e._name];o&&o.rangemode==="auto"&&(o.range=Nd(t,e)),n._input.rangeslider[e._name]=ki.extendFlat({},o)}}function KD(t,e,r){r||(r={}),t._m||t.setScale();var a=[],i=[],n=e.length,o=r.padded||!1,l=r.tozero&&(t.type==="linear"||t.type==="-"),s=t.type==="log",f=!1,c=r.vpadLinearized||!1,u,v,h,d,p,m,y,b,w;function g(R){if(Array.isArray(R))return f=!0,function(N){return Math.max(Number(R[N]||0),0)};var z=Math.max(Number(R||0),0);return function(){return z}}var x=g((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=g((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),k=g(r.vpadplus||r.vpad),T=g(r.vpadminus||r.vpad);if(!f){if(b=1/0,w=-1/0,s)for(u=0;u<n;u++)v=e[u],v<b&&v>0&&(b=v),v>w&&v<If&&(w=v);else for(u=0;u<n;u++)v=e[u],v<b&&v>-If&&(b=v),v>w&&v<If&&(w=v);e=[b,w],n=2}var S={tozero:l,extrapad:o};function D(R){h=e[R],Kw(h)&&(m=x(R),y=_(R),c?(d=t.c2l(h)-T(R),p=t.c2l(h)+k(R)):(b=h-T(R),w=h+k(R),s&&b<w/10&&(b=w/10),d=t.c2l(b),p=t.c2l(w)),l&&(d=Math.min(0,d),p=Math.max(0,p)),Yy(d)&&Od(a,d,y,S),Yy(p)&&jd(i,p,m,S))}var L=Math.min(6,n);for(u=0;u<L;u++)D(u);for(u=n-1;u>=L;u--)D(u);return{min:a,max:i,opts:r}}function Od(t,e,r,a){Jw(t,e,r,a,QD)}function jd(t,e,r,a){Jw(t,e,r,a,JD)}function Jw(t,e,r,a,i){for(var n=a.tozero,o=a.extrapad,l=!0,s=0;s<t.length&&l;s++){var f=t[s];if(i(f.val,e)&&f.pad>=r&&(f.extrapad||!o)){l=!1;break}else i(e,f.val)&&f.pad<=r&&(o||!f.extrapad)&&(t.splice(s,1),s--)}if(l){var c=n&&e===0;t.push({val:e,pad:c?0:r,extrapad:c?!1:o})}}function Yy(t){return Kw(t)&&Math.abs(t)<If}function QD(t,e){return t<=e}function JD(t,e){return t>=e}function e3(t,e){var r=e.autorangeoptions;return r&&r.minallowed!==void 0&&tc(e,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&tc(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}function t3(t,e){var r=e.autorangeoptions;return r&&r.maxallowed!==void 0&&tc(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&tc(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}function tc(t,e,r){return e!==void 0&&r!==void 0?(e=t.d2l(e),r=t.d2l(r),e<r):!0}function eT(t,e){if(!e||!e.autorangeoptions)return t;var r=t[0],a=t[1],i=e.autorangeoptions.include;if(i!==void 0){var n=e.d2l(r),o=e.d2l(a);ki.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l<i.length;l++){var s=e.d2l(i[l]);n>=s&&(n=s,r=s),o<=s&&(o=s,a=s)}}return r=e3(r,e),a=t3(a,e),[r,a]}var Jr=ft,Kt=dt,wo=Qt,Vl=Je,it=me,Lo=it.strTranslate,oo=nr,r3=Wc,Xl=ot,Or=xt,a3=Na,Wy=Xc,wr=Yt,i3=wr.ONEMAXYEAR,rc=wr.ONEAVGYEAR,Bd=wr.ONEMINYEAR,n3=wr.ONEMAXQUARTER,Gd=wr.ONEAVGQUARTER,Ud=wr.ONEMINQUARTER,o3=wr.ONEMAXMONTH,Co=wr.ONEAVGMONTH,Vd=wr.ONEMINMONTH,aa=wr.ONEWEEK,Sr=wr.ONEDAY,un=Sr/2,Qa=wr.ONEHOUR,ac=wr.ONEMIN,Xd=wr.ONESEC,vn=wr.MINUS_SIGN,qc=wr.BADNUM,Yd={K:"zeroline"},Wd={K:"gridline",L:"path"},qd={K:"minor-gridline",L:"path"},tT={K:"tick",L:"path"},qy={K:"tick",L:"text"},Zy={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Zc=Cr,Vs=Zc.MID_SHIFT,dn=Zc.CAP_SHIFT,ic=Zc.LINE_SPACING,l3=Zc.OPPOSITE_SIDE,nc=3,De=mw.exports={};De.setConvert=up;var s3=qw,ei=Wt,f3=ei.idSort,c3=ei.isLinked;De.id2name=ei.id2name;De.name2id=ei.name2id;De.cleanId=ei.cleanId;De.list=ei.list;De.listIds=ei.listIds;De.getFromId=ei.getFromId;De.getFromTrace=ei.getFromTrace;var rT=ms;De.getAutoRange=rT.getAutoRange;De.findExtremes=rT.findExtremes;var u3=1e-4;function hp(t){var e=(t[1]-t[0])*u3;return[t[0]-e,t[1]+e]}De.coerceRef=function(t,e,r,a,i,n){var o=a.charAt(a.length-1),l=r._fullLayout._subplots[o+"axis"],s=a+"ref",f={};return i||(i=l[0]||(typeof n=="string"?n:n[0])),n||(n=i),l=l.concat(l.map(function(c){return c+" domain"})),f[s]={valType:"enumerated",values:l.concat(n?typeof n=="string"?[n]:n:[]),dflt:i},it.coerce(t,e,f,s)};De.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};De.coercePosition=function(t,e,r,a,i,n){var o,l,s=De.getRefType(a);if(s!=="range")o=it.ensureNumber,l=r(i,n);else{var f=De.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};De.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?it.ensureNumber:De.getFromId(e,r).cleanPos;return a(t)};De.redrawComponents=function(t,e){e=e||De.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=Vl.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var u=r[De.id2name(e[c])],v=u[o],h=0;h<v.length;h++){var d=v[h];if(!f[d]&&(s(t,d),f[d]=1,l))return}}a("annotations","drawOne","_annIndices"),a("shapes","drawOne","_shapeIndices"),a("images","draw","_imgIndices",!0),a("selections","drawOne","_selectionIndices")};var v3=De.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(it.isArrayOrTypedArray(n)){if(i={type:s3(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},De.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=De.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:Qy,c2d:Qy}:{d2c:Ky,c2d:Ky}};function Ky(t){return+t}function Qy(t){return String(t)}De.getDataToCoordFunc=function(t,e,r,a){return v3(t,e,r,a).d2c};De.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};De.minDtick=function(t,e,r,a){["log","category","multicategory"].indexOf(t.type)!==-1||!a?t._minDtick=0:t._minDtick===void 0?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0))};De.saveRangeInitial=function(t,e){for(var r=De.list(t,"",!0),a=!1,i=0;i<r.length;i++){var n=r[i],o=n._rangeInitial0===void 0&&n._rangeInitial1===void 0,l=o||n.range[0]!==n._rangeInitial0||n.range[1]!==n._rangeInitial1,s=n.autorange;(o&&s!==!0||e&&l)&&(n._rangeInitial0=s==="min"||s==="max reversed"?void 0:n.range[0],n._rangeInitial1=s==="max"||s==="min reversed"?void 0:n.range[1],n._autorangeInitial=s,a=!0)}return a};De.saveShowSpikeInitial=function(t,e){for(var r=De.list(t,"",!0),a=!1,i="on",n=0;n<r.length;n++){var o=r[n],l=o._showSpikeInitial===void 0,s=l||o.showspikes!==o._showspikes;(l||e&&s)&&(o._showSpikeInitial=o.showspikes,a=!0),i==="on"&&!o.showspikes&&(i="off")}return t._fullLayout._cartesianSpikesEnabled=i,a};De.autoBin=function(t,e,r,a,i,n){var o=it.aggNums(Math.min,null,t),l=it.aggNums(Math.max,null,t);if(e.type==="category"||e.type==="multicategory")return{start:o-.5,end:l+.5,size:Math.max(1,Math.round(n)||1),_dataSpan:l-o};i||(i=e.calendar);var s;if(e.type==="log"?s={type:"linear",range:[o,l]}:s={type:e.type,range:it.simpleMap([o,l],e.c2r,0,i),calendar:i},De.setConvert(s),n=n&&Wy.dtick(n,s.type),n)s.dtick=n,s.tick0=Wy.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=it.distinctVals(t),u=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),v=u*it.roundUp(c.minDiff/u,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2*it.stdev(t)/Math.pow(t.length,a?.25:.4)),Kt(f)||(f=1)}De.autoTicks(s,f)}var h=s.dtick,d=De.tickIncrement(De.tickFirst(s),h,"reverse",i),p,m;if(typeof h=="number")d=d3(d,t,s,o,l),m=1+Math.floor((l-d)/h),p=d+m*h;else for(s.dtick.charAt(0)==="M"&&(d=h3(d,t,h,o,i)),p=d,m=0;p<=l;)p=De.tickIncrement(p,h,!1,i),m++;return{start:e.c2r(d,0,i),end:e.c2r(p,0,i),size:h,_dataSpan:l-o}};function d3(t,e,r,a,i){var n=0,o=0,l=0,s=0;function f(h){return(1+(h-t)*100/r.dtick)%100<2}for(var c=0;c<e.length;c++)e[c]%1===0?l++:Kt(e[c])||s++,f(e[c])&&n++,f(e[c]+r.dtick/2)&&o++;var u=e.length-s;if(l===u&&r.type!=="date")r.dtick<1?t=a-.5*r.dtick:(t-=.5,t+r.dtick<a&&(t+=r.dtick));else if(o<u*.1&&(n>u*.3||f(a)||f(i))){var v=r.dtick/2;t+=t+v<a?v:-v}return t}function h3(t,e,r,a,i){var n=it.findExactDates(e,i),o=.8;if(n.exactDays>o){var l=Number(r.substr(1));n.exactYears>o&&l%12===0?t=De.tickIncrement(t,"M6","reverse")+Sr*1.5:n.exactMonths>o?t=De.tickIncrement(t,"M1","reverse")+Sr*15.5:t-=un;var s=De.tickIncrement(t,r);if(s<=a)return s}return t}De.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var a=e.dtick&&Kt(e._tmin),i;if(a){var n=De.tickIncrement(e._tmin,e.dtick,!0);i=[e._tmin,n*.99+e._tmin*.01]}else{var o=it.simpleMap(e.range,e.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(t.range=it.simpleMap(i,e.l2r),t._isMinor=!0,De.prepTicks(t,r),a){var l=Kt(e.dtick),s=Kt(t.dtick),f=l?e.dtick:+e.dtick.substring(1),c=s?t.dtick:+t.dtick.substring(1);l&&s?Xu(f,c)?f===2*aa&&c===2*Sr&&(t.dtick=aa):f===2*aa&&c===3*Sr?t.dtick=aa:f===aa&&!(e._input.minor||{}).nticks?t.dtick=Sr:Jy(f/c,2.5)?t.dtick=f/2:t.dtick=f:String(e.dtick).charAt(0)==="M"?s?t.dtick="M1":Xu(f,c)?f>=12&&c===2&&(t.dtick="M3"):t.dtick=e.dtick:String(t.dtick).charAt(0)==="L"?String(e.dtick).charAt(0)==="L"?Xu(f,c)||(t.dtick=Jy(f/c,2.5)?e.dtick/2:e.dtick):t.dtick="D1":t.dtick==="D2"&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}e.minor._tick0Init===void 0&&(t.tick0=e.tick0)};function Xu(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function Jy(t,e){return Math.abs(t/e-1)<.001}De.prepTicks=function(t,e){var r=it.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t.tickmode==="auto"||!t.dtick){var a=t.nticks,i;a||(t.type==="category"||t.type==="multicategory"?(i=t.tickfont?it.bigFont(t.tickfont.size||12):15,a=t._length/i):(i=t._id.charAt(0)==="y"?40:80,a=it.constrain(t._length/i,4,9)+1),t._name==="radialaxis"&&(a*=2)),t.minor&&t.minor.tickmode!=="array"||t.tickmode==="array"&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,De.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<t._minDtick*2&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.ticklabelmode==="period"&&p3(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),oT(t)};function Yu(t){return+t.substring(1)}function p3(t){var e;function r(){return!(Kt(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=De.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=Qa,n&&!a&&t.dtick<Qa&&(t.dtick=Qa)):/%p/.test(i)?(e=un,n&&!a&&t.dtick<un&&(t.dtick=un)):/%[Aadejuwx]/.test(i)?(e=Sr,n&&!a&&t.dtick<Sr&&(t.dtick=Sr)):/%[UVW]/.test(i)?(e=aa,n&&!a&&t.dtick<aa&&(t.dtick=aa)):/%[Bbm]/.test(i)?(e=Co,n&&(a?Yu(t.dtick)<1:t.dtick<Vd)&&(t.dtick="M1")):/%[q]/.test(i)?(e=Gd,n&&(a?Yu(t.dtick)<3:t.dtick<Ud)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=rc,n&&(a?Yu(t.dtick)<12:t.dtick<Bd)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function m3(t,e,r){for(var a=0;a<t.length;a++){var i=t[a].value,n=a,o=a+1;a<t.length-1?(n=a,o=a+1):a>0?(n=a-1,o=a):(n=a,o=a);var l=t[n].value,s=t[o].value,f=Math.abs(s-l),c=r||f,u=0;c>=Bd?f>=Bd&&f<=i3?u=f:u=rc:r===Gd&&c>=Ud?f>=Ud&&f<=n3?u=f:u=Gd:c>=Vd?f>=Vd&&f<=o3?u=f:u=Co:r===aa&&c>=aa?u=aa:c>=Sr?u=Sr:r===un&&c>=un?u=un:r===Qa&&c>=Qa&&(u=Qa);var v;u>=f&&(u=f,v=!0);var h=i+u;if(e.rangebreaks&&u>0){for(var d=84,p=0,m=0;m<d;m++){var y=(m+.5)/d;e.maskBreaks(i*(1-y)+y*h)!==qc&&p++}u*=p/d,u||(t[a].drop=!0),v&&f>aa&&(u=f)}(u>0||a===0)&&(t[a].periodX=i+u/2)}}De.calcTicks=function(e,r){for(var a=e.type,i=e.calendar,n=e.ticklabelstep,o=e.ticklabelmode==="period",l=it.simpleMap(e.range,e.r2l,void 0,void 0,r),s=l[1]<l[0],f=Math.min(l[0],l[1]),c=Math.max(l[0],l[1]),u=Math.max(1e3,e._length||0),v=[],h=[],d=[],p=[],m=e.minor&&(e.minor.ticks||e.minor.showgrid),y=1;y>=(m?0:1);y--){var b=!y;y?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var w=y?e:it.extendFlat({},e,e.minor);if(b?De.prepMinorTicks(w,e,r):De.prepTicks(w,r),w.tickmode==="array"){y?(d=[],v=eg(e,!b)):(p=[],h=eg(e,!b));continue}if(w.tickmode==="sync"){d=[],v=y3(e);continue}var g=hp(l),x=g[0],_=g[1],k=Kt(w.dtick),T=a==="log"&&!(k||w.dtick.charAt(0)==="L"),S=De.tickFirst(w,r);if(y){if(e._tmin=S,S<x!==s)break;(a==="category"||a==="multicategory")&&(_=s?Math.max(-.5,_):Math.min(e._categories.length-.5,_))}var D=null,L=S,R;if(y){var z;k?z=e.dtick:a==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(z=Co*e.dtick.substring(1)):z=e._roughDTick,R=Math.round((e.r2l(L)-e.r2l(e.tick0))/z)-1}var N=w.dtick;for(w.rangebreaks&&w._tick0Init!==w.tick0&&(L=Wu(L,e),s||(L=De.tickIncrement(L,N,!s,i))),y&&o&&(L=De.tickIncrement(L,N,!s,i),R--);s?L>=_:L<=_;L=De.tickIncrement(L,N,s,i)){if(y&&R++,w.rangebreaks&&!s){if(L<x)continue;if(w.maskBreaks(L)===qc&&Wu(L,w)>=c)break}if(d.length>u||L===D)break;D=L;var H={value:L};y?(T&&L!==(L|0)&&(H.simpleLabel=!0),n>1&&R%n&&(H.skipLabel=!0),d.push(H)):(H.minor=!0,p.push(H))}}if(m){var $=e.minor.ticks==="inside"&&e.ticks==="outside"||e.minor.ticks==="outside"&&e.ticks==="inside";if(!$){for(var P=d.map(function(ae){return ae.value}),A=[],M=0;M<p.length;M++){var C=p[M],E=C.value;if(P.indexOf(E)===-1){for(var F=!1,j=0;!F&&j<d.length;j++)1e7+d[j].value===1e7+E&&(F=!0);F||A.push(C)}}p=A}}o&&m3(d,e,e._definedDelta);var B;if(e.rangebreaks){var G=e._id.charAt(0)==="y",O=1;e.tickmode==="auto"&&(O=e.tickfont?e.tickfont.size:12);var W=NaN;for(B=d.length-1;B>-1;B--){if(d[B].drop){d.splice(B,1);continue}d[B].value=Wu(d[B].value,e);var V=e.c2p(d[B].value);(G?W>V-O:W<V+O)?d.splice(s?B+1:B,1):W=V}}gp(e)&&Math.abs(l[1]-l[0])===360&&d.pop(),e._tmax=(d[d.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var Z,X=function(ae){ae.text="",e._prevDateHead=Z};d=d.concat(p);var Q,te;for(B=0;B<d.length;B++){var xe=d[B].minor,ue=d[B].value;xe?h.push({x:ue,minor:!0}):(Z=e._prevDateHead,Q=De.tickText(e,ue,!1,d[B].simpleLabel),te=d[B].periodX,te!==void 0&&(Q.periodX=te,(te>c||te<f)&&(te>c&&(Q.periodX=c),te<f&&(Q.periodX=f),X(Q))),d[B].skipLabel&&X(Q),v.push(Q))}return v=v.concat(h),e._inCalcTicks=!1,o&&v.length&&(v[0].noTick=!0),v};function aT(t,e){return t.rangebreaks&&(e=e.filter(function(r){return t.maskBreaks(r.x)!==qc})),e}function y3(t){var e=t._mainAxis,r=[];if(e._vals){for(var a=0;a<e._vals.length;a++)if(!e._vals[a].noTick){var i=e.l2p(e._vals[a].x),n=t.p2l(i),o=De.tickText(t,n);e._vals[a].minor&&(o.minor=!0,o.text=""),r.push(o)}}return r=aT(t,r),r}function eg(t,e){var r=it.simpleMap(t.range,t.r2l),a=hp(r),i=Math.min(a[0],a[1]),n=Math.max(a[0],a[1]),o=t.type==="category"?t.d2l_noadd:t.d2l;t.type==="log"&&String(t.dtick).charAt(0)!=="L"&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var l=[],s=0;s<=1;s++)if(!(e!==void 0&&(e&&s||e===!1&&!s))&&!(s&&!t.minor)){var f=s?t.minor.tickvals:t.tickvals,c=s?[]:t.ticktext;if(f){it.isArrayOrTypedArray(c)||(c=[]);for(var u=0;u<f.length;u++){var v=o(f[u]);if(v>i&&v<n){var h=c[u]===void 0?De.tickText(t,v):pp(t,v,String(c[u]));s&&(h.minor=!0,h.text=""),l.push(h)}}}}return l=aT(t,l),l}var Xs=[2,5,10],tg=[1,2,3,6,12],rg=[1,2,5,10,15,30],g3=[1,2,3,7,14],iT=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],nT=[-.301,0,.301,.699,1],b3=[15,30,45,90,180];function La(t,e,r){return e*it.roundUp(t/e,r)}De.autoTicks=function(t,e,r){var a;function i(u){return Math.pow(u,Math.floor(Math.log(e)/Math.LN10))}if(t.type==="date"){t.tick0=it.dateTick0(t.calendar,0);var n=2*e;if(n>rc)e/=rc,a=i(10),t.dtick="M"+12*La(e,a,Xs);else if(n>Co)e/=Co,t.dtick="M"+La(e,1,tg);else if(n>Sr){if(t.dtick=La(e,Sr,t._hasDayOfWeekBreaks?[1,2,7,14]:g3),!r){var o=De.getTickFormat(t),l=t.ticklabelmode==="period";l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=it.dateTick0(t.calendar,2):t.tick0=it.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}}else n>Qa?t.dtick=La(e,Qa,tg):n>ac?t.dtick=La(e,ac,rg):n>Xd?t.dtick=La(e,Xd,rg):(a=i(10),t.dtick=La(e,a,Xs))}else if(t.type==="log"){t.tick0=0;var s=it.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(s[1]-s[0])<1){var f=1.5*Math.abs((s[1]-s[0])/e);e=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/f,a=i(10),t.dtick="L"+La(e,a,Xs)}else t.dtick=e>.3?"D2":"D1"}else t.type==="category"||t.type==="multicategory"?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):gp(t)?(t.tick0=0,a=1,t.dtick=La(e,a,b3)):(t.tick0=0,a=i(10),t.dtick=La(e,a,Xs));if(t.dtick===0&&(t.dtick=1),!Kt(t.dtick)&&typeof t.dtick!="string"){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}};function oT(t){var e=t.dtick;if(t._tickexponent=0,!Kt(e)&&typeof e!="string"&&(e=1),(t.type==="category"||t.type==="multicategory")&&(t._tickround=null),t.type==="date"){var r=t.r2l(t.tick0),a=t.l2r(r).replace(/(^-|i)/g,""),i=a.length;if(String(e).charAt(0)==="M")i>10||a.substr(5)!=="01-01"?t._tickround="d":t._tickround=+e.substr(1)%12===0?"y":"m";else if(e>=Sr&&i<=10||e>=Sr*15)t._tickround="d";else if(e>=ac&&i<=16||e>=Qa)t._tickround="M";else if(e>=Xd&&i<=19||e>=ac)t._tickround="S";else{var n=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,n)-20,t._tickround<0&&(t._tickround=4)}}else if(Kt(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);Kt(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),f=t.minexponent===void 0?3:t.minexponent;Math.abs(s)>f&&(oc(t.exponentformat)&&!mp(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}De.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(Kt(e))return it.increment(t,i*e);var n=e.charAt(0),o=i*Number(e.substr(1));if(n==="M")return it.incrementMonth(t,o,a);if(n==="L")return Math.log(Math.pow(10,t)+o)/Math.LN10;if(n==="D"){var l=e==="D2"?nT:iT,s=t+i*.01,f=it.roundUp(it.mod(s,1),l,r);return Math.floor(s)+Math.log(Jr.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};De.tickFirst=function(t,e){var r=t.r2l||Number,a=it.simpleMap(t.range,r,void 0,void 0,e),i=a[1]<a[0],n=i?Math.floor:Math.ceil,o=hp(a)[0],l=t.dtick,s=r(t.tick0);if(Kt(l)){var f=n((o-s)/l)*l+s;return(t.type==="category"||t.type==="multicategory")&&(f=it.constrain(f,0,t._categories.length-1)),f}var c=l.charAt(0),u=Number(l.substr(1));if(c==="M"){for(var v=0,h=s,d,p,m;v<10;){if(d=De.tickIncrement(h,l,i,t.calendar),(d-o)*(h-o)<=0)return i?Math.min(h,d):Math.max(h,d);p=(o-(h+d)/2)/(d-h),m=c+(Math.abs(Math.round(p))||1)*u,h=De.tickIncrement(h,m,p<0?!i:i,t.calendar),v++}return it.error("tickFirst did not converge",t),h}else{if(c==="L")return Math.log(n((Math.pow(10,o)-s)/u)*u+s)/Math.LN10;if(c==="D"){var y=l==="D2"?nT:iT,b=it.roundUp(it.mod(o,1),y,i);return Math.floor(o)+Math.log(Jr.round(Math.pow(10,b),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};De.tickText=function(t,e,r,a){var i=pp(t,e),n=t.tickmode==="array",o=r||n,l=t.type,s=l==="category"?t.d2l_noadd:t.d2l,f;if(n&&it.isArrayOrTypedArray(t.ticktext)){var c=it.simpleMap(t.range,t.r2l),u=(Math.abs(c[1]-c[0])-(t._lBreaks||0))/1e4;for(f=0;f<t.ticktext.length&&!(Math.abs(e-s(t.tickvals[f]))<u);f++);if(f<t.ticktext.length)return i.text=String(t.ticktext[f]),i}function v(m){if(m===void 0)return!0;if(r)return m==="none";var y={first:t._tmin,last:t._tmax}[m];return m!=="all"&&e!==y}var h=r?"never":t.exponentformat!=="none"&&v(t.showexponent)?"hide":"";if(l==="date"?x3(t,i,r,o):l==="log"?_3(t,i,r,o,h):l==="category"?w3(t,i):l==="multicategory"?T3(t,i,r):gp(t)?A3(t,i,r,o,h):k3(t,i,r,o,h),a||(t.tickprefix&&!v(t.showtickprefix)&&(i.text=t.tickprefix+i.text),t.ticksuffix&&!v(t.showticksuffix)&&(i.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(i.text)){var d=t.labelalias[i.text];typeof d=="string"&&(i.text=d)}if(t.tickson==="boundaries"||t.showdividers){var p=function(m){var y=t.l2p(m);return y>=0&&y<=t._length?m:null};i.xbnd=[p(i.x-.5),p(i.x+t.dtick-.5)]}return i};De.hoverLabelText=function(t,e,r){r&&(t=it.extendFlat({},t,{hoverformat:r}));var a=it.isArrayOrTypedArray(e)?e[0]:e,i=it.isArrayOrTypedArray(e)?e[1]:void 0;if(i!==void 0&&i!==a)return De.hoverLabelText(t,a,r)+" - "+De.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=De.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":vn+o:o};function pp(t,e,r){var a=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:a.size,font:a.family,fontColor:a.color}}function x3(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||De.getTickFormat(t);a=!n&&a,a&&(Kt(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=it.formatDate(e.x,n,i,t._dateFormat,t.calendar,t._extraFormat),l,s=o.indexOf(`
|
|
4
|
-
`);if(s!==-1&&(l=o.substr(s+1),o=o.substr(0,s)),a&&(l!==void 0&&(o==="00:00:00"||o==="00:00")?(o=l,l=""):o.length===8&&(o=o.replace(/:00$/,""))),l)if(r)i==="d"?o+=", "+l:o=l+(o?", "+o:"");else if(!t._inCalcTicks||t._prevDateHead!==l)t._prevDateHead=l,o+="<br>"+l;else{var f=Wl(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function _3(t,e,r,a,i){var n=t.dtick,o=e.x,l=t.tickformat,s=typeof n=="string"&&n.charAt(0);if(i==="never"&&(i=""),a&&s!=="L"&&(n="L3",s="L"),l||s==="L")e.text=Yl(Math.pow(10,o),t,i,a);else if(Kt(n)||s==="D"&&it.mod(o+.01,1)<.1){var f=Math.round(o),c=Math.abs(f),u=t.exponentformat;u==="power"||oc(u)&&mp(f)?(f===0?e.text=1:f===1?e.text="10":e.text="10<sup>"+(f>1?"":vn)+c+"</sup>",e.fontSize*=1.25):(u==="e"||u==="E")&&c>2?e.text="1"+u+(f>0?"+":vn)+c:(e.text=Yl(Math.pow(10,o),t,"","fakehover"),n==="D1"&&t._id.charAt(0)==="y"&&(e.dy-=e.fontSize/6))}else if(s==="D")e.text=String(Math.round(Math.pow(10,it.mod(o,1)))),e.fontSize*=.75;else throw"unrecognized dtick "+String(n);if(t.dtick==="D1"){var v=String(e.text).charAt(0);(v==="0"||v==="1")&&(t._id.charAt(0)==="y"?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function w3(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function T3(t,e,r){var a=Math.round(e.x),i=t._categories[a]||[],n=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?e.text=o+" - "+n:(e.text=n,e.text2=o)}function k3(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=Yl(e.x,t,i,a)}function A3(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=M3(n);if(o[1]>=100)e.text=Yl(it.deg2rad(e.x),t,i,a);else{var l=e.x<0;o[1]===1?o[0]===1?e.text="π":e.text=o[0]+"π":e.text=["<sup>",o[0],"</sup>","⁄","<sub>",o[1],"</sub>","π"].join(""),l&&(e.text=vn+e.text)}}}else e.text=Yl(e.x,t,i,a)}function M3(t){function e(l,s){return Math.abs(l-s)<=1e-6}function r(l,s){return e(s,0)?l:r(s,l%s)}function a(l){for(var s=1;!e(Math.round(l*s)/s,l);)s*=10;return s}var i=a(t),n=t*i,o=Math.abs(r(n,i));return[Math.round(n/o),Math.round(i/o)]}var S3=["f","p","n","μ","m","","k","M","G","T"];function oc(t){return t==="SI"||t==="B"}function mp(t){return t>14||t<-15}function Yl(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=De.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:Kt(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};oT(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,vn);var u=Math.pow(10,-n)/2;if(o==="none"&&(l=0),t=Math.abs(t),t<u)t="0",i=!1;else{if(t+=u,l&&(t*=Math.pow(10,-l),n+=l),n===0)t=String(Math.floor(t));else if(n<0){t=String(Math.round(t)),t=t.substr(0,t.length+n);for(var v=n;v<0;v++)t+="0"}else{t=String(t);var h=t.indexOf(".")+1;h&&(t=t.substr(0,h+n).replace(/\.?0+$/,""))}t=it.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){oc(o)&&mp(l)&&(o="power");var d;l<0?d=vn+-l:o!=="power"?d="+"+l:d=String(l),o==="e"||o==="E"?t+=o+d:o==="power"?t+="×10<sup>"+d+"</sup>":o==="B"&&l===9?t+="B":oc(o)&&(t+=S3[l/3+5])}return i?vn+t:t}De.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*Co}function a(s,f){var c=["L","D"];if(typeof s==typeof f){if(typeof s=="number")return s-f;var u=c.indexOf(s.charAt(0)),v=c.indexOf(f.charAt(0));return u===v?Number(s.replace(/(L|D)/g,""))-Number(f.replace(/(L|D)/g,"")):u-v}else return typeof s=="number"?1:-1}function i(s,f,c){var u=c||function(d){return d},v=f[0],h=f[1];return(!v&&typeof v!="number"||u(v)<=u(s))&&(!h&&typeof h!="number"||u(h)>=u(s))}function n(s,f){var c=f[0]===null,u=f[1]===null,v=a(s,f[0])>=0,h=a(s,f[1])<=0;return(c||v)&&(u||h)}var o,l;if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&i(t.dtick,l.dtickrange,r)){o=l;break}break}case"log":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&n(t.dtick,l.dtickrange)){o=l;break}break}}return o?o.value:t.tickformat};De.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?De.findSubplotsWithAxis(a,e):a;return i.sort(function(n,o){var l=n.substr(1).split("y"),s=o.substr(1).split("y");return l[0]===s[0]?+l[1]-+s[1]:+l[0]-+s[0]}),i};De.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(e._id.charAt(0)==="x"?"^"+e._id+"y":e._id+"$"),a=[],i=0;i<t.length;i++){var n=t[i];r.test(n)&&a.push(n)}return a};De.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r={_offset:0,_length:e.width,_id:""},a={_offset:0,_length:e.height,_id:""},i=De.list(t,"x",!0),n=De.list(t,"y",!0),o=[],l,s;for(l=0;l<i.length;l++)for(o.push({x:i[l],y:a}),s=0;s<n.length;s++)l===0&&o.push({x:r,y:n[s]}),o.push({x:i[l],y:n[s]});var f=e._clips.selectAll(".axesclip").data(o,function(c){return c.x._id+c.y._id});f.enter().append("clipPath").classed("axesclip",!0).attr("id",function(c){return"clip"+e._uid+c.x._id+c.y._id}).append("rect"),f.exit().remove(),f.each(function(c){Jr.select(this).select("rect").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};De.draw=function(t,e,r){var a=t._fullLayout;e==="redraw"&&a._paper.selectAll("g.subplot").each(function(s){var f=s[0],c=a._plots[f];if(c){var u=c.xaxis,v=c.yaxis;c.xaxislayer.selectAll("."+u._id+"tick").remove(),c.yaxislayer.selectAll("."+v._id+"tick").remove(),c.xaxislayer.selectAll("."+u._id+"tick2").remove(),c.yaxislayer.selectAll("."+v._id+"tick2").remove(),c.xaxislayer.selectAll("."+u._id+"divider").remove(),c.yaxislayer.selectAll("."+v._id+"divider").remove(),c.minorGridlayer&&c.minorGridlayer.selectAll("path").remove(),c.gridlayer&&c.gridlayer.selectAll("path").remove(),c.zerolinelayer&&c.zerolinelayer.selectAll("path").remove(),a._infolayer.select(".g-"+u._id+"title").remove(),a._infolayer.select(".g-"+v._id+"title").remove()}});var i=!e||e==="redraw"?De.listIds(t):e,n=De.list(t),o=n.filter(function(s){return s.autoshift}).map(function(s){return s.overlaying});i.map(function(s){var f=De.getFromId(t,s);if(f.tickmode==="sync"&&f.overlaying){var c=i.findIndex(function(u){return u===f.overlaying});c>=0&&i.unshift(i.splice(c,1).shift())}});var l={false:{left:0,right:0}};return it.syncOrAsync(i.map(function(s){return function(){if(s){var f=De.getFromId(t,s);r||(r={}),r.axShifts=l,r.overlayingShiftedAx=o;var c=De.drawOne(t,f,r);return f._shiftPusher&&Jd(f,f._fullDepth||0,l,!0),f._r=f.range.slice(),f._rl=it.simpleMap(f._r,f.r2l),c}}}))};De.drawOne=function(t,e,r){r=r||{};var a=r.axShifts||{},i=r.overlayingShiftedAx||[],n,o,l;e.setScale();var s=t._fullLayout,f=e._id,c=f.charAt(0),u=De.counterLetter(f),v=s._plots[e._mainSubplot];if(!v)return;if(e._shiftPusher=e.autoshift||i.indexOf(e._id)!==-1||i.indexOf(e.overlaying)!==-1,e._shiftPusher&e.anchor==="free"){var h=e.linewidth/2||0;e.ticks==="inside"&&(h+=e.ticklen),Jd(e,h,a,!0),Jd(e,e.shift||0,a,!1)}(r.skipTitle!==!0||e._shift===void 0)&&(e._shift=O3(e,a));var d=v[c+"axislayer"],p=e._mainLinePosition,m=p+=e._shift,y=e._mainMirrorPosition,b=e._vals=De.calcTicks(e),w=[e.mirror,m,y].join("_");for(n=0;n<b.length;n++)b[n].axInfo=w;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var g={};function x(Te){var Le=f+(Te||"tick");return g[Le]||(g[Le]=P3(e,Le)),g[Le]}if(e.visible){var _=De.makeTransTickFn(e),k=De.makeTransTickLabelFn(e),T,S,D=e.ticks==="inside",L=e.ticks==="outside";if(e.tickson==="boundaries"){var R=L3(e,b);S=De.clipEnds(e,R),T=D?S:R}else S=De.clipEnds(e,b),T=D&&e.ticklabelmode!=="period"?S:b;var z=e._gridVals=S,N=D3(e,b);if(!s._hasOnlyLargeSploms){var H=e._subplotsWith,$={};for(n=0;n<H.length;n++){o=H[n],l=s._plots[o];var P=l[u+"axis"],A=P._mainAxis._id;if(!$[A]){$[A]=1;var M=c==="x"?"M0,"+P._offset+"v"+P._length:"M"+P._offset+",0h"+P._length;De.drawGrid(t,e,{vals:z,counterAxis:P,layer:l.gridlayer.select("."+f),minorLayer:l.minorGridlayer.select("."+f),path:M,transFn:_}),De.drawZeroLine(t,e,{counterAxis:P,layer:l.zerolinelayer,path:M,transFn:_})}}}var C,E=De.getTickSigns(e),F=De.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var j=De.makeTickPath(e,m,E[2]),B=De.makeTickPath(e,m,F[2],{minor:!0}),G,O,W,V;if(e._anchorAxis&&e.mirror&&e.mirror!==!0?(G=De.makeTickPath(e,y,E[3]),O=De.makeTickPath(e,y,F[3],{minor:!0}),W=j+G,V=B+O):(G="",O="",W=j,V=B),e.showdividers&&L&&e.tickson==="boundaries"){var Z={};for(n=0;n<N.length;n++)Z[N[n].x]=1;C=function(Te){return Z[Te.x]?G:W}}else C=function(Te){return Te.minor?V:W}}if(De.drawTicks(t,e,{vals:T,layer:d,path:C,transFn:_}),e.mirror==="allticks"){var X=Object.keys(e._linepositions||{});for(n=0;n<X.length;n++){o=X[n],l=s._plots[o];var Q=e._linepositions[o]||[],te=Q[0],xe=Q[1],ue=Q[2],ae=De.makeTickPath(e,te,ue?E[0]:F[0],{minor:ue})+De.makeTickPath(e,xe,ue?E[1]:F[1],{minor:ue});De.drawTicks(t,e,{vals:T,layer:l[c+"axislayer"],path:ae,transFn:_})}}var le=[];if(le.push(function(){return De.drawLabels(t,e,{vals:b,layer:d,plotinfo:l,transFn:k,labelFns:De.makeLabelFns(e,m)})}),e.type==="multicategory"){var de={x:2,y:10}[c];le.push(function(){var Te={x:"height",y:"width"}[c],Le=x()[Te]+de+(e._tickAngles[f+"tick"]?e.tickfont.size*ic:0);return De.drawLabels(t,e,{vals:C3(e,b),layer:d,cls:f+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:_,labelFns:De.makeLabelFns(e,m+Le*E[4])})}),le.push(function(){return e._depth=E[4]*(x("tick2")[e.side]-m),R3(t,e,{vals:N,layer:d,path:De.makeTickPath(e,m,E[4],{len:e._depth}),transFn:_})})}else e.title.hasOwnProperty("standoff")&&le.push(function(){e._depth=E[4]*(x()[e.side]-m)});var be=Vl.getComponentMethod("rangeslider","isVisible")(e);return!r.skipTitle&&!(be&&e.side==="bottom")&&le.push(function(){return z3(t,e)}),le.push(function(){var Te=e.side.charAt(0),Le=l3[e.side].charAt(0),_e=De.getPxPosition(t,e),Ie=L?e.ticklen:0,ce,ye,Ee,ze;(e.automargin||be||e._shiftPusher)&&(e.type==="multicategory"?ce=x("tick2"):(ce=x(),c==="x"&&Te==="b"&&(e._depth=Math.max(ce.width>0?ce.bottom-_e:0,Ie))));var K=0,ke=0;if(e._shiftPusher&&(K=Math.max(Ie,ce.height>0?Te==="l"?_e-ce.left:ce.right-_e:0),e.title.text!==s._dfltTitle[c]&&(ke=(e._titleStandoff||0)+(e._titleScoot||0),Te==="l"&&(ke+=Kd(e))),e._fullDepth=Math.max(K,ke)),e.automargin){ye={x:0,y:0,r:0,l:0,t:0,b:0};var re=[0,1],pe=typeof e._shift=="number"?e._shift:0;if(c==="x"){if(Te==="b"?ye[Te]=e._depth:(ye[Te]=e._depth=Math.max(ce.width>0?_e-ce.top:0,Ie),re.reverse()),ce.width>0){var we=ce.right-(e._offset+e._length);we>0&&(ye.xr=1,ye.r=we);var se=e._offset-ce.left;se>0&&(ye.xl=0,ye.l=se)}}else if(Te==="l"?(e._depth=Math.max(ce.height>0?_e-ce.left:0,Ie),ye[Te]=e._depth-pe):(e._depth=Math.max(ce.height>0?ce.right-_e:0,Ie),ye[Te]=e._depth+pe,re.reverse()),ce.height>0){var ie=ce.bottom-(e._offset+e._length);ie>0&&(ye.yb=0,ye.b=ie);var fe=e._offset-ce.top;fe>0&&(ye.yt=1,ye.t=fe)}ye[u]=e.anchor==="free"?e.position:e._anchorAxis.domain[re[0]],e.title.text!==s._dfltTitle[c]&&(ye[Te]+=Kd(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(Ee={x:0,y:0,r:0,l:0,t:0,b:0},Ee[Le]=e.linewidth,e.mirror&&e.mirror!==!0&&(Ee[Le]+=Ie),e.mirror===!0||e.mirror==="ticks"?Ee[u]=e._anchorAxis.domain[re[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(Ee[u]=[e._counterDomainMin,e._counterDomainMax][re[1]]))}be&&(ze=Vl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),typeof e.automargin=="string"&&(ag(ye,e.automargin),ag(Ee,e.automargin)),wo.autoMargin(t,yp(e),ye),wo.autoMargin(t,sT(e),Ee),wo.autoMargin(t,fT(e),ze)}),it.syncOrAsync(le)}};function ag(t,e){if(t){var r=Object.keys(Zy).reduce(function(a,i){return e.indexOf(i)!==-1&&Zy[i].forEach(function(n){a[n]=1}),a},{});Object.keys(t).forEach(function(a){r[a]||(a.length===1?t[a]=0:delete t[a])})}}function L3(t,e){var r=[],a,i=function(n,o){var l=n.xbnd?n.xbnd[o]:n.x;l!==null&&r.push(it.extendFlat({},n,{x:l}))};if(e.length){for(a=0;a<e.length;a++)i(e[a],0);i(e[a-1],1)}return r}function C3(t,e){for(var r=[],a={},i=0;i<e.length;i++){var n=e[i];a[n.text2]?a[n.text2].push(n.x):a[n.text2]=[n.x]}for(var o in a)r.push(pp(t,it.interp(a[o],.5),o));return r}function D3(t,e){var r=[],a,i,n=e.length&&e[e.length-1].x<e[0].x,o=function(s,f){var c=s.xbnd[f];c!==null&&r.push(it.extendFlat({},s,{x:c}))};if(t.showdividers&&e.length){for(a=0;a<e.length;a++){var l=e[a];l.text2!==i&&o(l,n?1:0),i=l.text2}o(e[a-1],n?0:1)}return r}function P3(t,e){var r,a,i,n;return t._selections[e].size()?(r=1/0,a=-1/0,i=1/0,n=-1/0,t._selections[e].each(function(){var o=Qd(this),l=Or.bBox(o.node().parentNode);r=Math.min(r,l.top),a=Math.max(a,l.bottom),i=Math.min(i,l.left),n=Math.max(n,l.right)})):(r=0,a=0,i=0,n=0),{top:r,bottom:a,left:i,right:n,height:a-r,width:n-i}}De.getTickSigns=function(t,e){var r=t._id.charAt(0),a={x:"top",y:"right"}[r],i=t.side===a?1:-1,n=[-1,1,i,-i],o=e?(t.minor||{}).ticks:t.ticks;return o!=="inside"==(r==="x")&&(n=n.map(function(l){return-l})),t.side&&n.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),n};De.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return Lo(t._offset+t.l2p(e.x),0)}:function(e){return Lo(0,t._offset+t.l2p(e.x))}};De.makeTransTickLabelFn=function(t){var e=E3(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return Lo(r+t._offset+t.l2p(Zd(i)),a)}:function(i){return Lo(a,r+t._offset+t.l2p(Zd(i)))}};function Zd(t){return t.periodX!==void 0?t.periodX:t.x}function E3(t){var e=t.ticklabelposition||"",r=function(h){return e.indexOf(h)!==-1},a=r("top"),i=r("left"),n=r("right"),o=r("bottom"),l=r("inside"),s=o||i||a||n;if(!s&&!l)return[0,0];var f=t.side,c=s?(t.tickwidth||0)/2:0,u=nc,v=t.tickfont?t.tickfont.size:12;return(o||a)&&(c+=v*dn,u+=(t.linewidth||0)/2),(i||n)&&(c+=(t.linewidth||0)/2,u+=nc),l&&f==="top"&&(u-=v*(1-dn)),(i||a)&&(c=-c),(f==="bottom"||f==="right")&&(u=-u),[s?c:0,l?u:0]}De.makeTickPath=function(t,e,r,a){a||(a={});var i=a.minor;if(i&&!t.minor)return"";var n=a.len!==void 0?a.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),l=(t.linewidth||1)/2;return o==="x"?"M0,"+(e+l*r)+"v"+n*r:"M"+(e+l*r)+",0h"+n*r};De.makeLabelFns=function(t,e,r){var a=t.ticklabelposition||"",i=function(R){return a.indexOf(R)!==-1},n=i("top"),o=i("left"),l=i("right"),s=i("bottom"),f=s||o||n||l,c=i("inside"),u=a==="inside"&&t.ticks==="inside"||!c&&t.ticks==="outside"&&t.tickson!=="boundaries",v=0,h=0,d=u?t.ticklen:0;if(c?d*=-1:f&&(d=0),u&&(v+=d,r)){var p=it.deg2rad(r);v=d*Math.cos(p)+1,h=d*Math.sin(p)}t.showticklabels&&(u||t.showline)&&(v+=.2*t.tickfont.size),v+=(t.linewidth||1)/2*(c?-1:1);var m={labelStandoff:v,labelShift:h},y,b,w,g,x=0,_=t.side,k=t._id.charAt(0),T=t.tickangle,S;if(k==="x")S=!c&&_==="bottom"||c&&_==="top",g=S?1:-1,c&&(g*=-1),y=h*g,b=e+v*g,w=S?1:-.2,Math.abs(T)===90&&(c?w+=Vs:T===-90&&_==="bottom"?w=dn:T===90&&_==="top"?w=Vs:w=.5,x=Vs/2*(T/90)),m.xFn=function(R){return R.dx+y+x*R.fontSize},m.yFn=function(R){return R.dy+b+R.fontSize*w},m.anchorFn=function(R,z){if(f){if(o)return"end";if(l)return"start"}return!Kt(z)||z===0||z===180?"middle":z*g<0!==c?"end":"start"},m.heightFn=function(R,z,N){return z<-60||z>60?-.5*N:t.side==="top"!==c?-N:0};else if(k==="y"){if(S=!c&&_==="left"||c&&_==="right",g=S?1:-1,c&&(g*=-1),y=v,b=h*g,w=0,!c&&Math.abs(T)===90&&(T===-90&&_==="left"||T===90&&_==="right"?w=dn:w=.5),c){var D=Kt(T)?+T:0;if(D!==0){var L=it.deg2rad(D);x=Math.abs(Math.sin(L))*dn*g,w=0}}m.xFn=function(R){return R.dx+e-(y+R.fontSize*w)*g+x*R.fontSize},m.yFn=function(R){return R.dy+b+R.fontSize*Vs},m.anchorFn=function(R,z){return Kt(z)&&Math.abs(z)===90?"middle":S?"end":"start"},m.heightFn=function(R,z,N){return t.side==="right"&&(z*=-1),z<-30?-N:z<30?-.5*N:0}}return m};function Kc(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}De.drawTicks=function(t,e,r){r=r||{};var a=e._id+"tick",i=[].concat(e.minor&&e.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(e.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),n=r.layer.selectAll("path."+a).data(i,Kc);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return Xl.stroke(Jr.select(this),o.minor?e.minor.tickcolor:e.tickcolor)}).style("stroke-width",function(o){return Or.crispRound(t,o.minor?e.minor.tickwidth:e.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Qc(e,[tT]),n.attr("transform",r.transFn)};De.drawGrid=function(t,e,r){if(r=r||{},e.tickmode!=="sync"){var a=e._id+"grid",i=e.minor&&e.minor.showgrid,n=i?r.vals.filter(function(y){return y.minor}):[],o=e.showgrid?r.vals.filter(function(y){return!y.minor}):[],l=r.counterAxis;if(l&&De.shouldShowZeroLine(t,e,l))for(var s=e.tickmode==="array",f=0;f<o.length;f++){var c=o[f].x;if(s?!c:Math.abs(c)<e.dtick/100)if(o=o.slice(0,f).concat(o.slice(f+1)),s)f--;else break}e._gw=Or.crispRound(t,e.gridwidth,1);for(var u=i?Or.crispRound(t,e.minor.gridwidth,1):0,v=r.layer,h=r.minorLayer,d=1;d>=0;d--){var p=d?v:h;if(p){var m=p.selectAll("path."+a).data(d?o:n,Kc);m.exit().remove(),m.enter().append("path").classed(a,1).classed("crisp",r.crisp!==!1),m.attr("transform",r.transFn).attr("d",r.path).each(function(y){return Xl.stroke(Jr.select(this),y.minor?e.minor.gridcolor:e.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return Or.dashStyle(y.minor?e.minor.griddash:e.griddash,y.minor?e.minor.gridwidth:e.gridwidth)}).style("stroke-width",function(y){return(y.minor?u:e._gw)+"px"}).style("display",null),typeof r.path=="function"&&m.attr("d",r.path)}}Qc(e,[Wd,qd])}};De.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=De.shouldShowZeroLine(t,e,r.counterAxis),n=r.layer.selectAll("path."+a).data(i?[{x:0,id:e._id}]:[]);n.exit().remove(),n.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,l){return f3(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(Xl.stroke,e.zerolinecolor||Xl.defaultLine).style("stroke-width",Or.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Qc(e,[Yd])};De.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=r.cls||i+"tick",o=r.vals.filter(function(A){return A.text}),l=r.labelFns,s=r.secondary?0:e.tickangle,f=(e._prevTickAngles||{})[n],c=r.layer.selectAll("g."+n).data(e.showticklabels?o:[],Kc),u=[];c.enter().append("g").classed(n,1).append("text").attr("text-anchor","middle").each(function(A){var M=Jr.select(this),C=t._promises.length;M.call(oo.positionText,l.xFn(A),l.yFn(A)).call(Or.font,A.font,A.fontSize,A.fontColor).text(A.text).call(oo.convertToTspans,t),t._promises[C]?u.push(t._promises.pop().then(function(){v(M,s)})):v(M,s)}),Qc(e,[qy]),c.exit().remove(),r.repositionOnUpdate&&c.each(function(A){Jr.select(this).select("text").call(oo.positionText,l.xFn(A),l.yFn(A))});function v(A,M){A.each(function(C){var E=Jr.select(this),F=E.select(".text-math-group"),j=l.anchorFn(C,M),B=r.transFn.call(E.node(),C)+(Kt(M)&&+M!=0?" rotate("+M+","+l.xFn(C)+","+(l.yFn(C)-C.fontSize/2)+")":""),G=oo.lineCount(E),O=ic*C.fontSize,W=l.heightFn(C,Kt(M)?+M:0,(G-1)*O);if(W&&(B+=Lo(0,W)),F.empty()){var V=E.select("text");V.attr({transform:B,"text-anchor":j}),V.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var Z=Or.bBox(F.node()).width,X=Z*{end:-.5,start:.5}[j];F.attr("transform",B+Lo(X,0))}})}e._adjustTickLabelsOverflow=function(){var A=e.ticklabeloverflow;if(!(!A||A==="allow")){var M=A.indexOf("hide")!==-1,C=e._id.charAt(0)==="x",E=0,F=C?t._fullLayout.width:t._fullLayout.height;if(A.indexOf("domain")!==-1){var j=it.simpleMap(e.range,e.r2l);E=e.l2p(j[0])+e._offset,F=e.l2p(j[1])+e._offset}var B=Math.min(E,F),G=Math.max(E,F),O=e.side,W=1/0,V=-1/0;c.each(function(te){var xe=Jr.select(this),ue=xe.select(".text-math-group");if(ue.empty()){var ae=Or.bBox(xe.node()),le=0;C?(ae.right>G||ae.left<B)&&(le=1):(ae.bottom>G||ae.top+(e.tickangle?0:te.fontSize/4)<B)&&(le=1);var de=xe.select("text");le?M&&de.style("opacity",0):(de.style("opacity",1),O==="bottom"||O==="right"?W=Math.min(W,C?ae.top:ae.left):W=-1/0,O==="top"||O==="left"?V=Math.max(V,C?ae.bottom:ae.right):V=1/0)}});for(var Z in a._plots){var X=a._plots[Z];if(!(e._id!==X.xaxis._id&&e._id!==X.yaxis._id)){var Q=C?X.yaxis:X.xaxis;Q&&(Q["_visibleLabelMin_"+e._id]=W,Q["_visibleLabelMax_"+e._id]=V)}}}},e._hideCounterAxisInsideTickLabels=function(A){var M=e._id.charAt(0)==="x",C=[];for(var E in a._plots){var F=a._plots[E];e._id!==F.xaxis._id&&e._id!==F.yaxis._id||C.push(M?F.yaxis:F.xaxis)}C.forEach(function(j,B){j&&Wl(j)&&(A||[Yd,qd,Wd,tT,qy]).forEach(function(G){var O=G.K==="tick"&&G.L==="text"&&e.ticklabelmode==="period",W=a._plots[e._mainSubplot],V;G.K===Yd.K?V=W.zerolinelayer.selectAll("."+e._id+"zl"):G.K===qd.K?V=W.minorGridlayer.selectAll("."+e._id):G.K===Wd.K?V=W.gridlayer.selectAll("."+e._id):V=W[e._id.charAt(0)+"axislayer"],V.each(function(){var Z=Jr.select(this);G.L&&(Z=Z.selectAll(G.L)),Z.each(function(X){var Q=e.l2p(O?Zd(X):X.x)+e._offset,te=Jr.select(this);Q<e["_visibleLabelMax_"+j._id]&&Q>e["_visibleLabelMin_"+j._id]?te.style("display","none"):G.K==="tick"&&!B&&te.style("display",null)})})})})},v(c,f+1?f:s);function h(){return u.length&&Promise.all(u)}var d=null;function p(){if(v(c,s),o.length&&e.autotickangles&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){d=e.autotickangles[0];var A=0,M=[],C,E=1;if(c.each(function(Ie){A=Math.max(A,Ie.fontSize);var ce=e.l2p(Ie.x),ye=Qd(this),Ee=Or.bBox(ye.node());E=Math.max(E,oo.lineCount(ye)),M.push({top:0,bottom:10,height:10,left:ce-Ee.width/2,right:ce+Ee.width/2+2,width:Ee.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var F=2;for(e.ticks&&(F+=e.tickwidth/2),C=0;C<M.length;C++){var j=o&&o[C].xbnd?o[C].xbnd:[null,null],B=M[C];if(j[0]!==null&&B.left-e.l2p(j[0])<F||j[1]!==null&&e.l2p(j[1])-B.right<F){d=90;break}}}else{var G=o.length,O=Math.abs((o[G-1].x-o[0].x)*e._m)/(G-1),W=e.ticklabelposition||"",V=function(Ie){return W.indexOf(Ie)!==-1},Z=V("top"),X=V("left"),Q=V("right"),te=V("bottom"),xe=te||X||Z||Q,ue=xe?(e.tickwidth||0)+2*nc:0,ae=O,le=A*1.25*E,de=Math.sqrt(Math.pow(ae,2)+Math.pow(le,2)),be=ae/de,Te=e.autotickangles.map(function(Ie){return Ie*Math.PI/180}),Le=Te.find(function(Ie){return Math.abs(Math.cos(Ie))<=be});Le===void 0&&(Le=Te.reduce(function(Ie,ce){return Math.abs(Math.cos(Ie))<Math.abs(Math.cos(ce))?Ie:ce},Te[0]));var _e=Le*(180/Math.PI);for(C=0;C<M.length-1;C++)if(it.bBoxIntersect(M[C],M[C+1],ue)){d=_e;break}}d&&v(c,d)}}e._selections&&(e._selections[n]=c);var m=[h];e.automargin&&a._redrawFromAutoMarginCount&&f===90?(d=f,m.push(function(){v(c,f)})):m.push(p),e._tickAngles&&m.push(function(){e._tickAngles[n]=d===null?Kt(s)?s:0:d});var y=function(){var A=0,M=0;return c.each(function(C,E){var F=Qd(this),j=F.select(".text-math-group");if(j.empty()){var B;e._vals[E]&&(B=e._vals[E].bb||Or.bBox(F.node()),e._vals[E].bb=B),A=Math.max(A,B.width),M=Math.max(M,B.height)}}),{labelsMaxW:A,labelsMaxH:M}},b=e._anchorAxis;if(b&&(b.autorange||b.insiderange)&&Wl(e)&&!c3(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),b.autorange&&(a._insideTickLabelsUpdaterange[b._name+".autorange"]=b.autorange,m.push(y)),b.insiderange)){var w=y(),g=e._id.charAt(0)==="y"?w.labelsMaxW:w.labelsMaxH;g+=2*nc,e.ticklabelposition==="inside"&&(g+=e.ticklen||0);var x=e.side==="right"||e.side==="top"?1:-1,_=x===1?1:0,k=x===1?0:1,T=[];T[k]=b.range[k];var S=b.range,D=b.d2p(S[_]),L=b.d2p(S[k]),R=a._insideTickLabelsUpdaterange[b._name+".range"];if(R){var z=b.d2p(R[_]),N=b.d2p(R[k]),H=x*(e._id.charAt(0)==="y"?1:-1);H*D<H*z&&(D=z,T[_]=S[_]=R[_]),H*L>H*N&&(L=N,T[k]=S[k]=R[k])}var $=Math.abs(L-D);$-g>0?($-=g,g*=1+g/$):g=0,e._id.charAt(0)!=="y"&&(g=-g),T[_]=b.p2d(b.d2p(S[_])+x*g),b.autorange==="min"||b.autorange==="max reversed"?(T[0]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0):(b.autorange==="max"||b.autorange==="min reversed")&&(T[1]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[b._name+".range"]=T}var P=it.syncOrAsync(m);return P&&P.then&&t._promises.push(P),P};function R3(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,Kc);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(Xl.stroke,e.dividercolor).style("stroke-width",Or.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}De.getPxPosition=function(t,e){var r=t._fullLayout._size,a=e._id.charAt(0),i=e.side,n;if(e.anchor!=="free"?n=e._anchorAxis:a==="x"?n={_offset:r.t+(1-(e.position||0))*r.h,_length:0}:a==="y"&&(n={_offset:r.l+(e.position||0)*r.w+e._shift,_length:0}),i==="top"||i==="left")return n._offset;if(i==="bottom"||i==="right")return n._offset+n._length};function Kd(t){var e=t.title.font.size,r=(t.title.text.match(oo.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(dn+r*ic):e*dn:r?e*(r+1)*ic:e}function z3(t,e){var r=t._fullLayout,a=e._id,i=a.charAt(0),n=e.title.font.size,o;if(e.title.hasOwnProperty("standoff"))o=e._depth+e.title.standoff+Kd(e);else{var l=Wl(e);if(e.type==="multicategory")o=e._depth;else{var s=1.5*n;l&&(s=.5*n,e.ticks==="outside"&&(s+=e.ticklen)),o=10+s+(e.linewidth?e.linewidth-1:0)}l||(i==="x"?o+=e.side==="top"?n*(e.showticklabels?1:0):n*(e.showticklabels?1.5:.5):o+=e.side==="right"?n*(e.showticklabels?1:.5):n*(e.showticklabels?.5:0))}var f=De.getPxPosition(t,e),c,u,v;i==="x"?(u=e._offset+e._length/2,v=e.side==="top"?f-o:f+o):(v=e._offset+e._length/2,u=e.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var h;if(e.type!=="multicategory"){var d=e._selections[e._id+"tick"];if(h={selection:d,side:e.side},d&&d.node()&&d.node().parentNode){var p=Or.getTranslate(d.node().parentNode);h.offsetLeft=p.x,h.offsetTop=p.y}e.title.hasOwnProperty("standoff")&&(h.pad=0)}return e._titleStandoff=o,r3.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:h,transform:c,attributes:{x:u,y:v,"text-anchor":"middle"}})}De.shouldShowZeroLine=function(t,e,r){var a=it.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===qc)&&(lT(e,0)||!I3(t,e,r,a)||F3(t,e))};De.clipEnds=function(t,e){return e.filter(function(r){return lT(t,r.x)})};function lT(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function I3(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=De.counterLetter(e._id),s=e._offset+(Math.abs(a[0])<Math.abs(a[1])==(o==="x")?0:e._length);function f(d){if(!d.showline||!d.linewidth)return!1;var p=Math.max((d.linewidth+e.zerolinewidth)/2,1);function m(w){return typeof w=="number"&&Math.abs(w-s)<p}if(m(d._mainLinePosition)||m(d._mainMirrorPosition))return!0;var y=d._linepositions||{};for(var b in y)if(m(y[b][0])||m(y[b][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var u=De.list(t,l),v=0;v<u.length;v++){var h=u[v];if(h._mainAxis===i&&f(h))return!0}}function F3(t,e){for(var r=t._fullData,a=e._mainSubplot,i=e._id.charAt(0),n=0;n<r.length;n++){var o=r[n];if(o.visible===!0&&o.xaxis+o.yaxis===a&&(Vl.traceIs(o,"bar-like")&&o.orientation==={x:"h",y:"v"}[i]||o.fill&&o.fill.charAt(o.fill.length-1)===i))return!0}return!1}function Qd(t){var e=Jr.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}De.allowAutoMargin=function(t){for(var e=De.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(wo.allowAutoMargin(t,yp(a)),a.mirror&&wo.allowAutoMargin(t,sT(a))),Vl.getComponentMethod("rangeslider","isVisible")(a)&&wo.allowAutoMargin(t,fT(a))}};function yp(t){return t._id+".automargin"}function sT(t){return yp(t)+".mirror"}function fT(t){return t._id+".rangeslider"}De.swap=function(t,e){for(var r=$3(t,e),a=0;a<r.length;a++)N3(t,r[a].x,r[a].y)};function $3(t,e){var r=[],a,i;for(a=0;a<e.length;a++){var n=[],o=t._fullData[e[a]].xaxis,l=t._fullData[e[a]].yaxis;if(!(!o||!l)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(l)!==-1)&&n.push(i);if(!n.length){r.push({x:[o],y:[l]});continue}var s=r[n[0]],f;if(n.length>1)for(i=1;i<n.length;i++)f=r[n[i]],Ys(s.x,f.x),Ys(s.y,f.y);Ys(s.x,[o]),Ys(s.y,[l])}}return r}function Ys(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function N3(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(De.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(De.getFromId(t,r[o]));var s=Object.keys(a3),f=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<s.length;o++){var u=s[o],v=a[0][u],h=i[0][u],d=!0,p=!1,m=!1;if(!(u.charAt(0)==="_"||typeof v=="function"||f.indexOf(u)!==-1)){for(l=1;l<a.length&&d;l++){var y=a[l][u];u==="type"&&c.indexOf(v)!==-1&&c.indexOf(y)!==-1&&v!==y?p=!0:y!==v&&(d=!1)}for(l=1;l<i.length&&d;l++){var b=i[l][u];u==="type"&&c.indexOf(h)!==-1&&c.indexOf(b)!==-1&&h!==b?m=!0:i[l][u]!==h&&(d=!1)}d&&(p&&(n[a[0]._name].type="linear"),m&&(n[i[0]._name].type="linear"),H3(n,u,a,i,t._fullLayout._dfltTitle))}}for(o=0;o<t._fullLayout.annotations.length;o++){var w=t._fullLayout.annotations[o];e.indexOf(w.xref)!==-1&&r.indexOf(w.yref)!==-1&&it.swapAttrs(n.annotations[o],["?"])}}function H3(t,e,r,a,i){var n=it.nestedProperty,o=n(t[r[0]._name],e).get(),l=n(t[a[0]._name],e).get(),s;for(e==="title"&&(o&&o.text===i.x&&(o.text=i.y),l&&l.text===i.y&&(l.text=i.x)),s=0;s<r.length;s++)n(t,r[s]._name+"."+e).set(l);for(s=0;s<a.length;s++)n(t,a[s]._name+"."+e).set(o)}function gp(t){return t._id==="angularaxis"}function Wu(t,e){for(var r=e._rangebreaks.length,a=0;a<r;a++){var i=e._rangebreaks[a];if(t>=i.min&&t<i.max)return i.max}return t}function Wl(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function Qc(t,e){Wl(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function Jd(t,e,r,a){var i=t.anchor!=="free"&&(t.overlaying===void 0||t.overlaying===!1)?t._id:t.overlaying,n;a?n=t.side==="right"?e:-e:n=e,i in r||(r[i]={}),t.side in r[i]||(r[i][t.side]=0),r[i][t.side]+=n}function O3(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}var Dt=mw.exports,j3=function(e,r,a){var i,n;if(a){var o=r==="reversed"||r==="min reversed"||r==="max reversed";i=a[o?1:0],n=a[o?0:1]}var l=e("autorangeoptions.minallowed",n===null?i:void 0),s=e("autorangeoptions.maxallowed",i===null?n:void 0);l===void 0&&e("autorangeoptions.clipmin"),s===void 0&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")},B3=j3,cT=function(e,r,a,i){var n=r._template||{},o=r.type||n.type||"-";a("minallowed"),a("maxallowed");var l=a("range");if(!l){var s;!i.noInsiderange&&o!=="log"&&(s=a("insiderange"),s&&(s[0]===null||s[1]===null)&&(r.insiderange=!1,s=void 0),s&&(l=a("range",s)))}var f=r.getAutorangeDflt(l,i),c=a("autorange",f),u;l&&(l[0]===null&&l[1]===null||(l[0]===null||l[1]===null)&&(c==="reversed"||c===!0)||l[0]!==null&&(c==="min"||c==="max reversed")||l[1]!==null&&(c==="max"||c==="min reversed"))&&(l=void 0,delete r.range,r.autorange=!0,u=!0),u||(f=r.getAutorangeDflt(l,i),c=a("autorange",f)),c&&(B3(a,c,l),(o==="linear"||o==="-")&&a("rangemode")),r.cleanRange()},bp={},uT={exports:{}},G3=function(e,r,a,i,n){var o=(e-a)/(i-a),l=o+r/(i-a),s=(o+l)/2;return n==="left"||n==="bottom"?o:n==="center"||n==="middle"?s:n==="right"||n==="top"?l:o<2/3-s?o:l>4/3-s?l:s},ig=me,U3=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],V3=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=ig.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=ig.constrain(Math.floor(r*3),0,2),U3[r][e]},vT={exports:{}},X3=ds,Y3=Bc,W3=$c.getGraphDiv,q3=Ec,eh=vT.exports={};eh.wrapped=function(t,e,r){t=W3(t),t._fullLayout&&Y3.clear(t._fullLayout._uid+q3.HOVERID),eh.raw(t,e,r)};eh.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&X3.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&i&&e.emit("plotly_unhover",{event:r,points:i}))};var Z3=vT.exports,K3=SM,qu=o_,Q3=n_,J3=me.removeElement,e5=Lr,yn=uT.exports={};yn.align=G3;yn.getCursor=V3;var dT=Z3;yn.unhover=dT.wrapped;yn.unhoverRaw=dT.raw;yn.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,u,v,h;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=m,Q3?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=m,n.addEventListener("touchstart",m,{passive:!1})):n.ontouchstart=m;function d(w,g,x){return Math.abs(w)<x&&(w=0),Math.abs(g)<x&&(g=0),[w,g]}var p=e.clampFn||d;function m(w){r._dragged=!1,r._dragging=!0;var g=Zu(w);o=g[0],l=g[1],v=w.target,u=w,h=w.buttons===2||w.ctrlKey,typeof w.clientX>"u"&&typeof w.clientY>"u"&&(w.clientX=o,w.clientY=l),s=new Date().getTime(),s-r._mouseDownTime<i?a+=1:(a=1,r._mouseDownTime=s),e.prepFn&&e.prepFn(w,o,l),qu&&!h?(c=hT(),c.style.cursor=window.getComputedStyle(n).cursor):qu||(c=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(n).cursor),document.addEventListener("mouseup",b),document.addEventListener("touchend",b),e.dragmode!==!1&&(w.preventDefault(),document.addEventListener("mousemove",y),document.addEventListener("touchmove",y,{passive:!1}))}function y(w){w.preventDefault();var g=Zu(w),x=e.minDrag||e5.MINDRAG,_=p(g[0]-o,g[1]-l,x),k=_[0],T=_[1];(k||T)&&(r._dragged=!0,yn.unhover(r,w)),r._dragged&&e.moveFn&&!h&&(r._dragdata={element:n,dx:k,dy:T},e.moveFn(k,T))}function b(w){if(delete r._dragdata,e.dragmode!==!1&&(w.preventDefault(),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y)),document.removeEventListener("mouseup",b),document.removeEventListener("touchend",b),qu?J3(c):f&&(c.documentElement.style.cursor=f,f=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(a=Math.max(a-1,1)),r._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(a,u),!h){var g;try{g=new MouseEvent("click",w)}catch{var x=Zu(w);g=document.createEvent("MouseEvents"),g.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,x[0],x[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}v.dispatchEvent(g)}r._dragging=!1,r._dragged=!1}};function hT(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}yn.coverSlip=hT;function Zu(t){return K3(t.changedTouches?t.changedTouches[0]:t,document.body)}var Oa=uT.exports,Jc={},zi=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},Ku=zi,sl="data-savedcursor",ng="!!",t5=function(e,r){var a=e.attr(sl);if(r){if(!a){for(var i=(e.attr("class")||"").split(" "),n=0;n<i.length;n++){var o=i[n];o.indexOf("cursor-")===0&&e.attr(sl,o.substr(7)).classed(o,!1)}e.attr(sl)||e.attr(sl,ng)}Ku(e,r)}else a&&(e.attr(sl,null),a===ng?Ku(e):Ku(e,a))},Qu=vr,r5=xr,pT={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend",description:["Determines whether or not this legend is visible."].join(" ")},bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:r5.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:Qu({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:Qu({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:Qu({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},Yo={};Yo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};Yo.isVertical=function(e){return e.orientation!=="h"};Yo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var Ju=Je,Er=me,a5=Lt,i5=oa,n5=pT,o5=vs,ev=Yo;function l5(t,e,r,a){var i=e[t]||{},n=a5.newContainer(r,t);function o(P,A){return Er.coerce(i,n,n5,P,A)}var l=Er.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var f,c=function(P,A){var M=f._input,C=f;return Er.coerce(M,C,i5,P,A)},u=r.font||{},v=Er.coerceFont(o,"grouptitlefont",Er.extendFlat({},u,{size:Math.round(u.size*1.1)})),h=0,d=!1,p="normal",m=(r.shapes||[]).filter(function(P){return P.showlegend}),y=a.concat(m).filter(function(P){return t===(P.legend||"legend")}),b=0;b<y.length;b++)if(f=y[b],!!f.visible){var w=f._isShape;(f.showlegend||f._dfltShowLegend&&!(f._module&&f._module.attributes&&f._module.attributes.showlegend&&f._module.attributes.showlegend.dflt===!1))&&(h++,f.showlegend&&(d=!0,(!w&&Ju.traceIs(f,"pie-like")||f._input.showlegend===!0)&&h++),Er.coerceFont(c,"legendgrouptitle.font",v)),(!w&&Ju.traceIs(f,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(f.fill)!==-1)&&(p=ev.isGrouped({traceorder:p})?"grouped+reversed":"reversed"),f.legendgroup!==void 0&&f.legendgroup!==""&&(p=ev.isReversed({traceorder:p})?"reversed+grouped":"grouped")}var g=Er.coerce(e,r,o5,"showlegend",d&&h>(t==="legend"?1:0));if(g===!1&&(r[t]=void 0),!(g===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),g!==!1)){o("borderwidth");var x=o("orientation"),_=o("yref"),k=o("xref"),T=x==="h",S=_==="paper",D=k==="paper",L,R,z,N="left";T?(L=0,Ju.getComponentMethod("rangeslider","isVisible")(e.xaxis)?S?(R=1.1,z="bottom"):(R=1,z="top"):S?(R=-.1,z="top"):(R=0,z="bottom")):(R=1,z="auto",D?L=1.02:(L=1,N="right")),Er.coerce(i,n,{x:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:L}},"x"),Er.coerce(i,n,{y:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:R}},"y"),o("traceorder",p),ev.isGrouped(r[t])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",N),o("yanchor",z),o("valign"),Er.noneOrAll(i,n,["x","y"]);var H=o("title.text");if(H){o("title.side",T?"left":"top");var $=Er.extendFlat({},l,{size:Er.bigFont(l.size)});Er.coerceFont(o,"title.font",$)}}}}var mT=function(e,r,a){var i,n=a.slice(),o=r.shapes;if(o)for(i=0;i<o.length;i++){var l=o[i];if(l.showlegend){var s={_input:l._input,visible:l.visible,showlegend:l.showlegend,legend:l.legend};n.push(s)}}var f=["legend"];for(i=0;i<n.length;i++)Er.pushUnique(f,n[i].legend);for(r._legends=[],i=0;i<f.length;i++){var c=f[i];l5(c,e,r,n),r[c]&&r[c].visible&&(r[c]._id=c),r._legends.push(c)}},fi=Je,Ff=me,s5=Ff.pushUnique,tv=!0,f5=function(e,r,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var n=i.legend.itemclick,o=i.legend.itemdoubleclick,l=i.legend.groupclick;a===1&&n==="toggle"&&o==="toggleothers"&&tv&&r.data&&r._context.showTips&&Ff.notifier(Ff._(r,"Double-click on legend to isolate one trace"),"long"),tv=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],u=e.data()[0][0];if(u.groupTitle&&u.noClick)return;var v=r._fullData,h=(i.shapes||[]).filter(function(_e){return _e.showlegend}),d=v.concat(h),p=u.trace;p._isShape&&(p=p._fullInput);var m=p.legendgroup,y,b,w,g,x,_,k={},T=[],S=[],D=[];function L(_e,Ie){var ce=T.indexOf(_e),ye=k.visible;return ye||(ye=k.visible=[]),T.indexOf(_e)===-1&&(T.push(_e),ce=T.length-1),ye[ce]=Ie,ce}var R=(i.shapes||[]).map(function(_e){return _e._input}),z=!1;function N(_e,Ie){R[_e].visible=Ie,z=!0}function H(_e,Ie){if(!(u.groupTitle&&!f)){var ce=_e._fullInput||_e,ye=ce._isShape,Ee=ce.index;if(Ee===void 0&&(Ee=ce._index),fi.hasTransform(ce,"groupby")){var ze=S[Ee];if(!ze){var K=fi.getTransformIndices(ce,"groupby"),ke=K[K.length-1];ze=Ff.keyedContainer(ce,"transforms["+ke+"].styles","target","value.visible"),S[Ee]=ze}var re=ze.get(_e._group);re===void 0&&(re=!0),re!==!1&&ze.set(_e._group,Ie),D[Ee]=L(Ee,ce.visible!==!1)}else{var pe=ce.visible===!1?!1:Ie;ye?N(Ee,pe):L(Ee,pe)}}}var $=p.legend,P=p._fullInput,A=P&&P._isShape;if(!A&&fi.traceIs(p,"pie-like")){var M=u.label,C=c.indexOf(M);if(s==="toggle")C===-1?c.push(M):c.splice(C,1);else if(s==="toggleothers"){var E=C!==-1,F=[];for(y=0;y<r.calcdata.length;y++){var j=r.calcdata[y];for(b=0;b<j.length;b++){var B=j[b],G=B.label;$===j[0].trace.legend&&M!==G&&(c.indexOf(G)===-1&&(E=!0),s5(c,G),F.push(G))}}if(!E)for(var O=0;O<F.length;O++){var W=c.indexOf(F[O]);W!==-1&&c.splice(W,1)}}fi.call("_guiRelayout",r,"hiddenlabels",c)}else{var V=m&&m.length,Z=[],X;if(V)for(y=0;y<d.length;y++)X=d[y],X.visible&&X.legendgroup===m&&Z.push(y);if(s==="toggle"){var Q;switch(p.visible){case!0:Q="legendonly";break;case!1:Q=!1;break;case"legendonly":Q=!0;break}if(V)if(f)for(y=0;y<d.length;y++){var te=d[y];te.visible!==!1&&te.legendgroup===m&&H(te,Q)}else H(p,Q);else H(p,Q)}else if(s==="toggleothers"){var xe,ue,ae,le,de,be=!0;for(y=0;y<d.length;y++)if(de=d[y],xe=de===p,ae=de.showlegend!==!0,!(xe||ae)&&(ue=V&&de.legendgroup===m,!ue&&de.legend===$&&de.visible===!0&&!fi.traceIs(de,"notLegendIsolatable"))){be=!1;break}for(y=0;y<d.length;y++)if(de=d[y],!(de.visible===!1||de.legend!==$)&&!fi.traceIs(de,"notLegendIsolatable"))switch(p.visible){case"legendonly":H(de,!0);break;case!0:le=be?!0:"legendonly",xe=de===p,ae=de.showlegend!==!0&&!de.legendgroup,ue=xe||V&&de.legendgroup===m,H(de,ue||ae?!0:le);break}}for(y=0;y<S.length;y++)if(w=S[y],!!w){var Te=w.constructUpdate(),Le=Object.keys(Te);for(b=0;b<Le.length;b++)g=Le[b],_=k[g]=k[g]||[],_[D[y]]=Te[g]}for(x=Object.keys(k),y=0;y<x.length;y++)for(g=x[y],b=0;b<T.length;b++)k[g].hasOwnProperty(b)||(k[g][b]=void 0);z?fi.call("_guiUpdate",r,k,{shapes:R},T):fi.call("_guiRestyle",r,k,T)}},yT={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},og=Je,rv=Yo,c5=function(e,r,a){var i=r._inHover,n=rv.isGrouped(r),o=rv.isReversed(r),l={},s=[],f=!1,c={},u=0,v=0,h,d;function p(P,A,M){if(r.visible!==!1&&!(a&&P!==r._id))if(A===""||!rv.isGrouped(r)){var C="~~i"+u;s.push(C),l[C]=[M],u++}else s.indexOf(A)===-1?(s.push(A),f=!0,l[A]=[M]):l[A].push(M)}for(h=0;h<e.length;h++){var m=e[h],y=m[0],b=y.trace,w=b.legend,g=b.legendgroup;if(!(!i&&(!b.visible||!b.showlegend)))if(og.traceIs(b,"pie-like"))for(c[g]||(c[g]={}),d=0;d<m.length;d++){var x=m[d].label;c[g][x]||(p(w,g,{label:x,color:m[d].color,i:m[d].i,trace:b,pts:m[d].pts}),c[g][x]=!0,v=Math.max(v,(x||"").length))}else p(w,g,y),v=Math.max(v,(b.name||"").length)}if(!s.length)return[];var _=!f||!n,k=[];for(h=0;h<s.length;h++){var T=l[s[h]];_?k.push(T[0]):k.push(T)}for(_&&(k=[k]),h=0;h<k.length;h++){var S=1/0;for(d=0;d<k[h].length;d++){var D=k[h][d].trace.legendrank;S>D&&(S=D)}k[h][0]._groupMinRank=S,k[h][0]._preGroupSort=h}var L=function(P,A){return P[0]._groupMinRank-A[0]._groupMinRank||P[0]._preGroupSort-A[0]._preGroupSort},R=function(P,A){return P.trace.legendrank-A.trace.legendrank||P._preSort-A._preSort};for(k.forEach(function(P,A){P[0]._preGroupSort=A}),k.sort(L),h=0;h<k.length;h++){k[h].forEach(function(P,A){P._preSort=A}),k[h].sort(R);var z=k[h][0].trace,N=null;for(d=0;d<k[h].length;d++){var H=k[h][d].trace.legendgrouptitle;if(H&&H.text){N=H,i&&(H.font=r._groupTitleFont);break}}if(o&&k[h].reverse(),N){var $=!1;for(d=0;d<k[h].length;d++)if(og.traceIs(k[h][d].trace,"pie-like")){$=!0;break}k[h].unshift({i:-1,groupTitle:N,noClick:$,trace:{showlegend:z.showlegend,legendgroup:z.legendgroup,visible:r.groupclick==="toggleitem"?!0:z.visible}})}for(d=0;d<k[h].length;d++)k[h][d]=[k[h][d]]}return r._lgroupsLength=k.length,r._maxNameLength=v,k},Ln={};(function(t){var e=me;function r(a){return a.indexOf("e")!==-1?a.replace(/[.]?0+e/,"e"):a.indexOf(".")!==-1?a.replace(/[.]?0+$/,""):a}t.formatPiePercent=function(i,n){var o=r((i*100).toPrecision(3));return e.numSeparate(o,n)+"%"},t.formatPieValue=function(i,n){var o=r(i.toPrecision(10));return e.numSeparate(o,n)},t.getFirstFilled=function(i,n){if(e.isArrayOrTypedArray(i))for(var o=0;o<n.length;o++){var l=i[n[o]];if(l||l===0||l==="")return l}},t.castOption=function(i,n){if(e.isArrayOrTypedArray(i))return t.getFirstFilled(i,n);if(i)return i},t.getRotationAngle=function(a){return(a==="auto"?0:a)*Math.PI/180}})(Ln);var u5=xt,v5=ot,d5=function(e,r,a,i){var n=a.marker.pattern;n&&n.shape?u5.pointStyle(e,a,i,r):v5.fill(e,r.color)},lg=ot,sg=Ln.castOption,h5=d5,xp=function(e,r,a,i){var n=a.marker.line,o=sg(n.color,r.pts)||lg.defaultLine,l=sg(n.width,r.pts)||0;e.call(h5,r,a,i).style("stroke-width",l).call(lg.stroke,o)},yr=ft,av=Je,hr=me,fg=hr.strTranslate,Ar=xt,Xr=ot,iv=ka.extractOpts,lc=_r,p5=xp,m5=Ln.castOption,y5=yT,cg=12,ug=5,Xi=2,g5=10,$n=5,gT=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+y5.itemGap*2)/2,s=fg(l,0),f=function(k,T,S,D){var L;if(k+1)L=k;else if(T&&T.width>0)L=T.width;else return 0;return n?D:Math.min(L,S)};e.each(function(k){var T=yr.select(this),S=hr.ensureSingle(T,"g","layers");S.style("opacity",k[0].trace.opacity);var D=a.valign,L=k[0].lineHeight,R=k[0].height;if(D==="middle"||!L||!R)S.attr("transform",null);else{var z={top:1,bottom:-1}[D],N=z*(.5*(L-R+3));S.attr("transform",fg(0,N))}var H=S.selectAll("g.legendfill").data([k]);H.enter().append("g").classed("legendfill",!0);var $=S.selectAll("g.legendlines").data([k]);$.enter().append("g").classed("legendlines",!0);var P=S.selectAll("g.legendsymbols").data([k]);P.enter().append("g").classed("legendsymbols",!0),P.selectAll("g.legendpoints").data([k]).enter().append("g").classed("legendpoints",!0)}).each(_).each(v).each(d).each(h).each(m).each(g).each(w).each(c).each(u).each(y).each(b);function c(k){var T=vg(k),S=T.showFill,D=T.showLine,L=T.showGradientLine,R=T.showGradientFill,z=T.anyFill,N=T.anyLine,H=k[0],$=H.trace,P,A,M=iv($),C=M.colorscale,E=M.reversescale,F=function(Z){if(Z.size())if(S)Ar.fillGroupStyle(Z,r);else{var X="legendfill-"+$.uid;Ar.gradient(Z,r,X,nv(E),C,"fill")}},j=function(Z){if(Z.size()){var X="legendline-"+$.uid;Ar.lineGroupStyle(Z),Ar.gradient(Z,r,X,nv(E),C,"stroke")}},B=lc.hasMarkers($)||!z?"M5,0":N?"M5,-2":"M5,-3",G=yr.select(this),O=G.select(".legendfill").selectAll("path").data(S||R?[k]:[]);if(O.enter().append("path").classed("js-fill",!0),O.exit().remove(),O.attr("d",B+"h"+o+"v6h-"+o+"z").call(F),D||L){var W=f(void 0,$.line,g5,ug);A=hr.minExtend($,{line:{width:W}}),P=[hr.minExtend(H,{trace:A})]}var V=G.select(".legendlines").selectAll("path").data(D||L?[P]:[]);V.enter().append("path").classed("js-line",!0),V.exit().remove(),V.attr("d",B+(L?"l"+o+",0.0001":"h"+o)).call(D?Ar.lineGroupStyle:j)}function u(k){var T=vg(k),S=T.anyFill,D=T.anyLine,L=T.showLine,R=T.showMarker,z=k[0],N=z.trace,H=!R&&!D&&!S&&lc.hasText(N),$,P;function A(O,W,V,Z){var X=hr.nestedProperty(N,O).get(),Q=hr.isArrayOrTypedArray(X)&&W?W(X):X;if(n&&Q&&Z!==void 0&&(Q=Z),V){if(Q<V[0])return V[0];if(Q>V[1])return V[1]}return Q}function M(O){return z._distinct&&z.index&&O[z.index]?O[z.index]:O[0]}if(R||H||L){var C={},E={};if(R){C.mc=A("marker.color",M),C.mx=A("marker.symbol",M),C.mo=A("marker.opacity",hr.mean,[.2,1]),C.mlc=A("marker.line.color",M),C.mlw=A("marker.line.width",hr.mean,[0,5],Xi),E.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var F=A("marker.size",hr.mean,[2,16],cg);C.ms=F,E.marker.size=F}L&&(E.line={width:A("line.width",M,[0,10],ug)}),H&&(C.tx="Aa",C.tp=A("textposition",M),C.ts=10,C.tc=A("textfont.color",M),C.tf=A("textfont.family",M)),$=[hr.minExtend(z,C)],P=hr.minExtend(N,E),P.selectedpoints=null,P.texttemplate=null}var j=yr.select(this).select("g.legendpoints"),B=j.selectAll("path.scatterpts").data(R?$:[]);B.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),B.exit().remove(),B.call(Ar.pointStyle,P,r),R&&($[0].mrc=3);var G=j.selectAll("g.pointtext").data(H?$:[]);G.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),G.exit().remove(),G.selectAll("text").call(Ar.textPointStyle,P,r)}function v(k){var T=k[0].trace,S=T.type==="waterfall";if(k[0]._distinct&&S){var D=k[0].trace[k[0].dir].marker;return k[0].mc=D.color,k[0].mlw=D.line.width,k[0].mlc=D.line.color,p(k,this,"waterfall")}var L=[];T.visible&&S&&(L=k[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 R=yr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(L);R.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),R.exit().remove(),R.each(function(z){var N=yr.select(this),H=T[z[0]].marker,$=f(void 0,H.line,$n,Xi);N.attr("d",z[1]).style("stroke-width",$+"px").call(Xr.fill,H.color),$&&N.call(Xr.stroke,H.line.color)})}function h(k){p(k,this)}function d(k){p(k,this,"funnel")}function p(k,T,S){var D=k[0].trace,L=D.marker||{},R=L.line||{},z=L.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",N=S?D.visible&&D.type===S:av.traceIs(D,"bar"),H=yr.select(T).select("g.legendpoints").selectAll("path.legend"+S).data(N?[k]:[]);H.enter().append("path").classed("legend"+S,!0).attr("d",z).attr("transform",s),H.exit().remove(),H.each(function($){var P=yr.select(this),A=$[0],M=f(A.mlw,L.line,$n,Xi);P.style("stroke-width",M+"px");var C=A.mcc;if(!a._inHover&&"mc"in A){var E=iv(L),F=E.mid;F===void 0&&(F=(E.max+E.min)/2),C=Ar.tryColorscale(L,"")(F)}var j=C||A.mc||L.color,B=L.pattern,G=B&&Ar.getPatternAttr(B.shape,0,"");if(G){var O=Ar.getPatternAttr(B.bgcolor,0,null),W=Ar.getPatternAttr(B.fgcolor,0,null),V=B.fgopacity,Z=dg(B.size,8,10),X=dg(B.solidity,.5,1),Q="legend-"+D.uid;P.call(Ar.pattern,"legend",r,Q,G,Z,X,C,B.fillmode,O,W,V)}else P.call(Xr.fill,j);M&&Xr.stroke(P,A.mlc||R.color)})}function m(k){var T=k[0].trace,S=yr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(T.visible&&av.traceIs(T,"box-violin")?[k]:[]);S.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),S.exit().remove(),S.each(function(){var D=yr.select(this);if((T.boxpoints==="all"||T.points==="all")&&Xr.opacity(T.fillcolor)===0&&Xr.opacity((T.line||{}).color)===0){var L=hr.minExtend(T,{marker:{size:n?cg:hr.constrain(T.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(Ar.pointStyle,L,r)}else{var R=f(void 0,T.line,$n,Xi);D.style("stroke-width",R+"px").call(Xr.fill,T.fillcolor),R&&Xr.stroke(D,T.line.color)}})}function y(k){var T=k[0].trace,S=yr.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(T.visible&&T.type==="candlestick"?[k,k]:[]);S.enter().append("path").classed("legendcandle",!0).attr("d",function(D,L){return L?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(D,L){var R=yr.select(this),z=T[L?"increasing":"decreasing"],N=f(void 0,z.line,$n,Xi);R.style("stroke-width",N+"px").call(Xr.fill,z.fillcolor),N&&Xr.stroke(R,z.line.color)})}function b(k){var T=k[0].trace,S=yr.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(T.visible&&T.type==="ohlc"?[k,k]:[]);S.enter().append("path").classed("legendohlc",!0).attr("d",function(D,L){return L?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(D,L){var R=yr.select(this),z=T[L?"increasing":"decreasing"],N=f(void 0,z.line,$n,Xi);R.style("fill","none").call(Ar.dashLine,z.line.dash,N),N&&Xr.stroke(R,z.line.color)})}function w(k){x(k,this,"pie")}function g(k){x(k,this,"funnelarea")}function x(k,T,S){var D=k[0],L=D.trace,R=S?L.visible&&L.type===S:av.traceIs(L,S),z=yr.select(T).select("g.legendpoints").selectAll("path.legend"+S).data(R?[k]:[]);if(z.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),z.exit().remove(),z.size()){var N=L.marker||{},H=f(m5(N.line.width,D.pts),N.line,$n,Xi),$="pieLike",P=hr.minExtend(L,{marker:{line:{width:H}}},$),A=hr.minExtend(D,{trace:P},$);p5(z,A,P,r)}}function _(k){var T=k[0].trace,S,D=[];if(T.visible)switch(T.type){case"histogram2d":case"heatmap":D=[["M-15,-2V4H15V-2Z"]],S=!0;break;case"choropleth":case"choroplethmapbox":D=[["M-6,-6V6H6V-6Z"]],S=!0;break;case"densitymapbox":D=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],S="radial";break;case"cone":D=[["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"]],S=!1;break;case"streamtube":D=[["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"]],S=!1;break;case"surface":D=[["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"]],S=!0;break;case"mesh3d":D=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!1;break;case"volume":D=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!0;break;case"isosurface":D=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],S=!1;break}var L=yr.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(D);L.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(R,z){var N=yr.select(this),H=iv(T),$=H.colorscale,P=H.reversescale,A=function(F){if(F.size()){var j="legendfill-"+T.uid;Ar.gradient(F,r,j,nv(P,S==="radial"),$,"fill")}},M;if($){if(!S){var E=$.length;M=z===0?$[P?E-1:0][1]:z===1?$[P?0:E-1][1]:$[Math.floor((E-1)/2)][1]}}else{var C=T.vertexcolor||T.facecolor||T.color;M=hr.isArrayOrTypedArray(C)?C[z]||C[0]:C}N.attr("d",R[0]),M?N.call(Xr.fill,M):N.call(A)})}};function nv(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function vg(t){var e=t[0].trace,r=e.contours,a=lc.hasLines(e),i=lc.hasMarkers(e),n=e.visible&&e.fill&&e.fill!=="none",o=!1,l=!1;if(r){var s=r.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||r.showlines,r.type==="constraint"?n=r._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:i,showLine:a,showFill:n,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:n||l}}function dg(t,e,r){return t&&hr.isArrayOrTypedArray(t)?e:t>r?r:t}var zr=ft,Gt=me,th=Qt,xi=Je,hg=ds,ov=Oa,Zt=xt,$f=ot,hn=nr,pg=f5,tr=yT,_p=Cr,bT=_p.LINE_SPACING,mo=_p.FROM_TL,mg=_p.FROM_BR,yg=c5,b5=gT,gg=Yo,lo=1,x5=/^legend[0-9]*$/,xT=function(e,r){if(r)bg(e,r);else{var a=e._fullLayout,i=a._legends,n=a._infolayer.selectAll('[class^="legend"]');n.each(function(){var f=zr.select(this),c=f.attr("class"),u=c.split(" ")[0];u.match(x5)&&i.indexOf(u)===-1&&f.remove()});for(var o=0;o<i.length;o++){var l=i[o],s=e._fullLayout[l];bg(e,s)}}};function _5(t,e,r){if(!(e.title.side!=="top center"&&e.title.side!=="top right")){var a=e.title.font,i=a.size*bT,n=0,o=t.node(),l=Zt.bBox(o).width;e.title.side==="top center"?n=.5*(e._width-2*r-2*tr.titlePad-l):e.title.side==="top right"&&(n=e._width-2*r-2*tr.titlePad-l),hn.positionText(t,r+tr.titlePad+n,r+i)}}function bg(t,e){var r=e||{},a=t._fullLayout,i=eu(r),n,o,l=r._inHover;if(l?(o=r.layer,n="hover"):(o=a._infolayer,n=i),!!o){n+=a._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0);var s;if(l){if(!r.entries)return;s=yg(r.entries,r)}else{for(var f=(t.calcdata||[]).slice(),c=a.shapes,u=0;u<c.length;u++){var v=c[u];if(v.showlegend){var h={_isShape:!0,_fullInput:v,index:v._index,name:v.name||v.label.text||"shape "+v._index,legend:v.legend,legendgroup:v.legendgroup,legendgrouptitle:v.legendgrouptitle,legendrank:v.legendrank,legendwidth:v.legendwidth,showlegend:v.showlegend,visible:v.visible,opacity:v.opacity,mode:v.type==="line"?"lines":"markers",line:v.line,marker:{line:v.line,color:v.fillcolor,size:12,symbol:v.type==="rect"?"square":v.type==="circle"?"circle":"hexagon2"}};f.push([{trace:h}])}}s=a.showlegend&&yg(f,r,a._legends.length>1)}var d=a.hiddenlabels||[];if(!l&&(!a.showlegend||!s.length))return o.selectAll("."+i).remove(),a._topdefs.select("#"+n).remove(),th.autoMargin(t,i);var p=Gt.ensureSingle(o,"g",i,function(T){l||T.attr("pointer-events","all")}),m=Gt.ensureSingleById(a._topdefs,"clipPath",n,function(T){T.append("rect")}),y=Gt.ensureSingle(p,"rect","bg",function(T){T.attr("shape-rendering","crispEdges")});y.call($f.stroke,r.bordercolor).call($f.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var b=Gt.ensureSingle(p,"g","scrollbox"),w=r.title;r._titleWidth=0,r._titleHeight=0;var g;w.text?(g=Gt.ensureSingle(b,"text",i+"titletext"),g.attr("text-anchor","start").call(Zt.font,w.font).text(w.text),Nf(g,b,t,r,lo)):b.selectAll("."+i+"titletext").remove();var x=Gt.ensureSingle(p,"rect","scrollbar",function(T){T.attr(tr.scrollBarEnterAttrs).call($f.fill,tr.scrollBarColor)}),_=b.selectAll("g.groups").data(s);_.enter().append("g").attr("class","groups"),_.exit().remove();var k=_.selectAll("g.traces").data(Gt.identity);k.enter().append("g").attr("class","traces"),k.exit().remove(),k.style("opacity",function(T){var S=T[0].trace;return xi.traceIs(S,"pie-like")?d.indexOf(T[0].label)!==-1?.5:1:S.visible==="legendonly"?.5:1}).each(function(){zr.select(this).call(w5,t,r)}).call(b5,t,r).each(function(){l||zr.select(this).call(T5,t,i)}),Gt.syncOrAsync([th.previousPromises,function(){return M5(t,_,k,r)},function(){var T=a._size,S=r.borderwidth,D=r.xref==="paper",L=r.yref==="paper";if(w.text&&_5(g,r,S),!l){var R,z;D?R=T.l+T.w*r.x-mo[sc(r)]*r._width:R=a.width*r.x-mo[sc(r)]*r._width,L?z=T.t+T.h*(1-r.y)-mo[fc(r)]*r._effHeight:z=a.height*(1-r.y)-mo[fc(r)]*r._effHeight;var N=S5(t,i,R,z);if(N)return;if(a.margin.autoexpand){var H=R,$=z;R=D?Gt.constrain(R,0,a.width-r._width):H,z=L?Gt.constrain(z,0,a.height-r._effHeight):$,R!==H&&Gt.log("Constrain "+i+".x to make legend fit inside graph"),z!==$&&Gt.log("Constrain "+i+".y to make legend fit inside graph")}Zt.setTranslate(p,R,z)}if(x.on(".drag",null),p.on("wheel",null),l||r._height<=r._maxHeight||t._context.staticPlot){var P=r._effHeight;l&&(P=r._height),y.attr({width:r._width-S,height:P-S,x:S/2,y:S/2}),Zt.setTranslate(b,0,0),m.select("rect").attr({width:r._width-2*S,height:P-2*S,x:S,y:S}),Zt.setClipUrl(b,n,t),Zt.setRect(x,0,0,0,0),delete r._scrollY}else{var A=Math.max(tr.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),M=r._effHeight-A-2*tr.scrollBarMargin,C=r._height-r._effHeight,E=M/C,F=Math.min(r._scrollY||0,C);y.attr({width:r._width-2*S+tr.scrollBarWidth+tr.scrollBarMargin,height:r._effHeight-S,x:S/2,y:S/2}),m.select("rect").attr({width:r._width-2*S+tr.scrollBarWidth+tr.scrollBarMargin,height:r._effHeight-2*S,x:S,y:S+F}),Zt.setClipUrl(b,n,t),X(F,A,E),p.on("wheel",function(){F=Gt.constrain(r._scrollY+zr.event.deltaY/M*C,0,C),X(F,A,E),F!==0&&F!==C&&zr.event.preventDefault()});var j,B,G,O=function(ae,le,de){var be=(de-le)/E+ae;return Gt.constrain(be,0,C)},W=function(ae,le,de){var be=(le-de)/E+ae;return Gt.constrain(be,0,C)},V=zr.behavior.drag().on("dragstart",function(){var ae=zr.event.sourceEvent;ae.type==="touchstart"?j=ae.changedTouches[0].clientY:j=ae.clientY,G=F}).on("drag",function(){var ae=zr.event.sourceEvent;ae.buttons===2||ae.ctrlKey||(ae.type==="touchmove"?B=ae.changedTouches[0].clientY:B=ae.clientY,F=O(G,j,B),X(F,A,E))});x.call(V);var Z=zr.behavior.drag().on("dragstart",function(){var ae=zr.event.sourceEvent;ae.type==="touchstart"&&(j=ae.changedTouches[0].clientY,G=F)}).on("drag",function(){var ae=zr.event.sourceEvent;ae.type==="touchmove"&&(B=ae.changedTouches[0].clientY,F=W(G,j,B),X(F,A,E))});b.call(Z)}function X(ae,le,de){r._scrollY=t._fullLayout[i]._scrollY=ae,Zt.setTranslate(b,0,-ae),Zt.setRect(x,r._width,tr.scrollBarMargin+ae*de,tr.scrollBarWidth,le),m.select("rect").attr("y",S+ae)}if(t._context.edits.legendPosition){var Q,te,xe,ue;p.classed("cursor-move",!0),ov.init({element:p.node(),gd:t,prepFn:function(){var ae=Zt.getTranslate(p);xe=ae.x,ue=ae.y},moveFn:function(ae,le){var de=xe+ae,be=ue+le;Zt.setTranslate(p,de,be),Q=ov.align(de,r._width,T.l,T.l+T.w,r.xanchor),te=ov.align(be+r._height,-r._height,T.t+T.h,T.t,r.yanchor)},doneFn:function(){if(Q!==void 0&&te!==void 0){var ae={};ae[i+".x"]=Q,ae[i+".y"]=te,xi.call("_guiRelayout",t,ae)}},clickFn:function(ae,le){var de=o.selectAll("g.traces").filter(function(){var be=this.getBoundingClientRect();return le.clientX>=be.left&&le.clientX<=be.right&&le.clientY>=be.top&&le.clientY<=be.bottom});de.size()>0&&_T(t,p,de,ae,le)}})}}],t)}}function Ws(t,e,r){var a=t[0],i=a.width,n=e.entrywidthmode,o=a.trace.legendwidth||e.entrywidth;return n==="fraction"?e._maxWidth*o:r+(o||i)}function _T(t,e,r,a,i){var n=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:n.index,expandedIndex:n._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};n._group&&(o.group=n._group),xi.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=hg.triggerHandler(t,"plotly_legendclick",o);if(a===1){if(l===!1)return;e._clickTimeout=setTimeout(function(){t._fullLayout&&pg(r,t,a)},t._context.doubleClickDelay)}else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=hg.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&pg(r,t,a)}}function w5(t,e,r){var a=eu(r),i=t.data()[0][0],n=i.trace,o=xi.traceIs(n,"pie-like"),l=!r._inHover&&e._context.edits.legendText&&!o,s=r._maxNameLength,f,c;i.groupTitle?(f=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?f=i.text:(f=o?i.label:n.name,n._meta&&(f=Gt.templateString(f,n._meta))));var u=Gt.ensureSingle(t,"text",a+"text");u.attr("text-anchor","start").call(Zt.font,c).text(l?xg(f,s):f);var v=r.itemwidth+tr.itemGap*2;hn.positionText(u,v,0),l?u.call(hn.makeEditable,{gd:e,text:f}).call(Nf,t,e,r).on("edit",function(h){this.text(xg(h,s)).call(Nf,t,e,r);var d=i.trace._fullInput||{},p={};if(xi.hasTransform(d,"groupby")){var m=xi.getTransformIndices(d,"groupby"),y=m[m.length-1],b=Gt.keyedContainer(d,"transforms["+y+"].styles","target","value.name");b.set(i.trace._group,h),p=b.constructUpdate()}else p.name=h;return d._isShape?xi.call("_guiRelayout",e,"shapes["+n.index+"].name",p.name):xi.call("_guiRestyle",e,p,n.index)}):Nf(u,t,e,r)}function xg(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;t=t||"";for(var a=r-t.length;a>0;a--)t+=" ";return t}function T5(t,e,r){var a=e._context.doubleClickDelay,i,n=1,o=Gt.ensureSingle(t,"rect",r+"toggle",function(l){e._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call($f.fill,"rgba(0,0,0,0)")});e._context.staticPlot||(o.on("mousedown",function(){i=new Date().getTime(),i-e._legendMouseDownTime<a?n+=1:(n=1,e._legendMouseDownTime=i)}),o.on("mouseup",function(){if(!(e._dragged||e._editing)){var l=e._fullLayout[r];new Date().getTime()-e._legendMouseDownTime>a&&(n=Math.max(n-1,1)),_T(e,l,t,n,zr.event)}}))}function Nf(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),hn.convertToTspans(t,r,function(){k5(e,r,a,i)})}function k5(t,e,r,a){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){t.remove();return}var n=t.select("g[class*=math-group]"),o=n.node(),l=eu(r);r||(r=e._fullLayout[l]);var s=r.borderwidth,f;a===lo?f=r.title.font:i.groupTitle?f=i.groupTitle.font:f=r.font;var c=f.size*bT,u,v;if(o){var h=Zt.bBox(o);u=h.height,v=h.width,a===lo?Zt.setTranslate(n,s,s+u*.75):Zt.setTranslate(n,0,u*.25)}else{var d="."+l+(a===lo?"title":"")+"text",p=t.select(d),m=hn.lineCount(p),y=p.node();if(u=c*m,v=y?Zt.bBox(y).width:0,a===lo)r.title.side==="left"&&(v+=tr.itemGap*2),hn.positionText(p,s+tr.titlePad,s+c);else{var b=tr.itemGap*2+r.itemwidth;i.groupTitle&&(b=tr.itemGap,v-=r.itemwidth),hn.positionText(p,b,-c*((m-1)/2-.3))}}a===lo?(r._titleWidth=v,r._titleHeight=u):(i.lineHeight=c,i.height=Math.max(u,16)+3,i.width=v)}function A5(t){var e=0,r=0,a=t.title.side;return a&&(a.indexOf("left")!==-1&&(e=t._titleWidth),a.indexOf("top")!==-1&&(r=t._titleHeight)),[e,r]}function M5(t,e,r,a){var i=t._fullLayout,n=eu(a);a||(a=i[n]);var o=i._size,l=gg.isVertical(a),s=gg.isGrouped(a),f=a.entrywidthmode==="fraction",c=a.borderwidth,u=2*c,v=tr.itemGap,h=a.itemwidth+v*2,d=2*(c+v),p=fc(a),m=a.y<0||a.y===0&&p==="top",y=a.y>1||a.y===1&&p==="bottom",b=a.tracegroupgap,w={};a._maxHeight=Math.max(m||y?i.height/2:o.h,30);var g=0;a._width=0,a._height=0;var x=A5(a);if(l)r.each(function(G){var O=G[0].height;Zt.setTranslate(this,c+x[0],c+x[1]+a._height+O/2+v),a._height+=O,a._width=Math.max(a._width,G[0].width)}),g=h+a._width,a._width+=v+h+u,a._height+=d,s&&(e.each(function(G,O){Zt.setTranslate(this,0,O*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var _=sc(a),k=a.x<0||a.x===0&&_==="right",T=a.x>1||a.x===1&&_==="left",S=y||m,D=i.width/2;a._maxWidth=Math.max(k?S&&_==="left"?o.l+o.w:D:T?S&&_==="right"?o.r+o.w:D:o.w,2*h);var L=0,R=0;r.each(function(G){var O=Ws(G,a,h);L=Math.max(L,O),R+=O}),g=null;var z=0;if(s){var N=0,H=0,$=0;e.each(function(){var G=0,O=0;zr.select(this).selectAll("g.traces").each(function(V){var Z=Ws(V,a,h),X=V[0].height;Zt.setTranslate(this,x[0],x[1]+c+v+X/2+O),O+=X,G=Math.max(G,Z),w[V[0].trace.legendgroup]=G});var W=G+v;H>0&&W+c+H>a._maxWidth?(z=Math.max(z,H),H=0,$+=N+b,N=O):N=Math.max(N,O),Zt.setTranslate(this,H,$),H+=W}),a._width=Math.max(z,H)+c,a._height=$+N+d}else{var P=r.size(),A=R+u+(P-1)*v<a._maxWidth,M=0,C=0,E=0,F=0;r.each(function(G){var O=G[0].height,W=Ws(G,a,h),V=A?W:L;f||(V+=v),V+c+C-v>=a._maxWidth&&(z=Math.max(z,F),C=0,E+=M,a._height+=M,M=0),Zt.setTranslate(this,x[0]+c+C,x[1]+c+E+O/2+v),F=C+W+v,C+=V,M=Math.max(M,O)}),A?(a._width=C+u,a._height=M+d):(a._width=Math.max(z,F)+u,a._height+=M+d)}}a._width=Math.ceil(Math.max(a._width+x[0],a._titleWidth+2*(c+tr.titlePad))),a._height=Math.ceil(Math.max(a._height+x[1],a._titleHeight+2*(c+tr.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var j=t._context.edits,B=j.legendText||j.legendPosition;r.each(function(G){var O=zr.select(this).select("."+n+"toggle"),W=G[0].height,V=G[0].trace.legendgroup,Z=Ws(G,a,h);s&&V!==""&&(Z=w[V]);var X=B?h:g||Z;!l&&!f&&(X+=v/2),Zt.setRect(O,0,-W/2,X,W)})}function S5(t,e,r,a){var i=t._fullLayout,n=i[e],o=sc(n),l=fc(n),s=n.xref==="paper",f=n.yref==="paper";t._fullLayout._reservedMargin[e]={};var c=n.y<.5?"b":"t",u=n.x<.5?"l":"r",v={r:i.width-r,l:r+n._width,b:i.height-a,t:a+n._effHeight};if(s&&f)return th.autoMargin(t,e,{x:n.x,y:n.y,l:n._width*mo[o],r:n._width*mg[o],b:n._effHeight*mg[l],t:n._effHeight*mo[l]});s?t._fullLayout._reservedMargin[e][c]=v[c]:f||n.orientation==="v"?t._fullLayout._reservedMargin[e][u]=v[u]:t._fullLayout._reservedMargin[e][c]=v[c]}function sc(t){return Gt.isRightAnchor(t)?"right":Gt.isCenterAnchor(t)?"center":"left"}function fc(t){return Gt.isBottomAnchor(t)?"bottom":Gt.isMiddleAnchor(t)?"middle":"top"}function eu(t){return t._id||"legend"}var nn=ft,Ya=dt,_g=wa,Vt=me,lv=Vt.strTranslate,L5=Vt.strRotate,C5=ds,qr=nr,D5=t5,Ea=xt,ar=ot,qs=Oa,mi=Dt,Do=Je,da=la,gn=Ec,P5=mT,E5=xT,wT=gn.YANGLE,wp=Math.PI*wT/180,R5=1/Math.sin(wp),z5=Math.cos(wp),I5=Math.sin(wp),kt=gn.HOVERARROWSIZE,ht=gn.HOVERTEXTPAD,wg={box:!0,ohlc:!0,violin:!0,candlestick:!0},F5={scatter:!0,scattergl:!0,splom:!0};Jc.hover=function(e,r,a,i){e=Vt.getGraphDiv(e);var n=r.target;Vt.throttle(e._fullLayout._uid+gn.HOVERID,gn.HOVERMINTIME,function(){$5(e,r,a,i,n)})};Jc.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=ST(i),o=LT(i),l=e.map(function(m){var y=m._x0||m.x0||m.x||0,b=m._x1||m.x1||m.x||0,w=m._y0||m.y0||m.y||0,g=m._y1||m.y1||m.y||0,x=m.eventData;if(x){var _=Math.min(y,b),k=Math.max(y,b),T=Math.min(w,g),S=Math.max(w,g),D=m.trace;if(Do.traceIs(D,"gl3d")){var L=i._fullLayout[D.scene]._scene.container,R=L.offsetLeft,z=L.offsetTop;_+=R,k+=R,T+=z,S+=z}x.bbox={x0:_+o,x1:k+o,y0:T+n,y1:S+n},r.inOut_bbox&&r.inOut_bbox.push(x.bbox)}else x=!1;return{color:m.color||ar.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:x}}),s=!1,f=kT(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||ar.background,container:nn.select(r.container),outerContainer:r.outerContainer||r.container}),c=f.hoverLabels,u=5,v=0,h=0;c.sort(function(m,y){return m.y0-y.y0}).each(function(m,y){var b=m.y0-m.by/2;b-u<v?m.offset=v-b+u:m.offset=0,v=b+m.by+m.offset,y===r.anchorIndex&&(h=m.offset)}).each(function(m){m.offset-=h});var d=i._fullLayout._invScaleX,p=i._fullLayout._invScaleY;return MT(c,s,d,p),a?c:c.node()};function $5(t,e,r,a,i){r||(r="xy");var n=Array.isArray(r)?r:[r],o=t._fullLayout,l=o._plots||[],s=l[r],f=o._has("cartesian");if(s){var c=s.overlays.map(function(U){return U.id});n=n.concat(c)}for(var u=n.length,v=new Array(u),h=new Array(u),d=!1,p=0;p<u;p++){var m=n[p];if(l[m])d=!0,v[p]=l[m].xaxis,h[p]=l[m].yaxis;else if(o[m]&&o[m]._subplot){var y=o[m]._subplot;v[p]=y.xaxis,h[p]=y.yaxis}else{Vt.warn("Unrecognized subplot: "+m);return}}var b=e.hovermode||o.hovermode;if(b&&!d&&(b="closest"),["x","y","closest","x unified","y unified"].indexOf(b)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return qs.unhoverRaw(t,e);var w=o.hoverdistance;w===-1&&(w=1/0);var g=o.spikedistance;g===-1&&(g=1/0);var x=[],_=[],k,T,S,D,L,R,z,N,H,$,P,A,M,C={hLinePoint:null,vLinePoint:null},E=!1;if(Array.isArray(e))for(b="array",S=0;S<e.length;S++)L=t.calcdata[e[S].curveNumber||0],L&&(R=L[0].trace,L[0].trace.hoverinfo!=="skip"&&(_.push(L),R.orientation==="h"&&(E=!0)));else{for(D=0;D<t.calcdata.length;D++)L=t.calcdata[D],R=L[0].trace,R.hoverinfo!=="skip"&&da.isTraceInSubplots(R,n)&&(_.push(L),R.orientation==="h"&&(E=!0));var F=!i,j,B;if(F)"xpx"in e?j=e.xpx:j=v[0]._length/2,"ypx"in e?B=e.ypx:B=h[0]._length/2;else{if(C5.triggerHandler(t,"plotly_beforehover",e)===!1)return;var G=i.getBoundingClientRect();j=e.clientX-G.left,B=e.clientY-G.top,o._calcInverseTransform(t);var O=Vt.apply3DTransform(o._invTransform)(j,B);if(j=O[0],B=O[1],j<0||j>v[0]._length||B<0||B>h[0]._length)return qs.unhoverRaw(t,e)}if(e.pointerX=j+v[0]._offset,e.pointerY=B+h[0]._offset,"xval"in e?k=da.flat(n,e.xval):k=da.p2c(v,j),"yval"in e?T=da.flat(n,e.yval):T=da.p2c(h,B),!Ya(k[0])||!Ya(T[0]))return Vt.warn("Fx.hover failed",e,t),qs.unhoverRaw(t,e)}var W=1/0;function V(U,q){for(D=0;D<_.length;D++)if(L=_[D],!(!L||!L[0]||!L[0].trace)&&(R=L[0].trace,!(R.visible!==!0||R._length===0)&&["carpet","contourcarpet"].indexOf(R._module.name)===-1)){if(R.type==="splom"?(N=0,z=n[N]):(z=da.getSubplot(R),N=n.indexOf(z)),H=b,da.isUnifiedHover(H)&&(H=H.charAt(0)),A={cd:L,trace:R,xa:v[N],ya:h[N],maxHoverDistance:w,maxSpikeDistance:g,index:!1,distance:Math.min(W,w),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:ar.defaultLine,name:R.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},o[z]&&(A.subplot=o[z]._subplot),o._splomScenes&&o._splomScenes[R.uid]&&(A.scene=o._splomScenes[R.uid]),M=x.length,H==="array"){var oe=e[D];"pointNumber"in oe?(A.index=oe.pointNumber,H="closest"):(H="","xval"in oe&&($=oe.xval,H="x"),"yval"in oe&&(P=oe.yval,H=H?"closest":"y"))}else U!==void 0&&q!==void 0?($=U,P=q):($=k[N],P=T[N]);if(w!==0)if(R._module&&R._module.hoverPoints){var ee=R._module.hoverPoints(A,$,P,H,{finiteRange:!0,hoverLayer:o._hoverlayer});if(ee)for(var Ce,Ae=0;Ae<ee.length;Ae++)Ce=ee[Ae],Ya(Ce.x0)&&Ya(Ce.y0)&&x.push(j5(Ce,b))}else Vt.log("Unrecognized trace type in hover:",R);if(b==="closest"&&x.length>M&&(x.splice(0,M),W=x[0].distance),f&&g!==0&&x.length===0){A.distance=g,A.index=!1;var he=R._module.hoverPoints(A,$,P,"closest",{hoverLayer:o._hoverlayer});if(he&&(he=he.filter(function(nt){return nt.spikeDistance<=g})),he&&he.length){var ne,Re=he.filter(function(nt){return nt.xa.showspikes&&nt.xa.spikesnap!=="hovered data"});if(Re.length){var je=Re[0];Ya(je.x0)&&Ya(je.y0)&&(ne=X(je),(!C.vLinePoint||C.vLinePoint.spikeDistance>ne.spikeDistance)&&(C.vLinePoint=ne))}var Ye=he.filter(function(nt){return nt.ya.showspikes&&nt.ya.spikesnap!=="hovered data"});if(Ye.length){var rt=Ye[0];Ya(rt.x0)&&Ya(rt.y0)&&(ne=X(rt),(!C.hLinePoint||C.hLinePoint.spikeDistance>ne.spikeDistance)&&(C.hLinePoint=ne))}}}}}V();function Z(U,q,oe){for(var ee=null,Ce=1/0,Ae,he=0;he<U.length;he++)Ae=U[he].spikeDistance,oe&&he===0&&(Ae=-1/0),Ae<=Ce&&Ae<=q&&(ee=U[he],Ce=Ae);return ee}function X(U){return U?{xa:U.xa,ya:U.ya,x:U.xSpike!==void 0?U.xSpike:(U.x0+U.x1)/2,y:U.ySpike!==void 0?U.ySpike:(U.y0+U.y1)/2,distance:U.distance,spikeDistance:U.spikeDistance,curveNumber:U.trace.index,color:U.color,pointNumber:U.index}:null}var Q={fullLayout:o,container:o._hoverlayer,event:e};t._spikepoints;var te={vLinePoint:C.vLinePoint,hLinePoint:C.hLinePoint};t._spikepoints=te;var xe=function(){x.sort(function(U,q){return U.distance-q.distance}),x=G5(x,b)};xe();var ue=b.charAt(0),ae=(ue==="x"||ue==="y")&&x[0]&&F5[x[0].trace.type];if(f&&g!==0&&x.length!==0){var le=x.filter(function(U){return U.ya.showspikes}),de=Z(le,g,ae);C.hLinePoint=X(de);var be=x.filter(function(U){return U.xa.showspikes}),Te=Z(be,g,ae);C.vLinePoint=X(Te)}if(x.length===0){var Le=qs.unhoverRaw(t,e);return f&&(C.hLinePoint!==null||C.vLinePoint!==null)&&Ag()&&kg(t,C,Q),Le}if(f&&Ag()&&kg(t,C,Q),da.isXYhover(H)&&x[0].length!==0&&x[0].trace.type!=="splom"){var _e=x[0];wg[_e.trace.type]?x=x.filter(function(U){return U.trace.index===_e.trace.index}):x=[_e];var Ie=x.length,ce=Sg("x",_e,o),ye=Sg("y",_e,o);V(ce,ye);var Ee=[],ze={},K=0,ke=function(U){var q=wg[U.trace.type]?TT(U):U.trace.index;if(!ze[q])K++,ze[q]=K,Ee.push(U);else{var oe=ze[q]-1,ee=Ee[oe];oe>0&&Math.abs(U.distance)<Math.abs(ee.distance)&&(Ee[oe]=U)}},re;for(re=0;re<Ie;re++)ke(x[re]);for(re=x.length-1;re>Ie-1;re--)ke(x[re]);x=Ee,xe()}var pe=t._hoverdata,we=[],se=ST(t),ie=LT(t);for(S=0;S<x.length;S++){var fe=x[S],ge=da.makeEventData(fe,fe.trace,fe.cd);if(fe.hovertemplate!==!1){var Me=!1;fe.cd[fe.index]&&fe.cd[fe.index].ht&&(Me=fe.cd[fe.index].ht),fe.hovertemplate=Me||fe.trace.hovertemplate||!1}if(fe.xa&&fe.ya){var Se=fe.x0+fe.xa._offset,Pe=fe.x1+fe.xa._offset,He=fe.y0+fe.ya._offset,Oe=fe.y1+fe.ya._offset,ve=Math.min(Se,Pe),Be=Math.max(Se,Pe),Ne=Math.min(He,Oe),We=Math.max(He,Oe);ge.bbox={x0:ve+ie,x1:Be+ie,y0:Ne+se,y1:We+se}}fe.eventData=[ge],we.push(ge)}t._hoverdata=we;var Ge=b==="y"&&(_.length>1||x.length>1)||b==="closest"&&E&&x.length>1,Ve=ar.combine(o.plot_bgcolor||ar.background,o.paper_bgcolor),Ue=kT(x,{gd:t,hovermode:b,rotateLabels:Ge,bgColor:Ve,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance}),I=Ue.hoverLabels;if(da.isUnifiedHover(b)||(H5(I,Ge,o,Ue.commonLabelBoundingBox),MT(I,Ge,o._invScaleX,o._invScaleY)),i&&i.tagName){var Y=Do.getComponentMethod("annotations","hasClickToShow")(t,we);D5(nn.select(i),Y?"pointer":"")}!i||a||!B5(t,e,pe)||(pe&&t.emit("plotly_unhover",{event:e,points:pe}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:v,yaxes:h,xvals:k,yvals:T}))}function TT(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}var N5=/<extra>([\s\S]*)<\/extra>/;function kT(t,e){var r=e.gd,a=r._fullLayout,i=e.hovermode,n=e.rotateLabels,o=e.bgColor,l=e.container,s=e.outerContainer,f=e.commonLabelOpts||{};if(t.length===0)return[[]];var c=e.fontFamily||gn.HOVERFONT,u=e.fontSize||gn.HOVERFONTSIZE,v=t[0],h=v.xa,d=v.ya,p=i.charAt(0),m=p+"Label",y=v[m];if(y===void 0&&h.type==="multicategory")for(var b=0;b<t.length&&(y=t[b][m],y===void 0);b++);var w=Nn(r,s),g=w.top,x=w.width,_=w.height,k=y!==void 0&&v.distance<=e.hoverdistance&&(i==="x"||i==="y");if(k){var T=!0,S,D;for(S=0;S<t.length;S++)if(T&&t[S].zLabel===void 0&&(T=!1),D=t[S].hoverinfo||t[S].trace.hoverinfo,D){var L=Array.isArray(D)?D:D.split("+");if(L.indexOf("all")===-1&&L.indexOf(i)===-1){k=!1;break}}T&&(k=!1)}var R=l.selectAll("g.axistext").data(k?[0]:[]);R.enter().append("g").classed("axistext",!0),R.exit().remove();var z={minX:0,maxX:0,minY:0,maxY:0};if(R.each(function(){var ce=nn.select(this),ye=Vt.ensureSingle(ce,"path","",function(We){We.style({"stroke-width":"1px"})}),Ee=Vt.ensureSingle(ce,"text","",function(We){We.attr("data-notex",1)}),ze=f.bgcolor||ar.defaultLine,K=f.bordercolor||ar.contrast(ze),ke=ar.contrast(ze),re={family:f.font.family||c,size:f.font.size||u,color:f.font.color||ke};ye.style({fill:ze,stroke:K}),Ee.text(y).call(Ea.font,re).call(qr.positionText,0,0).call(qr.convertToTspans,r),ce.attr("transform","");var pe=Nn(r,Ee.node()),we,se;if(i==="x"){var ie=h.side==="top"?"-":"";Ee.attr("text-anchor","middle").call(qr.positionText,0,h.side==="top"?g-pe.bottom-kt-ht:g-pe.top+kt+ht),we=h._offset+(v.x0+v.x1)/2,se=d._offset+(h.side==="top"?0:d._length);var fe=pe.width/2+ht;we<fe?(we=fe,ye.attr("d","M-"+(fe-kt)+",0L-"+(fe-kt*2)+","+ie+kt+"H"+fe+"v"+ie+(ht*2+pe.height)+"H-"+fe+"V"+ie+kt+"Z")):we>a.width-fe?(we=a.width-fe,ye.attr("d","M"+(fe-kt)+",0L"+fe+","+ie+kt+"v"+ie+(ht*2+pe.height)+"H-"+fe+"V"+ie+kt+"H"+(fe-kt*2)+"Z")):ye.attr("d","M0,0L"+kt+","+ie+kt+"H"+fe+"v"+ie+(ht*2+pe.height)+"H-"+fe+"V"+ie+kt+"H-"+kt+"Z"),z.minX=we-fe,z.maxX=we+fe,h.side==="top"?(z.minY=se-(ht*2+pe.height),z.maxY=se-ht):(z.minY=se+ht,z.maxY=se+(ht*2+pe.height))}else{var ge,Me,Se;d.side==="right"?(ge="start",Me=1,Se="",we=h._offset+h._length):(ge="end",Me=-1,Se="-",we=h._offset),se=d._offset+(v.y0+v.y1)/2,Ee.attr("text-anchor",ge),ye.attr("d","M0,0L"+Se+kt+","+kt+"V"+(ht+pe.height/2)+"h"+Se+(ht*2+pe.width)+"V-"+(ht+pe.height/2)+"H"+Se+kt+"V-"+kt+"Z"),z.minY=se-(ht+pe.height/2),z.maxY=se+(ht+pe.height/2),d.side==="right"?(z.minX=we+kt,z.maxX=we+kt+(ht*2+pe.width)):(z.minX=we-kt-(ht*2+pe.width),z.maxX=we-kt);var Pe=pe.height/2,He=g-pe.top-Pe,Oe="clip"+a._uid+"commonlabel"+d._id,ve;if(we<pe.width+2*ht+kt){ve="M-"+(kt+ht)+"-"+Pe+"h-"+(pe.width-ht)+"V"+Pe+"h"+(pe.width-ht)+"Z";var Be=pe.width-we+ht;qr.positionText(Ee,Be,He),ge==="end"&&Ee.selectAll("tspan").each(function(){var We=nn.select(this),Ge=Ea.tester.append("text").text(We.text()).call(Ea.font,re),Ve=Nn(r,Ge.node());Math.round(Ve.width)<Math.round(pe.width)&&We.attr("x",Be-Ve.width),Ge.remove()})}else qr.positionText(Ee,Me*(ht+kt),He),ve=null;var Ne=a._topclips.selectAll("#"+Oe).data(ve?[0]:[]);Ne.enter().append("clipPath").attr("id",Oe).append("path"),Ne.exit().remove(),Ne.select("path").attr("d",ve),Ea.setClipUrl(Ee,ve?Oe:null,r)}ce.attr("transform",lv(we,se))}),da.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var N=t.filter(function(ce){return ce.hoverinfo!=="none"});if(N.length===0)return[];var H=a.hoverlabel,$=H.font,P={showlegend:!0,legend:{title:{text:y,font:$},font:$,bgcolor:H.bgcolor,bordercolor:H.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},A={font:$};P5(P,A,r._fullData);var M=A.legend;M.entries=[];for(var C=0;C<N.length;C++){var E=N[C];if(E.hoverinfo!=="none"){var F=Tg(E,!0,i,a,y),j=F[0],B=F[1];E.name=B,B!==""?E.text=B+" : "+j:E.text=j;var G=E.cd[E.index];G&&(G.mc&&(E.mc=G.mc),G.mcc&&(E.mc=G.mcc),G.mlc&&(E.mlc=G.mlc),G.mlcc&&(E.mlc=G.mlcc),G.mlw&&(E.mlw=G.mlw),G.mrc&&(E.mrc=G.mrc),G.dir&&(E.dir=G.dir)),E._distinct=!0,M.entries.push([E])}}M.entries.sort(function(ce,ye){return ce[0].trace.index-ye[0].trace.index}),M.layer=l,M._inHover=!0,M._groupTitleFont=H.grouptitlefont,E5(r,M);var O=l.select("g.legend"),W=Nn(r,O.node()),V=W.width+2*ht,Z=W.height+2*ht,X=N[0],Q=(X.x0+X.x1)/2,te=(X.y0+X.y1)/2,xe=!(Do.traceIs(X.trace,"bar-like")||Do.traceIs(X.trace,"box-violin")),ue,ae;p==="y"?xe?(ae=te-ht,ue=te+ht):(ae=Math.min.apply(null,N.map(function(ce){return Math.min(ce.y0,ce.y1)})),ue=Math.max.apply(null,N.map(function(ce){return Math.max(ce.y0,ce.y1)}))):ae=ue=Vt.mean(N.map(function(ce){return(ce.y0+ce.y1)/2}))-Z/2;var le,de;p==="x"?xe?(le=Q+ht,de=Q-ht):(le=Math.max.apply(null,N.map(function(ce){return Math.max(ce.x0,ce.x1)})),de=Math.min.apply(null,N.map(function(ce){return Math.min(ce.x0,ce.x1)}))):le=de=Vt.mean(N.map(function(ce){return(ce.x0+ce.x1)/2}))-V/2;var be=h._offset,Te=d._offset;ue+=Te,le+=be,de+=be-V,ae+=Te-Z;var Le,_e;return le+V<x&&le>=0?Le=le:de+V<x&&de>=0?Le=de:be+V<x?Le=be:le-Q<Q-de+V?Le=x-V:Le=0,Le+=ht,ue+Z<_&&ue>=0?_e=ue:ae+Z<_&&ae>=0?_e=ae:Te+Z<_?_e=Te:ue-te<te-ae+Z?_e=_-Z:_e=0,_e+=ht,O.attr("transform",lv(Le-1,_e-1)),O}var Ie=l.selectAll("g.hovertext").data(t,function(ce){return TT(ce)});return Ie.enter().append("g").classed("hovertext",!0).each(function(){var ce=nn.select(this);ce.append("rect").call(ar.fill,ar.addOpacity(o,.8)),ce.append("text").classed("name",!0),ce.append("path").style("stroke-width","1px"),ce.append("text").classed("nums",!0).call(Ea.font,c,u)}),Ie.exit().remove(),Ie.each(function(ce){var ye=nn.select(this).attr("transform",""),Ee=ce.color;Array.isArray(Ee)&&(Ee=Ee[ce.eventData[0].pointNumber]);var ze=ce.bgcolor||Ee,K=ar.combine(ar.opacity(ze)?ze:ar.defaultLine,o),ke=ar.combine(ar.opacity(Ee)?Ee:ar.defaultLine,o),re=ce.borderColor||ar.contrast(K),pe=Tg(ce,k,i,a,y,ye),we=pe[0],se=pe[1],ie=ye.select("text.nums").call(Ea.font,ce.fontFamily||c,ce.fontSize||u,ce.fontColor||re).text(we).attr("data-notex",1).call(qr.positionText,0,0).call(qr.convertToTspans,r),fe=ye.select("text.name"),ge=0,Me=0;if(se&&se!==we){fe.call(Ea.font,ce.fontFamily||c,ce.fontSize||u,ke).text(se).attr("data-notex",1).call(qr.positionText,0,0).call(qr.convertToTspans,r);var Se=Nn(r,fe.node());ge=Se.width+2*ht,Me=Se.height+2*ht}else fe.remove(),ye.select("rect").remove();ye.select("path").style({fill:K,stroke:re});var Pe=ce.xa._offset+(ce.x0+ce.x1)/2,He=ce.ya._offset+(ce.y0+ce.y1)/2,Oe=Math.abs(ce.x1-ce.x0),ve=Math.abs(ce.y1-ce.y0),Be=Nn(r,ie.node()),Ne=Be.width/a._invScaleX,We=Be.height/a._invScaleY;ce.ty0=(g-Be.top)/a._invScaleY,ce.bx=Ne+2*ht,ce.by=Math.max(We+2*ht,Me),ce.anchor="start",ce.txwidth=Ne,ce.tx2width=ge,ce.offset=0;var Ge=(Ne+kt+ht+ge)*a._invScaleX,Ve,Ue;if(n)ce.pos=Pe,Ve=He+ve/2+Ge<=_,Ue=He-ve/2-Ge>=0,(ce.idealAlign==="top"||!Ve)&&Ue?(He-=ve/2,ce.anchor="end"):Ve?(He+=ve/2,ce.anchor="start"):ce.anchor="middle",ce.crossPos=He;else{if(ce.pos=He,Ve=Pe+Oe/2+Ge<=x,Ue=Pe-Oe/2-Ge>=0,(ce.idealAlign==="left"||!Ve)&&Ue)Pe-=Oe/2,ce.anchor="end";else if(Ve)Pe+=Oe/2,ce.anchor="start";else{ce.anchor="middle";var I=Ge/2,Y=Pe+I-x,U=Pe-I;Y>0&&(Pe-=Y),U<0&&(Pe+=-U)}ce.crossPos=Pe}ie.attr("text-anchor",ce.anchor),ge&&fe.attr("text-anchor",ce.anchor),ye.attr("transform",lv(Pe,He)+(n?L5(wT):""))}),{hoverLabels:Ie,commonLabelBoundingBox:z}}function Tg(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=Vt.templateString(t.name,t.trace._meta)),o=Mg(t.name,t.nameLength));var s=r.charAt(0),f=s==="x"?"y":"x";t.zLabel!==void 0?(t.xLabel!==void 0&&(l+="x: "+t.xLabel+"<br>"),t.yLabel!==void 0&&(l+="y: "+t.yLabel+"<br>"),t.trace.type!=="choropleth"&&t.trace.type!=="choroplethmapbox"&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[s+"Label"]===i?l=t[f+"Label"]||"":t.xLabel===void 0?t.yLabel!==void 0&&t.trace.type!=="scattercarpet"&&(l=t.yLabel):t.yLabel===void 0?l=t.xLabel:l="("+t.xLabel+", "+t.yLabel+")",(t.text||t.text===0)&&!Array.isArray(t.text)&&(l+=(l?"<br>":"")+t.text),t.extraText!==void 0&&(l+=(l?"<br>":"")+t.extraText),n&&l===""&&!t.hovertemplate&&(o===""&&n.remove(),l=o);var c=t.hovertemplate||!1;if(c){var u=t.hovertemplateLabels||t;t[s+"Label"]!==i&&(u[s+"other"]=u[s+"Val"],u[s+"otherLabel"]=u[s+"Label"]),l=Vt.hovertemplateString(c,u,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(N5,function(v,h){return o=Mg(h,t.nameLength),""})}return[l,o]}function H5(t,e,r,a){var i=e?"xa":"ya",n=e?"ya":"xa",o=0,l=1,s=t.size(),f=new Array(s),c=0,u=a.minX,v=a.maxX,h=a.minY,d=a.maxY,p=function($){return $*r._invScaleX},m=function($){return $*r._invScaleY};t.each(function($){var P=$[i],A=$[n],M=P._id.charAt(0)==="x",C=P.range;c===0&&C&&C[0]>C[1]!==M&&(l=-1);var E=0,F=M?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var j=AT($,e),B=$.anchor,G=B==="end"?-1:1,O,W;if(B==="middle")O=$.crossPos+(M?m(j.y-$.by/2):p($.bx/2+$.tx2width/2)),W=O+(M?m($.by):p($.bx));else if(M)O=$.crossPos+m(kt+j.y)-m($.by/2-kt),W=O+m($.by);else{var V=p(G*kt+j.x),Z=V+p(G*$.bx);O=$.crossPos+Math.min(V,Z),W=$.crossPos+Math.max(V,Z)}M?h!==void 0&&d!==void 0&&Math.min(W,d)-Math.max(O,h)>1&&(A.side==="left"?(E=A._mainLinePosition,F=r.width):F=A._mainLinePosition):u!==void 0&&v!==void 0&&Math.min(W,v)-Math.max(O,u)>1&&(A.side==="top"?(E=A._mainLinePosition,F=r.height):F=A._mainLinePosition)}f[c++]=[{datum:$,traceIndex:$.trace.index,dp:0,pos:$.pos,posref:$.posref,size:$.by*(M?R5:1)/2,pmin:E,pmax:F}]}),f.sort(function($,P){return $[0].posref-P[0].posref||l*(P[0].traceIndex-$[0].traceIndex)});var y,b,w,g,x,_,k;function T($){var P=$[0],A=$[$.length-1];if(b=P.pmin-P.pos-P.dp+P.size,w=A.pos+A.dp+A.size-P.pmax,b>.01){for(x=$.length-1;x>=0;x--)$[x].dp+=b;y=!1}if(!(w<.01)){if(b<-.01){for(x=$.length-1;x>=0;x--)$[x].dp-=w;y=!1}if(y){var M=0;for(g=0;g<$.length;g++)_=$[g],_.pos+_.dp+_.size>P.pmax&&M++;for(g=$.length-1;g>=0&&!(M<=0);g--)_=$[g],_.pos>P.pmax-1&&(_.del=!0,M--);for(g=0;g<$.length&&!(M<=0);g++)if(_=$[g],_.pos<P.pmin+1)for(_.del=!0,M--,w=_.size*2,x=$.length-1;x>=0;x--)$[x].dp-=w;for(g=$.length-1;g>=0&&!(M<=0);g--)_=$[g],_.pos+_.dp+_.size>P.pmax&&(_.del=!0,M--)}}}for(;!y&&o<=s;){for(o++,y=!0,g=0;g<f.length-1;){var S=f[g],D=f[g+1],L=S[S.length-1],R=D[0];if(b=L.pos+L.dp+L.size-R.pos-R.dp+R.size,b>.01&&L.pmin===R.pmin&&L.pmax===R.pmax){for(x=D.length-1;x>=0;x--)D[x].dp+=b;for(S.push.apply(S,D),f.splice(g+1,1),k=0,x=S.length-1;x>=0;x--)k+=S[x].dp;for(w=k/S.length,x=S.length-1;x>=0;x--)S[x].dp-=w;y=!1}else g++}f.forEach(T)}for(g=f.length-1;g>=0;g--){var z=f[g];for(x=z.length-1;x>=0;x--){var N=z[x],H=N.datum;H.offset=N.dp,H.del=N.del}}}function AT(t,e){var r=0,a=t.offset;return e&&(a*=-I5,r=t.offset*z5),{x:r,y:a}}function O5(t){var e={start:1,end:-1,middle:0}[t.anchor],r=e*(kt+ht),a=r+e*(t.txwidth+ht),i=t.anchor==="middle";return i&&(r-=t.tx2width/2,a+=t.txwidth/2+ht),{alignShift:e,textShiftX:r,text2ShiftX:a}}function MT(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=nn.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,u=O5(o),v=AT(o,e),h=v.x,d=v.y,p=f==="middle";l.select("path").attr("d",p?"M-"+i(o.bx/2+o.tx2width/2)+","+n(d-o.by/2)+"h"+i(o.bx)+"v"+n(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(c*kt+h)+","+n(kt+d)+"v"+n(o.by/2-kt)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*kt+h)+"V"+n(d-kt)+"Z");var m=h+u.textShiftX,y=d+o.ty0-o.by/2+ht,b=o.textAlign||"auto";b!=="auto"&&(b==="left"&&f!=="start"?(s.attr("text-anchor","start"),m=p?-o.bx/2-o.tx2width/2+ht:-o.bx-ht):b==="right"&&f!=="end"&&(s.attr("text-anchor","end"),m=p?o.bx/2-o.tx2width/2-ht:o.bx+ht)),s.call(qr.positionText,i(m),n(y)),o.tx2width&&(l.select("text.name").call(qr.positionText,i(u.text2ShiftX+u.alignShift*ht+h),n(d+o.ty0-o.by/2+ht)),l.select("rect").call(Ea.setRect,i(u.text2ShiftX+(u.alignShift-1)*o.tx2width/2+h),n(d-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function j5(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(v){return v||Ya(v)&&v===0}var l=Array.isArray(r)?function(v,h){var d=Vt.castOption(i,r,v);return o(d)?d:Vt.extractOption({},a,"",h)}:function(v,h){return Vt.extractOption(n,a,v,h)};function s(v,h,d){var p=l(h,d);o(p)&&(t[v]=p)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),t.posref=e==="y"||e==="closest"&&a.orientation==="h"?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=Vt.constrain(t.x0,0,t.xa._length),t.x1=Vt.constrain(t.x1,0,t.xa._length),t.y0=Vt.constrain(t.y0,0,t.ya._length),t.y1=Vt.constrain(t.y1,0,t.ya._length),t.xLabelVal!==void 0&&(t.xLabel="xLabel"in t?t.xLabel:mi.hoverLabelText(t.xa,t.xLabelVal,a.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),t.yLabelVal!==void 0&&(t.yLabel="yLabel"in t?t.yLabel:mi.hoverLabelText(t.ya,t.yLabelVal,a.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),t.zLabelVal!==void 0&&t.zLabel===void 0&&(t.zLabel=String(t.zLabelVal)),!isNaN(t.xerr)&&!(t.xa.type==="log"&&t.xerr<=0)){var f=mi.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+mi.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,e==="x"&&(t.distance+=1)}if(!isNaN(t.yerr)&&!(t.ya.type==="log"&&t.yerr<=0)){var c=mi.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+mi.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+c,e==="y"&&(t.distance+=1)}var u=t.hoverinfo||t.trace.hoverinfo;return u&&u!=="all"&&(u=Array.isArray(u)?u:u.split("+"),u.indexOf("x")===-1&&(t.xLabel=void 0),u.indexOf("y")===-1&&(t.yLabel=void 0),u.indexOf("z")===-1&&(t.zLabel=void 0),u.indexOf("text")===-1&&(t.text=void 0),u.indexOf("name")===-1&&(t.name=void 0)),t}function kg(t,e,r){var a=r.container,i=r.fullLayout,n=i._size,o=r.event,l=!!e.hLinePoint,s=!!e.vLinePoint,f,c;if(a.selectAll(".spikeline").remove(),!!(s||l)){var u=ar.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var v=e.hLinePoint,h,d;f=v&&v.xa,c=v&&v.ya;var p=c.spikesnap;p==="cursor"?(h=o.pointerX,d=o.pointerY):(h=f._offset+v.x,d=c._offset+v.y);var m=_g.readability(v.color,u)<1.5?ar.contrast(u):v.color,y=c.spikemode,b=c.spikethickness,w=c.spikecolor||m,g=mi.getPxPosition(t,c),x,_;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(x=g,_=h),y.indexOf("across")!==-1){var k=c._counterDomainMin,T=c._counterDomainMax;c.anchor==="free"&&(k=Math.min(k,c.position),T=Math.max(T,c.position)),x=n.l+k*n.w,_=n.l+T*n.w}a.insert("line",":first-child").attr({x1:x,x2:_,y1:d,y2:d,"stroke-width":b,stroke:w,"stroke-dasharray":Ea.dashStyle(c.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:x,x2:_,y1:d,y2:d,"stroke-width":b+2,stroke:u}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:g+(c.side!=="right"?b:-b),cy:d,r:b,fill:w}).classed("spikeline",!0)}if(s){var S=e.vLinePoint,D,L;f=S&&S.xa,c=S&&S.ya;var R=f.spikesnap;R==="cursor"?(D=o.pointerX,L=o.pointerY):(D=f._offset+S.x,L=c._offset+S.y);var z=_g.readability(S.color,u)<1.5?ar.contrast(u):S.color,N=f.spikemode,H=f.spikethickness,$=f.spikecolor||z,P=mi.getPxPosition(t,f),A,M;if(N.indexOf("toaxis")!==-1||N.indexOf("across")!==-1){if(N.indexOf("toaxis")!==-1&&(A=P,M=L),N.indexOf("across")!==-1){var C=f._counterDomainMin,E=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),E=Math.max(E,f.position)),A=n.t+(1-E)*n.h,M=n.t+(1-C)*n.h}a.insert("line",":first-child").attr({x1:D,x2:D,y1:A,y2:M,"stroke-width":H,stroke:$,"stroke-dasharray":Ea.dashStyle(f.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:D,x2:D,y1:A,y2:M,"stroke-width":H+2,stroke:u}).classed("spikeline",!0).classed("crisp",!0)}N.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:D,cy:P-(f.side!=="top"?H:-H),r:H,fill:$}).classed("spikeline",!0)}}}function B5(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var a=r.length-1;a>=0;a--){var i=r[a],n=t._hoverdata[a];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers))return!0}return!1}function Ag(t,e){return!0}function Mg(t,e){return qr.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function G5(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];Do.traceIs(l.trace,"bar-like")||Do.traceIs(l.trace,"box-violin")?n.push(l):l.trace[r+"period"]?i.push(l):a.push(l)}return a.concat(i).concat(n)}function Sg(t,e,r){var a=e[t+"a"],i=e[t+"Val"],n=e.cd[0];if(a.type==="category"||a.type==="multicategory")i=a._categoriesMap[i];else if(a.type==="date"){var o=e.trace[t+"periodalignment"];if(o){var l=e.cd[e.index],s=l[t+"Start"];s===void 0&&(s=l[t]);var f=l[t+"End"];f===void 0&&(f=l[t]);var c=f-s;o==="end"?i+=c:o==="middle"&&(i+=c/2)}i=a.d2c(i)}return n&&n.t&&n.t.posLetter===a._id&&(r.boxmode==="group"||r.violinmode==="group")&&(i+=n.t.dPos),i}function ST(t){return t.offsetTop+t.clientTop}function LT(t){return t.offsetLeft+t.clientLeft}function Nn(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.left,n=a.top,o=i+a.width,l=n+a.height,s=Vt.apply3DTransform(r._invTransform)(i,n),f=Vt.apply3DTransform(r._invTransform)(o,l),c=s[0],u=s[1],v=f[0],h=f[1];return{x:c,y:u,width:v-c,height:h-u,top:Math.min(u,h),left:Math.min(c,v),right:Math.max(c,v),bottom:Math.max(u,h)}}var U5=me,V5=ot,X5=la.isUnifiedHover,Tp=function(e,r,a,i){i=i||{};var n=r.legend;function o(l){i.font[l]||(i.font[l]=n?r.legend.font[l]:r.font[l])}r&&X5(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=V5.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),a("hoverlabel.bgcolor",i.bgcolor),a("hoverlabel.bordercolor",i.bordercolor),a("hoverlabel.namelength",i.namelength),U5.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},Y5=me,W5=Tp,q5=fs,Z5=function(e,r){function a(i,n){return Y5.coerce(e,r,q5,i,n)}W5(e,r,a)},Lg=me,K5=Rc,Q5=Tp,J5=function(e,r,a,i){function n(l,s){return Lg.coerce(e,r,K5,l,s)}var o=Lg.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Q5(e,r,n,o)},eP=me,tP=fs,CT=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:eP.coerce(e,r,tP,i,n)}return a("clickmode"),a("hovermode")},Cg=me,rP=fs,aP=CT,iP=Tp,nP=function(e,r){function a(f,c){return Cg.coerce(e,r,rP,f,c)}var i=aP(e,r);i&&(a("hoverdistance"),a("spikedistance"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=r._has("mapbox"),l=r._has("geo"),s=r._basePlotModules.length;r.dragmode==="zoom"&&((o||l)&&s===1||o&&l&&s===2)&&(r.dragmode="pan"),iP(e,r,a),Cg.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},rh=me,Dg=Je,oP=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return rh.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!Dg.traceIs(l,"pie-like")){var s=Dg.traceIs(l,"2dMap")?lP:rh.fillArray;s(l.hoverinfo,o,"hi",i(l)),l.hovertemplate&&s(l.hovertemplate,o,"ht"),l.hoverlabel&&(s(l.hoverlabel.bgcolor,o,"hbg"),s(l.hoverlabel.bordercolor,o,"hbc"),s(l.hoverlabel.font.size,o,"hts"),s(l.hoverlabel.font.color,o,"htc"),s(l.hoverlabel.font.family,o,"htf"),s(l.hoverlabel.namelength,o,"hnl"),s(l.hoverlabel.align,o,"hta"))}}};function lP(t,e,r,a){a=a||rh.identity,Array.isArray(t)&&(e[0][r]=a(t))}var sP=Je,fP=Jc.hover,cP=function(e,r,a){var i=sP.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&fP(e,r,a,!0);function n(){e.emit("plotly_click",{points:e._hoverdata,event:r})}e._hoverdata&&r&&r.target&&(i&&i.then?i.then(n):n(),r.stopImmediatePropagation&&r.stopImmediatePropagation())},uP=ft,cc=me,vP=Oa,fl=la,Pg=fs,Eg=Jc,_a={moduleType:"component",name:"fx",constants:Ec,schema:{layout:Pg},attributes:Rc,layoutAttributes:Pg,supplyLayoutGlobalDefaults:Z5,supplyDefaults:J5,supplyLayoutDefaults:nP,calc:oP,getDistanceFunction:fl.getDistanceFunction,getClosest:fl.getClosest,inbox:fl.inbox,quadrature:fl.quadrature,appendArrayPointValue:fl.appendArrayPointValue,castHoverOption:hP,castHoverinfo:pP,hover:Eg.hover,unhover:vP.unhover,loneHover:Eg.loneHover,loneUnhover:dP,click:cP};function dP(t){var e=cc.isD3Selection(t)?t:uP.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function hP(t,e,r){return cc.castOption(t,e,"hoverlabel."+r)}function pP(t,e,r){function a(i){return cc.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return cc.castOption(t,r,"hoverinfo",a)}var Cn={};(function(t){t.selectMode=function(e){return e==="lasso"||e==="select"},t.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.openMode=function(e){return e==="drawline"||e==="drawopenpath"},t.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}})(Cn);var kp=function(e){var r=e._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})},tu={},DT={exports:{}},Ap={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("")}},Ii={},Zs=32,Mp={CIRCLE_SIDES:Zs,i000:0,i090:Zs/4,i180:Zs/2,i270:Zs/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},mP=me.strTranslate;function PT(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}function yP(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}}function gP(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return PT(t,r[e])}}function bP(t){return mP(t.xaxis._offset,t.yaxis._offset)}var Sp={p2r:PT,r2p:yP,axValue:gP,getTransform:bP};(function(t){var e=i_,r=Mp,a=r.CIRCLE_SIDES,i=r.SQRT2,n=Sp,o=n.p2r,l=n.r2p,s=[0,3,4,5,6,1,2],f=[0,3,4,1,2];t.writePaths=function(v){var h=v.length;if(!h)return"M0,0Z";for(var d="",p=0;p<h;p++)for(var m=v[p].length,y=0;y<m;y++){var b=v[p][y][0];if(b==="Z")d+="Z";else for(var w=v[p][y].length,g=0;g<w;g++){var x=g;b==="Q"||b==="S"?x=f[g]:b==="C"&&(x=s[g]),d+=v[p][y][x],g>0&&g<w-1&&(d+=",")}}return d},t.readPaths=function(v,h,d,p){var m=e(v),y=[],b=-1,w=function(){b++,y[b]=[]},g,x=0,_=0,k,T,S=function(){k=x,T=_};S();for(var D=0;D<m.length;D++){var L=[],R,z,N,H,$=m[D][0],P=$;switch($){case"M":w(),x=+m[D][1],_=+m[D][2],L.push([P,x,_]),S();break;case"Q":case"S":R=+m[D][1],N=+m[D][2],x=+m[D][3],_=+m[D][4],L.push([P,x,_,R,N]);break;case"C":R=+m[D][1],N=+m[D][2],z=+m[D][3],H=+m[D][4],x=+m[D][5],_=+m[D][6],L.push([P,x,_,R,N,z,H]);break;case"T":case"L":x=+m[D][1],_=+m[D][2],L.push([P,x,_]);break;case"H":P="L",x=+m[D][1],L.push([P,x,_]);break;case"V":P="L",_=+m[D][1],L.push([P,x,_]);break;case"A":P="L";var A=+m[D][1],M=+m[D][2];+m[D][4]||(A=-A,M=-M);var C=x-A,E=_;for(g=1;g<=a/2;g++){var F=2*Math.PI*g/a;L.push([P,C+A*Math.cos(F),E+M*Math.sin(F)])}break;case"Z":(x!==k||_!==T)&&(x=k,_=T,L.push([P,x,_]));break}for(var j=(d||{}).domain,B=h._fullLayout._size,G=d&&d.xsizemode==="pixel",O=d&&d.ysizemode==="pixel",W=p===!1,V=0;V<L.length;V++){for(g=0;g+2<7;g+=2){var Z=L[V][g+1],X=L[V][g+2];Z===void 0||X===void 0||(x=Z,_=X,d&&(d.xaxis&&d.xaxis.p2r?(W&&(Z-=d.xaxis._offset),G?Z=l(d.xaxis,d.xanchor)+Z:Z=o(d.xaxis,Z)):(W&&(Z-=B.l),j?Z=j.x[0]+Z/B.w:Z=Z/B.w),d.yaxis&&d.yaxis.p2r?(W&&(X-=d.yaxis._offset),O?X=l(d.yaxis,d.yanchor)-X:X=o(d.yaxis,X)):(W&&(X-=B.t),j?X=j.y[1]-X/B.h:X=1-X/B.h)),L[V][g+1]=Z,L[V][g+2]=X)}y[b].push(L[V].slice())}}return y};function c(v,h){return Math.abs(v-h)<=1e-6}function u(v,h){var d=h[1]-v[1],p=h[2]-v[2];return Math.sqrt(d*d+p*p)}t.pointsOnRectangle=function(v){var h=v.length;if(h!==5)return!1;for(var d=1;d<3;d++){var p=v[0][d]-v[1][d],m=v[3][d]-v[2][d];if(!c(p,m))return!1;var y=v[0][d]-v[3][d],b=v[1][d]-v[2][d];if(!c(y,b))return!1}return!c(v[0][1],v[1][1])&&!c(v[0][1],v[3][1])?!1:!!(u(v[0],v[1])*u(v[0],v[3]))},t.pointsOnEllipse=function(v){var h=v.length;if(h!==a+1)return!1;h=a;for(var d=0;d<h;d++){var p=(h*2-d)%h,m=(h/2+p)%h,y=(h/2+d)%h;if(!c(u(v[d],v[y]),u(v[p],v[m])))return!1}return!0},t.handleEllipse=function(v,h,d){if(!v)return[h,d];var p=t.ellipseOver({x0:h[0],y0:h[1],x1:d[0],y1:d[1]}),m=(p.x1+p.x0)/2,y=(p.y1+p.y0)/2,b=(p.x1-p.x0)/2,w=(p.y1-p.y0)/2;b||(b=w=w/i),w||(w=b=b/i);for(var g=[],x=0;x<a;x++){var _=x*2*Math.PI/a;g.push([m+b*Math.cos(_),y+w*Math.sin(_)])}return g},t.ellipseOver=function(v){var h=v.x0,d=v.y0,p=v.x1,m=v.y1,y=p-h,b=m-d;h-=y,d-=b;var w=(h+p)/2,g=(d+m)/2,x=i;return y*=x,b*=x,{x0:w-y,y0:g-b,x1:w+y,y1:g+b}},t.fixDatesForPaths=function(v,h,d){var p=h.type==="date",m=d.type==="date";if(!p&&!m)return v;for(var y=0;y<v.length;y++)for(var b=0;b<v[y].length;b++)for(var w=0;w+2<v[y][b].length;w+=2)p&&(v[y][b][w+1]=v[y][b][w+1].replace(" ","_")),m&&(v[y][b][w+2]=v[y][b][w+2].replace(" ","_"));return v}})(Ii);var ET=Cn,xP=ET.drawMode,_P=ET.openMode,Wo=Mp,Rg=Wo.i000,zg=Wo.i090,Ig=Wo.i180,Fg=Wo.i270,wP=Wo.cos45,TP=Wo.sin45,RT=Sp,Ks=RT.p2r,ci=RT.r2p,kP=An,AP=kP.clearOutline,ru=Ii,MP=ru.readPaths,SP=ru.writePaths,LP=ru.ellipseOver,CP=ru.fixDatesForPaths;function DP(t,e){if(t.length){var r=t[0][0];if(r){var a=e.gd,i=e.isActiveShape,n=e.dragmode,o=(a.layout||{}).shapes||[];if(!xP(n)&&i!==void 0){var l=a._fullLayout._activeShapeIndex;if(l<o.length)switch(a._fullLayout.shapes[l].type){case"rect":n="drawrect";break;case"circle":n="drawcircle";break;case"line":n="drawline";break;case"path":var s=o[l].path||"";s[s.length-1]==="Z"?n="drawclosedpath":n="drawopenpath";break}}var f=zT(t,e,n);AP(a);for(var c=e.editHelpers,u=(c||{}).modifyItem,v=[],h=0;h<o.length;h++){var d=a._fullLayout.shapes[h];if(v[h]=d._input,i!==void 0&&h===a._fullLayout._activeShapeIndex){var p=f;switch(d.type){case"line":case"rect":case"circle":u("x0",p.x0),u("x1",p.x1),u("y0",p.y0),u("y1",p.y1);break;case"path":u("path",p.path);break}}}return i===void 0?(v.push(f),v):c?c.getUpdateObj():{}}}}function zT(t,e,r){var a=t[0][0],i=e.gd,n=a.getAttribute("d"),o=i._fullLayout.newshape,l=e.plotinfo,s=e.isActiveShape,f=l.xaxis,c=l.yaxis,u=!!l.domain||!l.xaxis,v=!!l.domain||!l.yaxis,h=_P(r),d=MP(n,i,l,s),p={editable:!0,visible:o.visible,name:o.name,showlegend:o.showlegend,legend:o.legend,legendwidth:o.legendwidth,legendgroup:o.legendgroup,legendgrouptitle:{text:o.legendgrouptitle.text,font:o.legendgrouptitle.font},legendrank:o.legendrank,label:o.label,xref:u?"paper":f._id,yref:v?"paper":c._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};h||(p.fillcolor=o.fillcolor,p.fillrule=o.fillrule);var m;if(d.length===1&&(m=d[0]),m&&m.length===5&&r==="drawrect")p.type="rect",p.x0=m[0][1],p.y0=m[0][2],p.x1=m[2][1],p.y1=m[2][2];else if(m&&r==="drawline")p.type="line",p.x0=m[0][1],p.y0=m[0][2],p.x1=m[1][1],p.y1=m[1][2];else if(m&&r==="drawcircle"){p.type="circle";var y=m[Rg][1],b=m[zg][1],w=m[Ig][1],g=m[Fg][1],x=m[Rg][2],_=m[zg][2],k=m[Ig][2],T=m[Fg][2],S=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),D=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");S&&(y=ci(l.xaxis,y),b=ci(l.xaxis,b),w=ci(l.xaxis,w),g=ci(l.xaxis,g)),D&&(x=ci(l.yaxis,x),_=ci(l.yaxis,_),k=ci(l.yaxis,k),T=ci(l.yaxis,T));var L=(b+g)/2,R=(x+k)/2,z=(g-b+w-y)/2,N=(T-_+k-x)/2,H=LP({x0:L,y0:R,x1:L+z*wP,y1:R+N*TP});S&&(H.x0=Ks(l.xaxis,H.x0),H.x1=Ks(l.xaxis,H.x1)),D&&(H.y0=Ks(l.yaxis,H.y0),H.y1=Ks(l.yaxis,H.y1)),p.x0=H.x0,p.y0=H.y0,p.x1=H.x1,p.y1=H.y1}else p.type="path",f&&c&&CP(d,f,c),p.path=SP(d),m=null;return p}var Lp={newShapes:DP,createShapeObj:zT},PP=Cn,EP=PP.selectMode,RP=An,zP=RP.clearOutline,Cp=Ii,IP=Cp.readPaths,FP=Cp.writePaths,$P=Cp.fixDatesForPaths,IT=function(e,r){if(e.length){var a=e[0][0];if(a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newselection,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=r.isActiveSelection,u=r.dragmode,v=(n.layout||{}).selections||[];if(!EP(u)&&c!==void 0){var h=n._fullLayout._activeSelectionIndex;if(h<v.length)switch(n._fullLayout.selections[h].type){case"rect":u="select";break;case"path":u="lasso";break}}var d=IP(i,n,l,c),p={xref:s._id,yref:f._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},m;d.length===1&&(m=d[0]),m&&m.length===5&&u==="select"?(p.type="rect",p.x0=m[0][1],p.y0=m[0][2],p.x1=m[2][1],p.y1=m[2][2]):(p.type="path",s&&f&&$P(d,s,f),p.path=FP(d),m=null),zP(n);for(var y=r.editHelpers,b=(y||{}).modifyItem,w=[],g=0;g<v.length;g++){var x=n._fullLayout.selections[g];if(!x){w[g]=x;continue}if(w[g]=x._input,c!==void 0&&g===n._fullLayout._activeSelectionIndex){var _=p;switch(x.type){case"rect":b("x0",_.x0),b("x1",_.x1),b("y0",_.y0),b("y1",_.y1);break;case"path":b("path",_.path);break}}}return c===void 0?(w.push(p),w):y?y.getUpdateObj():{}}}},Fi={},au={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}};(function(t){var e=au,r=me,a=Dt;t.rangeToShapePosition=function(n){return n.type==="log"?n.r2d:function(o){return o}},t.shapePositionToRange=function(n){return n.type==="log"?n.d2r:function(o){return o}},t.decodeDate=function(n){return function(o){return o.replace&&(o=o.replace("_"," ")),n(o)}},t.encodeDate=function(n){return function(o){return n(o).replace(" ","_")}},t.extractPathCoords=function(n,o,l){var s=[],f=n.match(e.segmentRE);return f.forEach(function(c){var u=o[c.charAt(0)].drawn;if(u!==void 0){var v=c.substr(1).match(e.paramRE);if(!(!v||v.length<u)){var h=v[u],d=l?h:r.cleanNumber(h);s.push(d)}}}),s},t.getDataToPixel=function(n,o,l,s){var f=n._fullLayout._size,c;if(o)if(s==="domain")c=function(v){return o._length*(l?1-v:v)+o._offset};else{var u=t.shapePositionToRange(o);c=function(v){return o._offset+o.r2p(u(v,!0))},o.type==="date"&&(c=t.decodeDate(c))}else l?c=function(v){return f.t+f.h*(1-v)}:c=function(v){return f.l+f.w*v};return c},t.getPixelToData=function(n,o,l,s){var f=n._fullLayout._size,c;if(o)if(s==="domain")c=function(v){var h=(v-o._offset)/o._length;return l?1-h:h};else{var u=t.rangeToShapePosition(o);c=function(v){return u(o.p2r(v-o._offset))}}else l?c=function(v){return 1-(v-f.t)/f.h}:c=function(v){return(v-f.l)/f.w};return c},t.roundPositionForSharpStrokeRendering=function(n,o){var l=Math.round(o%2)===1,s=Math.round(n);return l?s+.5:s},t.makeShapesOptionsAndPlotinfo=function(n,o){var l=n._fullLayout.shapes[o]||{},s=n._fullLayout._plots[l.xref+l.yref],f=!!s;return f?s._hadPlotinfo=!0:(s={},l.xref&&l.xref!=="paper"&&(s.xaxis=n._fullLayout[l.xref+"axis"]),l.yref&&l.yref!=="paper"&&(s.yaxis=n._fullLayout[l.yref+"axis"])),s.xsizemode=l.xsizemode,s.ysizemode=l.ysizemode,s.xanchor=l.xanchor,s.yanchor=l.yanchor,{options:l,plotinfo:s}},t.makeSelectionsOptionsAndPlotinfo=function(n,o){var l=n._fullLayout.selections[o]||{},s=n._fullLayout._plots[l.xref+l.yref],f=!!s;return f?s._hadPlotinfo=!0:(s={},l.xref&&(s.xaxis=n._fullLayout[l.xref+"axis"]),l.yref&&(s.yaxis=n._fullLayout[l.yref+"axis"])),{options:l,plotinfo:s}},t.getPathString=function(n,o){var l=o.type,s=a.getRefType(o.xref),f=a.getRefType(o.yref),c=a.getFromId(n,o.xref),u=a.getFromId(n,o.yref),v=n._fullLayout._size,h,d,p,m,y,b,w,g;if(c?s==="domain"?d=function(N){return c._offset+c._length*N}:(h=t.shapePositionToRange(c),d=function(N){return c._offset+c.r2p(h(N,!0))}):d=function(N){return v.l+v.w*N},u?f==="domain"?m=function(N){return u._offset+u._length*(1-N)}:(p=t.shapePositionToRange(u),m=function(N){return u._offset+u.r2p(p(N,!0))}):m=function(N){return v.t+v.h*(1-N)},l==="path")return c&&c.type==="date"&&(d=t.decodeDate(d)),u&&u.type==="date"&&(m=t.decodeDate(m)),i(o,d,m);if(o.xsizemode==="pixel"){var x=d(o.xanchor);y=x+o.x0,b=x+o.x1}else y=d(o.x0),b=d(o.x1);if(o.ysizemode==="pixel"){var _=m(o.yanchor);w=_-o.y0,g=_-o.y1}else w=m(o.y0),g=m(o.y1);if(l==="line")return"M"+y+","+w+"L"+b+","+g;if(l==="rect")return"M"+y+","+w+"H"+b+"V"+g+"H"+y+"Z";var k=(y+b)/2,T=(w+g)/2,S=Math.abs(k-y),D=Math.abs(T-w),L="A"+S+","+D,R=k+S+","+T,z=k+","+(T-D);return"M"+R+L+" 0 1,1 "+z+L+" 0 0,1 "+R+"Z"};function i(n,o,l){var s=n.path,f=n.xsizemode,c=n.ysizemode,u=n.xanchor,v=n.yanchor;return s.replace(e.segmentRE,function(h){var d=0,p=h.charAt(0),m=e.paramIsX[p],y=e.paramIsY[p],b=e.numParams[p],w=h.substr(1).replace(e.paramRE,function(g){return m[d]?f==="pixel"?g=o(u)+Number(g):g=o(g):y[d]&&(c==="pixel"?g=l(v)-Number(g):g=l(g)),d++,d>b&&(g="X"),g});return d>b&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+h)),p+w})}})(Fi);var NP=me,Hn=Dt,$g=nr,Ng=xt,HP=Ii.readPaths,ah=Fi,OP=ah.getPathString,Hg=Xh,jP=Cr.FROM_TL,FT=function(e,r,a,i){if(i.selectAll(".shape-label").remove(),!!(a.label.text||a.label.texttemplate)){var n;if(a.label.texttemplate){var o={};if(a.type!=="path"){var l=Hn.getFromId(e,a.xref),s=Hn.getFromId(e,a.yref);for(var f in Hg){var c=Hg[f](a,l,s);c!==void 0&&(o[f]=c)}}n=NP.texttemplateStringForShapes(a.label.texttemplate,{},e._fullLayout._d3locale,o)}else n=a.label.text;var u={"data-index":r},v=a.label.font,h={"data-notex":1},d=i.append("g").attr(u).classed("shape-label",!0),p=d.append("text").attr(h).classed("shape-label-text",!0).text(n),m,y,b,w;if(a.path){var g=OP(e,a),x=HP(g,e);m=1/0,b=1/0,y=-1/0,w=-1/0;for(var _=0;_<x.length;_++)for(var k=0;k<x[_].length;k++)for(var T=x[_][k],S=1;S<T.length;S+=2){var D=T[S],L=T[S+1];m=Math.min(m,D),y=Math.max(y,D),b=Math.min(b,L),w=Math.max(w,L)}}else{var R=Hn.getFromId(e,a.xref),z=Hn.getRefType(a.xref),N=Hn.getFromId(e,a.yref),H=Hn.getRefType(a.yref),$=ah.getDataToPixel(e,R,!1,z),P=ah.getDataToPixel(e,N,!0,H);m=$(a.x0),y=$(a.x1),b=P(a.y0),w=P(a.y1)}var A=a.label.textangle;A==="auto"&&(a.type==="line"?A=BP(m,b,y,w):A=0),p.call(function(B){return B.call(Ng.font,v).attr({}),$g.convertToTspans(B,e),B});var M=Ng.bBox(p.node()),C=GP(m,b,y,w,a,A,M),E=C.textx,F=C.texty,j=C.xanchor;p.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[j],y:F,x:E,transform:"rotate("+A+","+E+","+F+")"}).call($g.positionText,E,F)}};function BP(t,e,r,a){var i,n;return n=Math.abs(r-t),r>=t?i=e-a:i=a-e,-180/Math.PI*Math.atan2(i,n)}function GP(t,e,r,a,i,n,o){var l=i.label.textposition,s=i.label.textangle,f=i.label.padding,c=i.type,u=Math.PI/180*n,v=Math.sin(u),h=Math.cos(u),d=i.label.xanchor,p=i.label.yanchor,m,y,b,w;if(c==="line"){l==="start"?(m=t,y=e):l==="end"?(m=r,y=a):(m=(t+r)/2,y=(e+a)/2),d==="auto"&&(l==="start"?s==="auto"?r>t?d="left":r<t?d="right":d="center":r>t?d="right":r<t?d="left":d="center":l==="end"?s==="auto"?r>t?d="right":r<t?d="left":d="center":r>t?d="left":r<t?d="right":d="center":d="center");var g={left:1,center:0,right:-1},x={bottom:-1,middle:0,top:1};if(s==="auto"){var _=x[p];b=-f*v*_,w=f*h*_}else{var k=g[d],T=x[p];b=f*k,w=f*T}m=m+b,y=y+w}else b=f+3,l.indexOf("right")!==-1?(m=Math.max(t,r)-b,d==="auto"&&(d="right")):l.indexOf("left")!==-1?(m=Math.min(t,r)+b,d==="auto"&&(d="left")):(m=(t+r)/2,d==="auto"&&(d="center")),l.indexOf("top")!==-1?y=Math.min(e,a):l.indexOf("bottom")!==-1?y=Math.max(e,a):y=(e+a)/2,w=f,p==="bottom"?y=y-w:p==="top"&&(y=y+w);var S=jP[p],D=i.label.font.size,L=o.height,R=(L*S-D)*v,z=-(L*S-D)*h;return{textx:m+R,texty:y+z,xanchor:d}}var UP=me,VP=UP.strTranslate,Og=Oa,$T=Cn,XP=$T.drawMode,NT=$T.selectMode,HT=Je,jg=ot,iu=Mp,YP=iu.i000,WP=iu.i090,qP=iu.i180,ZP=iu.i270,KP=An,OT=KP.clearOutlineControllers,Dp=Ii,Qs=Dp.pointsOnRectangle,sv=Dp.pointsOnEllipse,QP=Dp.writePaths,JP=Lp.newShapes,eE=Lp.createShapeObj,tE=IT,rE=FT,Pp=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),(sv(e[0])||a.hasText)&&l({redrawing:!0})}function l(P){var A={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,A=JP(r,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,A=tE(r,a),n._fullLayout._reselect=!0),Object.keys(A).length&&HT.call((P||{}).redrawing?"relayout":"_guiRelayout",n,A)}var s=n._fullLayout,f=s._zoomlayer,c=a.dragmode,u=XP(c),v=NT(c);(u||v)&&(n._fullLayout._outlining=!0),OT(n),r.attr("d",QP(e));var h,d,p,m,y;if(!i&&(a.isActiveShape||a.isActiveSelection)){y=aE([],e);var b=f.append("g").attr("class","outline-controllers");D(b),$()}if(u&&a.hasText){var w=f.select(".label-temp"),g=eE(r,a,a.dragmode);rE(n,"label-temp",g,w)}function x(P){p=+P.srcElement.getAttribute("data-i"),m=+P.srcElement.getAttribute("data-j"),h[p][m].moveFn=_}function _(P,A){if(e.length){var M=y[p][m][1],C=y[p][m][2],E=e[p],F=E.length;if(Qs(E)){var j=P,B=A;if(a.isActiveSelection){var G=Bg(E,m);G[1]===E[m][1]?B=0:j=0}for(var O=0;O<F;O++)if(O!==m){var W=E[O];W[1]===E[m][1]&&(W[1]=M+j),W[2]===E[m][2]&&(W[2]=C+B)}if(E[m][1]=M+j,E[m][2]=C+B,!Qs(E))for(var V=0;V<F;V++)for(var Z=0;Z<E[V].length;Z++)E[V][Z]=y[p][V][Z]}else E[m][1]=M+P,E[m][2]=C+A;o()}}function k(){l()}function T(){if(e.length&&e[p]&&e[p].length){for(var P=[],A=0;A<e[p].length;A++)A!==m&&P.push(e[p][A]);P.length>1&&!(P.length===2&&P[1][0]==="Z")&&(m===0&&(P[0][0]="M"),e[p]=P,o(),l())}}function S(P,A){if(P===2){p=+A.srcElement.getAttribute("data-i"),m=+A.srcElement.getAttribute("data-j");var M=e[p];!Qs(M)&&!sv(M)&&T()}}function D(P){h=[];for(var A=0;A<e.length;A++){var M=e[A],C=Qs(M),E=!C&&sv(M);h[A]=[];for(var F=M.length,j=0;j<F;j++)if(M[j][0]!=="Z"&&!(E&&j!==YP&&j!==WP&&j!==qP&&j!==ZP)){var B=C&&a.isActiveSelection,G;B&&(G=Bg(M,j));var O=M[j][1],W=M[j][2],V=P.append(B?"rect":"circle").attr("data-i",A).attr("data-j",j).style({fill:jg.background,stroke:jg.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(B){var Z=G[1]-O,X=G[2]-W,Q=X?5:Math.max(Math.min(25,Math.abs(Z)-5),5),te=Z?5:Math.max(Math.min(25,Math.abs(X)-5),5);V.classed(X?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Q).attr("height",te).attr("x",O-Q/2).attr("y",W-te/2).attr("transform",VP(Z/2,X/2))}else V.classed("cursor-grab",!0).attr("r",5).attr("cx",O).attr("cy",W);h[A][j]={element:V.node(),gd:n,prepFn:x,doneFn:k,clickFn:S},Og.init(h[A][j])}}}function L(P,A){if(e.length)for(var M=0;M<e.length;M++)for(var C=0;C<e[M].length;C++)for(var E=0;E+2<e[M][C].length;E+=2)e[M][C][E+1]=y[M][C][E+1]+P,e[M][C][E+2]=y[M][C][E+2]+A}function R(P,A){L(P,A),o()}function z(P){p=+P.srcElement.getAttribute("data-i"),p||(p=0),d[p].moveFn=R}function N(){l()}function H(P){P===2&&iE(n)}function $(){if(d=[],!!e.length){var P=0;d[P]={element:r[0][0],gd:n,prepFn:z,doneFn:N,clickFn:H},Og.init(d[P])}}};function aE(t,e){for(var r=0;r<e.length;r++){var a=e[r];t[r]=[];for(var i=0;i<a.length;i++){t[r][i]=[];for(var n=0;n<a[i].length;n++)t[r][i][n]=a[i][n]}}return t}function Bg(t,e){var r=t[e][1],a=t[e][2],i=t.length,n,o,l;return n=(e+1)%i,o=t[n][1],l=t[n][2],o===r&&l===a&&(n=(e+2)%i,o=t[n][1],l=t[n][2]),[n,o,l]}function iE(t){if(NT(t._fullLayout.dragmode)){OT(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);delete t._fullLayout._activeSelectionIndex;var n=t._fullLayout.selections[e];t._fullLayout._deselect={xref:n.xref,yref:n.yref},HT.call("_guiRelayout",t,{selections:a})}}}var nE=ft,jT=Je,Gg=me,On=Dt,oE=Ii.readPaths,lE=Pp,ih=FT,BT=An.clearOutlineControllers,fv=ot,Ep=xt,sE=Lt.arrayEditor,Ug=Oa,Vg=zi,an=au,Rr=Fi,nh=Rr.getPathString,Rp={draw:zp,drawOne:GT,eraseActiveShape:uE};function zp(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove();for(var r in e._plots){var a=e._plots[r].shapelayer;a&&(a.selectAll("path").remove(),a.selectAll("text").remove())}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible===!0&>(t,i)}function Js(t){return!!t._fullLayout._outlining}function nu(t){return!t._context.edits.shapePosition}function GT(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=Rr.makeShapesOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input||a.visible!==!0)return;if(a.layer!=="below")o(t._fullLayout._shapeUpperLayer);else if(a.xref==="paper"||a.yref==="paper")o(t._fullLayout._shapeLowerLayer);else if(i._hadPlotinfo){var n=i.mainplotinfo||i;o(n.shapelayer)}else o(t._fullLayout._shapeLowerLayer);function o(l){var s=nh(t,a),f={"data-index":e,"fill-rule":a.fillrule,d:s},c=a.opacity,u=a.fillcolor,v=a.line.width?a.line.color:"rgba(0,0,0,0)",h=a.line.width,d=a.line.dash;!h&&a.editable===!0&&(h=5,d="solid");var p=s[s.length-1]!=="Z",m=nu(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;m&&(u=p?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,c=t._fullLayout.activeshape.opacity);var y=l.append("g").classed("shape-group",!0).attr({"data-index":e}),b=y.append("path").attr(f).style("opacity",c).call(fv.stroke,v).call(fv.fill,u).call(Ep.dashLine,d,h);UT(y,t,a),ih(t,e,a,y);var w;if((m||t._context.edits.shapePosition)&&(w=sE(t.layout,"shapes",a)),m){b.style({cursor:"move"});var g={element:b.node(),plotinfo:i,gd:t,editHelpers:w,hasText:a.label.text||a.label.texttemplate,isActiveShape:!0},x=oE(s,t);lE(x,b,g)}else t._context.edits.shapePosition?fE(t,b,a,e,l,w):a.editable===!0&&b.style("pointer-events",p||fv.opacity(u)*c<=.5?"stroke":"all");b.node().addEventListener("click",function(){return cE(t,b)})}}function UT(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");Ep.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function fE(t,e,r,a,i,n){var o=10,l=10,s=r.xsizemode==="pixel",f=r.ysizemode==="pixel",c=r.type==="line",u=r.type==="path",v=n.modifyItem,h,d,p,m,y,b,w,g,x,_,k,T,S,D,L,R=nE.select(e.node().parentNode),z=On.getFromId(t,r.xref),N=On.getRefType(r.xref),H=On.getFromId(t,r.yref),$=On.getRefType(r.yref),P=Rr.getDataToPixel(t,z,!1,N),A=Rr.getDataToPixel(t,H,!0,$),M=Rr.getPixelToData(t,z,!1,N),C=Rr.getPixelToData(t,H,!0,$),E=B(),F={element:E.node(),gd:t,prepFn:W,doneFn:V,clickFn:Z},j;Ug.init(F),E.node().onmousemove=O;function B(){return c?G():e}function G(){var ae=10,le=Math.max(r.line.width,ae),de=i.append("g").attr("data-index",a).attr("drag-helper",!0);de.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":le,"stroke-opacity":"0"});var be={"fill-opacity":"0"},Te=Math.max(le/2,ae);return de.append("circle").attr({"data-line-point":"start-point",cx:s?P(r.xanchor)+r.x0:P(r.x0),cy:f?A(r.yanchor)-r.y0:A(r.y0),r:Te}).style(be).classed("cursor-grab",!0),de.append("circle").attr({"data-line-point":"end-point",cx:s?P(r.xanchor)+r.x1:P(r.x1),cy:f?A(r.yanchor)-r.y1:A(r.y1),r:Te}).style(be).classed("cursor-grab",!0),de}function O(ae){if(Js(t)){j=null;return}if(c)ae.target.tagName==="path"?j="move":j=ae.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var le=F.element.getBoundingClientRect(),de=le.right-le.left,be=le.bottom-le.top,Te=ae.clientX-le.left,Le=ae.clientY-le.top,_e=!u&&de>o&&be>l&&!ae.shiftKey?Ug.getCursor(Te/de,1-Le/be):"move";Vg(e,_e),j=_e.split("-")[0]}}function W(ae){Js(t)||(s&&(y=P(r.xanchor)),f&&(b=A(r.yanchor)),r.type==="path"?L=r.path:(h=s?r.x0:P(r.x0),d=f?r.y0:A(r.y0),p=s?r.x1:P(r.x1),m=f?r.y1:A(r.y1)),h<p?(x=h,S="x0",_=p,D="x1"):(x=p,S="x1",_=h,D="x0"),!f&&d<m||f&&d>m?(w=d,k="y0",g=m,T="y1"):(w=m,k="y1",g=d,T="y0"),O(ae),te(i,r),ue(e,r,t),F.moveFn=j==="move"?X:Q,F.altKey=ae.altKey)}function V(){Js(t)||(Vg(e),xe(i),UT(e,t,r),jT.call("_guiRelayout",t,n.getUpdateObj()))}function Z(){Js(t)||xe(i)}function X(ae,le){if(r.type==="path"){var de=function(Le){return Le},be=de,Te=de;s?v("xanchor",r.xanchor=M(y+ae)):(be=function(_e){return M(P(_e)+ae)},z&&z.type==="date"&&(be=Rr.encodeDate(be))),f?v("yanchor",r.yanchor=C(b+le)):(Te=function(_e){return C(A(_e)+le)},H&&H.type==="date"&&(Te=Rr.encodeDate(Te))),v("path",r.path=Xg(L,be,Te))}else s?v("xanchor",r.xanchor=M(y+ae)):(v("x0",r.x0=M(h+ae)),v("x1",r.x1=M(p+ae))),f?v("yanchor",r.yanchor=C(b+le)):(v("y0",r.y0=C(d+le)),v("y1",r.y1=C(m+le)));e.attr("d",nh(t,r)),te(i,r),ih(t,a,r,R)}function Q(ae,le){if(u){var de=function(ie){return ie},be=de,Te=de;s?v("xanchor",r.xanchor=M(y+ae)):(be=function(fe){return M(P(fe)+ae)},z&&z.type==="date"&&(be=Rr.encodeDate(be))),f?v("yanchor",r.yanchor=C(b+le)):(Te=function(fe){return C(A(fe)+le)},H&&H.type==="date"&&(Te=Rr.encodeDate(Te))),v("path",r.path=Xg(L,be,Te))}else if(c){if(j==="resize-over-start-point"){var Le=h+ae,_e=f?d-le:d+le;v("x0",r.x0=s?Le:M(Le)),v("y0",r.y0=f?_e:C(_e))}else if(j==="resize-over-end-point"){var Ie=p+ae,ce=f?m-le:m+le;v("x1",r.x1=s?Ie:M(Ie)),v("y1",r.y1=f?ce:C(ce))}}else{var ye=function(ie){return j.indexOf(ie)!==-1},Ee=ye("n"),ze=ye("s"),K=ye("w"),ke=ye("e"),re=Ee?w+le:w,pe=ze?g+le:g,we=K?x+ae:x,se=ke?_+ae:_;f&&(Ee&&(re=w-le),ze&&(pe=g-le)),(!f&&pe-re>l||f&&re-pe>l)&&(v(k,r[k]=f?re:C(re)),v(T,r[T]=f?pe:C(pe))),se-we>o&&(v(S,r[S]=s?we:M(we)),v(D,r[D]=s?se:M(se)))}e.attr("d",nh(t,r)),te(i,r),ih(t,a,r,R)}function te(ae,le){(s||f)&&de();function de(){var be=le.type!=="path",Te=ae.selectAll(".visual-cue").data([0]),Le=1;Te.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Le}).classed("visual-cue",!0);var _e=P(s?le.xanchor:Gg.midRange(be?[le.x0,le.x1]:Rr.extractPathCoords(le.path,an.paramIsX))),Ie=A(f?le.yanchor:Gg.midRange(be?[le.y0,le.y1]:Rr.extractPathCoords(le.path,an.paramIsY)));if(_e=Rr.roundPositionForSharpStrokeRendering(_e,Le),Ie=Rr.roundPositionForSharpStrokeRendering(Ie,Le),s&&f){var ce="M"+(_e-1-Le)+","+(Ie-1-Le)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Te.attr("d",ce)}else if(s){var ye="M"+(_e-1-Le)+","+(Ie-9-Le)+"v18 h2 v-18 Z";Te.attr("d",ye)}else{var Ee="M"+(_e-9-Le)+","+(Ie-1-Le)+"h18 v2 h-18 Z";Te.attr("d",Ee)}}}function xe(ae){ae.selectAll(".visual-cue").remove()}function ue(ae,le,de){var be=le.xref,Te=le.yref,Le=On.getFromId(de,be),_e=On.getFromId(de,Te),Ie="";be!=="paper"&&!Le.autorange&&(Ie+=be),Te!=="paper"&&!_e.autorange&&(Ie+=Te),Ep.setClipUrl(ae,Ie?"clip"+de._fullLayout._uid+Ie:null,de)}}function Xg(t,e,r){return t.replace(an.segmentRE,function(a){var i=0,n=a.charAt(0),o=an.paramIsX[n],l=an.paramIsY[n],s=an.numParams[n],f=a.substr(1).replace(an.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function cE(t,e){if(nu(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){Yg(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=Yg,zp(t)}}}function Yg(t){if(nu(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(BT(t),delete t._fullLayout._activeShapeIndex,zp(t))}}function uE(t){if(nu(t)){BT(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);return delete t._fullLayout._activeShapeIndex,jT.call("_guiRelayout",t,{shapes:a})}}}var sa=Je,VT=Qt,XT=Wt,_t=Ap,vE=Rp.eraseActiveShape,so=me,pt=so._,wt=DT.exports={};wt.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?pt(t,"Download plot as a png"):pt(t,"Download plot")},icon:_t.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};so.notifier(pt(t,"Taking snapshot - this may take a few seconds"),"long"),r.format!=="svg"&&so.isIE()&&(so.notifier(pt(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach(function(a){a in e&&(r[a]=e[a])}),sa.call("downloadImage",t,r).then(function(a){so.notifier(pt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){so.notifier(pt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};wt.sendDataToCloud={name:"sendDataToCloud",title:function(t){return pt(t,"Edit in Chart Studio")},icon:_t.disk,click:function(t){VT.sendDataToCloud(t)}};wt.editInChartStudio={name:"editInChartStudio",title:function(t){return pt(t,"Edit in Chart Studio")},icon:_t.pencil,click:function(t){VT.sendDataToCloud(t)}};wt.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:_t.zoombox,click:Tr};wt.pan2d={name:"pan2d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"dragmode",val:"pan",icon:_t.pan,click:Tr};wt.select2d={name:"select2d",_cat:"select",title:function(t){return pt(t,"Box Select")},attr:"dragmode",val:"select",icon:_t.selectbox,click:Tr};wt.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return pt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:_t.lasso,click:Tr};wt.drawclosedpath={name:"drawclosedpath",title:function(t){return pt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:_t.drawclosedpath,click:Tr};wt.drawopenpath={name:"drawopenpath",title:function(t){return pt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:_t.drawopenpath,click:Tr};wt.drawline={name:"drawline",title:function(t){return pt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:_t.drawline,click:Tr};wt.drawrect={name:"drawrect",title:function(t){return pt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:_t.drawrect,click:Tr};wt.drawcircle={name:"drawcircle",title:function(t){return pt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:_t.drawcircle,click:Tr};wt.eraseshape={name:"eraseshape",title:function(t){return pt(t,"Erase active shape")},icon:_t.eraseshape,click:vE};wt.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:_t.zoom_plus,click:Tr};wt.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:_t.zoom_minus,click:Tr};wt.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return pt(t,"Autoscale")},attr:"zoom",val:"auto",icon:_t.autoscale,click:Tr};wt.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return pt(t,"Reset axes")},attr:"zoom",val:"reset",icon:_t.home,click:Tr};wt.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return pt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:_t.tooltip_basic,gravity:"ne",click:Tr};wt.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return pt(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:_t.tooltip_compare,gravity:"ne",click:Tr};function Tr(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=XT.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var u=i==="in"?.5:2,v=(1+u)/2,h=(1-u)/2,d;for(c=0;c<l.length;c++)if(f=l[c],!f.fixedrange)if(d=f._name,i==="auto")o[d+".autorange"]=!0;else if(i==="reset")f._rangeInitial0===void 0&&f._rangeInitial1===void 0?o[d+".autorange"]=!0:f._rangeInitial0===void 0?(o[d+".autorange"]=f._autorangeInitial,o[d+".range"]=[null,f._rangeInitial1]):f._rangeInitial1===void 0?(o[d+".range"]=[f._rangeInitial0,null],o[d+".autorange"]=f._autorangeInitial):o[d+".range"]=[f._rangeInitial0,f._rangeInitial1],f._showSpikeInitial!==void 0&&(o[d+".showspikes"]=f._showSpikeInitial,s==="on"&&!f._showSpikeInitial&&(s="off"));else{var p=[f.r2l(f.range[0]),f.r2l(f.range[1])],m=[v*p[0]+h*p[1],v*p[1]+h*p[0]];o[d+".range[0]"]=f.l2r(m[0]),o[d+".range[1]"]=f.l2r(m[1])}}else a==="hovermode"&&(i==="x"||i==="y")&&(i=n._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[a]=i;n._cartesianSpikesEnabled=s,sa.call("_guiRelayout",t,o)}wt.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return pt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:_t.zoombox,click:ou};wt.pan3d={name:"pan3d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:_t.pan,click:ou};wt.orbitRotation={name:"orbitRotation",title:function(t){return pt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:_t["3d_rotate"],click:ou};wt.tableRotation={name:"tableRotation",title:function(t){return pt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:_t["z-axis"],click:ou};function ou(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout._subplots.gl3d||[],o={},l=a.split("."),s=0;s<n.length;s++)o[n[s]+"."+l[1]]=i;var f=i==="pan"?i:"zoom";o.dragmode=f,sa.call("_guiRelayout",t,o)}wt.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return pt(t,"Reset camera to default")},attr:"resetDefault",icon:_t.home,click:Ip};wt.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return pt(t,"Reset camera to last save")},attr:"resetLastSave",icon:_t.movie,click:Ip};function Ip(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=a==="resetLastSave",n=a==="resetDefault",o=t._fullLayout,l=o._subplots.gl3d||[],s={},f=0;f<l.length;f++){var c=l[f],u=c+".camera",v=c+".aspectratio",h=c+".aspectmode",d=o[c]._scene,p;i?(s[u+".up"]=d.viewInitial.up,s[u+".eye"]=d.viewInitial.eye,s[u+".center"]=d.viewInitial.center,p=!0):n&&(s[u+".up"]=null,s[u+".eye"]=null,s[u+".center"]=null,p=!0),p&&(s[v+".x"]=d.viewInitial.aspectratio.x,s[v+".y"]=d.viewInitial.aspectratio.y,s[v+".z"]=d.viewInitial.aspectratio.z,s[h]=d.viewInitial.aspectmode)}sa.call("_guiRelayout",t,s)}wt.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_t.tooltip_basic,gravity:"ne",click:dE};function YT(t,e){var r=e.currentTarget,a=r._previousVal,i=t._fullLayout,n=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(a)s=a,r._previousVal=null;else{for(var f=0;f<n.length;f++){var c=n[f],u=i[c],v=c+".hovermode";l[v]=u.hovermode,s[v]=!1;for(var h=0;h<3;h++){var d=o[h],p=c+"."+d+".showspikes";s[p]=!1,l[p]=u[d].showspikes}}r._previousVal=l}return s}function dE(t,e){var r=YT(t,e);sa.call("_guiRelayout",t,r)}wt.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:_t.zoom_plus,click:Fp};wt.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:_t.zoom_minus,click:Fp};wt.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return pt(t,"Reset")},attr:"reset",val:null,icon:_t.autoscale,click:Fp};wt.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_t.tooltip_basic,gravity:"ne",click:$p};function Fp(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o=n._subplots.geo||[],l=0;l<o.length;l++){var s=o[l],f=n[s];if(a==="zoom"){var c=f.projection.scale,u=i==="in"?2*c:.5*c;sa.call("_guiRelayout",t,s+".projection.scale",u)}}a==="reset"&&uc(t,"geo")}wt.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_t.tooltip_basic,gravity:"ne",click:$p};wt.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:_t.tooltip_basic,gravity:"ne",click:$p};function WT(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function $p(t){var e=WT(t);sa.call("_guiRelayout",t,"hovermode",e)}wt.resetViewSankey={name:"resetSankeyGroup",title:function(t){return pt(t,"Reset view")},icon:_t.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var a=t._fullData[r]._viewInitial;e["node.groups"].push(a.node.groups.slice()),e["node.x"].push(a.node.x.slice()),e["node.y"].push(a.node.y.slice())}sa.call("restyle",t,e)}};wt.toggleHover={name:"toggleHover",title:function(t){return pt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:_t.tooltip_basic,gravity:"ne",click:function(t,e){var r=YT(t,e);r.hovermode=WT(t),sa.call("_guiRelayout",t,r)}};wt.resetViews={name:"resetViews",title:function(t){return pt(t,"Reset views")},icon:_t.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Tr(t,e),r.setAttribute("data-attr","resetLastSave"),Ip(t,e),uc(t,"geo"),uc(t,"mapbox")}};wt.toggleSpikelines={name:"toggleSpikelines",title:function(t){return pt(t,"Toggle Spike Lines")},icon:_t.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",sa.call("_guiRelayout",t,hE(t))}};function hE(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=XT.list(t,null,!0),i={},n=0;n<a.length;n++){var o=a[n];i[o._name+".showspikes"]=r?!0:o._showSpikeInitial}return i}wt.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return pt(t,"Reset view")},attr:"reset",icon:_t.home,click:function(t){uc(t,"mapbox")}};wt.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return pt(t,"Zoom in")},attr:"zoom",val:"in",icon:_t.zoom_plus,click:qT};wt.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:_t.zoom_minus,click:qT};function qT(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-val"),i=t._fullLayout,n=i._subplots.mapbox||[],o=1.05,l={},s=0;s<n.length;s++){var f=n[s],c=i[f].zoom,u=a==="in"?o*c:c/o;l[f+".zoom"]=u}sa.call("_guiRelayout",t,l)}function uc(t,e){for(var r=t._fullLayout,a=r._subplots[e]||[],i={},n=0;n<a.length;n++)for(var o=a[n],l=r[o]._subplot,s=l.viewInitial,f=Object.keys(s),c=0;c<f.length;c++){var u=f[c];i[o+"."+u]=s[u]}sa.call("_guiRelayout",t,i)}var ZT=DT.exports,KT=ZT,pE=Object.keys(KT),QT=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],JT=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(QT),yo=[],mE=function(t){if(JT.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();yo.indexOf(e)===-1&&yo.push(e),yo.indexOf(r)===-1&&yo.push(r)}};pE.forEach(function(t){mE(KT[t])});yo.sort();var e2={DRAW_MODES:QT,backButtons:JT,foreButtons:yo},Wg=e2,t2={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+Wg.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+Wg.foreButtons.join("*, *")+"*."].join(" ")}},yE=me,cl=ot,gE=Lt,bE=t2,xE=function(e,r){var a=e.modebar||{},i=gE.newContainer(r,"modebar");function n(l,s){return yE.coerce(a,i,bE,l,s)}n("orientation"),n("bgcolor",cl.addOpacity(r.paper_bgcolor,.5));var o=cl.contrast(cl.rgb(r.modebar.bgcolor));n("color",cl.addOpacity(o,.3)),n("activecolor",cl.addOpacity(o,.7)),n("uirevision",r.uirevision),n("add"),n("remove")},Np=ft,_E=dt,Za=me,r2=Ap,wE=Pc.version,TE=new DOMParser;function a2(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var ja=a2.prototype;ja.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,a=this.graphInfo._fullLayout,i="modebar-"+a._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",e=e.reverse());var n=a.modebar,o=r.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";Za.deleteRelatedStyleRule(i),Za.addRelatedStyleRule(i,o+"#"+i+" .modebar-group","background-color: "+n.bgcolor),Za.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+n.color),Za.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+n.activecolor),Za.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+n.activecolor);var l=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,f=this.locale!==r.locale;if(this.locale=r.locale,(l||s||f)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton()};ja.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var a=e.createGroup();r.forEach(function(i){var n=i.name;if(!n)throw new Error("must provide button 'name' in button config");if(e.buttonsNames.indexOf(n)!==-1)throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var o=e.createButton(i);e.buttonElements.push(o),a.appendChild(o)}),e.element.appendChild(a)})};ja.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t};ja.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=t.title;a===void 0?a=t.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&r.setAttribute("data-title",a),t.attr!==void 0&&r.setAttribute("data-attr",t.attr);var i=t.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var n=t.click;if(typeof n!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(l){t.click(e.graphInfo,l),e.updateActiveButton(l.currentTarget)}),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&Np.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||r2.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};ja.createIcon=function(t){var e=_E(t.height)?Number(t.height):t.ascent-t.descent,r="http://www.w3.org/2000/svg",a;if(t.path){a=document.createElementNS(r,"svg"),a.setAttribute("viewBox",[0,0,t.width,e].join(" ")),a.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",t.path),t.transform?i.setAttribute("transform",t.transform):t.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),a.appendChild(i)}if(t.svg){var n=TE.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};ja.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=t!==void 0?t.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var i=a.getAttribute("data-val")||!0,n=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=Np.select(a);if(o)n===r&&l.classed("active",!l.classed("active"));else{var s=n===null?n:Za.nestedProperty(e,n).get();l.classed("active",s===i)}})};ja.hasButtons=function(t){var e=this.buttons;if(!e||t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var a=0;a<t[r].length;a++)if(t[r][a].name!==e[r][a].name)return!1}return!0};function kE(t){return t+" (v"+wE+")"}ja.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",kE(Za._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(r2.newplotlylogo)),t.appendChild(e),t};ja.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};ja.destroy=function(){Za.removeElement(this.container.querySelector(".modebar")),Za.deleteRelatedStyleRule(this._uid)};function AE(t,e){var r=t._fullLayout,a=new a2({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&Np.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var ME=AE,SE=Wt,qg=_r,oh=Je,LE=la.isUnifiedHover,CE=ME,vc=ZT,DE=e2.DRAW_MODES,PE=me.extendDeep,EE=function(e){var r=e._fullLayout,a=e._context,i=r._modeBar;if(!a.displayModeBar&&!a.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var n=a.modeBarButtons,o;Array.isArray(n)&&n.length?o=NE(n):!a.displayModeBar&&a.watermark?o=[]:o=RE(e),i?i.update(e,o):r._modeBar=CE(e,o)};function RE(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(A,M){if(typeof M=="string"){if(M.toLowerCase()===A.toLowerCase())return!0}else{var C=M.name,E=M._cat||M.name;if(C===A||E===A.toLowerCase())return!0}return!1}var n=e.modebar.add;typeof n=="string"&&(n=[n]);var o=e.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(n.filter(function(A){for(var M=0;M<a.modeBarButtonsToRemove.length;M++)if(i(A,a.modeBarButtonsToRemove[M]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(A){for(var M=0;M<a.modeBarButtonsToAdd.length;M++)if(i(A,a.modeBarButtonsToAdd[M]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),u=e._has("geo"),v=e._has("pie"),h=e._has("funnelarea"),d=e._has("gl2d"),p=e._has("ternary"),m=e._has("mapbox"),y=e._has("polar"),b=e._has("smith"),w=e._has("sankey"),g=zE(e),x=LE(e.hovermode),_=[];function k(A){if(A.length){for(var M=[],C=0;C<A.length;C++){for(var E=A[C],F=vc[E],j=F.name.toLowerCase(),B=(F._cat||F.name).toLowerCase(),G=!1,O=0;O<s.length;O++){var W=s[O].toLowerCase();if(W===j||W===B){G=!0;break}}G||M.push(vc[E])}_.push(M)}}var T=["toImage"];a.showEditInChartStudio?T.push("editInChartStudio"):a.showSendToCloud&&T.push("sendDataToCloud"),k(T);var S=[],D=[],L=[],R=[];(f||d||v||h||p)+u+c+m+y+b>1?(D=["toggleHover"],L=["resetViews"]):u?(S=["zoomInGeo","zoomOutGeo"],D=["hoverClosestGeo"],L=["resetGeo"]):c?(D=["hoverClosest3d"],L=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(S=["zoomInMapbox","zoomOutMapbox"],D=["toggleHover"],L=["resetViewMapbox"]):d?D=["hoverClosestGl2d"]:v?D=["hoverClosestPie"]:w?(D=["hoverClosestCartesian","hoverCompareCartesian"],L=["resetViewSankey"]):D=["toggleHover"],f&&(D=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(FE(r)||x)&&(D=[]),(f||d)&&!g&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],L[0]!=="resetViews"&&(L=["resetScale2d"])),c?R=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||d)&&!g||p?R=["zoom2d","pan2d"]:m||u?R=["pan2d"]:y&&(R=["zoom2d"]),IE(r)&&R.push("select2d","lasso2d");var z=[],N=function(A){z.indexOf(A)===-1&&D.indexOf(A)!==-1&&z.push(A)};if(Array.isArray(l)){for(var H=[],$=0;$<l.length;$++){var P=l[$];typeof P=="string"?(P=P.toLowerCase(),DE.indexOf(P)!==-1?(e._has("mapbox")||e._has("cartesian"))&&R.push(P):P==="togglespikelines"?N("toggleSpikelines"):P==="togglehover"?N("toggleHover"):P==="hovercompare"?N("hoverCompareCartesian"):P==="hoverclosest"?(N("hoverClosestCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie")):P==="v1hovermode"&&(N("toggleHover"),N("hoverClosestCartesian"),N("hoverCompareCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie"))):H.push(P)}l=H}return k(R),k(S.concat(L)),k(z),$E(_,l)}function zE(t){for(var e=SE.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}function IE(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(oh.traceIs(a,"scatter-like")?(qg.hasMarkers(a)||qg.hasText(a))&&(e=!0):oh.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function FE(t){for(var e=0;e<t.length;e++)if(!oh.traceIs(t[e],"noHover"))return!1;return!0}function $E(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}function NE(t){for(var e=PE([],t),r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];if(typeof n=="string")if(vc[n]!==void 0)e[r][i]=vc[n];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return e}var i2={moduleType:"component",name:"modebar",layoutAttributes:t2,supplyLayoutDefaults:xE,manage:EE},ti={},HE=Cr.FROM_BL,n2=function(e,r,a){a===void 0&&(a=HE[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],n=i[0]+(i[1]-i[0])*a;e.range=e._input.range=[e.l2r(n+(i[0]-n)*r),e.l2r(n+(i[1]-n)*r)],e.setScale()},en=me,cv=ms,pa=Wt.id2name,OE=Na,Zg=n2,jE=up,BE=Yt.ALMOST_EQUAL,GE=Cr.FROM_BL;ti.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,u,v,h,d;for(l=0;l<a.length;l++)c=pa(a[l]),u=t[c],v=e[c],UE(u,v,{axIds:a,layoutOut:e,hasImage:i[c]});function p(T,S){for(l=0;l<T.length;l++){s=T[l];for(f in s)e[pa(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(v=e[pa(f)],v.fixedrange){for(var m in s){var y=pa(m);(t[y]||{}).fixedrange===!1&&en.warn("fixedrange was specified as false for axis "+y+" but was overridden because another axis in its constraint group has fixedrange true"),e[y].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){v=e[pa(f)],v._matchGroup&&Object.keys(v._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}p(n,"_constraintGroup");var b=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],w=!1,g=!1;function x(){d=v[h],h==="rangebreaks"&&(g=v._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var _=0;_<b.length;_++){h=b[_],d=null;var k;for(f in s)if(c=pa(f),u=t[c],v=e[c],h in v){if(!v.matches&&(k=v,h in u)){x();break}d===null&&h in u&&x()}if(h==="range"&&d&&u.range&&u.range.length===2&&u.range[0]!==null&&u.range[1]!==null&&(w=!0),h==="autorange"&&d===null&&w&&(d=!1),d===null&&h in k&&(d=k[h]),d!==null)for(f in s)v=e[pa(f)],v[h]=h==="range"?d.slice():d,h==="rangebreaks"&&(v._hasDayOfWeekBreaks=g,jE(v,e))}}};function UE(t,e,r){var a=r.axIds,i=r.layoutOut,n=r.hasImage,o=i._axisConstraintGroups,l=i._axisMatchGroups,s=e._id,f=s.charAt(0),c=((i._splomAxes||{})[f]||{})[s]||{},u=e._id,v=u.charAt(0)==="x";e._matchGroup=null,e._constraintGroup=null;function h(R,z){return en.coerce(t,e,OE,R,z)}h("constrain",n?"domain":"range"),en.coerce(t,e,{constraintoward:{valType:"enumerated",values:v?["left","center","right"]:["bottom","middle","top"],dflt:v?"center":"middle"}},"constraintoward");var d=e.type,p,m,y=[];for(p=0;p<a.length;p++)if(m=a[p],m!==u){var b=i[pa(m)];b.type===d&&y.push(m)}var w=o2(o,u);if(w){var g=[];for(p=0;p<y.length;p++)m=y[p],w[m]||g.push(m);y=g}var x=y.length,_,k;x&&(t.matches||c.matches)&&(_=en.coerce(t,e,{matches:{valType:"enumerated",values:y,dflt:y.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var T=n&&!v?e.anchor:void 0;if(x&&!_&&(t.scaleanchor||T)&&(k=en.coerce(t,e,{scaleanchor:{valType:"enumerated",values:y.concat([!1])}},"scaleanchor",T)),_){e._matchGroup=uv(l,u,_,1);var S=i[pa(_)],D=Kg(i,e)/Kg(i,S);v!==(_.charAt(0)==="x")&&(D=(v?"x":"y")+D),uv(o,u,_,D)}else t.matches&&a.indexOf(t.matches)!==-1&&en.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(k){var L=h("scaleratio");L||(L=e.scaleratio=1),uv(o,u,k,L)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&en.warn("ignored "+e._name+'.scaleanchor: "'+t.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function Kg(t,e){var r=e.domain;return r||(r=t[pa(e.overlaying)].domain),r[1]-r[0]}function o2(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function uv(t,e,r,a){var i,n,o,l,s,f=o2(t,e);f===null?(f={},f[e]=1,s=t.length,t.push(f)):s=t.indexOf(f);var c=Object.keys(f);for(i=0;i<t.length;i++)if(o=t[i],i!==s&&o[r]){var u=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=vv(u,vv(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var v=c[n];f[v]=vv(a,f[v])}f[r]=1}function vv(t,e){var r="",a="",i,n;typeof t=="string"&&(r=t.match(/^[xy]*/)[0],i=r.length,t=+t.substr(i)),typeof e=="string"&&(a=e.match(/^[xy]*/)[0],n=a.length,e=+e.substr(n));var o=t*e;return!i&&!n?o:!i||!n||r.charAt(0)===a.charAt(0)?r+a+t*e:i===n?o:(i>n?r.substr(n):a.substr(i))+o}function VE(t,e){for(var r=e._size,a=r.h/r.w,i={},n=Object.keys(t),o=0;o<n.length;o++){var l=n[o],s=t[l];if(typeof s=="string"){var f=s.match(/^[xy]*/)[0],c=f.length;s=+s.substr(c);for(var u=f.charAt(0)==="y"?a:1/a,v=0;v<c;v++)s*=u}i[l]=s}return i}ti.enforce=function(e){var r=e._fullLayout,a=r._axisConstraintGroups||[],i,n,o,l,s,f,c,u;for(i=0;i<a.length;i++){o=VE(a[i],r);var v=Object.keys(o),h=1/0,d=0,p=1/0,m={},y={},b=!1;for(n=0;n<v.length;n++)l=v[n],y[l]=s=r[pa(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),m[l]=f=Math.abs(s._m)/o[l],h=Math.min(h,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(p=Math.min(p,f)),delete s._constraintShrinkable,d=Math.max(d,f),s.constrain==="domain"&&(b=!0);if(!(h>BE*d&&!b)){for(n=0;n<v.length;n++)if(l=v[n],f=m[l],s=y[l],c=s.constrain,f!==p||c==="domain")if(u=f/p,c==="range")Zg(s,u);else{var w=s._inputDomain,g=(s.domain[1]-s.domain[0])/(w[1]-w[0]),x=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if(u/=g,u*x<1){s.domain=s._input.domain=w.slice(),Zg(s,u);continue}if(x<1&&(s.range=s._input.range=s._inputRange.slice(),u*=x),s.autorange){var _=s.r2l(s.range[0]),k=s.r2l(s.range[1]),T=(_+k)/2,S=T,D=T,L=Math.abs(k-T),R=T-L*u*1.0001,z=T+L*u*1.0001,N=cv.makePadFn(r,s,0),H=cv.makePadFn(r,s,1);Qg(s,u);var $=Math.abs(s._m),P=cv.concatExtremes(e,s),A=P.min,M=P.max,C,E;for(E=0;E<A.length;E++)C=A[E].val-N(A[E])/$,C>R&&C<S&&(S=C);for(E=0;E<M.length;E++)C=M[E].val+H(M[E])/$,C<z&&C>D&&(D=C);var F=(D-S)/(2*L);u/=F,S=s.l2r(S),D=s.l2r(D),s.range=s._input.range=_<k?[S,D]:[D,S]}Qg(s,u)}}}};ti.getAxisGroup=function(e,r){for(var a=e._axisMatchGroups,i=0;i<a.length;i++){var n=a[i];if(n[r])return"g"+i}return r};ti.clean=function(e,r){if(r._inputDomain){for(var a=!1,i=r._id,n=e._fullLayout._axisConstraintGroups,o=0;o<n.length;o++)if(n[o][i]){a=!0;break}(!a||r.constrain!=="domain")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function Qg(t,e){var r=t._inputDomain,a=GE[t.constraintoward],i=r[0]+(r[1]-r[0])*a;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}(function(t){var e=ft,r=Je,a=Qt,i=me,n=nr,o=kp,l=ot,s=xt,f=Wc,c=i2,u=Dt,v=Cr,h=ti,d=h.enforce,p=h.clean,m=ms.doAutoRange,y="start",b="middle",w="end";t.layoutStyles=function(A){return i.syncOrAsync([a.doAutoMargin,x],A)};function g(A,M,C){for(var E=0;E<C.length;E++){var F=C[E][0],j=C[E][1];if(!(F[0]>=A[1]||F[1]<=A[0])&&j[0]<M[1]&&j[1]>M[0])return!0}return!1}function x(A){var M=A._fullLayout,C=M._size,E=C.p,F=u.list(A,"",!0),j,B,G,O,W,V;if(M._paperdiv.style({width:A._context.responsive&&M.autosize&&!A._context._hasZeroWidth&&!A.layout.width?"100%":M.width+"px",height:A._context.responsive&&M.autosize&&!A._context._hasZeroHeight&&!A.layout.height?"100%":M.height+"px"}).selectAll(".main-svg").call(s.setSize,M.width,M.height),A._context.setBackground(A,M.paper_bgcolor),t.drawMainTitle(A),c.manage(A),!M._has("cartesian"))return a.previousPromises(A);function Z(Ge,Ve,Ue){var I=Ge._lw/2;if(Ge._id.charAt(0)==="x"){if(Ve){if(Ue==="top")return Ve._offset-E-I}else return C.t+C.h*(1-(Ge.position||0))+I%1;return Ve._offset+Ve._length+E+I}if(Ve){if(Ue==="right")return Ve._offset+Ve._length+E+I}else return C.l+C.w*(Ge.position||0)+I%1;return Ve._offset-E-I}for(j=0;j<F.length;j++){O=F[j];var X=O._anchorAxis;O._linepositions={},O._lw=s.crispRound(A,O.linewidth,1),O._mainLinePosition=Z(O,X,O.side),O._mainMirrorPosition=O.mirror&&X?Z(O,X,v.OPPOSITE_SIDE[O.side]):null}var Q=[],te=[],xe=[],ue=l.opacity(M.paper_bgcolor)===1&&l.opacity(M.plot_bgcolor)===1&&M.paper_bgcolor===M.plot_bgcolor;for(B in M._plots)if(G=M._plots[B],G.mainplot)G.bg&&G.bg.remove(),G.bg=void 0;else{var ae=G.xaxis.domain,le=G.yaxis.domain,de=G.plotgroup;if(g(ae,le,xe)){var be=de.node(),Te=G.bg=i.ensureSingle(de,"rect","bg");be.insertBefore(Te.node(),be.childNodes[0]),te.push(B)}else de.select("rect.bg").remove(),xe.push([ae,le]),ue||(Q.push(B),te.push(B))}var Le=M._bgLayer.selectAll(".bg").data(Q);for(Le.enter().append("rect").classed("bg",!0),Le.exit().remove(),Le.each(function(Ge){M._plots[Ge].bg=e.select(this)}),j=0;j<te.length;j++)G=M._plots[te[j]],W=G.xaxis,V=G.yaxis,G.bg&&W._offset!==void 0&&V._offset!==void 0&&G.bg.call(s.setRect,W._offset-E,V._offset-E,W._length+2*E,V._length+2*E).call(l.fill,M.plot_bgcolor).style("stroke-width",0);if(!M._hasOnlyLargeSploms)for(B in M._plots){G=M._plots[B],W=G.xaxis,V=G.yaxis;var _e=G.clipId="clip"+M._uid+B+"plot",Ie=i.ensureSingleById(M._clips,"clipPath",_e,function(Ge){Ge.classed("plotclip",!0).append("rect")});G.clipRect=Ie.select("rect").attr({width:W._length,height:V._length}),s.setTranslate(G.plot,W._offset,V._offset);var ce,ye;G._hasClipOnAxisFalse?(ce=null,ye=_e):(ce=_e,ye=null),s.setClipUrl(G.plot,ce,A),G.layerClipId=ye}var Ee,ze,K,ke,re,pe,we,se,ie,fe,ge,Me,Se;function Pe(Ge){return"M"+Ee+","+Ge+"H"+ze}function He(Ge){return"M"+W._offset+","+Ge+"h"+W._length}function Oe(Ge){return"M"+Ge+","+se+"V"+we}function ve(Ge){return V._shift!==void 0&&(Ge+=V._shift),"M"+Ge+","+V._offset+"v"+V._length}function Be(Ge,Ve,Ue){if(!Ge.showline||B!==Ge._mainSubplot)return"";if(!Ge._anchorAxis)return Ue(Ge._mainLinePosition);var I=Ve(Ge._mainLinePosition);return Ge.mirror&&(I+=Ve(Ge._mainMirrorPosition)),I}for(B in M._plots){G=M._plots[B],W=G.xaxis,V=G.yaxis;var Ne="M0,0";_(W,B)&&(re=T(W,"left",V,F),Ee=W._offset-(re?E+re:0),pe=T(W,"right",V,F),ze=W._offset+W._length+(pe?E+pe:0),K=Z(W,V,"bottom"),ke=Z(W,V,"top"),Se=!W._anchorAxis||B!==W._mainSubplot,Se&&(W.mirror==="allticks"||W.mirror==="all")&&(W._linepositions[B]=[K,ke]),Ne=Be(W,Pe,He),Se&&W.showline&&(W.mirror==="all"||W.mirror==="allticks")&&(Ne+=Pe(K)+Pe(ke)),G.xlines.style("stroke-width",W._lw+"px").call(l.stroke,W.showline?W.linecolor:"rgba(0,0,0,0)")),G.xlines.attr("d",Ne);var We="M0,0";_(V,B)&&(ge=T(V,"bottom",W,F),we=V._offset+V._length+(ge?E:0),Me=T(V,"top",W,F),se=V._offset-(Me?E:0),ie=Z(V,W,"left"),fe=Z(V,W,"right"),Se=!V._anchorAxis||B!==V._mainSubplot,Se&&(V.mirror==="allticks"||V.mirror==="all")&&(V._linepositions[B]=[ie,fe]),We=Be(V,Oe,ve),Se&&V.showline&&(V.mirror==="all"||V.mirror==="allticks")&&(We+=Oe(ie)+Oe(fe)),G.ylines.style("stroke-width",V._lw+"px").call(l.stroke,V.showline?V.linecolor:"rgba(0,0,0,0)")),G.ylines.attr("d",We)}return u.makeClipPaths(A),a.previousPromises(A)}function _(A,M){return(A.ticks||A.showline)&&(M===A._mainSubplot||A.mirror==="all"||A.mirror==="allticks")}function k(A,M,C){if(!C.showline||!C._lw)return!1;if(C.mirror==="all"||C.mirror==="allticks")return!0;var E=C._anchorAxis;if(!E)return!1;var F=v.FROM_BL[M];return C.side===M?E.domain[F]===A.domain[F]:C.mirror&&E.domain[1-F]===A.domain[1-F]}function T(A,M,C,E){if(k(A,M,C))return C._lw;for(var F=0;F<E.length;F++){var j=E[F];if(j._mainAxis===C._mainAxis&&k(A,M,j))return j._lw}return 0}t.drawMainTitle=function(A){var M=A._fullLayout.title,C=A._fullLayout,E=$(C),F=P(C),j=N(C,F),B=z(C,E);if(f.draw(A,"gtitle",{propContainer:C,propName:"title.text",placeholder:C._dfltTitle.plot,attributes:{x:B,y:j,"text-anchor":E,dy:F}}),M.text&&M.automargin){var G=e.selectAll(".gtitle"),O=s.bBox(G.node()).height,W=L(A,M,O);if(W>0){R(A,j,W,O),G.attr({x:B,y:j,"text-anchor":E,dy:H(M.yanchor)}).call(n.positionText,B,j);var V=(M.text.match(n.BR_TAG_ALL)||[]).length;if(V){var Z=v.LINE_SPACING*V+v.MID_SHIFT;M.y===0&&(Z=-Z),G.selectAll(".line").each(function(){var X=+this.getAttribute("dy").slice(0,-2)-Z+"em";this.setAttribute("dy",X)})}}}};function S(A,M,C,E,F){var j=M.yref==="paper"?A._fullLayout._size.h:A._fullLayout.height,B=i.isTopAnchor(M)?E:E-F,G=C==="b"?j-B:B;return i.isTopAnchor(M)&&C==="t"||i.isBottomAnchor(M)&&C==="b"?!1:G<F}function D(A,M,C,E,F){var j=0;return C==="middle"&&(j+=F/2),A==="t"?(C==="top"&&(j+=F),j+=E-M*E):(C==="bottom"&&(j+=F),j+=M*E),j}function L(A,M,C){var E=M.y,F=M.yanchor,j=E>.5?"t":"b",B=A._fullLayout.margin[j],G=0;return M.yref==="paper"?G=C+M.pad.t+M.pad.b:M.yref==="container"&&(G=D(j,E,F,A._fullLayout.height,C)+M.pad.t+M.pad.b),G>B?G:0}function R(A,M,C,E){var F="title.automargin",j=A._fullLayout.title,B=j.y>.5?"t":"b",G={x:j.x,y:j.y,t:0,b:0},O={};j.yref==="paper"&&S(A,j,B,M,E)?G[B]=C:j.yref==="container"&&(O[B]=C,A._fullLayout._reservedMargin[F]=O),a.allowAutoMargin(A,F),a.autoMargin(A,F,G)}function z(A,M){var C=A.title,E=A._size,F=0;switch(M===y?F=C.pad.l:M===w&&(F=-C.pad.r),C.xref){case"paper":return E.l+E.w*C.x+F;case"container":default:return A.width*C.x+F}}function N(A,M){var C=A.title,E=A._size,F=0;if(M==="0em"||!M?F=-C.pad.b:M===v.CAP_SHIFT+"em"&&(F=C.pad.t),C.y==="auto")return E.t/2;switch(C.yref){case"paper":return E.t+E.h-E.h*C.y+F;case"container":default:return A.height-A.height*C.y+F}}function H(A){return A==="top"?v.CAP_SHIFT+.3+"em":A==="bottom"?"-0.3em":v.MID_SHIFT+"em"}function $(A){var M=A.title,C=b;return i.isRightAnchor(M)?C=w:i.isLeftAnchor(M)&&(C=y),C}function P(A){var M=A.title,C="0em";return i.isTopAnchor(M)?C=v.CAP_SHIFT+"em":i.isMiddleAnchor(M)&&(C=v.MID_SHIFT+"em"),C}t.doTraceStyle=function(A){var M=A.calcdata,C=[],E;for(E=0;E<M.length;E++){var F=M[E],j=F[0]||{},B=j.trace||{},G=B._module||{},O=G.arraysToCalcdata;O&&O(F,B);var W=G.editStyle;W&&C.push({fn:W,cd0:j})}if(C.length){for(E=0;E<C.length;E++){var V=C[E];V.fn(A,V.cd0)}o(A),t.redrawReglTraces(A)}return a.style(A),r.getComponentMethod("legend","draw")(A),a.previousPromises(A)},t.doColorBars=function(A){return r.getComponentMethod("colorbar","draw")(A),a.previousPromises(A)},t.layoutReplot=function(A){var M=A.layout;return A.layout=void 0,r.call("_doPlot",A,"",M)},t.doLegend=function(A){return r.getComponentMethod("legend","draw")(A),a.previousPromises(A)},t.doTicksRelayout=function(A){return u.draw(A,"redraw"),A._fullLayout._hasOnlyLargeSploms&&(r.subplotsRegistry.splom.updateGrid(A),o(A),t.redrawReglTraces(A)),t.drawMainTitle(A),a.previousPromises(A)},t.doModeBar=function(A){var M=A._fullLayout;c.manage(A);for(var C=0;C<M._basePlotModules.length;C++){var E=M._basePlotModules[C].updateFx;E&&E(A)}return a.previousPromises(A)},t.doCamera=function(A){for(var M=A._fullLayout,C=M._subplots.gl3d,E=0;E<C.length;E++){var F=M[C[E]],j=F._scene;j.setViewport(F)}},t.drawData=function(A){var M=A._fullLayout;o(A);for(var C=M._basePlotModules,E=0;E<C.length;E++)C[E].plot(A);return t.redrawReglTraces(A),a.style(A),r.getComponentMethod("selections","draw")(A),r.getComponentMethod("shapes","draw")(A),r.getComponentMethod("annotations","draw")(A),r.getComponentMethod("images","draw")(A),M._replotting=!1,a.previousPromises(A)},t.redrawReglTraces=function(A){var M=A._fullLayout;if(M._has("regl")){var C=A._fullData,E=[],F=[],j,B;for(M._hasOnlyLargeSploms&&M._splomGrid.draw(),j=0;j<C.length;j++){var G=C[j];G.visible===!0&&G._length!==0&&(G.type==="splom"?M._splomScenes[G.uid].draw():G.type==="scattergl"?i.pushUnique(E,G.xaxis+G.yaxis):G.type==="scatterpolargl"&&i.pushUnique(F,G.subplot))}for(j=0;j<E.length;j++)B=M._plots[E[j]],B._scene&&B._scene.draw();for(j=0;j<F.length;j++)B=M[F[j]]._subplot,B._scene&&B._scene.draw()}},t.doAutoRangeAndConstraints=function(A){for(var M=u.list(A,"",!0),C,E={},F=0;F<M.length;F++)if(C=M[F],!E[C._id]){E[C._id]=1,p(A,C),m(A,C);var j=C._matchGroup;if(j)for(var B in j){var G=u.getFromId(A,B);m(A,G,C.range),E[B]=1}}d(A)},t.finalDraw=function(A){r.getComponentMethod("rangeslider","draw")(A),r.getComponentMethod("rangeselector","draw")(A)},t.drawMarginPushers=function(A){r.getComponentMethod("legend","draw")(A),r.getComponentMethod("rangeselector","draw")(A),r.getComponentMethod("sliders","draw")(A),r.getComponentMethod("updatemenus","draw")(A),r.getComponentMethod("colorbar","draw")(A)}})(tu);var XE=Ii.readPaths,YE=Pp,l2=An.clearOutlineControllers,dv=ot,s2=xt,WE=Lt.arrayEditor,f2=Fi,qE=f2.getPathString,c2={draw:lu,drawOne:u2,activateLastSelection:QE};function lu(t){var e=t._fullLayout;l2(t),e._selectionLayer.selectAll("path").remove();for(var r in e._plots){var a=e._plots[r].selectionLayer;a&&a.selectAll("path").remove()}for(var i=0;i<e.selections.length;i++)u2(t,i)}function su(t){return t._context.editSelection}function u2(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=f2.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input)return;n(t._fullLayout._selectionLayer);function n(o){var l=qE(t,a),s={"data-index":e,"fill-rule":"evenodd",d:l},f=a.opacity,c="rgba(0,0,0,0)",u=a.line.color||dv.contrast(t._fullLayout.plot_bgcolor),v=a.line.width,h=a.line.dash;v||(v=5,h="solid");var d=su(t)&&t._fullLayout._activeSelectionIndex===e;d&&(c=t._fullLayout.activeselection.fillcolor,f=t._fullLayout.activeselection.opacity);for(var p=[],m=1;m>=0;m--){var y=o.append("path").attr(s).style("opacity",m?.1:f).call(dv.stroke,u).call(dv.fill,c).call(s2.dashLine,m?"solid":h,m?4+v:v);if(ZE(y,t,a),d){var b=WE(t.layout,"selections",a);y.style({cursor:"move"});var w={element:y.node(),plotinfo:i,gd:t,editHelpers:b,isActiveSelection:!0},g=XE(l,t);YE(g,y,w)}else y.style("pointer-events",m?"all":"none");p[m]=y}var x=p[0],_=p[1];_.node().addEventListener("click",function(){return KE(t,x)})}}function ZE(t,e,r){var a=r.xref+r.yref;s2.setClipUrl(t,"clip"+e._fullLayout._uid+a,e)}function KE(t,e){if(su(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeSelectionIndex){lh(t);return}t._fullLayout._activeSelectionIndex=a,t._fullLayout._deactivateSelection=lh,lu(t)}}}function QE(t){if(su(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=lh,lu(t)}}function lh(t){if(su(t)){var e=t._fullLayout._activeSelectionIndex;e>=0&&(l2(t),delete t._fullLayout._activeSelectionIndex,lu(t))}}var v2={exports:{}},hv=Fc.dot,ef=Yt.BADNUM,dc=v2.exports={};dc.tester=function(e){var r=e.slice(),a=r[0][0],i=a,n=r[0][1],o=n,l;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),l=1;l<r.length;l++)a=Math.min(a,r[l][0]),i=Math.max(i,r[l][0]),n=Math.min(n,r[l][1]),o=Math.max(o,r[l][1]);var s=!1,f;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(s=!0,f=function(d){return d[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]&&(s=!0,f=function(d){return d[1]===r[0][1]}));function c(d,p){var m=d[0],y=d[1];return!(m===ef||m<a||m>i||y===ef||y<n||y>o||p&&f(d))}function u(d,p){var m=d[0],y=d[1];if(m===ef||m<a||m>i||y===ef||y<n||y>o)return!1;var b=r.length,w=r[0][0],g=r[0][1],x=0,_,k,T,S,D;for(_=1;_<b;_++)if(k=w,T=g,w=r[_][0],g=r[_][1],S=Math.min(k,w),!(m<S||m>Math.max(k,w)||y>Math.max(T,g)))if(y<Math.min(T,g))m!==S&&x++;else{if(w===k?D=y:D=T+(m-k)*(g-T)/(w-k),y===D)return!(_===1&&p);y<=D&&m!==S&&x++}return x%2===1}var v=!0,h=r[0];for(l=1;l<r.length;l++)if(h[0]!==r[l][0]||h[1]!==r[l][1]){v=!1;break}return{xmin:a,xmax:i,ymin:n,ymax:o,pts:r,contains:s?c:u,isRect:s,degenerate:v}};dc.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=hv(o,o),s=Math.sqrt(l),f=[-o[1]/s,o[0]/s],c,u,v;for(c=r+1;c<a;c++)if(u=[e[c][0]-n[0],e[c][1]-n[1]],v=hv(u,o),v<0||v>l||Math.abs(hv(u,f))>i)return!0;return!1};dc.filter=function(e,r){var a=[e[0]],i=0,n=0;function o(s){e.push(s);var f=a.length,c=i;a.splice(n+1);for(var u=c+1;u<e.length;u++)(u===e.length-1||dc.isSegmentBent(e,c,u+1,r))&&(a.push(e[u]),a.length<f-2&&(i=u,n=a.length-1),c=u)}if(e.length>1){var l=e.pop();o(l)}return{addPt:o,raw:e,filtered:a}};var d2=v2.exports,JE={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"},Jg=LM,eR=CM,ql=Je,tR=xt.dashStyle,ul=ot,rR=_a,aR=la.makeEventData,ys=Cn,iR=ys.freeMode,nR=ys.rectMode,Zl=ys.drawMode,Hp=ys.openMode,Op=ys.selectMode,e0=Fi,t0=au,h2=Pp,p2=An.clearOutline,m2=Ii,pv=m2.handleEllipse,oR=m2.readPaths,lR=Lp.newShapes,sR=IT,fR=c2.activateLastSelection,Hf=me,cR=Hf.sorterAsc,y2=d2,vl=Bc,ea=Wt.getFromId,uR=kp,vR=tu.redrawReglTraces,Of=JE,Ca=Of.MINSELECT,dR=y2.filter,jp=y2.tester,Bp=Sp,r0=Bp.p2r,hR=Bp.axValue,pR=Bp.getTransform;function Gp(t){return t.subplot!==void 0}function mR(t,e,r,a,i){var n=!Gp(a),o=iR(i),l=nR(i),s=Hp(i),f=Zl(i),c=Op(i),u=i==="drawline",v=i==="drawcircle",h=u||v,d=a.gd,p=d._fullLayout,m=c&&p.newselection.mode==="immediate"&&n,y=p._zoomlayer,b=a.element.getBoundingClientRect(),w=a.plotinfo,g=pR(w),x=e-b.left,_=r-b.top;p._calcInverseTransform(d);var k=Hf.apply3DTransform(p._invTransform)(x,_);x=k[0],_=k[1];var T=p._invScaleX,S=p._invScaleY,D=x,L=_,R="M"+x+","+_,z=a.xaxes[0],N=a.yaxes[0],H=z._length,$=N._length,P=t.altKey&&!(Zl(i)&&s),A,M,C,E,F,j,B;b2(t,d,a),o&&(A=dR([[x,_]],Of.BENDPX));var G=y.selectAll("path.select-outline-"+w.id).data([1]),O=f?p.newshape:p.newselection;f&&(a.hasText=O.label.text||O.label.texttemplate);var W=f&&!s?O.fillcolor:"rgba(0,0,0,0)",V=O.line.color||(n?ul.contrast(d._fullLayout.plot_bgcolor):"#7f7f7f");G.enter().append("path").attr("class","select-outline select-outline-"+w.id).style({opacity:f?O.opacity/2:1,"stroke-dasharray":tR(O.line.dash,O.line.width),"stroke-width":O.line.width+"px","shape-rendering":"crispEdges"}).call(ul.stroke,V).call(ul.fill,W).attr("fill-rule","evenodd").classed("cursor-move",!!f).attr("transform",g).attr("d",R+"Z");var Z=y.append("path").attr("class","zoombox-corners").style({fill:ul.background,stroke:ul.defaultLine,"stroke-width":1}).attr("transform",g).attr("d","M0,0Z");if(f&&a.hasText){var X=y.select(".label-temp");X.empty()&&(X=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Q=p._uid+Of.SELECTID,te=[],xe=fu(d,a.xaxes,a.yaxes,a.subplot);m&&!t.shiftKey&&(a._clearSubplotSelections=function(){if(n){var ae=z._id,le=N._id;k2(d,ae,le,xe);for(var de=(d.layout||{}).selections||[],be=[],Te=!1,Le=0;Le<de.length;Le++){var _e=p.selections[Le];_e.xref!==ae||_e.yref!==le?be.push(de[Le]):Te=!0}Te&&(d._fullLayout._noEmitSelectedAtStart=!0,ql.call("_guiRelayout",d,{selections:be}))}});var ue=DR(a);a.moveFn=function(ae,le){a._clearSubplotSelections&&(a._clearSubplotSelections(),a._clearSubplotSelections=void 0),D=Math.max(0,Math.min(H,T*ae+x)),L=Math.max(0,Math.min($,S*le+_));var de=Math.abs(D-x),be=Math.abs(L-_);if(l){var Te,Le,_e;if(c){var Ie=p.selectdirection;switch(Ie==="any"?be<Math.min(de*.6,Ca)?Te="h":de<Math.min(be*.6,Ca)?Te="v":Te="d":Te=Ie,Te){case"h":Le=v?$/2:0,_e=$;break;case"v":Le=v?H/2:0,_e=H;break}}if(f)switch(p.newshape.drawdirection){case"vertical":Te="h",Le=v?$/2:0,_e=$;break;case"horizontal":Te="v",Le=v?H/2:0,_e=H;break;case"ortho":de<be?(Te="h",Le=_,_e=L):(Te="v",Le=x,_e=D);break;default:Te="d"}Te==="h"?(E=h?pv(v,[D,Le],[D,_e]):[[x,Le],[x,_e],[D,_e],[D,Le]],E.xmin=h?D:Math.min(x,D),E.xmax=h?D:Math.max(x,D),E.ymin=Math.min(Le,_e),E.ymax=Math.max(Le,_e),Z.attr("d","M"+E.xmin+","+(_-Ca)+"h-4v"+2*Ca+"h4ZM"+(E.xmax-1)+","+(_-Ca)+"h4v"+2*Ca+"h-4Z")):Te==="v"?(E=h?pv(v,[Le,L],[_e,L]):[[Le,_],[Le,L],[_e,L],[_e,_]],E.xmin=Math.min(Le,_e),E.xmax=Math.max(Le,_e),E.ymin=h?L:Math.min(_,L),E.ymax=h?L:Math.max(_,L),Z.attr("d","M"+(x-Ca)+","+E.ymin+"v-4h"+2*Ca+"v4ZM"+(x-Ca)+","+(E.ymax-1)+"v4h"+2*Ca+"v-4Z")):Te==="d"&&(E=h?pv(v,[x,_],[D,L]):[[x,_],[x,L],[D,L],[D,_]],E.xmin=Math.min(x,D),E.xmax=Math.max(x,D),E.ymin=Math.min(_,L),E.ymax=Math.max(_,L),Z.attr("d","M0,0Z"))}else o&&(A.addPt([D,L]),E=A.filtered);if(a.selectionDefs&&a.selectionDefs.length?(C=x2(a.mergedPolygons,E,P),E.subtract=P,M=Up(a.selectionDefs.concat([E]))):(C=[E],M=jp(E)),h2(w2(C,s),G,a),c){var ce=sh(d,!1),ye=ce.eventData?ce.eventData.points.slice():[];ce=sh(d,!1,M,xe,a),M=ce.selectionTesters,B=ce.eventData;var Ee;A?Ee=A.filtered:Ee=A2(C),vl.throttle(Q,Of.SELECTDELAY,function(){te=T2(M,xe);for(var ze=te.slice(),K=0;K<ye.length;K++){for(var ke=ye[K],re=!1,pe=0;pe<ze.length;pe++)if(ze[pe].curveNumber===ke.curveNumber&&ze[pe].pointNumber===ke.pointNumber){re=!0;break}re||ze.push(ke)}ze.length&&(B||(B={}),B.points=ze),ue(B,Ee),PR(d,B)})}},a.clickFn=function(ae,le){if(Z.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!f){var de=p.clickmode;vl.done(Q).then(function(){if(vl.clear(Q),ae===2){for(G.remove(),F=0;F<xe.length;F++)j=xe[F],j._module.selectPoints(j,!1);if(Ql(d,xe),Kl(a),Xp(d),xe.length){var be=xe[0].xaxis,Te=xe[0].yaxis;if(be&&Te){for(var Le=[],_e=d._fullLayout.selections,Ie=0;Ie<_e.length;Ie++){var ce=_e[Ie];ce&&(ce.xref!==be._id||ce.yref!==Te._id)&&Le.push(ce)}Le.length<_e.length&&(d._fullLayout._noEmitSelectedAtStart=!0,ql.call("_guiRelayout",d,{selections:Le}))}}}else de.indexOf("select")>-1&&g2(le,d,a.xaxes,a.yaxes,a.subplot,a,G),de==="event"&&Jl(d,void 0);rR.click(d,le,w.id)}).catch(Hf.error)}},a.doneFn=function(){Z.remove(),vl.done(Q).then(function(){vl.clear(Q),!m&&E&&a.selectionDefs&&(E.subtract=P,a.selectionDefs.push(E),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,C)),(m||f)&&Kl(a,m),a.doneFnCompleted&&a.doneFnCompleted(te),c&&Jl(d,B)}).catch(Hf.error)}}function g2(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,u=[],v,h,d,p,m,y,b,w,g,x;if(_R(l)){b2(t,e,n),v=fu(e,r,a,i);var _=wR(l,v),k=_.pointNumbers.length>0;if(k?TR(v,_):kR(v)&&(b=i0(_))){for(o&&o.remove(),x=0;x<v.length;x++)h=v[x],h._module.selectPoints(h,!1);Ql(e,v),Kl(n),c&&Xp(e)}else{w=t.shiftKey&&(b!==void 0?b:i0(_)),d=yR(_.pointNumber,_.searchInfo,w);var T=n.selectionDefs.concat([d]);for(p=Up(T),x=0;x<v.length;x++)if(m=v[x]._module.selectPoints(v[x],p),y=_2(m,v[x]),u.length)for(var S=0;S<y.length;S++)u.push(y[S]);else u=y;if(g={points:u},Ql(e,v,g),d&&n&&n.selectionDefs.push(d),o){var D=n.mergedPolygons,L=Hp(n.dragmode);h2(w2(D,L),o,n)}c&&Jl(e,g)}}}function yR(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}function mv(t){return"pointNumber"in t&&"searchInfo"in t}function gR(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,a,i){var n=t.searchInfo.cd[0].trace._expandedIndex,o=i.cd[0].trace._expandedIndex;return o===n&&a===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function Up(t){if(!t.length)return;for(var e=[],r=mv(t[0])?0:t[0][0][0],a=r,i=mv(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(mv(t[o]))e.push(gR(t[o]));else{var l=jp(t[o]);l.subtract=!!t[o].subtract,e.push(l),r=Math.min(r,l.xmin),a=Math.max(a,l.xmax),i=Math.min(i,l.ymin),n=Math.max(n,l.ymax)}function s(f,c,u,v){for(var h=!1,d=0;d<e.length;d++)e[d].contains(f,c,u,v)&&(h=!e[d].subtract);return h}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function b2(t,e,r){var a=e._fullLayout,i=r.plotinfo,n=r.dragmode,o=a._lastSelectedSubplot&&a._lastSelectedSubplot===i.id,l=(t.shiftKey||t.altKey)&&!(Zl(n)&&Hp(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&Kl(r),o||(p2(e),a._lastSelectedSubplot=i.id)}function bR(t){return t._fullLayout._activeShapeIndex>=0}function xR(t){return t._fullLayout._activeSelectionIndex>=0}function Kl(t,e){var r=t.dragmode,a=t.plotinfo,i=t.gd;bR(i)&&i._fullLayout._deactivateShape(i),xR(i)&&i._fullLayout._deactivateSelection(i);var n=i._fullLayout,o=n._zoomlayer,l=Zl(r),s=Op(r);if(l||s){var f=o.selectAll(".select-outline-"+a.id);if(f&&i._fullLayout._outlining){var c;l&&(c=lR(f,t)),c&&ql.call("_guiRelayout",i,{shapes:c});var u;s&&!Gp(t)&&(u=sR(f,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,ql.call("_guiRelayout",i,{selections:u}).then(function(){e&&fR(i)})),i._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=t.selectionDefs=[],a.selection.mergedPolygons=t.mergedPolygons=[]}function a0(t){return t._id}function fu(t,e,r,a){if(!t.calcdata)return[];var i=[],n=e.map(a0),o=r.map(a0),l,s,f;for(f=0;f<t.calcdata.length;f++)if(l=t.calcdata[f],s=l[0].trace,!(s.visible!==!0||!s._module||!s._module.selectPoints))if(Gp({subplot:a})&&(s.subplot===a||s.geo===a))i.push(tf(s._module,l,e[0],r[0]));else if(s.type==="splom"){if(s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=tf(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}}else if(s.type==="sankey"){var u=tf(s._module,l,e[0],r[0]);i.push(u)}else{if(n.indexOf(s.xaxis)===-1&&(!s._xA||!s._xA.overlaying)||o.indexOf(s.yaxis)===-1&&(!s._yA||!s._yA.overlaying))continue;i.push(tf(s._module,l,ea(t,s.xaxis),ea(t,s.yaxis)))}return i}function tf(t,e,r,a){return{_module:t,cd:e,xaxis:r,yaxis:a}}function _R(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function wR(t,e){var r=t[0],a=-1,i=[],n,o;for(o=0;o<e.length;o++)if(n=e[o],r.fullData._expandedIndex===n.cd[0].trace._expandedIndex){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?a=r.pointNumber:r.binNumber!==void 0&&(a=r.binNumber,i=r.pointNumbers);break}return{pointNumber:a,pointNumbers:i,searchInfo:n}}function i0(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,a=t.pointNumbers,i=a.length>0,n=i?a[0]:r;return e.selectedpoints?e.selectedpoints.indexOf(n)>-1:!1}function TR(t,e){var r=[],a,i,n,o;for(o=0;o<t.length;o++)a=t[o],a.cd[0].trace.selectedpoints&&a.cd[0].trace.selectedpoints.length>0&&r.push(a);if(r.length===1&&(n=r[0]===e.searchInfo,n&&(i=e.searchInfo.cd[0].trace,i.selectedpoints.length===e.pointNumbers.length))){for(o=0;o<e.pointNumbers.length;o++)if(i.selectedpoints.indexOf(e.pointNumbers[o])<0)return!1;return!0}return!1}function kR(t){var e=0,r,a,i;for(i=0;i<t.length;i++)if(r=t[i],a=r.cd[0].trace,a.selectedpoints&&(a.selectedpoints.length>1||(e+=a.selectedpoints.length,e>1)))return!1;return e===1}function Ql(t,e,r){var a;for(a=0;a<e.length;a++){var i=e[a].cd[0].trace._fullInput,n=t._fullLayout._tracePreGUI[i.uid]||{};n.selectedpoints===void 0&&(n.selectedpoints=i._input.selectedpoints||null)}var o;if(r){var l=r.points||[];for(a=0;a<e.length;a++)o=e[a].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(var s=0;s<l.length;s++){var f=l[s],c=f.data,u=f.fullData,v=f.pointIndex,h=f.pointIndices;h?([].push.apply(c.selectedpoints,h),o._fullInput!==o&&[].push.apply(u.selectedpoints,h)):(c.selectedpoints.push(v),o._fullInput!==o&&u.selectedpoints.push(v))}}else for(a=0;a<e.length;a++)o=e[a].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;AR(t,e)}function AR(t,e){for(var r=!1,a=0;a<e.length;a++){var i=e[a],n=i.cd;ql.traceIs(n[0].trace,"regl")&&(r=!0);var o=i._module,l=o.styleOnSelect||o.style;l&&(l(t,n,n[0].node3),n[0].nodeRangePlot3&&l(t,n,n[0].nodeRangePlot3))}r&&(uR(t),vR(t))}function x2(t,e,r){for(var a=r?Jg.difference:Jg.union,i=a({regions:t},{regions:[e]}),n=i.regions.reverse(),o=0;o<n.length;o++){var l=n[o];l.subtract=Vp(l,n.slice(0,o))}return n}function _2(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=aR(t[i],a,r);return t}function w2(t,e){for(var r=[],a=0;a<t.length;a++){r[a]=[];for(var i=0;i<t[a].length;i++){r[a][i]=[],r[a][i][0]=i?"L":"M";for(var n=0;n<t[a][i].length;n++)r[a][i].push(t[a][i][n])}e||r[a].push(["Z",r[a][0][1],r[a][0][2]])}return r}function T2(t,e){for(var r=[],a,i,n=0;n<e.length;n++){var o=e[n];i=o._module.selectPoints(o,t),a=_2(i,o),r=r.concat(a)}return r}function sh(t,e,r,a,i){var n=!!a,o,l,s;i&&(o=i.plotinfo,l=i.xaxes[0]._id,s=i.yaxes[0]._id);var f=[],c=[],u=n0(t),v=t._fullLayout;if(o){var h=v._zoomlayer,d=v.dragmode,p=Zl(d),m=Op(d);if(p||m){var y=ea(t,l,"x"),b=ea(t,s,"y");if(y&&b){var w=h.selectAll(".select-outline-"+o.id);if(w&&t._fullLayout._outlining&&w.length){for(var g=w[0][0],x=g.getAttribute("d"),_=oR(x,t,o),k=[],T=0;T<_.length;T++){for(var S=_[T],D=[],L=0;L<S.length;L++)D.push([yi(y,S[L][1]),yi(b,S[L][2])]);D.xref=l,D.yref=s,D.subtract=Vp(D,k),k.push(D)}u=u.concat(k)}}}}var R=l&&s?[l+s]:v._subplots.cartesian;MR(t);for(var z={},N=0;N<R.length;N++){var H=R[N],$=H.indexOf("y"),P=H.slice(0,$),A=H.slice($),M=l&&s?r:void 0;if(M=LR(u,P,A,M),M){var C=a;if(!n){var E=ea(t,P,"x"),F=ea(t,A,"y");C=fu(t,[E],[F],H);for(var j=0;j<C.length;j++){var B=C[j],G=B.cd[0],O=G.trace;if(B._module.name==="scattergl"&&!G.t.xpx){var W=O.x,V=O.y,Z=O._length;G.t.xpx=[],G.t.ypx=[];for(var X=0;X<Z;X++)G.t.xpx[X]=E.c2p(W[X]),G.t.ypx[X]=F.c2p(V[X])}B._module.name==="splom"&&(z[O.uid]||(z[O.uid]=!0))}}var Q=T2(M,C);f=f.concat(Q),c=c.concat(C)}}var te={points:f};Ql(t,c,te);var xe=v.clickmode,ue=xe.indexOf("event")>-1&&e;if(!o&&e){var ae=n0(t,!0);if(ae.length){var le=ae[0].xref,de=ae[0].yref;if(le&&de){var be=A2(ae),Te=M2([ea(t,le,"x"),ea(t,de,"y")]);Te(te,be)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:ue&&Jl(t,te),v._reselect=!1}if(!o&&v._deselect){var Le=v._deselect;l=Le.xref,s=Le.yref,SR(l,s,c)||k2(t,l,s,a),ue&&(te.points.length?Jl(t,te):Xp(t)),v._deselect=!1}return{eventData:te,selectionTesters:r}}function MR(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var a=e[r][0],i=a.trace,n=t._fullLayout._splomScenes;if(n){var o=n[i.uid];o&&(o.selectBatch=[])}}}function SR(t,e,r){for(var a=0;a<r.length;a++){var i=r[a];if(i.xaxis&&i.xaxis._id===t&&i.yaxis&&i.yaxis._id===e)return!0}return!1}function k2(t,e,r,a){a=fu(t,[ea(t,e,"x")],[ea(t,r,"y")],e+r);for(var i=0;i<a.length;i++){var n=a[i];n._module.selectPoints(n,!1)}Ql(t,a)}function LR(t,e,r,a){for(var i,n=0;n<t.length;n++){var o=t[n];if(!(e!==o.xref||r!==o.yref))if(i){var l=!!o.subtract;i=x2(i,o,l),a=Up(i)}else i=[o],a=jp(o)}return a}function n0(t,e){for(var r=[],a=t._fullLayout,i=a.selections,n=i.length,o=0;o<n;o++)if(!(e&&o!==a._activeSelectionIndex)){var l=i[o];if(l){var s=l.xref,f=l.yref,c=ea(t,s,"x"),u=ea(t,f,"y"),v,h,d,p,m;if(l.type==="rect"){m=[];var y=yi(c,l.x0),b=yi(c,l.x1),w=yi(u,l.y0),g=yi(u,l.y1);m=[[y,w],[y,g],[b,g],[b,w]],v=Math.min(y,b),h=Math.max(y,b),d=Math.min(w,g),p=Math.max(w,g),m.xmin=v,m.xmax=h,m.ymin=d,m.ymax=p,m.xref=s,m.yref=f,m.subtract=!1,m.isRect=!0,r.push(m)}else if(l.type==="path")for(var x=l.path.split("Z"),_=[],k=0;k<x.length;k++){var T=x[k];if(T){T+="Z";var S=e0.extractPathCoords(T,t0.paramIsX,"raw"),D=e0.extractPathCoords(T,t0.paramIsY,"raw");v=1/0,h=-1/0,d=1/0,p=-1/0,m=[];for(var L=0;L<S.length;L++){var R=yi(c,S[L]),z=yi(u,D[L]);m.push([R,z]),v=Math.min(R,v),h=Math.max(R,h),d=Math.min(z,d),p=Math.max(z,p)}m.xmin=v,m.xmax=h,m.ymin=d,m.ymax=p,m.xref=s,m.yref=f,m.subtract=Vp(m,_),_.push(m),r.push(m)}}}}return r}function Vp(t,e){for(var r=!1,a=0;a<e.length;a++)for(var i=e[a],n=0;n<t.length;n++)if(eR(t[n],i)){r=!r;break}return r}function yi(t,e){return t.type==="date"&&(e=e.replace("_"," ")),t.type==="log"?t.c2p(e):t.r2p(e,null,t.calendar)}function A2(t){for(var e=t.length,r=[],a=0;a<e;a++){var i=t[a];r=r.concat(i),r=r.concat([i[0]])}return CR(r)}function CR(t){return t.isRect=t.length===5&&t[0][0]===t[4][0]&&t[0][1]===t[4][1]&&t[0][0]===t[1][0]&&t[2][0]===t[3][0]&&t[0][1]===t[3][1]&&t[1][1]===t[2][1]||t[0][1]===t[1][1]&&t[2][1]===t[3][1]&&t[0][0]===t[3][0]&&t[1][0]===t[2][0],t.isRect&&(t.xmin=Math.min(t[0][0],t[2][0]),t.xmax=Math.max(t[0][0],t[2][0]),t.ymin=Math.min(t[0][1],t[2][1]),t.ymax=Math.max(t[0][1],t[2][1])),t}function M2(t){return function(e,r){for(var a,i,n=0;n<t.length;n++){var o=t[n],l=o._id,s=l.charAt(0);if(r.isRect){a||(a={});var f=r[s+"min"],c=r[s+"max"];f!==void 0&&c!==void 0&&(a[l]=[r0(o,f),r0(o,c)].sort(cR))}else i||(i={}),i[l]=r.map(hR(o))}a&&(e.range=a),i&&(e.lassoPoints=i)}}function DR(t){var e=t.plotinfo;return e.fillRangeItems||M2(t.xaxes.concat(t.yaxes))}function PR(t,e){t.emit("plotly_selecting",e)}function Jl(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function Xp(t){t.emit("plotly_deselect",null)}var ER={reselect:sh,prepSelect:mR,clearOutline:p2,clearSelectionsCache:Kl,selectOnClick:g2},S2=[{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}],cu={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"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",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}},o0=S2,l0=vr,rf=Lr,RR=Lt.templatedArray,af=cu;function s0(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function f0(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}var gs=RR("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (<br>), bold (<b></b>), italics (<i></i>),","hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub>","<span> are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:l0({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use <br> to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more <br> HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:o0.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:o0.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[f0("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[f0("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",rf.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",af.axisRefDescription("x","left","right"),s0("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",rf.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",af.axisRefDescription("y","bottom","top"),s0("y")].join(" ")},xref:{valType:"enumerated",values:["paper",rf.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",af.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",rf.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",af.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:l0({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}}),uu={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},c0=Xo.axisHoverFormat,zR=mr.texttemplateAttrs,IR=mr.hovertemplateAttrs,u0=Sn,FR=vr,$R=Hr.dash,NR=Hr.pattern,HR=xt,v0=uu,yv=Nt.extendFlat;function d0(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M<n>* on the "+t+" axis.","Special values in the form of *M<n>* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function h0(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function p0(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}var $i={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:d0("x"),yperiod:d0("y"),xperiod0:h0("x0"),yperiod0:h0("y0"),xperiodalignment:p0("x"),yperiodalignment:p0("y"),xhoverformat:c0("x"),yhoverformat:c0("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant in the following cases:","1. when `scattermode` is set to *group*.","2. when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:zR({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+v0.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:IR({},{keys:v0.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:yv({},$R,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot",description:["Sets the line back off from the end point of the nth line segment (in px).","This option is useful e.g. to avoid overlap with arrowhead markers.","With *auto* the lines would trim before markers if `marker.angleref` is set to *previous*."].join(" ")},simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:NR,marker:yv({symbol:{valType:"enumerated",values:HR.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:yv({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},u0("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},u0("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:FR({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},m0=gs,y0=$i.line,OR=Hr.dash,nf=Nt.extendFlat,jR=Ia.overrideAll,BR=Lt.templatedArray,g0=cu,L2=jR(BR("selection",{type:{valType:"enumerated",values:["rect","path"],description:["Specifies the selection type to be drawn.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and (`x0`,`y1`).","If *path*, draw a custom SVG path using `path`."].join(" ")},xref:nf({},m0.xref,{description:["Sets the selection's x coordinate axis.",g0.axisRefDescription("x","left","right")].join(" ")}),yref:nf({},m0.yref,{description:["Sets the selection's x coordinate axis.",g0.axisRefDescription("y","bottom","top")].join(" ")}),x0:{valType:"any",description:"Sets the selection's starting x position."},x1:{valType:"any",description:"Sets the selection's end x position."},y0:{valType:"any",description:"Sets the selection's starting y position."},y1:{valType:"any",description:"Sets the selection's end y position."},path:{valType:"string",editType:"arraydraw",description:["For `type` *path* - a valid SVG path similar to `shapes.path` in data coordinates.","Allowed segments are: M, L and Z."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw",description:"Sets the opacity of the selection."},line:{color:y0.color,width:nf({},y0.width,{min:1,dflt:1}),dash:nf({},OR,{dflt:"dot"})}}),"arraydraw","from-root"),b0=me,of=Dt,GR=Ha,UR=L2,x0=Fi,VR=function(e,r){GR(e,r,{name:"selections",handleItemDefaults:XR});for(var a=r.selections,i=0;i<a.length;i++){var n=a[i];n&&n.path===void 0&&(n.x0===void 0||n.x1===void 0||n.y0===void 0||n.y1===void 0)&&(r.selections[i]=null)}};function XR(t,e,r){function a(_,k){return b0.coerce(t,e,UR,_,k)}var i=a("path"),n=i?"path":"rect",o=a("type",n),l=o!=="path";l&&delete e.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var s=["x","y"],f=0;f<2;f++){var c=s[f],u={_fullLayout:r},v,h,d,p=of.coerceRef(t,e,u,c);if(v=of.getFromId(u,p),v._selectionIndices.push(e._index),d=x0.rangeToShapePosition(v),h=x0.shapePositionToRange(v),l){var m=c+"0",y=c+"1",b=t[m],w=t[y];t[m]=h(t[m],!0),t[y]=h(t[y],!0),of.coercePosition(e,u,a,p,m),of.coercePosition(e,u,a,p,y);var g=e[m],x=e[y];g!==void 0&&x!==void 0&&(e[m]=d(g),e[y]=d(x),t[m]=b,t[y]=w)}}l&&b0.noneOrAll(t,e,["x0","x1","y0","y1"])}var YR=function(e,r,a){a("newselection.mode");var i=a("newselection.line.width");i&&(a("newselection.line.color"),a("newselection.line.dash")),a("activeselection.fillcolor"),a("activeselection.opacity")},WR=Je,_0=me,w0=Wt,vu=function(e){return function(a,i){var n=a[e];if(Array.isArray(n))for(var o=WR.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,u=s.cartesian,v=i._has("cartesian")||i._has("gl2d"),h=0;h<n.length;h++){var d=n[h];if(_0.isPlainObject(d)){var p=w0.cleanId(d.xref,"x",!1),m=w0.cleanId(d.yref,"y",!1),y=l.x.test(p),b=l.y.test(m);if(y||b){v||_0.pushUnique(i._basePlotModules,o);var w=!1;y&&f.indexOf(p)===-1&&(f.push(p),w=!0),b&&c.indexOf(m)===-1&&(c.push(m),w=!0),w&&y&&b&&u.push(p+m)}}}}},T0=c2,dl=ER,bs={moduleType:"component",name:"selections",layoutAttributes:L2,supplyLayoutDefaults:VR,supplyDrawNewSelectionDefaults:YR,includeBasePlot:vu("selections"),draw:T0.draw,drawOne:T0.drawOne,reselect:dl.reselect,prepSelect:dl.prepSelect,clearOutline:dl.clearOutline,clearSelectionsCache:dl.clearSelectionsCache,selectOnClick:dl.selectOnClick},Yp=ft,ta=me,k0=ta.numberFormat,qR=wa,ZR=n_,lf=Je,C2=ta.strTranslate,KR=nr,A0=ot,di=xt,QR=_a,M0=Dt,JR=zi,ez=Oa,D2=Cn,sf=D2.selectingOrDrawing,tz=D2.freeMode,rz=Cr.FROM_TL,az=kp,iz=tu.redrawReglTraces,nz=Qt,fh=Wt.getFromId,oz=bs.prepSelect,lz=bs.clearOutline,sz=bs.selectOnClick,gv=n2,Wp=Lr,S0=Wp.MINDRAG,Mr=Wp.MINZOOM,L0=!0;function fz(t,e,r,a,i,n,o,l){var s=t._fullLayout._zoomlayer,f=o+l==="nsew",c=(o+l).length===1,u,v,h,d,p,m,y,b,w,g,x,_,k,T,S,D,L,R,z,N,H,$,P;r+=e.yaxis._shift;function A(){if(u=e.xaxis,v=e.yaxis,w=u._length,g=v._length,y=u._offset,b=v._offset,h={},h[u._id]=u,d={},d[v._id]=v,o&&l)for(var se=e.overlays,ie=0;ie<se.length;ie++){var fe=se[ie].xaxis;h[fe._id]=fe;var ge=se[ie].yaxis;d[ge._id]=ge}p=R0(h),m=R0(d),k=C0(p,l),T=C0(m,o),S=!T&&!k,_=E0(t,t._fullLayout._axisMatchGroups,h,d),x=E0(t,t._fullLayout._axisConstraintGroups,h,d,_);var Me=x.isSubplotConstrained||_.isSubplotConstrained;D=l||Me,L=o||Me;var Se=t._fullLayout;R=Se._has("scattergl"),z=Se._has("splom"),N=Se._has("svg")}A();var M=hz(T+k,t._fullLayout.dragmode,f),C=uz(e,o+l+"drag",M,r,a,i,n);if(S&&!f)return C.onmousedown=null,C.style.pointerEvents="none",C;var E={element:C,gd:t,plotinfo:e};E.prepFn=function(se,ie,fe){var ge=E.dragmode,Me=t._fullLayout.dragmode;Me!==ge&&(E.dragmode=Me),A(),$=t._fullLayout._invScaleX,P=t._fullLayout._invScaleY,S||(f?se.shiftKey?Me==="pan"?Me="zoom":sf(Me)||(Me="pan"):se.ctrlKey&&(Me="pan"):Me="pan"),tz(Me)?E.minDrag=1:E.minDrag=void 0,sf(Me)?(E.xaxes=p,E.yaxes=m,oz(se,ie,fe,E,Me)):(E.clickFn=j,sf(ge)&&F(),S||(Me==="zoom"?(E.moveFn=ae,E.doneFn=de,E.minDrag=1,ue(se,ie,fe)):Me==="pan"&&(E.moveFn=ce,E.doneFn=K))),t._fullLayout._redrag=function(){var Se=t._dragdata;if(Se&&Se.element===C){var Pe=t._fullLayout.dragmode;sf(Pe)||(A(),ke([0,0,w,g]),E.moveFn(Se.dx,Se.dy))}}};function F(){E.plotinfo.selection=!1,lz(t)}function j(se,ie){var fe=E.gd;if(fe._fullLayout._activeShapeIndex>=0){fe._fullLayout._deactivateShape(fe);return}var ge=fe._fullLayout.clickmode;if(P0(fe),se===2&&!c&&ze(),f)ge.indexOf("select")>-1&&sz(ie,fe,p,m,e.id,E),ge.indexOf("event")>-1&&QR.click(fe,ie,e.id);else if(se===1&&c){var Me=o?v:u,Se=o==="s"||l==="w"?0:1,Pe=Me._name+".range["+Se+"]",He=vz(Me,Se),Oe="left",ve="middle";if(Me.fixedrange)return;o?(ve=o==="n"?"top":"bottom",Me.side==="right"&&(Oe="right")):l==="e"&&(Oe="right"),fe._context.showAxisRangeEntryBoxes&&Yp.select(C).call(KR.makeEditable,{gd:fe,immediate:!0,background:fe._fullLayout.paper_bgcolor,text:String(He),fill:Me.tickfont?Me.tickfont.color:"#444",horizontalAlign:Oe,verticalAlign:ve}).on("edit",function(Be){var Ne=Me.d2r(Be);Ne!==void 0&&lf.call("_guiRelayout",fe,Pe,Ne)})}}ez.init(E);var B,G,O,W,V,Z,X,Q,te,xe;function ue(se,ie,fe){var ge=C.getBoundingClientRect();B=ie-ge.left,G=fe-ge.top,t._fullLayout._calcInverseTransform(t);var Me=ta.apply3DTransform(t._fullLayout._invTransform)(B,G);B=Me[0],G=Me[1],O={l:B,r:B,w:0,t:G,b:G,h:0},W=t._hmpixcount?t._hmlumcount/t._hmpixcount:qR(t._fullLayout.plot_bgcolor).getLuminance(),V="M0,0H"+w+"V"+g+"H0V0",Z=!1,X="xy",xe=!1,Q=pz(s,W,y,b,V),te=mz(s,y,b)}function ae(se,ie){if(t._transitioningWithDuration)return!1;var fe=Math.max(0,Math.min(w,$*se+B)),ge=Math.max(0,Math.min(g,P*ie+G)),Me=Math.abs(fe-B),Se=Math.abs(ge-G);O.l=Math.min(B,fe),O.r=Math.max(B,fe),O.t=Math.min(G,ge),O.b=Math.max(G,ge);function Pe(){X="",O.r=O.l,O.t=O.b,te.attr("d","M0,0Z")}if(x.isSubplotConstrained)Me>Mr||Se>Mr?(X="xy",Me/w>Se/g?(Se=Me*g/w,G>ge?O.t=G-Se:O.b=G+Se):(Me=Se*w/g,B>fe?O.l=B-Me:O.r=B+Me),te.attr("d",bv(O))):Pe();else if(_.isSubplotConstrained)if(Me>Mr||Se>Mr){X="xy";var He=Math.min(O.l/w,(g-O.b)/g),Oe=Math.max(O.r/w,(g-O.t)/g);O.l=He*w,O.r=Oe*w,O.b=(1-He)*g,O.t=(1-Oe)*g,te.attr("d",bv(O))}else Pe();else!T||Se<Math.min(Math.max(Me*.6,S0),Mr)?Me<S0||!k?Pe():(O.t=0,O.b=g,X="x",te.attr("d",xz(O,G))):!k||Me<Math.min(Se*.6,Mr)?(O.l=0,O.r=w,X="y",te.attr("d",_z(O,B))):(X="xy",te.attr("d",bv(O)));O.w=O.r-O.l,O.h=O.b-O.t,X&&(xe=!0),t._dragged=xe,yz(Q,te,O,V,Z,W),le(),t.emit("plotly_relayouting",H),Z=!0}function le(){H={},(X==="xy"||X==="x")&&(ch(p,O.l/w,O.r/w,H,x.xaxes),ye("x",H)),(X==="xy"||X==="y")&&(ch(m,(g-O.b)/g,(g-O.t)/g,H,x.yaxes),ye("y",H))}function de(){le(),P0(t),K(),bz(t)}var be=[0,0,w,g],Te=null,Le=Wp.REDRAWDELAY,_e=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Ie(se){if(!t._context._scrollZoom.cartesian&&!t._fullLayout._enablescrollzoom)return;if(F(),t._transitioningWithDuration){se.preventDefault(),se.stopPropagation();return}A(),clearTimeout(Te);var ie=-se.deltaY;if(isFinite(ie)||(ie=se.wheelDelta/10),!isFinite(ie)){ta.log("Did not find wheel motion attributes: ",se);return}var fe=Math.exp(-Math.min(Math.max(ie,-20),20)/200),ge=_e.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Me=(se.clientX-ge.left)/ge.width,Se=(ge.bottom-se.clientY)/ge.height,Pe;function He(Oe,ve,Be){if(Oe.fixedrange)return;var Ne=ta.simpleMap(Oe.range,Oe.r2l),We=Ne[0]+(Ne[1]-Ne[0])*ve;function Ge(Ve){return Oe.l2r(We+(Ve-We)*Be)}Oe.range=Ne.map(Ge)}if(D){for(l||(Me=.5),Pe=0;Pe<p.length;Pe++)He(p[Pe],Me,fe);ye("x"),be[2]*=fe,be[0]+=be[2]*Me*(1/fe-1)}if(L){for(o||(Se=.5),Pe=0;Pe<m.length;Pe++)He(m[Pe],Se,fe);ye("y"),be[3]*=fe,be[1]+=be[3]*(1-Se)*(1/fe-1)}ke(be),Ee(),t.emit("plotly_relayouting",H),Te=setTimeout(function(){t._fullLayout&&(be=[0,0,w,g],K())},Le),se.preventDefault()}o.length*l.length!==1&&wz(C,Ie);function ce(se,ie){if(se=se*$,ie=ie*P,t._transitioningWithDuration)return;if(t._fullLayout._replotting=!0,k==="ew"||T==="ns"){var fe=k?-se:0,ge=T?-ie:0;if(_.isSubplotConstrained){if(k&&T){var Me=(se/w-ie/g)/2;se=Me*w,ie=-Me*g,fe=-se,ge=-ie}T?fe=-ge*w/g:ge=-fe*g/w}k&&(D0(p,se),ye("x")),T&&(D0(m,ie),ye("y")),ke([fe,ge,w,g]),Ee(),t.emit("plotly_relayouting",H);return}function Se(Ge,Ve,Ue){for(var I=1-Ve,Y,U,q=0;q<Ge.length;q++){var oe=Ge[q];if(!oe.fixedrange){Y=oe,U=oe._rl[I]+(oe._rl[Ve]-oe._rl[I])/dz(Ue/oe._length);var ee=oe.l2r(U);ee!==!1&&ee!==void 0&&(oe.range[Ve]=ee)}}return Y._length*(Y._rl[Ve]-U)/(Y._rl[Ve]-Y._rl[I])}var Pe=k==="w"==(T==="n")?1:-1;if(k&&T&&(x.isSubplotConstrained||_.isSubplotConstrained)){var He=(se/w+Pe*ie/g)/2;se=He*w,ie=Pe*He*g}var Oe,ve;if(k==="w"?se=Se(p,0,se):k==="e"?se=Se(p,1,-se):k||(se=0),T==="n"?ie=Se(m,1,ie):T==="s"?ie=Se(m,0,-ie):T||(ie=0),Oe=k==="w"?se:0,ve=T==="n"?ie:0,x.isSubplotConstrained&&!_.isSubplotConstrained||_.isSubplotConstrained&&k&&T&&Pe>0){var Be;if(_.isSubplotConstrained||!k&&T.length===1){for(Be=0;Be<p.length;Be++)p[Be].range=p[Be]._r.slice(),gv(p[Be],1-ie/g);se=ie*w/g,Oe=se/2}if(_.isSubplotConstrained||!T&&k.length===1){for(Be=0;Be<m.length;Be++)m[Be].range=m[Be]._r.slice(),gv(m[Be],1-se/w);ie=se*g/w,ve=ie/2}}(!_.isSubplotConstrained||!T)&&ye("x"),(!_.isSubplotConstrained||!k)&&ye("y");var Ne=w-se,We=g-ie;_.isSubplotConstrained&&!(k&&T)&&(k?(ve=Oe?0:se*g/w,We=Ne*g/w):(Oe=ve?0:ie*w/g,Ne=We*w/g)),ke([Oe,ve,Ne,We]),Ee(),t.emit("plotly_relayouting",H)}function ye(se,ie){for(var fe=_.isSubplotConstrained?{x:m,y:p}[se]:_[se+"axes"],ge=_.isSubplotConstrained?{x:p,y:m}[se]:[],Me=0;Me<fe.length;Me++){var Se=fe[Me],Pe=Se._id,He=_.xLinks[Pe]||_.yLinks[Pe],Oe=ge[0]||h[He]||d[He];Oe&&(ie?(ie[Se._name+".range[0]"]=ie[Oe._name+".range[0]"],ie[Se._name+".range[1]"]=ie[Oe._name+".range[1]"]):Se.range=Oe.range.slice())}}function Ee(){var se=[],ie;function fe(Pe){for(ie=0;ie<Pe.length;ie++)Pe[ie].fixedrange||se.push(Pe[ie]._id)}function ge(Pe,He){for(ie=0;ie<Pe.length;ie++){var Oe=Pe[ie],ve=Oe[He];!Oe.fixedrange&&ve.tickmode==="sync"&&se.push(ve._id)}}for(D&&(fe(p),fe(x.xaxes),fe(_.xaxes),ge(e.overlays,"xaxis")),L&&(fe(m),fe(x.yaxes),fe(_.yaxes),ge(e.overlays,"yaxis")),H={},ie=0;ie<se.length;ie++){var Me=se[ie],Se=fh(t,Me);M0.drawOne(t,Se,{skipTitle:!0}),H[Se._name+".range[0]"]=Se.range[0],H[Se._name+".range[1]"]=Se.range[1]}M0.redrawComponents(t,se)}function ze(){if(!t._transitioningWithDuration){var se=t._context.doubleClick,ie=[];k&&(ie=ie.concat(p)),T&&(ie=ie.concat(m)),_.xaxes&&(ie=ie.concat(_.xaxes)),_.yaxes&&(ie=ie.concat(_.yaxes));var fe={},ge,Me;if(se==="reset+autosize")for(se="autosize",Me=0;Me<ie.length;Me++){ge=ie[Me];var Se=ge._rangeInitial0,Pe=ge._rangeInitial1,He=Se!==void 0||Pe!==void 0;if(He&&(Se!==void 0&&Se!==ge.range[0]||Pe!==void 0&&Pe!==ge.range[1])||!He&&ge.autorange!==!0){se="reset";break}}if(se==="autosize")for(Me=0;Me<ie.length;Me++)ge=ie[Me],ge.fixedrange||(fe[ge._name+".autorange"]=!0);else if(se==="reset"){for((k||x.isSubplotConstrained)&&(ie=ie.concat(x.xaxes)),T&&!x.isSubplotConstrained&&(ie=ie.concat(x.yaxes)),x.isSubplotConstrained&&(k?T||(ie=ie.concat(m)):ie=ie.concat(p)),Me=0;Me<ie.length;Me++)if(ge=ie[Me],!ge.fixedrange){var Oe=ge._name,ve=ge._autorangeInitial;ge._rangeInitial0===void 0&&ge._rangeInitial1===void 0?fe[Oe+".autorange"]=!0:ge._rangeInitial0===void 0?(fe[Oe+".autorange"]=ve,fe[Oe+".range"]=[null,ge._rangeInitial1]):ge._rangeInitial1===void 0?(fe[Oe+".range"]=[ge._rangeInitial0,null],fe[Oe+".autorange"]=ve):fe[Oe+".range"]=[ge._rangeInitial0,ge._rangeInitial1]}}t.emit("plotly_doubleclick",null),lf.call("_guiRelayout",t,fe)}}function K(){ke([0,0,w,g]),ta.syncOrAsync([nz.previousPromises,function(){t._fullLayout._replotting=!1,lf.call("_guiRelayout",t,H)}],t)}function ke(se){var ie=t._fullLayout,fe=ie._plots,ge=ie._subplots.cartesian,Me,Se,Pe,He;if(z&&lf.subplotsRegistry.splom.drag(t),R){for(Me=0;Me<ge.length;Me++)if(Se=fe[ge[Me]],Pe=Se.xaxis,He=Se.yaxis,Se._scene){var Oe=ta.simpleMap(Pe.range,Pe.r2l),ve=ta.simpleMap(He.range,He.r2l);Pe.limitRange&&Pe.limitRange(),He.limitRange&&He.limitRange(),Oe=Pe.range,ve=He.range,Se._scene.update({range:[Oe[0],ve[0],Oe[1],ve[1]]})}}if((z||R)&&(az(t),iz(t)),N){var Be=se[2]/u._length,Ne=se[3]/v._length;for(Me=0;Me<ge.length;Me++){Se=fe[ge[Me]],Pe=Se.xaxis,He=Se.yaxis;var We=(D||_.isSubplotConstrained)&&!Pe.fixedrange&&h[Pe._id],Ge=(L||_.isSubplotConstrained)&&!He.fixedrange&&d[He._id],Ve,Ue,I,Y;if(We?(Ve=Be,I=l||_.isSubplotConstrained?se[0]:we(Pe,Ve)):_.xaHash[Pe._id]?(Ve=Be,I=se[0]*Pe._length/u._length):_.yaHash[Pe._id]?(Ve=Ne,I=T==="ns"?-se[1]*Pe._length/v._length:we(Pe,Ve,{n:"top",s:"bottom"}[T])):(Ve=re(Pe,Be,Ne),I=pe(Pe,Ve)),Ve>1&&(Pe.maxallowed!==void 0&&D===(Pe.range[0]<Pe.range[1]?"e":"w")||Pe.minallowed!==void 0&&D===(Pe.range[0]<Pe.range[1]?"w":"e"))&&(Ve=1,I=0),Ge?(Ue=Ne,Y=o||_.isSubplotConstrained?se[1]:we(He,Ue)):_.yaHash[He._id]?(Ue=Ne,Y=se[1]*He._length/v._length):_.xaHash[He._id]?(Ue=Be,Y=k==="ew"?-se[0]*He._length/u._length:we(He,Ue,{e:"right",w:"left"}[k])):(Ue=re(He,Be,Ne),Y=pe(He,Ue)),Ue>1&&(He.maxallowed!==void 0&&L===(He.range[0]<He.range[1]?"n":"s")||He.minallowed!==void 0&&L===(He.range[0]<He.range[1]?"s":"n"))&&(Ue=1,Y=0),!(!Ve&&!Ue)){Ve||(Ve=1),Ue||(Ue=1);var U=Pe._offset-I/Ve,q=He._offset-Y/Ue;Se.clipRect.call(di.setTranslate,I,Y).call(di.setScale,Ve,Ue),Se.plot.call(di.setTranslate,U,q).call(di.setScale,1/Ve,1/Ue),(Ve!==Se.xScaleFactor||Ue!==Se.yScaleFactor)&&(di.setPointGroupScale(Se.zoomScalePts,Ve,Ue),di.setTextPointsScale(Se.zoomScaleTxt,Ve,Ue)),di.hideOutsideRangePoints(Se.clipOnAxisFalseTraces,Se),Se.xScaleFactor=Ve,Se.yScaleFactor=Ue}}}}function re(se,ie,fe){return se.fixedrange?0:D&&x.xaHash[se._id]?ie:L&&(x.isSubplotConstrained?x.xaHash:x.yaHash)[se._id]?fe:0}function pe(se,ie){return ie?(se.range=se._r.slice(),gv(se,ie),we(se,ie)):0}function we(se,ie,fe){return se._length*(1-ie)*rz[fe||se.constraintoward||"middle"]}return C}function cz(t,e,r,a){var i=ta.ensureSingle(t.draglayer,e,r,function(n){n.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)});return i.call(JR,a),i.node()}function uz(t,e,r,a,i,n,o){var l=cz(t,"rect",e,r);return Yp.select(l).call(di.setRect,a,i,n,o),l}function C0(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function vz(t,e){var r=t.range[e],a=Math.abs(r-t.range[1-e]),i;return t.type==="date"?r:t.type==="log"?(i=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,k0("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,k0("."+String(i)+"g")(r))}function ch(t,e,r,a,i){for(var n=0;n<t.length;n++){var o=t[n];if(!o.fixedrange)if(o.rangebreaks){var l=o._id.charAt(0)==="y",s=l?1-e:e,f=l?1-r:r;a[o._name+".range[0]"]=o.l2r(o.p2l(s*o._length)),a[o._name+".range[1]"]=o.l2r(o.p2l(f*o._length))}else{var c=o._rl[0],u=o._rl[1]-c;a[o._name+".range[0]"]=o.l2r(c+u*e),a[o._name+".range[1]"]=o.l2r(c+u*r)}}if(i&&i.length){var v=(e+(1-r))/2;ch(i,v,1-v,a,[])}}function D0(t,e){for(var r=0;r<t.length;r++){var a=t[r];if(!a.fixedrange){if(a.rangebreaks){var i=0,n=a._length,o=a.p2l(i+e)-a.p2l(i),l=a.p2l(n+e)-a.p2l(n),s=(o+l)/2;a.range=[a.l2r(a._rl[0]-s),a.l2r(a._rl[1]-s)]}else a.range=[a.l2r(a._rl[0]-e/a._m),a.l2r(a._rl[1]-e/a._m)];a.limitRange&&a.limitRange()}}}function dz(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function hz(t,e,r){return t?t==="nsew"?r?"":e==="pan"?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function pz(t,e,r,a,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",C2(r,a)).attr("d",i+"Z")}function mz(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:A0.background,stroke:A0.defaultLine,"stroke-width":1,opacity:0}).attr("transform",C2(e,r)).attr("d","M0,0Z")}function yz(t,e,r,a,i,n){t.attr("d",a+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),gz(t,e,i,n)}function gz(t,e,r,a){r||(t.transition().style("fill",a>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function P0(t){Yp.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function bz(t){L0&&t.data&&t._context.showTips&&(ta.notifier(ta._(t,"Double-click to zoom back out"),"long"),L0=!1)}function xz(t,e){return"M"+(t.l-.5)+","+(e-Mr-.5)+"h-3v"+(2*Mr+1)+"h3ZM"+(t.r+.5)+","+(e-Mr-.5)+"h3v"+(2*Mr+1)+"h-3Z"}function _z(t,e){return"M"+(e-Mr-.5)+","+(t.t-.5)+"v-3h"+(2*Mr+1)+"v3ZM"+(e-Mr-.5)+","+(t.b+.5)+"v3h"+(2*Mr+1)+"v-3Z"}function bv(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,Mr)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function E0(t,e,r,a,i){for(var n=!1,o={},l={},s,f,c,u,v=(i||{}).xaHash,h=(i||{}).yaHash,d=0;d<e.length;d++){var p=e[d];for(s in r)if(p[s]){for(c in p)!(i&&(v[c]||h[c]))&&!(c.charAt(0)==="x"?r:a)[c]&&(o[c]=s);for(f in a)!(i&&(v[f]||h[f]))&&p[f]&&(n=!0)}for(f in a)if(p[f])for(u in p)!(i&&(v[u]||h[u]))&&!(u.charAt(0)==="x"?r:a)[u]&&(l[u]=f)}n&&(ta.extendFlat(o,l),l={});var m={},y=[];for(c in o){var b=fh(t,c);y.push(b),m[b._id]=b}var w={},g=[];for(u in l){var x=fh(t,u);g.push(x),w[x._id]=x}return{xaHash:m,yaHash:w,xaxes:y,yaxes:g,xLinks:o,yLinks:l,isSubplotConstrained:n}}function wz(t,e){if(!ZR)t.onwheel!==void 0?t.onwheel=e:t.onmousewheel!==void 0?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener("wheel",e,{passive:!1}));else{var r=t.onwheel!==void 0?"wheel":"mousewheel";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}}function R0(t){var e=[];for(var r in t)e.push(t[r]);return e}var Tz={makeDragBox:fz};(function(t){var e=ft,r=_a,a=Oa,i=zi,n=Tz.makeDragBox,o=Lr.DRAGGERSIZE;t.initInteractions=function(s){var f=s._fullLayout;if(s._context.staticPlot){e.select(s).selectAll(".drag").remove();return}if(!(!f._has("cartesian")&&!f._has("splom"))){var c=Object.keys(f._plots||{}).sort(function(v,h){if((f._plots[v].mainplot&&!0)===(f._plots[h].mainplot&&!0)){var d=v.split("y"),p=h.split("y");return d[0]===p[0]?Number(d[1]||1)-Number(p[1]||1):Number(d[0]||1)-Number(p[0]||1)}return f._plots[v].mainplot?1:-1});c.forEach(function(v){var h=f._plots[v],d=h.xaxis,p=h.yaxis;if(!h.mainplot){var m=n(s,h,d._offset,p._offset,d._length,p._length,"ns","ew");m.onmousemove=function(w){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===v&&s._fullLayout._plots[v]&&r.hover(s,w,v)},r.hover(s,w,v),s._fullLayout._lasthover=m,s._fullLayout._hoversubplot=v},m.onmouseout=function(w){s._dragging||(s._fullLayout._hoversubplot=null,a.unhover(s,w))},s._context.showAxisDragHandles&&(n(s,h,d._offset-o,p._offset-o,o,o,"n","w"),n(s,h,d._offset+d._length,p._offset-o,o,o,"n","e"),n(s,h,d._offset-o,p._offset+p._length,o,o,"s","w"),n(s,h,d._offset+d._length,p._offset+p._length,o,o,"s","e"))}if(s._context.showAxisDragHandles){if(v===d._mainSubplot){var y=d._mainLinePosition;d.side==="top"&&(y-=o),n(s,h,d._offset+d._length*.1,y,d._length*.8,o,"","ew"),n(s,h,d._offset,y,d._length*.1,o,"","w"),n(s,h,d._offset+d._length*.9,y,d._length*.1,o,"","e")}if(v===p._mainSubplot){var b=p._mainLinePosition;p.side!=="right"&&(b-=o),n(s,h,b,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,h,b,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,h,b,p._offset,o,p._length*.1,"n","")}}});var u=f._hoverlayer.node();u.onmousemove=function(v){v.target=s._fullLayout._lasthover,r.hover(s,v,f._hoversubplot)},u.onclick=function(v){v.target=s._fullLayout._lasthover,r.click(s,v)},u.onmousedown=function(v){s._fullLayout._lasthover.onmousedown(v)},t.updateFx(s)}},t.updateFx=function(l){var s=l._fullLayout,f=s.dragmode==="pan"?"move":"crosshair";i(s._draggers,f)}})(bp);var xs={},z0=Je,kz=function(e){for(var r=z0.layoutArrayContainers,a=z0.layoutArrayRegexes,i=e.split("[")[0],n,o,l=0;l<a.length;l++)if(o=e.match(a[l]),o&&o.index===0){n=o[0];break}if(n||(n=r[r.indexOf(i)]),!n)return!1;var s=e.substr(n.length);return s?(o=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:n,index:Number(o[1]),property:o[3]||""}:!1):{array:n,index:"",property:""}},Az=_n,xv=Uh,hl=Bo,Mz=Wh.sorterAsc,_v=Je;xs.containerArrayMatch=kz;var Sz=xs.isAddVal=function(e){return e==="add"||Az(e)},I0=xs.isRemoveVal=function(e){return e===null||e==="remove"};xs.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=_v.getComponentMethod(o,"supplyLayoutDefaults"),s=_v.getComponentMethod(o,"draw"),f=_v.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===xv||s===xv,u=e.layout,v=e._fullLayout;if(a[""]){Object.keys(a).length>1&&hl.warn("Full array edits are incompatible with other edits",o);var h=a[""][""];if(I0(h))r.set(null);else if(Array.isArray(h))r.set(h);else return hl.warn("Unrecognized full array edit value",o,h),!0;return c?!1:(l(u,v),s(e),!0)}var d=Object.keys(a).map(Number).sort(Mz),p=r.get(),m=p||[],y=n(v,o).get(),b=[],w=-1,g=m.length,x,_,k,T,S,D,L,R;for(x=0;x<d.length;x++){if(k=d[x],T=a[k],S=Object.keys(T),D=T[""],L=Sz(D),k<0||k>m.length-(L?0:1)){hl.warn("index out of range",o,k);continue}if(D!==void 0)S.length>1&&hl.warn("Insertion & removal are incompatible with edits to the same index.",o,k),I0(D)?b.push(k):L?(D==="add"&&(D={}),m.splice(k,0,D),y&&y.splice(k,0,{})):hl.warn("Unrecognized full object edit value",o,k,D),w===-1&&(w=k);else for(_=0;_<S.length;_++)R=o+"["+k+"].",n(m[k],S[_],R).set(T[S[_]])}for(x=b.length-1;x>=0;x--)m.splice(b[x],1),y&&y.splice(b[x],1);if(m.length?p||r.set(m):r.set(null),c)return!1;if(l(u,v),f!==xv){var z;if(w===-1)z=d;else{for(g=Math.max(m.length,g),z=[],x=0;x<d.length&&(k=d[x],!(k>=w));x++)z.push(k);for(x=w;x<g;x++)z.push(x)}for(x=0;x<z.length;x++)f(e,z[x])}else s(e);return!0};var P2={};(function(t){var e=dt,r=DM,a=Je,i=me,n=Qt,o=Wt,l=ot,s=o.cleanId,f=o.getFromTrace,c=a.traceIs;t.clearPromiseQueue=function(g){Array.isArray(g._promises)&&g._promises.length>0&&i.log("Clearing previous rejected promises from queue."),g._promises=[]},t.cleanLayout=function(g){var x,_;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var k=(n.subplotsRegistry.cartesian||{}).attrRegex,T=(n.subplotsRegistry.polar||{}).attrRegex,S=(n.subplotsRegistry.ternary||{}).attrRegex,D=(n.subplotsRegistry.gl3d||{}).attrRegex,L=Object.keys(g);for(x=0;x<L.length;x++){var R=L[x];if(k&&k.test(R)){var z=g[R];z.anchor&&z.anchor!=="free"&&(z.anchor=s(z.anchor)),z.overlaying&&(z.overlaying=s(z.overlaying)),z.type||(z.isdate?z.type="date":z.islog?z.type="log":z.isdate===!1&&z.islog===!1&&(z.type="linear")),(z.autorange==="withzero"||z.autorange==="tozero")&&(z.autorange=!0,z.rangemode="tozero"),z.insiderange&&delete z.range,delete z.islog,delete z.isdate,delete z.categories,m(z,"domain")&&delete z.domain,z.autotick!==void 0&&(z.tickmode===void 0&&(z.tickmode=z.autotick?"auto":"linear"),delete z.autotick),v(z)}else if(T&&T.test(R)){var N=g[R];v(N.radialaxis)}else if(S&&S.test(R)){var H=g[R];v(H.aaxis),v(H.baxis),v(H.caxis)}else if(D&&D.test(R)){var $=g[R],P=$.cameraposition;if(Array.isArray(P)&&P[0].length===4){var A=P[0],M=P[1],C=P[2],E=r([],A),F=[];for(_=0;_<3;++_)F[_]=M[_]+C*E[2+4*_];$.camera={eye:{x:F[0],y:F[1],z:F[2]},center:{x:M[0],y:M[1],z:M[2]},up:{x:0,y:0,z:1}},delete $.cameraposition}v($.xaxis),v($.yaxis),v($.zaxis)}}var j=Array.isArray(g.annotations)?g.annotations.length:0;for(x=0;x<j;x++){var B=g.annotations[x];i.isPlainObject(B)&&(B.ref&&(B.ref==="paper"?(B.xref="paper",B.yref="paper"):B.ref==="data"&&(B.xref="x",B.yref="y"),delete B.ref),u(B,"xref"),u(B,"yref"))}var G=Array.isArray(g.shapes)?g.shapes.length:0;for(x=0;x<G;x++){var O=g.shapes[x];i.isPlainObject(O)&&(u(O,"xref"),u(O,"yref"))}var W=Array.isArray(g.images)?g.images.length:0;for(x=0;x<W;x++){var V=g.images[x];i.isPlainObject(V)&&(u(V,"xref"),u(V,"yref"))}var Z=g.legend;return Z&&(Z.x>3?(Z.x=1.02,Z.xanchor="left"):Z.x<-2&&(Z.x=-.02,Z.xanchor="right"),Z.y>3?(Z.y=1.02,Z.yanchor="bottom"):Z.y<-2&&(Z.y=-.02,Z.yanchor="top")),v(g),g.dragmode==="rotate"&&(g.dragmode="orbit"),l.clean(g),g.template&&g.template.layout&&t.cleanLayout(g.template.layout),g};function u(g,x){var _=g[x],k=x.charAt(0);_&&_!=="paper"&&(g[x]=s(_,k,!0))}function v(g){g&&((typeof g.title=="string"||typeof g.title=="number")&&(g.title={text:g.title}),x("titlefont","font"),x("titleposition","position"),x("titleside","side"),x("titleoffset","offset"));function x(_,k){var T=g[_],S=g.title&&g.title[k];T&&!S&&(g.title||(g.title={}),g.title[k]=g[_],delete g[_])}}t.cleanData=function(g){for(var x=0;x<g.length;x++){var _=g[x],k;if(_.type==="histogramy"&&"xbins"in _&&!("ybins"in _)&&(_.ybins=_.xbins,delete _.xbins),_.error_y&&"opacity"in _.error_y){var T=l.defaults,S=_.error_y.color||(c(_,"bar")?l.defaultLine:T[x%T.length]);_.error_y.color=l.addOpacity(l.rgb(S),l.opacity(S)*_.error_y.opacity),delete _.error_y.opacity}if("bardir"in _&&(_.bardir==="h"&&(c(_,"bar")||_.type.substr(0,9)==="histogram")&&(_.orientation="h",t.swapXYData(_)),delete _.bardir),_.type==="histogramy"&&t.swapXYData(_),(_.type==="histogramx"||_.type==="histogramy")&&(_.type="histogram"),"scl"in _&&!("colorscale"in _)&&(_.colorscale=_.scl,delete _.scl),"reversescl"in _&&!("reversescale"in _)&&(_.reversescale=_.reversescl,delete _.reversescl),_.xaxis&&(_.xaxis=s(_.xaxis,"x")),_.yaxis&&(_.yaxis=s(_.yaxis,"y")),c(_,"gl3d")&&_.scene&&(_.scene=n.subplotsRegistry.gl3d.cleanId(_.scene)),!c(_,"pie-like")&&!c(_,"bar-like"))if(Array.isArray(_.textposition))for(k=0;k<_.textposition.length;k++)_.textposition[k]=p(_.textposition[k]);else _.textposition&&(_.textposition=p(_.textposition));var D=a.getModule(_);if(D&&D.colorbar){var L=D.colorbar.container,R=L?_[L]:_;R&&R.colorscale&&(R.colorscale==="YIGnBu"&&(R.colorscale="YlGnBu"),R.colorscale==="YIOrRd"&&(R.colorscale="YlOrRd"))}if(_.type==="surface"&&i.isPlainObject(_.contours)){var z=["x","y","z"];for(k=0;k<z.length;k++){var N=_.contours[z[k]];i.isPlainObject(N)&&(N.highlightColor&&(N.highlightcolor=N.highlightColor,delete N.highlightColor),N.highlightWidth&&(N.highlightwidth=N.highlightWidth,delete N.highlightWidth))}}if(_.type==="candlestick"||_.type==="ohlc"){var H=(_.increasing||{}).showlegend!==!1,$=(_.decreasing||{}).showlegend!==!1,P=h(_.increasing),A=h(_.decreasing);if(P!==!1&&A!==!1){var M=d(P,A,H,$);M&&(_.name=M)}else(P||A)&&!_.name&&(_.name=P||A)}if(Array.isArray(_.transforms)){var C=_.transforms;for(k=0;k<C.length;k++){var E=C[k];if(i.isPlainObject(E))switch(E.type){case"filter":E.filtersrc&&(E.target=E.filtersrc,delete E.filtersrc),E.calendar&&(E.valuecalendar||(E.valuecalendar=E.calendar),delete E.calendar);break;case"groupby":if(E.styles=E.styles||E.style,E.styles&&!Array.isArray(E.styles)){var F=E.styles,j=Object.keys(F);E.styles=[];for(var B=0;B<j.length;B++)E.styles.push({target:j[B],value:F[j[B]]})}break}}}m(_,"line")&&delete _.line,"marker"in _&&(m(_.marker,"line")&&delete _.marker.line,m(_,"marker")&&delete _.marker),l.clean(_),_.autobinx&&(delete _.autobinx,delete _.xbins),_.autobiny&&(delete _.autobiny,delete _.ybins),v(_),_.colorbar&&v(_.colorbar),_.marker&&_.marker.colorbar&&v(_.marker.colorbar),_.line&&_.line.colorbar&&v(_.line.colorbar),_.aaxis&&v(_.aaxis),_.baxis&&v(_.baxis)}};function h(g){if(!i.isPlainObject(g))return!1;var x=g.name;return delete g.name,delete g.showlegend,(typeof x=="string"||typeof x=="number")&&String(x)}function d(g,x,_,k){if(_&&!k)return g;if(k&&!_||!g.trim())return x;if(!x.trim())return g;var T=Math.min(g.length,x.length),S;for(S=0;S<T&&g.charAt(S)===x.charAt(S);S++);var D=g.substr(0,S);return D.trim()}function p(g){var x="middle",_="center";return typeof g=="string"&&(g.indexOf("top")!==-1?x="top":g.indexOf("bottom")!==-1&&(x="bottom"),g.indexOf("left")!==-1?_="left":g.indexOf("right")!==-1&&(_="right")),x+" "+_}function m(g,x){return x in g&&typeof g[x]=="object"&&Object.keys(g[x]).length===0}t.swapXYData=function(g){var x;if(i.swapAttrs(g,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(g.z)&&Array.isArray(g.z[0])&&(g.transpose?delete g.transpose:g.transpose=!0),g.error_x&&g.error_y){var _=g.error_y,k="copy_ystyle"in _?_.copy_ystyle:!(_.color||_.thickness||_.width);i.swapAttrs(g,["error_?.copy_ystyle"]),k&&i.swapAttrs(g,["error_?.color","error_?.thickness","error_?.width"])}if(typeof g.hoverinfo=="string"){var T=g.hoverinfo.split("+");for(x=0;x<T.length;x++)T[x]==="x"?T[x]="y":T[x]==="y"&&(T[x]="x");g.hoverinfo=T.join("+")}},t.coerceTraceIndices=function(g,x){if(e(x))return[x];if(!Array.isArray(x)||!x.length)return g.data.map(function(T,S){return S});if(Array.isArray(x)){for(var _=[],k=0;k<x.length;k++)i.isIndex(x[k],g.data.length)?_.push(x[k]):i.warn("trace index (",x[k],") is not a number or is out of bounds");return _}return x},t.manageArrayContainers=function(g,x,_){var k=g.obj,T=g.parts,S=T.length,D=T[S-1],L=e(D);if(L&&x===null){var R=T.slice(0,S-1).join("."),z=i.nestedProperty(k,R).get();z.splice(D,1)}else L&&g.get()===void 0&&g.get()===void 0&&(_[g.astr]=null),g.set(x)};var y=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(g){var x=g.search(y);if(x>0)return g.substr(0,x)}t.hasParent=function(g,x){for(var _=b(x);_;){if(_ in g)return!0;_=b(_)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(g,x,_){for(var k=0;k<x.length;k++)for(var T=g._fullData[k],S=0;S<3;S++){var D=f(g,T,w[S]);if(D&&D.type!=="log"){var L=D._name,R=D._id.substr(1);if(R.substr(0,5)==="scene"){if(_[R]!==void 0)continue;L=R+"."+L}var z=L+".type";_[L]===void 0&&_[z]===void 0&&i.nestedProperty(g.layout,z).set(null)}}}})(P2);(function(t){var e=ft,r=dt,a=o_,i=me,n=i.nestedProperty,o=ds,l=VL,s=Je,f=Vo,c=Qt,u=Dt,v=cT,h=Na,d=xt,p=ot,m=bp.initInteractions,y=Mn,b=bs.clearOutline,w=jo.dfltConfig,g=xs,x=P2,_=tu,k=Ia,T=Lr.AX_NAME_PATTERN,S=0,D=5;function L(I,Y,U,q){var oe;if(I=i.getGraphDiv(I),o.init(I),i.isPlainObject(Y)){var ee=Y;Y=ee.data,U=ee.layout,q=ee.config,oe=ee.frames}var Ce=o.triggerHandler(I,"plotly_beforeplot",[Y,U,q]);if(Ce===!1)return Promise.reject();!Y&&!U&&!i.isPlotDiv(I)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",I);function Ae(){if(oe)return t.addFrames(I,oe)}$(I,q),U||(U={}),e.select(I).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(I._promises)||(I._promises=[]);var he=(I.data||[]).length===0&&Array.isArray(Y);Array.isArray(Y)&&(x.cleanData(Y),he?I.data=Y:I.data.push.apply(I.data,Y),I.empty=!1),(!I.layout||he)&&(I.layout=x.cleanLayout(U)),c.supplyDefaults(I);var ne=I._fullLayout,Re=ne._has("cartesian");ne._replotting=!0,(he||ne._shouldCreateBgLayer)&&(Ue(I),ne._shouldCreateBgLayer&&delete ne._shouldCreateBgLayer),d.initGradients(I),d.initPatterns(I),he&&u.saveShowSpikeInitial(I);var je=!I.calcdata||I.calcdata.length!==(I._fullData||[]).length;je&&c.doCalcdata(I);for(var Ye=0;Ye<I.calcdata.length;Ye++)I.calcdata[Ye][0].trace=I._fullData[Ye];I._context.responsive?I._responsiveChartHandler||(I._responsiveChartHandler=function(){i.isHidden(I)||c.resize(I)},window.addEventListener("resize",I._responsiveChartHandler)):i.clearResponsive(I);var rt=i.extendFlat({},ne._size),nt=0;function vt(){for(var at=ne._basePlotModules,qe=0;qe<at.length;qe++)at[qe].drawFramework&&at[qe].drawFramework(I);!ne._glcanvas&&ne._has("gl")&&(ne._glcanvas=ne._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Ke){return Ke.key}),ne._glcanvas.enter().append("canvas").attr("class",function(Ke){return"gl-canvas gl-canvas-"+Ke.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Ze=I._context.plotGlPixelRatio;if(ne._glcanvas){ne._glcanvas.attr("width",ne.width*Ze).attr("height",ne.height*Ze).style("width",ne.width+"px").style("height",ne.height+"px");var ct=ne._glcanvas.data()[0].regl;if(ct&&(Math.floor(ne.width*Ze)!==ct._gl.drawingBufferWidth||Math.floor(ne.height*Ze)!==ct._gl.drawingBufferHeight)){var Tt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(nt)i.error(Tt);else return i.log(Tt+" Clearing graph and plotting again."),c.cleanPlot([],{},I._fullData,ne),c.supplyDefaults(I),ne=I._fullLayout,c.doCalcdata(I),nt++,vt()}}return ne.modebar.orientation==="h"?ne._modebardiv.style("height",null).style("width","100%"):ne._modebardiv.style("width",null).style("height",ne.height+"px"),c.previousPromises(I)}function et(){if(c.clearAutoMarginIds(I),_.drawMarginPushers(I),u.allowAutoMargin(I),I._fullLayout.title.text&&I._fullLayout.title.automargin&&c.allowAutoMargin(I,"title.automargin"),ne._has("pie"))for(var at=I._fullData,qe=0;qe<at.length;qe++){var Ze=at[qe];Ze.type==="pie"&&Ze.automargin&&c.allowAutoMargin(I,"pie."+Ze.uid+".automargin")}return c.doAutoMargin(I),c.previousPromises(I)}function Ct(){if(c.didMarginChange(rt,ne._size))return i.syncOrAsync([et,_.layoutStyles],I)}function lt(){if(!je){Qe();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),Qe],I)}function Qe(){I._transitioning||(_.doAutoRangeAndConstraints(I),he&&u.saveRangeInitial(I),s.getComponentMethod("rangeslider","calcAutorange")(I))}function yt(){return u.draw(I,he?"":"redraw")}var mt=[c.previousPromises,Ae,vt,et,Ct];Re&&mt.push(lt),mt.push(_.layoutStyles),Re&&mt.push(yt,function(qe){var Ze=qe._fullLayout._insideTickLabelsUpdaterange;if(Ze)return qe._fullLayout._insideTickLabelsUpdaterange=void 0,Te(qe,Ze).then(function(){u.saveRangeInitial(qe,!0)})}),mt.push(_.drawData,_.finalDraw,m,c.addLinks,c.rehover,c.redrag,c.reselect,c.doAutoMargin,c.previousPromises);var st=i.syncOrAsync(mt,I);return(!st||!st.then)&&(st=Promise.resolve()),st.then(function(){return R(I),I})}function R(I){var Y=I._fullLayout;Y._redrawFromAutoMarginCount?Y._redrawFromAutoMarginCount--:I.emit("plotly_afterplot")}function z(I){return i.extendFlat(w,I)}function N(I,Y){try{I._fullLayout._paper.style("background",Y)}catch(U){i.error(U)}}function H(I,Y){var U=p.combine(Y,"white");N(I,U)}function $(I,Y){if(!I._context){I._context=i.extendDeep({},w);var U=e.select("base");I._context._baseUrl=U.size()&&U.attr("href")?window.location.href.split("#")[0]:""}var q=I._context,oe,ee,Ce;if(Y){for(ee=Object.keys(Y),oe=0;oe<ee.length;oe++)Ce=ee[oe],!(Ce==="editable"||Ce==="edits")&&Ce in q&&(Ce==="setBackground"&&Y[Ce]==="opaque"?q[Ce]=H:q[Ce]=Y[Ce]);Y.plot3dPixelRatio&&!q.plotGlPixelRatio&&(q.plotGlPixelRatio=q.plot3dPixelRatio);var Ae=Y.editable;if(Ae!==void 0)for(q.editable=Ae,ee=Object.keys(q.edits),oe=0;oe<ee.length;oe++)q.edits[ee[oe]]=Ae;if(Y.edits)for(ee=Object.keys(Y.edits),oe=0;oe<ee.length;oe++)Ce=ee[oe],Ce in q.edits&&(q.edits[Ce]=Y.edits[Ce]);q._exportedPlot=Y._exportedPlot}q.staticPlot&&(q.editable=!1,q.edits={},q.autosizable=!1,q.scrollZoom=!1,q.doubleClick=!1,q.showTips=!1,q.showLink=!1,q.displayModeBar=!1),q.displayModeBar==="hover"&&!a&&(q.displayModeBar=!0),(q.setBackground==="transparent"||typeof q.setBackground!="function")&&(q.setBackground=N),q._hasZeroHeight=q._hasZeroHeight||I.clientHeight===0,q._hasZeroWidth=q._hasZeroWidth||I.clientWidth===0;var he=q.scrollZoom,ne=q._scrollZoom={};if(he===!0)ne.cartesian=1,ne.gl3d=1,ne.geo=1,ne.mapbox=1;else if(typeof he=="string"){var Re=he.split("+");for(oe=0;oe<Re.length;oe++)ne[Re[oe]]=1}else he!==!1&&(ne.gl3d=1,ne.geo=1,ne.mapbox=1)}function P(I){if(I=i.getGraphDiv(I),!i.isPlotDiv(I))throw new Error("This element is not a Plotly plot: "+I);return x.cleanData(I.data),x.cleanLayout(I.layout),I.calcdata=void 0,t._doPlot(I).then(function(){return I.emit("plotly_redraw"),I})}function A(I,Y,U,q){return I=i.getGraphDiv(I),c.cleanPlot([],{},I._fullData||[],I._fullLayout||{}),c.purge(I),t._doPlot(I,Y,U,q)}function M(I,Y){var U=Y+1,q=[],oe,ee;for(oe=0;oe<I.length;oe++)ee=I[oe],ee<0?q.push(U+ee):q.push(ee);return q}function C(I,Y,U){var q,oe;for(q=0;q<Y.length;q++){if(oe=Y[q],oe!==parseInt(oe,10))throw new Error("all values in "+U+" must be integers");if(oe>=I.data.length||oe<-I.data.length)throw new Error(U+" must be valid indices for gd.data.");if(Y.indexOf(oe,q+1)>-1||oe>=0&&Y.indexOf(-I.data.length+oe)>-1||oe<0&&Y.indexOf(I.data.length+oe)>-1)throw new Error("each index in "+U+" must be unique.")}}function E(I,Y,U){if(!Array.isArray(I.data))throw new Error("gd.data must be an array.");if(typeof Y>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Y)||(Y=[Y]),C(I,Y,"currentIndices"),typeof U<"u"&&!Array.isArray(U)&&(U=[U]),typeof U<"u"&&C(I,U,"newIndices"),typeof U<"u"&&Y.length!==U.length)throw new Error("current and new indices must be of equal length.")}function F(I,Y,U){var q,oe;if(!Array.isArray(I.data))throw new Error("gd.data must be an array.");if(typeof Y>"u")throw new Error("traces must be defined.");for(Array.isArray(Y)||(Y=[Y]),q=0;q<Y.length;q++)if(oe=Y[q],typeof oe!="object"||Array.isArray(oe)||oe===null)throw new Error("all values in traces array must be non-array objects");if(typeof U<"u"&&!Array.isArray(U)&&(U=[U]),typeof U<"u"&&U.length!==Y.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function j(I,Y,U,q){var oe=i.isPlainObject(q);if(!Array.isArray(I.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(Y))throw new Error("update must be a key:value object");if(typeof U>"u")throw new Error("indices must be an integer or array of integers");C(I,U,"indices");for(var ee in Y){if(!Array.isArray(Y[ee])||Y[ee].length!==U.length)throw new Error("attribute "+ee+" must be an array of length equal to indices array length");if(oe&&(!(ee in q)||!Array.isArray(q[ee])||q[ee].length!==Y[ee].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")}}function B(I,Y,U,q){var oe=i.isPlainObject(q),ee=[],Ce,Ae,he,ne,Re;Array.isArray(U)||(U=[U]),U=M(U,I.data.length-1);for(var je in Y)for(var Ye=0;Ye<U.length;Ye++){if(Ce=I.data[U[Ye]],he=n(Ce,je),Ae=he.get(),ne=Y[je][Ye],!i.isArrayOrTypedArray(ne))throw new Error("attribute: "+je+" index: "+Ye+" must be an array");if(!i.isArrayOrTypedArray(Ae))throw new Error("cannot extend missing or non-array attribute: "+je);if(Ae.constructor!==ne.constructor)throw new Error("cannot extend array with an array of a different type: "+je);Re=oe?q[je][Ye]:q,r(Re)||(Re=-1),ee.push({prop:he,target:Ae,insert:ne,maxp:Math.floor(Re)})}return ee}function G(I,Y,U,q,oe){j(I,Y,U,q);for(var ee=B(I,Y,U,q),Ce={},Ae={},he=0;he<ee.length;he++){var ne=ee[he].prop,Re=ee[he].maxp,je=oe(ee[he].target,ee[he].insert,Re);ne.set(je[0]),Array.isArray(Ce[ne.astr])||(Ce[ne.astr]=[]),Ce[ne.astr].push(je[1]),Array.isArray(Ae[ne.astr])||(Ae[ne.astr]=[]),Ae[ne.astr].push(ee[he].target.length)}return{update:Ce,maxPoints:Ae}}function O(I,Y){var U=new I.constructor(I.length+Y.length);return U.set(I),U.set(Y,I.length),U}function W(I,Y,U,q){I=i.getGraphDiv(I);function oe(he,ne,Re){var je,Ye;if(i.isTypedArray(he))if(Re<0){var rt=new he.constructor(0),nt=O(he,ne);Re<0?(je=nt,Ye=rt):(je=rt,Ye=nt)}else if(je=new he.constructor(Re),Ye=new he.constructor(he.length+ne.length-Re),Re===ne.length)je.set(ne),Ye.set(he);else if(Re<ne.length){var vt=ne.length-Re;je.set(ne.subarray(vt)),Ye.set(he),Ye.set(ne.subarray(0,vt),he.length)}else{var et=Re-ne.length,Ct=he.length-et;je.set(he.subarray(Ct)),je.set(ne,et),Ye.set(he.subarray(0,Ct))}else je=he.concat(ne),Ye=Re>=0&&Re<je.length?je.splice(0,je.length-Re):[];return[je,Ye]}var ee=G(I,Y,U,q,oe),Ce=t.redraw(I),Ae=[I,ee.update,U,ee.maxPoints];return l.add(I,t.prependTraces,Ae,W,arguments),Ce}function V(I,Y,U,q){I=i.getGraphDiv(I);function oe(he,ne,Re){var je,Ye;if(i.isTypedArray(he))if(Re<=0){var rt=new he.constructor(0),nt=O(ne,he);Re<0?(je=nt,Ye=rt):(je=rt,Ye=nt)}else if(je=new he.constructor(Re),Ye=new he.constructor(he.length+ne.length-Re),Re===ne.length)je.set(ne),Ye.set(he);else if(Re<ne.length){var vt=ne.length-Re;je.set(ne.subarray(0,vt)),Ye.set(ne.subarray(vt)),Ye.set(he,vt)}else{var et=Re-ne.length;je.set(ne),je.set(he.subarray(0,et),ne.length),Ye.set(he.subarray(et))}else je=ne.concat(he),Ye=Re>=0&&Re<je.length?je.splice(Re,je.length):[];return[je,Ye]}var ee=G(I,Y,U,q,oe),Ce=t.redraw(I),Ae=[I,ee.update,U,ee.maxPoints];return l.add(I,t.extendTraces,Ae,V,arguments),Ce}function Z(I,Y,U){I=i.getGraphDiv(I);var q=[],oe=t.deleteTraces,ee=Z,Ce=[I,q],Ae=[I,Y],he,ne;for(F(I,Y,U),Array.isArray(Y)||(Y=[Y]),Y=Y.map(function(Re){return i.extendFlat({},Re)}),x.cleanData(Y),he=0;he<Y.length;he++)I.data.push(Y[he]);for(he=0;he<Y.length;he++)q.push(-Y.length+he);if(typeof U>"u")return ne=t.redraw(I),l.add(I,oe,Ce,ee,Ae),ne;Array.isArray(U)||(U=[U]);try{E(I,q,U)}catch(Re){throw I.data.splice(I.data.length-Y.length,Y.length),Re}return l.startSequence(I),l.add(I,oe,Ce,ee,Ae),ne=t.moveTraces(I,q,U),l.stopSequence(I),ne}function X(I,Y){I=i.getGraphDiv(I);var U=[],q=t.addTraces,oe=X,ee=[I,U,Y],Ce=[I,Y],Ae,he;if(typeof Y>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Y)||(Y=[Y]),C(I,Y,"indices"),Y=M(Y,I.data.length-1),Y.sort(i.sorterDes),Ae=0;Ae<Y.length;Ae+=1)he=I.data.splice(Y[Ae],1)[0],U.push(he);var ne=t.redraw(I);return l.add(I,q,ee,oe,Ce),ne}function Q(I,Y,U){I=i.getGraphDiv(I);var q=[],oe=[],ee=Q,Ce=Q,Ae=[I,U,Y],he=[I,Y,U],ne;if(E(I,Y,U),Y=Array.isArray(Y)?Y:[Y],typeof U>"u")for(U=[],ne=0;ne<Y.length;ne++)U.push(-Y.length+ne);for(U=Array.isArray(U)?U:[U],Y=M(Y,I.data.length-1),U=M(U,I.data.length-1),ne=0;ne<I.data.length;ne++)Y.indexOf(ne)===-1&&q.push(I.data[ne]);for(ne=0;ne<Y.length;ne++)oe.push({newIndex:U[ne],trace:I.data[Y[ne]]});for(oe.sort(function(je,Ye){return je.newIndex-Ye.newIndex}),ne=0;ne<oe.length;ne+=1)q.splice(oe[ne].newIndex,0,oe[ne].trace);I.data=q;var Re=t.redraw(I);return l.add(I,ee,Ae,Ce,he),Re}function te(I,Y,U,q){I=i.getGraphDiv(I),x.clearPromiseQueue(I);var oe={};if(typeof Y=="string")oe[Y]=U;else if(i.isPlainObject(Y))oe=i.extendFlat({},Y),q===void 0&&(q=U);else return i.warn("Restyle fail.",Y,U,q),Promise.reject();Object.keys(oe).length&&(I.changed=!0);var ee=x.coerceTraceIndices(I,q),Ce=de(I,oe,ee),Ae=Ce.flags;Ae.calc&&(I.calcdata=void 0),Ae.clearAxisTypes&&x.clearAxisTypes(I,ee,{});var he=[];Ae.fullReplot?he.push(t._doPlot):(he.push(c.previousPromises),c.supplyDefaults(I),Ae.markerSize&&(c.doCalcdata(I),_e(he)),Ae.style&&he.push(_.doTraceStyle),Ae.colorbars&&he.push(_.doColorBars),he.push(R)),he.push(c.rehover,c.redrag,c.reselect),l.add(I,te,[I,Ce.undoit,Ce.traces],te,[I,Ce.redoit,Ce.traces]);var ne=i.syncOrAsync(he,I);return(!ne||!ne.then)&&(ne=Promise.resolve()),ne.then(function(){return I.emit("plotly_restyle",Ce.eventData),I})}function xe(I){return I===void 0?null:I}function ue(I,Y){return Y?function(U,q,oe){var ee=n(U,q),Ce=ee.set;return ee.set=function(Ae){var he=(oe||"")+q;ae(he,ee.get(),Ae,I),Ce(Ae)},ee}:n}function ae(I,Y,U,q){if(Array.isArray(Y)||Array.isArray(U))for(var oe=Array.isArray(Y)?Y:[],ee=Array.isArray(U)?U:[],Ce=Math.max(oe.length,ee.length),Ae=0;Ae<Ce;Ae++)ae(I+"["+Ae+"]",oe[Ae],ee[Ae],q);else if(i.isPlainObject(Y)||i.isPlainObject(U)){var he=i.isPlainObject(Y)?Y:{},ne=i.isPlainObject(U)?U:{},Re=i.extendFlat({},he,ne);for(var je in Re)ae(I+"."+je,he[je],ne[je],q)}else q[I]===void 0&&(q[I]=xe(Y))}function le(I,Y,U){for(var q in U){var oe=n(I,q);ae(q,oe.get(),U[q],Y)}}function de(I,Y,U){var q=I._fullLayout,oe=I._fullData,ee=I.data,Ce=q._guiEditing,Ae=ue(q._preGUI,Ce),he=i.extendDeepAll({},Y),ne;be(Y);var Re=k.traceFlags(),je={},Ye={},rt;function nt(){return U.map(function(){})}function vt(Ht){var dr=u.id2name(Ht);rt.indexOf(dr)===-1&&rt.push(dr)}function et(Ht){return"LAYOUT"+Ht+".autorange"}function Ct(Ht){return"LAYOUT"+Ht+".range"}function lt(Ht){for(var dr=Ht;dr<oe.length;dr++)if(oe[dr]._input===ee[Ht])return oe[dr]}function Qe(Ht,dr,Ga){if(Array.isArray(Ht)){Ht.forEach(function(ni){Qe(ni,dr,Ga)});return}if(!(Ht in Y||x.hasParent(Y,Ht))){var Gi;if(Ht.substr(0,6)==="LAYOUT")Gi=Ae(I.layout,Ht.replace("LAYOUT",""));else{var Jo=U[Ga],fa=q._tracePreGUI[lt(Jo)._fullInput.uid];Gi=ue(fa,Ce)(ee[Jo],Ht)}Ht in Ye||(Ye[Ht]=nt()),Ye[Ht][Ga]===void 0&&(Ye[Ht][Ga]=xe(Gi.get())),dr!==void 0&&Gi.set(dr)}}function yt(Ht){return function(dr){return oe[dr][Ht]}}function mt(Ht){return function(dr,Ga){return dr===!1?oe[U[Ga]][Ht]:null}}for(var st in Y){if(x.hasParent(Y,st))throw new Error("cannot set "+st+" and a parent attribute simultaneously");var at=Y[st],qe,Ze,ct,Tt,Ke,gt;if((st==="autobinx"||st==="autobiny")&&(st=st.charAt(st.length-1)+"bins",Array.isArray(at)?at=at.map(mt(st)):at===!1?at=U.map(yt(st)):at=null),je[st]=at,st.substr(0,6)==="LAYOUT"){ct=Ae(I.layout,st.replace("LAYOUT","")),Ye[st]=[xe(ct.get())],ct.set(Array.isArray(at)?at[0]:at),Re.calc=!0;continue}for(Ye[st]=nt(),ne=0;ne<U.length;ne++){qe=ee[U[ne]],Ze=lt(U[ne]);var Pt=q._tracePreGUI[Ze._fullInput.uid];if(ct=ue(Pt,Ce)(qe,st),Tt=ct.get(),Ke=Array.isArray(at)?at[ne%at.length]:at,Ke!==void 0){var Dr=ct.parts[ct.parts.length-1],fr=st.substr(0,st.length-Dr.length-1),Ur=fr?fr+".":"",Vr=fr?n(Ze,fr).get():Ze;if(gt=f.getTraceValObject(Ze,ct.parts),gt&>.impliedEdits&&Ke!==null)for(var Ko in gt.impliedEdits)Qe(i.relativeAttr(st,Ko),gt.impliedEdits[Ko],ne);else if((Dr==="thicknessmode"||Dr==="lenmode")&&Tt!==Ke&&(Ke==="fraction"||Ke==="pixels")&&Vr){var Oi=q._size,Dn=Vr.orient,Pn=Dn==="top"||Dn==="bottom";if(Dr==="thicknessmode"){var Ms=Pn?Oi.h:Oi.w;Qe(Ur+"thickness",Vr.thickness*(Ke==="fraction"?1/Ms:Ms),ne)}else{var Ba=Pn?Oi.w:Oi.h;Qe(Ur+"len",Vr.len*(Ke==="fraction"?1/Ba:Ba),ne)}}else if(st==="type"&&(Ke==="pie"!=(Tt==="pie")||Ke==="funnelarea"!=(Tt==="funnelarea"))){var Aa="x",Qo="y";(Ke==="bar"||Tt==="bar")&&qe.orientation==="h"&&(Aa="y",Qo="x"),i.swapAttrs(qe,["?","?src"],"labels",Aa),i.swapAttrs(qe,["d?","?0"],"label",Aa),i.swapAttrs(qe,["?","?src"],"values",Qo),Tt==="pie"||Tt==="funnelarea"?(n(qe,"marker.color").set(n(qe,"marker.colors").get()),q._pielayer.selectAll("g.trace").remove()):s.traceIs(qe,"cartesian")&&n(qe,"marker.colors").set(n(qe,"marker.color").get())}Ye[st][ne]=xe(Tt);var ji=["swapxy","swapxyaxes","orientation","orientationaxes"];if(ji.indexOf(st)!==-1){if(st==="orientation"){ct.set(Ke);var En=qe.x&&!qe.y?"h":"v";if((ct.get()||En)===Ze.orientation)continue}else st==="orientationaxes"&&(qe.orientation={v:"h",h:"v"}[Ze.orientation]);x.swapXYData(qe),Re.calc=Re.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(ct.parts[0])!==-1?(x.manageArrayContainers(ct,Ke,Ye),Re.calc=!0):(gt?gt.arrayOk&&!s.traceIs(Ze,"regl")&&(i.isArrayOrTypedArray(Ke)||i.isArrayOrTypedArray(Tt))?Re.calc=!0:k.update(Re,gt):Re.calc=!0,ct.set(Ke))}}if(["swapxyaxes","orientationaxes"].indexOf(st)!==-1&&u.swap(I,U),st==="orientationaxes"){var ii=n(I.layout,"hovermode"),Rn=ii.get();Rn==="x"?ii.set("y"):Rn==="y"?ii.set("x"):Rn==="x unified"?ii.set("y unified"):Rn==="y unified"&&ii.set("x unified")}if(["orientation","type"].indexOf(st)!==-1){for(rt=[],ne=0;ne<U.length;ne++){var Bi=ee[U[ne]];s.traceIs(Bi,"cartesian")&&(vt(Bi.xaxis||"x"),vt(Bi.yaxis||"y"))}Qe(rt.map(et),!0,0),Qe(rt.map(Ct),[0,1],0)}}return(Re.calc||Re.plot)&&(Re.fullReplot=!0),{flags:Re,undoit:Ye,redoit:je,traces:U,eventData:i.extendDeepNoArrays([],[he,U])}}function be(I){var Y=i.counterRegex("axis",".title",!1,!1),U=/colorbar\.title$/,q=Object.keys(I),oe,ee,Ce;for(oe=0;oe<q.length;oe++)ee=q[oe],Ce=I[ee],(ee==="title"||Y.test(ee)||U.test(ee))&&(typeof Ce=="string"||typeof Ce=="number")?Ae(ee,ee.replace("title","title.text")):ee.indexOf("titlefont")>-1&&ee.indexOf("grouptitlefont")===-1?Ae(ee,ee.replace("titlefont","title.font")):ee.indexOf("titleposition")>-1?Ae(ee,ee.replace("titleposition","title.position")):ee.indexOf("titleside")>-1?Ae(ee,ee.replace("titleside","title.side")):ee.indexOf("titleoffset")>-1&&Ae(ee,ee.replace("titleoffset","title.offset"));function Ae(he,ne){I[ne]=I[he],delete I[he]}}function Te(I,Y,U){I=i.getGraphDiv(I),x.clearPromiseQueue(I);var q={};if(typeof Y=="string")q[Y]=U;else if(i.isPlainObject(Y))q=i.extendFlat({},Y);else return i.warn("Relayout fail.",Y,U),Promise.reject();Object.keys(q).length&&(I.changed=!0);var oe=Ee(I,q),ee=oe.flags;ee.calc&&(I.calcdata=void 0);var Ce=[c.previousPromises];ee.layoutReplot?Ce.push(_.layoutReplot):Object.keys(q).length&&(Le(I,ee,oe)||c.supplyDefaults(I),ee.legend&&Ce.push(_.doLegend),ee.layoutstyle&&Ce.push(_.layoutStyles),ee.axrange&&_e(Ce,oe.rangesAltered),ee.ticks&&Ce.push(_.doTicksRelayout),ee.modebar&&Ce.push(_.doModeBar),ee.camera&&Ce.push(_.doCamera),ee.colorbars&&Ce.push(_.doColorBars),Ce.push(R)),Ce.push(c.rehover,c.redrag,c.reselect),l.add(I,Te,[I,oe.undoit],Te,[I,oe.redoit]);var Ae=i.syncOrAsync(Ce,I);return(!Ae||!Ae.then)&&(Ae=Promise.resolve(I)),Ae.then(function(){return I.emit("plotly_relayout",oe.eventData),I})}function Le(I,Y,U){var q=I._fullLayout;if(!Y.axrange)return!1;for(var oe in Y)if(oe!=="axrange"&&Y[oe])return!1;var ee,Ce,Ae=function(rt,nt){return i.coerce(ee,Ce,h,rt,nt)},he={};for(var ne in U.rangesAltered){var Re=u.id2name(ne);if(ee=I.layout[Re],Ce=q[Re],v(ee,Ce,Ae,he),Ce._matchGroup){for(var je in Ce._matchGroup)if(je!==ne){var Ye=q[u.id2name(je)];Ye.autorange=Ce.autorange,Ye.range=Ce.range.slice(),Ye._input.range=Ce.range.slice()}}}return!0}function _e(I,Y){var U=Y?function(q){var oe=[],ee=!0;for(var Ce in Y){var Ae=u.getFromId(q,Ce);if(oe.push(Ce),(Ae.ticklabelposition||"").indexOf("inside")!==-1&&Ae._anchorAxis&&oe.push(Ae._anchorAxis._id),Ae._matchGroup)for(var he in Ae._matchGroup)Y[he]||oe.push(he)}return u.draw(q,oe,{skipTitle:ee})}:function(q){return u.draw(q,"redraw")};I.push(b,_.doAutoRangeAndConstraints,U,_.drawData,_.finalDraw)}var Ie=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ce=/^[xyz]axis[0-9]*\.autorange$/,ye=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Ee(I,Y){var U=I.layout,q=I._fullLayout,oe=q._guiEditing,ee=ue(q._preGUI,oe),Ce=Object.keys(Y),Ae=u.list(I),he=i.extendDeepAll({},Y),ne={},Re,je,Ye;for(be(Y),Ce=Object.keys(Y),je=0;je<Ce.length;je++)if(Ce[je].indexOf("allaxes")===0){for(Ye=0;Ye<Ae.length;Ye++){var rt=Ae[Ye]._id.substr(1),nt=rt.indexOf("scene")!==-1?rt+".":"",vt=Ce[je].replace("allaxes",nt+Ae[Ye]._name);Y[vt]||(Y[vt]=Y[Ce[je]])}delete Y[Ce[je]]}var et=k.layoutFlags(),Ct={},lt={};function Qe(fa,ni){if(Array.isArray(fa)){fa.forEach(function(wM){Qe(wM,ni)});return}if(!(fa in Y||x.hasParent(Y,fa))){var Tm=ee(U,fa);fa in lt||(lt[fa]=xe(Tm.get())),ni!==void 0&&Tm.set(ni)}}var yt={},mt;function st(fa){var ni=u.name2id(fa.split(".")[0]);return yt[ni]=1,ni}for(var at in Y){if(x.hasParent(Y,at))throw new Error("cannot set "+at+" and a parent attribute simultaneously");for(var qe=ee(U,at),Ze=Y[at],ct=qe.parts.length,Tt=ct-1;Tt>0&&typeof qe.parts[Tt]!="string";)Tt--;var Ke=qe.parts[Tt],gt=qe.parts[Tt-1]+"."+Ke,Pt=qe.parts.slice(0,Tt).join("."),Dr=n(I.layout,Pt).get(),fr=n(q,Pt).get(),Ur=qe.get();if(Ze!==void 0){Ct[at]=Ze,lt[at]=Ke==="reverse"?Ze:xe(Ur);var Vr=f.getLayoutValObject(q,qe.parts);if(Vr&&Vr.impliedEdits&&Ze!==null)for(var Ko in Vr.impliedEdits)Qe(i.relativeAttr(at,Ko),Vr.impliedEdits[Ko]);if(["width","height"].indexOf(at)!==-1)if(Ze){Qe("autosize",null);var Oi=at==="height"?"width":"height";Qe(Oi,q[Oi])}else q[at]=I._initialAutoSize[at];else if(at==="autosize")Qe("width",Ze?null:q.width),Qe("height",Ze?null:q.height);else if(gt.match(Ie))st(gt),n(q,Pt+"._inputRange").set(null);else if(gt.match(ce)){st(gt),n(q,Pt+"._inputRange").set(null);var Dn=n(q,Pt).get();Dn._inputDomain&&(Dn._input.domain=Dn._inputDomain.slice())}else gt.match(ye)&&n(q,Pt+"._inputDomain").set(null);if(Ke==="type"){mt=Dr;var Pn=fr.type==="linear"&&Ze==="log",Ms=fr.type==="log"&&Ze==="linear";if(Pn||Ms){if(!mt||!mt.range)Qe(Pt+".autorange",!0);else if(fr.autorange)Pn&&(mt.range=mt.range[1]>mt.range[0]?[1,2]:[2,1]);else{var Ba=mt.range[0],Aa=mt.range[1];Pn?(Ba<=0&&Aa<=0&&Qe(Pt+".autorange",!0),Ba<=0?Ba=Aa/1e6:Aa<=0&&(Aa=Ba/1e6),Qe(Pt+".range[0]",Math.log(Ba)/Math.LN10),Qe(Pt+".range[1]",Math.log(Aa)/Math.LN10)):(Qe(Pt+".range[0]",Math.pow(10,Ba)),Qe(Pt+".range[1]",Math.pow(10,Aa)))}Array.isArray(q._subplots.polar)&&q._subplots.polar.length&&q[qe.parts[0]]&&qe.parts[1]==="radialaxis"&&delete q[qe.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(I,fr,Ze,Qe),s.getComponentMethod("images","convertCoords")(I,fr,Ze,Qe)}else Qe(Pt+".autorange",!0),Qe(Pt+".range",null);n(q,Pt+"._inputRange").set(null)}else if(Ke.match(T)){var Qo=n(q,at).get(),ji=(Ze||{}).type;(!ji||ji==="-")&&(ji="linear"),s.getComponentMethod("annotations","convertCoords")(I,Qo,ji,Qe),s.getComponentMethod("images","convertCoords")(I,Qo,ji,Qe)}var En=g.containerArrayMatch(at);if(En){Re=En.array,je=En.index;var ii=En.property,Rn=Vr||{editType:"calc"};je!==""&&ii===""&&(g.isAddVal(Ze)?lt[at]=null:g.isRemoveVal(Ze)?lt[at]=(n(U,Re).get()||[])[je]:i.warn("unrecognized full object value",Y)),k.update(et,Rn),ne[Re]||(ne[Re]={});var Bi=ne[Re][je];Bi||(Bi=ne[Re][je]={}),Bi[ii]=Ze,delete Y[at]}else Ke==="reverse"?(Dr.range?Dr.range.reverse():(Qe(Pt+".autorange",!0),Dr.range=[1,0]),fr.autorange?et.calc=!0:et.plot=!0):(at==="dragmode"&&(Ze===!1&&Ur!==!1||Ze!==!1&&Ur===!1)||q._has("scatter-like")&&q._has("regl")&&at==="dragmode"&&(Ze==="lasso"||Ze==="select")&&!(Ur==="lasso"||Ur==="select")||q._has("gl2d")?et.plot=!0:Vr?k.update(et,Vr):et.calc=!0,qe.set(Ze))}}for(Re in ne){var Ht=g.applyContainerArrayChanges(I,ee(U,Re),ne[Re],et,ee);Ht||(et.plot=!0)}for(var dr in yt){mt=u.getFromId(I,dr);var Ga=mt&&mt._constraintGroup;if(Ga){et.calc=!0;for(var Gi in Ga)yt[Gi]||(u.getFromId(I,Gi)._constraintShrinkable=!0)}}(ze(I)||Y.height||Y.width)&&(et.plot=!0);var Jo=q.shapes;for(je=0;je<Jo.length;je++)if(Jo[je].showlegend){et.calc=!0;break}return(et.plot||et.calc)&&(et.layoutReplot=!0),{flags:et,rangesAltered:yt,undoit:lt,redoit:Ct,eventData:he}}function ze(I){var Y=I._fullLayout,U=Y.width,q=Y.height;return I.layout.autosize&&c.plotAutoSize(I,I.layout,Y),Y.width!==U||Y.height!==q}function K(I,Y,U,q){I=i.getGraphDiv(I),x.clearPromiseQueue(I),i.isPlainObject(Y)||(Y={}),i.isPlainObject(U)||(U={}),Object.keys(Y).length&&(I.changed=!0),Object.keys(U).length&&(I.changed=!0);var oe=x.coerceTraceIndices(I,q),ee=de(I,i.extendFlat({},Y),oe),Ce=ee.flags,Ae=Ee(I,i.extendFlat({},U)),he=Ae.flags;(Ce.calc||he.calc)&&(I.calcdata=void 0),Ce.clearAxisTypes&&x.clearAxisTypes(I,oe,U);var ne=[];he.layoutReplot?ne.push(_.layoutReplot):Ce.fullReplot?ne.push(t._doPlot):(ne.push(c.previousPromises),Le(I,he,Ae)||c.supplyDefaults(I),Ce.style&&ne.push(_.doTraceStyle),(Ce.colorbars||he.colorbars)&&ne.push(_.doColorBars),he.legend&&ne.push(_.doLegend),he.layoutstyle&&ne.push(_.layoutStyles),he.axrange&&_e(ne,Ae.rangesAltered),he.ticks&&ne.push(_.doTicksRelayout),he.modebar&&ne.push(_.doModeBar),he.camera&&ne.push(_.doCamera),ne.push(R)),ne.push(c.rehover,c.redrag,c.reselect),l.add(I,K,[I,ee.undoit,Ae.undoit,ee.traces],K,[I,ee.redoit,Ae.redoit,ee.traces]);var Re=i.syncOrAsync(ne,I);return(!Re||!Re.then)&&(Re=Promise.resolve(I)),Re.then(function(){return I.emit("plotly_update",{data:ee.eventData,layout:Ae.eventData}),I})}function ke(I){return function(U){U._fullLayout._guiEditing=!0;var q=I.apply(null,arguments);return U._fullLayout._guiEditing=!1,q}}var re=[{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"}],pe=[{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 we(I,Y){for(var U=0;U<Y.length;U++){var q=Y[U],oe=I.match(q.pattern);if(oe){var ee=oe[1]||"";return{head:ee,tail:I.substr(ee.length+1),attr:q.attr}}}}function se(I,Y){var U=n(Y,I).get();if(U!==void 0)return U;var q=I.split(".");for(q.pop();q.length>1;)if(q.pop(),U=n(Y,q.join(".")+".uirevision").get(),U!==void 0)return U;return Y.uirevision}function ie(I,Y){for(var U=0;U<Y.length;U++)if(Y[U]._fullInput.uid===I)return U;return-1}function fe(I,Y,U){for(var q=0;q<Y.length;q++)if(Y[q].uid===I)return q;return!Y[U]||Y[U].uid?-1:U}function ge(I,Y){var U=i.isPlainObject(I),q=Array.isArray(I);return U||q?(U&&i.isPlainObject(Y)||q&&Array.isArray(Y))&&JSON.stringify(I)===JSON.stringify(Y):I===Y}function Me(I,Y,U,q){var oe=q._preGUI,ee,Ce,Ae,he,ne,Re,je,Ye,rt,nt,vt=[],et={},Ct={};for(ee in oe){if(ne=we(ee,re),ne){if(rt=ne.head,nt=ne.tail,Ce=ne.attr||rt+".uirevision",Ae=n(q,Ce).get(),he=Ae&&se(Ce,Y),he&&he===Ae){if(Re=oe[ee],Re===null&&(Re=void 0),je=n(Y,ee),Ye=je.get(),ge(Ye,Re)){Ye===void 0&&nt==="autorange"&&vt.push(rt),je.set(xe(n(q,ee).get()));continue}else if(nt==="autorange"||nt.substr(0,6)==="range["){var lt=oe[rt+".range[0]"],Qe=oe[rt+".range[1]"],yt=oe[rt+".autorange"];if(yt||yt===null&<===null&&Qe===null){if(!(rt in et)){var mt=n(Y,rt).get();et[rt]=mt&&(mt.autorange||mt.autorange!==!1&&(!mt.range||mt.range.length!==2))}if(et[rt]){je.set(xe(n(q,ee).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+ee);delete oe[ee],ne&&ne.tail.substr(0,6)==="range["&&(Ct[ne.head]=1)}for(var st=0;st<vt.length;st++){var at=vt[st];if(Ct[at]){var qe=n(Y,at).get();qe&&delete qe.autorange}}var Ze=q._tracePreGUI;for(var ct in Ze){var Tt=Ze[ct],Ke=null,gt;for(ee in Tt){if(!Ke){var Pt=ie(ct,U);if(Pt<0){delete Ze[ct];break}var Dr=U[Pt];gt=Dr._fullInput;var fr=fe(ct,I,gt.index);if(fr<0){delete Ze[ct];break}Ke=I[fr]}if(ne=we(ee,pe),ne){if(ne.attr?(Ae=n(q,ne.attr).get(),he=Ae&&se(ne.attr,Y)):(Ae=gt.uirevision,he=Ke.uirevision,he===void 0&&(he=Y.uirevision)),he&&he===Ae&&(Re=Tt[ee],Re===null&&(Re=void 0),je=n(Ke,ee),Ye=je.get(),ge(Ye,Re))){je.set(xe(n(gt,ee).get()));continue}}else i.warn("unrecognized GUI edit: "+ee+" in trace uid "+ct);delete Tt[ee]}}}function Se(I,Y,U,q){var oe,ee;function Ce(){return t.addFrames(I,oe)}I=i.getGraphDiv(I),x.clearPromiseQueue(I);var Ae=I._fullData,he=I._fullLayout;if(!i.isPlotDiv(I)||!Ae||!he)ee=t.newPlot(I,Y,U,q);else{if(i.isPlainObject(Y)){var ne=Y;Y=ne.data,U=ne.layout,q=ne.config,oe=ne.frames}var Re=!1;if(q){var je=i.extendDeep({},I._context);I._context=void 0,$(I,q),Re=ve(je,I._context)}I.data=Y||[],x.cleanData(I.data),I.layout=U||{},x.cleanLayout(I.layout),Me(I.data,I.layout,Ae,he),c.supplyDefaults(I,{skipUpdateCalc:!0});var Ye=I._fullData,rt=I._fullLayout,nt=rt.datarevision===void 0,vt=rt.transition,et=He(I,he,rt,nt,vt),Ct=et.newDataRevision,lt=Pe(I,Ae,Ye,nt,vt,Ct);if(ze(I)&&(et.layoutReplot=!0),lt.calc||et.calc){I.calcdata=void 0;for(var Qe=Object.getOwnPropertyNames(rt),yt=0;yt<Qe.length;yt++){var mt=Qe[yt],st=mt.substring(0,5);if(st==="xaxis"||st==="yaxis"){var at=rt[mt]._emptyCategories;at&&at()}}}else c.supplyDefaultsUpdateCalc(I.calcdata,Ye);var qe=[];if(oe&&(I._transitionData={},c.createTransitionData(I),qe.push(Ce)),rt.transition&&!Re&&(lt.anim||et.anim))et.ticks&&qe.push(_.doTicksRelayout),c.doCalcdata(I),_.doAutoRangeAndConstraints(I),qe.push(function(){return c.transitionFromReact(I,lt,et,he)});else if(lt.fullReplot||et.layoutReplot||Re)I._fullLayout._skipDefaults=!0,qe.push(t._doPlot);else{for(var Ze in et.arrays){var ct=et.arrays[Ze];if(ct.length){var Tt=s.getComponentMethod(Ze,"drawOne");if(Tt!==i.noop)for(var Ke=0;Ke<ct.length;Ke++)Tt(I,ct[Ke]);else{var gt=s.getComponentMethod(Ze,"draw");if(gt===i.noop)throw new Error("cannot draw components: "+Ze);gt(I)}}}qe.push(c.previousPromises),lt.style&&qe.push(_.doTraceStyle),(lt.colorbars||et.colorbars)&&qe.push(_.doColorBars),et.legend&&qe.push(_.doLegend),et.layoutstyle&&qe.push(_.layoutStyles),et.axrange&&_e(qe),et.ticks&&qe.push(_.doTicksRelayout),et.modebar&&qe.push(_.doModeBar),et.camera&&qe.push(_.doCamera),qe.push(R)}qe.push(c.rehover,c.redrag,c.reselect),ee=i.syncOrAsync(qe,I),(!ee||!ee.then)&&(ee=Promise.resolve(I))}return ee.then(function(){return I.emit("plotly_react",{data:Y,layout:U}),I})}function Pe(I,Y,U,q,oe,ee){var Ce=Y.length===U.length;if(!oe&&!Ce)return{fullReplot:!0,calc:!0};var Ae=k.traceFlags();Ae.arrays={},Ae.nChanges=0,Ae.nChangesAnim=0;var he,ne;function Re(rt){var nt=f.getTraceValObject(ne,rt);return!ne._module.animatable&&nt.anim&&(nt.anim=!1),nt}var je={getValObject:Re,flags:Ae,immutable:q,transition:oe,newDataRevision:ee,gd:I},Ye={};for(he=0;he<Y.length;he++)if(U[he]){if(ne=U[he]._fullInput,c.hasMakesDataTransform(ne)&&(ne=U[he]),Ye[ne.uid])continue;Ye[ne.uid]=1,Oe(Y[he]._fullInput,ne,[],je)}return(Ae.calc||Ae.plot)&&(Ae.fullReplot=!0),oe&&Ae.nChanges&&Ae.nChangesAnim&&(Ae.anim=Ae.nChanges===Ae.nChangesAnim&&Ce?"all":"some"),Ae}function He(I,Y,U,q,oe){var ee=k.layoutFlags();ee.arrays={},ee.rangesAltered={},ee.nChanges=0,ee.nChangesAnim=0;function Ce(he){return f.getLayoutValObject(U,he)}var Ae={getValObject:Ce,flags:ee,immutable:q,transition:oe,gd:I};return Oe(Y,U,[],Ae),(ee.plot||ee.calc)&&(ee.layoutReplot=!0),oe&&ee.nChanges&&ee.nChangesAnim&&(ee.anim=ee.nChanges===ee.nChangesAnim?"all":"some"),ee}function Oe(I,Y,U,q){var oe,ee,Ce,Ae=q.getValObject,he=q.flags,ne=q.immutable,Re=q.inArray,je=q.arrayIndex;function Ye(){var Pt=oe.editType;if(Re&&Pt.indexOf("arraydraw")!==-1){i.pushUnique(he.arrays[Re],je);return}k.update(he,oe),Pt!=="none"&&he.nChanges++,q.transition&&oe.anim&&he.nChangesAnim++,(Ie.test(Ce)||ce.test(Ce))&&(he.rangesAltered[U[0]]=1),ye.test(Ce)&&n(Y,"_inputDomain").set(null),ee==="datarevision"&&(he.newDataRevision=1)}function rt(Pt){return Pt.valType==="data_array"||Pt.arrayOk}for(ee in I){if(he.calc&&!q.transition)return;var nt=I[ee],vt=Y[ee],et=U.concat(ee);if(Ce=et.join("."),!(ee.charAt(0)==="_"||typeof nt=="function"||nt===vt)){if((ee==="tick0"||ee==="dtick")&&U[0]!=="geo"){var Ct=Y.tickmode;if(Ct==="auto"||Ct==="array"||!Ct)continue}if(!(ee==="range"&&Y.autorange)&&!((ee==="zmin"||ee==="zmax")&&Y.type==="contourcarpet")&&(oe=Ae(et),!!oe&&!(oe._compareAsJSON&&JSON.stringify(nt)===JSON.stringify(vt)))){var lt=oe.valType,Qe,yt=rt(oe),mt=Array.isArray(nt),st=Array.isArray(vt);if(mt&&st){var at="_input_"+ee,qe=I[at],Ze=Y[at];if(Array.isArray(qe)&&qe===Ze)continue}if(vt===void 0)yt&&mt?he.calc=!0:Ye();else if(oe._isLinkedToArray){var ct=[],Tt=!1;Re||(he.arrays[ee]=ct);var Ke=Math.min(nt.length,vt.length),gt=Math.max(nt.length,vt.length);if(Ke!==gt)if(oe.editType==="arraydraw")Tt=!0;else{Ye();continue}for(Qe=0;Qe<Ke;Qe++)Oe(nt[Qe],vt[Qe],et.concat(Qe),i.extendFlat({inArray:ee,arrayIndex:Qe},q));if(Tt)for(Qe=Ke;Qe<gt;Qe++)ct.push(Qe)}else!lt&&i.isPlainObject(nt)?Oe(nt,vt,et,q):yt?mt&&st?(ne&&(he.calc=!0),(ne||q.newDataRevision)&&Ye()):mt!==st?he.calc=!0:Ye():mt&&st?(nt.length!==vt.length||String(nt)!==String(vt))&&Ye():Ye()}}}for(ee in Y)if(!(ee in I||ee.charAt(0)==="_"||typeof Y[ee]=="function"))if(oe=Ae(U.concat(ee)),rt(oe)&&Array.isArray(Y[ee])){he.calc=!0;return}else Ye()}function ve(I,Y){var U;for(U in I)if(U.charAt(0)!=="_"){var q=I[U],oe=Y[U];if(q!==oe)if(i.isPlainObject(q)&&i.isPlainObject(oe)){if(ve(q,oe))return!0}else if(Array.isArray(q)&&Array.isArray(oe)){if(q.length!==oe.length)return!0;for(var ee=0;ee<q.length;ee++)if(q[ee]!==oe[ee])if(i.isPlainObject(q[ee])&&i.isPlainObject(oe[ee])){if(ve(q[ee],oe[ee]))return!0}else return!0}else return!0}}function Be(I,Y,U){if(I=i.getGraphDiv(I),!i.isPlotDiv(I))throw new Error("This element is not a Plotly plot: "+I+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var q=I._transitionData;q._frameQueue||(q._frameQueue=[]),U=c.supplyAnimationDefaults(U);var oe=U.transition,ee=U.frame;q._frameWaitingCnt===void 0&&(q._frameWaitingCnt=0);function Ce(ne){return Array.isArray(oe)?ne>=oe.length?oe[0]:oe[ne]:oe}function Ae(ne){return Array.isArray(ee)?ne>=ee.length?ee[0]:ee[ne]:ee}function he(ne,Re){var je=0;return function(){if(ne&&++je===Re)return ne()}}return new Promise(function(ne,Re){function je(){if(q._frameQueue.length!==0){for(;q._frameQueue.length;){var Ke=q._frameQueue.pop();Ke.onInterrupt&&Ke.onInterrupt()}I.emit("plotly_animationinterrupted",[])}}function Ye(Ke){if(Ke.length!==0){for(var gt=0;gt<Ke.length;gt++){var Pt;Ke[gt].type==="byname"?Pt=c.computeFrame(I,Ke[gt].name):Pt=Ke[gt].data;var Dr=Ae(gt),fr=Ce(gt);fr.duration=Math.min(fr.duration,Dr.duration);var Ur={frame:Pt,name:Ke[gt].name,frameOpts:Dr,transitionOpts:fr};gt===Ke.length-1&&(Ur.onComplete=he(ne,2),Ur.onInterrupt=Re),q._frameQueue.push(Ur)}U.mode==="immediate"&&(q._lastFrameAt=-1/0),q._animationRaf||vt()}}function rt(){I.emit("plotly_animated"),window.cancelAnimationFrame(q._animationRaf),q._animationRaf=null}function nt(){q._currentFrame&&q._currentFrame.onComplete&&q._currentFrame.onComplete();var Ke=q._currentFrame=q._frameQueue.shift();if(Ke){var gt=Ke.name?Ke.name.toString():null;I._fullLayout._currentFrame=gt,q._lastFrameAt=Date.now(),q._timeToNext=Ke.frameOpts.duration,c.transition(I,Ke.frame.data,Ke.frame.layout,x.coerceTraceIndices(I,Ke.frame.traces),Ke.frameOpts,Ke.transitionOpts).then(function(){Ke.onComplete&&Ke.onComplete()}),I.emit("plotly_animatingframe",{name:gt,frame:Ke.frame,animation:{frame:Ke.frameOpts,transition:Ke.transitionOpts}})}else rt()}function vt(){I.emit("plotly_animating"),q._lastFrameAt=-1/0,q._timeToNext=0,q._runningTransitions=0,q._currentFrame=null;var Ke=function(){q._animationRaf=window.requestAnimationFrame(Ke),Date.now()-q._lastFrameAt>q._timeToNext&&nt()};Ke()}var et=0;function Ct(Ke){return Array.isArray(oe)?et>=oe.length?Ke.transitionOpts=oe[et]:Ke.transitionOpts=oe[0]:Ke.transitionOpts=oe,et++,Ke}var lt,Qe,yt=[],mt=Y==null,st=Array.isArray(Y),at=!mt&&!st&&i.isPlainObject(Y);if(at)yt.push({type:"object",data:Ct(i.extendFlat({},Y))});else if(mt||["string","number"].indexOf(typeof Y)!==-1)for(lt=0;lt<q._frames.length;lt++)Qe=q._frames[lt],Qe&&(mt||String(Qe.group)===String(Y))&&yt.push({type:"byname",name:String(Qe.name),data:Ct({name:Qe.name})});else if(st)for(lt=0;lt<Y.length;lt++){var qe=Y[lt];["number","string"].indexOf(typeof qe)!==-1?(qe=String(qe),yt.push({type:"byname",name:qe,data:Ct({name:qe})})):i.isPlainObject(qe)&&yt.push({type:"object",data:Ct(i.extendFlat({},qe))})}for(lt=0;lt<yt.length;lt++)if(Qe=yt[lt],Qe.type==="byname"&&!q._frameHash[Qe.data.name]){i.warn('animate failure: frame not found: "'+Qe.data.name+'"'),Re();return}["next","immediate"].indexOf(U.mode)!==-1&&je(),U.direction==="reverse"&&yt.reverse();var Ze=I._fullLayout._currentFrame;if(Ze&&U.fromcurrent){var ct=-1;for(lt=0;lt<yt.length;lt++)if(Qe=yt[lt],Qe.type==="byname"&&Qe.name===Ze){ct=lt;break}if(ct>0&&ct<yt.length-1){var Tt=[];for(lt=0;lt<yt.length;lt++)Qe=yt[lt],(yt[lt].type!=="byname"||lt>ct)&&Tt.push(Qe);yt=Tt}}yt.length>0?Ye(yt):(I.emit("plotly_animated"),ne())})}function Ne(I,Y,U){if(I=i.getGraphDiv(I),Y==null)return Promise.resolve();if(!i.isPlotDiv(I))throw new Error("This element is not a Plotly plot: "+I+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var q,oe,ee,Ce,Ae=I._transitionData._frames,he=I._transitionData._frameHash;if(!Array.isArray(Y))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Y);var ne=Ae.length+Y.length*2,Re=[],je={};for(q=Y.length-1;q>=0;q--)if(i.isPlainObject(Y[q])){var Ye=Y[q].name,rt=(he[Ye]||je[Ye]||{}).name,nt=Y[q].name,vt=he[rt]||je[rt];rt&&nt&&typeof nt=="number"&&vt&&S<D&&(S++,i.warn('addFrames: overwriting frame "'+(he[rt]||je[rt]).name+'" with a frame whose name of type "number" also equates to "'+rt+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),S===D&&i.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.")),je[Ye]={name:Ye},Re.push({frame:c.supplyFrameDefaults(Y[q]),index:U&&U[q]!==void 0&&U[q]!==null?U[q]:ne+q})}Re.sort(function(at,qe){return at.index>qe.index?-1:at.index<qe.index?1:0});var et=[],Ct=[],lt=Ae.length;for(q=Re.length-1;q>=0;q--){if(oe=Re[q].frame,typeof oe.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!oe.name)for(;he[oe.name="frame "+I._transitionData._counter++];);if(he[oe.name]){for(ee=0;ee<Ae.length&&(Ae[ee]||{}).name!==oe.name;ee++);et.push({type:"replace",index:ee,value:oe}),Ct.unshift({type:"replace",index:ee,value:Ae[ee]})}else Ce=Math.max(0,Math.min(Re[q].index,lt)),et.push({type:"insert",index:Ce,value:oe}),Ct.unshift({type:"delete",index:Ce}),lt++}var Qe=c.modifyFrames,yt=c.modifyFrames,mt=[I,Ct],st=[I,et];return l&&l.add(I,Qe,mt,yt,st),c.modifyFrames(I,et)}function We(I,Y){if(I=i.getGraphDiv(I),!i.isPlotDiv(I))throw new Error("This element is not a Plotly plot: "+I);var U,q,oe=I._transitionData._frames,ee=[],Ce=[];if(!Y)for(Y=[],U=0;U<oe.length;U++)Y.push(U);for(Y=Y.slice(),Y.sort(),U=Y.length-1;U>=0;U--)q=Y[U],ee.push({type:"delete",index:q}),Ce.unshift({type:"insert",index:q,value:oe[q]});var Ae=c.modifyFrames,he=c.modifyFrames,ne=[I,Ce],Re=[I,ee];return l&&l.add(I,Ae,ne,he,Re),c.modifyFrames(I,ee)}function Ge(I){I=i.getGraphDiv(I);var Y=I._fullLayout||{},U=I._fullData||[];return c.cleanPlot([],{},U,Y),c.purge(I),o.purge(I),Y._container&&Y._container.remove(),delete I._context,I}function Ve(I){var Y=I._fullLayout,U=I.getBoundingClientRect();if(!i.equalDomRects(U,Y._lastBBox)){var q=Y._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(I));Y._invScaleX=Math.sqrt(q[0][0]*q[0][0]+q[0][1]*q[0][1]+q[0][2]*q[0][2]),Y._invScaleY=Math.sqrt(q[1][0]*q[1][0]+q[1][1]*q[1][1]+q[1][2]*q[1][2]),Y._lastBBox=U}}function Ue(I){var Y=e.select(I),U=I._fullLayout;if(U._calcInverseTransform=Ve,U._calcInverseTransform(I),U._container=Y.selectAll(".plot-container").data([0]),U._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),U._paperdiv=U._container.selectAll(".svg-container").data([0]),U._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),U._glcontainer=U._paperdiv.selectAll(".gl-container").data([{}]),U._glcontainer.enter().append("div").classed("gl-container",!0),U._paperdiv.selectAll(".main-svg").remove(),U._paperdiv.select(".modebar-container").remove(),U._paper=U._paperdiv.insert("svg",":first-child").classed("main-svg",!0),U._toppaper=U._paperdiv.append("svg").classed("main-svg",!0),U._modebardiv=U._paperdiv.append("div"),delete U._modeBar,U._hoverpaper=U._paperdiv.append("svg").classed("main-svg",!0),!U._uid){var q={};e.selectAll("defs").each(function(){this.id&&(q[this.id.split("-")[1]]=1)}),U._uid=i.randstr(q)}U._paperdiv.selectAll(".main-svg").attr(y.svgAttrs),U._defs=U._paper.append("defs").attr("id","defs-"+U._uid),U._clips=U._defs.append("g").classed("clips",!0),U._topdefs=U._toppaper.append("defs").attr("id","topdefs-"+U._uid),U._topclips=U._topdefs.append("g").classed("clips",!0),U._bgLayer=U._paper.append("g").classed("bglayer",!0),U._draggers=U._paper.append("g").classed("draglayer",!0);var oe=U._paper.append("g").classed("layer-below",!0);U._imageLowerLayer=oe.append("g").classed("imagelayer",!0),U._shapeLowerLayer=oe.append("g").classed("shapelayer",!0),U._cartesianlayer=U._paper.append("g").classed("cartesianlayer",!0),U._polarlayer=U._paper.append("g").classed("polarlayer",!0),U._smithlayer=U._paper.append("g").classed("smithlayer",!0),U._ternarylayer=U._paper.append("g").classed("ternarylayer",!0),U._geolayer=U._paper.append("g").classed("geolayer",!0),U._funnelarealayer=U._paper.append("g").classed("funnelarealayer",!0),U._pielayer=U._paper.append("g").classed("pielayer",!0),U._iciclelayer=U._paper.append("g").classed("iciclelayer",!0),U._treemaplayer=U._paper.append("g").classed("treemaplayer",!0),U._sunburstlayer=U._paper.append("g").classed("sunburstlayer",!0),U._indicatorlayer=U._toppaper.append("g").classed("indicatorlayer",!0),U._glimages=U._paper.append("g").classed("glimages",!0);var ee=U._toppaper.append("g").classed("layer-above",!0);U._imageUpperLayer=ee.append("g").classed("imagelayer",!0),U._shapeUpperLayer=ee.append("g").classed("shapelayer",!0),U._selectionLayer=U._toppaper.append("g").classed("selectionlayer",!0),U._infolayer=U._toppaper.append("g").classed("infolayer",!0),U._menulayer=U._toppaper.append("g").classed("menulayer",!0),U._zoomlayer=U._toppaper.append("g").classed("zoomlayer",!0),U._hoverlayer=U._hoverpaper.append("g").classed("hoverlayer",!0),U._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),I.emit("plotly_framework")}t.animate=Be,t.addFrames=Ne,t.deleteFrames=We,t.addTraces=Z,t.deleteTraces=X,t.extendTraces=W,t.moveTraces=Q,t.prependTraces=V,t.newPlot=A,t._doPlot=L,t.purge=Ge,t.react=Se,t.redraw=P,t.relayout=Te,t.restyle=te,t.setPlotConfig=z,t.update=K,t._guiRelayout=ke(Te),t._guiRestyle=ke(te),t._guiUpdate=ke(K),t._storeDirectGUIEdit=le})(tp);var kr={},Lz=Je;kr.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0};kr.getRedrawFunc=function(t){return function(){Lz.getComponentMethod("colorbar","draw")(t)}};kr.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};kr.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var E2=window.URL||window.webkitURL;kr.createObjectURL=function(t){return E2.createObjectURL(t)};kr.revokeObjectURL=function(t){return E2.revokeObjectURL(t)};kr.createBlob=function(t,e){if(e==="svg")return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if(e==="full-json")return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=Cz(window.atob(t));return new window.Blob([r],{type:"image/"+e})};kr.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function Cz(t){for(var e=t.length,r=new ArrayBuffer(e),a=new Uint8Array(r),i=0;i<e;i++)a[i]=t.charCodeAt(i);return r}kr.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;kr.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";var uh=ft,Dz=me,Pz=xt,Ez=ot,ff=Mn,wv=/"/g,zl="TOBESTRIPPED",Rz=new RegExp('("'+zl+")|("+zl+'")',"g");function zz(t){var e=uh.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function Iz(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}var qp=function(e,r,a){var i=e._fullLayout,n=i._paper,o=i._toppaper,l=i.width,s=i.height,f;n.insert("rect",":first-child").call(Pz.setRect,0,0,l,s).call(Ez.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(f=0;f<c.length;f++){var u=c[f];u.toSVG&&u.toSVG(e)}if(o){var v=o.node().childNodes,h=Array.prototype.slice.call(v);for(f=0;f<h.length;f++){var d=h[f];d.childNodes.length&&n.node().appendChild(d)}}i._draggers&&i._draggers.remove(),n.node().style.background="",n.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var m=uh.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){m.remove();return}else m.style({visibility:null,display:null});var y=this.style.fontFamily;y&&y.indexOf('"')!==-1&&m.style("font-family",y.replace(wv,zl))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var m=uh.select(this),y=this.style.fill;y&&y.indexOf("url(")!==-1&&m.style("fill",y.replace(wv,zl));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&m.style("stroke",b.replace(wv,zl))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),n.node().setAttributeNS(ff.xmlns,"xmlns",ff.svg),n.node().setAttributeNS(ff.xmlns,"xmlns:xlink",ff.xlink),r==="svg"&&a&&(n.attr("width",a*l),n.attr("height",a*s),n.attr("viewBox","0 0 "+l+" "+s));var p=new window.XMLSerializer().serializeToString(n.node());return p=zz(p),p=Iz(p),p=p.replace(Rz,"'"),Dz.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},F0=me,Fz=zh.EventEmitter,jn=kr;function $z(t){var e=t.emitter||new Fz,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(F0.isIE()&&l!=="svg"){var s=new Error(jn.MSG_IE_BAD_FORMAT);return i(s),t.promise?r:e.emit("error",s)}var f=t.canvas,c=t.scale||1,u=t.width||300,v=t.height||150,h=c*u,d=c*v,p=f.getContext("2d",{willReadFrequently:!0}),m=new n,y,b;l==="svg"||F0.isSafari()?b=jn.encodeSVG(o):(y=jn.createBlob(o,"svg"),b=jn.createObjectURL(y)),f.width=h,f.height=d,m.onload=function(){var w;switch(y=null,jn.revokeObjectURL(b),l!=="svg"&&p.drawImage(m,0,0,h,d),l){case"jpeg":w=f.toDataURL("image/jpeg");break;case"png":w=f.toDataURL("image/png");break;case"webp":w=f.toDataURL("image/webp");break;case"svg":w=b;break;default:var g="Image format is not jpeg, png, svg or webp.";if(i(new Error(g)),!t.promise)return e.emit("error",g)}a(w),t.promise||e.emit("success",w)},m.onerror=function(w){if(y=null,jn.revokeObjectURL(b),i(w),!t.promise)return e.emit("error",w)},m.src=b});return t.promise?r:e}var Zp=$z,$0=dt,N0=tp,Nz=Qt,Da=me,pl=kr,Hz=qp,Oz=Zp,jz=Pc.version,Tv={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};function Bz(t,e){e=e||{};var r,a,i,n;Da.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=Da.getGraphDiv(t),r=Da.extendDeep([],t.data),a=Da.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(_){return!(_ in e)||Da.validate(e[_],Tv[_])}if(!o("width")&&e.width!==null||!o("height")&&e.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Da.join2(Tv.format.values,", "," or ")+".");var l={};function s(_,k){return Da.coerce(e,l,Tv,_,k)}var f=s("format"),c=s("width"),u=s("height"),v=s("scale"),h=s("setBackground"),d=s("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var m=Da.extendFlat({},a);c?m.width=c:e.width===null&&$0(n.width)&&(m.width=n.width),u?m.height=u:e.height===null&&$0(n.height)&&(m.height=n.height);var y=Da.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:h}),b=pl.getRedrawFunc(p);function w(){return new Promise(function(_){setTimeout(_,pl.getDelay(p._fullLayout))})}function g(){return new Promise(function(_,k){var T=Hz(p,f,v),S=p._fullLayout.width,D=p._fullLayout.height;function L(){N0.purge(p),document.body.removeChild(p)}if(f==="full-json"){var R=Nz.graphJson(p,!1,"keepdata","object",!0,!0);return R.version=jz,R=JSON.stringify(R),L(),_(d?R:pl.encodeJSON(R))}if(L(),f==="svg")return _(d?T:pl.encodeSVG(T));var z=document.createElement("canvas");z.id=Da.randstr(),Oz({format:f,width:S,height:D,scale:v,canvas:z,svg:T,promise:!0}).then(_).catch(k)})}function x(_){return d?_.replace(pl.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,k){N0.newPlot(p,r,m,y).then(b).then(w).then(g).then(function(T){_(x(T))}).catch(function(T){k(T)})})}var R2=Bz,ia=me,Gz=Qt,Uz=Vo,Vz=jo.dfltConfig,Zr=ia.isPlainObject,Ai=Array.isArray,H0=ia.isArrayOrTypedArray,Xz=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=Uz.get(),i=[],n={_context:ia.extendFlat({},Vz)},o,l;Ai(e)?(n.data=ia.extendDeep([],e),o=e):(n.data=[],o=[],i.push(qt("array","data"))),Zr(r)?(n.layout=ia.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(qt("object","layout"))),Gz.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var u=o[c],v=["data",c];if(!Zr(u)){i.push(qt("object",v));continue}var h=s[c],d=h.type,p=a.traces[d].attributes;p.type={valType:"enumerated",values:[d]},h.visible===!1&&u.visible!==!1&&i.push(qt("invisible",v)),Il(u,h,p,i,v);var m=u.transforms,y=h.transforms;if(m){Ai(m)||i.push(qt("array",v,["transforms"])),v.push("transforms");for(var b=0;b<m.length;b++){var w=["transforms",b],g=m[b].type;if(!Zr(m[b])){i.push(qt("object",v,w));continue}var x=a.transforms[g]?a.transforms[g].attributes:{};x.type={valType:"enumerated",values:Object.keys(a.transforms)},Il(m[b],y[b],x,i,v,w)}}}var _=n._fullLayout,k=Yz(a,s);return Il(l,_,k,i,"layout"),i.length===0?void 0:i};function Il(t,e,r,a,i,n){n=n||[];for(var o=Object.keys(t),l=0;l<o.length;l++){var s=o[l];if(s!=="transforms"){var f=n.slice();f.push(s);var c=t[s],u=e[s],v=Zz(r,s),h=(v||{}).valType,d=h==="info_array",p=h==="colorscale",m=(v||{}).items;if(!qz(r,s))a.push(qt("schema",i,f));else if(Zr(c)&&Zr(u)&&h!=="any")Il(c,u,v,a,i,f);else if(d&&Ai(c)){c.length>u.length&&a.push(qt("unused",i,f.concat(u.length)));var y=u.length,b=Array.isArray(m);b&&(y=Math.min(y,m.length));var w,g,x,_,k;if(v.dimensions===2)for(g=0;g<y;g++)if(Ai(c[g])){c[g].length>u[g].length&&a.push(qt("unused",i,f.concat(g,u[g].length)));var T=u[g].length;for(w=0;w<(b?Math.min(T,m[g].length):T);w++)x=b?m[g][w]:m,_=c[g][w],k=u[g][w],ia.validate(_,x)?k!==_&&k!==+_&&a.push(qt("dynamic",i,f.concat(g,w),_,k)):a.push(qt("value",i,f.concat(g,w),_))}else a.push(qt("array",i,f.concat(g),c[g]));else for(g=0;g<y;g++)x=b?m[g]:m,_=c[g],k=u[g],ia.validate(_,x)?k!==_&&k!==+_&&a.push(qt("dynamic",i,f.concat(g),_,k)):a.push(qt("value",i,f.concat(g),_))}else if(v.items&&!d&&Ai(c)){var S=m[Object.keys(m)[0]],D=[],L,R;for(L=0;L<u.length;L++){var z=u[L]._index||L;if(R=f.slice(),R.push(z),Zr(c[z])&&Zr(u[L])){D.push(z);var N=c[z],H=u[L];Zr(N)&&N.visible!==!1&&H.visible===!1?a.push(qt("invisible",i,R)):Il(N,H,S,a,i,R)}}for(L=0;L<c.length;L++)R=f.slice(),R.push(L),Zr(c[L])?D.indexOf(L)===-1&&a.push(qt("unused",i,R)):a.push(qt("object",i,R,c[L]))}else!Zr(c)&&Zr(u)?a.push(qt("object",i,f,c)):!H0(c)&&H0(u)&&!d&&!p?a.push(qt("array",i,f,c)):s in e?ia.validate(c,v)?v.valType==="enumerated"&&(v.coerceNumber&&c!==+u||c!==u)&&a.push(qt("dynamic",i,f,c,u)):a.push(qt("value",i,f,c)):a.push(qt("unused",i,f,c))}}return a}function Yz(t,e){for(var r=t.layout.layoutAttributes,a=0;a<e.length;a++){var i=e[a],n=t.traces[i.type],o=n.layoutAttributes;o&&(i.subplot?ia.extendFlat(r[n.attributes.subplot.dflt],o):ia.extendFlat(r,o))}return r}var Wz={object:function(t,e){var r;return t==="layout"&&e===""?r="The layout argument":t[0]==="data"&&e===""?r="Trace "+t[1]+" in the data argument":r=Yi(t)+"key "+e,r+" must be linked to an object container"},array:function(t,e){var r;return t==="data"?r="The data argument":r=Yi(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Yi(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=Zr(r)?"container":"key";return Yi(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Yi(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Yi(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Yi(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Yi(t){return Ai(t)?"In data trace "+t[1]+", ":"In "+t+", "}function qt(t,e,r,a,i){r=r||"";var n,o;Ai(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=Qz(r),s=Wz[t](e,l,a,i);return ia.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function qz(t,e){var r=z2(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function Zz(t,e){if(e in t)return t[e];var r=z2(e);return t[r.keyMinusId]}var Kz=ia.counterRegex("([a-z]+)");function z2(t){var e=t.match(Kz);return{keyMinusId:e&&e[1],id:e&&e[2]}}function Qz(t){if(!Ai(t))return String(t);for(var e="",r=0;r<t.length;r++){var a=t[r];typeof a=="number"?e=e.substr(0,e.length-1)+"["+a+"]":e+=a,r<t.length-1&&(e+=".")}return e}var O0=me,ml=kr;function Jz(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(O0.isIE())return s=ml.createBlob(t,"svg"),window.navigator.msSaveBlob(s,e),s=null,o(e);if(i)return s=ml.createBlob(t,r),f=ml.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),ml.revokeObjectURL(f),s=null,o(e);if(O0.isSafari()){var c=r==="svg"?",":";base64,";return ml.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var eI=Jz,kv=me,tI=R2,rI=eI,aI=kr;function iI(t,e){var r;return kv.isPlainObject(t)||(r=kv.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),kv.isIE()&&e.format!=="svg"&&i(new Error(aI.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=tI(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),rI(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var I2=iI,Kp={},$r=me,Nr=$r.isPlainObject,F2=Vo,$2=Qt,nI=oa,N2=Lt,H2=jo.dfltConfig;Kp.makeTemplate=function(t){t=$r.isPlainObject(t)?t:$r.getGraphDiv(t),t=$r.extendDeep({_context:H2},{data:t.data,layout:t.layout}),$2.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach(function(h){var d={};Fl(h,d,lI.bind(null,h));var p=$r.coerce(h,{},nI,"type"),m=a.data[p];m||(m=a.data[p]=[]),m.push(d)}),Fl(r,a.layout,oI.bind(null,r)),delete a.layout.template;var i=r.template;if(Nr(i)){var n=i.layout,o,l,s,f,c,u;Nr(n)&&hc(n,a.layout);var v=i.data;if(Nr(v)){for(l in a.data)if(s=v[l],Array.isArray(s)){for(c=a.data[l],u=c.length,f=s.length,o=0;o<u;o++)hc(s[o%f],c[o]);for(o=u;o<f;o++)c.push($r.extendDeep({},s[o]))}for(l in v)l in a.data||(a.data[l]=$r.extendDeep([],v[l]))}}return a};function hc(t,e){t=$r.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,u,v){if(Nr(u)&&Nr(c))hc(c,u);else if(Array.isArray(u)&&Array.isArray(c)){var h=N2.arrayTemplater({_template:t},v);for(i=0;i<u.length;i++){var d=u[i],p=h.newItem(d)._template;p&&hc(p,d)}var m=h.defaultItems();for(i=0;i<m.length;i++)u.push(m[i]._template);for(i=0;i<u.length;i++)delete u[i].templateitemname}}for(a=0;a<r.length;a++){var o=r[a],l=t[o];if(o in e?n(l,e[o],o):e[o]=l,pc(o)===o)for(var s in e){var f=pc(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function pc(t){return t.replace(/[0-9]+$/,"")}function Fl(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=Kr(t,o,a),f=Kr(t,o,i),c=r(f);if(!c){var u=pc(o);u!==o&&(f=Kr(t,u,i),c=r(f))}if(!(n&&n===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(l)))if(!c.valType&&Nr(l))Fl(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var v=!1,h=0,d={},p=0;p<l.length;p++){var m=l[p];if(Nr(m)){var y=m.name;if(y)d[y]||(Fl(m,e,r,Kr(l,h,s),Kr(l,h,f)),h++,d[y]=1);else if(!v){var b=N2.arrayDefaultKey(o),w=Kr(t,b,a),g=Kr(l,h,s);Fl(m,e,r,g,Kr(l,h,f));var x=$r.nestedProperty(e,g),_=$r.nestedProperty(e,w);_.set(x.get()),x.set(null),v=!0}}}else{var k=$r.nestedProperty(e,s);k.set(l)}}}function oI(t,e){return F2.getLayoutValObject(t,$r.nestedProperty({},e).parts)}function lI(t,e){return F2.getTraceValObject(t,$r.nestedProperty({},e).parts)}function Kr(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Kp.validateTemplate=function(t,e){var r=$r.extendDeep({},{_context:H2,data:t.data,layout:t.layout}),a=r.layout||{};Nr(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,$2.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(w,g){for(var x in w)if(x.charAt(0)!=="_"&&Nr(w[x])){var _=pc(x),k=[],T;for(T=0;T<g.length;T++)k.push(Kr(w,x,g[T])),_!==x&&k.push(Kr(w,_,g[T]));for(T=0;T<k.length;T++)f[k[T]]=1;c(w[x],k)}}function u(w,g){for(var x in w)if(x.indexOf("defaults")===-1&&Nr(w[x])){var _=Kr(w,x,g);f[_]?u(w[x],_):o.push({code:"unused",path:_})}}if(Nr(i)?(c(l,["layout"]),u(i,"layout")):o.push({code:"layout"}),!Nr(n))o.push({code:"data"});else{for(var v={},h,d=0;d<s.length;d++){var p=s[d];h=p.type,v[h]=(v[h]||0)+1,p._fullInput._template||o.push({code:"missing",index:p._fullInput.index,traceType:h})}for(h in n){var m=n[h].length,y=v[h]||0;m>y?o.push({code:"unused",traceType:h,templateCount:m,dataCount:y}):y>m&&o.push({code:"reused",traceType:h,templateCount:m,dataCount:y})}}function b(w,g){for(var x in w)if(x.charAt(0)!=="_"){var _=w[x],k=Kr(w,x,g);Nr(_)?(Array.isArray(w)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:k,templateitemname:_.templateitemname}),b(_,k)):Array.isArray(_)&&sI(_)&&b(_,k)}}if(b({data:s,layout:l},""),o.length)return o.map(fI)};function sI(t){for(var e=0;e<t.length;e++)if(Nr(t[e]))return!0}function fI(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":t.path?e="There are no templates for item "+t.path+" with name "+t.templateitemname:e="There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":t.path?e="The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?e="Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":e="The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type.";break}return t.msg=e,t}var rr=tp;It._doPlot=rr._doPlot;It.newPlot=rr.newPlot;It.restyle=rr.restyle;It.relayout=rr.relayout;It.redraw=rr.redraw;It.update=rr.update;It._guiRestyle=rr._guiRestyle;It._guiRelayout=rr._guiRelayout;It._guiUpdate=rr._guiUpdate;It._storeDirectGUIEdit=rr._storeDirectGUIEdit;It.react=rr.react;It.extendTraces=rr.extendTraces;It.prependTraces=rr.prependTraces;It.addTraces=rr.addTraces;It.deleteTraces=rr.deleteTraces;It.moveTraces=rr.moveTraces;It.purge=rr.purge;It.addFrames=rr.addFrames;It.deleteFrames=rr.deleteFrames;It.animate=rr.animate;It.setPlotConfig=rr.setPlotConfig;var cI=$c.getGraphDiv,uI=Rp.eraseActiveShape;It.deleteActiveShape=function(t){return uI(cI(t))};It.toImage=R2;It.validate=Xz;It.downloadImage=I2;var O2=Kp;It.makeTemplate=O2.makeTemplate;It.validateTemplate=O2.validateTemplate;var Av=me,vI=Je,Qp=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=vI.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=Av.minRowLength(n);o?l=Math.min(f,Av.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=Av.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},j0=me.dateTick0,dI=Yt,hI=dI.ONEWEEK;function B0(t,e){return t%hI===0?j0(e,1):j0(e,0)}var du=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",B0(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",B0(l,r.ycalendar)),i("yperiodalignment"))}},G0=["orientation","groupnorm","stackgaps"],pI=function(e,r,a,i){var n=a._scatterStackOpts,o=i("stackgroup");if(o){var l=r.xaxis+r.yaxis,s=n[l];s||(s=n[l]={});var f=s[o],c=!1;f?f.traces.push(r):(f=s[o]={traceIndices:[],traces:[r]},c=!0);for(var u={orientation:r.x&&!r.y?"h":"v"},v=0;v<G0.length;v++){var h=G0[v],d=h+"Found";if(!f[d]){var p=e[h]!==void 0,m=h==="orientation";if((p||c)&&(f[h]=i(h,u[h]),m&&(f.fillDflt=f[h]==="h"?"tonextx":"tonexty"),p&&(f[d]=!0,!c&&(delete f.traces[0][h],m))))for(var y=0;y<f.traces.length-1;y++){var b=f.traces[y];b._input.fill!==b.fill&&(b.fill=f.fillDflt)}}}return f}},U0=ot,V0=ka.hasColorscale,X0=ps,mI=_r,j2=function(e,r,a,i,n,o){var l=mI.isBubble(e),s=(e.line||{}).color,f;if(o=o||{},s&&(a=s),n("marker.symbol"),n("marker.opacity",l?.7:1),n("marker.size"),o.noAngle||(n("marker.angle"),o.noAngleRef||n("marker.angleref"),o.noStandOff||n("marker.standoff")),n("marker.color",a),V0(e,"marker")&&X0(e,r,i,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&r.marker.color!==s?f=s:l?f=U0.background:f=U0.defaultLine,n("marker.line.color",f),V0(e,"marker.line")&&X0(e,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",l?1:0)),l&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var c=n("marker.gradient.type");c!=="none"&&n("marker.gradient.color")}},yI=me.isArrayOrTypedArray,gI=ka.hasColorscale,bI=ps,B2=function(e,r,a,i,n,o){o||(o={});var l=(e.marker||{}).color;if(l&&l._inputArray&&(l=l._inputArray),n("line.color",a),gI(e,"line"))bI(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(yI(l)?!1:l)||a;n("line.color",s)}n("line.width"),o.noDash||n("line.dash"),o.backoff&&n("line.backoff")},xI=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},_I=me,G2=function(t,e,r,a,i){i=i||{},a("textposition"),_I.coerceFont(a,"textfont",i.font||r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},wI=ot,Y0=me.isArrayOrTypedArray,U2=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!Y0(o)?n=o:l&&!Y0(l)&&(n=l)}i("fillcolor",wI.addOpacity((r.line||{}).color||n||a,.5))},W0=me,TI=Je,kI=$i,AI=uu,Bn=_r,MI=Qp,SI=du,LI=pI,CI=j2,DI=B2,q0=xI,PI=G2,EI=U2,RI=me.coercePattern,zI=function(e,r,a,i){function n(h,d){return W0.coerce(e,r,kI,h,d)}var o=MI(e,r,i,n);if(o||(r.visible=!1),!!r.visible){SI(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=LI(e,r,i,n);i.scattermode==="group"&&r.orientation===void 0&&n("orientation","v");var s=!l&&o<AI.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),Bn.hasMarkers(r)&&CI(e,r,a,i,n,{gradient:!0}),Bn.hasLines(r)&&(DI(e,r,a,i,n,{backoff:!0}),q0(e,r,n),n("connectgaps"),n("line.simplify")),Bn.hasText(r)&&(n("texttemplate"),PI(e,r,i,n));var f=[];(Bn.hasMarkers(r)||Bn.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(EI(e,r,a,n),Bn.hasLines(r)||q0(e,r,n),RI(n,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,u=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),n("hoveron",f.join("+")||"points"),r.hoveron!=="fills"&&n("hovertemplate");var v=TI.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),W0.coerceSelectionMarkerOpacity(r,n)}},II=ti.getAxisGroup,Jp=function(e,r,a,i){var n=r.orientation,o=r[{v:"x",h:"y"}[n]+"axis"],l=II(a,o)+n,s=a._alignmentOpts||{},f=i("alignmentgroup"),c=s[l];c||(c=s[l]={});var u=c[f];u?u.traces.push(r):u=c[f]={traces:[r],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var v=i("offsetgroup"),h=u.offsetGroups,d=h[v];v&&(d||(d=h[v]={offsetIndex:Object.keys(h).length}),r._offsetIndex=d.offsetIndex)},FI=me,$I=Jp,NI=$i,V2=function(e,r){var a,i,n;function o(u){return FI.coerce(i._input,i,NI,u)}if(r.scattermode==="group")for(n=0;n<e.length;n++)i=e[n],i.type==="scatter"&&(a=i._input,$I(a,i,r,o));for(n=0;n<e.length;n++){var l=e[n];if(l.type==="scatter"){var s=l.fill;if(!(s==="none"||s==="toself")&&(l.opacity=void 0,s==="tonexty"||s==="tonextx"))for(var f=n-1;f>=0;f--){var c=e[f];if(c.type==="scatter"&&c.xaxis===l.xaxis&&c.yaxis===l.yaxis){c.opacity=void 0;break}}}}},HI=me,OI=rp,jI=function(t,e){function r(i,n){return HI.coerce(t,e,OI,i,n)}var a=e.barmode==="group";e.scattermode==="group"&&r("scattergap",a?e.bargap:.2)},BI=dt,X2=me,GI=X2.dateTime2ms,cf=X2.incrementMonth,UI=Yt,VI=UI.ONEAVGMONTH,hu=function(e,r,a,i){if(r.type!=="date")return{vals:i};var n=e[a+"periodalignment"];if(!n)return{vals:i};var o=e[a+"period"],l;if(BI(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:i}}for(var f=r.calendar,c=n==="start",u=n==="end",v=e[a+"period0"],h=GI(v,f)||0,d=[],p=[],m=[],y=i.length,b=0;b<y;b++){var w=i[b],g,x,_;if(l){for(g=Math.round((w-h)/(l*VI)),_=cf(h,l*g,f);_>w;)_=cf(_,-l,f);for(;_<=w;)_=cf(_,l,f);x=cf(_,-l,f)}else{for(g=Math.round((w-h)/o),_=h+g*o;_>w;)_-=o;for(;_<=w;)_+=o;x=_-o}d[b]=c?x:u?_:(x+_)/2,p[b]=x,m[b]=_}return{vals:d,starts:p,ends:m}},Mv=ka.hasColorscale,Sv=op,Z0=_r,Y2=function(e,r){Z0.hasLines(r)&&Mv(r,"line")&&Sv(e,r,{vals:r.line.color,containerStr:"line"}),Z0.hasMarkers(r)&&(Mv(r,"marker")&&Sv(e,r,{vals:r.marker.color,containerStr:"marker"}),Mv(r,"marker.line")&&Sv(e,r,{vals:r.marker.line.color,containerStr:"marker.line"}))},cr=me,W2=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;cr.mergeArray(r.text,e,"tx"),cr.mergeArray(r.texttemplate,e,"txt"),cr.mergeArray(r.hovertext,e,"htx"),cr.mergeArray(r.customdata,e,"data"),cr.mergeArray(r.textposition,e,"tp"),r.textfont&&(cr.mergeArrayCastPositive(r.textfont.size,e,"ts"),cr.mergeArray(r.textfont.color,e,"tc"),cr.mergeArray(r.textfont.family,e,"tf"));var i=r.marker;if(i){cr.mergeArrayCastPositive(i.size,e,"ms"),cr.mergeArrayCastPositive(i.opacity,e,"mo"),cr.mergeArray(i.symbol,e,"mx"),cr.mergeArray(i.angle,e,"ma"),cr.mergeArray(i.standoff,e,"mf"),cr.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(cr.mergeArray(n.color,e,"mlc"),cr.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(cr.mergeArray(o.type,e,"mgt"),cr.mergeArray(o.color,e,"mgc"))}},K0=me,q2=function(e,r){K0.isArrayOrTypedArray(r.selectedpoints)&&K0.tagSelected(e,r)},Q0=dt,vh=me,es=Dt,J0=hu,Lv=Yt.BADNUM,dh=_r,XI=Y2,YI=W2,WI=q2;function qI(t,e){var r=t._fullLayout,a=e._xA=es.getFromId(t,e.xaxis||"x","x"),i=e._yA=es.getFromId(t,e.yaxis||"y","y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=J0(e,a,"x",n),s=J0(e,i,"y",o),f=l.vals,c=s.vals,u=e._length,v=new Array(u),h=e.ids,d=em(e,r,a,i),p=!1,m,y,b,w,g,x;Q2(r,e);var _="x",k="y",T;if(d)vh.pushUnique(d.traceIndices,e._expandedIndex),m=d.orientation==="v",m?(k="s",T="x"):(_="s",T="y"),g=d.stackgaps==="interpolate";else{var S=K2(e,u);Z2(t,e,a,i,f,c,S)}var D=!!e.xperiodalignment,L=!!e.yperiodalignment;for(y=0;y<u;y++){var R=v[y]={},z=Q0(f[y]),N=Q0(c[y]);z&&N?(R[_]=f[y],R[k]=c[y],D&&(R.orig_x=n[y],R.xEnd=l.ends[y],R.xStart=l.starts[y]),L&&(R.orig_y=o[y],R.yEnd=s.ends[y],R.yStart=s.starts[y])):d&&(m?z:N)?(R[T]=m?f[y]:c[y],R.gap=!0,g?(R.s=Lv,p=!0):R.s=0):R[_]=R[k]=Lv,h&&(R.id=String(h[y]))}if(YI(v,e),XI(t,e),WI(v,e),d){for(y=0;y<v.length;)v[y][T]===Lv?v.splice(y,1):y++;if(vh.sort(v,function(A,M){return A[T]-M[T]||A.i-M.i}),p){for(y=0;y<v.length-1&&v[y].gap;)y++;for(x=v[y].s,x||(x=v[y].s=0),b=0;b<y;b++)v[b].s=x;for(w=v.length-1;w>y&&v[w].gap;)w--;for(x=v[w].s,b=v.length-1;b>w;b--)v[b].s=x;for(;y<w;)if(y++,v[y].gap){for(b=y+1;v[b].gap;)b++;for(var H=v[y-1][T],$=v[y-1].s,P=(v[b].s-$)/(v[b][T]-H);y<b;)v[y].s=$+(v[y][T]-H)*P,y++}}}return v}function Z2(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,u=s._firstScatter[J2(e)]===e.uid,v=(em(e,s,r,a)||{}).orientation,h=e.fill;r._minDtick=0,a._minDtick=0;var d={padded:!0},p={padded:!0};o&&(d.ppad=p.ppad=o);var m=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];m&&(h==="tozerox"||h==="tonextx"&&(u||v==="h"))?d.tozero=!0:!(e.error_y||{}).visible&&(h==="tonexty"||h==="tozeroy"||!dh.hasMarkers(e)&&!dh.hasText(e))&&(d.padded=!1,d.ppad=0),m&&(h==="tozeroy"||h==="tonexty"&&(u||v==="v"))?p.tozero=!0:(h==="tonextx"||h==="tozerox")&&(p.padded=!1),f&&(e._extremes[f]=es.findExtremes(r,i,d)),c&&(e._extremes[c]=es.findExtremes(a,n,p))}function K2(t,e){if(dh.hasMarkers(t)){var r=t.marker,a=1.6*(t.marker.sizeref||1),i;if(t.marker.sizemode==="area"?i=function(f){return Math.max(Math.sqrt((f||0)/a),3)}:i=function(f){return Math.max((f||0)/a,3)},vh.isArrayOrTypedArray(r.size)){var n={type:"linear"};es.setConvert(n);for(var o=n.makeCalcdata(t.marker,"size"),l=new Array(e),s=0;s<e;s++)l[s]=i(o[s]);return l}else return i(r.size)}}function Q2(t,e){var r=J2(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function J2(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function em(t,e,r,a){var i=t.stackgroup;if(i){var n=e._scatterStackOpts[r._id+a._id][i],o=n.orientation==="v"?a:r;if(o.type==="linear"||o.type==="log")return n}}var tm={calc:qI,calcMarkerSize:K2,calcAxisExpansion:Z2,setFirstScatter:Q2,getStackOpts:em},ZI=pu,KI=me.distinctVals;function pu(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,a=e.posAxis._id.charAt(0),i=[],n=0;n<t.length;n++){for(var o=t[n],l=0;l<o.length;l++){var s=o[l],f=s.p;f===void 0&&(f=s[a]),f!==void 0&&i.push(f)}o[0]&&o[0].width1&&(r=Math.min(o[0].width1,r))}this.positions=i;var c=KI(i);this.distinctPositions=c.vals,c.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var u=(e.posAxis||{}).type;(u==="category"||u==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}pu.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};pu.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};pu.prototype.getLabel=function(e,r){var a=r<0&&this.sepNegVal?"v":"^",i=this.overlapNoMerge?e:Math.round(e/this.binWidth);return a+i};var na=dt,Si=me.isArrayOrTypedArray,Po=Yt.BADNUM,QI=Je,ts=Dt,JI=ti.getAxisGroup,mu=ZI;function eF(t,e){for(var r=e.xaxis,a=e.yaxis,i=t._fullLayout,n=t._fullData,o=t.calcdata,l=[],s=[],f=0;f<n.length;f++){var c=n[f];if(c.visible===!0&&QI.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):s.push(o[f]),c._computePh))for(var u=t.calcdata[f],v=0;v<u.length;v++)typeof u[v].ph0=="function"&&(u[v].ph0=u[v].ph0()),typeof u[v].ph1=="function"&&(u[v].ph1=u[v].ph1())}var h={xCat:r.type==="category"||r.type==="multicategory",yCat:a.type==="category"||a.type==="multicategory",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};hh(t,r,a,s,h),hh(t,a,r,l,h)}function hh(t,e,r,a,i){if(a.length){var n,o,l,s,f;switch(aF(r,a),i.mode){case"overlay":Cv(e,r,a,i);break;case"group":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.offset===void 0?o.push(s):n.push(s);o.length&&iF(t,e,r,o,i),n.length&&Cv(e,r,n,i);break;case"stack":case"relative":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.base===void 0?o.push(s):n.push(s);rF(o),o.length&&nF(t,e,r,o,i),n.length&&Cv(e,r,n,i);break}tF(a),cF(a,e)}}function tF(t){var e,r,a,i,n,o,l;for(e=0;e<t.length;e++)r=t[e],a=r[0].trace,i=r[0].t,i.cornerradiusvalue===void 0&&(n=a.marker?a.marker.cornerradius:void 0,n!==void 0&&(o=na(n)?+n:+n.slice(0,-1),l=na(n)?"px":"%",i.cornerradiusvalue=o,i.cornerradiusform=l))}function rF(t){if(!(t.length<2)){var e,r,a,i,n,o,l;for(e=0;e<t.length&&(r=t[e],a=r[0].trace,n=a.marker?a.marker.cornerradius:void 0,n===void 0);e++);if(n!==void 0)for(o=na(n)?+n:+n.slice(0,-1),l=na(n)?"px":"%",e=0;e<t.length;e++)r=t[e],i=r[0].t,i.cornerradiusvalue=o,i.cornerradiusform=l}}function aF(t,e){var r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0].trace,o=n.type==="funnel"?n._base:n.base,l,s=n.orientation==="h"?n.xcalendar:n.ycalendar,f=t.type==="category"||t.type==="multicategory"?function(){return null}:t.d2c;if(Si(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),na(l)?(i[a].b=+l,i[a].hasB=1):i[a].b=0;for(;a<i.length;a++)i[a].b=0}else{l=f(o,0,s);var c=na(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function Cv(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new mu([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});ek(t,o,a),a.norm?(nk(o),rm(e,o,a)):ik(e,o)}}function iF(t,e,r,a,i){var n=new mu(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});oF(t,e,n,i),sF(n,e),i.norm?(nk(n),rm(r,n,i)):ik(r,n)}function nF(t,e,r,a,i){var n=new mu(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});ek(e,n,i),lF(r,n,i);for(var o=0;o<a.length;o++)for(var l=a[o],s=0;s<l.length;s++){var f=l[s];if(f.s!==Po){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&rm(r,n,i)}function ek(t,e,r){for(var a=e.minDiff,i=e.traces,n=a*(1-r.gap),o=n,l=o*(1-(r.groupgap||0)),s=-l/2,f=0;f<i.length;f++){var c=i[f],u=c[0].t;u.barwidth=l,u.poffset=s,u.bargroupwidth=n,u.bardelta=a}e.binWidth=i[0][0].t.barwidth/100,tk(e),rk(t,e),ak(t,e)}function oF(t,e,r,a){for(var i=t._fullLayout,n=r.positions,o=r.distinctPositions,l=r.minDiff,s=r.traces,f=s.length,c=n.length!==o.length,u=l*(1-a.gap),v=JI(i,e._id)+s[0][0].trace.orientation,h=i._alignmentOpts[v]||{},d=0;d<f;d++){var p=s[d],m=p[0].trace,y=h[m.alignmentgroup]||{},b=Object.keys(y.offsetGroups||{}).length,w;b?w=u/b:w=c?u/f:u;var g=w*(1-(a.groupgap||0)),x;b?x=((2*m._offsetIndex+1-b)*w-g)/2:x=c?((2*d+1-f)*w-g)/2:-g/2;var _=p[0].t;_.barwidth=g,_.poffset=x,_.bargroupwidth=u,_.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,tk(r),rk(e,r),ak(e,r,c)}function tk(t){var e=t.traces,r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0],o=n.trace,l=n.t,s=o._offset||o.offset,f=l.poffset,c;if(Si(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)na(c[a])||(c[a]=f);for(a=c.length;a<i.length;a++)c.push(f);l.poffset=c}else s!==void 0&&(l.poffset=s);var u=o._width||o.width,v=l.barwidth;if(Si(u)){var h=Array.prototype.slice.call(u,0,i.length);for(a=0;a<h.length;a++)na(h[a])||(h[a]=v);for(a=h.length;a<i.length;a++)h.push(v);if(l.barwidth=h,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(v-h[a])/2);l.poffset=c}}else u!==void 0&&(l.barwidth=u,s===void 0&&(l.poffset=f+(v-u)/2))}}function rk(t,e){for(var r=e.traces,a=qo(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Si(l),f=o.barwidth,c=Si(f),u=0;u<n.length;u++){var v=n[u],h=v.w=c?f[u]:f;v.p===void 0&&(v.p=v[a],v["orig_"+a]=v[a]);var d=(s?l[u]:l)+h/2;v[a]=v.p+d}}function ak(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;ts.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<a.length;o++){var l=a[o],s=l[0],f=s.trace,c=[],u,v,h,d;for(d=0;d<l.length;d++)u=l[d],v=u.p-n,h=u.p+n,c.push(v,h);if(f.width||f.offset){var p=s.t,m=p.poffset,y=p.barwidth,b=Si(m),w=Si(y);for(d=0;d<l.length;d++){u=l[d];var g=b?m[d]:m,x=w?y[d]:y;v=u.p+g,h=v+x,c.push(v,h)}}f._extremes[t._id]=ts.findExtremes(t,c,{padded:!1})}}function ik(t,e){for(var r=e.traces,a=qo(t),i=0;i<r.length;i++){for(var n=r[i],o=n[0].trace,l=o.type==="scatter",s=o.orientation==="v",f=[],c=!1,u=0;u<n.length;u++){var v=n[u],h=l?0:v.b,d=l?s?v.y:v.x:h+v.s;v[a]=d,f.push(d),v.hasB&&f.push(h),(!v.hasB||!v.b)&&(c=!0)}o._extremes[t._id]=ts.findExtremes(t,f,{tozero:c,padded:!0})}}function lF(t,e,r){var a=qo(t),i=e.traces,n,o,l,s,f,c;for(s=0;s<i.length;s++)if(n=i[s],o=n[0].trace,o.type==="funnel")for(f=0;f<n.length;f++)c=n[f],c.s!==Po&&e.put(c.p,-.5*c.s);for(s=0;s<i.length;s++){n=i[s],o=n[0].trace,l=o.type==="funnel";var u=[];for(f=0;f<n.length;f++)if(c=n[f],c.s!==Po){var v;l?v=c.s:v=c.s+c.b;var h=e.put(c.p,v),d=h+v;c.b=h,c[a]=d,r.norm||(u.push(d),c.hasB&&u.push(h))}r.norm||(o._extremes[t._id]=ts.findExtremes(t,u,{tozero:!0,padded:!0}))}}function nk(t){for(var e=t.traces,r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];n.s!==Po&&t.put(n.p,n.b+n.s)}}function sF(t,e){for(var r=t.traces,a=0;a<r.length;a++){var i=r[a],n=i[0].trace;if(n.base===void 0)for(var o=new mu([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==Po){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function rm(t,e,r){var a=e.traces,i=qo(t),n=r.norm==="fraction"?1:100,o=n/1e9,l=t.l2c(t.c2l(0)),s=r.mode==="stack"?n:l;function f(x){return na(t.c2l(x))&&(x<l-o||x>s+o||!na(l))}for(var c=0;c<a.length;c++){for(var u=a[c],v=u[0].trace,h=[],d=!1,p=!1,m=0;m<u.length;m++){var y=u[m];if(y.s!==Po){var b=Math.abs(n/e.get(y.p,y.s));y.b*=b,y.s*=b;var w=y.b,g=w+y.s;y[i]=g,h.push(g),p=p||f(g),y.hasB&&(h.push(w),p=p||f(w)),(!y.hasB||!y.b)&&(d=!0)}}v._extremes[t._id]=ts.findExtremes(t,h,{tozero:d,padded:p})}}function fF(t,e,r,a){for(var i=qo(a),n=0;n<t.length;n++)for(var o=t[n],l=0;l<o.length;l++){var s=o[l],f=s[i];s._sMin=e[f],s._sMax=r[f]}}function cF(t,e){var r=qo(e),a={},i,n,o,l=1/0,s=-1/0;for(i=0;i<t.length;i++)for(o=t[i],n=0;n<o.length;n++){var f=o[n].p;na(f)&&(l=Math.min(l,f),s=Math.max(s,f))}var c=1e4/(s-l),u=a.round=function(T){return String(Math.round(c*(T-l)))},v={},h={},d=t.some(function(T){var S=T[0].trace;return"marker"in S&&S.marker.cornerradius});for(i=0;i<t.length;i++){o=t[i],o[0].t.extents=a;var p=o[0].t.poffset,m=Si(p);for(n=0;n<o.length;n++){var y=o[n],b=y[r]-y.w/2;if(na(b)){var w=y[r]+y.w/2,g=u(y.p);a[g]?a[g]=[Math.min(b,a[g][0]),Math.max(w,a[g][1])]:a[g]=[b,w]}if(y.p0=y.p+(m?p[n]:p),y.p1=y.p0+y.w,y.s0=y.b,y.s1=y.s0+y.s,d){var x=Math.min(y.s0,y.s1)||0,_=Math.max(y.s0,y.s1)||0,k=y[r];v[k]=k in v?Math.min(v[k],x):x,h[k]=k in h?Math.max(h[k],_):_}}}d&&fF(t,v,h,e)}function qo(t){return t._id.charAt(0)}var am={crossTraceCalc:eF,setGroupPositions:hh},eb=tm,tb=am.setGroupPositions;function uF(t,e){for(var r=e.xaxis,a=e.yaxis,i=t._fullLayout,n=t._fullData,o=t.calcdata,l=[],s=[],f=0;f<n.length;f++){var c=n[f];c.visible===!0&&c.type==="scatter"&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):c.orientation==="v"&&s.push(o[f]))}var u={mode:i.scattermode,gap:i.scattergap};tb(t,r,a,s,u),tb(t,a,r,l,u)}var vF=function(e,r){e._fullLayout.scattermode==="group"&&uF(e,r);var a=r.xaxis,i=r.yaxis,n=a._id+i._id,o=e._fullLayout._scatterStackOpts[n];if(o){var l=e.calcdata,s,f,c,u,v,h,d,p,m,y,b,w,g,x,_;for(var k in o){y=o[k];var T=y.traceIndices;if(T.length){for(b=y.stackgaps==="interpolate",w=y.groupnorm,y.orientation==="v"?(g="x",x="y"):(g="y",x="x"),_=new Array(T.length),s=0;s<_.length;s++)_[s]=!1;h=l[T[0]];var S=new Array(h.length);for(s=0;s<h.length;s++)S[s]=h[s][g];for(s=1;s<T.length;s++){for(v=l[T[s]],f=c=0;f<v.length;f++){for(d=v[f][g];d>S[c]&&c<S.length;c++)Dv(v,f,S[c],s,_,b,g),f++;if(d!==S[c]){for(u=0;u<s;u++)Dv(l[T[u]],c,d,u,_,b,g);S.splice(c,0,d)}c++}for(;c<S.length;c++)Dv(v,f,S[c],s,_,b,g),f++}var D=S.length;for(f=0;f<h.length;f++){for(p=h[f][x]=h[f].s,s=1;s<T.length;s++)v=l[T[s]],v[0].trace._rawLength=v[0].trace._length,v[0].trace._length=D,p+=v[f].s,v[f][x]=p;if(w)for(m=(w==="fraction"?p:p/100)||1,s=0;s<T.length;s++){var L=l[T[s]][f];L[x]/=m,L.sNorm=L.s/m}}for(s=0;s<T.length;s++){v=l[T[s]];var R=v[0].trace,z=eb.calcMarkerSize(R,R._rawLength),N=Array.isArray(z);if(z&&_[s]||N){var H=z;for(z=new Array(D),f=0;f<D;f++)z[f]=v[f].gap?0:N?H[v[f].i]:H}var $=new Array(D),P=new Array(D);for(f=0;f<D;f++)$[f]=v[f].x,P[f]=v[f].y;eb.calcAxisExpansion(e,R,a,i,$,P,z),v[0].t.orientation=y.orientation}}}}};function Dv(t,e,r,a,i,n,o){i[a]=!0;var l={i:null,gap:!0,s:0};if(l[o]=r,t.splice(e,0,l),e&&r===t[e-1][o]){var s=t[e-1];l.s=s.s,l.i=s.i,l.gap=s.gap}else n&&(l.s=dF(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}function dF(t,e,r,a){var i=t[e-1],n=t[e+1];return n?i?i.s+(n.s-i.s)*(r-i[a])/(n[a]-i[a]):n.s:i.s}var hF=xt,ok=Yt,yl=ok.BADNUM,lk=ok.LOG_CLIP,rb=lk+.5,ab=lk-.5,mc=me,pF=mc.segmentsIntersect,ib=mc.constrain,Pv=uu,mF=function(e,r){var a=r.trace||{},i=r.xaxis,n=r.yaxis,o=i.type==="log",l=n.type==="log",s=i._length,f=n._length,c=r.backoff,u=a.marker,v=r.connectGaps,h=r.baseTolerance,d=r.shape,p=d==="linear",m=a.fill&&a.fill!=="none",y=[],b=Pv.minTolerance,w=e.length,g=new Array(w),x=0,_,k,T,S,D,L,R,z,N,H,$,P,A,M,C,E;function F(ve){var Be=e[ve];if(!Be)return!1;var Ne=r.linearized?i.l2p(Be.x):i.c2p(Be.x),We=r.linearized?n.l2p(Be.y):n.c2p(Be.y);if(Ne===yl){if(o&&(Ne=i.c2p(Be.x,!0)),Ne===yl)return!1;l&&We===yl&&(Ne*=Math.abs(i._m*f*(i._m>0?rb:ab)/(n._m*s*(n._m>0?rb:ab)))),Ne*=1e3}if(We===yl){if(l&&(We=n.c2p(Be.y,!0)),We===yl)return!1;We*=1e3}return[Ne,We]}function j(ve,Be,Ne,We){var Ge=Ne-ve,Ve=We-Be,Ue=.5-ve,I=.5-Be,Y=Ge*Ge+Ve*Ve,U=Ge*Ue+Ve*I;if(U>0&&U<Y){var q=Ue*Ve-I*Ge;if(q*q<Y)return!0}}var B,G;function O(ve,Be){var Ne=ve[0]/s,We=ve[1]/f,Ge=Math.max(0,-Ne,Ne-1,-We,We-1);return Ge&&B!==void 0&&j(Ne,We,B,G)&&(Ge=0),Ge&&Be&&j(Ne,We,Be[0]/s,Be[1]/f)&&(Ge=0),(1+Pv.toleranceGrowth*Ge)*h}function W(ve,Be){var Ne=ve[0]-Be[0],We=ve[1]-Be[1];return Math.sqrt(Ne*Ne+We*We)}var V=Pv.maxScreensAway,Z=-s*V,X=s*(1+V),Q=-f*V,te=f*(1+V),xe=[[Z,Q,X,Q],[X,Q,X,te],[X,te,Z,te],[Z,te,Z,Q]],ue,ae,le,de,be,Te;function Le(ve,Be){for(var Ne=[],We=0,Ge=0;Ge<4;Ge++){var Ve=xe[Ge],Ue=pF(ve[0],ve[1],Be[0],Be[1],Ve[0],Ve[1],Ve[2],Ve[3]);Ue&&(!We||Math.abs(Ue.x-Ne[0][0])>1||Math.abs(Ue.y-Ne[0][1])>1)&&(Ue=[Ue.x,Ue.y],We&&W(Ue,ve)<W(Ne[0],ve)?Ne.unshift(Ue):Ne.push(Ue),We++)}return Ne}function _e(ve){if(ve[0]<Z||ve[0]>X||ve[1]<Q||ve[1]>te)return[ib(ve[0],Z,X),ib(ve[1],Q,te)]}function Ie(ve,Be){if(ve[0]===Be[0]&&(ve[0]===Z||ve[0]===X)||ve[1]===Be[1]&&(ve[1]===Q||ve[1]===te))return!0}function ce(ve,Be){var Ne=[],We=_e(ve),Ge=_e(Be);return We&&Ge&&Ie(We,Ge)||(We&&Ne.push(We),Ge&&Ne.push(Ge)),Ne}function ye(ve,Be,Ne){return function(We,Ge){var Ve=_e(We),Ue=_e(Ge),I=[];if(Ve&&Ue&&Ie(Ve,Ue))return I;Ve&&I.push(Ve),Ue&&I.push(Ue);var Y=2*mc.constrain((We[ve]+Ge[ve])/2,Be,Ne)-((Ve||We)[ve]+(Ue||Ge)[ve]);if(Y){var U;Ve&&Ue?U=Y>0==Ve[ve]>Ue[ve]?Ve:Ue:U=Ve||Ue,U[ve]+=Y}return I}}var Ee;d==="linear"||d==="spline"?Ee=Le:d==="hv"||d==="vh"?Ee=ce:d==="hvh"?Ee=ye(0,Z,X):d==="vhv"&&(Ee=ye(1,Q,te));function ze(ve,Be){var Ne=Be[0]-ve[0],We=(Be[1]-ve[1])/Ne,Ge=(ve[1]*Be[0]-Be[1]*ve[0])/Ne;return Ge>0?[We>0?Z:X,te]:[We>0?X:Z,Q]}function K(ve){var Be=ve[0],Ne=ve[1],We=Be===g[x-1][0],Ge=Ne===g[x-1][1];if(!(We&&Ge))if(x>1){var Ve=Be===g[x-2][0],Ue=Ne===g[x-2][1];We&&(Be===Z||Be===X)&&Ve?Ue?x--:g[x-1]=ve:Ge&&(Ne===Q||Ne===te)&&Ue?Ve?x--:g[x-1]=ve:g[x++]=ve}else g[x++]=ve}function ke(ve){g[x-1][0]!==ve[0]&&g[x-1][1]!==ve[1]&&K([le,de]),K(ve),be=null,le=de=0}var re=mc.isArrayOrTypedArray(u);function pe(ve){if(ve&&c&&(ve.i=_,ve.d=e,ve.trace=a,ve.marker=re?u[ve.i]:u,ve.backoff=c),B=ve[0]/s,G=ve[1]/f,ue=ve[0]<Z?Z:ve[0]>X?X:0,ae=ve[1]<Q?Q:ve[1]>te?te:0,ue||ae){if(!x)g[x++]=[ue||ve[0],ae||ve[1]];else if(be){var Be=Ee(be,ve);Be.length>1&&(ke(Be[0]),g[x++]=Be[1])}else Te=Ee(g[x-1],ve)[0],g[x++]=Te;var Ne=g[x-1];ue&&ae&&(Ne[0]!==ue||Ne[1]!==ae)?(be&&(le!==ue&&de!==ae?K(le&&de?ze(be,ve):[le||ue,de||ae]):le&&de&&K([le,de])),K([ue,ae])):le-ue&&de-ae&&K([ue||le,ae||de]),be=ve,le=ue,de=ae}else be&&ke(Ee(be,ve)[0]),g[x++]=ve}for(_=0;_<w;_++)if(k=F(_),!!k){for(x=0,be=null,pe(k),_++;_<w;_++){if(S=F(_),!S){if(v)continue;break}if(!p||!r.simplify){pe(S);continue}var we=F(_+1);if(H=W(S,k),!(!(m&&(x===0||x===w-1))&&H<O(S,we)*b)){for(z=[(S[0]-k[0])/H,(S[1]-k[1])/H],D=k,$=H,P=M=C=0,R=!1,T=S,_++;_<e.length;_++){if(L=we,we=F(_+1),!L){if(v)continue;break}if(N=[L[0]-k[0],L[1]-k[1]],E=N[0]*z[1]-N[1]*z[0],M=Math.min(M,E),C=Math.max(C,E),C-M>O(L,we))break;T=L,A=N[0]*z[0]+N[1]*z[1],A>$?($=A,S=L,R=!1):A<P&&(P=A,D=L,R=!0)}if(R?(pe(S),T!==D&&pe(D)):(D!==k&&pe(D),T!==S&&pe(S)),pe(T),_>=e.length||!L)break;pe(L),k=L}}be&&K([le||be[0],de||be[1]]),y.push(g.slice(0,x))}var se=d.slice(d.length-1);if(c&&se!=="h"&&se!=="v"){for(var ie=!1,fe=-1,ge=[],Me=0;Me<y.length;Me++)for(var Se=0;Se<y[Me].length-1;Se++){var Pe=y[Me][Se],He=y[Me][Se+1],Oe=hF.applyBackoff(He,Pe);(Oe[0]!==He[0]||Oe[1]!==He[1])&&(ie=!0),ge[fe+1]||(fe++,ge[fe]=[Pe,[Oe[0],Oe[1]]])}return ie?ge:y}return y},nb={tonextx:1,tonexty:1,tonext:1},sk=function(e,r,a){var i,n,o,l,s,f={},c=!1,u=-1,v=0,h=-1;for(n=0;n<a.length;n++)i=a[n][0].trace,o=i.stackgroup||"",o?o in f?s=f[o]:(s=f[o]=v,v++):i.fill in nb&&h>=0?s=h:(s=h=v,v++),s<u&&(c=!0),i._groupIndex=u=s;var d=a.slice();c&&d.sort(function(m,y){var b=m[0].trace,w=y[0].trace;return b._groupIndex-w._groupIndex||b.index-w.index});var p={};for(n=0;n<d.length;n++)i=d[n][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in nb&&(l=p[o],i._prevtrace=l||null,l&&(l._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)==="tozero"||i.fill==="toself"||i.fill.substr(0,2)==="to"&&!i._prevtrace),p[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d},ma=ft,yF=Je,rs=me,go=rs.ensureSingle,fk=rs.identity,jt=xt,bo=_r,gF=mF,bF=sk,uf=d2.tester,xF=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,u=bF(e,r,a);if(l=i.selectAll("g.trace").data(u,function(h){return h[0].trace.uid}),l.enter().append("g").attr("class",function(h){return"trace scatter trace"+h[0].trace.uid}).style("stroke-miterlimit",2),l.order(),_F(e,l,r),c){o&&(s=o());var v=ma.transition().duration(n.duration).ease(n.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});v.each(function(){i.selectAll("g.trace").each(function(h,d){ob(e,d,r,h,u,this,n)})})}else l.each(function(h,d){ob(e,d,r,h,u,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function _F(t,e,r){e.each(function(a){var i=go(ma.select(this),"g","fills");jt.setClipUrl(i,r.layerClipId,t);var n=a[0].trace,o=[];n._ownfill&&o.push("_ownFill"),n._nexttrace&&o.push("_nextFill");var l=i.selectAll("g").data(o,fk);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=go(ma.select(this),"path","js-fill")})})}function ob(t,e,r,a,i,n,o){var l=t._context.staticPlot,s;wF(t,e,r,a,i);var f=!!o&&o.duration>0;function c(ye){return f?ye.transition():ye}var u=r.xaxis,v=r.yaxis,h=a[0].trace,d=h.line,p=ma.select(n),m=go(p,"g","errorbars"),y=go(p,"g","lines"),b=go(p,"g","points"),w=go(p,"g","text");if(yF.getComponentMethod("errorbars","plot")(t,m,r,o),h.visible!==!0)return;c(p).style("opacity",h.opacity);var g,x,_=h.fill.charAt(h.fill.length-1);_!=="x"&&_!=="y"&&(_="");var k,T;_==="y"?(k=1,T=v.c2p(0,!0)):_==="x"&&(k=0,T=u.c2p(0,!0)),a[0][r.isRangePlot?"nodeRangePlot3":"node3"]=p;var S="",D=[],L=h._prevtrace,R=null,z=null;L&&(S=L._prevRevpath||"",x=L._nextFill,D=L._ownPolygons,R=L._fillsegments,z=L._fillElement);var N,H,$="",P="",A,M,C,E,F,j,B=[];h._polygons=[];var G=[],O=[],W=rs.noop;if(g=h._ownFill,bo.hasLines(h)||h.fill!=="none"){x&&x.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(A=jt.steps(d.shape),M=jt.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?A=M=function(ye){var Ee=ye[ye.length-1];return ye.length>1&&ye[0][0]===Ee[0]&&ye[0][1]===Ee[1]?jt.smoothclosed(ye.slice(1),d.smoothing):jt.smoothopen(ye,d.smoothing)}:A=M=function(ye){return"M"+ye.join("L")},C=function(ye){return M(ye.reverse())},O=gF(a,{xaxis:u,yaxis:v,trace:h,connectGaps:h.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,backoff:d.backoff,simplify:d.simplify,fill:h.fill}),G=new Array(O.length);var V=0;for(s=0;s<O.length;s++){var Z,X=O[s];!Z||!_?(Z=X.slice(),G[V]=Z,V++):Z.push.apply(Z,X)}h._fillElement=null,h._fillExclusionElement=z,h._fillsegments=G.slice(0,V),G=h._fillsegments,O.length&&(E=O[0][0].slice(),F=O[O.length-1],j=F[F.length-1].slice()),W=function(ye){return function(Ee){if(N=A(Ee),H=C(Ee),$?_?($+="L"+N.substr(1),P=H+("L"+P.substr(1))):($+="Z"+N,P=H+"Z"+P):($=N,P=H),bo.hasLines(h)){var ze=ma.select(this);if(ze.datum(a),ye)c(ze.style("opacity",0).attr("d",N).call(jt.lineGroupStyle)).style("opacity",1);else{var K=c(ze);K.attr("d",N),jt.singleLineStyle(a,K)}}}}}var Q=y.selectAll(".js-line").data(O);c(Q.exit()).style("opacity",0).remove(),Q.each(W(!1)),Q.enter().append("path").classed("js-line",!0).style("vector-effect",l?"none":"non-scaling-stroke").call(jt.lineGroupStyle).each(W(!0)),jt.setClipUrl(Q,r.layerClipId,t);function te(ye){c(ye).attr("d","M0,0Z")}var xe=function(){var ye=new Array(G.length);for(s=0;s<G.length;s++)ye[s]=uf(G[s]);return ye},ue=function(ye){var Ee,ze;if(!ye||ye.length===0)for(Ee=new Array(G.length),ze=0;ze<G.length;ze++){var K=G[ze][0].slice(),ke=G[ze][G[ze].length-1].slice();K[k]=ke[k]=T;var re=[ke,K],pe=re.concat(G[ze]);Ee[ze]=uf(pe)}else{for(Ee=new Array(ye.length-1+G.length),ze=0;ze<ye.length-1;ze++)Ee[ze]=uf(ye[ze]);var we=ye[ye.length-1].slice();for(we.reverse(),ze=0;ze<G.length;ze++)Ee[ye.length-1+ze]=uf(G[ze].concat(we))}return Ee};O.length?(g?(g.datum(a),E&&j&&(_?(E[k]=j[k]=T,c(g).attr("d","M"+j+"L"+E+"L"+$.substr(1)).call(jt.singleFillStyle,t),B=ue(null)):(c(g).attr("d",$+"Z").call(jt.singleFillStyle,t),B=xe())),h._polygons=B,h._fillElement=g):x&&(h.fill.substr(0,6)==="tonext"&&$&&S?(h.fill==="tonext"?(c(x).attr("d",$+"Z"+S+"Z").call(jt.singleFillStyle,t),B=xe(),h._polygons=B.concat(D)):(c(x).attr("d",$+"L"+S.substr(1)+"Z").call(jt.singleFillStyle,t),B=ue(R),h._polygons=B),h._fillElement=x):te(x)),h._prevRevpath=P):(g?te(g):x&&te(x),h._prevRevpath=null),h._ownPolygons=B;function ae(ye){return ye.filter(function(Ee){return!Ee.gap&&Ee.vis})}function le(ye){return ye.filter(function(Ee){return Ee.vis})}function de(ye){return ye.filter(function(Ee){return!Ee.gap})}function be(ye){return ye.id}function Te(ye){if(ye.ids)return be}function Le(){return!1}function _e(ye,Ee,ze){var K,ke,re,pe=ze[0].trace,we=bo.hasMarkers(pe),se=bo.hasText(pe),ie=Te(pe),fe=Le,ge=Le;if(we||se){var Me=fk,Se=pe.stackgroup,Pe=Se&&t._fullLayout._scatterStackOpts[u._id+v._id][Se].stackgaps==="infer zero";pe.marker.maxdisplayed||pe._needsCull?Me=Pe?le:ae:Se&&!Pe&&(Me=de),we&&(fe=Me),se&&(ge=Me)}ke=ye.selectAll("path.point"),K=ke.data(fe,ie);var He=K.enter().append("path").classed("point",!0);f&&He.call(jt.pointStyle,pe,t).call(jt.translatePoints,u,v).style("opacity",0).transition().style("opacity",1),K.order();var Oe;we&&(Oe=jt.makePointStyleFns(pe)),K.each(function(ve){var Be=ma.select(this),Ne=c(Be);re=jt.translatePoint(ve,Ne,u,v),re?(jt.singlePointStyle(ve,Ne,pe,Oe,t),r.layerClipId&&jt.hideOutsideRangePoint(ve,Ne,u,v,pe.xcalendar,pe.ycalendar),pe.customdata&&Be.classed("plotly-customdata",ve.data!==null&&ve.data!==void 0)):Ne.remove()}),f?K.exit().transition().style("opacity",0).remove():K.exit().remove(),ke=Ee.selectAll("g"),K=ke.data(ge,ie),K.enter().append("g").classed("textpoint",!0).append("text"),K.order(),K.each(function(ve){var Be=ma.select(this),Ne=c(Be.select("text"));re=jt.translatePoint(ve,Ne,u,v),re?r.layerClipId&&jt.hideOutsideRangePoint(ve,Be,u,v,pe.xcalendar,pe.ycalendar):Be.remove()}),K.selectAll("text").call(jt.textPointStyle,pe,t).each(function(ve){var Be=u.c2p(ve.x),Ne=v.c2p(ve.y);ma.select(this).selectAll("tspan.line").each(function(){c(ma.select(this)).attr({x:Be,y:Ne})})}),K.exit().remove()}b.datum(a),w.datum(a),_e(b,w,a);var Ie=h.cliponaxis===!1,ce=Ie?null:r.layerClipId;jt.setClipUrl(b,ce,t),jt.setClipUrl(w,ce,t)}function wF(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=ma.extent(rs.simpleMap(n.range,n.r2c)),s=ma.extent(rs.simpleMap(o.range,o.r2c)),f=a[0].trace;if(bo.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var u=a.filter(function(p){return p.x>=l[0]&&p.x<=l[1]&&p.y>=s[0]&&p.y<=s[1]}),v=Math.ceil(u.length/c),h=0;i.forEach(function(p,m){var y=p[0].trace;bo.hasMarkers(y)&&y.marker.maxdisplayed>0&&m<e&&h++});var d=Math.round(h*v/3+Math.floor(h/3)*v/7.1);a.forEach(function(p){delete p.vis}),u.forEach(function(p,m){Math.round((m+d)%v)===0&&(p.vis=!0)})}}}var _s={container:"marker",min:"cmin",max:"cmax"},vf=Dt,ck=function(e,r,a){var i={},n={_fullLayout:a},o=vf.getFromTrace(n,r,"x"),l=vf.getFromTrace(n,r,"y"),s=e.orig_x;s===void 0&&(s=e.x);var f=e.orig_y;return f===void 0&&(f=e.y),i.xLabel=vf.tickText(o,o.c2l(s),!0).text,i.yLabel=vf.tickText(l,l.c2l(f),!0).text,i},Ev=ft,Eo=xt,TF=Je;function kF(t){var e=Ev.select(t).selectAll("g.trace.scatter");e.style("opacity",function(r){return r[0].trace.opacity}),e.selectAll("g.points").each(function(r){var a=Ev.select(this),i=r.trace||r[0].trace;uk(a,i,t)}),e.selectAll("g.text").each(function(r){var a=Ev.select(this),i=r.trace||r[0].trace;vk(a,i,t)}),e.selectAll("g.trace path.js-line").call(Eo.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(Eo.fillGroupStyle,t),TF.getComponentMethod("errorbars","style")(e)}function uk(t,e,r){Eo.pointStyle(t.selectAll("path.point"),e,r)}function vk(t,e,r){Eo.textPointStyle(t.selectAll("text"),e,r)}function AF(t,e,r){var a=e[0].trace;a.selectedpoints?(Eo.selectedPointStyle(r.selectAll("path.point"),a),Eo.selectedTextStyle(r.selectAll("text"),a)):(uk(r,a,t),vk(r,a,t))}var lb={style:kF,styleOnSelect:AF},Gn=ot,MF=_r,dk=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&Gn.opacity(a)?a:e.fillcolor;if(e.mode==="none")return e.fill?e.fillcolor:"";var n=r.mcc||(e.marker||{}).color,o=r.mlcc||((e.marker||{}).line||{}).color;return i=n&&Gn.opacity(n)?n:o&&Gn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?Gn.opacity(i)<.3?Gn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&Gn.opacity(a)&&MF.hasLines(e)&&e.line.width?a:e.fillcolor)},jf=me,sb=_a,SF=Je,LF=dk,Rv=ot,CF=jf.fillText,DF=function(e,r,a,i){var n=e.cd,o=n[0].trace,l=e.xa,s=e.ya,f=l.c2p(r),c=s.c2p(a),u=[f,c],v=o.hoveron||"",h=o.mode.indexOf("markers")!==-1?3:.5,d=!!o.xperiodalignment,p=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var m=function(P){if(d){var A=l.c2p(P.xStart),M=l.c2p(P.xEnd);return f>=Math.min(A,M)&&f<=Math.max(A,M)?0:1/0}var C=Math.max(3,P.mrc||0),E=1-1/C,F=Math.abs(l.c2p(P.x)-f);return F<C?E*F/C:F-C+E},y=function(P){if(p){var A=s.c2p(P.yStart),M=s.c2p(P.yEnd);return c>=Math.min(A,M)&&c<=Math.max(A,M)?0:1/0}var C=Math.max(3,P.mrc||0),E=1-1/C,F=Math.abs(s.c2p(P.y)-c);return F<C?E*F/C:F-C+E},b=function(P){var A=Math.max(h,P.mrc||0),M=l.c2p(P.x)-f,C=s.c2p(P.y)-c;return Math.max(Math.sqrt(M*M+C*C)-A,1-h/A)},w=sb.getDistanceFunction(i,m,y,b);if(sb.getClosest(n,w,e),e.index!==!1){var g=n[e.index],x=l.c2p(g.x,!0),_=s.c2p(g.y,!0),k=g.mrc||1;e.index=g.i;var T=n[0].t.orientation,S=T&&(g.sNorm||g.s),D=T==="h"?S:g.orig_x!==void 0?g.orig_x:g.x,L=T==="v"?S:g.orig_y!==void 0?g.orig_y:g.y;return jf.extendFlat(e,{color:LF(o,g),x0:x-k,x1:x+k,xLabelVal:D,y0:_-k,y1:_+k,yLabelVal:L,spikeDistance:b(g),hovertemplate:o.hovertemplate}),CF(g,o,e),SF.getComponentMethod("errorbars","hoverInfo")(g,o,e),[e]}}function R(P){if(!P)return!1;var A=P.node();try{var M=new DOMPoint(u[0],u[1]);return A.isPointInFill(M)}catch{var C=A.ownerSVGElement.createSVGPoint();return C.x=u[0],C.y=u[1],A.isPointInFill(C)}}function z(P){var A,M=[],C=1/0,E=-1/0,F=1/0,j=-1/0,B;for(A=0;A<P.length;A++){var G=P[A];G.contains(u)&&(M.push(G),F=Math.min(F,G.ymin),j=Math.max(j,G.ymax))}if(M.length===0)return null;F=Math.max(F,0),j=Math.min(j,s._length),B=(F+j)/2;var O,W,V,Z,X,Q,te;for(A=0;A<M.length;A++)for(W=M[A].pts,O=1;O<W.length;O++)Q=W[O-1][1],te=W[O][1],Q>B!=te>=B&&(Z=W[O-1][0],X=W[O][0],te-Q&&(V=Z+(X-Z)*(B-Q)/(te-Q),C=Math.min(C,V),E=Math.max(E,V)));return C=Math.max(C,0),E=Math.min(E,l._length),{x0:C,x1:E,y0:B,y1:B}}if(v.indexOf("fills")!==-1&&o._fillElement){var N=R(o._fillElement)&&!R(o._fillExclusionElement);if(N){var H=z(o._polygons);H===null&&(H={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var $=Rv.defaultLine;return Rv.opacity(o.fillcolor)?$=o.fillcolor:Rv.opacity((o.line||{}).color)&&($=o.line.color),jf.extendFlat(e,{distance:e.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:$,hovertemplate:!1}),delete e.index,o.text&&!jf.isArrayOrTypedArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},fb=_r,PF=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,u,v=!fb.hasMarkers(l)&&!fb.hasText(l);if(v)return[];if(r===!1)for(s=0;s<a.length;s++)a[s].selected=0;else for(s=0;s<a.length;s++)f=a[s],c=i.c2p(f.x),u=n.c2p(f.y),f.i!==null&&r.contains([c,u],!1,s,e)?(o.push({pointNumber:f.i,x:i.c2d(f.x),y:n.c2d(f.y)}),f.selected=1):f.selected=0;return o},Jt={},zv,cb;function EF(){return cb||(cb=1,zv={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}),zv}var Iv,ub;function RF(){if(ub)return Iv;ub=1;var t=Je.traceIs,e=qw;Iv=function(l,s,f,c){f("autotypenumbers",c.autotypenumbersDflt);var u=f("type",(c.splomStash||{}).type);u==="-"&&(r(s,c.data),s.type==="-"?s.type="linear":l.type=s.type)};function r(o,l){if(o.type==="-"){var s=o._id,f=s.charAt(0),c;s.indexOf("scene")!==-1&&(s=f);var u=a(l,s,f);if(u){if(u.type==="histogram"&&f==={v:"y",h:"x"}[u.orientation||"v"]){o.type="linear";return}var v=f+"calendar",h=u[v],d={noMultiCategory:!t(u,"cartesian")||t(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&f==={h:"x",v:"y"}[u.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=o.autotypenumbers,n(u,f)){var p=i(u),m=[];for(c=0;c<l.length;c++){var y=l[c];!t(y,"box-violin")||(y[f+"axis"]||f)!==s||(y[p]!==void 0?m.push(y[p][0]):y.name!==void 0?m.push(y.name):m.push("text"),y[v]!==h&&(h=void 0))}o.type=e(m,h,d)}else if(u.type==="splom"){var b=u.dimensions,w=b[u._axesDim[s]];w.visible&&(o.type=e(w.values,h,d))}else o.type=e(u[f]||[u[f+"0"]],h,d)}}}function a(o,l,s){for(var f=0;f<o.length;f++){var c=o[f];if(c.type==="splom"&&c._length>0&&(c["_"+s+"axes"]||{})[l])return c;if((c[s+"axis"]||s)===l){if(n(c,s))return c;if((c[s]||[]).length||c[s+"0"])return c}}}function i(o){return{v:"x",h:"y"}[o.orientation||"v"]}function n(o,l){var s=i(o),f=t(o,"box-violin"),c=t(o._fullInput||{},"candlestick");return f&&!c&&l===s&&o[s]===void 0&&o[s+"0"]===void 0}return Iv}var zF=Xt.isTypedArraySpec;function IF(t,e){var r=e.dataAttr||t._id.charAt(0),a={},i,n,o;if(e.axData)i=e.axData;else for(i=[],n=0;n<e.data.length;n++){var l=e.data[n];l[r+"axis"]===t._id&&i.push(l)}for(n=0;n<i.length;n++){var s=i[n][r];for(o=0;o<s.length;o++){var f=s[o];f!=null&&(a[f]=1)}}return Object.keys(a)}var FF=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0||zF(n),l;o&&(l="array");var s=a("categoryorder",l),f;s==="array"&&(f=a("categoryarray")),!o&&s==="array"&&(s=r.categoryorder="trace"),s==="trace"?r._initialCategories=[]:s==="array"?r._initialCategories=f.slice():(f=IF(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},vb=wa.mix,$F=xr,NF=me,HF=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(k,T){return NF.coerce2(e,r,i.attributes,k,T)}var l=o("linecolor",n),s=o("linewidth"),f=a("showline",i.showLine||!!l||!!s);f||(delete r.linecolor,delete r.linewidth);var c=vb(n,i.bgColor,i.blend||$F.lightFraction).toRgbString(),u=o("gridcolor",c),v=o("gridwidth"),h=o("griddash"),d=a("showgrid",i.showGrid||!!u||!!v||!!h);if(d||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var p=vb(r.gridcolor,i.bgColor,67).toRgbString(),m=o("minor.gridcolor",p),y=o("minor.gridwidth",r.gridwidth||1),b=o("minor.griddash",r.griddash||"solid"),w=a("minor.showgrid",!!m||!!y||!!b);w||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var g=o("zerolinecolor",n),x=o("zerolinewidth"),_=a("zeroline",i.showGrid||!!g||!!x);_||(delete r.zerolinecolor,delete r.zerolinewidth)}},db=dt,OF=Je,Cl=me,jF=Lt,BF=Ha,ph=Na,hb=Dw,pb=Pw,GF=zw,UF=Iw,VF=FF,XF=HF,YF=cT,mb=up,Bf=Lr.WEEKDAY_PATTERN,WF=Lr.HOUR_PATTERN,hk=function(e,r,a,i,n){var o=i.letter,l=i.font||{},s=i.splomStash||{},f=a("visible",!i.visibleDflt),c=r._template||{},u=r.type||c.type||"-",v;if(u==="date"){var h=OF.getComponentMethod("calendars","handleDefaults");h(e,r,"calendar",i.calendar),i.noTicklabelmode||(v=a("ticklabelmode"))}var d="";(!i.noTicklabelposition||u==="multicategory")&&(d=Cl.coerce(e,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||a("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":u==="category"||u==="multicategory"?"allow":"hide past div"),mb(r,n),YF(e,r,a,i),VF(e,r,a,i),u!=="category"&&!i.noHover&&a("hoverformat");var p=a("color"),m=p!==ph.color.dflt?p:l.color,y=s.label||n._dfltTitle[o];if(UF(e,r,a,u,i),!f)return r;a("title.text",y),Cl.coerceFont(a,"title.font",{family:l.family,size:Cl.bigFont(l.size),color:m}),hb(e,r,a,u);var b=i.hasMinor;if(b&&(jF.newContainer(r,"minor"),hb(e,r,a,u,{isMinor:!0})),GF(e,r,a,u,i),pb(e,r,a,i),b){var w=i.isMinor;i.isMinor=!0,pb(e,r,a,i),i.isMinor=w}XF(e,r,a,{dfltColor:p,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:b,attributes:ph}),b&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&a("mirror");var g=u==="multicategory";if(!i.noTickson&&(u==="category"||g)&&(r.ticks||r.showgrid)){var x;g&&(x="boundaries");var _=a("tickson",x);_==="boundaries"&&delete r.ticklabelposition}if(g){var k=a("showdividers");k&&(a("dividercolor"),a("dividerwidth"))}if(u==="date")if(BF(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:qF}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var T=0;T<r.rangebreaks.length;T++)if(r.rangebreaks[T].pattern===Bf){r._hasDayOfWeekBreaks=!0;break}if(mb(r,n),n._has("scattergl")||n._has("splom"))for(var S=0;S<i.data.length;S++){var D=i.data[S];(D.type==="scattergl"||D.type==="splom")&&(D.visible=!1,Cl.warn(D.type+" traces do not work on axes with rangebreaks. Setting trace "+D.index+" to `visible: false`."))}}return r};function qF(t,e,r){function a(v,h){return Cl.coerce(t,e,ph.rangebreaks,v,h)}var i=a("enabled");if(i){var n=a("bounds");if(n&&n.length>=2){var o="",l,s;if(n.length===2){for(l=0;l<2;l++)if(s=yb(n[l]),s){o=Bf;break}}var f=a("pattern",o);if(f===Bf)for(l=0;l<2;l++)s=yb(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Bf:if(!db(s)){e.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){e.enabled=!1;return}e.bounds[l]=n[l]=s;break;case WF:if(!db(s)){e.enabled=!1;return}if(s=+s,s<0||s>24){e.enabled=!1;return}e.bounds[l]=n[l]=s;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(n[0]<c[0]&&n[1]>c[1]){e.enabled=!1;return}}else if(n[0]>c[0]&&n[1]<c[1]){e.enabled=!1;return}}}else{var u=a("values");if(u&&u.length)a("dvalue");else{e.enabled=!1;return}}}}var ZF={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function yb(t){if(typeof t=="string")return ZF[t.substr(0,3).toLowerCase()]}var KF=dt,df=me,pk=function(e,r,a,i){var n=i.counterAxes||[],o=i.overlayableAxes||[],l=i.letter,s=i.grid,f=i.overlayingDomain,c,u,v,h,d,p;s&&(u=s._domains[l][s._axisMap[r._id]],c=s._anchors[r._id],u&&(v=s[l+"side"].split(" ")[0],h=s.domain[l][v==="right"||v==="top"?1:0])),u=u||[0,1],c=c||(KF(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),h=h||0,d=0,p=!1;var m=df.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:c}},"anchor"),y=df.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(m==="free"){if(l==="y"){var b=a("autoshift");b&&(h=y==="left"?f[0]:f[1],p=r.automargin?r.automargin:!0,d=y==="left"?-3:3),a("shift",d)}a("position",h)}a("automargin",p);var w=!1;if(o.length&&(w=df.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!w){var g=a("domain",u);g[0]>g[1]-1/4096&&(r.domain=u),df.noneOrAll(e.domain,r.domain,u),r.tickmode==="sync"&&(r.tickmode="auto")}return a("layer"),r},Fv,gb;function QF(){if(gb)return Fv;gb=1;var t=me,e=ot,r=la.isUnifiedHover,a=CT,i=Lt,n=vs,o=Na,l=RF(),s=hk,f=ti,c=pk,u=Wt,v=u.id2name,h=u.name2id,d=Lr.AX_ID_PATTERN,p=Je,m=p.traceIs,y=p.getComponentMethod;function b(w,g,x){Array.isArray(w[g])?w[g].push(x):w[g]=[x]}return Fv=function(g,x,_){var k=x.autotypenumbers,T={},S={},D={},L={},R={},z={},N={},H={},$={},P={},A,M;for(A=0;A<_.length;A++){var C=_[A];if(!(!m(C,"cartesian")&&!m(C,"gl2d"))){var E;if(C.xaxis)E=v(C.xaxis),b(T,E,C);else if(C.xaxes)for(M=0;M<C.xaxes.length;M++)b(T,v(C.xaxes[M]),C);var F;if(C.yaxis)F=v(C.yaxis),b(T,F,C);else if(C.yaxes)for(M=0;M<C.yaxes.length;M++)b(T,v(C.yaxes[M]),C);if(C.type==="funnel"?C.orientation==="h"?(E&&(S[E]=!0),F&&(N[F]=!0)):F&&(D[F]=!0):C.type==="image"?(F&&(H[F]=!0),E&&(H[E]=!0)):(F&&(R[F]=!0,z[F]=!0),(!m(C,"carpet")||C.type==="carpet"&&!C._cheater)&&E&&(L[E]=!0)),C.type==="carpet"&&C._cheater&&E&&(S[E]=!0),m(C,"2dMap")&&($[E]=!0,$[F]=!0),m(C,"oriented")){var j=C.orientation==="h"?F:E;P[j]=!0}}}var B=x._subplots,G=B.xaxis,O=B.yaxis,W=t.simpleMap(G,v),V=t.simpleMap(O,v),Z=W.concat(V),X=e.background;G.length&&O.length&&(X=t.coerce(g,x,n,"plot_bgcolor"));var Q=e.combine(X,x.paper_bgcolor),te,xe,ue,ae,le;function de(){var Ue=T[te]||[];le._traceIndices=Ue.map(function(I){return I._expandedIndex}),le._annIndices=[],le._shapeIndices=[],le._selectionIndices=[],le._imgIndices=[],le._subplotsWith=[],le._counterAxes=[],le._name=le._attr=te,le._id=xe}function be(Ue,I){return t.coerce(ae,le,o,Ue,I)}function Te(Ue,I){return t.coerce2(ae,le,o,Ue,I)}function Le(Ue){return Ue==="x"?O:G}function _e(Ue,I){for(var Y=Ue==="x"?W:V,U=[],q=0;q<Y.length;q++){var oe=Y[q];oe!==I&&!(g[oe]||{}).overlaying&&U.push(h(oe))}return U}var Ie={x:Le("x"),y:Le("y")},ce=Ie.x.concat(Ie.y),ye={},Ee=[];function ze(){var Ue=ae.matches;d.test(Ue)&&ce.indexOf(Ue)===-1&&(ye[Ue]=ae.type,Ee=Object.keys(ye))}var K=a(g,x),ke=r(K);for(A=0;A<Z.length;A++){te=Z[A],xe=h(te),ue=te.charAt(0),t.isPlainObject(g[te])||(g[te]={}),ae=g[te],le=i.newContainer(x,te,ue+"axis"),de();var re=ue==="x"&&!L[te]&&S[te]||ue==="y"&&!R[te]&&D[te],pe=ue==="y"&&(!z[te]&&N[te]||H[te]),we={hasMinor:!0,letter:ue,font:x.font,outerTicks:$[te],showGrid:!P[te],data:T[te]||[],bgColor:Q,calendar:x.calendar,automargin:!0,visibleDflt:re,reverseDflt:pe,autotypenumbersDflt:k,splomStash:((x._splomAxes||{})[ue]||{})[xe],noAutotickangles:ue==="y"};be("uirevision",x.uirevision),l(ae,le,be,we),s(ae,le,be,we,x);var se=ke&&ue===K.charAt(0),ie=Te("spikecolor",ke?le.color:void 0),fe=Te("spikethickness",ke?1.5:void 0),ge=Te("spikedash",ke?"dot":void 0),Me=Te("spikemode",ke?"across":void 0),Se=Te("spikesnap"),Pe=be("showspikes",!!se||!!ie||!!fe||!!ge||!!Me||!!Se);Pe||(delete le.spikecolor,delete le.spikethickness,delete le.spikedash,delete le.spikemode,delete le.spikesnap);var He=v(ae.overlaying),Oe=[0,1];if(x[He]!==void 0){var ve=v(x[He].anchor);x[ve]!==void 0&&(Oe=x[ve].domain)}c(ae,le,be,{letter:ue,counterAxes:Ie[ue],overlayableAxes:_e(ue,te),grid:x.grid,overlayingDomain:Oe}),be("title.standoff"),ze(),le._input=ae}for(A=0;A<Ee.length;){xe=Ee[A++],te=v(xe),ue=te.charAt(0),t.isPlainObject(g[te])||(g[te]={}),ae=g[te],le=i.newContainer(x,te,ue+"axis"),de();var Be={letter:ue,font:x.font,outerTicks:$[te],showGrid:!P[te],data:[],bgColor:Q,calendar:x.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:k,splomStash:((x._splomAxes||{})[ue]||{})[xe]};be("uirevision",x.uirevision),le.type=ye[xe]||"linear",s(ae,le,be,Be,x),c(ae,le,be,{letter:ue,counterAxes:Ie[ue],overlayableAxes:_e(ue,te),grid:x.grid}),be("fixedrange"),ze(),le._input=ae}var Ne=y("rangeslider","handleDefaults"),We=y("rangeselector","handleDefaults");for(A=0;A<W.length;A++)te=W[A],ae=g[te],le=x[te],Ne(g,x,te),le.type==="date"&&We(ae,le,x,V,le.calendar),be("fixedrange");for(A=0;A<V.length;A++){te=V[A],ae=g[te],le=x[te];var Ge=x[v(le.anchor)],Ve=y("rangeslider","isVisible")(Ge);be("fixedrange",Ve)}f.handleDefaults(g,x,{axIds:ce.concat(Ee).sort(u.idSort),axHasImage:H})},Fv}var $v,bb;function JF(){if(bb)return $v;bb=1;var t=ft,e=Je,r=me,a=xt,i=Dt;return $v=function(o,l,s,f){var c=o._fullLayout;if(l.length===0){i.redrawComponents(o);return}function u(x){var _=x.xaxis,k=x.yaxis;c._defs.select("#"+x.clipId+"> rect").call(a.setTranslate,0,0).call(a.setScale,1,1),x.plot.call(a.setTranslate,_._offset,k._offset).call(a.setScale,1,1);var T=x.plot.selectAll(".scatterlayer .trace");T.selectAll(".point").call(a.setPointGroupScale,1,1),T.selectAll(".textpoint").call(a.setTextPointsScale,1,1),T.call(a.hideOutsideRangePoints,x)}function v(x,_){var k=x.plotinfo,T=k.xaxis,S=k.yaxis,D=T._length,L=S._length,R=!!x.xr1,z=!!x.yr1,N=[];if(R){var H=r.simpleMap(x.xr0,T.r2l),$=r.simpleMap(x.xr1,T.r2l),P=H[1]-H[0],A=$[1]-$[0];N[0]=(H[0]*(1-_)+_*$[0]-H[0])/(H[1]-H[0])*D,N[2]=D*(1-_+_*A/P),T.range[0]=T.l2r(H[0]*(1-_)+_*$[0]),T.range[1]=T.l2r(H[1]*(1-_)+_*$[1])}else N[0]=0,N[2]=D;if(z){var M=r.simpleMap(x.yr0,S.r2l),C=r.simpleMap(x.yr1,S.r2l),E=M[1]-M[0],F=C[1]-C[0];N[1]=(M[1]*(1-_)+_*C[1]-M[1])/(M[0]-M[1])*L,N[3]=L*(1-_+_*F/E),S.range[0]=T.l2r(M[0]*(1-_)+_*C[0]),S.range[1]=S.l2r(M[1]*(1-_)+_*C[1])}else N[1]=0,N[3]=L;i.drawOne(o,T,{skipTitle:!0}),i.drawOne(o,S,{skipTitle:!0}),i.redrawComponents(o,[T._id,S._id]);var j=R?D/N[2]:1,B=z?L/N[3]:1,G=R?N[0]:0,O=z?N[1]:0,W=R?N[0]/N[2]*D:0,V=z?N[1]/N[3]*L:0,Z=T._offset-W,X=S._offset-V;k.clipRect.call(a.setTranslate,G,O).call(a.setScale,1/j,1/B),k.plot.call(a.setTranslate,Z,X).call(a.setScale,j,B),a.setPointGroupScale(k.zoomScalePts,1/j,1/B),a.setTextPointsScale(k.zoomScaleTxt,1/j,1/B)}var h;f&&(h=f());function d(){for(var x={},_=0;_<l.length;_++){var k=l[_],T=k.plotinfo.xaxis,S=k.plotinfo.yaxis;k.xr1&&(x[T._name+".range"]=k.xr1.slice()),k.yr1&&(x[S._name+".range"]=k.yr1.slice())}return h&&h(),e.call("relayout",o,x).then(function(){for(var D=0;D<l.length;D++)u(l[D].plotinfo)})}function p(){for(var x={},_=0;_<l.length;_++){var k=l[_],T=k.plotinfo.xaxis,S=k.plotinfo.yaxis;k.xr0&&(x[T._name+".range"]=k.xr0.slice()),k.yr0&&(x[S._name+".range"]=k.yr0.slice())}return e.call("relayout",o,x).then(function(){for(var D=0;D<l.length;D++)u(l[D].plotinfo)})}var m,y,b,w=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(b),b=null,p()});function g(){y=Date.now();for(var x=Math.min(1,(y-m)/s.duration),_=w(x),k=0;k<l.length;k++)v(l[k],_);y-m>s.duration?(d(),b=window.cancelAnimationFrame(g)):b=window.requestAnimationFrame(g)}return m=Date.now(),b=window.requestAnimationFrame(g),Promise.resolve()},$v}var yu=ft,xb=Je,yc=me,e$=Qt,t$=xt,_b=hs.getModuleCalcData,Ti=Wt,za=Lr,r$=Mn,Mt=yc.ensureSingle;function hf(t,e,r){return yc.ensureSingle(t,e,r,function(a){a.datum(r)})}Jt.name="cartesian";Jt.attr=["xaxis","yaxis"];Jt.idRoot=["x","y"];Jt.idRegex=za.idRegex;Jt.attrRegex=za.attrRegex;Jt.attributes=EF();Jt.layoutAttributes=Na;Jt.supplyLayoutDefaults=QF();Jt.transitionAxes=JF();Jt.finalizeSubplots=function(t,e){var r=e._subplots,a=r.xaxis,i=r.yaxis,n=r.cartesian,o=n.concat(r.gl2d||[]),l={},s={},f,c,u;for(f=0;f<o.length;f++){var v=o[f].split("y");l[v[0]]=1,s["y"+v[1]]=1}for(f=0;f<a.length;f++)c=a[f],l[c]||(u=(t[Ti.id2name(c)]||{}).anchor,za.idRegex.y.test(u)||(u="y"),n.push(c+u),o.push(c+u),s[u]||(s[u]=1,yc.pushUnique(i,u)));for(f=0;f<i.length;f++)u=i[f],s[u]||(c=(t[Ti.id2name(u)]||{}).anchor,za.idRegex.x.test(c)||(c="x"),n.push(c+u),o.push(c+u),l[c]||(l[c]=1,yc.pushUnique(a,c)));if(!o.length){c="",u="";for(var h in t)if(za.attrRegex.test(h)){var d=h.charAt(0);d==="x"?(!c||+h.substr(5)<+c.substr(5))&&(c=h):(!u||+h.substr(5)<+u.substr(5))&&(u=h)}c=c?Ti.name2id(c):"x",u=u?Ti.name2id(u):"y",a.push(c),i.push(u),n.push(c+u)}};Jt.plot=function(t,e,r,a){var i=t._fullLayout,n=i._subplots.cartesian,o=t.calcdata,l;if(!Array.isArray(e))for(e=[],l=0;l<o.length;l++)e.push(l);for(l=0;l<n.length;l++){for(var s=n[l],f=i._plots[s],c=[],u,v=0;v<o.length;v++){var h=o[v],d=h[0].trace;d.xaxis+d.yaxis===s&&((e.indexOf(d.index)!==-1||d.carpet)&&(u&&u[0].trace.xaxis+u[0].trace.yaxis===s&&["tonextx","tonexty","tonext"].indexOf(d.fill)!==-1&&c.indexOf(u)===-1&&c.push(u),c.push(h)),u=h)}mk(t,f,c,r,a)}};function mk(t,e,r,a,i){for(var n=za.traceLayerClasses,o=t._fullLayout,l=o._modules,s,f,c,u=[],v=[],h=0;h<l.length;h++){s=l[h];var d=s.name,p=xb.modules[d].categories;if(p.svg){var m=s.layerName||d+"layer",y=s.plot;f=_b(r,y),c=f[0],r=f[1],c.length&&u.push({i:n.indexOf(m),className:m,plotMethod:y,cdModule:c}),p.zoomScale&&v.push("."+m)}}u.sort(function(g,x){return g.i-x.i});var b=e.plot.selectAll("g.mlayer").data(u,function(g){return g.className});if(b.enter().append("g").attr("class",function(g){return g.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),b.exit().remove(),b.order(),b.each(function(g){var x=yu.select(this),_=g.className;g.plotMethod(t,e,g.cdModule,x,a,i),za.clipOnAxisFalseQuery.indexOf("."+_)===-1&&t$.setClipUrl(x,e.layerClipId,t)}),o._has("scattergl")&&(s=xb.getModule("scattergl"),c=_b(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(za.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),v.length)){var w=e.plot.selectAll(v.join(",")).selectAll(".trace");e.zoomScalePts=w.selectAll("path.point"),e.zoomScaleTxt=w.selectAll(".textpoint")}}Jt.clean=function(t,e,r,a){var i=a._plots||{},n=e._plots||{},o=a._subplots||{},l,s,f;if(a._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(f in i)l=i[f],l.plotgroup&&l.plotgroup.remove();var c=a._has&&a._has("gl"),u=e._has&&e._has("gl");if(c&&!u)for(f in i)l=i[f],l._scene&&l._scene.destroy();if(o.xaxis&&o.yaxis){var v=Ti.listIds({_fullLayout:a});for(s=0;s<v.length;s++){var h=v[s];e[Ti.id2name(h)]||a._infolayer.selectAll(".g-"+h+"title").remove()}}var d=a._has&&a._has("cartesian"),p=e._has&&e._has("cartesian");if(d&&!p)gk(a._cartesianlayer.selectAll(".subplot"),a),a._defs.selectAll(".axesclip").remove(),delete a._axisConstraintGroups,delete a._axisMatchGroups;else if(o.cartesian)for(s=0;s<o.cartesian.length;s++){var m=o.cartesian[s];if(!n[m]){var y="."+m+",."+m+"-x,."+m+"-y";a._cartesianlayer.selectAll(y).remove(),bk(m,a)}}};Jt.drawFramework=function(t){var e=t._fullLayout,r=a$(t),a=e._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",function(i){return"subplot "+i[0]}),a.order(),a.exit().call(gk,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=yu.select(this),yk(t,o),o.draglayer=Mt(e._draggers,"g",n)})};Jt.rangePlot=function(t,e,r){yk(t,e),mk(t,e,r),e$.style(t)};function a$(t){var e=t._fullLayout,r=e._subplots.cartesian,a=r.length,i,n,o,l,s,f,c=[],u=[];for(i=0;i<a;i++){o=r[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var v=s._mainAxis,h=f._mainAxis,d=v._id+h._id,p=e._plots[d];l.overlays=[],d!==o&&p?(l.mainplot=d,l.mainplotinfo=p,u.push(o)):(l.mainplot=void 0,l.mainplotinfo=void 0,c.push(o))}for(i=0;i<u.length;i++)o=u[i],l=e._plots[o],l.mainplotinfo.overlays.push(l);var m=c.concat(u),y=new Array(a);for(i=0;i<a;i++){o=m[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var b=[o,s.layer,f.layer,s.overlaying||"",f.overlaying||""];for(n=0;n<l.overlays.length;n++)b.push(l.overlays[n].id);y[i]=b}return y}function yk(t,e){var r=e.plotgroup,a=e.id,i=za.layerValue2layerClass[e.xaxis.layer],n=za.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,f=s.plotgroup,c=a+"-x",u=a+"-y";e.minorGridlayer=s.minorGridlayer,e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,Mt(s.overlinesBelow,"path",c),Mt(s.overlinesBelow,"path",u),Mt(s.overaxesBelow,"g",c),Mt(s.overaxesBelow,"g",u),e.plot=Mt(s.overplot,"g",a),Mt(s.overlinesAbove,"path",c),Mt(s.overlinesAbove,"path",u),Mt(s.overaxesAbove,"g",c),Mt(s.overaxesAbove,"g",u),e.xlines=f.select(".overlines-"+i).select("."+c),e.ylines=f.select(".overlines-"+n).select("."+u),e.xaxislayer=f.select(".overaxes-"+i).select("."+c),e.yaxislayer=f.select(".overaxes-"+n).select("."+u)}else if(o)e.xlines=Mt(r,"path","xlines-above"),e.ylines=Mt(r,"path","ylines-above"),e.xaxislayer=Mt(r,"g","xaxislayer-above"),e.yaxislayer=Mt(r,"g","yaxislayer-above");else{var l=Mt(r,"g","layer-subplot");e.shapelayer=Mt(l,"g","shapelayer"),e.imagelayer=Mt(l,"g","imagelayer"),e.minorGridlayer=Mt(r,"g","minor-gridlayer"),e.gridlayer=Mt(r,"g","gridlayer"),e.zerolinelayer=Mt(r,"g","zerolinelayer"),Mt(r,"path","xlines-below"),Mt(r,"path","ylines-below"),e.overlinesBelow=Mt(r,"g","overlines-below"),Mt(r,"g","xaxislayer-below"),Mt(r,"g","yaxislayer-below"),e.overaxesBelow=Mt(r,"g","overaxes-below"),e.plot=Mt(r,"g","plot"),e.overplot=Mt(r,"g","overplot"),e.xlines=Mt(r,"path","xlines-above"),e.ylines=Mt(r,"path","ylines-above"),e.overlinesAbove=Mt(r,"g","overlines-above"),Mt(r,"g","xaxislayer-above"),Mt(r,"g","yaxislayer-above"),e.overaxesAbove=Mt(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+i),e.ylines=r.select(".ylines-"+n),e.xaxislayer=r.select(".xaxislayer-"+i),e.yaxislayer=r.select(".yaxislayer-"+n)}o||(hf(e.minorGridlayer,"g",e.xaxis._id),hf(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map(function(v){return v[0]}).sort(Ti.idSort),hf(e.gridlayer,"g",e.xaxis._id),hf(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(v){return v[0]}).sort(Ti.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function gk(t,e){if(t){var r={};t.each(function(s){var f=s[0],c=yu.select(this);c.remove(),bk(f,e),r[f]=!0});for(var a in e._plots)for(var i=e._plots[a],n=i.overlays||[],o=0;o<n.length;o++){var l=n[o];r[l.id]&&l.plot.selectAll(".trace").remove()}}}function bk(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}Jt.toSVG=function(t){var e=t._fullLayout._glimages,r=yu.select(t).selectAll(".svg-container"),a=r.filter(function(n,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var n=this,o=n.toDataURL("image/png"),l=e.append("svg:image");l.attr({xmlns:r$.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};Jt.updateFx=bp.updateFx;var pf=_r,i$={hasLines:pf.hasLines,hasMarkers:pf.hasMarkers,hasText:pf.hasText,isBubble:pf.isBubble,attributes:$i,layoutAttributes:rp,supplyDefaults:zI,crossTraceDefaults:V2,supplyLayoutDefaults:jI,calc:tm.calc,crossTraceCalc:vF,arraysToCalcdata:W2,plot:xF,colorbar:_s,formatLabels:ck,style:lb.style,styleOnSelect:lb.styleOnSelect,hoverPoints:DF,selectPoints:PF,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Jt,categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}},n$=ft,o$=ot,wb=S2,im=me,l$=im.strScale,s$=im.strRotate,f$=im.strTranslate,c$=function(e,r,a){var i=e.node(),n=wb[a.arrowhead||0],o=wb[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),f=r.indexOf("start")>=0,c=r.indexOf("end")>=0,u=n.backoff*l+a.standoff,v=o.backoff*s+a.startstandoff,h,d,p,m;if(i.nodeName==="line"){h={x:+e.attr("x1"),y:+e.attr("y1")},d={x:+e.attr("x2"),y:+e.attr("y2")};var y=h.x-d.x,b=h.y-d.y;if(p=Math.atan2(b,y),m=p+Math.PI,u&&v&&u+v>Math.sqrt(y*y+b*b)){N();return}if(u){if(u*u>y*y+b*b){N();return}var w=u*Math.cos(p),g=u*Math.sin(p);d.x+=w,d.y+=g,e.attr({x2:d.x,y2:d.y})}if(v){if(v*v>y*y+b*b){N();return}var x=v*Math.cos(p),_=v*Math.sin(p);h.x-=x,h.y-=_,e.attr({x1:h.x,y1:h.y})}}else if(i.nodeName==="path"){var k=i.getTotalLength(),T="";if(k<u+v){N();return}var S=i.getPointAtLength(0),D=i.getPointAtLength(.1);p=Math.atan2(S.y-D.y,S.x-D.x),h=i.getPointAtLength(Math.min(v,k)),T="0px,"+v+"px,";var L=i.getPointAtLength(k),R=i.getPointAtLength(k-.1);m=Math.atan2(L.y-R.y,L.x-R.x),d=i.getPointAtLength(Math.max(0,k-u));var z=T?v+u:u;T+=k-z+"px,"+k+"px",e.style("stroke-dasharray",T)}function N(){e.style("stroke-dasharray","0px,100px")}function H($,P,A,M){$.path&&($.noRotate&&(A=0),n$.select(i.parentNode).append("path").attr({class:e.attr("class"),d:$.path,transform:f$(P.x,P.y)+s$(A*180/Math.PI)+l$(M)}).style({fill:o$.rgb(a.arrowcolor),"stroke-width":0}))}f&&H(o,h,p,s),c&&H(n,d,m,l)},Tb=ft,Nv=Je,u$=Qt,hi=me,Hv=hi.strTranslate,as=Dt,Wi=ot,Ua=xt,kb=_a,Ov=nr,jv=zi,gl=Oa,v$=Lt.arrayEditor,d$=c$,nm={draw:h$,drawOne:xk,drawRaw:_k};function h$(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&xk(t,r);return u$.previousPromises(t)}function xk(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=as.getFromId(t,a.xref),n=as.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),_k(t,a,e,!1,i,n)}function ui(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=as.getRefType(o)==="domain",f=l?a.h:a.w;return t?s?n+(l?-e:e)/t._length:t.p2r(t.r2p(n)+e):n+(l?-e:e)/f}function _k(t,e,r,a,i,n){var o=t._fullLayout,l=t._fullLayout._size,s=t._context.edits,f,c;a?(f="annotation-"+a,c=a+".annotations"):(f="annotation",c="annotations");var u=v$(t.layout,c,e),v=u.modifyBase,h=u.modifyItem,d=u.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var p="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){Tb.selectAll("#"+p).remove();return}var m={x:{},y:{}},y=+e.textangle||0,b=o._infolayer.append("g").classed(f,!0).attr("data-index",String(r)).style("opacity",e.opacity),w=b.append("g").classed("annotation-text-g",!0),g=s[e.showarrow?"annotationTail":"annotationPosition"],x=e.captureevents||s.annotationText||g;function _(M){var C={index:r,annotation:e._input,fullAnnotation:e,event:M};return a&&(C.subplotId=a),C}var k=w.append("g").style("pointer-events",x?"all":null).call(jv,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",_(Tb.event))});e.hovertext&&k.on("mouseover",function(){var M=e.hoverlabel,C=M.font,E=this.getBoundingClientRect(),F=t.getBoundingClientRect();kb.loneHover({x0:E.left-F.left,x1:E.right-F.left,y:(E.top+E.bottom)/2-F.top,text:e.hovertext,color:M.bgcolor,borderColor:M.bordercolor,fontFamily:C.family,fontSize:C.size,fontColor:C.color},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){kb.loneUnhover(o._hoverlayer.node())});var T=e.borderwidth,S=e.borderpad,D=T+S,L=k.append("rect").attr("class","bg").style("stroke-width",T+"px").call(Wi.stroke,e.bordercolor).call(Wi.fill,e.bgcolor),R=e.width||e.height,z=o._topclips.selectAll("#"+p).data(R?[0]:[]);z.enter().append("clipPath").classed("annclip",!0).attr("id",p).append("rect"),z.exit().remove();var N=e.font,H=o._meta?hi.templateString(e.text,o._meta):e.text,$=k.append("text").classed("annotation-text",!0).text(H);function P(M){return M.call(Ua.font,N).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),Ov.convertToTspans(M,t,A),M}function A(){var M=$.selectAll("a");if(M.size()===1&&M.text()===$.text()){var C=k.insert("a",":first-child").attr({"xlink:xlink:href":M.attr("xlink:href"),"xlink:xlink:show":M.attr("xlink:show")}).style({cursor:"pointer"});C.node().appendChild(L.node())}var E=k.select(".annotation-text-math-group"),F=!E.empty(),j=Ua.bBox((F?E:$).node()),B=j.width,G=j.height,O=e.width||B,W=e.height||G,V=Math.round(O+2*D),Z=Math.round(W+2*D);function X(We,Ge){return Ge==="auto"&&(We<1/3?Ge="left":We>2/3?Ge="right":Ge="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ge]}for(var Q=!1,te=["x","y"],xe=0;xe<te.length;xe++){var ue=te[xe],ae=e[ue+"ref"]||ue,le=e["a"+ue+"ref"],de={x:i,y:n}[ue],be=(y+(ue==="x"?0:-90))*Math.PI/180,Te=V*Math.cos(be),Le=Z*Math.sin(be),_e=Math.abs(Te)+Math.abs(Le),Ie=e[ue+"anchor"],ce=e[ue+"shift"]*(ue==="x"?1:-1),ye=m[ue],Ee,ze,K,ke,re,pe=as.getRefType(ae);if(de&&pe!=="domain"){var we=de.r2fraction(e[ue]);(we<0||we>1)&&(le===ae?(we=de.r2fraction(e["a"+ue]),(we<0||we>1)&&(Q=!0)):Q=!0),Ee=de._offset+de.r2p(e[ue]),ke=.5}else{var se=pe==="domain";ue==="x"?(K=e[ue],Ee=se?de._offset+de._length*K:Ee=l.l+l.w*K):(K=1-e[ue],Ee=se?de._offset+de._length*K:Ee=l.t+l.h*K),ke=e.showarrow?.5:K}if(e.showarrow){ye.head=Ee;var ie=e["a"+ue];if(re=Te*X(.5,e.xanchor)-Le*X(.5,e.yanchor),le===ae){var fe=as.getRefType(le);fe==="domain"?(ue==="y"&&(ie=1-ie),ye.tail=de._offset+de._length*ie):fe==="paper"?ue==="y"?(ie=1-ie,ye.tail=l.t+l.h*ie):ye.tail=l.l+l.w*ie:ye.tail=de._offset+de.r2p(ie),ze=re}else ye.tail=Ee+ie,ze=re+ie;ye.text=ye.tail+re;var ge=o[ue==="x"?"width":"height"];if(ae==="paper"&&(ye.head=hi.constrain(ye.head,1,ge-1)),le==="pixel"){var Me=-Math.max(ye.tail-3,ye.text),Se=Math.min(ye.tail+3,ye.text)-ge;Me>0?(ye.tail+=Me,ye.text+=Me):Se>0&&(ye.tail-=Se,ye.text-=Se)}ye.tail+=ce,ye.head+=ce}else re=_e*X(ke,Ie),ze=re,ye.text=Ee+re;ye.text+=ce,re+=ce,ze+=ce,e["_"+ue+"padplus"]=_e/2+ze,e["_"+ue+"padminus"]=_e/2-ze,e["_"+ue+"size"]=_e,e["_"+ue+"shift"]=re}if(Q){k.remove();return}var Pe=0,He=0;if(e.align!=="left"&&(Pe=(O-B)*(e.align==="center"?.5:1)),e.valign!=="top"&&(He=(W-G)*(e.valign==="middle"?.5:1)),F)E.select("svg").attr({x:D+Pe-1,y:D+He}).call(Ua.setClipUrl,R?p:null,t);else{var Oe=D+He-j.top,ve=D+Pe-j.left;$.call(Ov.positionText,ve,Oe).call(Ua.setClipUrl,R?p:null,t)}z.select("rect").call(Ua.setRect,D,D,O,W),L.call(Ua.setRect,T/2,T/2,V-T,Z-T),k.call(Ua.setTranslate,Math.round(m.x.text-V/2),Math.round(m.y.text-Z/2)),w.attr({transform:"rotate("+y+","+m.x.text+","+m.y.text+")"});var Be=function(We,Ge){b.selectAll(".annotation-arrow-g").remove();var Ve=m.x.head,Ue=m.y.head,I=m.x.tail+We,Y=m.y.tail+Ge,U=m.x.text+We,q=m.y.text+Ge,oe=hi.rotationXYMatrix(y,U,q),ee=hi.apply2DTransform(oe),Ce=hi.apply2DTransform2(oe),Ae=+L.attr("width"),he=+L.attr("height"),ne=U-.5*Ae,Re=ne+Ae,je=q-.5*he,Ye=je+he,rt=[[ne,je,ne,Ye],[ne,Ye,Re,Ye],[Re,Ye,Re,je],[Re,je,ne,je]].map(Ce);if(!rt.reduce(function(Ze,ct){return Ze^!!hi.segmentsIntersect(Ve,Ue,Ve+1e6,Ue+1e6,ct[0],ct[1],ct[2],ct[3])},!1)){rt.forEach(function(Ze){var ct=hi.segmentsIntersect(I,Y,Ve,Ue,Ze[0],Ze[1],Ze[2],Ze[3]);ct&&(I=ct.x,Y=ct.y)});var nt=e.arrowwidth,vt=e.arrowcolor,et=e.arrowside,Ct=b.append("g").style({opacity:Wi.opacity(vt)}).classed("annotation-arrow-g",!0),lt=Ct.append("path").attr("d","M"+I+","+Y+"L"+Ve+","+Ue).style("stroke-width",nt+"px").call(Wi.stroke,Wi.rgb(vt));if(d$(lt,et,e),s.annotationPosition&<.node().parentNode&&!a){var Qe=Ve,yt=Ue;if(e.standoff){var mt=Math.sqrt(Math.pow(Ve-I,2)+Math.pow(Ue-Y,2));Qe+=e.standoff*(I-Ve)/mt,yt+=e.standoff*(Y-Ue)/mt}var st=Ct.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(I-Qe)+","+(Y-yt),transform:Hv(Qe,yt)}).style("stroke-width",nt+6+"px").call(Wi.stroke,"rgba(0,0,0,0)").call(Wi.fill,"rgba(0,0,0,0)"),at,qe;gl.init({element:st.node(),gd:t,prepFn:function(){var Ze=Ua.getTranslate(k);at=Ze.x,qe=Ze.y,i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0)},moveFn:function(Ze,ct){var Tt=ee(at,qe),Ke=Tt[0]+Ze,gt=Tt[1]+ct;k.call(Ua.setTranslate,Ke,gt),h("x",ui(i,Ze,"x",l,e)),h("y",ui(n,ct,"y",l,e)),e.axref===e.xref&&h("ax",ui(i,Ze,"ax",l,e)),e.ayref===e.yref&&h("ay",ui(n,ct,"ay",l,e)),Ct.attr("transform",Hv(Ze,ct)),w.attr({transform:"rotate("+y+","+Ke+","+gt+")"})},doneFn:function(){Nv.call("_guiRelayout",t,d());var Ze=document.querySelector(".js-notes-box-panel");Ze&&Ze.redraw(Ze.selectedObj)}})}}};if(e.showarrow&&Be(0,0),g){var Ne;gl.init({element:k.node(),gd:t,prepFn:function(){Ne=w.attr("transform")},moveFn:function(We,Ge){var Ve="pointer";if(e.showarrow)e.axref===e.xref?h("ax",ui(i,We,"ax",l,e)):h("ax",e.ax+We),e.ayref===e.yref?h("ay",ui(n,Ge,"ay",l.w,e)):h("ay",e.ay+Ge),Be(We,Ge);else{if(a)return;var Ue,I;if(i)Ue=ui(i,We,"x",l,e);else{var Y=e._xsize/l.w,U=e.x+(e._xshift-e.xshift)/l.w-Y/2;Ue=gl.align(U+We/l.w,Y,0,1,e.xanchor)}if(n)I=ui(n,Ge,"y",l,e);else{var q=e._ysize/l.h,oe=e.y-(e._yshift+e.yshift)/l.h-q/2;I=gl.align(oe-Ge/l.h,q,0,1,e.yanchor)}h("x",Ue),h("y",I),(!i||!n)&&(Ve=gl.getCursor(i?.5:Ue,n?.5:I,e.xanchor,e.yanchor))}w.attr({transform:Hv(We,Ge)+Ne}),jv(k,Ve)},clickFn:function(We,Ge){e.captureevents&&t.emit("plotly_clickannotation",_(Ge))},doneFn:function(){jv(k),Nv.call("_guiRelayout",t,d());var We=document.querySelector(".js-notes-box-panel");We&&We.redraw(We.selectedObj)}})}}s.annotationText?$.call(Ov.makeEditable,{delegate:k,gd:t}).call(P).on("edit",function(M){e.text=M,this.call(P),h("text",M),i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0),Nv.call("_guiRelayout",t,d())}):$.call(P)}var Ab=me,p$=Je,Mb=Lt.arrayEditor,m$={hasClickToShow:y$,onClick:g$};function y$(t,e){var r=wk(t,e);return r.on.length>0||r.explicitOff.length>0}function g$(t,e){var r=wk(t,e),a=r.on,i=r.off.concat(r.explicitOff),n={},o=t._fullLayout.annotations,l,s;if(a.length||i.length){for(l=0;l<a.length;l++)s=Mb(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),Ab.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=Mb(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),Ab.extendFlat(n,s.getUpdateObj());return p$.call("update",t,{},n)}}function wk(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,u,v,h,d;for(l=0;l<r.length;l++)if(f=r[l],c=f.clicktoshow,c){for(s=0;s<o;s++)if(u=e[s],v=u.xaxis,h=u.yaxis,v._id===f.xref&&h._id===f.yref&&v.d2r(u.x)===Sb(f._xclick,v)&&h.d2r(u.y)===Sb(f._yclick,h)){f.visible?c==="onout"?d=i:d=n:d=a,d.push(l);break}s===o&&f.visible&&c==="onout"&&i.push(l)}return{on:a,off:i,explicitOff:n}}function Sb(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Lb=me,Un=ot,Tk=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=Un.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),Lb.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var u=i("arrowside"),v,h;u.indexOf("end")!==-1&&(v=i("arrowhead"),h=i("arrowsize")),u.indexOf("start")!==-1&&(i("startarrowhead",v),i("startarrowsize",h)),i("arrowcolor",l?r.bordercolor:Un.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var d=i("hovertext"),p=a.hoverlabel||{};if(d){var m=i("hoverlabel.bgcolor",p.bgcolor||(Un.opacity(n)?Un.rgb(n):Un.defaultLine)),y=i("hoverlabel.bordercolor",p.bordercolor||Un.contrast(m));Lb.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||y})}i("captureevents",!!d)},Bv=me,qi=Dt,b$=Ha,x$=Tk,_$=gs,w$=function(e,r){b$(e,r,{name:"annotations",handleItemDefaults:T$})};function T$(t,e,r){function a(w,g){return Bv.coerce(t,e,_$,w,g)}var i=a("visible"),n=a("clicktoshow");if(i||n){x$(t,e,r,a);for(var o=e.showarrow,l=["x","y"],s=[-10,-30],f={_fullLayout:r},c=0;c<2;c++){var u=l[c],v=qi.coerceRef(t,e,f,u,"","paper");if(v!=="paper"){var h=qi.getFromId(f,v);h._annIndices.push(e._index)}if(qi.coercePosition(e,f,a,v,u,.5),o){var d="a"+u,p=qi.coerceRef(t,e,f,d,"pixel",["pixel","paper"]);p!=="pixel"&&p!==v&&(p=e[d]="pixel");var m=p==="pixel"?s[c]:.4;qi.coercePosition(e,f,a,p,d,m)}a(u+"anchor"),a(u+"shift")}if(Bv.noneOrAll(t,e,["x","y"]),o&&Bv.noneOrAll(t,e,["ax","ay"]),n){var y=a("xclick"),b=a("yclick");e._xclick=y===void 0?e.x:qi.cleanPosition(y,f,e.xref),e._yclick=b===void 0?e.y:qi.cleanPosition(b,f,e.yref)}}}var mh=me,on=Dt,k$=nm.draw,A$=function(e){var r=e._fullLayout,a=mh.filterVisible(r.annotations);if(a.length&&e._fullData.length)return mh.syncOrAsync([k$,M$],e)};function M$(t){var e=t._fullLayout;mh.filterVisible(e.annotations).forEach(function(r){var a=on.getFromId(t,r.xref),i=on.getFromId(t,r.yref),n=on.getRefType(r.xref),o=on.getRefType(r.yref);r._extremes={},n==="range"&&Cb(r,a),o==="range"&&Cb(r,i)})}function Cb(t,e){var r=e._id,a=r.charAt(0),i=t[a],n=t["a"+a],o=t[a+"ref"],l=t["a"+a+"ref"],s=t["_"+a+"padplus"],f=t["_"+a+"padminus"],c={x:1,y:-1}[a]*t[a+"shift"],u=3*t.arrowsize*t.arrowwidth||0,v=u+c,h=u-c,d=3*t.startarrowsize*t.arrowwidth||0,p=d+c,m=d-c,y;if(l===o){var b=on.findExtremes(e,[e.r2c(i)],{ppadplus:v,ppadminus:h}),w=on.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,m)});y={min:[b.min[0],w.min[0]],max:[b.max[0],w.max[0]]}}else p=n?p+n:p,m=n?m-n:m,y=on.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,v,p),ppadminus:Math.max(f,h,m)});t._extremes[r]=y}var S$=dt,L$=Oh,C$=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!(n||o))return;var l=e._fullLayout.annotations,s=r._id.charAt(0),f,c;function u(h){var d=f[h],p=null;n?p=L$(d,r.range):p=Math.pow(10,d),S$(p)||(p=null),i(c+h,p)}for(var v=0;v<l.length;v++)f=l[v],c="annotations["+v+"].",f[s+"ref"]===r._id&&u(s),f["a"+s+"ref"]===r._id&&u("a"+s)},Gv=nm,Db=m$,D$={moduleType:"component",name:"annotations",layoutAttributes:gs,supplyLayoutDefaults:w$,includeBasePlot:vu("annotations"),calcAutorange:A$,draw:Gv.draw,drawOne:Gv.drawOne,drawRaw:Gv.drawRaw,hasClickToShow:Db.hasClickToShow,onClick:Db.onClick,convertCoords:C$},Rt=gs,P$=Ia.overrideAll,E$=Lt.templatedArray,yh=P$(E$("annotation",{visible:Rt.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:Rt.xanchor,xshift:Rt.xshift,yanchor:Rt.yanchor,yshift:Rt.yshift,text:Rt.text,textangle:Rt.textangle,font:Rt.font,width:Rt.width,height:Rt.height,opacity:Rt.opacity,align:Rt.align,valign:Rt.valign,bgcolor:Rt.bgcolor,bordercolor:Rt.bordercolor,borderpad:Rt.borderpad,borderwidth:Rt.borderwidth,showarrow:Rt.showarrow,arrowcolor:Rt.arrowcolor,arrowhead:Rt.arrowhead,startarrowhead:Rt.startarrowhead,arrowside:Rt.arrowside,arrowsize:Rt.arrowsize,startarrowsize:Rt.startarrowsize,arrowwidth:Rt.arrowwidth,standoff:Rt.standoff,startstandoff:Rt.startstandoff,hovertext:Rt.hovertext,hoverlabel:Rt.hoverlabel,captureevents:Rt.captureevents}),"calc","from-root"),Uv=me,R$=Dt,z$=Ha,I$=Tk,F$=yh,$$=function(e,r,a){z$(e,r,{name:"annotations",handleItemDefaults:N$,fullLayout:a.fullLayout})};function N$(t,e,r,a){function i(l,s){return Uv.coerce(t,e,F$,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],R$.coercePosition(e,f,i,l,l,.5)}var o=i("visible");o&&(I$(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),Uv.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",i("ax",-10),i("ay",-30),Uv.noneOrAll(t,e,["ax","ay"])))}var Pb=me,Eb=Dt,H$=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)O$(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function O$(t,e){var r=e.fullSceneLayout,a=r.domain,i=e.fullLayout._size,n={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},Pb.extendFlat(t._xa,n),Eb.setConvert(t._xa),t._xa._offset=i.l+a.x[0]*i.w,t._xa.l2p=function(){return .5*(1+t._pdata[0]/t._pdata[3])*i.w*(a.x[1]-a.x[0])},t._ya={},Pb.extendFlat(t._ya,n),Eb.setConvert(t._ya),t._ya._offset=i.t+(1-a.y[1])*i.h,t._ya.l2p=function(){return .5*(1-t._pdata[1]/t._pdata[3])*i.h*(a.y[1]-a.y[0])}}function Vv(t,e){var r=[0,0,0,0],a,i;for(a=0;a<4;++a)for(i=0;i<4;++i)r[i]+=t[4*a+i]*e[a];return r}function j$(t,e){var r=Vv(t.projection,Vv(t.view,Vv(t.model,[e[0],e[1],e[2],1])));return r}var B$=j$,G$=nm.drawRaw,U$=B$,V$=["x","y","z"],X$=function(e){for(var r=e.fullSceneLayout,a=e.dataScale,i=r.annotations,n=0;n<i.length;n++){for(var o=i[n],l=!1,s=0;s<3;s++){var f=V$[s],c=o[f],u=r[f+"axis"],v=u.r2fraction(c);if(v<0||v>1){l=!0;break}}l?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+n+'"]').remove():(o._pdata=U$(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),G$(e.graphDiv,o,n,e.id,o._xa,o._ya))}},Y$=Je,Rb=me,W$={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:yh}}},layoutAttributes:yh,handleDefaults:$$,includeBasePlot:q$,convert:H$,draw:X$};function q$(t,e){var r=Y$.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,i=Object.keys(t),n=0;n<i.length;n++){var o=i[n];a.test(o)&&(t[o].annotations||[]).length&&(Rb.pushUnique(e._basePlotModules,r),Rb.pushUnique(e._subplots.gl3d,o))}}var zb=gs,Ib=vr,Fb=$i.line,Z$=Hr.dash,ua=Nt.extendFlat,K$=Lt.templatedArray,$b=cu,Vn=oa,Q$=mr.shapeTexttemplateAttrs,J$=Xh,kk=K$("shape",{visible:ua({},Vn.visible,{editType:"calc+arraydraw",description:["Determines whether or not this shape is visible.","If *legendonly*, the shape is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether or not this","shape is shown in the legend."].join(" ")},legend:ua({},Vn.legend,{editType:"calc+arraydraw",description:["Sets the reference to a legend to show this shape in.","References to these legends are *legend*, *legend2*, *legend3*, etc.","Settings for these legends are set in the layout, under","`layout.legend`, `layout.legend2`, etc."].join(" ")}),legendgroup:ua({},Vn.legendgroup,{editType:"calc+arraydraw",description:["Sets the legend group for this shape.","Traces and shapes part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")}),legendgrouptitle:{text:ua({},Vn.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Ib({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:ua({},Vn.legendrank,{editType:"calc+arraydraw",description:["Sets the legend rank for this shape.","Items and groups with smaller ranks are presented on top/left side while","with *reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items.","When having unranked or equal rank items shapes would be displayed after traces","i.e. according to their order in data and layout."].join(" ")}),legendwidth:ua({},Vn.legendwidth,{editType:"calc+arraydraw",description:"Sets the width (in px or fraction) of the legend for this shape."}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:ua({},zb.xref,{description:["Sets the shape's x coordinate axis.",$b.axisRefDescription("x","left","right")].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:ua({},zb.yref,{description:["Sets the shape's y coordinate axis.",$b.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:ua({},Fb.color,{editType:"arraydraw"}),width:ua({},Fb.width,{editType:"calc+arraydraw"}),dash:ua({},Z$,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},label:{text:{valType:"string",dflt:"",editType:"arraydraw",description:["Sets the text to display with shape.","It is also used for legend item if `name` is not provided."].join(" ")},texttemplate:Q$({},{keys:Object.keys(J$)}),font:Ib({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the shape label text font."}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw",description:["Sets the position of the label text relative to the shape.","Supported values for rectangles, circles and paths are","*top left*, *top center*, *top right*, *middle left*,","*middle center*, *middle right*, *bottom left*, *bottom center*,","and *bottom right*.","Supported values for lines are *start*, *middle*, and *end*.","Default: *middle center* for rectangles, circles, and paths; *middle* for lines."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw",description:["Sets the angle at which the label text is drawn","with respect to the horizontal. For lines, angle *auto*","is the same angle as the line. For all other shapes,","angle *auto* is horizontal."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the label's horizontal position anchor","This anchor binds the specified `textposition` to the *left*, *center*","or *right* of the label text.","For example, if `textposition` is set to *top right* and","`xanchor` to *right* then the right-most portion of the","label text lines up with the right-most edge of the","shape."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw",description:["Sets the label's vertical position anchor","This anchor binds the specified `textposition` to the *top*, *middle*","or *bottom* of the label text.","For example, if `textposition` is set to *top right* and","`yanchor` to *top* then the top-most portion of the","label text lines up with the top-most edge of the","shape."].join(" ")},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw",description:"Sets padding (in px) between edge of label and edge of shape."},editType:"arraydraw"},editType:"arraydraw"}),bl=me,Xn=Dt,eN=Ha,tN=kk,Nb=Fi,rN=function(e,r){eN(e,r,{name:"shapes",handleItemDefaults:iN})};function aN(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function iN(t,e,r){function a(M,C){return bl.coerce(t,e,tN,M,C)}e._isShape=!0;var i=a("visible");if(i){var n=a("showlegend");n&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),bl.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var o=a("path"),l=o?"path":"rect",s=a("type",l),f=s!=="path";f&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var c=a("line.width");c&&(a("line.color"),a("line.dash"));for(var u=a("xsizemode"),v=a("ysizemode"),h=["x","y"],d=0;d<2;d++){var p=h[d],m=p+"anchor",y=p==="x"?u:v,b={_fullLayout:r},w,g,x,_=Xn.coerceRef(t,e,b,p,void 0,"paper"),k=Xn.getRefType(_);if(k==="range"?(w=Xn.getFromId(b,_),w._shapeIndices.push(e._index),x=Nb.rangeToShapePosition(w),g=Nb.shapePositionToRange(w)):g=x=bl.identity,f){var T=.25,S=.75,D=p+"0",L=p+"1",R=t[D],z=t[L];t[D]=g(t[D],!0),t[L]=g(t[L],!0),y==="pixel"?(a(D,0),a(L,10)):(Xn.coercePosition(e,b,a,_,D,T),Xn.coercePosition(e,b,a,_,L,S)),e[D]=x(e[D]),e[L]=x(e[L]),t[D]=R,t[L]=z}if(y==="pixel"){var N=t[m];t[m]=g(t[m],!0),Xn.coercePosition(e,b,a,_,m,.25),e[m]=x(e[m]),t[m]=N}}f&&bl.noneOrAll(t,e,["x0","x1","y0","y1"]);var H=s==="line",$,P;if(f&&($=a("label.texttemplate")),$||(P=a("label.text")),P||$){a("label.textangle");var A=a("label.textposition",H?"middle":"middle center");a("label.xanchor"),a("label.yanchor",aN(H,A)),a("label.padding"),bl.coerceFont(a,"label.font",r.font)}}}var nN=ot,Hb=me;function oN(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}var lN=function(e,r,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),Hb.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var i=a("newshape.line.width");if(i){var n=(e||{}).plot_bgcolor||"#FFF";a("newshape.line.color",nN.contrast(n)),a("newshape.line.dash")}var o=e.dragmode==="drawline",l=a("newshape.label.text"),s=a("newshape.label.texttemplate");if(l||s){a("newshape.label.textangle");var f=a("newshape.label.textposition",o?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",oN(o,f)),a("newshape.label.padding"),Hb.coerceFont(a,"newshape.label.font",r.font)}a("activeshape.fillcolor"),a("activeshape.opacity")},gh=me,Yn=Dt,Ro=au,Ak=Fi,sN=function(e){var r=e._fullLayout,a=gh.filterVisible(r.shapes);if(!(!a.length||!e._fullData.length))for(var i=0;i<a.length;i++){var n=a[i];n._extremes={};var o,l,s=Yn.getRefType(n.xref),f=Yn.getRefType(n.yref);if(n.xref!=="paper"&&s!=="domain"){var c=n.xsizemode==="pixel"?n.xanchor:n.x0,u=n.xsizemode==="pixel"?n.xanchor:n.x1;o=Yn.getFromId(e,n.xref),l=Ob(o,c,u,n.path,Ro.paramIsX),l&&(n._extremes[o._id]=Yn.findExtremes(o,l,fN(n)))}if(n.yref!=="paper"&&f!=="domain"){var v=n.ysizemode==="pixel"?n.yanchor:n.y0,h=n.ysizemode==="pixel"?n.yanchor:n.y1;o=Yn.getFromId(e,n.yref),l=Ob(o,v,h,n.path,Ro.paramIsY),l&&(n._extremes[o._id]=Yn.findExtremes(o,l,cN(n)))}}};function fN(t){return Mk(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function cN(t){return Mk(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function Mk(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?Ak.extractPathCoords(i,n?Ro.paramIsY:Ro.paramIsX):[r,a],f=gh.aggNums(Math.max,null,s),c=gh.aggNums(Math.min,null,s),u=c<0?Math.abs(c)+o:o,v=f>0?f+o:o;return{ppad:o,ppadplus:l?u:v,ppadminus:l?v:u}}else return{ppad:o}}function Ob(t,e,r,a,i){var n=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(e!==void 0)return[n(e),n(r)];if(a){var o=1/0,l=-1/0,s=a.match(Ro.segmentRE),f,c,u,v,h;for(t.type==="date"&&(n=Ak.decodeDate(n)),f=0;f<s.length;f++)c=s[f],u=i[c.charAt(0)].drawn,u!==void 0&&(v=s[f].substr(1).match(Ro.paramRE),!(!v||v.length<u)&&(h=n(v[u]),h<o&&(o=h),h>l&&(l=h)));if(l>=o)return[o,l]}}var jb=Rp,uN={moduleType:"component",name:"shapes",layoutAttributes:kk,supplyLayoutDefaults:rN,supplyDrawNewShapeDefaults:lN,includeBasePlot:vu("shapes"),calcAutorange:sN,draw:jb.draw,drawOne:jb.drawOne},Bb=Lr,vN=Lt.templatedArray,Gb=cu,Sk=vN("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",Bb.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",Gb.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",Bb.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",Gb.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),dN=me,Xv=Dt,hN=Ha,pN=Sk,mN="images",yN=function(e,r){var a={name:mN,handleItemDefaults:gN};hN(e,r,a)};function gN(t,e,r){function a(v,h){return dN.coerce(t,e,pN,v,h)}var i=a("source"),n=a("visible",!!i);if(!n)return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:r},l=["x","y"],s=0;s<2;s++){var f=l[s],c=Xv.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var u=Xv.getFromId(o,c);u._imgIndices.push(e._index)}Xv.coercePosition(e,o,a,c,f,0)}return e}var Ub=ft,bN=xt,Wn=Dt,Vb=Wt,xN=Mn,_N=function(e){var r=e._fullLayout,a=[],i={},n=[],o,l;for(l=0;l<r.images.length;l++){var s=r.images[l];if(s.visible)if(s.layer==="below"&&s.xref!=="paper"&&s.yref!=="paper"){o=Vb.ref2id(s.xref)+Vb.ref2id(s.yref);var f=r._plots[o];if(!f){n.push(s);continue}f.mainplot&&(o=f.mainplot.id),i[o]||(i[o]=[]),i[o].push(s)}else s.layer==="above"?a.push(s):n.push(s)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function u(b){var w=Ub.select(this);if(this._imgSrc!==b.source)if(w.attr("xmlns",xN.svg),b.source&&b.source.slice(0,5)==="data:")w.attr("xlink:href",b.source),this._imgSrc=b.source;else{var g=new Promise((function(x){var _=new Image;this.img=_,_.setAttribute("crossOrigin","anonymous"),_.onerror=k,_.onload=function(){var T=document.createElement("canvas");T.width=this.width,T.height=this.height;var S=T.getContext("2d",{willReadFrequently:!0});S.drawImage(this,0,0);var D=T.toDataURL("image/png");w.attr("xlink:href",D),x()},w.on("error",k),_.src=b.source,this._imgSrc=b.source;function k(){w.remove(),x()}}).bind(this));e._promises.push(g)}}function v(b){var w=Ub.select(this),g=Wn.getFromId(e,b.xref),x=Wn.getFromId(e,b.yref),_=Wn.getRefType(b.xref)==="domain",k=Wn.getRefType(b.yref)==="domain",T=r._size,S,D;g!==void 0?S=typeof b.xref=="string"&&_?g._length*b.sizex:Math.abs(g.l2p(b.sizex)-g.l2p(0)):S=b.sizex*T.w,x!==void 0?D=typeof b.yref=="string"&&k?x._length*b.sizey:Math.abs(x.l2p(b.sizey)-x.l2p(0)):D=b.sizey*T.h;var L=S*c.x[b.xanchor].offset,R=D*c.y[b.yanchor].offset,z=c.x[b.xanchor].sizing+c.y[b.yanchor].sizing,N,H;switch(g!==void 0?N=typeof b.xref=="string"&&_?g._length*b.x+g._offset:g.r2p(b.x)+g._offset:N=b.x*T.w+T.l,N+=L,x!==void 0?H=typeof b.yref=="string"&&k?x._length*(1-b.y)+x._offset:x.r2p(b.y)+x._offset:H=T.h-b.y*T.h+T.t,H+=R,b.sizing){case"fill":z+=" slice";break;case"stretch":z="none";break}w.attr({x:N,y:H,width:S,height:D,preserveAspectRatio:z,opacity:b.opacity});var $=g&&Wn.getRefType(b.xref)!=="domain"?g._id:"",P=x&&Wn.getRefType(b.yref)!=="domain"?x._id:"",A=$+P;bN.setClipUrl(w,A?"clip"+r._uid+A:null,e)}var h=r._imageLowerLayer.selectAll("image").data(n),d=r._imageUpperLayer.selectAll("image").data(a);h.enter().append("image"),d.enter().append("image"),h.exit().remove(),d.exit().remove(),h.each(function(b){u.bind(this)(b),v.bind(this)(b)}),d.each(function(b){u.bind(this)(b),v.bind(this)(b)});var p=Object.keys(r._plots);for(l=0;l<p.length;l++){o=p[l];var m=r._plots[o];if(m.imagelayer){var y=m.imagelayer.selectAll("image").data(i[o]||[]);y.enter().append("image"),y.exit().remove(),y.each(function(b){u.bind(this)(b),v.bind(this)(b)})}}},Xb=dt,wN=Oh,TN=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(n||o){for(var l=e._fullLayout.images,s=r._id.charAt(0),f,c,u=0;u<l.length;u++)if(f=l[u],c="images["+u+"].",f[s+"ref"]===r._id){var v=f[s],h=f["size"+s],d=null,p=null;if(n){d=wN(v,r.range);var m=h/Math.pow(10,d)/2;p=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else d=Math.pow(10,v),p=d*(Math.pow(10,h/2)-Math.pow(10,-h/2));Xb(d)?Xb(p)||(p=null):(d=null,p=null),i(c+s,d),i(c+"size"+s,p)}}},kN={moduleType:"component",name:"images",layoutAttributes:Sk,supplyLayoutDefaults:yN,includeBasePlot:vu("images"),draw:_N,convertCoords:TN},om={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:"▼"}},AN=vr,MN=xr,SN=Nt.extendFlat,LN=Ia.overrideAll,CN=Yh,Lk=Lt.templatedArray,DN=Lk("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),Ck=LN(Lk("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:DN,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:SN(CN({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:AN({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:MN.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root"),Gf=me,Dk=Ha,Pk=Ck,PN=om,EN=PN.name,RN=Pk.buttons,zN=function(e,r){var a={name:EN,handleItemDefaults:IN};Dk(e,r,a)};function IN(t,e,r){function a(o,l){return Gf.coerce(t,e,Pk,o,l)}var i=Dk(t,e,{name:"buttons",handleItemDefaults:FN}),n=a("visible",i.length>0);n&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Gf.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Gf.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function FN(t,e){function r(i,n){return Gf.coerce(t,e,RN,i,n)}var a=r("visible",t.method==="skip"||Array.isArray(t.args));a&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}var $N=Ot,ya=ft,Yb=ot,To=xt,gc=me;function Ot(t,e,r){this.gd=t,this.container=e,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})}Ot.barWidth=2;Ot.barLength=20;Ot.barRadius=2;Ot.barPad=1;Ot.barColor="#808BA4";Ot.prototype.enable=function(e,r,a){var i=this.gd._fullLayout,n=i.width,o=i.height;this.position=e;var l=this.position.l,s=this.position.w,f=this.position.t,c=this.position.h,u=this.position.direction,v=u==="down",h=u==="left",d=u==="right",p=u==="up",m=s,y=c,b,w,g,x;!v&&!h&&!d&&!p&&(this.position.direction="down",v=!0);var _=v||p;_?(b=l,w=b+m,v?(g=f,x=Math.min(g+y,o),y=x-g):(x=f+y,g=Math.max(x-y,0),y=x-g)):(g=f,x=g+y,h?(w=l+m,b=Math.max(w-m,0),m=w-b):(b=l,w=Math.min(b+m,n),m=w-b)),this._box={l:b,t:g,w:m,h:y};var k=s>m,T=Ot.barLength+2*Ot.barPad,S=Ot.barWidth+2*Ot.barPad,D=l,L=f+c;L+S>o&&(L=o-S);var R=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(Yb.fill,Ot.barColor),k?(this.hbar=R.attr({rx:Ot.barRadius,ry:Ot.barRadius,x:D,y:L,width:T,height:S}),this._hbarXMin=D+T/2,this._hbarTranslateMax=m-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=c>y,N=Ot.barWidth+2*Ot.barPad,H=Ot.barLength+2*Ot.barPad,$=l+s,P=f;$+N>n&&($=n-N);var A=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);A.exit().on(".drag",null).remove(),A.enter().append("rect").classed("scrollbar-vertical",!0).call(Yb.fill,Ot.barColor),z?(this.vbar=A.attr({rx:Ot.barRadius,ry:Ot.barRadius,x:$,y:P,width:N,height:H}),this._vbarYMin=P+H/2,this._vbarTranslateMax=y-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var M=this.id,C=b-.5,E=z?w+N+.5:w+.5,F=g-.5,j=k?x+S+.5:x+.5,B=i._topdefs.selectAll("#"+M).data(k||z?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",M).append("rect"),k||z?(this._clipRect=B.select("rect").attr({x:Math.floor(C),y:Math.floor(F),width:Math.ceil(E)-Math.floor(C),height:Math.ceil(j)-Math.floor(F)}),this.container.call(To.setClipUrl,M,this.gd),this.bg.attr({x:l,y:f,width:s,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(To.setClipUrl,null),delete this._clipRect),k||z){var G=ya.behavior.drag().on("dragstart",function(){ya.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(G);var O=ya.behavior.drag().on("dragstart",function(){ya.event.sourceEvent.preventDefault(),ya.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(O),z&&this.vbar.on(".drag",null).call(O)}this.setTranslate(r,a)};Ot.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(To.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)};Ot.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=ya.event.dx),this.vbar&&(r-=ya.event.dy),this.setTranslate(e,r)};Ot.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=ya.event.deltaY),this.vbar&&(r+=ya.event.deltaY),this.setTranslate(e,r)};Ot.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=gc.constrain(ya.event.x,a,i),o=(n-a)/(i-a),l=this.position.w-this._box.w;e=o*l}if(this.vbar){var s=r+this._vbarYMin,f=s+this._vbarTranslateMax,c=gc.constrain(ya.event.y,s,f),u=(c-s)/(f-s),v=this.position.h-this._box.h;r=u*v}this.setTranslate(e,r)};Ot.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=gc.constrain(e||0,0,a),r=gc.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(To.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=e/a;this.hbar.call(To.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(To.setTranslate,e,r+o*this._vbarTranslateMax)}};var zo=ft,is=Qt,ns=ot,Io=xt,jr=me,bc=nr,NN=Lt.arrayEditor,Ek=Cr.LINE_SPACING,tt=om,HN=$N,ON=function(e){var r=e._fullLayout,a=jr.filterVisible(r[tt.name]);function i(v){is.autoMargin(e,$k(v))}var n=r._menulayer.selectAll("g."+tt.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(tt.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){zo.select(this).selectAll("g."+tt.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+tt.headerGroupClassName).data(a,jN);o.enter().append("g").classed(tt.headerGroupClassName,!0);for(var l=jr.ensureSingle(n,"g",tt.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];YN(e,f)}var c="updatemenus"+r._uid,u=new HN(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(xh)),o.exit().each(function(v){l.call(xh),i(v)}).remove(),o.each(function(v){var h=zo.select(this),d=v.type==="dropdown"?l:null;is.manageCommandObserver(e,v,v.buttons,function(p){bh(e,v,v.buttons[p.index],h,d,u,p.index,!0)}),v.type==="dropdown"?(zk(e,h,l,u,v),Rk(l,v)&&os(e,h,l,u,v)):os(e,h,null,null,v)})}};function jN(t){return t._index}function BN(t){return+t.attr(tt.menuIndexAttrName)==-1}function Rk(t,e){return+t.attr(tt.menuIndexAttrName)===e._index}function bh(t,e,r,a,i,n,o,l){e.active=o,NN(t.layout,tt.name,e).applyUpdate("active",o),e.type==="buttons"?os(t,a,null,null,e):e.type==="dropdown"&&(i.attr(tt.menuIndexAttrName,"-1"),zk(t,a,i,n,e),l||os(t,a,i,n,e))}function zk(t,e,r,a,i){var n=jr.ensureSingle(e,"g",tt.headerClassName,function(v){v.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||tt.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};n.call(lm,i,s,t).call(Nk,i,f,c);var u=jr.ensureSingle(e,"text",tt.headerArrowClassName,function(v){v.attr("text-anchor","end").call(Io.font,i.font).text(tt.arrowSymbol[i.direction])});u.attr({x:o.headerWidth-tt.arrowOffsetX+i.pad.l,y:o.headerHeight/2+tt.textOffsetY+i.pad.t}),n.on("click",function(){r.call(xh,String(Rk(r,i)?-1:i._index)),os(t,e,r,a,i)}),n.on("mouseover",function(){n.call(Ik)}),n.on("mouseout",function(){n.call(Fk,i)}),Io.setTranslate(e,o.lx,o.ly)}function os(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!BN(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?tt.dropdownButtonClassName:tt.buttonClassName,l=r.selectAll("g."+o).data(jr.filterVisible(n)),s=l.enter().append("g").classed(o,!0),f=l.exit();i.type==="dropdown"?(s.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var c=0,u=0,v=i._dims,h=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(h?u=v.headerHeight+tt.gapButtonHeader:c=v.headerWidth+tt.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(u=-tt.gapButtonHeader+tt.gapButton-v.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-tt.gapButtonHeader+tt.gapButton-v.openWidth);var d={x:v.lx+c+i.pad.l,y:v.ly+u+i.pad.t,yPad:tt.gapButton,xPad:tt.gapButton,index:0},p={l:d.x+i.borderwidth,t:d.y+i.borderwidth};l.each(function(m,y){var b=zo.select(this);b.call(lm,i,m,t).call(Nk,i,d),b.on("click",function(){zo.event.defaultPrevented||(m.execute&&(m.args2&&i.active===y?(bh(t,i,m,e,r,a,-1),is.executeAPICommand(t,m.method,m.args2)):(bh(t,i,m,e,r,a,y),is.executeAPICommand(t,m.method,m.args))),t.emit("plotly_buttonclicked",{menu:i,button:m,active:i.active}))}),b.on("mouseover",function(){b.call(Ik)}),b.on("mouseout",function(){b.call(Fk,i),l.call(Wb,i)})}),l.call(Wb,i),h?(p.w=Math.max(v.openWidth,v.headerWidth),p.h=d.y-p.t):(p.w=d.x-p.l,p.h=Math.max(v.openHeight,v.headerHeight)),p.direction=i.direction,a&&(l.size()?GN(t,e,r,a,i,p):UN(a))}function GN(t,e,r,a,i,n){var o=i.direction,l=o==="up"||o==="down",s=i._dims,f=i.active,c,u,v;if(l)for(u=0,v=0;v<f;v++)u+=s.heights[v]+tt.gapButton;else for(c=0,v=0;v<f;v++)c+=s.widths[v]+tt.gapButton;a.enable(n,c,u),a.hbar&&a.hbar.attr("opacity","0").transition().attr("opacity","1"),a.vbar&&a.vbar.attr("opacity","0").transition().attr("opacity","1")}function UN(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",function(){e=!1,r||t.disable()}),r&&t.vbar.transition().attr("opacity","0").each("end",function(){r=!1,e||t.disable()})}function lm(t,e,r,a){t.call(VN,e).call(XN,e,r,a)}function VN(t,e){var r=jr.ensureSingle(t,"rect",tt.itemRectClassName,function(a){a.attr({rx:tt.rx,ry:tt.ry,"shape-rendering":"crispEdges"})});r.call(ns.stroke,e.bordercolor).call(ns.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function XN(t,e,r,a){var i=jr.ensureSingle(t,"text",tt.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=jr.templateString(n,o)),i.call(Io.font,e.font).text(n).call(bc.convertToTspans,a)}function Wb(t,e){var r=e.active;t.each(function(a,i){var n=zo.select(this);i===r&&e.showactive&&n.select("rect."+tt.itemRectClassName).call(ns.fill,tt.activeColor)})}function Ik(t){t.select("rect."+tt.itemRectClassName).call(ns.fill,tt.hoverColor)}function Fk(t,e){t.select("rect."+tt.itemRectClassName).call(ns.fill,e.bgcolor)}function YN(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=Io.tester.selectAll("g."+tt.dropdownButtonClassName).data(jr.filterVisible(e.buttons));a.enter().append("g").classed(tt.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,u){var v=zo.select(this);v.call(lm,e,c,t);var h=v.select("."+tt.itemTextClassName),d=h.node()&&Io.bBox(h.node()).width,p=Math.max(d+tt.textPadX,tt.minWidth),m=e.font.size*Ek,y=bc.lineCount(h),b=Math.max(m*y,tt.minHeight)+tt.textOffsetY;b=Math.ceil(b),p=Math.ceil(p),r.widths[u]=p,r.heights[u]=b,r.height1=Math.max(r.height1,b),r.width1=Math.max(r.width1,p),i?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=b+tt.gapButton,r.openHeight+=b+tt.gapButton):(r.totalWidth+=p+tt.gapButton,r.openWidth+=p+tt.gapButton,r.totalHeight=Math.max(r.totalHeight,b),r.openHeight=r.totalHeight)}),i?r.totalHeight-=tt.gapButton:r.totalWidth-=tt.gapButton,r.headerWidth=r.width1+tt.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=tt.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=tt.arrowPadX),a.remove();var n=r.totalWidth+e.pad.l+e.pad.r,o=r.totalHeight+e.pad.t+e.pad.b,l=t._fullLayout._size;r.lx=l.l+l.w*e.x,r.ly=l.t+l.h*(1-e.y);var s="left";jr.isRightAnchor(e)&&(r.lx-=n,s="right"),jr.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";jr.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),jr.isMiddleAnchor(e)&&(r.ly-=o/2,f="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),is.autoMargin(t,$k(e),{x:e.x,y:e.y,l:n*({right:1,center:.5}[s]||0),r:n*({left:1,center:.5}[s]||0),b:o*({top:1,middle:.5}[f]||0),t:o*({bottom:1,middle:.5}[f]||0)})}function $k(t){return tt.autoMarginIdRoot+t._index}function Nk(t,e,r,a){a=a||{};var i=t.select("."+tt.itemRectClassName),n=t.select("."+tt.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;Io.setTranslate(t,o+r.x,o+r.y);var f=["up","down"].indexOf(e.direction)!==-1,c=a.height||(f?s.heights[l]:s.height1);i.attr({x:0,y:0,width:a.width||(f?s.width1:s.widths[l]),height:c});var u=e.font.size*Ek,v=bc.lineCount(n),h=(v-1)*u/2;bc.positionText(n,tt.textOffsetX,c/2-h+tt.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function xh(t,e){t.attr(tt.menuIndexAttrName,e||"-1").selectAll("g."+tt.dropdownButtonClassName).remove()}var WN=om,qN={moduleType:"component",name:WN.name,layoutAttributes:Ck,supplyLayoutDefaults:zN,draw:ON},gu={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",autoMarginIdRoot:"slider-",railRadius:2,railWidth:5,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickLength:4,currentValueInset:0},qb=vr,ZN=Yh,KN=Nt.extendDeepAll,QN=Ia.overrideAll,JN=Nc,Hk=Lt.templatedArray,Zi=gu,e4=Hk("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),Ok=QN(Hk("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:e4,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:KN(ZN({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:JN.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:qb({description:"Sets the font of the current value label text."})},font:qb({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:Zi.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:Zi.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:Zi.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:Zi.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:Zi.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:Zi.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:Zi.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),fo=me,jk=Ha,Bk=Ok,t4=gu,r4=t4.name,a4=Bk.steps,i4=function(e,r){jk(e,r,{name:r4,handleItemDefaults:n4})};function n4(t,e,r){function a(u,v){return fo.coerce(t,e,Bk,u,v)}for(var i=jk(t,e,{name:"steps",handleItemDefaults:o4}),n=0,o=0;o<i.length;o++)i[o].visible&&n++;var l;if(n<2?l=e.visible=!1:l=a("visible"),!!l){e._stepCount=n;var s=e._visibleSteps=fo.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),fo.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("len"),a("lenmode"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),fo.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),fo.coerceFont(a,"currentvalue.font",e.font)),a("transition.duration"),a("transition.easing"),a("bgcolor"),a("activebgcolor"),a("bordercolor"),a("borderwidth"),a("ticklen"),a("tickwidth"),a("tickcolor"),a("minorticklen")}}function o4(t,e){function r(n,o){return fo.coerce(t,e,a4,n,o)}var a;if(t.method!=="skip"&&!Array.isArray(t.args)?a=e.visible=!1:a=r("visible"),a){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}var ga=ft,xc=Qt,Li=ot,xa=xt,Br=me,l4=Br.strTranslate,$l=nr,s4=Lt.arrayEditor,ut=gu,sm=Cr,Gk=sm.LINE_SPACING,Yv=sm.FROM_TL,Wv=sm.FROM_BR,f4=function(e){var r=e._context.staticPlot,a=e._fullLayout,i=c4(a,e),n=a._infolayer.selectAll("g."+ut.containerClassName).data(i.length>0?[0]:[]);n.enter().append("g").classed(ut.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),xc.autoMargin(e,Uk(c))}if(n.exit().each(function(){ga.select(this).selectAll("g."+ut.groupClassName).each(o)}).remove(),i.length!==0){var l=n.selectAll("g."+ut.groupClassName).data(i,u4);l.enter().append("g").classed(ut.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s<i.length;s++){var f=i[s];v4(e,f)}l.each(function(c){var u=ga.select(this);y4(c),xc.manageCommandObserver(e,c,c._visibleSteps,function(v){var h=u.data()[0];h.active!==v.index&&(h._dragging||Xk(e,u,h,v.index,!1,!0))}),d4(e,ga.select(this),c)})}};function Uk(t){return ut.autoMarginIdRoot+t._index}function c4(t,e){for(var r=t[ut.name],a=[],i=0;i<r.length;i++){var n=r[i];n.visible&&(n._gd=e,a.push(n))}return a}function u4(t){return t._index}function v4(t,e){var r=xa.tester.selectAll("g."+ut.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(ut.labelGroupClass,!0);var a=0,i=0;r.each(function(d){var p=ga.select(this),m=Vk(p,{step:d},e),y=m.node();if(y){var b=xa.bBox(y);i=Math.max(i,b.height),a=Math.max(a,b.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(ut.railWidth,ut.gripHeight);var o=t._fullLayout._size;n.lx=o.l+o.w*e.x,n.ly=o.t+o.h*(1-e.y),e.lenmode==="fraction"?n.outerLength=Math.round(o.w*e.len):n.outerLength=e.len,n.inputAreaStart=0,n.inputAreaLength=Math.round(n.outerLength-e.pad.l-e.pad.r);var l=n.inputAreaLength-2*ut.stepInset,s=l/(e._stepCount-1),f=a+ut.labelPadding;if(n.labelStride=Math.max(1,Math.ceil(f/s)),n.labelHeight=i,n.currentValueMaxWidth=0,n.currentValueHeight=0,n.currentValueTotalHeight=0,n.currentValueMaxLines=1,e.currentvalue.visible){var c=xa.tester.append("g");r.each(function(d){var p=_c(c,e,d.label),m=p.node()&&xa.bBox(p.node())||{width:0,height:0},y=$l.lineCount(p);n.currentValueMaxWidth=Math.max(n.currentValueMaxWidth,Math.ceil(m.width)),n.currentValueHeight=Math.max(n.currentValueHeight,Math.ceil(m.height)),n.currentValueMaxLines=Math.max(n.currentValueMaxLines,y)}),n.currentValueTotalHeight=n.currentValueHeight+e.currentvalue.offset,c.remove()}n.height=n.currentValueTotalHeight+ut.tickOffset+e.ticklen+ut.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var u="left";Br.isRightAnchor(e)&&(n.lx-=n.outerLength,u="right"),Br.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,u="center");var v="top";Br.isBottomAnchor(e)&&(n.ly-=n.height,v="bottom"),Br.isMiddleAnchor(e)&&(n.ly-=n.height/2,v="middle"),n.outerLength=Math.ceil(n.outerLength),n.height=Math.ceil(n.height),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly);var h={y:e.y,b:n.height*Wv[v],t:n.height*Yv[v]};e.lenmode==="fraction"?(h.l=0,h.xl=e.x-e.len*Yv[u],h.r=0,h.xr=e.x+e.len*Wv[u]):(h.x=e.x,h.l=n.outerLength*Yv[u],h.r=n.outerLength*Wv[u]),xc.autoMargin(t,Uk(e),h)}function d4(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(_c,r).call(b4,r).call(p4,r).call(m4,r).call(g4,t,r).call(h4,t,r);var a=r._dims;xa.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(Wk,r,!1),e.call(_c,r)}function _c(t,e,r){if(e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-ut.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=ut.currentValueInset,n="left"}var o=Br.ensureSingle(t,"text",ut.labelClass,function(v){v.attr({"text-anchor":n,"data-notex":1})}),l=e.currentvalue.prefix?e.currentvalue.prefix:"";if(typeof r=="string")l+=r;else{var s=e.steps[e.active].label,f=e._gd._fullLayout._meta;f&&(s=Br.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(xa.font,e.currentvalue.font).text(l).call($l.convertToTspans,e._gd);var c=$l.lineCount(o),u=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*Gk;return $l.positionText(o,i,u),o}}function h4(t,e,r){var a=Br.ensureSingle(t,"rect",ut.gripRectClass,function(i){i.call(Yk,e,t,r).style("pointer-events","all")});a.attr({width:ut.gripWidth,height:ut.gripHeight,rx:ut.gripRadius,ry:ut.gripRadius}).call(Li.stroke,r.bordercolor).call(Li.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function Vk(t,e,r){var a=Br.ensureSingle(t,"text",ut.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=Br.templateString(i,n)),a.call(xa.font,r.font).text(i).call($l.convertToTspans,r._gd),a}function p4(t,e){var r=Br.ensureSingle(t,"g",ut.labelsClass),a=e._dims,i=r.selectAll("g."+ut.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(ut.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=ga.select(this);o.call(Vk,n,e),xa.setTranslate(o,fm(e,n.fraction),ut.tickOffset+e.ticklen+e.font.size*Gk+ut.labelOffset+a.currentValueTotalHeight)})}function Zb(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&Xk(t,e,r,o,!0,i)}function Xk(t,e,r,a,i,n){var o=r.active;r.active=a,s4(t.layout,ut.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(Wk,r,n),e.call(_c,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=n):(e._nextMethod={step:l,doCallback:i,doTransition:n},e._nextMethodRaf=window.requestAnimationFrame(function(){var s=e._nextMethod.step;s.method&&(s.execute&&xc.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function Yk(t,e,r){if(e._context.staticPlot)return;var a=r.node(),i=ga.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+ut.gripRectClass);ga.event.stopPropagation(),ga.event.preventDefault(),s.call(Li.fill,l.activebgcolor);var f=Kb(l,ga.mouse(a)[0]);Zb(e,r,l,f,!0),l._dragging=!0;function c(){var v=n(),h=Kb(v,ga.mouse(a)[0]);Zb(e,r,v,h,!1)}i.on("mousemove",c),i.on("touchmove",c);function u(){var v=n();v._dragging=!1,s.call(Li.fill,v.bgcolor),i.on("mouseup",null),i.on("mousemove",null),i.on("touchend",null),i.on("touchmove",null),e.emit("plotly_sliderend",{slider:v,step:v.steps[v.active]})}i.on("mouseup",u),i.on("touchend",u)}t.on("mousedown",o),t.on("touchstart",o)}function m4(t,e){var r=t.selectAll("rect."+ut.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(ut.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(i,n){var o=n%a.labelStride===0,l=ga.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(Li.fill,e.tickcolor),xa.setTranslate(l,fm(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?ut.tickOffset:ut.minorTickOffset)+a.currentValueTotalHeight)})}function y4(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,a=0;a<r;a+=e.labelStride)e.labelSteps.push({fraction:a/(r-1),step:t._visibleSteps[a]})}function Wk(t,e,r){for(var a=t.select("rect."+ut.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=fm(e,i/(e._stepCount-1));if(!e._invokingCommand){var l=a;r&&e.transition.duration>0&&(l=l.transition().duration(e.transition.duration).ease(e.transition.easing)),l.attr("transform",l4(o-ut.gripWidth*.5,e._dims.currentValueTotalHeight))}}function fm(t,e){var r=t._dims;return r.inputAreaStart+ut.stepInset+(r.inputAreaLength-2*ut.stepInset)*Math.min(1,Math.max(0,e))}function Kb(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-ut.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*ut.stepInset-2*r.inputAreaStart)))}function g4(t,e,r){var a=r._dims,i=Br.ensureSingle(t,"rect",ut.railTouchRectClass,function(n){n.call(Yk,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,ut.tickOffset+r.ticklen+a.labelHeight)}).call(Li.fill,r.bgcolor).attr("opacity",0),xa.setTranslate(i,0,a.currentValueTotalHeight)}function b4(t,e){var r=e._dims,a=r.inputAreaLength-ut.railInset*2,i=Br.ensureSingle(t,"rect",ut.railRectClass);i.attr({width:a,height:ut.railWidth,rx:ut.railRadius,ry:ut.railRadius,"shape-rendering":"crispEdges"}).call(Li.stroke,e.bordercolor).call(Li.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),xa.setTranslate(i,ut.railInset,(r.inputAreaWidth-ut.railWidth)*.5+r.currentValueTotalHeight)}var x4=gu,_4={moduleType:"component",name:x4.name,layoutAttributes:Ok,supplyLayoutDefaults:i4,draw:f4},Qb=xr,cm={bgcolor:{valType:"color",dflt:Qb.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:Qb.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"},qk={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"},bu={},um={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},w4=Wt,T4=nr,Zk=um,k4=Cr.LINE_SPACING,wc=Zk.name;function Kk(t){var e=t&&t[wc];return e&&e.visible}bu.isVisible=Kk;bu.makeData=function(t){var e=w4.list({_fullLayout:t},"x",!0),r=t.margin,a=[];if(!t._has("gl2d"))for(var i=0;i<e.length;i++){var n=e[i];if(Kk(n)){a.push(n);var o=n[wc];o._id=wc+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};bu.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[wc],i=e._id.charAt(0),n=0,o=0;if(e.side==="bottom"&&(n=e._depth,e.title.text!==r._dfltTitle[i])){o=1.5*e.title.font.size+10+a._offsetShift;var l=(e.title.text.match(T4.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*k4}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:Zk.extraPad+a._offsetShift*2}};var qv,Jb;function A4(){if(Jb)return qv;Jb=1;var t=me,e=Lt,r=Wt,a=cm,i=qk;return qv=function(o,l,s){var f=o[s],c=l[s];if(!(f.rangeslider||l._requestRangeslider[c._id]))return;t.isPlainObject(f.rangeslider)||(f.rangeslider={});var u=f.rangeslider,v=e.newContainer(c,"rangeslider");function h(D,L){return t.coerce(u,v,a,D,L)}var d,p;function m(D,L){return t.coerce(d,p,i,D,L)}var y=h("visible");if(y){h("bgcolor",l.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!c.isValidRange(u.range)),h("range");var b=l._subplots;if(b)for(var w=b.cartesian.filter(function(D){return D.substr(0,D.indexOf("y"))===r.name2id(s)}).map(function(D){return D.substr(D.indexOf("y"),D.length)}),g=t.simpleMap(w,r.id2name),x=0;x<g.length;x++){var _=g[x];d=u[_]||{},p=e.newContainer(v,_,"yaxis");var k=l[_],T;d.range&&k.isValidRange(d.range)&&(T="fixed");var S=m("rangemode",T);S!=="match"&&m("range",k.range.slice())}v._input=u}},qv}var Zv,ex;function M4(){if(ex)return Zv;ex=1;var t=Wt.list,e=ms.getAutoRange,r=um;return Zv=function(i){for(var n=t(i,"x",!0),o=0;o<n.length;o++){var l=n[o],s=l[r.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=e(i,l))}},Zv}var Kv,tx;function S4(){if(tx)return Kv;tx=1;var t=ft,e=Je,r=Qt,a=me,i=a.strTranslate,n=xt,o=ot,l=Wc,s=Jt,f=Wt,c=Oa,u=zi,v=um;Kv=function(T){for(var S=T._fullLayout,D=S._rangeSliderData,L=0;L<D.length;L++){var R=D[L][v.name];R._clipId=R._id+"-"+S._uid}function z(H){return H._name}var N=S._infolayer.selectAll("g."+v.containerClassName).data(D,z);N.exit().each(function(H){var $=H[v.name];S._topdefs.select("#"+$._clipId).remove()}).remove(),D.length!==0&&(N.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),N.each(function(H){var $=t.select(this),P=H[v.name],A=S[f.id2name(H.anchor)],M=P[f.id2name(H.anchor)];if(P.range){var C=a.simpleMap(P.range,H.r2l),E=a.simpleMap(H.range,H.r2l),F;E[0]<E[1]?F=[Math.min(C[0],E[0]),Math.max(C[1],E[1])]:F=[Math.max(C[0],E[0]),Math.min(C[1],E[1])],P.range=P._input.range=a.simpleMap(F,H.l2r)}H.cleanRange("rangeslider.range");var j=S._size,B=H.domain;P._width=j.w*(B[1]-B[0]);var G=Math.round(j.l+j.w*B[0]),O=Math.round(j.t+j.h*(1-H._counterDomainMin)+(H.side==="bottom"?H._depth:0)+P._offsetShift+v.extraPad);$.attr("transform",i(G,O)),P._rl=a.simpleMap(P.range,H.r2l);var W=P._rl[0],V=P._rl[1],Z=V-W;if(P.p2d=function(Te){return Te/P._width*Z+W},P.d2p=function(Te){return(Te-W)/Z*P._width},H.rangebreaks){var X=H.locateBreaks(W,V);if(X.length){var Q,te,xe=0;for(Q=0;Q<X.length;Q++)te=X[Q],xe+=te.max-te.min;var ue=P._width/(V-W-xe),ae=[-ue*W];for(Q=0;Q<X.length;Q++)te=X[Q],ae.push(ae[ae.length-1]-ue*(te.max-te.min));for(P.d2p=function(Te){for(var Le=ae[0],_e=0;_e<X.length;_e++){var Ie=X[_e];if(Te>=Ie.max)Le=ae[_e+1];else if(Te<Ie.min)break}return Le+ue*Te},Q=0;Q<X.length;Q++)te=X[Q],te.pmin=P.d2p(te.min),te.pmax=P.d2p(te.max);P.p2d=function(Te){for(var Le=ae[0],_e=0;_e<X.length;_e++){var Ie=X[_e];if(Te>=Ie.pmax)Le=ae[_e+1];else if(Te<Ie.pmin)break}return(Te-Le)/ue}}}if(M.rangemode!=="match"){var le=A.r2l(M.range[0]),de=A.r2l(M.range[1]),be=de-le;P.d2pOppAxis=function(Te){return(Te-le)/be*P._height}}$.call(y,T,H,P).call(b,T,H,P).call(w,T,H,P).call(x,T,H,P,M).call(_,T,H,P).call(k,T,H,P),d($,T,H,P),m($,T,H,P,A,M),H.side==="bottom"&&l.draw(T,H._id+"title",{propContainer:H,propName:H._name+".title",placeholder:S._dfltTitle.x,attributes:{x:H._offset+H._length/2,y:O+P._height+P._offsetShift+10+1.5*H.title.font.size,"text-anchor":"middle"}})}))};function h(T){return typeof T.clientX=="number"?T.clientX:T.touches&&T.touches.length>0?T.touches[0].clientX:0}function d(T,S,D,L){if(S._context.staticPlot)return;var R=T.select("rect."+v.slideBoxClassName).node(),z=T.select("rect."+v.grabAreaMinClassName).node(),N=T.select("rect."+v.grabAreaMaxClassName).node();function H(){var $=t.event,P=$.target,A=h($),M=A-T.node().getBoundingClientRect().left,C=L.d2p(D._rl[0]),E=L.d2p(D._rl[1]),F=c.coverSlip();this.addEventListener("touchmove",j),this.addEventListener("touchend",B),F.addEventListener("mousemove",j),F.addEventListener("mouseup",B);function j(G){var O=h(G),W=+O-A,V,Z,X;switch(P){case R:if(X="ew-resize",C+W>D._length||E+W<0)return;V=C+W,Z=E+W;break;case z:if(X="col-resize",C+W>D._length)return;V=C+W,Z=E;break;case N:if(X="col-resize",E+W<0)return;V=C,Z=E+W;break;default:X="ew-resize",V=M,Z=M+W;break}if(Z<V){var Q=Z;Z=V,V=Q}L._pixelMin=V,L._pixelMax=Z,u(t.select(F),X),p(T,S,D,L)}function B(){F.removeEventListener("mousemove",j),F.removeEventListener("mouseup",B),this.removeEventListener("touchmove",j),this.removeEventListener("touchend",B),a.removeElement(F)}}T.on("mousedown",H),T.on("touchstart",H)}function p(T,S,D,L){function R(H){return D.l2r(a.constrain(H,L._rl[0],L._rl[1]))}var z=R(L.p2d(L._pixelMin)),N=R(L.p2d(L._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",S,D._name+".range",[z,N])})}function m(T,S,D,L,R,z){var N=v.handleWidth/2;function H(G){return a.constrain(G,0,L._width)}function $(G){return a.constrain(G,0,L._height)}function P(G){return a.constrain(G,-N,L._width+N)}var A=H(L.d2p(D._rl[0])),M=H(L.d2p(D._rl[1]));if(T.select("rect."+v.slideBoxClassName).attr("x",A).attr("width",M-A),T.select("rect."+v.maskMinClassName).attr("width",A),T.select("rect."+v.maskMaxClassName).attr("x",M).attr("width",L._width-M),z.rangemode!=="match"){var C=L._height-$(L.d2pOppAxis(R._rl[1])),E=L._height-$(L.d2pOppAxis(R._rl[0]));T.select("rect."+v.maskMinOppAxisClassName).attr("x",A).attr("height",C).attr("width",M-A),T.select("rect."+v.maskMaxOppAxisClassName).attr("x",A).attr("y",E).attr("height",L._height-E).attr("width",M-A),T.select("rect."+v.slideBoxClassName).attr("y",C).attr("height",E-C)}var F=.5,j=Math.round(P(A-N))-F,B=Math.round(P(M-N))+F;T.select("g."+v.grabberMinClassName).attr("transform",i(j,F)),T.select("g."+v.grabberMaxClassName).attr("transform",i(B,F))}function y(T,S,D,L){var R=a.ensureSingle(T,"rect",v.bgClassName,function($){$.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),z=L.borderwidth%2===0?L.borderwidth:L.borderwidth-1,N=-L._offsetShift,H=n.crispRound(S,L.borderwidth);R.attr({width:L._width+z,height:L._height+z,transform:i(N,N),"stroke-width":H}).call(o.stroke,L.bordercolor).call(o.fill,L.bgcolor)}function b(T,S,D,L){var R=S._fullLayout,z=a.ensureSingleById(R._topdefs,"clipPath",L._clipId,function(N){N.append("rect").attr({x:0,y:0})});z.select("rect").attr({width:L._width,height:L._height})}function w(T,S,D,L){var R=S.calcdata,z=T.selectAll("g."+v.rangePlotClassName).data(D._subplotsWith,a.identity);z.enter().append("g").attr("class",function(H){return v.rangePlotClassName+" "+H}).call(n.setClipUrl,L._clipId,S),z.order(),z.exit().remove();var N;z.each(function(H,$){var P=t.select(this),A=$===0,M=f.getFromId(S,H,"y"),C=M._name,E=L[C],F={data:[],layout:{xaxis:{type:D.type,domain:[0,1],range:L.range.slice(),calendar:D.calendar},width:L._width,height:L._height,margin:{t:0,b:0,l:0,r:0}},_context:S._context};D.rangebreaks&&(F.layout.xaxis.rangebreaks=D.rangebreaks),F.layout[C]={type:M.type,domain:[0,1],range:E.rangemode!=="match"?E.range.slice():M.range.slice(),calendar:M.calendar},M.rangebreaks&&(F.layout[C].rangebreaks=M.rangebreaks),r.supplyDefaults(F);var j=F._fullLayout.xaxis,B=F._fullLayout[C];j.clearCalc(),j.setScale(),B.clearCalc(),B.setScale();var G={id:H,plotgroup:P,xaxis:j,yaxis:B,isRangePlot:!0};A?N=G:(G.mainplot="xy",G.mainplotinfo=N),s.rangePlot(S,G,g(R,H))})}function g(T,S){for(var D=[],L=0;L<T.length;L++){var R=T[L],z=R[0].trace;z.xaxis+z.yaxis===S&&D.push(R)}return D}function x(T,S,D,L,R){var z=a.ensureSingle(T,"rect",v.maskMinClassName,function(P){P.attr({x:0,y:0,"shape-rendering":"crispEdges"})});z.attr("height",L._height).call(o.fill,v.maskColor);var N=a.ensureSingle(T,"rect",v.maskMaxClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});if(N.attr("height",L._height).call(o.fill,v.maskColor),R.rangemode!=="match"){var H=a.ensureSingle(T,"rect",v.maskMinOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});H.attr("width",L._width).call(o.fill,v.maskOppAxisColor);var $=a.ensureSingle(T,"rect",v.maskMaxOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});$.attr("width",L._width).style("border-top",v.maskOppBorder).call(o.fill,v.maskOppAxisColor)}}function _(T,S,D,L){if(!S._context.staticPlot){var R=a.ensureSingle(T,"rect",v.slideBoxClassName,function(z){z.attr({y:0,cursor:v.slideBoxCursor,"shape-rendering":"crispEdges"})});R.attr({height:L._height,fill:v.slideBoxFill})}}function k(T,S,D,L){var R=a.ensureSingle(T,"g",v.grabberMinClassName),z=a.ensureSingle(T,"g",v.grabberMaxClassName),N={x:0,width:v.handleWidth,rx:v.handleRadius,fill:o.background,stroke:o.defaultLine,"stroke-width":v.handleStrokeWidth,"shape-rendering":"crispEdges"},H={y:Math.round(L._height/4),height:Math.round(L._height/2)},$=a.ensureSingle(R,"rect",v.handleMinClassName,function(E){E.attr(N)});$.attr(H);var P=a.ensureSingle(z,"rect",v.handleMaxClassName,function(E){E.attr(N)});P.attr(H);var A={width:v.grabAreaWidth,x:0,y:0,fill:v.grabAreaFill,cursor:S._context.staticPlot?void 0:v.grabAreaCursor},M=a.ensureSingle(R,"rect",v.grabAreaMinClassName,function(E){E.attr(A)});M.attr("height",L._height);var C=a.ensureSingle(z,"rect",v.grabAreaMaxClassName,function(E){E.attr(A)});C.attr("height",L._height)}return Kv}var L4=me,C4=cm,D4=qk,Qv=bu,P4={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:L4.extendFlat({},C4,{yaxis:D4})}}},layoutAttributes:cm,handleDefaults:A4(),calcAutorange:M4(),draw:S4(),isVisible:Qv.isVisible,makeData:Qv.makeData,autoMarginOpts:Qv.autoMarginOpts},E4=vr,rx=xr,R4=Lt.templatedArray,z4=R4("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")}),_h={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:z4,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:E4({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:rx.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:rx.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"},Qk={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},Uf=me,I4=ot,F4=Lt,$4=Ha,Jk=_h,wh=Qk,N4=function(e,r,a,i,n){var o=e.rangeselector||{},l=F4.newContainer(r,"rangeselector");function s(h,d){return Uf.coerce(o,l,Jk,h,d)}var f=$4(o,l,{name:"buttons",handleItemDefaults:H4,calendar:n}),c=s("visible",f.length>0);if(c){var u=O4(r,a,i);s("x",u[0]),s("y",u[1]),Uf.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),Uf.coerceFont(s,"font",a.font);var v=s("bgcolor");s("activecolor",I4.contrast(v,wh.lightAmount,wh.darkAmount)),s("bordercolor"),s("borderwidth")}};function H4(t,e,r,a){var i=a.calendar;function n(s,f){return Uf.coerce(t,e,Jk.buttons,s,f)}var o=n("visible");if(o){var l=n("step");l!=="all"&&(i&&i!=="gregorian"&&(l==="month"||l==="year")?e.stepmode="backward":n("stepmode"),n("count")),n("label")}}function O4(t,e,r){for(var a=r.filter(function(l){return e[l].anchor===t._id}),i=0,n=0;n<a.length;n++){var o=e[a[n]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+wh.yPad]}var j4=PM,B4=me.titleCase,G4=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=U4(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function U4(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=j4["utc"+B4(i)],o=e.count,l;switch(e.stepmode){case"backward":l=t.l2r(+n.offset(a,-o));break;case"todate":var s=n.offset(a,-o);l=t.l2r(+n.ceil(s));break}var f=r[1];return[l,f]}var Tc=ft,V4=Je,X4=Qt,ax=ot,eA=xt,Ka=me,ix=Ka.strTranslate,Vf=nr,Y4=Wt,vm=Cr,nx=vm.LINE_SPACING,ox=vm.FROM_TL,lx=vm.FROM_BR,Th=Qk,W4=G4,q4=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(Z4(e),K4);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Tc.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(Ka.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=Tc.select(this),u=W4(o,f);f._isActive=Q4(o,f,u),c.call(Jv,l,f),c.call(e6,l,f,e),c.on("click",function(){e._dragged||V4.call("_guiRelayout",e,u)}),c.on("mouseover",function(){f._isHovered=!0,c.call(Jv,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(Jv,l,f)})}),r6(e,s,l,o._name,n)})};function Z4(t){for(var e=Y4.list(t,"x",!0),r=[],a=0;a<e.length;a++){var i=e[a];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}function K4(t){return t._id}function Q4(t,e,r){if(e.step==="all")return t.autorange===!0;var a=Object.keys(r);return t.range[0]===r[a[0]]&&t.range[1]===r[a[1]]}function Jv(t,e,r){var a=Ka.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:Th.rx,ry:Th.ry}),a.call(ax.stroke,e.bordercolor).call(ax.fill,J4(e,r)).style("stroke-width",e.borderwidth+"px")}function J4(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function e6(t,e,r,a){function i(o){Vf.convertToTspans(o,a)}var n=Ka.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(eA.font,e.font).text(t6(r,a._fullLayout._meta)).call(i)}function t6(t,e){return t.label?e?Ka.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function r6(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var h=Tc.select(this),d=h.select(".selector-text"),p=r.font.size*nx,m=Math.max(p*Vf.lineCount(d),16)+3;o=Math.max(o,m)}),e.each(function(){var h=Tc.select(this),d=h.select(".selector-rect"),p=h.select(".selector-text"),m=p.node()&&eA.bBox(p.node()).width,y=r.font.size*nx,b=Vf.lineCount(p),w=Math.max(m+10,Th.minButtonWidth);h.attr("transform",ix(l+n,l)),d.attr({x:0,y:0,width:w,height:o}),Vf.positionText(p,w/2,o/2-(b-1)*y/2+3),n+=w+5});var s=t._fullLayout._size,f=s.l+s.w*r.x,c=s.t+s.h*(1-r.y),u="left";Ka.isRightAnchor(r)&&(f-=n,u="right"),Ka.isCenterAnchor(r)&&(f-=n/2,u="center");var v="top";Ka.isBottomAnchor(r)&&(c-=o,v="bottom"),Ka.isMiddleAnchor(r)&&(c-=o/2,v="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),X4.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*ox[u],r:n*lx[u],b:o*lx[v],t:o*ox[v]}),i.attr("transform",ix(f,c))}var a6={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:_h}}},layoutAttributes:_h,handleDefaults:N4,draw:q4},Ni={},sx=Nt.extendFlat;Ni.attributes=function(t,e){t=t||{},e=e||{};var r={valType:"info_array",editType:t.editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},a=t.name?t.name+" ":"",i=t.trace?"trace ":"subplot ",n=e.description?" "+e.description:"",o={x:sx({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:sx({},r,{description:["Sets the vertical domain of this ",a,i,"(in plot fraction).",n].join("")}),editType:t.editType};return t.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",a,i,".",n].join("")},o.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",a,i,".",n].join("")}),o};Ni.defaults=function(t,e,r,a){var i=a&&a.x||[0,1],n=a&&a.y||[0,1],o=e.grid;if(o){var l=r("domain.column");l!==void 0&&(l<o.columns?i=o._domains.x[l]:delete t.domain.column);var s=r("domain.row");s!==void 0&&(s<o.rows?n=o._domains.y[s]:delete t.domain.row)}var f=r("domain.x",i),c=r("domain.y",n);f[0]<f[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=n.slice())};var i6=me,n6=Oo.counter,o6=Ni.attributes,fx=Lr.idRegex,l6=Lt,kh={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[n6("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fx.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fx.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:o6({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function kc(t,e,r){var a=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});if(Array.isArray(a))return a;if(i.length)return i}function s6(t,e){var r=t.grid||{},a=kc(e,r,"x"),i=kc(e,r,"y");if(!t.grid&&!a&&!i)return;var n=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(a),l=Array.isArray(i),s=o&&a!==r.xaxes&&l&&i!==r.yaxes,f,c;n?(f=r.subplots.length,c=r.subplots[0].length):(l&&(f=i.length),o&&(c=a.length));var u=l6.newContainer(e,"grid");function v(_,k){return i6.coerce(r,u,kh,_,k)}var h=v("rows",f),d=v("columns",c);if(!(h*d>1)){delete e.grid;return}if(!n&&!o&&!l){var p=v("pattern")==="independent";p&&(n=!0)}u._hasSubplotGrid=n;var m=v("roworder"),y=m==="top to bottom",b=n?.2:.1,w=n?.3:.1,g,x;s&&e._splomGridDflt&&(g=e._splomGridDflt.xside,x=e._splomGridDflt.yside),u._domains={x:cx("x",v,b,g,d),y:cx("y",v,w,x,h,y)}}function cx(t,e,r,a,i,n){var o=e(t+"gap",r),l=e("domain."+t);e(t+"side",a);for(var s=new Array(i),f=l[0],c=(l[1]-f)/(i-o),u=c*(1-o),v=0;v<i;v++){var h=f+c*v;s[n?i-1-v:v]=[h,h+u]}return s}function f6(t,e){var r=e.grid;if(!(!r||!r._domains)){var a=t.grid||{},i=e._subplots,n=r._hasSubplotGrid,o=r.rows,l=r.columns,s=r.pattern==="independent",f,c,u,v,h,d,p,m=r._axisMap={};if(n){var y=a.subplots||[];d=r.subplots=new Array(o);var b=1;for(f=0;f<o;f++){var w=d[f]=new Array(l),g=y[f]||[];for(c=0;c<l;c++)if(s?(h=b===1?"xy":"x"+b+"y"+b,b++):h=g[c],w[c]="",i.cartesian.indexOf(h)!==-1){if(p=h.indexOf("y"),u=h.slice(0,p),v=h.slice(p),m[u]!==void 0&&m[u]!==c||m[v]!==void 0&&m[v]!==f)continue;w[c]=h,m[u]=c,m[v]=f}}}else{var x=kc(e,a,"x"),_=kc(e,a,"y");r.xaxes=ux(x,i.xaxis,l,m,"x"),r.yaxes=ux(_,i.yaxis,o,m,"y")}var k=r._anchors={},T=r.roworder==="top to bottom";for(var S in m){var D=S.charAt(0),L=r[D+"side"],R,z,N;if(L.length<8)k[S]="free";else if(D==="x"){if(L.charAt(0)==="t"===T?(R=0,z=1,N=o):(R=o-1,z=-1,N=-1),n){var H=m[S];for(f=R;f!==N;f+=z)if(h=d[f][H],!!h&&(p=h.indexOf("y"),h.slice(0,p)===S)){k[S]=h.slice(p);break}}else for(f=R;f!==N;f+=z)if(v=r.yaxes[f],i.cartesian.indexOf(S+v)!==-1){k[S]=v;break}}else if(L.charAt(0)==="l"?(R=0,z=1,N=l):(R=l-1,z=-1,N=-1),n){var $=m[S];for(f=R;f!==N;f+=z)if(h=d[$][f],!!h&&(p=h.indexOf("y"),h.slice(p)===S)){k[S]=h.slice(0,p);break}}else for(f=R;f!==N;f+=z)if(u=r.xaxes[f],i.cartesian.indexOf(u+S)!==-1){k[S]=u;break}}}}function ux(t,e,r,a,i){var n=new Array(r),o;function l(s,f){e.indexOf(f)!==-1&&a[f]===void 0?(n[s]=f,a[f]=s):n[s]=""}if(Array.isArray(t))for(o=0;o<r;o++)l(o,t[o]);else for(l(0,i),o=1;o<r;o++)l(o,i+(o+1));return n}var c6={moduleType:"component",name:"grid",schema:{layout:{grid:kh}},layoutAttributes:kh,sizeDefaults:s6,contentDefaults:f6},tA={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,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",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}},ed,vx;function u6(){if(vx)return ed;vx=1;var t=dt,e=Je,r=me,a=Lt,i=tA;return ed=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),u=n[f]||{};function v(w,g){return r.coerce(u,c,i,w,g)}var h=u.array!==void 0||u.value!==void 0||u.type==="sqrt",d=v("visible",h);if(d!==!1){var p=v("type","array"in u?"data":"percent"),m=!0;p!=="sqrt"&&(m=v("symmetric",!((p==="data"?"arrayminus":"valueminus")in u))),p==="data"?(v("array"),v("traceref"),m||(v("arrayminus"),v("tracerefminus"))):(p==="percent"||p==="constant")&&(v("value"),m||v("valueminus"));var y="copy_"+s.inherit+"style";if(s.inherit){var b=o["error_"+s.inherit];(b||{}).visible&&v(y,!(u.color||t(u.thickness)||t(u.width)))}(!s.inherit||!c[y])&&(v("color",l),v("thickness"),v("width",e.traceIs(o,"gl3d")?0:4))}},ed}var td,dx;function rA(){if(dx)return td;dx=1,td=function(r){var a=r.type,i=r.symmetric;if(a==="data"){var n=r.array||[];if(i)return function(c,u){var v=+n[u];return[v,v]};var o=r.arrayminus||[];return function(c,u){var v=+n[u],h=+o[u];return!isNaN(v)||!isNaN(h)?[h||0,v||0]:[NaN,NaN]}}else{var l=t(a,r.value),s=t(a,r.valueminus);return i||r.valueminus===void 0?function(c){var u=l(c);return[u,u]}:function(c){return[s(c),l(c)]}}};function t(e,r){if(e==="percent")return function(a){return Math.abs(a*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(a){return Math.sqrt(Math.abs(a))}}return td}var rd,hx;function v6(){if(hx)return rd;hx=1;var t=dt,e=Je,r=Dt,a=me,i=rA();rd=function(l){for(var s=l.calcdata,f=0;f<s.length;f++){var c=s[f],u=c[0].trace;if(u.visible===!0&&e.traceIs(u,"errorBarsOK")){var v=r.getFromId(l,u.xaxis),h=r.getFromId(l,u.yaxis);n(c,u,v,"x"),n(c,u,h,"y")}}};function n(o,l,s,f){var c=l["error_"+f]||{},u=c.visible&&["linear","log"].indexOf(s.type)!==-1,v=[];if(u){for(var h=i(c),d=0;d<o.length;d++){var p=o[d],m=p.i;if(m===void 0)m=d;else if(m===null)continue;var y=p[f];if(t(s.c2l(y))){var b=h(y,m);if(t(b[0])&&t(b[1])){var w=p[f+"s"]=y-b[0],g=p[f+"h"]=y+b[1];v.push(w,g)}}}var x=s._id,_=l._extremes[x],k=r.findExtremes(s,v,a.extendFlat({tozero:_.opts.tozero},{padded:!0}));_.min=_.min.concat(k.min),_.max=_.max.concat(k.max)}}return rd}var ad,px;function d6(){if(px)return ad;px=1;var t=ft,e=dt,r=xt,a=_r;ad=function(o,l,s,f){var c,u=s.xaxis,v=s.yaxis,h=f&&f.duration>0,d=o._context.staticPlot;l.each(function(p){var m=p[0].trace,y=m.error_x||{},b=m.error_y||{},w;m.ids&&(w=function(k){return k.id});var g=a.hasMarkers(m)&&m.marker.maxdisplayed>0;!b.visible&&!y.visible&&(p=[]);var x=t.select(this).selectAll("g.errorbar").data(p,w);if(x.exit().remove(),!!p.length){y.visible||x.selectAll("path.xerror").remove(),b.visible||x.selectAll("path.yerror").remove(),x.style("opacity",1);var _=x.enter().append("g").classed("errorbar",!0);h&&_.style("opacity",0).transition().duration(f.duration).style("opacity",1),r.setClipUrl(x,s.layerClipId,o),x.each(function(k){var T=t.select(this),S=i(k,u,v);if(!(g&&!k.vis)){var D,L=T.select("path.yerror");if(b.visible&&e(S.x)&&e(S.yh)&&e(S.ys)){var R=b.width;D="M"+(S.x-R)+","+S.yh+"h"+2*R+"m-"+R+",0V"+S.ys,S.noYS||(D+="m-"+R+",0h"+2*R),c=!L.size(),c?L=T.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("yerror",!0):h&&(L=L.transition().duration(f.duration).ease(f.easing)),L.attr("d",D)}else L.remove();var z=T.select("path.xerror");if(y.visible&&e(S.y)&&e(S.xh)&&e(S.xs)){var N=(y.copy_ystyle?b:y).width;D="M"+S.xh+","+(S.y-N)+"v"+2*N+"m0,-"+N+"H"+S.xs,S.noXS||(D+="m0,-"+N+"v"+2*N),c=!z.size(),c?z=T.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):h&&(z=z.transition().duration(f.duration).ease(f.easing)),z.attr("d",D)}else z.remove()}})}})};function i(n,o,l){var s={x:o.c2p(n.x),y:l.c2p(n.y)};return n.yh!==void 0&&(s.yh=l.c2p(n.yh),s.ys=l.c2p(n.ys),e(s.ys)||(s.noYS=!0,s.ys=l.c2p(n.ys,!0))),n.xh!==void 0&&(s.xh=o.c2p(n.xh),s.xs=o.c2p(n.xs),e(s.xs)||(s.noXS=!0,s.xs=o.c2p(n.xs,!0))),s}return ad}var id,mx;function h6(){if(mx)return id;mx=1;var t=ft,e=ot;return id=function(a){a.each(function(i){var n=i[0].trace,o=n.error_y||{},l=n.error_x||{},s=t.select(this);s.selectAll("path.yerror").style("stroke-width",o.thickness+"px").call(e.stroke,o.color),l.copy_ystyle&&(l=o),s.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(e.stroke,l.color)})},id}var Nl=me,yx=Ia.overrideAll,Hl=tA,ln={error_x:Nl.extendFlat({},Hl),error_y:Nl.extendFlat({},Hl)};delete ln.error_x.copy_zstyle;delete ln.error_y.copy_zstyle;delete ln.error_y.copy_ystyle;var ws={error_x:Nl.extendFlat({},Hl),error_y:Nl.extendFlat({},Hl),error_z:Nl.extendFlat({},Hl)};delete ws.error_x.copy_ystyle;delete ws.error_y.copy_ystyle;delete ws.error_z.copy_ystyle;delete ws.error_z.copy_zstyle;var p6={moduleType:"component",name:"errorbars",schema:{traces:{scatter:ln,bar:ln,histogram:ln,scatter3d:yx(ws,"calc","nested"),scattergl:yx(ln,"calc","nested")}},supplyDefaults:u6(),calc:v6(),makeComputeError:rA(),plot:d6(),style:h6(),hoverInfo:m6};function m6(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}var y6={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"}},pi=ft,nd=wa,Xf=Qt,gx=Je,Va=Dt,mf=Oa,ra=me,ha=ra.strTranslate,aA=Nt.extendFlat,od=zi,va=xt,ld=ot,g6=Wc,b6=nr,x6=ka.flipScale,_6=hk,w6=pk,T6=Na,dm=Cr,bx=dm.LINE_SPACING,xx=dm.FROM_TL,_x=dm.FROM_BR,$t=y6.cn;function k6(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+$t.colorbar).data(A6(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed($t.colorbar,!0),r.each(function(a){var i=pi.select(this);ra.ensureSingle(i,"rect",$t.cbbg),ra.ensureSingle(i,"g",$t.cbfills),ra.ensureSingle(i,"g",$t.cblines),ra.ensureSingle(i,"g",$t.cbaxis,function(o){o.classed($t.crisp,!0)}),ra.ensureSingle(i,"g",$t.cbtitleunshift,function(o){o.append("g").classed($t.cbtitle,!0)}),ra.ensureSingle(i,"rect",$t.cboutline);var n=M6(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&S6(i,a,t)}),r.exit().each(function(a){Xf.autoMargin(t,a._id)}).remove(),r.order()}function A6(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return aA(w,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function f(){typeof l.calc=="function"?l.calc(t,o,i):(i._fillgradient=n.reversescale?x6(n.colorscale):n.colorscale,i._zrange=[n[l.min],n[l.max]])}for(var c=0;c<r.length;c++){var u=r[c];if(o=u[0].trace,!!o._module){var v=o._module.colorbar;if(o.visible===!0&&v)for(var h=Array.isArray(v),d=h?v:[v],p=0;p<d.length;p++){l=d[p];var m=l.container;n=m?o[m]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(h&&m?"-"+m:""),i._traceIndex=o.index,i._propPrefix=(m?m+".":"")+"colorbar.",i._meta=o._meta,f(),a.push(i))}}}for(var y in e._colorAxes)if(n=e[y],n.showscale){var b=e._colorAxes[y];i=s(n.colorbar),i._id="cb"+y,i._propPrefix=y+".colorbar.",i._meta=e._meta,l={min:"cmin",max:"cmax"},b[0]!=="heatmap"&&(o=b[1],l.calc=o._module.colorbar.calc),f(),a.push(i)}return a}function M6(t,e,r){var a=e.orientation==="v",i=e.len,n=e.lenmode,o=e.thickness,l=e.thicknessmode,s=e.outlinewidth,f=e.borderwidth,c=e.bgcolor,u=e.xanchor,v=e.yanchor,h=e.xpad,d=e.ypad,p=e.x,m=a?e.y:1-e.y,y=e.yref==="paper",b=e.xref==="paper",w=r._fullLayout,g=w._size,x=e._fillcolor,_=e._line,k=e.title,T=k.side,S=e._zrange||pi.extent((typeof x=="function"?x:_.color).domain()),D=typeof _.color=="function"?_.color:function(){return _.color},L=typeof x=="function"?x:function(){return x},R=e._levels,z=L6(r,e,S),N=z.fill,H=z.line,$=Math.round(o*(l==="fraction"?a?g.w:g.h:1)),P=$/(a?g.w:g.h),A=Math.round(i*(n==="fraction"?a?g.h:g.w:1)),M=A/(a?g.h:g.w),C=b?g.w:r._fullLayout.width,E=y?g.h:r._fullLayout.height,F=Math.round(a?p*C+h:m*E+d),j={center:.5,right:1}[u]||0,B={top:1,middle:.5}[v]||0,G=a?p-j*P:m-B*P,O=a?m-B*M:p-j*M,W=Math.round(a?E*(1-O):C*O);e._lenFrac=M,e._thickFrac=P,e._uFrac=G,e._vFrac=O;var V=e._axis=C6(r,e,S);V.position=P+(a?p+h/g.w:m+d/g.h);var Z=["top","bottom"].indexOf(T)!==-1;if(a&&Z&&(V.title.side=T,V.titlex=p+h/g.w,V.titley=O+(k.side==="top"?M-d/g.h:d/g.h)),!a&&!Z&&(V.title.side=T,V.titley=m+d/g.h,V.titlex=O+h/g.w),_.color&&e.tickmode==="auto"){V.tickmode="linear",V.tick0=R.start;var X=R.size,Q=ra.constrain(A/50,4,15)+1,te=(S[1]-S[0])/((e.nticks||Q)*X);if(te>1){var xe=Math.pow(10,Math.floor(Math.log(te)/Math.LN10));X*=xe*ra.roundUp(te/xe,[2,5,10]),(Math.abs(R.start)/R.size+1e-6)%1<2e-6&&(V.tick0=0)}V.dtick=X}V.domain=a?[O+d/g.h,O+M-d/g.h]:[O+h/g.w,O+M-h/g.w],V.setScale(),t.attr("transform",ha(Math.round(g.l),Math.round(g.t)));var ue=t.select("."+$t.cbtitleunshift).attr("transform",ha(-Math.round(g.l),-Math.round(g.t))),ae=V.ticklabelposition,le=V.title.font.size,de=t.select("."+$t.cbaxis),be,Te=0,Le=0;function _e(ze,K){var ke={propContainer:V,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:w._dfltTitle.colorbar,containerGroup:t.select("."+$t.cbtitle)},re=ze.charAt(0)==="h"?ze.substr(1):"h"+ze;t.selectAll("."+re+",."+re+"-math-group").remove(),g6.draw(r,ze,aA(ke,K||{}))}function Ie(){if(a&&Z||!a&&!Z){var ze,K;T==="top"&&(ze=h+g.l+C*p,K=d+g.t+E*(1-O-M)+3+le*.75),T==="bottom"&&(ze=h+g.l+C*p,K=d+g.t+E*(1-O)-3-le*.25),T==="right"&&(K=d+g.t+E*m+3+le*.75,ze=h+g.l+C*O),_e(V._id+"title",{attributes:{x:ze,y:K,"text-anchor":a?"start":"middle"}})}}function ce(){if(a&&!Z||!a&&Z){var ze=V.position||0,K=V._offset+V._length/2,ke,re;if(T==="right")re=K,ke=g.l+C*ze+10+le*(V.showticklabels?1:.5);else if(ke=K,T==="bottom"&&(re=g.t+E*ze+10+(ae.indexOf("inside")===-1?V.tickfont.size:0)+(V.ticks!=="intside"&&e.ticklen||0)),T==="top"){var pe=k.text.split("<br>").length;re=g.t+E*ze+10-$-bx*le*pe}_e((a?"h":"v")+V._id+"title",{avoid:{selection:pi.select(r).selectAll("g."+V._id+"tick"),side:T,offsetTop:a?0:g.t,offsetLeft:a?g.l:0,maxShift:a?w.width:w.height},attributes:{x:ke,y:re,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function ye(){if(!a&&!Z||a&&Z){var ze=t.select("."+$t.cbtitle),K=ze.select("text"),ke=[-s/2,s/2],re=ze.select(".h"+V._id+"title-math-group").node(),pe=15.6;K.node()&&(pe=parseInt(K.node().style.fontSize,10)*bx);var we;if(re?(we=va.bBox(re),Le=we.width,Te=we.height,Te>pe&&(ke[1]-=(Te-pe)/2)):K.node()&&!K.classed($t.jsPlaceholder)&&(we=va.bBox(K.node()),Le=we.width,Te=we.height),a){if(Te){if(Te+=5,T==="top")V.domain[1]-=Te/g.h,ke[1]*=-1;else{V.domain[0]+=Te/g.h;var se=b6.lineCount(K);ke[1]+=(1-se)*pe}ze.attr("transform",ha(ke[0],ke[1])),V.setScale()}}else Le&&(T==="right"&&(V.domain[0]+=(Le+le/2)/g.w),ze.attr("transform",ha(ke[0],ke[1])),V.setScale())}t.selectAll("."+$t.cbfills+",."+$t.cblines).attr("transform",a?ha(0,Math.round(g.h*(1-V.domain[1]))):ha(Math.round(g.w*V.domain[0]),0)),de.attr("transform",a?ha(0,Math.round(-g.t)):ha(Math.round(-g.l),0));var ie=t.select("."+$t.cbfills).selectAll("rect."+$t.cbfill).attr("style","").data(N);ie.enter().append("rect").classed($t.cbfill,!0).attr("style",""),ie.exit().remove();var fe=S.map(V.c2p).map(Math.round).sort(function(He,Oe){return He-Oe});ie.each(function(He,Oe){var ve=[Oe===0?S[0]:(N[Oe]+N[Oe-1])/2,Oe===N.length-1?S[1]:(N[Oe]+N[Oe+1])/2].map(V.c2p).map(Math.round);a&&(ve[1]=ra.constrain(ve[1]+(ve[1]>ve[0])?1:-1,fe[0],fe[1]));var Be=pi.select(this).attr(a?"x":"y",F).attr(a?"y":"x",pi.min(ve)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(pi.max(ve)-pi.min(ve),2));if(e._fillgradient)va.gradient(Be,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Ne=L(He).replace("e-","");Be.attr("fill",nd(Ne).toHexString())}});var ge=t.select("."+$t.cblines).selectAll("path."+$t.cbline).data(_.color&&_.width?H:[]);ge.enter().append("path").classed($t.cbline,!0),ge.exit().remove(),ge.each(function(He){var Oe=F,ve=Math.round(V.c2p(He))+_.width/2%1;pi.select(this).attr("d","M"+(a?Oe+","+ve:ve+","+Oe)+(a?"h":"v")+$).call(va.lineGroupStyle,_.width,D(He),_.dash)}),de.selectAll("g."+V._id+"tick,path").remove();var Me=F+$+(s||0)/2-(e.ticks==="outside"?1:0),Se=Va.calcTicks(V),Pe=Va.getTickSigns(V)[2];return Va.drawTicks(r,V,{vals:V.ticks==="inside"?Va.clipEnds(V,Se):Se,layer:de,path:Va.makeTickPath(V,Me,Pe),transFn:Va.makeTransTickFn(V)}),Va.drawLabels(r,V,{vals:Se,layer:de,transFn:Va.makeTransTickLabelFn(V),labelFns:Va.makeLabelFns(V,Me)})}function Ee(){var ze,K=$+s/2;ae.indexOf("inside")===-1&&(ze=va.bBox(de.node()),K+=a?ze.width:ze.height),be=ue.select("text");var ke=0,re=a&&T==="top",pe=!a&&T==="right",we=0;if(be.node()&&!be.classed($t.jsPlaceholder)){var se,ie=ue.select(".h"+V._id+"title-math-group").node();ie&&(a&&Z||!a&&!Z)?(ze=va.bBox(ie),ke=ze.width,se=ze.height):(ze=va.bBox(ue.node()),ke=ze.right-g.l-(a?F:W),se=ze.bottom-g.t-(a?W:F),!a&&T==="top"&&(K+=ze.height,we=ze.height)),pe&&(be.attr("transform",ha(ke/2+le/2,0)),ke*=2),K=Math.max(K,a?ke:se)}var fe=(a?h:d)*2+K+f+s/2,ge=0;!a&&k.text&&v==="bottom"&&m<=0&&(ge=fe/2,fe+=ge,we+=ge),w._hColorbarMoveTitle=ge,w._hColorbarMoveCBTitle=we;var Me=f+s,Se=(a?F:W)-Me/2-(a?h:0),Pe=(a?W:F)-(a?A:d+we-ge);t.select("."+$t.cbbg).attr("x",Se).attr("y",Pe).attr(a?"width":"height",Math.max(fe-ge,2)).attr(a?"height":"width",Math.max(A+Me,2)).call(ld.fill,c).call(ld.stroke,e.bordercolor).style("stroke-width",f);var He=pe?Math.max(ke-10,0):0;t.selectAll("."+$t.cboutline).attr("x",(a?F:W+h)+He).attr("y",(a?W+d-A:F)+(re?Te:0)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(A-(a?2*d+Te:2*h+He),2)).call(ld.stroke,e.outlinecolor).style({fill:"none","stroke-width":s});var Oe=a?j*fe:0,ve=a?0:(1-B)*fe-we;if(Oe=b?g.l-Oe:-Oe,ve=y?g.t-ve:-ve,t.attr("transform",ha(Oe,ve)),!a&&(f||nd(c).getAlpha()&&!nd.equals(w.paper_bgcolor,c))){var Be=de.selectAll("text"),Ne=Be[0].length,We=t.select("."+$t.cbbg).node(),Ge=va.bBox(We),Ve=va.getTranslate(t),Ue=2;Be.each(function(ne,Re){var je=0,Ye=Ne-1;if(Re===je||Re===Ye){var rt=va.bBox(this),nt=va.getTranslate(this),vt;if(Re===Ye){var et=rt.right+nt.x,Ct=Ge.right+Ve.x+W-f-Ue+p;vt=Ct-et,vt>0&&(vt=0)}else if(Re===je){var lt=rt.left+nt.x,Qe=Ge.left+Ve.x+W+f+Ue;vt=Qe-lt,vt<0&&(vt=0)}vt&&(Ne<3?this.setAttribute("transform","translate("+vt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var I={},Y=xx[u],U=_x[u],q=xx[v],oe=_x[v],ee=fe-$;a?(n==="pixels"?(I.y=m,I.t=A*q,I.b=A*oe):(I.t=I.b=0,I.yt=m+i*q,I.yb=m-i*oe),l==="pixels"?(I.x=p,I.l=fe*Y,I.r=fe*U):(I.l=ee*Y,I.r=ee*U,I.xl=p-o*Y,I.xr=p+o*U)):(n==="pixels"?(I.x=p,I.l=A*Y,I.r=A*U):(I.l=I.r=0,I.xl=p+i*Y,I.xr=p-i*U),l==="pixels"?(I.y=1-m,I.t=fe*q,I.b=fe*oe):(I.t=ee*q,I.b=ee*oe,I.yt=m-o*q,I.yb=m+o*oe));var Ce=e.y<.5?"b":"t",Ae=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var he={r:w.width-Se-Oe,l:Se+I.r,b:w.height-Pe-ve,t:Pe+I.b};b&&y?Xf.autoMargin(r,e._id,I):b?r._fullLayout._reservedMargin[e._id][Ce]=he[Ce]:y||a?r._fullLayout._reservedMargin[e._id][Ae]=he[Ae]:r._fullLayout._reservedMargin[e._id][Ce]=he[Ce]}return ra.syncOrAsync([Xf.previousPromises,Ie,ye,ce,Xf.previousPromises,Ee],r)}function S6(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;mf.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),od(t)},moveFn:function(f,c){t.attr("transform",o+ha(f,c)),l=mf.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=mf.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var u=mf.getCursor(l,s,e.xanchor,e.yanchor);od(t,u)},doneFn:function(){if(od(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?gx.call("_guiRestyle",r,f,e._traceIndex):gx.call("_guiRelayout",r,f)}}})}function L6(t,e,r){var a=e._levels,i=[],n=[],o,l,s=a.end+a.size/100,f=a.size,c=1.001*r[0]-.001*r[1],u=1.001*r[1]-.001*r[0];for(l=0;l<1e5&&(o=a.start+l*f,!(f>0?o>=s:o<=s));l++)o>c&&o<u&&i.push(o);if(e._fillgradient)n=[0];else if(typeof e._fillcolor=="function"){var v=e._filllevels;if(v)for(s=v.end+v.size/100,f=v.size,l=0;l<1e5&&(o=v.start+l*f,!(f>0?o>=s:o<=s));l++)o>r[0]&&o<r[1]&&n.push(o);else n=i.map(function(h){return h-a.size/2}),n.push(n[n.length-1]+a.size)}else e._fillcolor&&typeof e._fillcolor=="string"&&(n=[0]);return a.size<0&&(i.reverse(),n.reverse()),{line:i,fill:n}}function C6(t,e,r){var a=t._fullLayout,i=e.orientation==="v",n={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,labelalias:e.labelalias,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",l={type:"linear",_id:o+e._id},s={letter:o,font:a.font,noAutotickangles:o==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:a.calendar};function f(c,u){return ra.coerce(n,l,T6,c,u)}return _6(n,l,f,s,a),w6(n,l,f,s),l}var D6={draw:k6},P6={moduleType:"component",name:"colorbar",attributes:np,supplyDefaults:Fw,draw:D6.draw,hasColorbar:Lw},E6={moduleType:"component",name:"legend",layoutAttributes:pT,supplyLayoutDefaults:mT,draw:xT,style:gT},R6={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"}},z6={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},I6=Je,iA=me,sd=iA.extendFlat,wx=iA.extendDeep;function Tx(t){var e;switch(t){case"themes__thumb":e={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":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}function F6(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var nA=function(e,r){var a,i=e.data,n=e.layout,o=wx([],i),l=wx({},n,Tx(r.tileClass)),s=e._context||{};if(r.width&&(l.width=r.width),r.height&&(l.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){l.annotations=[];var f=Object.keys(l);for(a=0;a<f.length;a++)F6(f[a])&&(l[f[a]].title={text:""});for(a=0;a<o.length;a++){var c=o[a];c.showscale=!1,c.marker&&(c.marker.showscale=!1),I6.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(a=0;a<r.annotations.length;a++)l.annotations.push(r.annotations[a]);var u=Object.keys(l).filter(function(m){return m.match(/^scene\d*$/)});if(u.length){var v={};for(r.tileClass==="thumbnail"&&(v={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),a=0;a<u.length;a++){var h=l[u[a]];h.xaxis||(h.xaxis={}),h.yaxis||(h.yaxis={}),h.zaxis||(h.zaxis={}),sd(h.xaxis,v),sd(h.yaxis,v),sd(h.zaxis,v),h._scene=null}}var d=document.createElement("div");r.tileClass&&(d.className=r.tileClass);var p={gd:d,td:d,layout:l,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:s.mapboxAccessToken}};return r.setBackground!=="transparent"&&(p.config.setBackground=r.setBackground||"opaque"),p.gd.defaultLayout=Tx(r.tileClass),p},$6=zh.EventEmitter,N6=Je,H6=me,kx=kr,O6=nA,j6=qp,B6=Zp;function G6(t,e){var r=new $6,a=O6(t,{}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=kx.getDelay(i._fullLayout);setTimeout(function(){var s=j6(i),f=document.createElement("canvas");f.id=H6.randstr(),r=B6({format:e.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:f,emitter:r,svg:s}),r.clean=function(){i&&document.body.removeChild(i)}},l)}var o=kx.getRedrawFunc(i);return N6.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var U6=G6,Ax=kr,V6={getDelay:Ax.getDelay,getRedrawFunc:Ax.getRedrawFunc,clone:nA,toSVG:qp,svgToImg:Zp,toImage:U6,downloadImage:I2},X6=V6;(function(t){t.version=Pc.version;for(var e=Je,r=t.register=e.register,a=It,i=Object.keys(a),n=0;n<i.length;n++){var o=i[n];o.charAt(0)!=="_"&&(t[o]=a[o]),r({moduleType:"apiMethod",name:o,fn:a[o]})}r(i$),r([D$,W$,bs,uN,kN,qN,_4,P4,a6,c6,p6,So,P6,E6,_a,i2]),r([R6,z6]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=Ap;var l=_a,s=Qt;t.Plots={resize:s.resize,graphJson:s.graphJson,sendDataToCloud:s.sendDataToCloud},t.Fx={hover:l.hover,unhover:l.unhover,loneHover:l.loneHover,loneUnhover:l.loneUnhover},t.Snapshot=X6,t.PlotSchema=Vo})(c_);var Y6=c_;const KB=Ci(Y6);var Ts={TEXTPAD:3,eventDataKeys:["value","label"]},Bt=$i,Mx=Xo.axisHoverFormat,W6=mr.hovertemplateAttrs,q6=mr.texttemplateAttrs,oA=Sn,Z6=vr,Sx=Ts,K6=Hr.pattern,sn=Nt.extendFlat,fd=Z6({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),Q6=Bt.marker,J6=Q6.line,e8=sn({},J6.width,{dflt:0}),t8=sn({width:e8,editType:"calc"},oA("marker.line")),r8=sn({line:t8,editType:"calc"},oA("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:K6,cornerradius:{valType:"any",editType:"calc",description:["Sets the rounding of corners. May be an integer number of pixels,","or a percentage of bar width (as a string ending in %). Defaults to `layout.barcornerradius`.","In stack or relative barmode, the first trace to set cornerradius is used for the whole stack."].join(" ")}}),ks={x:Bt.x,x0:Bt.x0,dx:Bt.dx,y:Bt.y,y0:Bt.y0,dy:Bt.dy,xperiod:Bt.xperiod,yperiod:Bt.yperiod,xperiod0:Bt.xperiod0,yperiod0:Bt.yperiod0,xperiodalignment:Bt.xperiodalignment,yperiodalignment:Bt.yperiodalignment,xhoverformat:Mx("x"),yhoverformat:Mx("y"),text:Bt.text,texttemplate:q6({editType:"plot"},{keys:Sx.eventDataKeys}),hovertext:Bt.hovertext,hovertemplate:W6({},{keys:Sx.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc",description:["Specifies the location of the `text`.","*inside* positions `text` inside, next to the bar end","(rotated and scaled if needed).","*outside* positions `text` outside, next to the bar end","(scaled if needed), unless there is another bar stacked on","this one, then the text gets pushed inside.","*auto* tries to position `text` inside the bar, but if","the bar is too small and no bar is stacked on this one","the text is moved outside.","If *none*, no text appears."].join(" ")},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot",description:["Determines if texts are kept at center or start/end points in `textposition` *inside* mode."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"plot",description:["Sets the angle of the tick labels with respect to the bar.","For example, a `tickangle` of -90 draws the tick labels","vertically. With *auto* the texts may automatically be","rotated to fit with the maximum size in bars."].join(" ")},textfont:sn({},fd,{description:"Sets the font used for `text`."}),insidetextfont:sn({},fd,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:sn({},fd,{description:"Sets the font used for `text` lying outside the bar."}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc",description:["Constrain the size of text inside or outside a bar to be no","larger than the bar itself."].join(" ")},cliponaxis:sn({},Bt.cliponaxis,{description:["Determines whether the text nodes","are clipped about the subplot axes.","To show the text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the bars.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal)."].join(" ")},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc",description:["Sets where the bar base is drawn (in position axis units).","In *stack* or *relative* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc",description:["Shifts the position where the bar is drawn","(in position axis units).","In *group* barmode,","traces that set *offset* will be excluded","and drawn in *overlay* mode instead."].join(" ")},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc",description:["Sets the bar width (in position axis units)."].join(" ")},marker:r8,offsetgroup:Bt.offsetgroup,alignmentgroup:Bt.alignmentgroup,selected:{marker:{opacity:Bt.selected.marker.opacity,color:Bt.selected.marker.color,editType:"style"},textfont:Bt.selected.textfont,editType:"style"},unselected:{marker:{opacity:Bt.unselected.marker.opacity,color:Bt.unselected.marker.color,editType:"style"},textfont:Bt.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}},hm={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to reduce *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")},barcornerradius:{valType:"any",editType:"calc",description:["Sets the rounding of bar corners. May be an integer number of pixels,","or a percentage of bar width (as a string ending in %)."].join(" ")}},a8=ot,Lx=ka.hasColorscale,Cx=ps,i8=me.coercePattern,lA=function(e,r,a,i,n){var o=a("marker.color",i),l=Lx(e,"marker");l&&Cx(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",a8.defaultLine),Lx(e,"marker.line")&&Cx(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),i8(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},Dx=dt,Fo=me,Px=ot,n8=Je,o8=Qp,l8=du,s8=lA,f8=Jp,sA=ks,yf=Fo.coerceFont;function c8(t,e,r,a){function i(f,c){return Fo.coerce(t,e,sA,f,c)}var n=o8(t,e,a,i);if(!n){e.visible=!1;return}l8(t,e,a,i),i("xhoverformat"),i("yhoverformat"),i("orientation",e.x&&!e.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate");var o=i("textposition");cA(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s8(t,e,i,r,a);var l=(e.marker.line||{}).color,s=n8.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||Px.defaultLine,{axis:"y"}),s(t,e,l||Px.defaultLine,{axis:"x",inherit:"y"}),Fo.coerceSelectionMarkerOpacity(e,i)}function u8(t,e){var r,a;function i(l,s){return Fo.coerce(a._input,a,sA,l,s)}for(var n=0;n<t.length;n++)if(a=t[n],a.type==="bar"){r=a._input;var o=i("marker.cornerradius",e.barcornerradius);a.marker&&(a.marker.cornerradius=fA(o)),e.barmode==="group"&&f8(r,a,e,i)}}function fA(t){if(Dx(t)){if(t=+t,t>=0)return t}else if(typeof t=="string"&&(t=t.trim(),t.slice(-1)==="%"&&Dx(t.slice(0,-1))&&(t=+t.slice(0,-1),t>=0)))return t+"%"}function cA(t,e,r,a,i,n){n=n||{};var o=n.moduleHasSelected!==!1,l=n.moduleHasUnselected!==!1,s=n.moduleHasConstrain!==!1,f=n.moduleHasCliponaxis!==!1,c=n.moduleHasTextangle!==!1,u=n.moduleHasInsideanchor!==!1,v=!!n.hasPathbar,h=Array.isArray(i)||i==="auto",d=h||i==="inside",p=h||i==="outside";if(d||p){var m=yf(a,"textfont",r.font),y=Fo.extendFlat({},m),b=t.textfont&&t.textfont.color,w=!b;if(w&&delete y.color,yf(a,"insidetextfont",y),v){var g=Fo.extendFlat({},m);w&&delete g.color,yf(a,"pathbar.textfont",g)}p&&yf(a,"outsidetextfont",m),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),f&&a("cliponaxis"),c&&a("textangle"),a("texttemplate")}d&&u&&a("insidetextanchor")}var bn={supplyDefaults:c8,crossTraceDefaults:u8,handleText:cA,validateCornerradius:fA},v8=Je,d8=Dt,h8=me,p8=hm,m8=bn.validateCornerradius,uA=function(t,e,r){function a(d,p){return h8.coerce(t,e,p8,d,p)}for(var i=!1,n=!1,o=!1,l={},s=a("barmode"),f=0;f<r.length;f++){var c=r[f];if(v8.traceIs(c,"bar")&&c.visible)i=!0;else continue;if(s==="group"){var u=c.xaxis+c.yaxis;l[u]&&(o=!0),l[u]=!0}if(c.visible&&c.type==="histogram"){var v=d8.getFromId({_fullLayout:e},c[c.orientation==="v"?"xaxis":"yaxis"]);v.type!=="category"&&(n=!0)}}if(!i){delete e.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",n&&!o?0:.2),a("bargroupgap");var h=a("barcornerradius");e.barcornerradius=m8(h)},qn=me,pm=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;qn.mergeArray(r.text,e,"tx"),qn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){qn.mergeArray(i.opacity,e,"mo",!0),qn.mergeArray(i.color,e,"mc");var n=i.line;n&&(qn.mergeArray(n.color,e,"mlc"),qn.mergeArrayCastPositive(n.width,e,"mlw"))}},Ex=Dt,Rx=hu,zx=ka.hasColorscale,Ix=op,y8=pm,g8=q2,b8=function(e,r){var a=Ex.getFromId(e,r.xaxis||"x"),i=Ex.getFromId(e,r.yaxis||"y"),n,o,l,s,f,c,u={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(n=a.makeCalcdata(r,"x",u),l=i.makeCalcdata(r,"y"),s=Rx(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",u),l=a.makeCalcdata(r,"x"),s=Rx(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var v=Math.min(o.length,n.length),h=new Array(v),d=0;d<v;d++)h[d]={p:o[d],s:n[d]},f&&(h[d].orig_p=l[d],h[d][c+"End"]=s.ends[d],h[d][c+"Start"]=s.starts[d]),r.ids&&(h[d].id=String(r.ids[d]));return zx(r,"marker")&&Ix(e,r,{vals:r.marker.color,containerStr:"marker"}),zx(r,"marker.line")&&Ix(e,r,{vals:r.marker.line.color,containerStr:"marker.line"}),y8(h,r),g8(h,r),h},x8=ft,_8=me;function w8(t,e,r){var a=t._fullLayout,i=a["_"+r+"Text_minsize"];if(i){var n=a.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}e.selectAll(o).each(function(l){var s=l.transform;if(s){s.scale=n&&s.hide?0:i/s.fontSize;var f=x8.select(this).select("text");_8.setTransormAndDisplay(f,s)}})}}function T8(t,e,r){if(r.uniformtext.mode){var a=vA(t),i=r.uniformtext.minsize,n=e.scale*e.fontSize;e.hide=n<i,r[a]=r[a]||1/0,e.hide||(r[a]=Math.min(r[a],Math.max(n,i)))}}function k8(t,e){var r=vA(t);e[r]=void 0}function vA(t){return"_"+t+"Text_minsize"}var ri={recordMinTextSize:T8,clearMinTextSize:k8,resizeText:w8},ai={},A8=dt,M8=wa,dA=me.isArrayOrTypedArray;ai.coerceString=function(t,e,r){if(typeof e=="string"){if(e||!t.noBlank)return e}else if((typeof e=="number"||e===!0)&&!t.strict)return String(e);return r!==void 0?r:t.dflt};ai.coerceNumber=function(t,e,r){if(A8(e)){e=+e;var a=t.min,i=t.max,n=a!==void 0&&e<a||i!==void 0&&e>i;if(!n)return e}return r!==void 0?r:t.dflt};ai.coerceColor=function(t,e,r){return M8(e).isValid()?e:r!==void 0?r:t.dflt};ai.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};ai.getValue=function(t,e){var r;return dA(t)?e<t.length&&(r=t[e]):r=t,r};ai.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:dA(t.marker.line.width)?0:t.marker.line.width;return r};var Ol=ft,S8=ot,ls=xt,hA=me,pA=Je,mA=ri.resizeText,mm=ks,L8=mm.textfont,C8=mm.insidetextfont,D8=mm.outsidetextfont,Zn=ai;function P8(t){var e=Ol.select(t).selectAll("g.barlayer").selectAll("g.trace");mA(t,e,"bar");var r=e.size(),a=t._fullLayout;e.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(a.barmode==="stack"&&r>1||a.bargap===0&&a.bargroupgap===0&&!i[0].trace.marker.line.width)&&Ol.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=Ol.select(this),o=i[0].trace;yA(n,o,t)}),pA.getComponentMethod("errorbars","style")(e)}function yA(t,e,r){ls.pointStyle(t.selectAll("path"),e,r),gA(t,e,r)}function gA(t,e,r){t.selectAll("text").each(function(a){var i=Ol.select(this),n=hA.ensureUniformFontSize(r,bA(i,a,e,r));ls.font(i,n)})}function E8(t,e,r){var a=e[0].trace;a.selectedpoints?R8(r,a,t):(yA(r,a,t),pA.getComponentMethod("errorbars","style")(r))}function R8(t,e,r){ls.selectedPointStyle(t.selectAll("path"),e),z8(t.selectAll("text"),e,r)}function z8(t,e,r){t.each(function(a){var i=Ol.select(this),n;if(a.selected){n=hA.ensureUniformFontSize(r,bA(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),ls.font(i,n)}else ls.selectedTextStyle(i,e)})}function bA(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=TA(e,r);n=_A(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=wA(r,e.i,i));return n}function xA(t,e,r){return ym(L8,t.textfont,e,r)}function _A(t,e,r,a){var i=xA(t,e,r),n=t._input.textfont===void 0||t._input.textfont.color===void 0||Array.isArray(t.textfont.color)&&t.textfont.color[e]===void 0;return n&&(i={color:S8.contrast(a),family:i.family,size:i.size}),ym(C8,t.insidetextfont,e,i)}function wA(t,e,r){var a=xA(t,e,r);return ym(D8,t.outsidetextfont,e,a)}function ym(t,e,r,a){e=e||{};var i=Zn.getValue(e.family,r),n=Zn.getValue(e.size,r),o=Zn.getValue(e.color,r);return{family:Zn.coerceString(t.family,i,a.family),size:Zn.coerceNumber(t.size,n,a.size),color:Zn.coerceColor(t.color,o,a.color)}}function TA(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var xn={style:P8,styleTextPoints:gA,styleOnSelect:E8,getInsideTextFont:_A,getOutsideTextFont:wA,getBarColor:TA,resizeText:mA},gf=ft,bf=dt,or=me,I8=nr,F8=ot,_i=xt,$8=Je,Ac=Dt.tickText,kA=ri,N8=kA.recordMinTextSize,H8=kA.clearMinTextSize,cd=xn,$o=ai,O8=Ts,AA=ks,j8=AA.text,B8=AA.textposition,G8=la.appendArrayPointValue,br=O8.TEXTPAD;function U8(t){return t.id}function V8(t){if(t.ids)return U8}function ud(t){return(t>0)-(t<0)}function Ra(t,e){return t<e?1:-1}function X8(t,e,r,a){var i=[],n=[],o=a?e:r,l=a?r:e;return i[0]=o.c2p(t.s0,!0),n[0]=l.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),n[1]=l.c2p(t.p1,!0),a?[i,n]:[n,i]}function MA(t,e,r,a){if(!e.uniformtext.mode&&SA(r)){var i;return a&&(i=a()),t.transition().duration(r.duration).ease(r.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()})}else return t}function SA(t){return t&&t.duration>0}function Y8(t,e,r,a,i,n){var o=e.xaxis,l=e.yaxis,s=t._fullLayout,f=t._context.staticPlot;i||(i={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},H8("bar",s));var c=or.makeTraceGroups(a,r,"trace bars").each(function(u){var v=gf.select(this),h=u[0].trace,d=u[0].t,p=h.type==="waterfall",m=h.type==="funnel",y=h.type==="histogram",b=h.type==="bar",w=b||m,g=0;p&&h.connector.visible&&h.connector.mode==="between"&&(g=h.connector.line.width/2);var x=h.orientation==="h",_=SA(i),k=or.ensureSingle(v,"g","points"),T=V8(h),S=k.selectAll("g.point").data(or.identity,T);S.enter().append("g").classed("point",!0),S.exit().remove(),S.each(function(L,R){var z=gf.select(this),N=X8(L,o,l,x),H=N[0][0],$=N[0][1],P=N[1][0],A=N[1][1],M=(x?$-H:A-P)===0;M&&w&&$o.getLineWidth(h,L)&&(M=!1),M||(M=!bf(H)||!bf($)||!bf(P)||!bf(A)),L.isBlank=M,M&&(x?$=H:A=P),g&&!M&&(x?(H-=Ra(H,$)*g,$+=Ra(H,$)*g):(P-=Ra(P,A)*g,A+=Ra(P,A)*g));var C,E;if(h.type==="waterfall"){if(!M){var F=h[L.dir].marker;C=F.line.width,E=F.color}}else C=$o.getLineWidth(h,L),E=L.mc||h.marker.color;function j(K){var ke=gf.round(C/2%1,2);return i.gap===0&&i.groupgap===0?gf.round(Math.round(K)-ke,2):K}function B(K,ke,re){return re&&K===ke?K:Math.abs(K-ke)>=2?j(K):K>ke?Math.ceil(K):Math.floor(K)}var G=F8.opacity(E),O=G<1||C>.01?j:B;t._context.staticPlot||(H=O(H,$,x),$=O($,H,x),P=O(P,A,!x),A=O(A,P,!x));var W=x?o.c2p:l.c2p,V;L.s0>0?V=L._sMax:L.s0<0?V=L._sMin:V=L.s1>0?L._sMax:L._sMin;function Z(K,ke){if(!K)return 0;var re=Math.abs(x?A-P:$-H),pe=Math.abs(x?$-H:A-P),we=O(Math.abs(W(V,!0)-W(0,!0))),se=L.hasB?Math.min(re/2,pe/2):Math.min(re/2,we),ie;if(ke==="%"){var fe=Math.min(50,K);ie=re*(fe/100)}else ie=K;return O(Math.max(Math.min(ie,se),0))}var X=b||y?Z(d.cornerradiusvalue,d.cornerradiusform):0,Q,te,xe="M"+H+","+P+"V"+A+"H"+$+"V"+P+"Z",ue=0;if(X&&L.s){var ae=ud(L.s0)===0||ud(L.s)===ud(L.s0)?L.s1:L.s0;if(ue=O(L.hasB?0:Math.abs(W(V,!0)-W(ae,!0))),ue<X){var le=Ra(H,$),de=Ra(P,A),be=le===-de?1:0;if(x)if(L.hasB)Q="M"+(H+X*le)+","+P+"A "+X+","+X+" 0 0 "+be+" "+H+","+(P+X*de)+"V"+(A-X*de)+"A "+X+","+X+" 0 0 "+be+" "+(H+X*le)+","+A+"H"+($-X*le)+"A "+X+","+X+" 0 0 "+be+" "+$+","+(A-X*de)+"V"+(P+X*de)+"A "+X+","+X+" 0 0 "+be+" "+($-X*le)+","+P+"Z";else{te=Math.abs($-H)+ue;var Te=te<X?X-Math.sqrt(te*(2*X-te)):0,Le=ue>0?Math.sqrt(ue*(2*X-ue)):0,_e=le>0?Math.max:Math.min;Q="M"+H+","+P+"V"+(A-Te*de)+"H"+_e($-(X-ue)*le,H)+"A "+X+","+X+" 0 0 "+be+" "+$+","+(A-X*de-Le)+"V"+(P+X*de+Le)+"A "+X+","+X+" 0 0 "+be+" "+_e($-(X-ue)*le,H)+","+(P+Te*de)+"Z"}else if(L.hasB)Q="M"+(H+X*le)+","+P+"A "+X+","+X+" 0 0 "+be+" "+H+","+(P+X*de)+"V"+(A-X*de)+"A "+X+","+X+" 0 0 "+be+" "+(H+X*le)+","+A+"H"+($-X*le)+"A "+X+","+X+" 0 0 "+be+" "+$+","+(A-X*de)+"V"+(P+X*de)+"A "+X+","+X+" 0 0 "+be+" "+($-X*le)+","+P+"Z";else{te=Math.abs(A-P)+ue;var Ie=te<X?X-Math.sqrt(te*(2*X-te)):0,ce=ue>0?Math.sqrt(ue*(2*X-ue)):0,ye=de>0?Math.max:Math.min;Q="M"+(H+Ie*le)+","+P+"V"+ye(A-(X-ue)*de,P)+"A "+X+","+X+" 0 0 "+be+" "+(H+X*le-ce)+","+A+"H"+($-X*le+ce)+"A "+X+","+X+" 0 0 "+be+" "+($-Ie*le)+","+ye(A-(X-ue)*de,P)+"V"+P+"Z"}}else Q=xe}else Q=xe;var Ee=MA(or.ensureSingle(z,"path"),s,i,n);if(Ee.style("vector-effect",f?"none":"non-scaling-stroke").attr("d",isNaN(($-H)*(A-P))||M&&t._context.staticPlot?"M0,0Z":Q).call(_i.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&_){var ze=_i.makePointStyleFns(h);_i.singlePointStyle(L,Ee,h,ze,t)}W8(t,e,z,u,R,H,$,P,A,X,ue,i,n),e.layerClipId&&_i.hideOutsideRangePoint(L,z.select("text"),o,l,h.xcalendar,h.ycalendar)});var D=h.cliponaxis===!1;_i.setClipUrl(v,D?null:e.layerClipId,t)});$8.getComponentMethod("errorbars","plot")(t,c,e,i)}function W8(t,e,r,a,i,n,o,l,s,f,c,u,v){var h=e.xaxis,d=e.yaxis,p=t._fullLayout,m;function y(te,xe,ue){var ae=or.ensureSingle(te,"text").text(xe).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(_i.font,ue).call(I8.convertToTspans,t);return ae}var b=a[0].trace,w=b.orientation==="h",g=K8(p,a,i,h,d);m=Q8(b,i);var x=u.mode==="stack"||u.mode==="relative",_=a[i],k=!x||_._outmost,T=_.hasB,S=f&&f-c>br;if(!g||m==="none"||(_.isBlank||n===o||l===s)&&(m==="auto"||m==="inside")){r.select("text").remove();return}var D=p.font,L=cd.getBarColor(a[i],b),R=cd.getInsideTextFont(b,i,D,L),z=cd.getOutsideTextFont(b,i,D),N=b.insidetextanchor||"end",H=r.datum();w?h.type==="log"&&H.s0<=0&&(h.range[0]<h.range[1]?n=0:n=h._length):d.type==="log"&&H.s0<=0&&(d.range[0]<d.range[1]?l=d._length:l=0);var $=Math.abs(o-n),P=Math.abs(s-l),A=$-2*br,M=P-2*br,C,E,F,j,B;if(m==="outside"&&!k&&!_.hasB&&(m="inside"),m==="auto")if(k){m="inside",B=or.ensureUniformFontSize(t,R),C=y(r,g,B),E=_i.bBox(C.node()),F=E.width,j=E.height;var G=F>0&&j>0,O;S?T?O=Ki(A-2*f,M,F,j,w)||Ki(A,M-2*f,F,j,w):w?O=Ki(A-(f-c),M,F,j,w)||Ki(A,M-2*(f-c),F,j,w):O=Ki(A,M-(f-c),F,j,w)||Ki(A-2*(f-c),M,F,j,w):O=Ki(A,M,F,j,w),G&&O?m="inside":(m="outside",C.remove(),C=null)}else m="inside";if(!C){B=or.ensureUniformFontSize(t,m==="outside"?z:R),C=y(r,g,B);var W=C.attr("transform");if(C.attr("transform",""),E=_i.bBox(C.node()),F=E.width,j=E.height,C.attr("transform",W),F<=0||j<=0){C.remove();return}}var V=b.textangle,Z,X;m==="outside"?(X=b.constraintext==="both"||b.constraintext==="outside",Z=Z8(n,o,l,s,E,{isHorizontal:w,constrained:X,angle:V})):(X=b.constraintext==="both"||b.constraintext==="inside",Z=DA(n,o,l,s,E,{isHorizontal:w,constrained:X,angle:V,anchor:N,hasB:T,r:f,overhead:c})),Z.fontSize=B.size,N8(b.type==="histogram"?"bar":b.type,Z,p),_.transform=Z;var Q=MA(C,p,u,v);or.setTransormAndDisplay(Q,Z)}function Ki(t,e,r,a,i){if(t<0||e<0)return!1;var n=r<=t&&a<=e,o=r<=e&&a<=t,l=i?t>=r*(e/a):e>=a*(t/r);return n||o||l}function LA(t){return t==="auto"?0:t}function CA(t,e){var r=Math.PI/180*e,a=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*a,y:t.width*a+t.height*i}}function DA(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=n.anchor,c=f==="end",u=f==="start",v=n.leftToRight||0,h=(v+1)/2,d=1-h,p=n.hasB,m=n.r,y=n.overhead,b=i.width,w=i.height,g=Math.abs(e-t),x=Math.abs(a-r),_=g>2*br&&x>2*br?br:0;g-=2*_,x-=2*_;var k=LA(s);s==="auto"&&!(b<=g&&w<=x)&&(b>g||w>x)&&(!(b>x||w>g)||b<w!=g<x)&&(k+=90);var T=CA(i,k),S,D;if(m&&m-y>br){var L=q8(t,e,r,a,T,m,y,o,p);S=L.scale,D=L.pad}else S=1,l&&(S=Math.min(1,g/T.x,x/T.y)),D=0;var R=i.left*d+i.right*h,z=(i.top+i.bottom)/2,N=(t+br)*d+(e-br)*h,H=(r+a)/2,$=0,P=0;if(u||c){var A=(o?T.x:T.y)/2;m&&(c||p)&&(_+=D);var M=o?Ra(t,e):Ra(r,a);o?u?(N=t+M*_,$=-M*A):(N=e-M*_,$=M*A):u?(H=r+M*_,P=-M*A):(H=a-M*_,P=M*A)}return{textX:R,textY:z,targetX:N,targetY:H,anchorX:$,anchorY:P,scale:S,rotate:k}}function q8(t,e,r,a,i,n,o,l,s){var f=Math.max(0,Math.abs(e-t)-2*br),c=Math.max(0,Math.abs(a-r)-2*br),u=n-br,v=o?u-Math.sqrt(u*u-(u-o)*(u-o)):u,h=s?u*2:l?u-o:2*v,d=s?u*2:l?2*v:u-o,p,m,y,b,w;return i.y/i.x>=c/(f-h)?b=c/i.y:i.y/i.x<=(c-d)/f?b=f/i.x:!s&&l?(p=i.x*i.x+i.y*i.y/4,m=-2*i.x*(f-u)-i.y*(c/2-u),y=(f-u)*(f-u)+(c/2-u)*(c/2-u)-u*u,b=(-m+Math.sqrt(m*m-4*p*y))/(2*p)):s?(p=(i.x*i.x+i.y*i.y)/4,m=-i.x*(f/2-u)-i.y*(c/2-u),y=(f/2-u)*(f/2-u)+(c/2-u)*(c/2-u)-u*u,b=(-m+Math.sqrt(m*m-4*p*y))/(2*p)):(p=i.x*i.x/4+i.y*i.y,m=-i.x*(f/2-u)-2*i.y*(c-u),y=(f/2-u)*(f/2-u)+(c-u)*(c-u)-u*u,b=(-m+Math.sqrt(m*m-4*p*y))/(2*p)),b=Math.min(1,b),l?w=Math.max(0,u-Math.sqrt(Math.max(0,u*u-(u-(c-i.y*b)/2)*(u-(c-i.y*b)/2)))-o):w=Math.max(0,u-Math.sqrt(Math.max(0,u*u-(u-(f-i.x*b)/2)*(u-(f-i.x*b)/2)))-o),{scale:b,pad:w}}function Z8(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=i.width,c=i.height,u=Math.abs(e-t),v=Math.abs(a-r),h;o?h=v>2*br?br:0:h=u>2*br?br:0;var d=1;l&&(d=o?Math.min(1,v/c):Math.min(1,u/f));var p=LA(s),m=CA(i,p),y=(o?m.x:m.y)/2,b=(i.left+i.right)/2,w=(i.top+i.bottom)/2,g=(t+e)/2,x=(r+a)/2,_=0,k=0,T=o?Ra(e,t):Ra(r,a);return o?(g=e-T*h,_=T*y):(x=a+T*h,k=-T*y),{textX:b,textY:w,targetX:g,targetY:x,anchorX:_,anchorY:k,scale:d,rotate:p}}function K8(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=J8(t,e,r,a,i):n.textinfo?l=eH(e,r,a,i):l=$o.getValue(n.text,r),$o.coerceString(j8,l)}function Q8(t,e){var r=$o.getValue(t.textposition,e);return $o.coerceEnumerated(B8,r)}function J8(t,e,r,a,i){var n=e[0].trace,o=or.castOption(n,r,"texttemplate");if(!o)return"";var l=n.type==="histogram",s=n.type==="waterfall",f=n.type==="funnel",c=n.orientation==="h",u,v,h,d;c?(u="y",v=i,h="x",d=a):(u="x",v=a,h="y",d=i);function p(_){return Ac(v,v.c2l(_),!0).text}function m(_){return Ac(d,d.c2l(_),!0).text}var y=e[r],b={};b.label=y.p,b.labelLabel=b[u+"Label"]=p(y.p);var w=or.castOption(n,y.i,"text");(w===0||w)&&(b.text=w),b.value=y.s,b.valueLabel=b[h+"Label"]=m(y.s);var g={};G8(g,n,y.i),(l||g.x===void 0)&&(g.x=c?b.value:b.label),(l||g.y===void 0)&&(g.y=c?b.label:b.value),(l||g.xLabel===void 0)&&(g.xLabel=c?b.valueLabel:b.labelLabel),(l||g.yLabel===void 0)&&(g.yLabel=c?b.labelLabel:b.valueLabel),s&&(b.delta=+y.rawS||y.s,b.deltaLabel=m(b.delta),b.final=y.v,b.finalLabel=m(b.final),b.initial=b.final-b.delta,b.initialLabel=m(b.initial)),f&&(b.value=y.s,b.valueLabel=m(b.value),b.percentInitial=y.begR,b.percentInitialLabel=or.formatPercent(y.begR),b.percentPrevious=y.difR,b.percentPreviousLabel=or.formatPercent(y.difR),b.percentTotal=y.sumR,b.percenTotalLabel=or.formatPercent(y.sumR));var x=or.castOption(n,y.i,"customdata");return x&&(b.customdata=x),or.texttemplateString(o,b,t._d3locale,g,b,n._meta||{})}function eH(t,e,r,a){var i=t[0].trace,n=i.orientation==="h",o=i.type==="waterfall",l=i.type==="funnel";function s(x){var _=n?a:r;return Ac(_,x,!0).text}function f(x){var _=n?r:a;return Ac(_,+x,!0).text}var c=i.textinfo,u=t[e],v=c.split("+"),h=[],d,p=function(x){return v.indexOf(x)!==-1};if(p("label")&&h.push(s(t[e].p)),p("text")&&(d=or.castOption(i,u.i,"text"),(d===0||d)&&h.push(d)),o){var m=+u.rawS||u.s,y=u.v,b=y-m;p("initial")&&h.push(f(b)),p("delta")&&h.push(f(m)),p("final")&&h.push(f(y))}if(l){p("value")&&h.push(f(u.s));var w=0;p("percent initial")&&w++,p("percent previous")&&w++,p("percent total")&&w++;var g=w>1;p("percent initial")&&(d=or.formatPercent(u.begR),g&&(d+=" of initial"),h.push(d)),p("percent previous")&&(d=or.formatPercent(u.difR),g&&(d+=" of previous"),h.push(d)),p("percent total")&&(d=or.formatPercent(u.sumR),g&&(d+=" of total"),h.push(d))}return h.join("<br>")}var gm={plot:Y8,toMoveInsideBar:DA},xl=_a,tH=Je,Fx=ot,rH=me.fillText,aH=ai.getLineWidth,vd=Dt.hoverLabelText,iH=Yt.BADNUM;function nH(t,e,r,a,i){var n=oH(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=lH(l,s),tH.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function oH(t,e,r,a,i){var n=t.cd,o=n[0].trace,l=n[0].t,s=a==="closest",f=o.type==="waterfall",c=t.maxHoverDistance,u=t.maxSpikeDistance,v,h,d,p,m,y,b;o.orientation==="h"?(v=r,h=e,d="y",p="x",m=H,y=R):(v=e,h=r,d="x",p="y",y=H,m=R);var w=o[d+"period"],g=s||w;function x(O){return k(O,-1)}function _(O){return k(O,1)}function k(O,W){var V=O.w;return O[d]+W*V/2}function T(O){return O[d+"End"]-O[d+"Start"]}var S=s?x:w?function(O){return O.p-T(O)/2}:function(O){return Math.min(x(O),O.p-l.bardelta/2)},D=s?_:w?function(O){return O.p+T(O)/2}:function(O){return Math.max(_(O),O.p+l.bardelta/2)};function L(O,W,V){return i.finiteRange&&(V=0),xl.inbox(O-v,W-v,V+Math.min(1,Math.abs(W-O)/b)-1)}function R(O){return L(S(O),D(O),c)}function z(O){return L(x(O),_(O),u)}function N(O){var W=O[p];if(f){var V=Math.abs(O.rawS)||0;h>0?W+=V:h<0&&(W-=V)}return W}function H(O){var W=h,V=O.b,Z=N(O);return xl.inbox(V-W,Z-W,c+(Z-W)/(Z-V)-1)}function $(O){var W=h,V=O.b,Z=N(O);return xl.inbox(V-W,Z-W,u+(Z-W)/(Z-V)-1)}var P=t[d+"a"],A=t[p+"a"];b=Math.abs(P.r2c(P.range[1])-P.r2c(P.range[0]));function M(O){return(m(O)+y(O))/2}var C=xl.getDistanceFunction(a,m,y,M);if(xl.getClosest(n,C,t),t.index!==!1&&n[t.index].p!==iH){g||(S=function(O){return Math.min(x(O),O.p-l.bargroupwidth/2)},D=function(O){return Math.max(_(O),O.p+l.bargroupwidth/2)});var E=t.index,F=n[E],j=o.base?F.b+F.s:F.s;t[p+"0"]=t[p+"1"]=A.c2p(F[p],!0),t[p+"LabelVal"]=j;var B=l.extents[l.extents.round(F.p)];t[d+"0"]=P.c2p(s?S(F):B[0],!0),t[d+"1"]=P.c2p(s?D(F):B[1],!0);var G=F.orig_p!==void 0;return t[d+"LabelVal"]=G?F.orig_p:F.p,t.labelLabel=vd(P,t[d+"LabelVal"],o[d+"hoverformat"]),t.valueLabel=vd(A,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=vd(A,F.b,o[p+"hoverformat"]),t.spikeDistance=($(F)+z(F))/2,t[d+"Spike"]=P.c2p(F.p,!0),rH(F,o,t),t.hovertemplate=o.hovertemplate,t}}function lH(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=aH(t,e);if(Fx.opacity(r))return r;if(Fx.opacity(a)&&i)return a}var PA={hoverPoints:nH},sH=function(e,r,a){return e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),a.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e},EA=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=a[0].trace,l=o.type==="funnel",s=o.orientation==="h",f=[],c;if(r===!1)for(c=0;c<a.length;c++)a[c].selected=0;else for(c=0;c<a.length;c++){var u=a[c],v="ct"in u?u.ct:fH(u,i,n,s,l);r.contains(v,!1,c,e)?(f.push({pointNumber:c,x:i.c2d(u.x),y:n.c2d(u.y)}),u.selected=1):u.selected=0}return f};function fH(t,e,r,a,i){var n=e.c2p(a?t.s0:t.p0,!0),o=e.c2p(a?t.s1:t.p1,!0),l=r.c2p(a?t.p0:t.s0,!0),s=r.c2p(a?t.p1:t.s1,!0);return i?[(n+o)/2,(l+s)/2]:a?[o,(l+s)/2]:[(n+o)/2,s]}var cH={attributes:ks,layoutAttributes:hm,supplyDefaults:bn.supplyDefaults,crossTraceDefaults:bn.crossTraceDefaults,supplyLayoutDefaults:uA,calc:b8,crossTraceCalc:am.crossTraceCalc,colorbar:_s,arraysToCalcdata:pm,plot:gm.plot,style:xn.style,styleOnSelect:xn.styleOnSelect,hoverPoints:PA.hoverPoints,eventData:sH,selectPoints:EA,moduleType:"trace",name:"bar",basePlotModule:Jt,categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set to *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}},uH=cH;const QB=Ci(uH);var vH=function(e,r){return{start:{valType:"any",editType:"calc",description:["Sets the starting value for the",e,"axis bins. Defaults to the minimum data value,","shifted down if necessary to make nice round values","and to remove ambiguous bin edges. For example, if most of the","data is integers we shift the bin edges 0.5 down, so a `size`","of 5 would have a default `start` of -0.5, so it is clear","that 0-4 are in the first bin, 5-9 in the second, but","continuous data gets a start of 0 and bins [0,5), [5,10) etc.","Dates behave similarly, and `start` should be a date string.","For category data, `start` is based on the category serial","numbers, and defaults to -0.5.",r?"If multiple non-overlaying histograms share a subplot, the first explicit `start` is used exactly and all others are shifted down (if necessary) to differ from that one by an integer number of bins.":""].join(" ")},end:{valType:"any",editType:"calc",description:["Sets the end value for the",e,"axis bins. The last bin may not end exactly at this value,","we increment the bin edge by `size` from `start` until we","reach or exceed `end`. Defaults to the maximum data value.","Like `start`, for dates use a date string, and for category","data `end` is based on the category serial numbers."].join(" ")},size:{valType:"any",editType:"calc",description:["Sets the size of each",e,"axis bin.","Default behavior: If `nbins"+e+"` is 0 or omitted,","we choose a nice round bin size such that the number of bins","is about the same as the typical number of samples in each bin.","If `nbins"+e+"` is provided, we choose a nice round","bin size giving no more than that many bins.","For date data, use milliseconds or *M<n>* for months, as in","`axis.dtick`. For category data, the number of categories to","bin together (always defaults to 1).",r?"If multiple non-overlaying histograms share a subplot, the first explicit `size` is used and all others discarded. If no `size` is provided,the sample data from all traces is combined to determine `size` as described above.":""].join(" ")},editType:"calc"}},dH={eventDataKeys:["binNumber"]},Pr=ks,$x=Xo.axisHoverFormat,hH=mr.hovertemplateAttrs,pH=mr.texttemplateAttrs,dd=vr,Nx=vH,mH=dH,hd=Nt.extendFlat,RA={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the x axis."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the y axis."].join(" ")},xhoverformat:$x("x"),yhoverformat:$x("y"),text:hd({},Pr.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:hd({},Pr.hovertext,{description:"Same as `text`."}),orientation:Pr.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc",description:["Specifies the binning function used for this histogram trace.","If *count*, the histogram values are computed by counting the","number of values lying inside each bin.","If *sum*, *avg*, *min*, *max*,","the histogram values are computed using","the sum, the average, the minimum or the maximum","of the values lying inside each bin respectively."].join(" ")},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc",description:["Specifies the type of normalization used for this histogram trace.","If **, the span of each bar corresponds to the number of","occurrences (i.e. the number of data points lying inside the bins).","If *percent* / *probability*, the span of each bar corresponds to","the percentage / fraction of occurrences with respect to the total","number of sample points","(here, the sum of all bin HEIGHTS equals 100% / 1).","If *density*, the span of each bar corresponds to the number of","occurrences in a bin divided by the size of the bin interval","(here, the sum of all bin AREAS equals the","total number of sample points).","If *probability density*, the area of each bar corresponds to the","probability that an event will fall into the corresponding bin","(here, the sum of all bin AREAS equals 1)."].join(" ")},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc",description:["If true, display the cumulative distribution by summing the","binned values. Use the `direction` and `centralbin` attributes","to tune the accumulation method.","Note: in this mode, the *density* `histnorm` settings behave","the same as their equivalents without *density*:","** and *density* both rise to the number of data points, and","*probability* and *probability density* both rise to the","number of sample points."].join(" ")},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc",description:["Only applies if cumulative is enabled.","If *increasing* (default) we sum all prior bins, so the result","increases from left to right. If *decreasing* we sum later bins","so the result decreases from left to right."].join(" ")},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc",description:["Only applies if cumulative is enabled.","Sets whether the current bin is included, excluded, or has half","of its value included in the current cumulative value.","*include* is the default for compatibility with various other","tools, however it introduces a half-bin bias to the results.","*exclude* makes the opposite half-bin bias, and *half* removes","it."].join(" ")},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `xbins.size` is provided."].join(" ")},xbins:Nx("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `ybins.size` is provided."].join(" ")},ybins:Nx("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobinx` is not needed. However, we accept","`autobinx: true` or `false` and will update `xbins` accordingly","before deleting `autobinx` from the trace."].join(" ")},autobiny:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobiny` is not needed. However, we accept","`autobiny: true` or `false` and will update `ybins` accordingly","before deleting `autobiny` from the trace."].join(" ")},bingroup:{valType:"string",dflt:"",editType:"calc",description:["Set a group of histogram traces which will have compatible bin settings.","Note that traces on the same subplot and with the same *orientation*","under `barmode` *stack*, *relative* and *group* are forced into the same bingroup,","Using `bingroup`, traces under `barmode` *overlay* and on different axes","(of the same axis type) can have compatible bin settings.","Note that histogram and histogram2d* trace can share the same `bingroup`"].join(" ")},hovertemplate:hH({},{keys:mH.eventDataKeys}),texttemplate:pH({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:hd({},Pr.textposition,{arrayOk:!1}),textfont:dd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:dd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:dd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:Pr.insidetextanchor,textangle:Pr.textangle,cliponaxis:Pr.cliponaxis,constraintext:Pr.constraintext,marker:Pr.marker,offsetgroup:Pr.offsetgroup,alignmentgroup:Pr.alignmentgroup,selected:Pr.selected,unselected:Pr.unselected,_deprecated:{bardir:Pr._deprecated.bardir}},Hx=Je,_l=me,Ox=ot,yH=bn.handleText,gH=lA,bH=RA,xH=function(e,r,a,i){function n(b,w){return _l.coerce(e,r,bH,b,w)}var o=n("x"),l=n("y"),s=n("cumulative.enabled");s&&(n("cumulative.direction"),n("cumulative.currentbin")),n("text");var f=n("textposition");yH(e,r,i,n,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n("hovertext"),n("hovertemplate"),n("xhoverformat"),n("yhoverformat");var c=n("orientation",l&&!o?"h":"v"),u=c==="v"?"x":"y",v=c==="v"?"y":"x",h=o&&l?Math.min(_l.minRowLength(o)&&_l.minRowLength(l)):_l.minRowLength(r[u]||[]);if(!h){r.visible=!1;return}r._length=h;var d=Hx.getComponentMethod("calendars","handleTraceDefaults");d(e,r,["x","y"],i);var p=r[v];p&&n("histfunc"),n("histnorm"),n("autobin"+u),gH(e,r,n,a,i),_l.coerceSelectionMarkerOpacity(r,n);var m=(r.marker.line||{}).color,y=Hx.getComponentMethod("errorbars","supplyDefaults");y(e,r,m||Ox.defaultLine,{axis:"y"}),y(e,r,m||Ox.defaultLine,{axis:"x",inherit:"y"})},Dl=me,_H=Wt,xf=Je.traceIs,wH=Jp,TH=bn.validateCornerradius,jx=Dl.nestedProperty,pd=ti.getAxisGroup,Bx=[{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"}],kH=["x","y"],AH=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,u,v,h;function d(H,$){return Dl.coerce(l._input,l,l._module.attributes,H,$)}function p(H){return H.orientation==="v"?"x":"y"}function m(H,$){var P=_H.getFromTrace({_fullLayout:r},H,$);return P.type}function y(H,$,P){var A=H.uid+"__"+P;$||($=A);var M=m(H,P),C=H[P+"calendar"]||"",E=a[$],F=!0;E&&(M===E.axType&&C===E.calendar?(F=!1,E.traces.push(H),E.dirs.push(P)):($=A,M!==E.axType&&Dl.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+M,"axis","with bins on","type:"+E.axType,"axis."].join(" ")),C!==E.calendar&&Dl.warn(["Attempted to group the bins of trace",H.index,"set with a",C,"calendar","with bins",E.calendar?"on a "+E.calendar+" calendar":"w/o a set calendar"].join(" ")))),F&&(a[$]={traces:[H],dirs:[P],axType:M,calendar:H[P+"calendar"]||""}),H["_"+P+"bingroup"]=$}for(u=0;u<e.length;u++)if(l=e[u],xf(l,"histogram")){if(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,l.type==="histogram"){var b=d("marker.cornerradius",r.barcornerradius);l.marker&&(l.marker.cornerradius=TH(b))}xf(l,"2dMap")||wH(l._input,l,r,d)}var w=r._alignmentOpts||{};for(u=0;u<i.length;u++){if(l=i[u],f="",!xf(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var g=l[c+"axis"],x=pd(r,g)+l.orientation;(w[x]||{})[l.alignmentgroup]&&(f=x)}!f&&r.barmode!=="overlay"&&(f=pd(r,l.xaxis)+pd(r,l.yaxis)+p(l))}f?(n[f]||(n[f]=[]),n[f].push(l)):o.push(l)}for(f in n){if(s=n[f],s.length===1){o.push(s[0]);continue}var _=!1;for(s.length&&(l=s[0],_=d("bingroup")),f=_||f,u=0;u<s.length;u++){l=s[u];var k=l._input.bingroup;k&&k!==f&&Dl.warn(["Trace",l.index,"must match","within bingroup",f+".","Ignoring its bingroup:",k,"setting."].join(" ")),l.bingroup=f,y(l,f,p(l))}}for(u=0;u<o.length;u++){l=o[u];var T=d("bingroup");if(xf(l,"2dMap"))for(h=0;h<2;h++){c=kH[h];var S=d(c+"bingroup",T?T+"__"+c:null);y(l,S,c)}else y(l,T,p(l))}for(f in a){var D=a[f];for(s=D.traces,v=0;v<Bx.length;v++){var L=Bx[v],R=L.name,z,N;if(!(R==="nbins"&&D.sizeFound)){for(u=0;u<s.length;u++){if(l=s[u],c=D.dirs[u],z=L.aStr[c],jx(l._input,z).get()!==void 0){D[R]=d(z),D[R+"Found"]=!0;break}N=(l._autoBin||{})[c]||{},N[R]&&jx(l,z).set(N[R])}if(R==="start"||R==="end")for(;u<s.length;u++)l=s[u],l["_"+c+"bingroup"]&&(N=(l._autoBin||{})[c]||{},d(z,N[R]));R==="nbins"&&!D.sizeFound&&!D.nbinsFound&&(l=s[0],D[R]=d(z))}}}},Kn=dt,MH={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return Kn(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return Kn(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(Kn(i))if(i=Number(i),Kn(r[t])){if(r[t]>i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0},max:function(t,e,r,a){var i=a[e];if(Kn(i))if(i=Number(i),Kn(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},SH={percent:function(t,e){for(var r=t.length,a=100/e,i=0;i<r;i++)t[i]*=a},probability:function(t,e){for(var r=t.length,a=0;a<r;a++)t[a]/=e},density:function(t,e,r,a){var i=t.length;a=a||1;for(var n=0;n<i;n++)t[n]*=r[n]*a},"probability density":function(t,e,r,a){var i=t.length;a&&(e/=a);for(var n=0;n<i;n++)t[n]*=r[n]/e}},LH=function(e,r){for(var a=e.length,i=0,n=0;n<a;n++)r[n]?(e[n]/=r[n],i+=e[n]):e[n]=null;return i},Zo=Yt,pn=Zo.ONEAVGYEAR,Gx=Zo.ONEAVGMONTH,Mc=Zo.ONEDAY,Ux=Zo.ONEHOUR,Vx=Zo.ONEMIN,Xx=Zo.ONESEC,Yx=Dt.tickIncrement,CH=function(e,r,a,i,n){var o=-1.1*r,l=-.1*r,s=e-l,f=a[0],c=a[1],u=Math.min(_f(f+l,f+s,i,n),_f(c+l,c+s,i,n)),v=Math.min(_f(f+o,f+l,i,n),_f(c+o,c+l,i,n)),h,d;if(u>v&&v<Math.abs(c-f)/4e3?(h=u,d=!1):(h=Math.min(u,v),d=!0),i.type==="date"&&h>Mc){var p=h===pn?1:6,m=h===pn?"M12":"M1";return function(y,b){var w=i.c2d(y,pn,n),g=w.indexOf("-",p);g>0&&(w=w.substr(0,g));var x=i.d2c(w,0,n);if(x<y){var _=Yx(x,m,!1,n);(x+_)/2<y+e&&(x=_)}return b&&d?Yx(x,m,!0,n):x}}return function(y,b){var w=h*Math.round(y/h);return w+h/10<y&&w+h*.9<y+e&&(w+=h),b&&d&&(w-=h),w}};function _f(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=Wx(i,n),l=0;l<10;l++){var s=Wx(o*80,n);if(o===s)break;if(DH(s,t,e,n,r,a))o=s;else break}return o}function Wx(t,e){return e&&t>Xx?t>Mc?t>pn*1.1?pn:t>Gx*1.1?Gx:Mc:t>Ux?Ux:t>Vx?Vx:Xx:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function DH(t,e,r,a,i,n){if(a&&t>Mc){var o=qx(e,i,n),l=qx(r,i,n),s=t===pn?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function qx(t,e,r){var a=e.c2d(t,pn,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var Ah=dt,gr=me,Zx=Je,Qr=Dt,PH=pm,Kx=MH,EH=SH,RH=LH,zH=CH;function IH(t,e){var r=[],a=[],i=e.orientation==="h",n=Qr.getFromId(t,i?e.yaxis:e.xaxis),o=i?"y":"x",l={x:"y",y:"x"}[o],s=e[o+"calendar"],f=e.cumulative,c,u=zA(t,e,n,o),v=u[0],h=u[1],d=typeof v.size=="string",p=[],m=d?p:v,y=[],b=[],w=[],g=0,x=e.histnorm,_=e.histfunc,k=x.indexOf("density")!==-1,T,S,D;f.enabled&&k&&(x=x.replace(/ ?density$/,""),k=!1);var L=_==="max"||_==="min",R=L?null:0,z=Kx.count,N=EH[x],H=!1,$=function(te){return n.r2c(te,0,s)},P;for(gr.isArrayOrTypedArray(e[l])&&_!=="count"&&(P=e[l],H=_==="avg",z=Kx[_]),c=$(v.start),S=$(v.end)+(c-Qr.tickIncrement(c,v.size,!1,s))/1e6;c<S&&r.length<1e6&&(T=Qr.tickIncrement(c,v.size,!1,s),r.push((c+T)/2),a.push(R),w.push([]),p.push(c),k&&y.push(1/(T-c)),H&&b.push(0),!(T<=c));)c=T;p.push(c),!d&&n.type==="date"&&(m={start:$(m.start),end:$(m.end),size:m.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var A=e["_"+o+"bingroup"],M={leftGap:1/0,rightGap:1/0};A&&(t._fullLayout._roundFnOpts[A]||(t._fullLayout._roundFnOpts[A]=M),M=t._fullLayout._roundFnOpts[A]);var C=a.length,E=!0,F=M.leftGap,j=M.rightGap,B={};for(c=0;c<h.length;c++){var G=h[c];D=gr.findBin(G,m),D>=0&&D<C&&(g+=z(D,c,a,P,b),E&&w[D].length&&G!==h[w[D][0]]&&(E=!1),w[D].push(c),B[c]=D,F=Math.min(F,G-p[D]),j=Math.min(j,p[D+1]-G))}M.leftGap=F,M.rightGap=j;var O;E||(O=function(te,xe){return function(){var ue=t._fullLayout._roundFnOpts[A];return zH(ue.leftGap,ue.rightGap,p,n,s)(te,xe)}}),H&&(g=RH(a,b)),N&&N(a,g,y),f.enabled&&NH(a,f.direction,f.currentbin);var W=Math.min(r.length,a.length),V=[],Z=0,X=W-1;for(c=0;c<W;c++)if(a[c]){Z=c;break}for(c=W-1;c>=Z;c--)if(a[c]){X=c;break}for(c=Z;c<=X;c++)if(Ah(r[c])&&Ah(a[c])){var Q={p:r[c],s:a[c],b:0};f.enabled||(Q.pts=w[c],E?Q.ph0=Q.ph1=w[c].length?h[w[c][0]]:r[c]:(e._computePh=!0,Q.ph0=O(p[c]),Q.ph1=O(p[c+1],!0))),V.push(Q)}return V.length===1&&(V[0].width1=Qr.tickIncrement(V[0].p,v.size,!1,s)-V[0].p),PH(V,e),gr.isArrayOrTypedArray(e.selectedpoints)&&gr.tagSelected(V,e,B),V}function zA(t,e,r,a,i){var n=a+"bins",o=t._fullLayout,l=e["_"+a+"bingroup"],s=o._histogramBinOpts[l],f=o.barmode==="overlay",c,u,v,h,d,p,m,y=function(G){return r.r2c(G,0,h)},b=function(G){return r.c2r(G,0,h)},w=r.type==="date"?function(G){return G||G===0?gr.cleanDate(G,null,h):null}:function(G){return Ah(G)?Number(G):null};function g(G,O,W){O[G+"Found"]?(O[G]=w(O[G]),O[G]===null&&(O[G]=W[G])):(p[G]=O[G]=W[G],gr.nestedProperty(u[0],n+"."+G).set(W[G]))}if(e["_"+a+"autoBinFinished"])delete e["_"+a+"autoBinFinished"];else{u=s.traces;var x=[],_=!0,k=!1,T=!1;for(c=0;c<u.length;c++)if(v=u[c],v.visible){var S=s.dirs[c];d=v["_"+S+"pos0"]=r.makeCalcdata(v,S),x=gr.concat(x,d),delete v["_"+a+"autoBinFinished"],e.visible===!0&&(_?_=!1:(delete v._autoBin,v["_"+a+"autoBinFinished"]=1),Zx.traceIs(v,"2dMap")&&(k=!0),v.type==="histogram2dcontour"&&(T=!0))}h=u[0][a+"calendar"];var D=Qr.autoBin(x,r,s.nbins,k,h,s.sizeFound&&s.size),L=u[0]._autoBin={};if(p=L[s.dirs[0]]={},T&&(s.size||(D.start=b(Qr.tickIncrement(y(D.start),D.size,!0,h))),s.end===void 0&&(D.end=b(Qr.tickIncrement(y(D.end),D.size,!1,h)))),f&&!Zx.traceIs(e,"2dMap")&&D._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"&&e.bingroup===""&&typeof e.xbins>"u"){if(i)return[D,d,!0];D=FH(t,e,r,a,n)}m=v.cumulative||{},m.enabled&&m.currentbin!=="include"&&(m.direction==="decreasing"?D.start=b(Qr.tickIncrement(y(D.start),D.size,!0,h)):D.end=b(Qr.tickIncrement(y(D.end),D.size,!1,h))),s.size=D.size,s.sizeFound||(p.size=D.size,gr.nestedProperty(u[0],n+".size").set(D.size)),g("start",s,D),g("end",s,D)}d=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var R=e._input[n]||{},z=gr.extendFlat({},s),N=s.start,H=r.r2l(R.start),$=H!==void 0;if((s.startFound||$)&&H!==r.r2l(N)){var P=$?H:gr.aggNums(Math.min,null,d),A={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:N,calendar:h,range:[P,Qr.tickIncrement(P,s.size,!1,h)].map(r.l2r)},M=Qr.tickFirst(A);M>r.r2l(P)&&(M=Qr.tickIncrement(M,s.size,!0,h)),z.start=r.l2r(M),$||gr.nestedProperty(e,n+".start").set(z.start)}var C=s.end,E=r.r2l(R.end),F=E!==void 0;if((s.endFound||F)&&E!==r.r2l(C)){var j=F?E:gr.aggNums(Math.max,null,d);z.end=r.l2r(j),F||gr.nestedProperty(e,n+".start").set(z.end)}var B="autobin"+a;return e._input[B]===!1&&(e._input[n]=gr.extendFlat({},e[n]||{}),delete e._input[B],delete e[B]),[z,d]}function FH(t,e,r,a,i){var n=t._fullLayout,o=$H(t,e),l=!1,s=1/0,f=[e],c,u,v;for(c=0;c<o.length;c++)if(u=o[c],u===e)l=!0;else if(!l)v=n._histogramBinOpts[u["_"+a+"bingroup"]],s=Math.min(s,v.size||u[i].size);else{var h=zA(t,u,r,a,!0),d=h[0],p=h[2];u["_"+a+"autoBinFinished"]=1,u["_"+a+"pos0"]=h[1],p?f.push(u):s=Math.min(s,d.size)}var m=new Array(f.length);for(c=0;c<f.length;c++)for(var y=f[c]["_"+a+"pos0"],b=0;b<y.length;b++)if(y[b]!==void 0){m[c]=y[b];break}for(isFinite(s)||(s=gr.distinctVals(m).minDiff),c=0;c<f.length;c++){u=f[c];var w=u[a+"calendar"],g={start:r.c2r(m[c]-s/2,0,w),end:r.c2r(m[c]+s/2,0,w),size:s};u._input[i]=u[i]=g,v=n._histogramBinOpts[u["_"+a+"bingroup"]],v&&gr.extendFlat(v,g)}return e[i]}function $H(t,e){for(var r=e.xaxis,a=e.yaxis,i=e.orientation,n=[],o=t._fullData,l=0;l<o.length;l++){var s=o[l];s.type==="histogram"&&s.visible===!0&&s.orientation===i&&s.xaxis===r&&s.yaxis===a&&n.push(s)}return n}function NH(t,e,r){var a,i,n;function o(s){n=t[s],t[s]/=2}function l(s){i=t[s],t[s]=n+i/2,n+=i}if(r==="half")if(e==="increasing")for(o(0),a=1;a<t.length;a++)l(a);else for(o(t.length-1),a=t.length-2;a>=0;a--)l(a);else if(e==="increasing"){for(a=1;a<t.length;a++)t[a]+=t[a-1];r==="exclude"&&(t.unshift(0),t.pop())}else{for(a=t.length-2;a>=0;a--)t[a]+=t[a+1];r==="exclude"&&(t.push(0),t.shift())}}var HH={calc:IH},OH=PA.hoverPoints,jH=Dt.hoverLabelText,BH=function(e,r,a,i,n){var o=OH(e,r,a,i,n);if(o){e=o[0];var l=e.cd[e.index],s=e.cd[0].trace;if(!s.cumulative.enabled){var f=s.orientation==="h"?"y":"x";e[f+"Label"]=jH(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},GH=function(e,r,a,i,n){if(e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(e.z=r.zLabelVal),r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),!(a.cumulative||{}).enabled){var o=Array.isArray(n)?i[0].pts[n[0]][n[1]]:i[n].pts;e.pointNumbers=o,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var l;if(a._indexToPoints){l=[];for(var s=0;s<o.length;s++)l=l.concat(a._indexToPoints[o[s]])}else l=o;e.pointIndices=l}return e},UH={attributes:RA,layoutAttributes:hm,supplyDefaults:xH,crossTraceDefaults:AH,supplyLayoutDefaults:uA,calc:HH.calc,crossTraceCalc:am.crossTraceCalc,plot:gm.plot,layerName:"barlayer",style:xn.style,styleOnSelect:xn.styleOnSelect,colorbar:_s,hoverPoints:BH,selectPoints:EA,eventData:GH,moduleType:"trace",name:"histogram",basePlotModule:Jt,categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{description:["The sample data from which statistics are computed is set in `x`","for vertically spanning histograms and","in `y` for horizontally spanning histograms.","Binning options are set `xbins` and `ybins` respectively","if no aggregation data is provided."].join(" ")}},VH=UH;const JB=Ci(VH);var XH=oa,YH=Ni.attributes,WH=vr,qH=xr,ZH=mr.hovertemplateAttrs,KH=mr.texttemplateAttrs,Qn=Nt.extendFlat,QH=Hr.pattern,wl=WH({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),xu={labels:{valType:"data_array",editType:"calc",description:["Sets the sector labels.","If `labels` entries are duplicated, we sum associated `values`","or simply count occurrences if `values` is not provided.","For other array attributes (including color) we use the first","non-empty entry among all occurrences of the label."].join(" ")},label0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `labels`.","Builds a numeric set of labels.","Use with `dlabel`","where `label0` is the starting label and `dlabel` the step."].join(" ")},dlabel:{valType:"number",dflt:1,editType:"calc",description:"Sets the label step. See `label0` for more info."},values:{valType:"data_array",editType:"calc",description:["Sets the values of the sectors.","If omitted, we count occurrences of each label."].join(" ")},marker:{colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:{valType:"color",dflt:qH.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},pattern:QH,editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:Qn({},XH.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:ZH({},{keys:["label","color","value","percent","text"]}),texttemplate:KH({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot",description:["Specifies the location of the `textinfo`."].join(" ")},textfont:Qn({},wl,{description:"Sets the font used for `textinfo`."}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot",description:["Controls the orientation of the text inside chart sectors.","When set to *auto*, text may be oriented in any direction in order","to be as big as possible in the middle of a sector.","The *horizontal* option orients text to be parallel with the bottom","of the chart, and may make text smaller in order to achieve that goal.","The *radial* option orients text along the radius of the sector.","The *tangential* option orients text perpendicular to the radius of the sector."].join(" ")},insidetextfont:Qn({},wl,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:Qn({},wl,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Qn({},wl,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:YH({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"angle",dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:Qn({},wl,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}},JH=dt,jl=me,e7=xu,t7=Ni.defaults,r7=bn.handleText,a7=me.coercePattern;function i7(t,e){var r=jl.isArrayOrTypedArray(t),a=jl.isArrayOrTypedArray(e),i=Math.min(r?t.length:1/0,a?e.length:1/0);if(isFinite(i)||(i=0),i&&a){for(var n,o=0;o<i;o++){var l=e[o];if(JH(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function IA(t,e,r,a,i){var n=a("marker.line.width");n&&a("marker.line.color",i?void 0:r.paper_bgcolor);var o=a("marker.colors");a7(a,"marker.pattern",o),t.marker&&!e.marker.pattern.fgcolor&&(e.marker.pattern.fgcolor=t.marker.colors),e.marker.pattern.bgcolor||(e.marker.pattern.bgcolor=r.paper_bgcolor)}function n7(t,e,r,a){function i(b,w){return jl.coerce(t,e,e7,b,w)}var n=i("labels"),o=i("values"),l=i7(n,o),s=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(i("label0"),i("dlabel")),!s){e.visible=!1;return}e._length=s,IA(t,e,a,i,!0),i("scalegroup");var f=i("text"),c=i("texttemplate"),u;if(c||(u=i("textinfo",jl.isArrayOrTypedArray(f)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||u&&u!=="none"){var v=i("textposition");r7(t,e,a,i,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var h=Array.isArray(v)||v==="auto",d=h||v==="outside";d&&i("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&i("insidetextorientation")}t7(e,a,i);var p=i("hole"),m=i("title.text");if(m){var y=i("title.position",p?"middle center":"top center");!p&&y==="middle center"&&(e.title.position="top center"),jl.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var FA={handleMarkerDefaults:IA,supplyDefaults:n7},$A={hiddenlabels:{valType:"data_array",editType:"calc",description:["hiddenlabels is the funnelarea & pie chart analog of","visible:'legendonly'","but it can contain many labels, and can simultaneously","hide slices from several pies/funnelarea charts"].join(" ")},piecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default pie slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendpiecolors`."].join(" ")},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the pie slice colors (whether given by `piecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},o7=me,l7=$A,s7=function(e,r){function a(i,n){return o7.coerce(e,r,l7,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},f7=dt,Mh=wa,c7=ot,u7={};function v7(t,e){var r=[],a=t._fullLayout,i=a.hiddenlabels||[],n=e.labels,o=e.marker.colors||[],l=e.values,s=e._length,f=e._hasValues&&s,c,u;if(e.dlabel)for(n=new Array(s),c=0;c<s;c++)n[c]=String(e.label0+c*e.dlabel);var v={},h=NA(a["_"+e.type+"colormap"]),d=0,p=!1;for(c=0;c<s;c++){var m,y,b;if(f){if(m=l[c],!f7(m))continue;m=+m}else m=1;y=n[c],(y===void 0||y==="")&&(y=c),y=String(y);var w=v[y];w===void 0?(v[y]=r.length,b=i.indexOf(y)!==-1,b||(d+=m),r.push({v:m,label:y,color:h(o[c],y),i:c,pts:[c],hidden:b})):(p=!0,u=r[w],u.v+=m,u.pts.push(c),u.hidden||(d+=m),u.color===!1&&o[c]&&(u.color=h(o[c],y)))}r=r.filter(function(x){return x.v>=0});var g=e.type==="funnelarea"?p:e.sort;return g&&r.sort(function(x,_){return _.v-x.v}),r[0]&&(r[0].vTotal=d),r}function NA(t){return function(r,a){return!r||(r=Mh(r),!r.isValid())?!1:(r=c7.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function d7(t,e){var r=(e||{}).type;r||(r="pie");var a=t._fullLayout,i=t.calcdata,n=a[r+"colorway"],o=a["_"+r+"colormap"];a["extend"+r+"colors"]&&(n=HA(n,u7));for(var l=0,s=0;s<i.length;s++){var f=i[s],c=f[0].trace.type;if(c===r)for(var u=0;u<f.length;u++){var v=f[u];v.color===!1&&(o[v.label]?v.color=o[v.label]:(o[v.label]=v.color=n[l%n.length],l++))}}}function HA(t,e){var r,a=JSON.stringify(t),i=e[a];if(!i){for(i=t.slice(),r=0;r<t.length;r++)i.push(Mh(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(Mh(t[r]).darken(20).toHexString());e[a]=i}return i}var Sc={calc:v7,crossTraceCalc:d7,makePullColorFn:NA,generateExtendedColors:HA},h7=la.appendArrayMultiPointValues,p7=function(e,r){var a={curveNumber:r.index,pointNumbers:e.pts,data:r._input,fullData:r,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return e.pts.length===1&&(a.pointNumber=a.i=e.pts[0]),h7(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},Ir=ft,m7=Qt,wf=_a,OA=ot,qa=xt,ur=me,y7=ur.strScale,Qx=ur.strTranslate,Sh=nr,jA=ri,g7=jA.recordMinTextSize,b7=jA.clearMinTextSize,BA=Ts.TEXTPAD,At=Ln,Tf=p7,Jx=me.isValidTextValue;function x7(t,e){var r=t._context.staticPlot,a=t._fullLayout,i=a._size;b7("pie",a),A7(e,t),E7(e,i);var n=ur.makeTraceGroups(a._pielayer,e,"trace").each(function(o){var l=Ir.select(this),s=o[0],f=s.trace;z7(o),l.attr("stroke-linejoin","round"),l.each(function(){var c=Ir.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var u=[[[],[]],[[],[]]],v=!1;c.each(function(g,x){if(g.hidden){Ir.select(this).selectAll("path,g").remove();return}g.pointNumber=g.i,g.curveNumber=f.index,u[g.pxmid[1]<0?0:1][g.pxmid[0]<0?0:1].push(g);var _=s.cx,k=s.cy,T=Ir.select(this),S=T.selectAll("path.surface").data([g]);if(S.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),T.call(w7,t,o),f.pull){var D=+At.castOption(f.pull,g.pts)||0;D>0&&(_+=D*g.pxmid[0],k+=D*g.pxmid[1])}g.cxFinal=_,g.cyFinal=k;function L(A,M,C,E){var F=E*(M[0]-A[0]),j=E*(M[1]-A[1]);return"a"+E*s.r+","+E*s.r+" 0 "+g.largeArc+(C?" 1 ":" 0 ")+F+","+j}var R=f.hole;if(g.v===s.vTotal){var z="M"+(_+g.px0[0])+","+(k+g.px0[1])+L(g.px0,g.pxmid,!0,1)+L(g.pxmid,g.px0,!0,1)+"Z";R?S.attr("d","M"+(_+R*g.px0[0])+","+(k+R*g.px0[1])+L(g.px0,g.pxmid,!1,R)+L(g.pxmid,g.px0,!1,R)+"Z"+z):S.attr("d",z)}else{var N=L(g.px0,g.px1,!0,1);if(R){var H=1-R;S.attr("d","M"+(_+R*g.px1[0])+","+(k+R*g.px1[1])+L(g.px1,g.px0,!1,R)+"l"+H*g.px0[0]+","+H*g.px0[1]+N+"Z")}else S.attr("d","M"+_+","+k+"l"+g.px0[0]+","+g.px0[1]+N+"Z")}I7(t,g,s);var $=At.castOption(f.textposition,g.pts),P=T.selectAll("g.slicetext").data(g.text&&$!=="none"?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var A=ur.ensureSingle(Ir.select(this),"text","",function(O){O.attr("data-notex",1)}),M=ur.ensureUniformFontSize(t,$==="outside"?T7(f,g,a.font):k7(f,g,a.font));A.text(g.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(qa.font,M).call(Sh.convertToTspans,t);var C=qa.bBox(A.node()),E;if($==="outside")E=r1(C,g);else if(E=GA(C,g,s),$==="auto"&&E.scale<1){var F=ur.ensureUniformFontSize(t,f.outsidetextfont);A.call(qa.font,F),C=qa.bBox(A.node()),E=r1(C,g)}var j=E.textPosAngle,B=j===void 0?g.pxmid:Yf(s.r,j);if(E.targetX=_+B[0]*E.rCenter+(E.x||0),E.targetY=k+B[1]*E.rCenter+(E.y||0),WA(E,C),E.outside){var G=E.targetY;g.yLabelMin=G-C.height/2,g.yLabelMid=G,g.yLabelMax=G+C.height/2,g.labelExtraX=0,g.labelExtraY=0,v=!0}E.fontSize=M.size,g7(f.type,E,a),o[x].transform=E,ur.setTransormAndDisplay(A,E)})});var h=Ir.select(this).selectAll("g.titletext").data(f.title.text?[0]:[]);if(h.enter().append("g").classed("titletext",!0),h.exit().remove(),h.each(function(){var g=ur.ensureSingle(Ir.select(this),"text","",function(k){k.attr("data-notex",1)}),x=f.title.text;f._meta&&(x=ur.templateString(x,f._meta)),g.text(x).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(qa.font,f.title.font).call(Sh.convertToTspans,t);var _;f.title.position==="middle center"?_=L7(s):_=C7(s,i),g.attr("transform",Qx(_.x,_.y)+y7(Math.min(1,_.scale))+Qx(_.tx,_.ty))}),v&&P7(u,f),_7(c,f),v&&f.automargin){var d=qa.bBox(l.node()),p=f.domain,m=i.w*(p.x[1]-p.x[0]),y=i.h*(p.y[1]-p.y[0]),b=(.5*m-s.r)/i.w,w=(.5*y-s.r)/i.h;m7.autoMargin(t,"pie."+f.uid+".automargin",{xl:p.x[0]-b,xr:p.x[1]+b,yb:p.y[0]-w,yt:p.y[1]+w,l:Math.max(s.cx-s.r-d.left,0),r:Math.max(d.right-(s.cx+s.r),0),b:Math.max(d.bottom-(s.cy+s.r),0),t:Math.max(s.cy-s.r-d.top,0),pad:5})}})});setTimeout(function(){n.selectAll("tspan").each(function(){var o=Ir.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function _7(t,e){t.each(function(r){var a=Ir.select(this);if(!r.labelExtraX&&!r.labelExtraY){a.select("path.textline").remove();return}var i=a.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,ur.setTransormAndDisplay(i,r.transform);var n=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],l="M"+n+","+o,s=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var f=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(f)>Math.abs(c)?l+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(n+r.labelExtraX+s):l+="l"+r.labelExtraX+","+f+"v"+(c-f)+"h"+s}else l+="V"+(r.yLabelMid+r.labelExtraY)+"h"+s;ur.ensureSingle(a,"path","textline").call(OA.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function w7(t,e,r){var a=r[0],i=a.cx,n=a.cy,o=a.trace,l=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),t.on("mouseover",function(s){var f=e._fullLayout,c=e._fullData[o.index];if(!(e._dragging||f.hovermode===!1)){var u=c.hoverinfo;if(Array.isArray(u)&&(u=wf.castHoverinfo({hoverinfo:[At.castOption(u,s.pts)],_module:o._module},f,0)),u==="all"&&(u="label+text+value+percent+name"),c.hovertemplate||u!=="none"&&u!=="skip"&&u){var v=s.rInscribed||0,h=i+s.pxmid[0]*(1-v),d=n+s.pxmid[1]*(1-v),p=f.separators,m=[];if(u&&u.indexOf("label")!==-1&&m.push(s.label),s.text=At.castOption(c.hovertext||c.text,s.pts),u&&u.indexOf("text")!==-1){var y=s.text;ur.isValidTextValue(y)&&m.push(y)}s.value=s.v,s.valueLabel=At.formatPieValue(s.v,p),u&&u.indexOf("value")!==-1&&m.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=At.formatPiePercent(s.percent,p),u&&u.indexOf("percent")!==-1&&m.push(s.percentLabel);var b=c.hoverlabel,w=b.font,g=[];wf.loneHover({trace:o,x0:h-v*a.r,x1:h+v*a.r,y:d,_x0:l?i+s.TL[0]:h-v*a.r,_x1:l?i+s.TR[0]:h+v*a.r,_y0:l?n+s.TL[1]:d-v*a.r,_y1:l?n+s.BL[1]:d+v*a.r,text:m.join("<br>"),name:c.hovertemplate||u.indexOf("name")!==-1?c.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:At.castOption(b.bgcolor,s.pts)||s.color,borderColor:At.castOption(b.bordercolor,s.pts),fontFamily:At.castOption(w.family,s.pts),fontSize:At.castOption(w.size,s.pts),fontColor:At.castOption(w.color,s.pts),nameLength:At.castOption(b.namelength,s.pts),textAlign:At.castOption(b.align,s.pts),hovertemplate:At.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[Tf(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:g}),s.bbox=g[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[Tf(s,c)],event:Ir.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],u=Ir.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Ir.event,e.emit("plotly_unhover",{points:[Tf(u,c)],event:Ir.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(wf.loneUnhover(f._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(s){var f=e._fullLayout,c=e._fullData[o.index];e._dragging||f.hovermode===!1||(e._hoverdata=[Tf(s,c)],wf.click(e,Ir.event))})}function T7(t,e,r){var a=At.castOption(t.outsidetextfont.color,e.pts)||At.castOption(t.textfont.color,e.pts)||r.color,i=At.castOption(t.outsidetextfont.family,e.pts)||At.castOption(t.textfont.family,e.pts)||r.family,n=At.castOption(t.outsidetextfont.size,e.pts)||At.castOption(t.textfont.size,e.pts)||r.size;return{color:a,family:i,size:n}}function k7(t,e,r){var a=At.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=At.castOption(t._input.textfont.color,e.pts));var i=At.castOption(t.insidetextfont.family,e.pts)||At.castOption(t.textfont.family,e.pts)||r.family,n=At.castOption(t.insidetextfont.size,e.pts)||At.castOption(t.textfont.size,e.pts)||r.size;return{color:a||OA.contrast(e.color),family:i,size:n}}function A7(t,e){for(var r,a,i=0;i<t.length;i++)if(r=t[i][0],a=r.trace,a.title.text){var n=a.title.text;a._meta&&(n=ur.templateString(n,a._meta));var o=qa.tester.append("text").attr("data-notex",1).text(n).call(qa.font,a.title.font).call(Sh.convertToTspans,e),l=qa.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function GA(t,e,r){var a=r.r||e.rpx1,i=e.rInscribed,n=e.startangle===e.stopangle;if(n)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=e.ring,l=o===1&&Math.abs(e.startangle-e.stopangle)===Math.PI*2,s=e.halfangle,f=e.midangle,c=r.trace.insidetextorientation,u=c==="horizontal",v=c==="tangential",h=c==="radial",d=c==="auto",p=[],m;if(!d){var y=function(T,S){if(M7(e,T)){var D=Math.abs(T-e.startangle),L=Math.abs(T-e.stopangle),R=D<L?D:L;S==="tan"?m=t1(t,a,o,R,0):m=e1(t,a,o,R,Math.PI/2),m.textPosAngle=T,p.push(m)}},b;if(u||v){for(b=4;b>=-4;b-=2)y(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)y(Math.PI*(b+1),"tan")}if(u||h){for(b=4;b>=-4;b-=2)y(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)y(Math.PI*(b+.5),"rad")}}if(l||d||u){var w=Math.sqrt(t.width*t.width+t.height*t.height);if(m={scale:i*a*2/w,rCenter:1-i,rotate:0},m.textPosAngle=(e.startangle+e.stopangle)/2,m.scale>=1)return m;p.push(m)}(d||h)&&(m=e1(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,p.push(m)),(d||v)&&(m=t1(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,p.push(m));for(var g=0,x=0,_=0;_<p.length;_++){var k=p[_].scale;if(x<k&&(x=k,g=_),!d&&x>=1)break}return p[g]}function M7(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function e1(t,e,r,a,i){e=Math.max(0,e-2*BA);var n=t.width/t.height,o=XA(n,a,e,r);return{scale:o*2/t.height,rCenter:UA(n,o/e),rotate:VA(i)}}function t1(t,e,r,a,i){e=Math.max(0,e-2*BA);var n=t.height/t.width,o=XA(n,a,e,r);return{scale:o*2/t.width,rCenter:UA(n,o/e),rotate:VA(i+Math.PI/2)}}function UA(t,e){return Math.cos(e)-t*e}function VA(t){return(180/Math.PI*t+720)%180-90}function XA(t,e,r,a){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),a/(Math.sqrt(t*t+a/2)+t))}function S7(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function r1(t,e){var r=e.pxmid[0],a=e.pxmid[1],i=t.width/2,n=t.height/2;return r<0&&(i*=-1),a<0&&(n*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(n)*(i>0?1:-1)/2,y:n/(1+r*r/(a*a)),outside:!0}}function L7(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}function C7(t,e){var r=1,a=1,i,n=t.trace,o={x:t.cx,y:t.cy},l={tx:0,ty:0};l.ty+=n.title.font.size,i=YA(n),n.title.position.indexOf("top")!==-1?(o.y-=(1+i)*t.r,l.ty-=t.titleBox.height):n.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*t.r);var s=D7(t.r,t.trace.aspectratio),f=e.w*(n.domain.x[1]-n.domain.x[0])/2;return n.title.position.indexOf("left")!==-1?(f=f+s,o.x-=(1+i)*s,l.tx+=t.titleBox.width/2):n.title.position.indexOf("center")!==-1?f*=2:n.title.position.indexOf("right")!==-1&&(f=f+s,o.x+=(1+i)*s,l.tx-=t.titleBox.width/2),r=f/t.titleBox.width,a=Lh(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function D7(t,e){return t/(e===void 0?1:e)}function Lh(t,e){var r=t.trace,a=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,a/2)}function YA(t){var e=t.pull;if(!e)return 0;var r;if(ur.isArrayOrTypedArray(e))for(e=0,r=0;r<t.pull.length;r++)t.pull[r]>e&&(e=t.pull[r]);return e}function P7(t,e){var r,a,i,n,o,l,s,f,c,u,v,h,d;function p(w,g){return w.pxmid[1]-g.pxmid[1]}function m(w,g){return g.pxmid[1]-w.pxmid[1]}function y(w,g){g||(g={});var x=g.labelExtraY+(a?g.yLabelMax:g.yLabelMin),_=a?w.yLabelMin:w.yLabelMax,k=a?w.yLabelMax:w.yLabelMin,T=w.cyFinal+o(w.px0[1],w.px1[1]),S=x-_,D,L,R,z,N,H;if(S*s>0&&(w.labelExtraY=S),!!ur.isArrayOrTypedArray(e.pull))for(L=0;L<u.length;L++)R=u[L],!(R===w||(At.castOption(e.pull,w.pts)||0)>=(At.castOption(e.pull,R.pts)||0))&&((w.pxmid[1]-R.pxmid[1])*s>0?(z=R.cyFinal+o(R.px0[1],R.px1[1]),S=z-_-w.labelExtraY,S*s>0&&(w.labelExtraY+=S)):(k+w.labelExtraY-T)*s>0&&(D=3*l*Math.abs(L-u.indexOf(w)),N=R.cxFinal+n(R.px0[0],R.px1[0]),H=N+D-(w.cxFinal+w.pxmid[0])-w.labelExtraX,H*l>0&&(w.labelExtraX+=H)))}for(a=0;a<2;a++)for(i=a?p:m,o=a?Math.max:Math.min,s=a?1:-1,r=0;r<2;r++){for(n=r?Math.max:Math.min,l=r?1:-1,f=t[a][r],f.sort(i),c=t[1-a][r],u=c.concat(f),h=[],v=0;v<f.length;v++)f[v].yLabelMid!==void 0&&h.push(f[v]);for(d=!1,v=0;a&&v<c.length;v++)if(c[v].yLabelMid!==void 0){d=c[v];break}for(v=0;v<h.length;v++){var b=v&&h[v-1];d&&!v&&(b=d),y(h[v],b)}}}function E7(t,e){for(var r=[],a=0;a<t.length;a++){var i=t[a][0],n=i.trace,o=n.domain,l=e.w*(o.x[1]-o.x[0]),s=e.h*(o.y[1]-o.y[0]);n.title.text&&n.title.position!=="middle center"&&(s-=Lh(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+YA(n)),i.cx=e.l+e.w*(n.domain.x[1]+n.domain.x[0])/2,i.cy=e.t+e.h*(1-n.domain.y[0])-s/2,n.title.text&&n.title.position.indexOf("bottom")!==-1&&(i.cy-=Lh(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}R7(t,r)}function R7(t,e){for(var r,a,i,n=0;n<e.length;n++){var o=1/0,l=e[n];for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var s;if(i.type==="pie")s=r.r*r.r;else if(i.type==="funnelarea"){var f,c;i.aspectratio>1?(f=r.r,c=f/i.aspectratio):(c=r.r,f=c*i.aspectratio),f*=(1+i.baseratio)/2,s=f*c}o=Math.min(o,s/r.vTotal)}for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var u=o*r.vTotal;i.type==="funnelarea"&&(u/=(1+i.baseratio)/2,u/=i.aspectratio),r.r=Math.sqrt(u)}}}function z7(t){var e=t[0],r=e.r,a=e.trace,i=At.getRotationAngle(a.rotation),n=2*Math.PI/e.vTotal,o="px0",l="px1",s,f,c;if(a.direction==="counterclockwise"){for(s=0;s<t.length&&t[s].hidden;s++);if(s===t.length)return;i+=n*t[s].v,n*=-1,o="px1",l="px0"}for(c=Yf(r,i),s=0;s<t.length;s++)f=t[s],!f.hidden&&(f[o]=c,f.startangle=i,i+=n*f.v/2,f.pxmid=Yf(r,i),f.midangle=i,i+=n*f.v/2,c=Yf(r,i),f.stopangle=i,f[l]=c,f.largeArc=f.v>e.vTotal/2?1:0,f.halfangle=Math.PI*Math.min(f.v/e.vTotal,.5),f.ring=1-a.hole,f.rInscribed=S7(f,e))}function Yf(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function I7(t,e,r){var a=t._fullLayout,i=r.trace,n=i.texttemplate,o=i.textinfo;if(!n&&o&&o!=="none"){var l=o.split("+"),s=function(g){return l.indexOf(g)!==-1},f=s("label"),c=s("text"),u=s("value"),v=s("percent"),h=a.separators,d;if(d=f?[e.label]:[],c){var p=At.getFirstFilled(i.text,e.pts);Jx(p)&&d.push(p)}u&&d.push(At.formatPieValue(e.v,h)),v&&d.push(At.formatPiePercent(e.v/r.vTotal,h)),e.text=d.join("<br>")}function m(g){return{label:g.label,value:g.v,valueLabel:At.formatPieValue(g.v,a.separators),percent:g.v/r.vTotal,percentLabel:At.formatPiePercent(g.v/r.vTotal,a.separators),color:g.color,text:g.text,customdata:ur.castOption(i,g.i,"customdata")}}if(n){var y=ur.castOption(i,e.i,"texttemplate");if(!y)e.text="";else{var b=m(e),w=At.getFirstFilled(i.text,e.pts);(Jx(w)||w==="")&&(b.text=w),e.text=ur.texttemplateString(y,b,t._fullLayout._d3locale,b,i._meta||{})}}}function WA(t,e){var r=t.rotate*Math.PI/180,a=Math.cos(r),i=Math.sin(r),n=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=n*a-o*i,t.textY=n*i+o*a,t.noCenter=!0}var qA={plot:x7,transformInsideText:GA,computeTransform:WA},a1=ft,F7=xp,$7=ri.resizeText,N7=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");$7(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=a1.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){a1.select(this).call(F7,l,n,e)})})},ZA={};(function(t){var e=Qt;t.name="pie",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})(ZA);var H7={attributes:xu,supplyDefaults:FA.supplyDefaults,supplyLayoutDefaults:s7,layoutAttributes:$A,calc:Sc.calc,crossTraceCalc:Sc.crossTraceCalc,plot:qA.plot,style:N7,styleOne:xp,moduleType:"trace",name:"pie",basePlotModule:ZA,categories:["pie-like","pie","showLegend"],meta:{description:["A data visualized by the sectors of the pie is set in `values`.","The sector labels are set in `labels`.","The sector colors are set in `marker.colors`"].join(" ")}},O7=H7;const e9=Ci(O7);var KA={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}},Wf=me.extendFlat,qf=$i,i1=Xo.axisHoverFormat,Ch=Hr.dash,j7=Rc,QA=KA,B7=QA.INCREASING.COLOR,G7=QA.DECREASING.COLOR,Lc=qf.line;function n1(t){return{line:{color:Wf({},Lc.color,{dflt:t}),width:Lc.width,dash:Ch,editType:"style"},editType:"style"}}var JA={xperiod:qf.xperiod,xperiod0:qf.xperiod0,xperiodalignment:qf.xperiodalignment,xhoverformat:i1("x"),yhoverformat:i1("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates.","If absent, linear coordinate will be generated."].join(" ")},open:{valType:"data_array",editType:"calc",description:"Sets the open values."},high:{valType:"data_array",editType:"calc",description:"Sets the high values."},low:{valType:"data_array",editType:"calc",description:"Sets the low values."},close:{valType:"data_array",editType:"calc",description:"Sets the close values."},line:{width:Wf({},Lc.width,{description:[Lc.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:Wf({},Ch,{description:[Ch.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:n1(B7),decreasing:n1(G7),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets hover text elements associated with each sample point.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to","this trace's sample points."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc",description:["Sets the width of the open/close tick marks","relative to the *x* minimal interval."].join(" ")},hoverlabel:Wf({},j7.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},U7=Je,V7=me,X7=function(e,r,a,i){var n=a("x"),o=a("open"),l=a("high"),s=a("low"),f=a("close");a("hoverlabel.split");var c=U7.getComponentMethod("calendars","handleTraceDefaults");if(c(e,r,["x"],i),!!(o&&l&&s&&f)){var u=Math.min(o.length,l.length,s.length,f.length);return n&&(u=Math.min(u,V7.minRowLength(n))),r._length=u,u}},Y7=me,W7=X7,q7=du,Z7=JA,K7=function(e,r,a,i){function n(l,s){return Y7.coerce(e,r,Z7,l,s)}var o=W7(e,r,n,i);if(!o){r.visible=!1;return}q7(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),o1(e,r,n,"increasing"),o1(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function o1(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var ko=me,kf=ko._,Zf=Dt,Q7=hu,Tl=Yt.BADNUM;function J7(t,e){var r=Zf.getFromId(t,e.xaxis),a=Zf.getFromId(t,e.yaxis),i=rO(t,r,e),n=e._minDiff;e._minDiff=null;var o=e._origX;e._origX=null;var l=e._xcalc;e._xcalc=null;var s=tO(t,e,o,l,a,eO);return e._extremes[r._id]=Zf.findExtremes(r,l,{vpad:n/2}),s.length?(ko.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function eO(t,e,r,a){return{o:t,h:e,l:r,c:a}}function tO(t,e,r,a,i,n){for(var o=i.makeCalcdata(e,"open"),l=i.makeCalcdata(e,"high"),s=i.makeCalcdata(e,"low"),f=i.makeCalcdata(e,"close"),c=ko.isArrayOrTypedArray(e.text),u=ko.isArrayOrTypedArray(e.hovertext),v=!0,h=null,d=!!e.xperiodalignment,p=[],m=0;m<a.length;m++){var y=a[m],b=o[m],w=l[m],g=s[m],x=f[m];if(y!==Tl&&b!==Tl&&w!==Tl&&g!==Tl&&x!==Tl){x===b?h!==null&&x!==h&&(v=x>h):v=x>b,h=x;var _=n(b,w,g,x);_.pos=y,_.yc=(b+x)/2,_.i=m,_.dir=v?"increasing":"decreasing",_.x=_.pos,_.y=[g,w],d&&(_.orig_p=r[m]),c&&(_.tx=e.text[m]),u&&(_.htx=e.hovertext[m]),p.push(_)}else p.push({pos:y,empty:!0})}return e._extremes[i._id]=Zf.findExtremes(i,ko.concat(s,l),{padded:!0}),p.length&&(p[0].t={labels:{open:kf(t,"open:")+" ",high:kf(t,"high:")+" ",low:kf(t,"low:")+" ",close:kf(t,"close:")+" "}}),p}function rO(t,e,r){var a=r._minDiff;if(!a){var i=t._fullData,n=[];a=1/0;var o;for(o=0;o<i.length;o++){var l=i[o];if(l.type==="ohlc"&&l.visible===!0&&l.xaxis===e._id){n.push(l);var s=e.makeCalcdata(l,"x");l._origX=s;var f=Q7(r,e,"x",s).vals;l._xcalc=f;var c=ko.distinctVals(f).minDiff;c&&isFinite(c)&&(a=Math.min(a,c))}}for(a===1/0&&(a=1),o=0;o<n.length;o++)n[o]._minDiff=a}return a*r.tickwidth}var aO={calc:J7},iO=ft,l1=me,nO=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;l1.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=iO.select(this),c=s[0],u=c.t,v=c.trace;if(v.visible!==!0||u.empty){f.remove();return}var h=u.tickLen,d=f.selectAll("path").data(l1.identity);d.enter().append("path"),d.exit().remove(),d.attr("d",function(p){if(p.empty)return"M0,0Z";var m=o.c2p(p.pos-h,!0),y=o.c2p(p.pos+h,!0),b=l?(m+y)/2:o.c2p(p.pos,!0),w=n.c2p(p.o,!0),g=n.c2p(p.h,!0),x=n.c2p(p.l,!0),_=n.c2p(p.c,!0);return"M"+m+","+w+"H"+b+"M"+b+","+g+"V"+x+"M"+y+","+_+"H"+b})})},md=ft,oO=xt,lO=ot,sO=function(e,r,a){var i=a||md.select(e).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var o=n[0].trace;md.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;md.select(this).style("fill","none").call(lO.stroke,s.color).call(oO.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},Dh=Dt,fO=me,Af=_a,cO=ot,uO=me.fillText,s1=KA,vO={increasing:s1.INCREASING.SYMBOL,decreasing:s1.DECREASING.SYMBOL};function dO(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?hO(t,e,r,a):pO(t,e,r,a)}function eM(t,e,r,a){var i=t.cd,n=t.xa,o=i[0].trace,l=i[0].t,s=o.type,f=s==="ohlc"?"l":"min",c=s==="ohlc"?"h":"max",u,v,h=l.bPos||0,d=function(D){return D.pos+h-e},p=l.bdPos||l.tickLen,m=l.wHover,y=Math.min(1,p/Math.abs(n.r2c(n.range[1])-n.r2c(n.range[0])));u=t.maxHoverDistance-y,v=t.maxSpikeDistance-y;function b(D){var L=d(D);return Af.inbox(L-m,L+m,u)}function w(D){var L=D[f],R=D[c];return L===R||Af.inbox(L-r,R-r,u)}function g(D){return(b(D)+w(D))/2}var x=Af.getDistanceFunction(a,b,w,g);if(Af.getClosest(i,x,t),t.index===!1)return null;var _=i[t.index];if(_.empty)return null;var k=_.dir,T=o[k],S=T.line.color;return cO.opacity(S)&&T.line.width?t.color=S:t.color=T.fillcolor,t.x0=n.c2p(_.pos+h-p,!0),t.x1=n.c2p(_.pos+h+p,!0),t.xLabelVal=_.orig_p!==void 0?_.orig_p:_.pos,t.spikeDistance=g(_)*v/u,t.xSpike=n.c2p(_.pos,!0),t}function hO(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=eM(t,e,r,a);if(!f)return[];var c=f.index,u=i[c],v=u.hi||o.hoverinfo,h=v.split("+"),d=v==="all",p=d||h.indexOf("y")!==-1;if(!p)return[];for(var m=["high","open","close","low"],y={},b=0;b<m.length;b++){var w=m[b],g=o[w][f.index],x=n.c2p(g,!0),_;g in y?(_=y[g],_.yLabel+="<br>"+l.labels[w]+Dh.hoverLabelText(n,g,o.yhoverformat)):(_=fO.extendFlat({},f),_.y0=_.y1=x,_.yLabelVal=g,_.yLabel=l.labels[w]+Dh.hoverLabelText(n,g,o.yhoverformat),_.name="",s.push(_),y[g]=_)}return s}function pO(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=eM(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],u=s.index=c.i,v=c.dir;function h(g){return l.labels[g]+Dh.hoverLabelText(n,o[g][u],o.yhoverformat)}var d=c.hi||o.hoverinfo,p=d.split("+"),m=d==="all",y=m||p.indexOf("y")!==-1,b=m||p.indexOf("text")!==-1,w=y?[h("open"),h("high"),h("low"),h("close")+" "+vO[v]]:[];return b&&uO(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var mO={hoverPoints:dO},yO=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l,s=a[0].t.bPos||0;if(r===!1)for(l=0;l<a.length;l++)a[l].selected=0;else for(l=0;l<a.length;l++){var f=a[l];r.contains([i.c2p(f.pos+s),n.c2p(f.yc)],null,f.i,e)?(o.push({pointNumber:f.i,x:i.c2d(f.pos),y:n.c2d(f.yc)}),f.selected=1):f.selected=0}return o},gO={moduleType:"trace",name:"ohlc",basePlotModule:Jt,categories:["cartesian","svg","showLegend"],meta:{description:["The ohlc (short for Open-High-Low-Close) is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The tip of the lines represent the `low` and `high` values and","the horizontal segments represent the `open` and `close` values.","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing items are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:JA,supplyDefaults:K7,calc:aO.calc,plot:nO,style:sO,hoverPoints:mO.hoverPoints,selectPoints:yO},bO=gO;const t9=Ci(bO);var xO=Je,Yr=me,_O=dk;function wO(t,e,r,a){var i=t.cd,n=i[0].t,o=i[0].trace,l=t.xa,s=t.ya,f=n.x,c=n.y,u=l.c2p(e),v=s.c2p(r),h=t.distance,d;if(n.tree){var p=l.p2c(u-h),m=l.p2c(u+h),y=s.p2c(v-h),b=s.p2c(v+h);a==="x"?d=n.tree.range(Math.min(p,m),Math.min(s._rl[0],s._rl[1]),Math.max(p,m),Math.max(s._rl[0],s._rl[1])):d=n.tree.range(Math.min(p,m),Math.min(y,b),Math.max(p,m),Math.max(y,b))}else d=n.ids;var w,g,x,_,k,T,S,D,L,R=h;if(a==="x"){var z=!!o.xperiodalignment,N=!!o.yperiodalignment;for(k=0;k<d.length;k++){if(w=d[k],x=f[w],T=Math.abs(l.c2p(x)-u),z){var H=l.c2p(o._xStarts[w]),$=l.c2p(o._xEnds[w]);T=u>=Math.min(H,$)&&u<=Math.max(H,$)?0:1/0}if(T<R){if(R=T,_=c[w],S=s.c2p(_)-v,N){var P=s.c2p(o._yStarts[w]),A=s.c2p(o._yEnds[w]);S=v>=Math.min(P,A)&&v<=Math.max(P,A)?0:1/0}L=Math.sqrt(T*T+S*S),g=d[k]}}}else for(k=d.length-1;k>-1;k--)w=d[k],x=f[w],_=c[w],T=l.c2p(x)-u,S=s.c2p(_)-v,D=Math.sqrt(T*T+S*S),D<R&&(R=L=D,g=w);return t.index=g,t.distance=R,t.dxy=L,g===void 0?[t]:[TO(t,f,c,o)]}function TO(t,e,r,a){var i=t.xa,n=t.ya,o=t.distance,l=t.dxy,s=t.index,f={pointNumber:s,x:e[s],y:r[s]};f.tx=Yr.isArrayOrTypedArray(a.text)?a.text[s]:a.text,f.htx=Array.isArray(a.hovertext)?a.hovertext[s]:a.hovertext,f.data=Array.isArray(a.customdata)?a.customdata[s]:a.customdata,f.tp=Array.isArray(a.textposition)?a.textposition[s]:a.textposition;var c=a.textfont;c&&(f.ts=Yr.isArrayOrTypedArray(c.size)?c.size[s]:c.size,f.tc=Array.isArray(c.color)?c.color[s]:c.color,f.tf=Array.isArray(c.family)?c.family[s]:c.family);var u=a.marker;u&&(f.ms=Yr.isArrayOrTypedArray(u.size)?u.size[s]:u.size,f.mo=Yr.isArrayOrTypedArray(u.opacity)?u.opacity[s]:u.opacity,f.mx=Yr.isArrayOrTypedArray(u.symbol)?u.symbol[s]:u.symbol,f.ma=Yr.isArrayOrTypedArray(u.angle)?u.angle[s]:u.angle,f.mc=Yr.isArrayOrTypedArray(u.color)?u.color[s]:u.color);var v=u&&u.line;v&&(f.mlc=Array.isArray(v.color)?v.color[s]:v.color,f.mlw=Yr.isArrayOrTypedArray(v.width)?v.width[s]:v.width);var h=u&&u.gradient;h&&h.type!=="none"&&(f.mgt=Array.isArray(h.type)?h.type[s]:h.type,f.mgc=Array.isArray(h.color)?h.color[s]:h.color);var d=i.c2p(f.x,!0),p=n.c2p(f.y,!0),m=f.mrc||1,y=a.hoverlabel;y&&(f.hbg=Array.isArray(y.bgcolor)?y.bgcolor[s]:y.bgcolor,f.hbc=Array.isArray(y.bordercolor)?y.bordercolor[s]:y.bordercolor,f.hts=Yr.isArrayOrTypedArray(y.font.size)?y.font.size[s]:y.font.size,f.htc=Array.isArray(y.font.color)?y.font.color[s]:y.font.color,f.htf=Array.isArray(y.font.family)?y.font.family[s]:y.font.family,f.hnl=Yr.isArrayOrTypedArray(y.namelength)?y.namelength[s]:y.namelength);var b=a.hoverinfo;b&&(f.hi=Array.isArray(b)?b[s]:b);var w=a.hovertemplate;w&&(f.ht=Array.isArray(w)?w[s]:w);var g={};g[t.index]=f;var x=a._origX,_=a._origY,k=Yr.extendFlat({},t,{color:_O(a,f),x0:d-m,x1:d+m,xLabelVal:x?x[s]:f.x,y0:p-m,y1:p+m,yLabelVal:_?_[s]:f.y,cd:g,distance:o,spikeDistance:l,hovertemplate:f.ht});return f.htx?k.text=f.htx:f.tx?k.text=f.tx:a.text&&(k.text=a.text),Yr.fillText(f,a,k),xO.getComponentMethod("errorbars","hoverInfo")(f,a,k),k}var kO={hoverPoints:wO},tM={exports:{}},f1=20,_u={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:f1,SYMBOL_STROKE:f1/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},AO=oa,Ft=$i,c1=Xo.axisHoverFormat,u1=Sn,MO=qh,yd=Nt.extendFlat,SO=Ia.overrideAll,LO=_u.DASHES,v1=Ft.line,Wa=Ft.marker,CO=Wa.line,xo=tM.exports=SO({x:Ft.x,x0:Ft.x0,dx:Ft.dx,y:Ft.y,y0:Ft.y0,dy:Ft.dy,xperiod:Ft.xperiod,yperiod:Ft.yperiod,xperiod0:Ft.xperiod0,yperiod0:Ft.yperiod0,xperiodalignment:Ft.xperiodalignment,yperiodalignment:Ft.yperiodalignment,xhoverformat:c1("x"),yhoverformat:c1("y"),text:Ft.text,hovertext:Ft.hovertext,textposition:Ft.textposition,textfont:Ft.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:v1.color,width:v1.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:MO(LO),dflt:"solid",description:"Sets the style of the lines."}},marker:yd({},u1("marker"),{symbol:Wa.symbol,angle:Wa.angle,size:Wa.size,sizeref:Wa.sizeref,sizemin:Wa.sizemin,sizemode:Wa.sizemode,opacity:Wa.opacity,colorbar:Wa.colorbar,line:yd({},u1("marker.line"),{width:CO.width})}),connectgaps:Ft.connectgaps,fill:yd({},Ft.fill,{dflt:"none"}),fillcolor:Ft.fillcolor,selected:{marker:Ft.selected.marker,textfont:Ft.selected.textfont},unselected:{marker:Ft.unselected.marker,textfont:Ft.unselected.textfont},opacity:AO.opacity},"calc","nested");xo.x.editType=xo.y.editType=xo.x0.editType=xo.y0.editType="calc+clearAxisTypes";xo.hovertemplate=Ft.hovertemplate;xo.texttemplate=Ft.texttemplate;var rM=tM.exports,wu={},aM=_u;wu.isOpenSymbol=function(t){return typeof t=="string"?aM.OPEN_RE.test(t):t%200>100};wu.isDotSymbol=function(t){return typeof t=="string"?aM.DOT_RE.test(t):t>200};var d1=me,DO=Je,PO=wu,EO=rM,RO=uu,Mf=_r,zO=Qp,IO=du,FO=j2,$O=B2,NO=U2,HO=G2,OO=function(e,r,a,i){function n(h,d){return d1.coerce(e,r,EO,h,d)}var o=e.marker?PO.isOpenSymbol(e.marker.symbol):!1,l=Mf.isBubble(e),s=zO(e,r,i,n);if(!s){r.visible=!1;return}IO(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<RO.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Mf.hasMarkers(r)&&(FO(e,r,a,i,n,{noAngleRef:!0,noStandOff:!0}),n("marker.line.width",o||l?1:0)),Mf.hasLines(r)&&(n("connectgaps"),$O(e,r,a,i,n),n("line.shape")),Mf.hasText(r)&&(n("texttemplate"),HO(e,r,i,n));var c=(r.line||{}).color,u=(r.marker||{}).color;n("fill"),r.fill!=="none"&&NO(e,r,a,n);var v=DO.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),d1.coerceSelectionMarkerOpacity(r,n)},jO=ck,BO=function(e,r,a){var i=e.i;return"x"in e||(e.x=r._x[i]),"y"in e||(e.y=r._y[i]),jO(e,r,a)},iM=dt,Cc=l_,h1=So,GO=xr.defaultLine,p1=Xt.isArrayOrTypedArray,Ph=Cc(GO),nM=1;function m1(t,e){var r=t;return r[3]*=e,r}function y1(t){if(iM(t))return Ph;var e=Cc(t);return e.length?e:Ph}function g1(t){return iM(t)?t:nM}function UO(t,e,r){var a=t.color;a&&a._inputArray&&(a=a._inputArray);var i=p1(a),n=p1(e),o=h1.extractOpts(t),l=[],s,f,c,u,v;if(o.colorscale!==void 0?s=h1.makeColorScaleFuncFromTrace(t):s=y1,i?f=function(d,p){return d[p]===void 0?Ph:Cc(s(d[p]))}:f=y1,n?c=function(d,p){return d[p]===void 0?nM:g1(d[p])}:c=g1,i||n)for(var h=0;h<r;h++)u=f(a,h),v=c(e,h),l[h]=m1(u,v);else l=m1(Cc(a),e);return l}var VO={formatColor:UO},Kf=dt,XO=EM,Sf=l_,YO=Je,No=me,Ut=No.isArrayOrTypedArray,co=xt,b1=Wt,x1=VO.formatColor,Ao=_r,WO=$w,Eh=wu,As=_u,qO=us.DESELECTDIM,_1={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},ZO=la.appendArrayPointValue;function KO(t,e){var r,a={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=t._context.plotGlPixelRatio;if(e.visible!==!0)return a;if(Ao.hasText(e)&&(a.text=oM(t,e),a.textSel=w1(t,e,e.selected),a.textUnsel=w1(t,e,e.unselected)),Ao.hasMarkers(e)&&(a.marker=bm(t,e),a.markerSel=Rh(t,e,e.selected),a.markerUnsel=Rh(t,e,e.unselected),!e.unselected&&Ut(e.marker.opacity))){var n=e.marker.opacity;for(a.markerUnsel.opacity=new Array(n.length),r=0;r<n.length;r++)a.markerUnsel.opacity[r]=qO*n[r]}if(Ao.hasLines(e)){a.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(As.DASHES[e.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=e.line.width*i;a.line.dashes=o}return e.error_x&&e.error_x.visible&&(a.errorX=T1(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=T1(e,e.error_y,i)),e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function oM(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=Ut(n)?n:[n],l=i.color,s=i.size,f=i.family,c={},u,v=t._context.plotGlPixelRatio,h=e.texttemplate;if(h){c.text=[];var d=r._d3locale,p=Array.isArray(h),m=p?Math.min(h.length,a):a,y=p?function(T){return h[T]}:function(){return h};for(u=0;u<m;u++){var b={i:u},w=e._module.formatLabels(b,e,r),g={};ZO(g,e,u);var x=e._meta||{};c.text.push(No.texttemplateString(y(u),w,d,g,b,x))}}else Ut(e.text)&&e.text.length<a?c.text=e.text.slice():c.text=e.text;if(Ut(c.text))for(u=c.text.length;u<a;u++)c.text[u]="";for(c.opacity=e.opacity,c.font={},c.align=[],c.baseline=[],u=0;u<o.length;u++){var _=o[u].split(/\s+/);switch(_[1]){case"left":c.align.push("right");break;case"right":c.align.push("left");break;default:c.align.push(_[1])}switch(_[0]){case"top":c.baseline.push("bottom");break;case"bottom":c.baseline.push("top");break;default:c.baseline.push(_[0])}}if(Ut(l))for(c.color=new Array(a),u=0;u<a;u++)c.color[u]=l[u];else c.color=l;if(Ut(s)||Ut(f))for(c.font=new Array(a),u=0;u<a;u++){var k=c.font[u]={};k.size=(No.isTypedArray(s)?s[u]:Ut(s)?Kf(s[u])?s[u]:0:s)*v,k.family=Ut(f)?f[u]:f}else c.font={size:s*v,family:f};return c}function bm(t,e){var r=e._length,a=e.marker,i={},n,o=Ut(a.symbol),l=Ut(a.angle),s=Ut(a.color),f=Ut(a.line.color),c=Ut(a.opacity),u=Ut(a.size),v=Ut(a.line.width),h;if(o||(h=Eh.isOpenSymbol(a.symbol)),o||s||f||c||l){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var d=a.symbol,p=a.angle,m=x1(a,a.opacity,r),y=x1(a.line,a.opacity,r);if(!Ut(y[0])){var b=y;for(y=Array(r),n=0;n<r;n++)y[n]=b}if(!Ut(m[0])){var w=m;for(m=Array(r),n=0;n<r;n++)m[n]=w}if(!Ut(d)){var g=d;for(d=Array(r),n=0;n<r;n++)d[n]=g}if(!Ut(p)){var x=p;for(p=Array(r),n=0;n<r;n++)p[n]=x}for(i.symbols=d,i.angles=p,i.colors=m,i.borderColors=y,n=0;n<r;n++)o&&(h=Eh.isOpenSymbol(a.symbol[n])),h&&(y[n]=m[n].slice(),m[n]=m[n].slice(),m[n][3]=0);for(i.opacity=e.opacity,i.markers=new Array(r),n=0;n<r;n++)i.markers[n]=M1({mx:i.symbols[n],ma:i.angles[n]},e)}else h?(i.color=Sf(a.color,"uint8"),i.color[3]=0,i.borderColor=Sf(a.color,"uint8")):(i.color=Sf(a.color,"uint8"),i.borderColor=Sf(a.line.color,"uint8")),i.opacity=e.opacity*a.opacity,i.marker=M1({mx:a.symbol,ma:a.angle},e);var _=1,k=WO(e,_),T;if(u||v){var S=i.sizes=new Array(r),D=i.borderSizes=new Array(r),L=0,R;if(u){for(n=0;n<r;n++)S[n]=k(a.size[n]),L+=S[n];R=L/r}else for(T=k(a.size),n=0;n<r;n++)S[n]=T;if(v)for(n=0;n<r;n++)D[n]=a.line.width[n];else for(T=a.line.width,n=0;n<r;n++)D[n]=T;i.sizeAvg=R}else i.size=k(a&&a.size||10),i.borderSizes=k(a.line.width);return i}function Rh(t,e,r){var a=e.marker,i={};return r&&(r.marker&&r.marker.symbol?i=bm(t,No.extendFlat({},a,r.marker)):r.marker&&(r.marker.size&&(i.size=r.marker.size),r.marker.color&&(i.colors=r.marker.color),r.marker.opacity!==void 0&&(i.opacity=r.marker.opacity))),i}function w1(t,e,r){var a={};if(!r)return a;if(r.textfont){var i={opacity:1,text:e.text,texttemplate:e.texttemplate,textposition:e.textposition,textfont:No.extendFlat({},e.textfont)};r.textfont&&No.extendFlat(i.textfont,r.textfont),a=oM(t,i)}return a}function T1(t,e,r){var a={capSize:e.width*2*r,lineWidth:e.thickness*r,color:e.color};return e.copy_ystyle&&(a=t.error_y),a}var k1=As.SYMBOL_SDF_SIZE,tn=As.SYMBOL_SIZE,A1=As.SYMBOL_STROKE,gd={},QO=co.symbolFuncs[0](tn*.05);function M1(t,e){var r=t.mx;if(r==="circle")return null;var a,i,n=co.symbolNumber(r),o=co.symbolFuncs[n%100],l=!!co.symbolNoDot[n%100],s=!!co.symbolNoFill[n%100],f=Eh.isDotSymbol(r);if(t.ma&&(r+="_"+t.ma),gd[r])return gd[r];var c=co.getMarkerAngle(t,e);return f&&!l?a=o(tn*1.1,c)+QO:a=o(tn,c),i=XO(a,{w:k1,h:k1,viewBox:[-tn,-tn,tn,tn],stroke:s?A1:-A1}),gd[r]=i,i||null}function JO(t,e,r){var a=r.length,i=a/2,n,o;if(Ao.hasLines(e)&&i)if(e.line.shape==="hv"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2+2],r[o*2+1]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else if(e.line.shape==="hvh"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var l=(r[o*2]+r[o*2+2])/2;n.push(r[o*2],r[o*2+1],l,r[o*2+1],l,r[o*2+3])}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vhv"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var s=(r[o*2+1]+r[o*2+3])/2;n.push(r[o*2],r[o*2+1],r[o*2],s,r[o*2+2],s)}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vh"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2],r[o*2+3]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else n=r;var f=!1;for(o=0;o<n.length;o++)if(isNaN(n[o])){f=!0;break}var c=f||n.length>As.TOO_MANY_POINTS||Ao.hasMarkers(e)?"rect":"round";if(f&&e.connectgaps){var u=n[0],v=n[1];for(o=0;o<n.length;o+=2)isNaN(n[o])||isNaN(n[o+1])?(n[o]=u,n[o+1]=v):(u=n[o],v=n[o+1])}return{join:c,positions:n}}function ej(t,e,r,a,i){var n=YO.getComponentMethod("errorbars","makeComputeError"),o=b1.getFromId(t,e.xaxis,"x"),l=b1.getFromId(t,e.yaxis,"y"),s=r.length/2,f={};function c(u,v){var h=v._id.charAt(0),d=e["error_"+h];if(d&&d.visible&&(v.type==="linear"||v.type==="log")){for(var p=n(d),m={x:0,y:1}[h],y={x:[0,1,2,3],y:[2,3,0,1]}[h],b=new Float64Array(4*s),w=1/0,g=-1/0,x=0,_=0;x<s;x++,_+=4){var k=u[x];if(Kf(k)){var T=r[x*2+m],S=p(k,x),D=S[0],L=S[1];if(Kf(D)&&Kf(L)){var R=k-D,z=k+L;b[_+y[0]]=T-v.c2l(R),b[_+y[1]]=v.c2l(z)-T,b[_+y[2]]=0,b[_+y[3]]=0,w=Math.min(w,k-D),g=Math.max(g,k+L)}}}f[h]={positions:r,errors:b,_bnds:[w,g]}}}return c(a,o),c(i,l),f}function tj(t,e,r,a){var i=e._length,n={},o;if(Ao.hasMarkers(e)){var l=r.font,s=r.align,f=r.baseline;for(n.offset=new Array(i),o=0;o<i;o++){var c=a.sizes?a.sizes[o]:a.size,u=Ut(l)?l[o].size:l.size,v=Ut(s)?s.length>1?s[o]:s[0]:s,h=Ut(f)?f.length>1?f[o]:f[0]:f,d=_1[v],p=_1[h],m=c?c/.8+1:0,y=-p*m-p*.5;n.offset[o]=[d*m/u,y/u]}}return n}var rj={style:KO,markerStyle:bm,markerSelection:Rh,linePositions:JO,errorBarPositions:ej,textPosition:tj},Lf=me,aj=function(e,r){var a=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(a=r._scene={},a.init=function(){Lf.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=Lf.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var f=0;f<a.count;f++)a.glText[f].update(l)},a.draw=function(){for(var l=a.count,s=a.fill2d,f=a.error2d,c=a.line2d,u=a.scatter2d,v=a.glText,h=a.select2d,d=a.selectBatch,p=a.unselectBatch,m=0;m<l;m++){if(s&&a.fillOrder[m]&&s.draw(a.fillOrder[m]),c&&a.lineOptions[m]&&c.draw(m),f&&(a.errorXOptions[m]&&f.draw(m),a.errorYOptions[m]&&f.draw(m+l)),u&&a.markerOptions[m])if(p[m].length){var y=Lf.repeat([],a.count);y[m]=p[m],u.draw(y)}else d[m].length||u.draw(m);v[m]&&a.textOptions[m]&&v[m].render()}h&&h.draw(d),a.dirty=!1},a.destroy=function(){a.fill2d&&a.fill2d.destroy&&a.fill2d.destroy(),a.scatter2d&&a.scatter2d.destroy&&a.scatter2d.destroy(),a.error2d&&a.error2d.destroy&&a.error2d.destroy(),a.line2d&&a.line2d.destroy&&a.line2d.destroy(),a.select2d&&a.select2d.destroy&&a.select2d.destroy(),a.glText&&a.glText.forEach(function(l){l.destroy&&l.destroy()}),a.lineOptions=null,a.fillOptions=null,a.markerOptions=null,a.markerSelectedOptions=null,a.markerUnselectedOptions=null,a.errorXOptions=null,a.errorYOptions=null,a.textOptions=null,a.textSelectedOptions=null,a.textUnselectedOptions=null,a.selectBatch=null,a.unselectBatch=null,r._scene=null}),a.dirty||Lf.extendFlat(a,i),a},ij=RM,Jn=me,S1=Wt,nj=ms.findExtremes,L1=hu,xm=tm,oj=xm.calcMarkerSize,lj=xm.calcAxisExpansion,sj=xm.setFirstScatter,fj=Y2,eo=rj,cj=aj,C1=Yt.BADNUM,uj=_u.TOO_MANY_POINTS,vj=function(e,r){var a=e._fullLayout,i=r._xA=S1.getFromId(e,r.xaxis,"x"),n=r._yA=S1.getFromId(e,r.yaxis,"y"),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=uj,f=l*2,c={},u,v=i.makeCalcdata(r,"x"),h=n.makeCalcdata(r,"y"),d=L1(r,i,"x",v),p=L1(r,n,"y",h),m=d.vals,y=p.vals;r._x=m,r._y=y,r.xperiodalignment&&(r._origX=v,r._xStarts=d.starts,r._xEnds=d.ends),r.yperiodalignment&&(r._origY=h,r._yStarts=p.starts,r._yEnds=p.ends);var b=new Array(f),w=new Array(l);for(u=0;u<l;u++)b[u*2]=m[u]===C1?NaN:m[u],b[u*2+1]=y[u]===C1?NaN:y[u],w[u]=u;if(i.type==="log")for(u=0;u<f;u+=2)b[u]=i.c2l(b[u]);if(n.type==="log")for(u=1;u<f;u+=2)b[u]=n.c2l(b[u]);s&&i.type!=="log"&&n.type!=="log"?c.tree=ij(b):c.ids=w,fj(e,r);var g=dj(e,o,r,b,m,y),x=cj(e,o);sj(a,r);var _;return s?g.marker&&(_=g.marker.sizeAvg||Math.max(g.marker.size,3)):_=oj(r,l),lj(e,r,i,n,m,y,_),g.errorX&&D1(r,i,g.errorX),g.errorY&&D1(r,n,g.errorY),g.fill&&!x.fill2d&&(x.fill2d=!0),g.marker&&!x.scatter2d&&(x.scatter2d=!0),g.line&&!x.line2d&&(x.line2d=!0),(g.errorX||g.errorY)&&!x.error2d&&(x.error2d=!0),g.text&&!x.glText&&(x.glText=!0),g.marker&&(g.marker.snap=l),x.lineOptions.push(g.line),x.errorXOptions.push(g.errorX),x.errorYOptions.push(g.errorY),x.fillOptions.push(g.fill),x.markerOptions.push(g.marker),x.markerSelectedOptions.push(g.markerSel),x.markerUnselectedOptions.push(g.markerUnsel),x.textOptions.push(g.text),x.textSelectedOptions.push(g.textSel),x.textUnselectedOptions.push(g.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),c._scene=x,c.index=x.count,c.x=m,c.y=y,c.positions=b,x.count++,[{x:!1,y:!1,t:c,trace:r}]};function D1(t,e,r){var a=t._extremes[e._id],i=nj(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function dj(t,e,r,a,i,n){var o=eo.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&Jn.extendFlat(o.line,eo.linePositions(t,r,a)),o.errorX||o.errorY){var l=eo.errorBarPositions(t,r,a,i,n);o.errorX&&Jn.extendFlat(o.errorX,l.x),o.errorY&&Jn.extendFlat(o.errorY,l.y)}return o.text&&(Jn.extendFlat(o.text,{positions:a},eo.textPosition(t,r,o.text,o.marker)),Jn.extendFlat(o.textSel,{positions:a},eo.textPosition(t,r,o.text,o.markerSel)),Jn.extendFlat(o.textUnsel,{positions:a},eo.textPosition(t,r,o.text,o.markerUnsel))),o}var P1=me,hj=ot,pj=us.DESELECTDIM;function mj(t){var e=t[0],r=e.trace,a=e.t,i=a._scene,n=a.index,o=i.selectBatch[n],l=i.unselectBatch[n],s=i.textOptions[n],f=i.textSelectedOptions[n]||{},c=i.textUnselectedOptions[n]||{},u=P1.extendFlat({},s),v,h;if(o.length||l.length){var d=f.color,p=c.color,m=s.color,y=P1.isArrayOrTypedArray(m);for(u.color=new Array(r._length),v=0;v<o.length;v++)h=o[v],u.color[h]=d||(y?m[h]:m);for(v=0;v<l.length;v++){h=l[v];var b=y?m[h]:m;u.color[h]=p||(d?b:hj.addOpacity(b,pj))}}i.glText[n].update(u)}var lM={styleTextSelection:mj},E1=_r,yj=lM.styleTextSelection,gj=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s=a[0].t,f=l._length,c=s.x,u=s.y,v=s._scene,h=s.index;if(!v)return o;var d=E1.hasText(l),p=E1.hasMarkers(l),m=!p&&!d;if(l.visible!==!0||m)return o;var y=[],b=[];if(r!==!1&&!r.degenerate)for(var w=0;w<f;w++)r.contains([s.xpx[w],s.ypx[w]],!1,w,e)?(y.push(w),o.push({pointNumber:w,x:i.c2d(c[w]),y:n.c2d(u[w])})):b.push(w);if(p){var g=v.scatter2d;if(!y.length&&!b.length){var x=new Array(v.count);x[h]=v.markerOptions[h],g.update.apply(g,x)}else if(!v.selectBatch[h].length&&!v.unselectBatch[h].length){var _=new Array(v.count);_[h]=v.markerUnselectedOptions[h],g.update.apply(g,_)}}return v.selectBatch[h]=y,v.unselectBatch[h]=b,d&&yj(a),o},bj=kO,xj={moduleType:"trace",name:"scattergl",basePlotModule:Jt,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:rM,supplyDefaults:OO,crossTraceDefaults:V2,colorbar:_s,formatLabels:BO,calc:vj,hoverPoints:bj.hoverPoints,selectPoints:gj,meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}},sM={exports:{}},R1=ot,_j=function(){},wj=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=_j);e.destroy=function(){e.container.parentNode.removeChild(e.container)};var a=document.createElement("div");a.className="no-webgl",a.style.cursor="pointer",a.style.fontSize="24px",a.style.color=R1.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=R1.lightLine,a.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",a.appendChild(i),e.container.appendChild(a),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("https://get.webgl.org")},!1},Tj=wj,kj=zM,Aj=function(e,r,a){var i=e._fullLayout,n=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(a);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=kj({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||TM.devicePixelRatio,extensions:r||[],cachedCode:a||{}})}catch{n=!1}o.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(l){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:l,layer:o.key})},!1)}}),n||Tj({container:i._glcontainer.node()}),n},z1=$M,I1=FM,Mj=IM,F1=NM,bd=me,Sj=Cn.selectMode,Lj=Aj,Cj=_r,Dj=sk,Pj=lM.styleTextSelection,fM={};function Ej(t,e,r,a){var i=t._size,n=t.width*a,o=t.height*a,l=i.l*a,s=i.b*a,f=i.r*a,c=i.t*a,u=i.w*a,v=i.h*a;return[l+e.domain[0]*u,s+r.domain[0]*v,n-f-(1-e.domain[1])*u,o-c-(1-r.domain[1])*v]}var Rj=sM.exports=function(e,r,a){if(a.length){var i=e._fullLayout,n=r._scene,o=r.xaxis,l=r.yaxis,s,f;if(n){var c=Lj(e,["ANGLE_instanced_arrays","OES_element_index_uint"],fM);if(!c){n.init();return}var u=n.count,v=i._glcanvas.data()[0].regl;if(Dj(e,r,a),n.dirty){if((n.line2d||n.error2d)&&!(n.scatter2d||n.fill2d||n.glText)&&v.clear({}),n.error2d===!0&&(n.error2d=Mj(v)),n.line2d===!0&&(n.line2d=I1(v)),n.scatter2d===!0&&(n.scatter2d=z1(v)),n.fill2d===!0&&(n.fill2d=I1(v)),n.glText===!0)for(n.glText=new Array(u),s=0;s<u;s++)n.glText[s]=new F1(v);if(n.glText){if(u>n.glText.length){var h=u-n.glText.length;for(s=0;s<h;s++)n.glText.push(new F1(v))}else if(u<n.glText.length){var d=n.glText.length-u,p=n.glText.splice(u,d);p.forEach(function(M){M.destroy()})}for(s=0;s<u;s++)n.glText[s].update(n.textOptions[s])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(M){if(M&&M.positions){for(var C=M.positions,E=0;E<C.length&&(isNaN(C[E])||isNaN(C[E+1]));)E+=2;for(var F=C.length-2;F>E&&(isNaN(C[F])||isNaN(C[F+1]));)F-=2;M.positions=C.slice(E,F+2)}return M}),n.line2d.update(n.lineOptions)),n.error2d){var m=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(m)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=bd.repeat(null,u),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(M,C){var E=a[C];if(!(!M||!E||!E[0]||!E[0].trace)){var F=E[0],j=F.trace,B=F.t,G=n.lineOptions[C],O,W,V=[];j._ownfill&&V.push(C),j._nexttrace&&V.push(C+1),V.length&&(n.fillOrder[C]=V);var Z=[],X=G&&G.positions||B.positions,Q,te;if(j.fill==="tozeroy"){for(Q=0;Q<X.length&&isNaN(X[Q+1]);)Q+=2;for(te=X.length-2;te>Q&&isNaN(X[te+1]);)te-=2;X[Q+1]!==0&&(Z=[X[Q],0]),Z=Z.concat(X.slice(Q,te+2)),X[te+1]!==0&&(Z=Z.concat([X[te],0]))}else if(j.fill==="tozerox"){for(Q=0;Q<X.length&&isNaN(X[Q]);)Q+=2;for(te=X.length-2;te>Q&&isNaN(X[te]);)te-=2;X[Q]!==0&&(Z=[0,X[Q+1]]),Z=Z.concat(X.slice(Q,te+2)),X[te]!==0&&(Z=Z.concat([0,X[te+1]]))}else if(j.fill==="toself"||j.fill==="tonext"){for(Z=[],O=0,M.splitNull=!0,W=0;W<X.length;W+=2)(isNaN(X[W])||isNaN(X[W+1]))&&(Z=Z.concat(X.slice(O,W)),Z.push(X[O],X[O+1]),Z.push(null,null),O=W+2);Z=Z.concat(X.slice(O)),O&&Z.push(X[O],X[O+1])}else{var xe=j._nexttrace;if(xe){var ue=n.lineOptions[C+1];if(ue){var ae=ue.positions;if(j.fill==="tonexty"){for(Z=X.slice(),C=Math.floor(ae.length/2);C--;){var le=ae[C*2],de=ae[C*2+1];isNaN(le)||isNaN(de)||Z.push(le,de)}M.fill=xe.fillcolor}}}}if(j._prevtrace&&j._prevtrace.fill==="tonext"){var be=n.lineOptions[C-1].positions,Te=Z.length/2;O=Te;var Le=[O];for(W=0;W<be.length;W+=2)(isNaN(be[W])||isNaN(be[W+1]))&&(Le.push(W/2+Te+1),O=W+2);Z=Z.concat(be),M.hole=Le}return M.fillmode=j.fill,M.opacity=j.opacity,M.positions=Z,M}}),n.fill2d.update(n.fillOptions))}var y=i.dragmode,b=Sj(y),w=i.clickmode.indexOf("select")>-1;for(s=0;s<u;s++){var g=a[s][0],x=g.trace,_=g.t,k=_.index,T=x._length,S=_.x,D=_.y;if(x.selectedpoints||b||w){if(b||(b=!0),x.selectedpoints){var L=n.selectBatch[k]=bd.selIndices2selPoints(x),R={};for(f=0;f<L.length;f++)R[L[f]]=1;var z=[];for(f=0;f<T;f++)R[f]||z.push(f);n.unselectBatch[k]=z}var N=_.xpx=new Array(T),H=_.ypx=new Array(T);for(f=0;f<T;f++)N[f]=o.c2p(S[f]),H[f]=l.c2p(D[f])}else _.xpx=_.ypx=null}if(b){if(n.select2d||(n.select2d=z1(i._glcanvas.data()[1].regl)),n.scatter2d){var $=new Array(u);for(s=0;s<u;s++)$[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update($)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(M){var C=((M||[])[0]||{}).trace||{};Cj.hasText(C)&&Pj(M)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var P={viewport:Ej(i,o,l,e._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(l._rl||l.range)[0],(o._rl||o.range)[1],(l._rl||l.range)[1]]},A=bd.repeat(P,n.count);n.fill2d&&n.fill2d.update(A),n.line2d&&n.line2d.update(A),n.error2d&&n.error2d.update(A.concat(A)),n.scatter2d&&n.scatter2d.update(A),n.select2d&&n.select2d.update(A),n.glText&&n.glText.forEach(function(M){M.update(P)})}}};Rj.reglPrecompiled=fM;var zj=sM.exports,cM=xj;cM.plot=zj;var Ij=cM,Fj=Ij;const r9=Ci(Fj);var uM={};(function(t){var e=Qt;t.name="treemap",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})(uM);var vM={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},$j=oa,Nj=mr.hovertemplateAttrs,Hj=mr.texttemplateAttrs,Oj=Sn,jj=Ni.attributes,Xa=xu,$1=vM,kl=Nt.extendFlat,Bj=Hr.pattern,Gj={labels:{valType:"data_array",editType:"calc",description:["Sets the labels of each of the sectors."].join(" ")},parents:{valType:"data_array",editType:"calc",description:["Sets the parent sectors for each of the sectors.","Empty string items '' are understood to reference","the root node in the hierarchy.",'If `ids` is filled, `parents` items are understood to be "ids" themselves.',"When `ids` is not set, plotly attempts to find matching items in `labels`,","but beware they must be unique."].join(" ")},values:{valType:"data_array",editType:"calc",description:["Sets the values associated with each of the sectors.","Use with `branchvalues` to determine how the values are summed."].join(" ")},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc",description:["Determines how the items in `values` are summed.","When set to *total*, items in `values` are taken to be value of all its descendants.","When set to *remainder*, items in `values` corresponding to the root and the branches sectors","are taken to be the extra part not part of the sum of the values at their leaves."].join(" ")},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc",description:["Determines default for `values` when it is not provided,","by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0."].join(" ")},level:{valType:"any",editType:"plot",anim:!0,description:["Sets the level from which this trace hierarchy is rendered.","Set `level` to `''` to start from the root node in the hierarchy.",'Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching',"item in `labels`."].join(" ")},maxdepth:{valType:"integer",editType:"plot",dflt:-1,description:["Sets the number of rendered sectors from any given `level`.","Set `maxdepth` to *-1* to render all the levels in the hierarchy."].join(" ")},marker:kl({colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector of this trace.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:kl({},Xa.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:kl({},Xa.marker.line.width,{dflt:1}),editType:"calc"},pattern:Bj,editType:"calc"},Oj("marker",{colorAttr:"colors",anim:!1})),text:Xa.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot",description:["Determines which trace information appear on the graph."].join(" ")},texttemplate:Hj({editType:"plot"},{keys:$1.eventDataKeys.concat(["label","value"])}),hovertext:Xa.hovertext,hoverinfo:kl({},$j.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:Nj({},{keys:$1.eventDataKeys}),textfont:Xa.textfont,insidetextorientation:Xa.insidetextorientation,insidetextfont:Xa.insidetextfont,outsidetextfont:kl({},Xa.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),sort:Xa.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)",description:["sets the color of the root node for a sunburst/treemap/icicle trace.","this has no effect when a colorscale is used to set the markers."].join(" ")},editType:"calc"},domain:jj({name:"sunburst",trace:!0,editType:"calc"})},Tu={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},Uj=mr.hovertemplateAttrs,Vj=mr.texttemplateAttrs,Xj=Sn,Yj=Ni.attributes,Qi=xu,Wr=Gj,N1=Tu,xd=Nt.extendFlat,Wj=Hr.pattern,dM={labels:Wr.labels,parents:Wr.parents,values:Wr.values,branchvalues:Wr.branchvalues,count:Wr.count,level:Wr.level,maxdepth:Wr.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/v3.1.1/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:xd({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:Wr.marker.colors,pattern:Wj,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:Wr.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},Xj("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:xd({},Qi.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Qi.text,textinfo:Wr.textinfo,texttemplate:Vj({editType:"plot"},{keys:N1.eventDataKeys.concat(["label","value"])}),hovertext:Qi.hovertext,hoverinfo:Wr.hoverinfo,hovertemplate:Uj({},{keys:N1.eventDataKeys}),textfont:Qi.textfont,insidetextfont:Qi.insidetextfont,outsidetextfont:xd({},Qi.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented on top left corner of a treemap graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot",description:["Sets the positions of the `text` elements."].join(" ")},sort:Qi.sort,root:Wr.root,domain:Yj({name:"treemap",trace:!0,editType:"calc"})},hM={treemapcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default treemap slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendtreemapcolors`."].join(" ")},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the treemap slice colors (whether given by `treemapcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},H1=me,qj=dM,Zj=ot,Kj=Ni.defaults,Qj=bn.handleText,Jj=Ts.TEXTPAD,eB=FA.handleMarkerDefaults,pM=So,tB=pM.hasColorscale,rB=pM.handleDefaults,aB=function(e,r,a,i){function n(m,y){return H1.coerce(e,r,qj,m,y)}var o=n("labels"),l=n("parents");if(!o||!o.length||!l||!l.length){r.visible=!1;return}var s=n("values");s&&s.length?n("branchvalues"):n("count"),n("level"),n("maxdepth");var f=n("tiling.packing");f==="squarify"&&n("tiling.squarifyratio"),n("tiling.flip"),n("tiling.pad");var c=n("text");n("texttemplate"),r.texttemplate||n("textinfo",H1.isArrayOrTypedArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var u=n("pathbar.visible"),v="auto";Qj(e,r,i,n,v,{hasPathbar:u,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var h=r.textposition.indexOf("bottom")!==-1;eB(e,r,i,n);var d=r._hasColorscale=tB(e,"marker","colors")||(e.marker||{}).coloraxis;d?rB(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(r.marker.colors||[]).length);var p=r.textfont.size*2;n("marker.pad.t",h?p/4:p),n("marker.pad.l",p/4),n("marker.pad.r",p/4),n("marker.pad.b",h?p:p/4),n("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:Zj.contrast(i.paper_bgcolor)}}},u&&(n("pathbar.thickness",r.pathbar.textfont.size+2*Jj),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),Kj(r,i,n),r._length=null},iB=me,nB=hM,oB=function(e,r){function a(i,n){return iB.coerce(e,r,nB,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},Dc={},mM={};(function(t){var e=Ih,r=dt,a=me,i=So.makeColorScaleFuncFromTrace,n=Sc.makePullColorFn,o=Sc.generateExtendedColors,l=So.calc,s=Yt.ALMOST_EQUAL,f={},c={},u={};t.calc=function(h,d){var p=h._fullLayout,m=d.ids,y=a.isArrayOrTypedArray(m),b=d.labels,w=d.parents,g=d.values,x=a.isArrayOrTypedArray(g),_=[],k={},T={},S=function(X,Q){k[X]?k[X].push(Q):k[X]=[Q],T[Q]=1},D=function(X){return X||typeof X=="number"},L=function(X){return!x||r(g[X])&&g[X]>=0},R,z,N;y?(R=Math.min(m.length,w.length),z=function(X){return D(m[X])&&L(X)},N=function(X){return String(m[X])}):(R=Math.min(b.length,w.length),z=function(X){return D(b[X])&&L(X)},N=function(X){return String(b[X])}),x&&(R=Math.min(R,g.length));for(var H=0;H<R;H++)if(z(H)){var $=N(H),P=D(w[H])?String(w[H]):"",A={i:H,id:$,pid:P,label:D(b[H])?String(b[H]):""};x&&(A.v=+g[H]),_.push(A),S(P,$)}if(k[""]){if(k[""].length>1){for(var E=a.randstr(),F=0;F<_.length;F++)_[F].pid===""&&(_[F].pid=E);_.unshift({hasMultipleRoots:!0,id:E,pid:"",label:""})}}else{var M=[],C;for(C in k)T[C]||M.push(C);if(M.length===1)C=M[0],_.unshift({hasImpliedRoot:!0,id:C,pid:"",label:C});else return a.warn(["Multiple implied roots, cannot build",d.type,"hierarchy of",d.name+".","These roots include:",M.join(", ")].join(" "))}var j;try{j=e.stratify().id(function(X){return X.id}).parentId(function(X){return X.pid})(_)}catch(X){return a.warn(["Failed to build",d.type,"hierarchy of",d.name+".","Error:",X.message].join(" "))}var B=e.hierarchy(j),G=!1;if(x)switch(d.branchvalues){case"remainder":B.sum(function(X){return X.data.v});break;case"total":B.each(function(X){var Q=X.data.data,te=Q.v;if(X.children){var xe=X.children.reduce(function(ue,ae){return ue+ae.data.data.v},0);if((Q.hasImpliedRoot||Q.hasMultipleRoots)&&(te=xe),te<xe*s)return G=!0,a.warn(["Total value for node",X.data.data.id,"of",d.name,"is smaller than the sum of its children.",`
|
|
5
|
-
parent value =`,te,`
|
|
6
|
-
children sum =`,xe].join(" "))}X.value=te});break}else v(B,d,{branches:d.count.indexOf("branches")!==-1,leaves:d.count.indexOf("leaves")!==-1});if(!G){d.sort&&B.sort(function(X,Q){return Q.value-X.value});var O,W,V=d.marker.colors||[],Z=!!V.length;return d._hasColorscale?(Z||(V=x?d.values:d._values),l(h,d,{vals:V,containerStr:"marker",cLetter:"c"}),W=i(d.marker)):O=n(p["_"+d.type+"colormap"]),B.each(function(X){var Q=X.data.data;Q.color=d._hasColorscale?W(V[Q.i]):O(V[Q.i],Q.id)}),_[0].hierarchy=B,_}},t._runCrossTraceCalc=function(h,d){var p=d._fullLayout,m=d.calcdata,y=p[h+"colorway"],b=p["_"+h+"colormap"];p["extend"+h+"colors"]&&(y=o(y,h==="icicle"?u:h==="treemap"?c:f));var w=0,g;function x(S){var D=S.data.data,L=D.id;D.color===!1&&(b[L]?D.color=b[L]:S.parent?S.parent.parent?D.color=S.parent.data.data.color:(b[L]=D.color=y[w%y.length],w++):D.color=g)}for(var _=0;_<m.length;_++){var k=m[_],T=k[0];T.trace.type===h&&T.hierarchy&&(g=T.trace.root.color,T.hierarchy.each(x))}},t.crossTraceCalc=function(h){return t._runCrossTraceCalc("sunburst",h)};function v(h,d,p){var m=0,y=h.children;if(y){for(var b=y.length,w=0;w<b;w++)m+=v(y[w],d,p);p.branches&&m++}else p.leaves&&m++;return h.value=h.data.data.value=m,d._values||(d._values=[]),d._values[h.data.data.i]=m,m}})(mM);var yM=mM;Dc.calc=function(t,e){return yM.calc(t,e)};Dc.crossTraceCalc=function(t){return yM._runCrossTraceCalc("treemap",t)};var Hi={};(function(t){var e=me,r=ot,a=zi,i=Ln;t.findEntryWithLevel=function(s,f){var c;return f&&s.eachAfter(function(u){if(t.getPtId(u)===f)return c=u.copy()}),c||s},t.findEntryWithChild=function(s,f){var c;return s.eachAfter(function(u){for(var v=u.children||[],h=0;h<v.length;h++){var d=v[h];if(t.getPtId(d)===f)return c=u.copy()}}),c||s},t.isEntry=function(s){return!s.parent},t.isLeaf=function(s){return!s.children},t.getPtId=function(s){return s.data.data.id},t.getPtLabel=function(s){return s.data.data.label},t.getValue=function(s){return s.value},t.isHierarchyRoot=function(s){return l(s)===""},t.setSliceCursor=function(s,f,c){var u=c.isTransitioning;if(!u){var v=s.datum();u=c.hideOnRoot&&t.isHierarchyRoot(v)||c.hideOnLeaves&&t.isLeaf(v)}a(s,u?null:"pointer")};function n(s,f,c){return{color:t.getOutsideTextFontKey("color",s,f,c),family:t.getOutsideTextFontKey("family",s,f,c),size:t.getOutsideTextFontKey("size",s,f,c)}}function o(s,f,c,u){var v=(u||{}).onPathbar,h=f.data.data,d=h.i,p=e.castOption(s,d,(v?"pathbar.textfont":"insidetextfont")+".color");return!p&&s._input.textfont&&(p=e.castOption(s._input,d,"textfont.color")),{color:p||r.contrast(h.color),family:t.getInsideTextFontKey("family",s,f,c,u),size:t.getInsideTextFontKey("size",s,f,c,u)}}t.getInsideTextFontKey=function(s,f,c,u,v){var h=(v||{}).onPathbar,d=h?"pathbar.textfont":"insidetextfont",p=c.data.data.i;return e.castOption(f,p,d+"."+s)||e.castOption(f,p,"textfont."+s)||u.size},t.getOutsideTextFontKey=function(s,f,c,u){var v=c.data.data.i;return e.castOption(f,v,"outsidetextfont."+s)||e.castOption(f,v,"textfont."+s)||u.size},t.isOutsideText=function(s,f){return!s._hasColorscale&&t.isHierarchyRoot(f)},t.determineTextFont=function(s,f,c,u){return t.isOutsideText(s,f)?n(s,f,c):o(s,f,c,u)},t.hasTransition=function(s){return!!(s&&s.duration>0)},t.getMaxDepth=function(s){return s.maxdepth>=0?s.maxdepth:1/0},t.isHeader=function(s,f){return!(t.isLeaf(s)||s.depth===f._maxDepth-1)};function l(s){return s.data.data.pid}t.getParent=function(s,f){return t.findEntryWithLevel(s,l(f))},t.listPath=function(s,f){var c=s.parent;if(!c)return[];var u=f?[c.data[f]]:[c];return t.listPath(c,f).concat(u)},t.getPath=function(s){return t.listPath(s,"label").join("/")+"/"},t.formatValue=i.formatPieValue,t.formatPercent=function(s,f){var c=e.formatPercent(s,0);return c==="0%"&&(c=i.formatPiePercent(s,f)),c}})(Hi);var lB=function t(e,r,a){var i;a.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),a.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),a.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var n=e.children;if(n)for(var o=0;o<n.length;o++)t(n[o],r,a)},uo=Ih,sB=lB,gM=function(e,r,a){var i=a.flipX,n=a.flipY,o=a.packing==="dice-slice",l=a.pad[n?"bottom":"top"],s=a.pad[i?"right":"left"],f=a.pad[i?"left":"right"],c=a.pad[n?"top":"bottom"],u;o&&(u=s,s=l,l=u,u=f,f=c,c=u);var v=uo.treemap().tile(fB(a.packing,a.squarifyratio)).paddingInner(a.pad.inner).paddingLeft(s).paddingRight(f).paddingTop(l).paddingBottom(c).size(o?[r[1],r[0]]:r)(e);return(o||i||n)&&sB(v,r,{swapXY:o,flipX:i,flipY:n}),v};function fB(t,e){switch(t){case"squarify":return uo.treemapSquarify.ratio(e);case"binary":return uo.treemapBinary;case"dice":return uo.treemapDice;case"slice":return uo.treemapSlice;default:return uo.treemapSliceDice}}var cB=xt,uB=ot,bM=function(e,r,a,i,n){var o=r.data.data,l=o.i,s=n||o.color;if(l>=0){r.i=o.i;var f=a.marker;f.pattern?(!f.colors||!f.pattern.shape)&&(f.color=s,r.color=s):(f.color=s,r.color=s),cB.pointStyle(e,a,i,r)}else uB.fill(e,s)},O1=ft,to=ot,j1=me,_d=Hi,vB=ri.resizeText,dB=bM;function hB(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");vB(t,e,"treemap"),e.each(function(r){var a=O1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){O1.select(this).call(xM,o,n,t,{hovered:!1})})})}function xM(t,e,r,a,i){var n=(i||{}).hovered,o=e.data.data,l=o.i,s,f,c=o.color,u=_d.isHierarchyRoot(e),v=1;if(n)s=r._hovered.marker.line.color,f=r._hovered.marker.line.width;else if(u&&c===r.root.color)v=100,s="rgba(0,0,0,0)",f=0;else if(s=j1.castOption(r,l,"marker.line.color")||to.defaultLine,f=j1.castOption(r,l,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var h=r.marker.depthfade;if(h){var d=to.combine(to.addOpacity(r._backgroundColor,.75),c),p;if(h===!0){var m=_d.getMaxDepth(r);isFinite(m)?_d.isLeaf(e)?p=0:p=r._maxVisibleLayers-(e.data.depth-r._entryDepth):p=e.data.height+1}else p=e.data.depth-r._entryDepth,r._atRootLevel||p++;if(p>0)for(var y=0;y<p;y++){var b=.5*y/p;c=to.combine(to.addOpacity(d,b),c)}}}t.call(dB,e,r,a,c).style("stroke-width",f).call(to.stroke,s).style("opacity",v)}var _m={style:hB,styleOne:xM},ro=ft,B1=Je,pB=la.appendArrayPointValue,Al=_a,G1=me,mB=ds,er=Hi,yB=Ln,gB=yB.formatPieValue,wm=function(e,r,a,i,n){var o=i[0],l=o.trace,s=o.hierarchy,f=l.type==="sunburst",c=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var u=function(d){var p=a._fullLayout;if(!(a._dragging||p.hovermode===!1)){var m=a._fullData[l.index],y=d.data.data,b=y.i,w=er.isHierarchyRoot(d),g=er.getParent(s,d),x=er.getValue(d),_=function(j){return G1.castOption(m,b,j)},k=_("hovertemplate"),T=Al.castHoverinfo(m,p,b),S=p.separators,D;if(k||T&&T!=="none"&&T!=="skip"){var L,R;f&&(L=o.cx+d.pxmid[0]*(1-d.rInscribed),R=o.cy+d.pxmid[1]*(1-d.rInscribed)),c&&(L=d._hoverX,R=d._hoverY);var z={},N=[],H=[],$=function(j){return N.indexOf(j)!==-1};T&&(N=T==="all"?m._module.attributes.hoverinfo.flags:T.split("+")),z.label=y.label,$("label")&&z.label&&H.push(z.label),y.hasOwnProperty("v")&&(z.value=y.v,z.valueLabel=gB(z.value,S),$("value")&&H.push(z.valueLabel)),z.currentPath=d.currentPath=er.getPath(d.data),$("current path")&&!w&&H.push(z.currentPath);var P,A=[],M=function(){A.indexOf(P)===-1&&(H.push(P),A.push(P))};z.percentParent=d.percentParent=x/er.getValue(g),z.parent=d.parentString=er.getPtLabel(g),$("percent parent")&&(P=er.formatPercent(z.percentParent,S)+" of "+z.parent,M()),z.percentEntry=d.percentEntry=x/er.getValue(r),z.entry=d.entry=er.getPtLabel(r),$("percent entry")&&!w&&!d.onPathbar&&(P=er.formatPercent(z.percentEntry,S)+" of "+z.entry,M()),z.percentRoot=d.percentRoot=x/er.getValue(s),z.root=d.root=er.getPtLabel(s),$("percent root")&&!w&&(P=er.formatPercent(z.percentRoot,S)+" of "+z.root,M()),z.text=_("hovertext")||_("text"),$("text")&&(P=z.text,G1.isValidTextValue(P)&&H.push(P)),D=[Ml(d,m,n.eventDataKeys)];var C={trace:m,y:R,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:H.join("<br>"),name:k||$("name")?m.name:void 0,color:_("hoverlabel.bgcolor")||y.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:z,eventData:D};f&&(C.x0=L-d.rInscribed*d.rpx1,C.x1=L+d.rInscribed*d.rpx1,C.idealAlign=d.pxmid[0]<0?"left":"right"),c&&(C.x=L,C.idealAlign=L<0?"left":"right");var E=[];Al.loneHover(C,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:E}),D[0].bbox=E[0],l._hasHoverLabel=!0}if(c){var F=e.select("path.surface");n.styleOne(F,d,m,a,{hovered:!0})}l._hasHoverEvent=!0,a.emit("plotly_hover",{points:D||[Ml(d,m,n.eventDataKeys)],event:ro.event})}},v=function(d){var p=a._fullLayout,m=a._fullData[l.index],y=ro.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=ro.event,a.emit("plotly_unhover",{points:[Ml(y,m,n.eventDataKeys)],event:ro.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(Al.loneUnhover(p._hoverlayer.node()),l._hasHoverLabel=!1),c){var b=e.select("path.surface");n.styleOne(b,y,m,a,{hovered:!1})}},h=function(d){var p=a._fullLayout,m=a._fullData[l.index],y=f&&(er.isHierarchyRoot(d)||er.isLeaf(d)),b=er.getPtId(d),w=er.isEntry(d)?er.findEntryWithChild(s,b):er.findEntryWithLevel(s,b),g=er.getPtId(w),x={points:[Ml(d,m,n.eventDataKeys)],event:ro.event};y||(x.nextLevel=g);var _=mB.triggerHandler(a,"plotly_"+l.type+"click",x);if(_!==!1&&p.hovermode&&(a._hoverdata=[Ml(d,m,n.eventDataKeys)],Al.click(a,ro.event)),!y&&_!==!1&&!a._dragging&&!a._transitioning){B1.call("_storeDirectGUIEdit",m,p._tracePreGUI[m.uid],{level:m.level});var k={data:[{level:g}],traces:[l.index]},T={frame:{redraw:!1,duration:n.transitionTime},transition:{duration:n.transitionTime,easing:n.transitionEasing},mode:"immediate",fromcurrent:!0};Al.loneUnhover(p._hoverlayer.node()),B1.call("animate",a,k,T)}};e.on("mouseover",u),e.on("mouseout",v),e.on("click",h)};function Ml(t,e,r){for(var a=t.data.data,i={curveNumber:e.index,pointNumber:a.i,data:e._input,fullData:e},n=0;n<r.length;n++){var o=r[n];o in t&&(i[o]=t[o])}return"parentString"in t&&!er.isHierarchyRoot(t)&&(i.parent=t.parentString),pB(i,e,a.i),i}var U1=ft,Cf=me,V1=xt,bB=nr,xB=gM,X1=_m.styleOne,wd=Tu,ao=Hi,_B=wm,Td=!0,wB=function(e,r,a,i,n){var o=n.barDifY,l=n.width,s=n.height,f=n.viewX,c=n.viewY,u=n.pathSlice,v=n.toMoveInsideSlice,h=n.strTransform,d=n.hasTransition,p=n.handleSlicesExit,m=n.makeUpdateSliceInterpolator,y=n.makeUpdateTextInterpolator,b={},w=e._context.staticPlot,g=e._fullLayout,x=r[0],_=x.trace,k=x.hierarchy,T=l/_._entryDepth,S=ao.listPath(a.data,"id"),D=xB(k.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();D=D.filter(function(R){var z=S.indexOf(R.data.id);return z===-1?!1:(R.x0=T*z,R.x1=T*(z+1),R.y0=o,R.y1=o+s,R.onPathbar=!0,!0)}),D.reverse(),i=i.data(D,ao.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,Td,b,[l,s],u),i.order();var L=i;d&&(L=L.transition().each("end",function(){var R=U1.select(this);ao.setSliceCursor(R,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),L.each(function(R){R._x0=f(R.x0),R._x1=f(R.x1),R._y0=c(R.y0),R._y1=c(R.y1),R._hoverX=f(R.x1-Math.min(l,s)/2),R._hoverY=c(R.y1-s/2);var z=U1.select(this),N=Cf.ensureSingle(z,"path","surface",function(A){A.style("pointer-events",w?"none":"all")});d?N.transition().attrTween("d",function(A){var M=m(A,Td,b,[l,s]);return function(C){return u(M(C))}}):N.attr("d",u),z.call(_B,a,e,r,{styleOne:X1,eventDataKeys:wd.eventDataKeys,transitionTime:wd.CLICK_TRANSITION_TIME,transitionEasing:wd.CLICK_TRANSITION_EASING}).call(ao.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),N.call(X1,R,_,e,{hovered:!1}),R._text=(ao.getPtLabel(R)||"").split("<br>").join(" ")||"";var H=Cf.ensureSingle(z,"g","slicetext"),$=Cf.ensureSingle(H,"text","",function(A){A.attr("data-notex",1)}),P=Cf.ensureUniformFontSize(e,ao.determineTextFont(_,R,g.font,{onPathbar:!0}));$.text(R._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(V1.font,P).call(bB.convertToTspans,e),R.textBB=V1.bBox($.node()),R.transform=v(R,{fontSize:P.size,onPathbar:!0}),R.transform.fontSize=P.size,d?$.transition().attrTween("transform",function(A){var M=y(A,Td,b,[l,s]);return function(C){return h(M(C))}}):$.attr("transform",h(R))})},Y1=ft,kd=s_.interpolate,gi=Hi,Sl=me,W1=Ts.TEXTPAD,TB=gm,kB=TB.toMoveInsideBar,AB=ri,Ad=AB.recordMinTextSize,MB=Tu,SB=wB;function Ji(t){return gi.isHierarchyRoot(t)?"":gi.getPtId(t)}var LB=function(e,r,a,i,n){var o=e._fullLayout,l=r[0],s=l.trace,f=s.type,c=f==="icicle",u=l.hierarchy,v=gi.findEntryWithLevel(u,s.level),h=Y1.select(a),d=h.selectAll("g.pathbar"),p=h.selectAll("g.slice");if(!v){d.remove(),p.remove();return}var m=gi.isHierarchyRoot(v),y=!o.uniformtext.mode&&gi.hasTransition(i),b=gi.getMaxDepth(s),w=function(K){return K.data.depth-v.data.depth<b},g=o._size,x=s.domain,_=g.w*(x.x[1]-x.x[0]),k=g.h*(x.y[1]-x.y[0]),T=_,S=s.pathbar.thickness,D=s.marker.line.width+MB.gapWithPathbar,L=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?k+D:-(S+D):0,R={x0:T,x1:T,y0:L,y1:L+S},z=function(K,ke,re){var pe=s.tiling.pad,we=function(ge){return ge-pe<=ke.x0},se=function(ge){return ge+pe>=ke.x1},ie=function(ge){return ge-pe<=ke.y0},fe=function(ge){return ge+pe>=ke.y1};return K.x0===ke.x0&&K.x1===ke.x1&&K.y0===ke.y0&&K.y1===ke.y1?{x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1}:{x0:we(K.x0-pe)?0:se(K.x0-pe)?re[0]:K.x0,x1:we(K.x1+pe)?0:se(K.x1+pe)?re[0]:K.x1,y0:ie(K.y0-pe)?0:fe(K.y0-pe)?re[1]:K.y0,y1:ie(K.y1+pe)?0:fe(K.y1+pe)?re[1]:K.y1}},N=null,H={},$={},P=null,A=function(K,ke){return ke?H[Ji(K)]:$[Ji(K)]},M=function(K,ke,re,pe){if(ke)return H[Ji(u)]||R;var we=$[s.level]||re;return w(K)?z(K,we,pe):{}};l.hasMultipleRoots&&m&&b++,s._maxDepth=b,s._backgroundColor=o.paper_bgcolor,s._entryDepth=v.data.depth,s._atRootLevel=m;var C=-_/2+g.l+g.w*(x.x[1]+x.x[0])/2,E=-k/2+g.t+g.h*(1-(x.y[1]+x.y[0])/2),F=function(K){return C+K},j=function(K){return E+K},B=j(0),G=F(0),O=function(K){return G+K},W=function(K){return B+K};function V(K,ke){return K+","+ke}var Z=O(0),X=function(K){K.x=Math.max(Z,K.x)},Q=s.pathbar.edgeshape,te=function(K){var ke=O(Math.max(Math.min(K.x0,K.x0),0)),re=O(Math.min(Math.max(K.x1,K.x1),T)),pe=W(K.y0),we=W(K.y1),se=S/2,ie={},fe={};ie.x=ke,fe.x=re,ie.y=fe.y=(pe+we)/2;var ge={x:ke,y:pe},Me={x:re,y:pe},Se={x:re,y:we},Pe={x:ke,y:we};return Q===">"?(ge.x-=se,Me.x-=se,Se.x-=se,Pe.x-=se):Q==="/"?(Se.x-=se,Pe.x-=se,ie.x-=se/2,fe.x-=se/2):Q==="\\"?(ge.x-=se,Me.x-=se,ie.x-=se/2,fe.x-=se/2):Q==="<"&&(ie.x-=se,fe.x-=se),X(ge),X(Pe),X(ie),X(Me),X(Se),X(fe),"M"+V(ge.x,ge.y)+"L"+V(Me.x,Me.y)+"L"+V(fe.x,fe.y)+"L"+V(Se.x,Se.y)+"L"+V(Pe.x,Pe.y)+"L"+V(ie.x,ie.y)+"Z"},xe=s[c?"tiling":"marker"].pad,ue=function(K){return s.textposition.indexOf(K)!==-1},ae=ue("top"),le=ue("left"),de=ue("right"),be=ue("bottom"),Te=function(K){var ke=F(K.x0),re=F(K.x1),pe=j(K.y0),we=j(K.y1),se=re-ke,ie=we-pe;if(!se||!ie)return"";var fe=s.marker.cornerradius||0,ge=Math.min(fe,se/2,ie/2);ge&&K.data&&K.data.data&&K.data.data.label&&(ae&&(ge=Math.min(ge,xe.t)),le&&(ge=Math.min(ge,xe.l)),de&&(ge=Math.min(ge,xe.r)),be&&(ge=Math.min(ge,xe.b)));var Me=function(Se,Pe){return ge?"a"+V(ge,ge)+" 0 0 1 "+V(Se,Pe):""};return"M"+V(ke,pe+ge)+Me(ge,-ge)+"L"+V(re-ge,pe)+Me(ge,ge)+"L"+V(re,we-ge)+Me(-ge,ge)+"L"+V(ke+ge,we)+Me(-ge,-ge)+"Z"},Le=function(K,ke){var re=K.x0,pe=K.x1,we=K.y0,se=K.y1,ie=K.textBB,fe=ae||ke.isHeader&&!be,ge=fe?"start":be?"end":"middle",Me=ue("right"),Se=ue("left")||ke.onPathbar,Pe=Se?-1:Me?1:0;if(ke.isHeader){if(re+=(c?xe:xe.l)-W1,pe-=(c?xe:xe.r)-W1,re>=pe){var He=(re+pe)/2;re=He,pe=He}var Oe;be?(Oe=se-(c?xe:xe.b),we<Oe&&Oe<se&&(we=Oe)):(Oe=we+(c?xe:xe.t),we<Oe&&Oe<se&&(se=Oe))}var ve=kB(re,pe,we,se,ie,{isHorizontal:!1,constrained:!0,angle:0,anchor:ge,leftToRight:Pe});return ve.fontSize=ke.fontSize,ve.targetX=F(ve.targetX),ve.targetY=j(ve.targetY),isNaN(ve.targetX)||isNaN(ve.targetY)?{}:(re!==pe&&we!==se&&Ad(s.type,ve,o),{scale:ve.scale,rotate:ve.rotate,textX:ve.textX,textY:ve.textY,anchorX:ve.anchorX,anchorY:ve.anchorY,targetX:ve.targetX,targetY:ve.targetY})},_e=function(K,ke){for(var re,pe=0,we=K;!re&&pe<b;)pe++,we=we.parent,we?re=A(we,ke):pe=b;return re||{}},Ie=function(K,ke,re,pe){var we=A(K,ke),se;if(ke)se=R;else{var ie=A(v,ke);ie?se=z(K,ie,pe):se={}}return kd(we,se)},ce=function(K,ke,re,pe,we){var se=A(K,ke),ie;if(se)ie=se;else if(ke)ie=R;else if(N)if(K.parent){var fe=P||re;fe&&!ke?ie=z(K,fe,pe):(ie={},Sl.extendFlat(ie,_e(K,ke)))}else ie=Sl.extendFlat({},K),c&&(we.orientation==="h"?we.flipX?ie.x0=K.x1:ie.x1=0:we.flipY?ie.y0=K.y1:ie.y1=0);else ie={};return kd(ie,{x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1})},ye=function(K,ke,re,pe){var we=A(K,ke),se={},ie=M(K,ke,re,pe);Sl.extendFlat(se,{transform:Le({x0:ie.x0,x1:ie.x1,y0:ie.y0,y1:ie.y1,textBB:K.textBB,_text:K._text},{isHeader:gi.isHeader(K,s)})}),we?se=we:K.parent&&Sl.extendFlat(se,_e(K,ke));var fe=K.transform;return K.x0!==K.x1&&K.y0!==K.y1&&Ad(s.type,fe,o),kd(se,{transform:{scale:fe.scale,rotate:fe.rotate,textX:fe.textX,textY:fe.textY,anchorX:fe.anchorX,anchorY:fe.anchorY,targetX:fe.targetX,targetY:fe.targetY}})},Ee=function(K,ke,re,pe,we){var se=pe[0],ie=pe[1];y?K.exit().transition().each(function(){var fe=Y1.select(this),ge=fe.select("path.surface");ge.transition().attrTween("d",function(Se){var Pe=Ie(Se,ke,re,[se,ie]);return function(He){return we(Pe(He))}});var Me=fe.select("g.slicetext");Me.attr("opacity",0)}).remove():K.exit().remove()},ze=function(K){var ke=K.transform;return K.x0!==K.x1&&K.y0!==K.y1&&Ad(s.type,ke,o),Sl.getTextTransform({textX:ke.textX,textY:ke.textY,anchorX:ke.anchorX,anchorY:ke.anchorY,targetX:ke.targetX,targetY:ke.targetY,scale:ke.scale,rotate:ke.rotate})};y&&(d.each(function(K){H[Ji(K)]={x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1},K.transform&&(H[Ji(K)].transform={textX:K.transform.textX,textY:K.transform.textY,anchorX:K.transform.anchorX,anchorY:K.transform.anchorY,targetX:K.transform.targetX,targetY:K.transform.targetY,scale:K.transform.scale,rotate:K.transform.rotate})}),p.each(function(K){$[Ji(K)]={x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1},K.transform&&($[Ji(K)].transform={textX:K.transform.textX,textY:K.transform.textY,anchorX:K.transform.anchorX,anchorY:K.transform.anchorY,targetX:K.transform.targetX,targetY:K.transform.targetY,scale:K.transform.scale,rotate:K.transform.rotate}),!N&&gi.isEntry(K)&&(N=K)})),P=n(e,r,v,p,{width:_,height:k,viewX:F,viewY:j,pathSlice:Te,toMoveInsideSlice:Le,prevEntry:N,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ye,handleSlicesExit:Ee,hasTransition:y,strTransform:ze}),s.pathbar.visible?SB(e,r,v,d,{barDifY:L,width:T,height:S,viewX:O,viewY:W,pathSlice:te,toMoveInsideSlice:Le,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ye,handleSlicesExit:Ee,hasTransition:y,strTransform:ze}):d.remove()},CB=ft,DB=Hi,PB=ri,EB=PB.clearMinTextSize,RB=xn.resizeText,q1=LB,zB=function(e,r,a,i,n){var o=n.type,l=n.drawDescendants,s=e._fullLayout,f=s["_"+o+"layer"],c,u,v=!a;if(EB(o,s),c=f.selectAll("g.trace."+o).data(r,function(d){return d[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!s.uniformtext.mode&&DB.hasTransition(a)){i&&(u=i());var h=CB.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});h.each(function(){f.selectAll("g.trace").each(function(d){q1(e,d,this,a,l)})})}else c.each(function(d){q1(e,d,this,a,l)}),s.uniformtext.mode&&RB(e,f.selectAll(".trace"),o);v&&c.exit().remove()},_M={},Z1=ot,K1=me;ri.resizeText;var IB=bM;function FB(t,e,r,a){var i=e.data.data,n=!e.children,o=i.i,l=K1.castOption(r,o,"marker.line.color")||Z1.defaultLine,s=K1.castOption(r,o,"marker.line.width")||0;t.call(IB,e,r,a).style("stroke-width",s).call(Z1.stroke,l).style("opacity",n?r.leaf.opacity:null)}var $B={styleOne:FB};(function(t){var e=ft,r=Ih,a=s_.interpolate,i=xt,n=me,o=nr,l=ri,s=l.recordMinTextSize,f=l.clearMinTextSize,c=qA,u=Ln.getRotationAngle,v=c.computeTransform,h=c.transformInsideText,d=$B.styleOne,p=xn.resizeText,m=wm,y=vM,b=Hi;t.plot=function(T,S,D,L){var R=T._fullLayout,z=R._sunburstlayer,N,H,$=!D,P=!R.uniformtext.mode&&b.hasTransition(D);if(f("sunburst",R),N=z.selectAll("g.trace.sunburst").data(S,function(M){return M[0].trace.uid}),N.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),N.order(),P){L&&(H=L());var A=e.transition().duration(D.duration).ease(D.easing).each("end",function(){H&&H()}).each("interrupt",function(){H&&H()});A.each(function(){z.selectAll("g.trace").each(function(M){w(T,M,this,D)})})}else N.each(function(M){w(T,M,this,D)}),R.uniformtext.mode&&p(T,R._sunburstlayer.selectAll(".trace"),"sunburst");$&&N.exit().remove()};function w(T,S,D,L){var R=T._context.staticPlot,z=T._fullLayout,N=!z.uniformtext.mode&&b.hasTransition(L),H=e.select(D),$=H.selectAll("g.slice"),P=S[0],A=P.trace,M=P.hierarchy,C=b.findEntryWithLevel(M,A.level),E=b.getMaxDepth(A),F=z._size,j=A.domain,B=F.w*(j.x[1]-j.x[0]),G=F.h*(j.y[1]-j.y[0]),O=.5*Math.min(B,G),W=P.cx=F.l+F.w*(j.x[1]+j.x[0])/2,V=P.cy=F.t+F.h*(1-j.y[0])-G/2;if(!C)return $.remove();var Z=null,X={};N&&$.each(function(re){X[b.getPtId(re)]={rpx0:re.rpx0,rpx1:re.rpx1,x0:re.x0,x1:re.x1,transform:re.transform},!Z&&b.isEntry(re)&&(Z=re)});var Q=g(C).descendants(),te=C.height+1,xe=0,ue=E;P.hasMultipleRoots&&b.isHierarchyRoot(C)&&(Q=Q.slice(1),te-=1,xe=1,ue+=1),Q=Q.filter(function(re){return re.y1<=ue});var ae=u(A.rotation);ae&&Q.forEach(function(re){re.x0+=ae,re.x1+=ae});var le=Math.min(te,E),de=function(re){return(re-xe)/le*O},be=function(re,pe){return[re*Math.cos(pe),-re*Math.sin(pe)]},Te=function(re){return n.pathAnnulus(re.rpx0,re.rpx1,re.x0,re.x1,W,V)},Le=function(re){return W+_(re)[0]*(re.transform.rCenter||0)+(re.transform.x||0)},_e=function(re){return V+_(re)[1]*(re.transform.rCenter||0)+(re.transform.y||0)};$=$.data(Q,b.getPtId),$.enter().append("g").classed("slice",!0),N?$.exit().transition().each(function(){var re=e.select(this),pe=re.select("path.surface");pe.transition().attrTween("d",function(se){var ie=Ee(se);return function(fe){return Te(ie(fe))}});var we=re.select("g.slicetext");we.attr("opacity",0)}).remove():$.exit().remove(),$.order();var Ie=null;if(N&&Z){var ce=b.getPtId(Z);$.each(function(re){Ie===null&&b.getPtId(re)===ce&&(Ie=re.x1)})}var ye=$;N&&(ye=ye.transition().each("end",function(){var re=e.select(this);b.setSliceCursor(re,T,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ye.each(function(re){var pe=e.select(this),we=n.ensureSingle(pe,"path","surface",function(Se){Se.style("pointer-events",R?"none":"all")});re.rpx0=de(re.y0),re.rpx1=de(re.y1),re.xmid=(re.x0+re.x1)/2,re.pxmid=be(re.rpx1,re.xmid),re.midangle=-(re.xmid-Math.PI/2),re.startangle=-(re.x0-Math.PI/2),re.stopangle=-(re.x1-Math.PI/2),re.halfangle=.5*Math.min(n.angleDelta(re.x0,re.x1)||Math.PI,Math.PI),re.ring=1-re.rpx0/re.rpx1,re.rInscribed=x(re),N?we.transition().attrTween("d",function(Se){var Pe=ze(Se);return function(He){return Te(Pe(He))}}):we.attr("d",Te),pe.call(m,C,T,S,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,T,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:T._transitioning}),we.call(d,re,A,T);var se=n.ensureSingle(pe,"g","slicetext"),ie=n.ensureSingle(se,"text","",function(Se){Se.attr("data-notex",1)}),fe=n.ensureUniformFontSize(T,b.determineTextFont(A,re,z.font));ie.text(t.formatSliceLabel(re,C,A,S,z)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,fe).call(o.convertToTspans,T);var ge=i.bBox(ie.node());re.transform=h(ge,re,P),re.transform.targetX=Le(re),re.transform.targetY=_e(re);var Me=function(Se,Pe){var He=Se.transform;return v(He,Pe),He.fontSize=fe.size,s(A.type,He,z),n.getTextTransform(He)};N?ie.transition().attrTween("transform",function(Se){var Pe=K(Se);return function(He){return Me(Pe(He),ge)}}):ie.attr("transform",Me(re,ge))});function Ee(re){var pe=b.getPtId(re),we=X[pe],se=X[b.getPtId(C)],ie;if(se){var fe=(re.x1>se.x1?2*Math.PI:0)+ae;ie=re.rpx1<se.rpx1?{x0:re.x0,x1:re.x1,rpx0:0,rpx1:0}:{x0:fe,x1:fe,rpx0:re.rpx0,rpx1:re.rpx1}}else{var ge,Me=b.getPtId(re.parent);$.each(function(ve){if(b.getPtId(ve)===Me)return ge=ve});var Se=ge.children,Pe;Se.forEach(function(ve,Be){if(b.getPtId(ve)===pe)return Pe=Be});var He=Se.length,Oe=a(ge.x0,ge.x1);ie={rpx0:O,rpx1:O,x0:Oe(Pe/He),x1:Oe((Pe+1)/He)}}return a(we,ie)}function ze(re){var pe=X[b.getPtId(re)],we,se={x0:re.x0,x1:re.x1,rpx0:re.rpx0,rpx1:re.rpx1};if(pe)we=pe;else if(Z)if(re.parent)if(Ie){var ie=(re.x1>Ie?2*Math.PI:0)+ae;we={x0:ie,x1:ie}}else we={rpx0:O,rpx1:O},n.extendFlat(we,ke(re));else we={rpx0:0,rpx1:0};else we={x0:ae,x1:ae};return a(we,se)}function K(re){var pe=X[b.getPtId(re)],we,se=re.transform;if(pe)we=pe;else if(we={rpx1:re.rpx1,transform:{textPosAngle:se.textPosAngle,scale:0,rotate:se.rotate,rCenter:se.rCenter,x:se.x,y:se.y}},Z)if(re.parent)if(Ie){var ie=re.x1>Ie?2*Math.PI:0;we.x0=we.x1=ie}else n.extendFlat(we,ke(re));else we.x0=we.x1=ae;else we.x0=we.x1=ae;var fe=a(we.transform.textPosAngle,re.transform.textPosAngle),ge=a(we.rpx1,re.rpx1),Me=a(we.x0,re.x0),Se=a(we.x1,re.x1),Pe=a(we.transform.scale,se.scale),He=a(we.transform.rotate,se.rotate),Oe=se.rCenter===0?3:we.transform.rCenter===0?1/3:1,ve=a(we.transform.rCenter,se.rCenter),Be=function(Ne){return ve(Math.pow(Ne,Oe))};return function(Ne){var We=ge(Ne);Me(Ne),Se(Ne);var Ge=Be(Ne),Ve=fe(Ne),Ue={rpx1:We,transform:{textPosAngle:Ve,rCenter:Ge,x:se.x,y:se.y}};return s(A.type,se,z),{transform:{targetX:Le(Ue),targetY:_e(Ue),scale:Pe(Ne),rotate:He(Ne),rCenter:Ge}}}}function ke(re){var pe=re.parent,we=X[b.getPtId(pe)],se={};if(we){var ie=pe.children,fe=ie.indexOf(re),ge=ie.length,Me=a(we.x0,we.x1);se.x0=Me(fe/ge),se.x1=Me(fe/ge)}else se.x0=se.x1=0;return se}}function g(T){return r.partition().size([2*Math.PI,T.height+1])(T)}t.formatSliceLabel=function(T,S,D,L,R){var z=D.texttemplate,N=D.textinfo;if(!z&&(!N||N==="none"))return"";var H=R.separators,$=L[0],P=T.data.data,A=$.hierarchy,M=b.isHierarchyRoot(T),C=b.getParent(A,T),E=b.getValue(T);if(!z){var F=N.split("+"),j=function(xe){return F.indexOf(xe)!==-1},B=[],G;if(j("label")&&P.label&&B.push(P.label),P.hasOwnProperty("v")&&j("value")&&B.push(b.formatValue(P.v,H)),!M){j("current path")&&B.push(b.getPath(T.data));var O=0;j("percent parent")&&O++,j("percent entry")&&O++,j("percent root")&&O++;var W=O>1;if(O){var V,Z=function(xe){G=b.formatPercent(V,H),W&&(G+=" of "+xe),B.push(G)};j("percent parent")&&!M&&(V=E/b.getValue(C),Z("parent")),j("percent entry")&&(V=E/b.getValue(S),Z("entry")),j("percent root")&&(V=E/b.getValue(A),Z("root"))}}return j("text")&&(G=n.castOption(D,P.i,"text"),n.isValidTextValue(G)&&B.push(G)),B.join("<br>")}var X=n.castOption(D,P.i,"texttemplate");if(!X)return"";var Q={};P.label&&(Q.label=P.label),P.hasOwnProperty("v")&&(Q.value=P.v,Q.valueLabel=b.formatValue(P.v,H)),Q.currentPath=b.getPath(T.data),M||(Q.percentParent=E/b.getValue(C),Q.percentParentLabel=b.formatPercent(Q.percentParent,H),Q.parent=b.getPtLabel(C)),Q.percentEntry=E/b.getValue(S),Q.percentEntryLabel=b.formatPercent(Q.percentEntry,H),Q.entry=b.getPtLabel(S),Q.percentRoot=E/b.getValue(A),Q.percentRootLabel=b.formatPercent(Q.percentRoot,H),Q.root=b.getPtLabel(A),P.hasOwnProperty("color")&&(Q.color=P.color);var te=n.castOption(D,P.i,"text");return(n.isValidTextValue(te)||te==="")&&(Q.text=te),Q.customdata=n.castOption(D,P.i,"customdata"),n.texttemplateString(X,Q,R._d3locale,Q,D._meta||{})};function x(T){return T.rpx0===0&&n.isFullCircle([T.x0,T.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(T.halfangle)),T.ring/2))}function _(T){return k(T.rpx1,T.transform.textPosAngle)}function k(T,S){return[T*Math.sin(S),-T*Math.cos(S)]}})(_M);var Q1=ft,Df=me,J1=xt,NB=nr,HB=gM,e_=_m.styleOne,Md=Tu,vi=Hi,OB=wm,jB=_M.formatSliceLabel,Sd=!1,BB=function(e,r,a,i,n){var o=n.width,l=n.height,s=n.viewX,f=n.viewY,c=n.pathSlice,u=n.toMoveInsideSlice,v=n.strTransform,h=n.hasTransition,d=n.handleSlicesExit,p=n.makeUpdateSliceInterpolator,m=n.makeUpdateTextInterpolator,y=n.prevEntry,b={},w=e._context.staticPlot,g=e._fullLayout,x=r[0],_=x.trace,k=_.textposition.indexOf("left")!==-1,T=_.textposition.indexOf("right")!==-1,S=_.textposition.indexOf("bottom")!==-1,D=!S&&!_.marker.pad.t||S&&!_.marker.pad.b,L=HB(a,[o,l],{packing:_.tiling.packing,squarifyratio:_.tiling.squarifyratio,flipX:_.tiling.flip.indexOf("x")>-1,flipY:_.tiling.flip.indexOf("y")>-1,pad:{inner:_.tiling.pad,top:_.marker.pad.t,left:_.marker.pad.l,right:_.marker.pad.r,bottom:_.marker.pad.b}}),R=L.descendants(),z=1/0,N=-1/0;R.forEach(function(M){var C=M.depth;C>=_._maxDepth?(M.x0=M.x1=(M.x0+M.x1)/2,M.y0=M.y1=(M.y0+M.y1)/2):(z=Math.min(z,C),N=Math.max(N,C))}),i=i.data(R,vi.getPtId),_._maxVisibleLayers=isFinite(N)?N-z+1:0,i.enter().append("g").classed("slice",!0),d(i,Sd,b,[o,l],c),i.order();var H=null;if(h&&y){var $=vi.getPtId(y);i.each(function(M){H===null&&vi.getPtId(M)===$&&(H={x0:M.x0,x1:M.x1,y0:M.y0,y1:M.y1})})}var P=function(){return H||{x0:0,x1:o,y0:0,y1:l}},A=i;return h&&(A=A.transition().each("end",function(){var M=Q1.select(this);vi.setSliceCursor(M,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),A.each(function(M){var C=vi.isHeader(M,_);M._x0=s(M.x0),M._x1=s(M.x1),M._y0=f(M.y0),M._y1=f(M.y1),M._hoverX=s(M.x1-_.marker.pad.r),M._hoverY=f(S?M.y1-_.marker.pad.b/2:M.y0+_.marker.pad.t/2);var E=Q1.select(this),F=Df.ensureSingle(E,"path","surface",function(O){O.style("pointer-events",w?"none":"all")});h?F.transition().attrTween("d",function(O){var W=p(O,Sd,P(),[o,l]);return function(V){return c(W(V))}}):F.attr("d",c),E.call(OB,a,e,r,{styleOne:e_,eventDataKeys:Md.eventDataKeys,transitionTime:Md.CLICK_TRANSITION_TIME,transitionEasing:Md.CLICK_TRANSITION_EASING}).call(vi.setSliceCursor,e,{isTransitioning:e._transitioning}),F.call(e_,M,_,e,{hovered:!1}),M.x0===M.x1||M.y0===M.y1?M._text="":C?M._text=D?"":vi.getPtLabel(M)||"":M._text=jB(M,a,_,r,g)||"";var j=Df.ensureSingle(E,"g","slicetext"),B=Df.ensureSingle(j,"text","",function(O){O.attr("data-notex",1)}),G=Df.ensureUniformFontSize(e,vi.determineTextFont(_,M,g.font));B.text(M._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":k||C?"start":"middle").call(J1.font,G).call(NB.convertToTspans,e),M.textBB=J1.bBox(B.node()),M.transform=u(M,{fontSize:G.size,isHeader:C}),M.transform.fontSize=G.size,h?B.transition().attrTween("transform",function(O){var W=m(O,Sd,P(),[o,l]);return function(V){return v(W(V))}}):B.attr("transform",v(M))}),H},GB=zB,UB=BB,VB=function(e,r,a,i){return GB(e,r,a,i,{type:"treemap",drawDescendants:UB})},XB={moduleType:"trace",name:"treemap",basePlotModule:uM,categories:[],animatable:!0,attributes:dM,layoutAttributes:hM,supplyDefaults:aB,supplyLayoutDefaults:oB,calc:Dc.calc,crossTraceCalc:Dc.crossTraceCalc,plot:VB,style:_m.style,colorbar:_s,meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}},YB=XB;const a9=Ci(YB);export{KB as P,QB as b,ZB as c,JB as h,t9 as o,e9 as p,r9 as s,a9 as t};
|
|
7
|
-
//# sourceMappingURL=plotly-BNi-gO9O.js.map
|