@deephaven/embed-widget 1.0.1-beta.0 → 1.1.0

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.
Files changed (39) hide show
  1. package/build/assets/{App-B4QjOWOB.js → App-DAgAtWCH.js} +2 -2
  2. package/build/assets/{App-B4QjOWOB.js.map → App-DAgAtWCH.js.map} +1 -1
  3. package/build/assets/{Chart-CESsUjf5.js → Chart-qriEV-9V.js} +2 -2
  4. package/build/assets/{Chart-CESsUjf5.js.map → Chart-qriEV-9V.js.map} +1 -1
  5. package/build/assets/IrisGrid-CYybSB6J.js +5 -0
  6. package/build/assets/IrisGrid-CYybSB6J.js.map +1 -0
  7. package/build/assets/{IrisGridThemeProvider-CLFUkbnY.js → IrisGridThemeProvider-B4AYoMew.js} +2 -2
  8. package/build/assets/{IrisGridThemeProvider-CLFUkbnY.js.map → IrisGridThemeProvider-B4AYoMew.js.map} +1 -1
  9. package/build/assets/{LocalWorkspaceStorage-DD_T9MUf.js → LocalWorkspaceStorage-DzqiSO69.js} +2 -2
  10. package/build/assets/{LocalWorkspaceStorage-DD_T9MUf.js.map → LocalWorkspaceStorage-DzqiSO69.js.map} +1 -1
  11. package/build/assets/{LogPanel-DkFAPGd0.js → LogPanel-DhlW2KPe.js} +12 -12
  12. package/build/assets/LogPanel-DhlW2KPe.js.map +1 -0
  13. package/build/assets/{MarkdownEditor-dS-p89A_.js → MarkdownEditor-DyOYK3DP.js} +2 -2
  14. package/build/assets/{MarkdownEditor-dS-p89A_.js.map → MarkdownEditor-DyOYK3DP.js.map} +1 -1
  15. package/build/assets/{MarkdownNotebook-apDyh4da.js → MarkdownNotebook-BhYEYF2b.js} +2 -2
  16. package/build/assets/{MarkdownNotebook-apDyh4da.js.map → MarkdownNotebook-BhYEYF2b.js.map} +1 -1
  17. package/build/assets/Plot-COuXoRaA.js +2 -0
  18. package/build/assets/{Plot-CjmKATG6.js.map → Plot-COuXoRaA.js.map} +1 -1
  19. package/build/assets/{Plotly-0UxsCNzT.js → Plotly-Btj8VoUh.js} +2 -2
  20. package/build/assets/{Plotly-0UxsCNzT.js.map → Plotly-Btj8VoUh.js.map} +1 -1
  21. package/build/assets/{index-qut3a5WU.js → index-C1ckEaGN.js} +3 -3
  22. package/build/assets/{index-qut3a5WU.js.map → index-C1ckEaGN.js.map} +1 -1
  23. package/build/assets/index-HppPbzSh.js +84 -0
  24. package/build/assets/index-HppPbzSh.js.map +1 -0
  25. package/build/assets/index-su8-Y4m1.js +14 -0
  26. package/build/assets/index-su8-Y4m1.js.map +1 -0
  27. package/build/assets/plotly-Bi-TI-TG.js +7 -0
  28. package/build/assets/{plotly-DDD8Llll.js.map → plotly-Bi-TI-TG.js.map} +1 -1
  29. package/build/index.html +2 -2
  30. package/package.json +18 -18
  31. package/build/assets/IrisGrid-V4Cw9OL3.js +0 -5
  32. package/build/assets/IrisGrid-V4Cw9OL3.js.map +0 -1
  33. package/build/assets/LogPanel-DkFAPGd0.js.map +0 -1
  34. package/build/assets/Plot-CjmKATG6.js +0 -2
  35. package/build/assets/index-C-mAR5e8.js +0 -84
  36. package/build/assets/index-C-mAR5e8.js.map +0 -1
  37. package/build/assets/index-CDO0dq5q.js +0 -14
  38. package/build/assets/index-CDO0dq5q.js.map +0 -1
  39. package/build/assets/plotly-DDD8Llll.js +0 -7
@@ -0,0 +1,7 @@
1
+ import{g as Ci,c as XM}from"./helpers-BosuxZz1.js";import{r as YM,p as WM,a as o_,f as dt,t as oa,d as ft,g as l_,b as Bl,i as qM,c as s_,e as Ih,h as f_,m as ZM,j as c_,k as u_,l as KM,n as QM,o as JM,q as eS,s as v_,u as tS,v as rS,w as aS,x as iS,y as nS,z as oS,A as lS,B as Fh,C as d_}from"./vendor-CiEcCTfT.js";var h_={};(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(YM),a=i(WM);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,E,R){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(E),R&&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 E=L.frames&&L.frames.length?L.frames.length:0,R=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&&R===E),H=L.revision!==void 0,F=L.revision!==this.props.revision;!N&&(!H||H&&!F)||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(E){L.el.on(E,L.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var L=this;!this.el||!this.el.removeListener||b.forEach(function(E){L.el.removeListener(E,L.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(L){if(typeof L=="function"){var E=this.el,R=E.data,N=E.layout,H=this.el._transitionData?this.el._transitionData._frames:null,F={data:R,layout:N,frames:H};L(F,this.el)}}},{key:"syncWindowResize",value:function(L){var E=this;w&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return x.Plots.resize(E.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(E){var R=L.props["on"+E],N=L.handlers[E],H=!!N;R&&!H?L.addEventHandler(E,R):!R&&H?L.removeEventHandler(E):R&&H&&R!==N&&(L.removeEventHandler(E),L.addEventHandler(E,R))})}},{key:"addEventHandler",value:function(L,E){this.handlers[L]=E,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"}},_}})(h_);const t9=Ci(h_);var p_={},Rc={};Rc.version="2.29.1";var m_={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")},sS=o_.decode,fS=_n,Nh=Array.isArray,cS=ArrayBuffer,uS=DataView;function y_(t){return cS.isView(t)&&!(t instanceof uS)}Xt.isTypedArray=y_;function Jf(t){return Nh(t)||y_(t)}Xt.isArrayOrTypedArray=Jf;function vS(t){return!Jf(t[0])}Xt.isArray1D=vS;Xt.ensureArray=function(t,e){return Nh(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 Hh(t){return t.constructor===ArrayBuffer}Xt.isArrayBuffer=Hh;Xt.decodeTypedArraySpec=function(t){var e=[],r=dS(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;Hh(o)||(o=sS(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 fS(t)&&t.hasOwnProperty("dtype")&&typeof t.dtype=="string"&&t.hasOwnProperty("bdata")&&(typeof t.bdata=="string"||Hh(t.bdata))&&(t.shape===void 0||t.hasOwnProperty("shape")&&(typeof t.shape=="string"||typeof t.shape=="number"))};function dS(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),Nh(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 g_(t,Math.max,0)};Xt.minRowLength=function(t){return g_(t,Math.min,1/0)};function g_(t,e,r){if(Jf(t))if(Jf(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 b_=dt,Oh=Xt.isArrayOrTypedArray,jh=function(e,r){if(b_(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"?yS(e,r,a):{set:__(e,a,r),get:x_(e,a),astr:r,parts:a,obj:e}};function x_(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]=x_(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!Oh(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 hS=/(^|\.)args\[/;function Dd(t,e){return t===void 0||t===null&&!e.match(hS)}function __(t,e,r){return function(a){var i=t,n="",o=Dd(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Oh(i))throw"array index but container is not an array";if(l===-1){if(o=!mS(i,e.slice(s+1),a,r),o)break;return}if(!w_(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=pS(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 pS(t,e){var r=e;return b_(e)?r="["+e+"]":t&&(r="."+e),t+r}function mS(t,e,r,a){var i=Oh(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:Dd(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=Dd(o,l)),s&&(n=!1),w_(t,c,f,s)&&__(t[c],e,a.replace("-1",c))(o);return n}function w_(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function yS(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var Rn=jh,gS=/^\w*$/,bS=0,Dm=1,Ss=2,$m=3,Ui=4,xS=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=Rn(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=gS.test(i),u={set:function(v,h){var d=h===null?Ui:bS;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|$m,p=o.length,f[v]=p}else h!==(c?o[p][i]:Rn(o[p],i).get())&&(d=d|Ss);var m=o[p]=o[p]||{};return m[a]=v,c?m[i]=h:Rn(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]:Rn(o[h],i).get()}},rename:function(v,h){var d=f[v];return d===void 0||(s[d]=s[d]|Dm,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]|$m;for(n=h;n<o.length;n++)f[o[n][a]]--;o.splice(h,1),delete f[v]}else Rn(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]&Dm&&(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:Rn(o[h],i).get())):d[v]=null;return d}};return u},_S=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,wS=/^[^\.\[\]]+$/,TS=function(t,e){for(;e;){var r=t.match(_S);if(r)t=r[1];else if(t.match(wS))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},kS=dt,Bh=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 kS(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},Pm=Xt.isArrayOrTypedArray,el=_n,AS=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(Pm(i)&&Pm(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 MS(t,e){var r=t%e;return r<0?r+e:r}function SS(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var ss={mod:MS,modHalf:SS},T_={},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},zc={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},k_=zc,A_=vr,Gh=A_({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});Gh.family.dflt=k_.HOVERFONT;Gh.size.dflt=k_.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:Gh,grouptitlefont:A_({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={},Em=_n,tl=Array.isArray;function LS(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=LS(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&&(Em(f)||(c=tl(f)))?(c?(c=!1,u=s&&tl(s)?s:[]):u=s&&Em(s)?s:{},i[l]=cs([u,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var CS=vr,Ls=fs.hoverlabel,Cs=Nt.extendFlat,Ic={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:CS({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"}},DS=vr,$S=Ic,la={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:DS({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:$S.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(" ")}},PS=oa,Fc={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)"]]},M_=Fc.RdBu;function ES(t,e){if(e||(e=M_),!t)return e;function r(){try{t=Fc[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),S_(t)?t:e}function S_(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||!PS(a[1]).isValid())return!1;e=+a[0]}return!0}function RS(t){return Fc[t]!==void 0?!0:S_(t)}var Ho={scales:Fc,defaultScale:M_,get:ES,isValid:RS},L_={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 xa=oa,zS=dt,IS=Xt.isTypedArray,lr=L_.exports={},Nc=xr;lr.defaults=Nc.defaults;var FS=lr.defaultLine=Nc.defaultLine;lr.lightLine=Nc.lightLine;var $d=lr.background=Nc.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(xa(t))};lr.opacity=function(t){return t?xa(t).getAlpha():0};lr.addOpacity=function(t,e){var r=xa(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};lr.combine=function(t,e){var r=xa(t).toRgb();if(r.a===1)return xa(t).toRgbString();var a=xa(e||$d).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 xa(n).toRgbString()};lr.contrast=function(t,e,r){var a=xa(t);a.getAlpha()!==1&&(a=xa(lr.combine(t,$d)));var i=a.isDark()?e?a.lighten(e):$d:r?a.darken(r):FS;return i.toString()};lr.stroke=function(t,e){var r=xa(e);t.style({stroke:lr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};lr.fill=function(t,e){var r=xa(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]=Su(n[a]);else t[i]=Su(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]=Su(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"&&!IS(n)&&lr.clean(n)}};function Su(t){if(zS(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=L_.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=oa,a=la,i=Ho,n=ot,o=us.DESELECTDIM,l=jh,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(F,$,A){var M,C={set:function(P){M=P}};return A===void 0&&(A=$.dflt),t.valObjectMeta[$.valType].coerceFunction(F,C,A,$),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,E,R,N,H;if(m=Array.isArray(m)?m:[],w)for(D=0;D<S;D++)for(x[D]=[],E=c(d[D])?d[D]:[],T?N=g.length:_?N=g[D].length:N=E.length,L=0;L<N;L++)T?R=g[L]:_?R=g[D][L]:R=g,H=b(E[L],R,(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})(T_);var C_={},D_={exports:{}},$_={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(" ")}},P_={};function E_(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),E_(a,e[r]))}}E_($_,P_);var jo={configAttributes:$_,dfltConfig:P_},Lu=ft,NS=dt,rl=[],R_=function(t,e){if(rl.indexOf(t)!==-1)return;rl.push(t);var r=1e3;NS(e)?r=e:e==="long"&&(r=3e3);var a=Lu.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),Lu.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Lu.select(this);l.append("button").classed("notifier-close",!0).html("&times;").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,Uh=R_,Vh=D_.exports={};Vh.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]);Uh(r.join("<br>"),"long")}};Vh.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]);Uh(r.join("<br>"),"stick")}};Vh.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]);Uh(r.join("<br>"),"stick")}};var Bo=D_.exports,Je={},Xh=function(){},z_=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},Hc={};(function(t){var e=l_;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]]]}})(Hc);var HS=ft,OS=Bo,jS=Hc,BS=l_;function GS(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 US(t){var e=HS.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function I_(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function VS(t,e){F_("global",t,e)}function F_(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):OS.warn("addStyleRule failed")}function XS(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&I_(r)}function YS(t){var e=H_(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=N_(a);if(i){var n=jS.convertCssMatrix(i);r=BS.multiply(r,r,n)}}),r}function N_(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 H_(t){for(var e=[];WS(t);)e.push(t),t=t.parentNode;return e}function WS(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function qS(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var Oc={getGraphDiv:GS,isPlotDiv:US,removeElement:I_,addStyleRule:VS,addRelatedStyleRule:F_,deleteRelatedStyleRule:XS,getFullTransformMatrix:YS,getElementTransformMatrix:N_,getElementAndAncestors:H_,equalDomRects:qS},jc={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(" ")}}},O_=Nt.extendFlat,ZS=_n,j_={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(" ")},B_={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(" ")},KS=j_.flags.slice().concat(["fullReplot"]),QS=B_.flags.slice().concat("layoutReplot"),za={traces:j_,layout:B_,traceFlags:function(){return Rm(KS)},layoutFlags:function(){return Rm(QS)},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:G_};function Rm(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function G_(t,e,r){var a=O_({},t);for(var i in a){var n=a[i];ZS(n)&&(a[i]=U_(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function U_(t,e,r,a){if(t.valType){var i=O_({},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]=U_(t.items[n],e)}return i}else return G_(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={},V_={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"},X_=V_,Y_=X_.FORMAT_LINK,W_=X_.DATE_FORMAT_LINK;function q_(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}".`,Y_,"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}".`,W_,"for details on the date formatting syntax."].join(" ")}function JS(){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`,Y_,"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`,W_,"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 Yh(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=Yh(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`.",q_({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=Yh(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`.",q_(),"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=Yh(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`.",JS(),a].join(" ")};return i};function Mi(t,e){return e?e.d2l(t):t}function Z_(t,e){return e?e.l2d(t):t}function eL(t){return t.x0}function tL(t){return t.x1}function rL(t){return t.y0}function aL(t){return t.y1}function Bc(t,e){return Mi(t.x1,e)-Mi(t.x0,e)}function Gc(t,e,r){return Mi(t.y1,r)-Mi(t.y0,r)}function iL(t,e){return Math.abs(Bc(t,e))}function nL(t,e,r){return Math.abs(Gc(t,e,r))}function oL(t,e,r){return t.type!=="line"?void 0:Math.sqrt(Math.pow(Bc(t,e),2)+Math.pow(Gc(t,e,r),2))}function lL(t,e){return Z_((Mi(t.x1,e)+Mi(t.x0,e))/2,e)}function sL(t,e,r){return Z_((Mi(t.y1,r)+Mi(t.y0,r))/2,r)}function fL(t,e,r){return t.type!=="line"?void 0:Gc(t,e,r)/Bc(t,e)}var Wh={x0:eL,x1:tL,y0:rL,y1:aL,slope:fL,dx:Bc,dy:Gc,width:iL,height:nL,length:oL,xcenter:lL,ycenter:sL},cL=za.overrideAll,Vi=la,zm=vr,uL=Hr.dash,oi=Nt.extendFlat,vL=mr.shapeTexttemplateAttrs,dL=Wh,hL=cL({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:zm({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({},uL,{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:vL({newshape:!0},{keys:Object.keys(dL)}),font:zm({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"),pL=Hr.dash,mL=Nt.extendFlat,yL={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:mL({},pL,{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"}},qh=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}},Pd=vr,gL=jc,$f=xr,Im=hL,Fm=yL,bL=qh,Nm=Nt.extendFlat,Uc=Pd({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});Uc.family.dflt='"Open Sans", verdana, arial, sans-serif';Uc.size.dflt=12;Uc.color.dflt=$f.defaultLine;var vs={font:Uc,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:Pd({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:Nm(bL({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:$f.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:$f.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:$f.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:Im.newshape,activeshape:Im.activeshape,newselection:Fm.newselection,activeselection:Fm.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:Nm({},gL.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:Pd({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=Xh,a=z_,i=_n,n=Oc.addStyleRule,o=Nt,l=la,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 E=x.basePlotModule,R=E.name;if(R==="mapbox"){var N=E.constants.styleRules;for(var H in N)n(".js-plotly-plot .plotly .mapboxgl-"+H,N[H])}(R==="geo"||R==="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,E=t.localeRegistry,R=E[_];if(R||(E[_]=R={}),k!==_){var N=E[k];N||(E[k]=N={}),D&&N.dictionary===R.dictionary&&(N.dictionary=T),L&&N.format===R.format&&(N.format=S)}D&&(R.dictionary=T),L&&(R.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($){return $&&v.componentsRegistry.calendars&&typeof $=="string"&&$!=="gregorian"}t.dateTick0=function($,A){var M=b($,!!A);if(A<2)return M;var C=t.dateTime2ms(M,$);return C+=l*(A-1),t.ms2DateTime(C,0,$)};function b($,A){return y($)?A?v.getComponentMethod("calendars","CANONICAL_SUNDAY")[$]:v.getComponentMethod("calendars","CANONICAL_TICK")[$]:A?"2000-01-02":"2000-01-01"}t.dfltRange=function($){return y($)?v.getComponentMethod("calendars","DFLTRANGE")[$]:["2000-01-01","2001-01-01"]},t.isJSDate=function($){return typeof $=="object"&&$!==null&&typeof $.getTime=="function"};var w,g;t.dateTime2ms=function($,A){if(t.isJSDate($)){var M=$.getTimezoneOffset()*f,C=($.getUTCMinutes()-$.getMinutes())*f+($.getUTCSeconds()-$.getSeconds())*c+($.getUTCMilliseconds()-$.getMilliseconds());if(C){var P=3*f;M=M-P/2+i(C-M+P/2,P)}return $=Number($)-M,$>=w&&$<=g?$:o}if(typeof $!="string"&&typeof $!="number")return o;$=String($);var I=y(A),j=$.charAt(0);I&&(j==="G"||j==="g")&&($=$.substr(1),A="");var B=I&&A.substr(0,7)==="chinese",G=$.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(I){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($,A){return t.dateTime2ms($,A)!==o};function x($,A){return String($+Math.pow(10,A)).substr(1)}var _=90*l,k=3*s,T=5*f;t.ms2DateTime=function($,A,M){if(typeof $!="number"||!($>=w&&$<=g))return o;A||(A=0);var C=Math.floor(i($+.05,1)*10),P=Math.round($-C/10),I,j,B,G,O,W;if(y(M)){var V=Math.floor(P/l)+u,Z=Math.floor(i($,l));try{I=v.getComponentMethod("calendars","getCal")(M).fromJD(V).formatDate("yyyy-mm-dd")}catch{I=h("G%Y-%m-%d")(new Date(P))}if(I.charAt(0)==="-")for(;I.length<11;)I="-0"+I.substr(1);else for(;I.length<10;)I="0"+I;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(P),I=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(I,j,B,G,O)},t.ms2DateTimeLocal=function($){if(!($>=w+l&&$<=g-l))return o;var A=Math.floor(i($+.05,1)*10),M=new Date(Math.round($-A/10)),C=e("%Y-%m-%d")(M),P=M.getHours(),I=M.getMinutes(),j=M.getSeconds(),B=M.getUTCMilliseconds()*10+A;return S(C,P,I,j,B)};function S($,A,M,C,P){if((A||M||C||P)&&($+=" "+x(A,2)+":"+x(M,2),(C||P)&&($+=":"+x(C,2),P))){for(var I=4;P%10===0;)I-=1,P/=10;$+="."+x(P,I)}return $}t.cleanDate=function($,A,M){if($===o)return A;if(t.isJSDate($)||typeof $=="number"&&isFinite($)){if(y(M))return a.error("JS Dates and milliseconds are incompatible with world calendars",$),A;if($=t.ms2DateTimeLocal(+$),!$&&A!==void 0)return A}else if(!t.isDateTime($,M))return a.error("unrecognized date",$),A;return $};var D=/%\d?f/g,L=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function R($,A,M,C){$=$.replace(D,function(I){var j=Math.min(+I.charAt(1)||6,6),B=(A/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return B});var P=new Date(Math.floor(A+.05));if($=$.replace(L,function(){return E[M("%q")(P)]}),y(C))try{$=v.getComponentMethod("calendars","worldCalFmt")($,A,C)}catch{return"Invalid"}return M($)(P)}var N=[59,59.9,59.99,59.999,59.9999];function H($,A){var M=i($+.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 P=Math.min(i($/c,60),N[A]),I=(100+P).toFixed(A).substr(1);A>0&&(I=I.replace(/0+$/,"").replace(/[\.]$/,"")),C+=":"+I}return C}t.formatDate=function($,A,M,C,P,I){if(P=y(P)&&P,!A)if(M==="y")A=I.year;else if(M==="m")A=I.month;else if(M==="d")A=I.dayMonth+`
2
+ `+I.year;else return H($,M)+`
3
+ `+R(I.dayMonthYear,$,C,P);return R(A,$,C,P)};var F=3*l;t.incrementMonth=function($,A,M){M=y(M)&&M;var C=i($,l);if($=Math.round($-C),M)try{var P=Math.round($/l)+u,I=v.getComponentMethod("calendars","getCal")(M),j=I.fromJD(P);return A%12?I.add(j,A,"m"):I.add(j,A/12,"y"),(j.toJD()-u)*l+C}catch{a.error("invalid ms "+$+" in calendar "+M)}var B=new Date($+F);return B.setUTCMonth(B.getUTCMonth()+A)+C-F},t.findExactDates=function($,A){for(var M=0,C=0,P=0,I=0,j,B,G=y(A)&&v.getComponentMethod("calendars","getCal")(A),O=0;O<$.length;O++){if(B=$[O],!r(B)){I++;continue}if(!(B%l))if(G)try{j=G.fromJD(B/l+u),j.day()===1?j.month()===1?M++:C++:P++}catch{}else j=new Date(B),j.getUTCDate()===1?j.getUTCMonth()===0?M++:C++:P++}C+=M,P+=C;var W=$.length-I;return{exactYears:M/W,exactMonths:C/W,exactDays:P/W}}})(C_);var Zh={},K_=function(e){return e};(function(t){var e=dt,r=Bo,a=K_,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}})(Zh);var Kh=function(e){return Object.keys(e).sort()},Q_={};(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)]}})(Q_);var J_=ss,Cu=J_.mod,xL=J_.modHalf,Gl=Math.PI,bi=2*Gl;function _L(t){return t/180*Gl}function wL(t){return t/Gl*180}function Qh(t){return Math.abs(t[1]-t[0])>bi-1e-14}function ew(t,e){return xL(e-t,bi)}function TL(t,e){return Math.abs(ew(t,e))}function tw(t,e){if(Qh(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=Cu(r,bi),a=Cu(a,bi),r>a&&(a+=bi);var i=Cu(t,bi),n=i+bi;return i>=r&&i<=a||n>=r&&n<=a}function kL(t,e,r,a){if(!tw(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 Jh(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Qh([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 AL(t,e,r,a,i){return Jh(null,t,e,r,a,i,0)}function ML(t,e,r,a,i){return Jh(null,t,e,r,a,i,1)}function SL(t,e,r,a,i,n){return Jh(t,e,r,a,i,n,1)}var LL={deg2rad:_L,rad2deg:wL,angleDelta:ew,angleDist:TL,isFullCircle:Qh,isAngleInsideSector:tw,isPtInsideSector:kL,pathArc:AL,pathSector:ML,pathAnnulus:SL},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={},Du=ss.mod;Tn.segmentsIntersect=rw;function rw(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(rw(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 $s,Ed,Hm;Tn.getTextLocation=function(e,r,a,i){if((e!==Ed||i!==Hm)&&($s={},Ed=e,Hm=i),$s[a])return $s[a];var n=e.getPointAtLength(Du(a-i/2,r)),o=e.getPointAtLength(Du(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(Du(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 $s[a]=u,u};Tn.clearLocationCache=function(){Ed=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 Vc={};(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)}})(Vc);var CL=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},DL=dt,$L=qM,PL=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=EL(),typeof r!="string")return!0;var a=$L({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(DL(f)&&(f=+f),f>=13)return!0}}}return a};function EL(){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 RL=ft,zL=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]=RL.select(this)}),i},IL=Je,FL=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=IL.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},NL=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},HL=function(e){for(var r=BL(e)?jL:OL,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function OL(t){return t.visible===!0}function jL(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 GL=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},UL=dt,VL=Yt.BADNUM,XL=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,YL=function(e){return typeof e=="string"&&(e=e.replace(XL,"")),UL(e)?Number(e):VL},Ll=ft,WL=Bl.utcFormat,qL=s_.format,aw=dt,iw=Yt,nw=iw.FP_SAFE,ZL=-nw,Om=iw.BADNUM,J=m_.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 jm={};J.warnBadFormat=function(t){var e=String(t);jm[e]||(jm[e]=1,J.warn('encountered bad format: "'+e+'"'))};J.noFormat=function(t){return String(t)};J.numberFormat=function(t){var e;try{e=qL(J.adjustFormat(t))}catch{return J.warnBadFormat(t),J.noFormat}return e};J.nestedProperty=jh;J.keyedContainer=xS;J.relativeAttr=TS;J.isPlainObject=_n;J.toLogRange=Bh;J.relinkPrivateKeys=AS;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 ow=ss;J.mod=ow.mod;J.modHalf=ow.modHalf;var $i=T_;J.valObjectMeta=$i.valObjectMeta;J.coerce=$i.coerce;J.coerce2=$i.coerce2;J.coerceFont=$i.coerceFont;J.coercePattern=$i.coercePattern;J.coerceHoverinfo=$i.coerceHoverinfo;J.coerceSelectionMarkerOpacity=$i.coerceSelectionMarkerOpacity;J.validate=$i.validate;var Gr=C_;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=Zh;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=Kh;var Pi=Q_;J.aggNums=Pi.aggNums;J.len=Pi.len;J.mean=Pi.mean;J.median=Pi.median;J.midRange=Pi.midRange;J.variance=Pi.variance;J.stdev=Pi.stdev;J.interp=Pi.interp;var Ta=Hc;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 Ia=LL;J.deg2rad=Ia.deg2rad;J.rad2deg=Ia.rad2deg;J.angleDelta=Ia.angleDelta;J.angleDist=Ia.angleDist;J.isFullCircle=Ia.isFullCircle;J.isAngleInsideSector=Ia.isAngleInsideSector;J.isPtInsideSector=Ia.isPtInsideSector;J.pathArc=Ia.pathArc;J.pathSector=Ia.pathSector;J.pathAnnulus=Ia.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 Xc=Nt;J.extendFlat=Xc.extendFlat;J.extendDeep=Xc.extendDeep;J.extendDeepAll=Xc.extendDeepAll;J.extendDeepNoArrays=Xc.extendDeepNoArrays;var ep=Bo;J.log=ep.log;J.warn=ep.warn;J.error=ep.error;var KL=Oo;J.counterRegex=KL.counter;var tp=Vc;J.throttle=tp.throttle;J.throttleDone=tp.done;J.clearThrottle=tp.clear;var Fa=Oc;J.getGraphDiv=Fa.getGraphDiv;J.isPlotDiv=Fa.isPlotDiv;J.removeElement=Fa.removeElement;J.addStyleRule=Fa.addStyleRule;J.addRelatedStyleRule=Fa.addRelatedStyleRule;J.deleteRelatedStyleRule=Fa.deleteRelatedStyleRule;J.getFullTransformMatrix=Fa.getFullTransformMatrix;J.getElementTransformMatrix=Fa.getElementTransformMatrix;J.getElementAndAncestors=Fa.getElementAndAncestors;J.equalDomRects=Fa.equalDomRects;J.clearResponsive=CL;J.preserveDrawingBuffer=PL;J.makeTraceGroups=zL;J._=FL;J.notifier=R_;J.filterUnique=NL;J.filterVisible=HL;J.pushUnique=z_;J.increment=GL;J.cleanNumber=YL;J.ensureNumber=function(e){return aw(e)?(e=Number(e),e>nw||e<ZL?Om:e):Om};J.isIndex=function(t,e){return e!==void 0&&t>=e?!1:aw(t)&&t>=0&&t%1===0};J.noop=Xh;J.identity=K_;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 lw(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=lw(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=lw(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 sw(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]=sw(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=sw;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 QL=/Version\/[\d\.]+.*Safari/;J.isSafari=function(){return QL.test(window.navigator.userAgent)};var JL=/iPad|iPhone|iPod/;J.isIOS=function(){return JL.test(window.navigator.userAgent)};var eC=/Firefox\/(\d+)\.\d+/;J.getFirefoxVersion=function(){var t=eC.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 tC=/^([^\[\.]+)\.(.+)?/,rC=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function Ps(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(tC)){if(i=t[r],a=e[1],Ps(a))continue;delete t[r],t[a]=J.extendDeepNoArrays(t[a]||{},J.objectFromPath(r,J.expandObjectPaths(i))[a])}else if(e=r.match(rC)){if(i=t[r],a=e[1],Ps(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(Ps(a))continue;t[a][n]=J.expandObjectPaths(i)}}else{if(Ps(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 fw=/^\w*$/;J.templateString=function(t,e){var r={};return t.replace(J.TEMPLATE_STRING_REGEX,function(a,i){var n;return fw.test(i)?n=e[i]:(r[i]=r[i]||J.nestedProperty(e,i).get,n=r[i]()),J.isValidTextValue(n)?n:""})};var aC={max:10,count:0,name:"hovertemplate"};J.hovertemplateString=function(){return rp.apply(aC,arguments)};var iC={max:10,count:0,name:"texttemplate"};J.texttemplateString=function(){return rp.apply(iC,arguments)};var nC=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function oC(t){var e=t.match(nC);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}var lC={max:10,count:0,name:"texttemplate",parseMultDiv:!0};J.texttemplateStringForShapes=function(){return rp.apply(lC,arguments)};var Bm=/^[:|\|]/;function rp(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=oC(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(fw.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(Bm,""))(b)),s[0]==="|"){x=r?r.timeFormat:WL;var _=J.dateTime2ms(b);b=J.formatDate(_,s.replace(Bm,""),!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 Es=48,Gm=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>=Es&&o<=Gm,f=l>=Es&&l<=Gm;if(s&&(a=10*a+o-Es),f&&(i=10*i+l-Es),!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 Um=J.getFirefoxVersion(),sC=Um!==null&&Um<86;J.getPositionFromD3Event=function(){return sC?[Ll.event.layerX,Ll.event.layerY]:[Ll.event.offsetX,Ll.event.offsetY]};var me=m_.exports,fC=me,Vm={"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 Xm in Vm){var cC=Xm.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");fC.addStyleRule(cC,Vm[Xm])}var zt={},ap={},$u=Ih.EventEmitter,uC={init:function(t){if(t._ev instanceof $u)return t;var e=new $u,r=new $u;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=uC,Ym=me,vC=jo.dfltConfig;function dC(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)?Ym.extendDeep([],a):Ym.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>vC.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=dC(t,r),e.apply(null,r)};var hC=Ja,Vo={},cw={_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=la,i=vs,n=cw,o=jc,l=jo.configAttributes,s=za,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 F={};e.allTypes.forEach(function(A){F[A]=_(A)});var $={};return Object.keys(e.transformsRegistry).forEach(function(A){$[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:F,layout:k(),transforms:$,frames:S(),animation:D(o),config:D(l)}},t.crawl=function(F,$,A,M){var C=A||0;M=M||"",Object.keys(F).forEach(function(P){var I=F[P];if(b.indexOf(P)===-1){var j=(M?M+".":"")+P;$(I,P,F,C,j),!t.isValObject(I)&&c(I)&&P!=="impliedEdits"&&t.crawl(I,$,C+1,j)}})},t.isValObject=function(F){return F&&F.valType!==void 0},t.findArrayAttributes=function(F){var $=[],A=[],M=[],C,P;function I(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)&&$.push(P+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=F,P="",t.crawl(a,I),F._module&&F._module.attributes&&t.crawl(F._module.attributes,I);var B=F.transforms;if(B)for(var G=0;G<B.length;G++){var O=B[G],W=O._module;W&&(P="transforms["+G+"].",C=O,t.crawl(W.attributes,I))}return $},t.getTraceValObject=function(F,$){var A=$[0],M=1,C,P;if(A==="transforms"){if($.length===1)return a.transforms;var I=F.transforms;if(!Array.isArray(I)||!I.length)return!1;var j=$[1];if(!x(j)||j>=I.length)return!1;C=(e.transformsRegistry[I[j].type]||{}).attributes,P=C&&C[$[2]],M=3}else{var B=F._module;if(B||(B=(e.modules[F.type||a.type.dflt]||{})._module),!B)return!1;if(C=B.attributes,P=C&&C[A],!P){var G=B.basePlotModule;G&&G.attributes&&(P=G.attributes[A])}P||(P=a[A])}return g(P,$,M)},t.getLayoutValObject=function(F,$){var A=w(F,$[0]);return g(A,$,1)};function w(F,$){var A,M,C,P,I=F._basePlotModules;if(I){var j;for(A=0;A<I.length;A++){if(C=I[A],C.attrRegex&&C.attrRegex.test($)){if(C.layoutAttrOverrides)return C.layoutAttrOverrides;!j&&C.layoutAttributes&&(j=C.layoutAttributes)}var B=C.baseLayoutAttrOverrides;if(B&&$ in B)return B[$]}if(j)return j}var G=F._modules;if(G){for(A=0;A<G.length;A++)if(P=G[A].layoutAttributes,P&&$ in P)return P[$]}for(M in e.componentsRegistry){if(C=e.componentsRegistry[M],C.name==="colorscale"&&$.indexOf("coloraxis")===0)return C.layoutAttributes[$];if(!C.schema&&$===C.name)return C.layoutAttributes}return $ in i?i[$]:!1}function g(F,$,A){if(!F)return!1;if(F._isLinkedToArray){if(x($[A]))A++;else if(A<$.length)return!1}for(;A<$.length;A++){var M=F[$[A]];if(c(M))F=M;else break;if(A===$.length-1)break;if(F._isLinkedToArray){if(A++,!x($[A]))return!1}else if(F.valType==="info_array"){A++;var C=$[A];if(!x(C))return!1;var P=F.items;if(Array.isArray(P)){if(C>=P.length)return!1;if(F.dimensions===2){if(A++,$.length===A)return F;var I=$[A];if(!x(I))return!1;F=P[C][I]}else F=P[C]}else F=P}}return F}function x(F){return F===Math.round(F)&&F>=0}function _(F){var $,A;$=e.modules[F]._module,A=$.basePlotModule;var M={};M.type=null;var C=f({},a),P=f({},$.attributes);t.crawl(P,function(B,G,O,W,V){v(C,V).set(void 0),B===void 0&&v(P,V).set(void 0)}),f(M,C),e.traceIs(F,"noOpacity")&&delete M.opacity,e.traceIs(F,"showLegend")||(delete M.showlegend,delete M.legendgroup),e.traceIs(F,"noHover")&&(delete M.hoverinfo,delete M.hoverlabel),$.selectPoints||delete M.selectedpoints,f(M,P),A.attributes&&f(M,A.attributes),M.type=F;var I={meta:$.meta||{},categories:$.categories||{},animatable:!!$.animatable,type:F,attributes:D(M)};if($.layoutAttributes){var j={};f(j,$.layoutAttributes),I.layoutAttributes=D(j)}return $.animatable||t.crawl(I,function(B){t.isValObject(B)&&"anim"in B&&delete B.anim}),I}function k(){var F={},$,A;f(F,i);for($ in e.subplotsRegistry)if(A=e.subplotsRegistry[$],!!A.layoutAttributes)if(Array.isArray(A.attr))for(var M=0;M<A.attr.length;M++)N(F,A,A.attr[M]);else{var C=A.attr==="subplot"?A.name:A.attr;N(F,A,C)}for($ in e.componentsRegistry){A=e.componentsRegistry[$];var P=A.schema;if(P&&(P.subplots||P.layout)){var I=P.subplots;if(I&&I.xaxis&&!I.yaxis)for(var j in I.xaxis)delete F.yaxis[j];delete F.xaxis.shift,delete F.xaxis.autoshift}else A.name==="colorscale"?f(F,A.layoutAttributes):A.layoutAttributes&&H(F,A.layoutAttributes,A.name)}return{layoutAttributes:D(F)}}function T(F){var $=e.transformsRegistry[F],A=f({},$.attributes);return Object.keys(e.componentsRegistry).forEach(function(M){var C=e.componentsRegistry[M];C.schema&&C.schema.transforms&&C.schema.transforms[F]&&Object.keys(C.schema.transforms[F]).forEach(function(P){H(A,C.schema.transforms[F][P],P)})}),{attributes:D(A)}}function S(){var F={frames:f({},n)};return D(F),F.frames}function D(F){return L(F),E(F),R(F),F}function L(F){function $(M){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+M+"`.",editType:"none"}}function A(M,C,P){t.isValObject(M)?(M.arrayOk===!0||M.valType==="data_array")&&(P[C+"src"]=$(C)):c(M)&&(M.role="object")}t.crawl(F,A)}function E(F){function $(A,M,C){if(A){var P=A[p];P&&(delete A[p],C[M]={items:{}},C[M].items[P]=A,C[M].role="object")}}t.crawl(F,$)}function R(F){function $(A){for(var M in A)if(c(A[M]))$(A[M]);else if(Array.isArray(A[M]))for(var C=0;C<A[M].length;C++)$(A[M][C]);else A[M]instanceof RegExp&&(A[M]=A[M].toString())}$(F)}function N(F,$,A){var M=v(F,A),C=f({},$.layoutAttributes);C[d]=!0,M.set(C)}function H(F,$,A){var M=v(F,A);M.set(f(M.get()||{},$))}})(Vo);var uw={exports:{}},Lt={},_o=me,pC=la,wi="templateitemname",Rd={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(" ")}};Rd[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=Rd.name,e[wi]=Rd[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,{},pC,"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[vw(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(!Wm(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(Wm(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 Wm(t){return t&&typeof t=="string"}function vw(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=vw;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 mC(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function yC(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}var An={clearOutlineControllers:mC,clearOutline:yC},ip={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={},$l=Je,gC=Lr.SUBPLOT_PATTERN;hs.getSubplotCalcData=function(t,e,r){var a=$l.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=$l.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(!$l.subplotsRegistry[r])return[];var i=$l.subplotsRegistry[r].attr,n=[],o,l,s;if(r==="gl2d"){var f=a.match(gC);l="x"+f[1],s="y"+f[2]}for(var c=0;c<e.length;c++)o=e[c],r==="gl2d"&&$l.traceIs(o,"gl2d")?o[i[0]]===l&&o[i[1]]===s&&n.push(o):o[i]===a&&n.push(o);return n};var Pu={},qm;function bC(){return qm||(qm=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)}})}}(Pu)),Pu}var dw=ft,xC=Bl.timeFormatLocale,_C=s_.formatLocale,Pl=dt,wC=o_,bt=Je,hw=Vo,TC=Lt,Xe=me,pw=ot,Zm=Yt.BADNUM,Ir=Wt,kC=An.clearOutline,AC=ip,np=jc,MC=cw,SC=hs.getModuleCalcData,zd=Xe.relinkPrivateKeys,zn=Xe._,Ie=uw.exports={};Xe.extendFlat(Ie,bt);Ie.attributes=la;Ie.attributes.type.values=Ie.allTypes;Ie.fontAttrs=vr;Ie.layoutAttributes=vs;Ie.fontWeight="normal";var Yc=Ie.transformsRegistry,Wc=bC();Ie.executeAPICommand=Wc.executeAPICommand;Ie.computeAPICommandBindings=Wc.computeAPICommandBindings;Ie.manageCommandObserver=Wc.manageCommandObserver;Ie.hasSimpleAPICommandBindings=Wc.hasSimpleAPICommandBindings;Ie.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(Ie.previousPromises(t)))},300)})};Ie.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};Ie.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};Ie.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:pw.defaultLine,"pointer-events":"all"}).each(function(){var f=dw.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&&LC(t,n),o.text(n.text()&&l.text()?" - ":"")}};function LC(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(){Ie.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})}}Ie.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=dw.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=Ie.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var CC=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],DC=["year","month","dayMonth","dayMonthYear"];Ie.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||Ie.createTransitionData(t),i._dfltTitle={plot:zn(t,"Click to enter Plot title"),x:zn(t,"Click to enter X axis title"),y:zn(t,"Click to enter Y axis title"),colorbar:zn(t,"Click to enter Colorscale title"),annotation:zn(t,"new text")},i._traceWord=zn(t,"trace");var v=Km(t,CC);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var h=a.width,d=a.height;Ie.supplyLayoutGlobalDefaults(n,i,v),n.width||(i.width=h),n.height||(i.height=d),Ie.sanitizeMargins(i)}else{Ie.supplyLayoutGlobalDefaults(n,i,v);var p=!n.width||!n.height,m=i.autosize,y=c.autosizable,b=p&&(m||y);b?Ie.plotAutoSize(t,n,i):p&&Ie.sanitizeMargins(i),!m&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=EC(v,i.separators),i._extraFormat=Km(t,DC),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var w=i._subplots=PC(),g=i._splomAxes={x:{},y:{}},x=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=$C(o,s),i._globalTransforms=(t._context||{}).globalTransforms,Ie.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=Ie._hasPlotType.bind(i),o.length===l.length)for(u=0;u<l.length;u++)zd(l[u],o[u]);Ie.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,Ie.linkSubplots(l,i,o,a),Ie.cleanPlot(l,i,o,a);var E=!!(a._has&&a._has("gl2d")),R=!!(i._has&&i._has("gl2d")),N=!!(a._has&&a._has("cartesian")),H=!!(i._has&&i._has("cartesian")),F=N||E,$=H||R;F&&!$?a._bgLayer.remove():$&&!F&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&kC({_fullLayout:a}),RC(l,i),zd(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];yw(i),bt.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&Ie.supplyDefaultsUpdateCalc(f,l)};Ie.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 $C(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 PC(){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 Km(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 EC(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=_C(t).format(Xe.adjustFormat(r))}catch{return Xe.warnBadFormat(r),Xe.noFormat}return r},timeFormat:xC(t).utcFormat}}function RC(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)}Ie.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=[])};Ie._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};Ie.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()}};Ie.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=Ir.getFromId(f,u,"x"),d=Ir.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=Ir.list(f,null,!0),b;for(i=0;i<y.length;i++){b=y[i];var w=null;b.overlaying&&(w=Ir.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:Ir.getFromId(f,b.anchor)}for(i=0;i<y.length;i++)if(b=y[i],b._counterAxes.sort(Ir.idSort),b._subplotsWith.sort(Xe.subplotSort),b._mainSubplot=zC(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 _=Ir.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 zC(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=Ir.getFromId(r,c);if(l&&v.overlaying===l){n=u;break}}}return n||o}Ie.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=[],hw.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)}};Ie.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=TC.traceTemplater(p);for(f=0;f<t.length;f++){if(u=t[f],c=m.newTrace(u),c.uid=a._traceUids[f],Ie.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=IC(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,Ie.supplyTraceDefaults(g,x,l,a,f),zd(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}};Ie.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return Xe.coerce(t||{},r,np,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]=Ie.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=Ie.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=Ie.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=Ie.supplyAnimationTransitionDefaults(t.transition||{});return r};Ie.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t||{},e,np.frame,a,i)}return r("duration"),r("redraw"),e};Ie.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t||{},e,np.transition,a,i)}return r("duration"),r("easing"),e};Ie.supplyFrameDefaults=function(t){var e={};function r(a,i){return Xe.coerce(t,e,MC,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};Ie.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||pw.defaults,o=n[r%n.length],l;function s(w,g){return Xe.coerce(t,e,Ie.attributes,w,g)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=Ie.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:Ie.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))}Ie.supplyTransformDefaults(t,e,a)}return e};function mw(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||Yc[a.type];if(i&&i.makesData)return!0}return!1}Ie.hasMakesDataTransform=mw;Ie.supplyTransformDefaults=function(t,e,r){if(e._length||mw(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=Yc[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 IC(t,e,r,a){for(var i=t.transforms,n=[t],o=0;o<i.length;o++){var l=i[o],s=Yc[l.type];s&&s.transform&&(n=s.transform(n,{transform:l,fullTrace:t,fullData:e,layout:r,fullLayout:a,transformIndex:o}))}return n}Ie.supplyLayoutGlobalDefaults=function(t,e,r){function a(u,v){return Xe.coerce(t,e,Ie.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&&Ie.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,AC,"scattermode")};function Rs(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}Ie.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=Rs(f.width)||Rs(f.maxWidth)||a.width,l=Rs(f.height)||Rs(f.maxHeight)||a.height,Pl(n)&&n>0){var c=1-2*n;o=Math.round(c*o),l=Math.round(c*l)}}var u=Ie.layoutAttributes.width.min,v=Ie.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}),Ie.sanitizeMargins(a)};Ie.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)};Ie.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()};Ie.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)};Ie.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))}};Ie.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};Ie.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function yw(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 gw=2,bw=2;Ie.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,gw,l),c=Xe.constrain(n-o.t-o.b,bw,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 Ie.doAutoMargin(t)}};function FC(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=Ir.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}Ie.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),yw(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"&&Pl(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||{},E=D.val,R=D.size,N=L.val,H=L.size,F=r-o.r-o.l,$=a-o.t-o.b;for(var A in v){if(Pl(R)&&v[A].r){var M=v[A].r.val,C=v[A].r.size;if(M>E){var P=(R*M+(C-F)*E)/(M-E),I=(C*(1-E)+(R-F)*(1-M))/(M-E);P+I>s+f&&(s=P,f=I)}}if(Pl(H)&&v[A].t){var j=v[A].t.val,B=v[A].t.size;if(j>N){var G=(H*j+(B-$)*N)/(j-N),O=(B*(1-N)+(H-$)*(1-j))/(j-N);G+O>u+c&&(u=G,c=O)}}}}}var W=Xe.constrain(r-n.l-n.r,gw,d),V=Xe.constrain(a-n.t-n.b,bw,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&&(Ie.didMarginChange(l,i)||FC(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.")}NC(t)};function NC(t){var e=Ir.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var Qm=["l","r","t","b","p","w","h"];Ie.didMarginChange=function(t,e){for(var r=0;r<Qm.length;r++){var a=Qm[r],i=t[a],n=e[a];if(!Pl(i)||Math.abs(n-i)>1)return!0}return!1};Ie.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&Ie.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)?wC.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)};Ie.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()};Ie.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=Ie.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]=Ie.extendTrace(c.data[o],l.data[a]))}return c};Ie.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)}};Ie.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]=Ie.extendObjectWithContainers(c[o],d)}s.set(c)}}return t};Ie.dataArrayContainers=["transforms","dimensions"];Ie.layoutArrayContainers=bt.layoutArrayContainers;Ie.extendTrace=function(t,e){return Ie.extendObjectWithContainers(t,e,Ie.dataArrayContainers)};Ie.extendLayout=function(t,e){return Ie.extendObjectWithContainers(t,e,Ie.layoutArrayContainers)};Ie.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]]=Ie.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;Ie.extendLayout(t.layout,m),delete t.calcdata,Ie.supplyDefaults(t),Ie.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,E=null,R=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"])?E=w[T._name+".range"].slice():Array.isArray((w[T._name]||{}).range)&&(E=w[T._name].range.slice()),S&&L&&(k.r2l(S[0])!==k.r2l(L[0])||k.r2l(S[1])!==k.r2l(L[1]))&&(R={xr0:S,xr1:L}),D&&E&&(T.r2l(D[0])!==T.r2l(E[0])||T.r2l(D[1])!==T.r2l(E[1]))&&(N={yr0:D,yr1:E}),(R||N)&&s.push(Xe.extendFlat({plotinfo:_},R,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)}},xw(t,n,o)};Ie.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())},xw(t,n,o)};function xw(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=[Ie.previousPromises,s,r.prepareFn,Ie.rehover,Ie.reselect,o],c=Xe.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}Ie.doCalcdata=function(t,e){var r=Ir.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=hw.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=Yc[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:Zm,y:Zm}]),g[0].t||(g[0].t={}),g[0].trace=n,f[b]=g}}for(Jm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)p(l);for(d&&Jm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)m(l,!1);ey(t);var y=OC(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);ey(t)}bt.getComponentMethod("fx","calc")(t),bt.getComponentMethod("errorbars","calc")(t)};var HC=/(total|sum|min|max|mean|median) (ascending|descending)/;function OC(t,e){var r=[],a,i,n,o,l;function s(A,M,C){var P=M._id.charAt(0);if(A==="histogram2dcontour"){var I=M._counterAxes[0],j=Ir.getFromId(e,I),B=P==="x"||I==="x"&&j.type==="category",G=P==="y"||I==="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:(P==="y"?W:O)-1}}else return function(O,W){return P==="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(HC);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 E=g._axesDim[v._id];if(!y){var R=g._diag[E][0];R&&(v=e._fullLayout[Ir.id2name(R)])}var N=S.trace.dimensions[E].values;for(o=0;o<N.length;o++)for(D=v._categoriesMap[N[o]],l=0;l<S.trace.dimensions.length;l++)if(l!==E){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 F=s(g.type,v,L);for(o=0;o<L.length;o++)for(l=0;l<L[o].length;l++)D=F(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 $=[];for(i=0;i<b.length;i++)$.push([b[i][0],f[d](b[i][1])]);$.sort(p==="descending"?u:c),v._categoriesAggregatedValue=$,v._initialCategories=$.map(function(A){return A[0]}),r=r.concat(v.sortByInitialCategories())}}}return r}function Jm(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[Ir.id2name(l)])}function ey(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)}}Ie.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};Ie.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};Ie.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)};Ie.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};Ie.plotBasePlot=function(t,e,r,a,i){var n=bt.getModule(t),o=SC(e.calcdata,n)[0];n.plot(e,o,a,i)};Ie.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=uw.exports,_w={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,P){var I=M.text(),j=!M.attr("data-notex")&&C&&C._context.typesetMath&&typeof MathJax<"u"&&I.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":I,"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(),I);W&&M.style("pointer-events","all"),t.positionText(M),P&&P.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":I,"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",ge=xe.select("g");ge.attr({fill:de,stroke:de});var Te=ge.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 ze=+M.attr("x"),ce=+M.attr("y"),ye=V||M.node().getBoundingClientRect().height,Pe=-ye/4;if(G[0]==="y")ue.attr({transform:"rotate("+[-90,ze,ce]+")"+a(-Le/2,Pe-_e/2)});else if(G[0]==="l")ce=Pe-_e/2;else if(G[0]==="a"&&G.indexOf("atitle")!==0)ze=0,ce=Pe;else{var Re=M.attr("text-anchor");ze=ze-Le*(Re==="middle"?.5:Re==="end"?1:0),ce=ce+Pe-_e/2}xe.attr({x:ze,y:ce}),P&&P.call(M,ue),W(ue)})})):O(),M};var l=/(<|&lt;|&#60;)/g,s=/(>|&gt;|&#62;)/g;function f(M){return M.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function u(M,C,P){var I=parseInt((MathJax.version||"").split(".")[0]);if(I!==2&&I!==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 ge=O.node();return I===2?MathJax.Hub.Typeset(ge):MathJax.typeset([ge])},te=function(){var de=O.select(I===2?".MathJax_SVG":".MathJax"),ge=!de.empty()&&O.select("svg").node();if(!ge)r.log("There was an error in the tex syntax.",M),P();else{var Te=ge.getBoundingClientRect(),Le;I===2?Le=e.select("body").select("#MathJax_SVG_glyphs"):Le=de.select("defs"),P(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};I===2?MathJax.Hub.Queue(W,Z,Q,te,xe,ae):I===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 P=M.match(C),I=P&&(P[3]||P[4]);return I&&R(I)}var D=/(^|;)\s*color:/;t.plainText=function(M,C){C=C||{};for(var P=C.len!==void 0&&C.len!==-1?C.len:1/0,I=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)I.indexOf(te)!==-1&&(O.push(X),W=te);else{var xe=X.length;if(V+xe<P)O.push(X),V+=xe;else if(V<P){var ue=P-V;W&&(W!=="br"||ue<=B||xe<=B)&&O.pop(),P>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:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function R(M){return M.replace(E,function(C,P){var I;return P.charAt(0)==="#"?I=N(P.charAt(1)==="x"?parseInt(P.substr(2),16):parseInt(P.substr(1),10)):I=L[P],I||C})}t.convertEntities=R;function N(M){if(!(M>1114111)){var C=String.fromCodePoint;if(C)return C(M);var P=String.fromCharCode;return M<=65535?P(M):P((M>>10)+55232,M%1024+56320)}}function H(M,C){C=C.replace(y," ");var P=!1,I=[],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 ze=I;if(I=[{node:_e}],ze.length>1)for(var ce=1;ce<ze.length;ce++)O(ze[ce])}function O(_e){var ze=_e.type,ce={},ye;if(ze==="a"){ye="a";var Pe=_e.target,Re=_e.href,K=_e.popup;Re&&(ce={"xlink:xlink:show":Pe==="_blank"||Pe.charAt(0)!=="_"?"new":"replace",target:Pe,"xlink:xlink:href":Re},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(ze==="sup"||ze==="sub"){W(j,p),j.appendChild(ke);var re=document.createElementNS(i.svg,"tspan");W(re,p),e.select(re).attr("dy",d[ze]),ce.dy=h[ze],j.appendChild(ke),j.appendChild(re)}else j.appendChild(ke);e.select(ke).attr(ce),j=_e.node=ke,I.push(_e)}function W(_e,ze){_e.appendChild(document.createTextNode(ze))}function V(_e){if(I.length===1){r.log("Ignoring unexpected end tag </"+_e+">.",C);return}var ze=I.pop();_e!==ze.type&&r.log("Start tag <"+ze.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",C),j=I[I.length-1].node}var Z=g.test(C);Z?G():(j=M,I=[{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,R(te));else if(xe[1])V(ue);else{var le=xe[4],de={type:ue},ge=S(le,x);if(ge?(ge=ge.replace(D,"$1 fill:"),ae&&(ge+=";"+ae)):ae&&(ge=ae),ge&&(de.style=ge),ue==="a"){P=!0;var Te=S(le,_);if(Te){var Le=F(Te);Le&&(de.href=Le,de.target=S(le,k)||"_blank",de.popup=S(le,T))}}O(de)}}return P}function F(M){var C=encodeURI(decodeURI(M)),P=document.createElement("a"),I=document.createElement("a");P.href=M,I.href=C;var j=P.protocol,B=I.protocol;return m.indexOf(j)!==-1&&m.indexOf(B)!==-1?C:""}t.sanitizeHTML=function(C){C=C.replace(y," ");for(var P=document.createElement("p"),I=P,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&&(I=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=F(te);if(xe){Q.href=xe;var ue=S(Z,k);ue&&(Q.target=ue)}}}var ae=document.createElement(V);I.appendChild(ae),e.select(ae).attr(Q),I=ae,j.push(ae)}else I.appendChild(document.createTextNode(R(O)))}var le="innerHTML";return P[le]},t.lineCount=function(C){return C.selectAll("tspan.line").size()||1},t.positionText=function(C,P,I){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",P),O=B("y",I);this.nodeName==="text"&&j.selectAll("tspan.line").attr({x:G,y:O})})};function $(M,C,P){var I=P.horizontalAlign,j=P.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},I==="right"?V=function(){return B.right-O.width}:I==="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=P.gd||{};if(P.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,P=A,I=A;return C+P+I+M+", -"+C+"-"+P+I+M+", "+C+"-"+P+I+M+", -"+C+P+I+M},t.makeEditable=function(M,C){var P=C.gd,I=C.delegate,j=e.dispatch("edit","input","cancel"),B=I||M;if(M.style({"pointer-events":I?"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(P),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($(M,Z,C)).on("blur",function(){P._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;P._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?(P._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($(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 ww={exports:{}},jC=ft,Pf=oa,El=dt,zs=me,ty=ot,BC=Ho.isValid;function GC(t,e,r){var a=e?zs.nestedProperty(t,e).get()||{}:t,i=a[r||"color"];i&&i._inputArray&&(i=i._inputArray);var n=!1;if(zs.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(El(i[o])){n=!0;break}}return zs.isPlainObject(a)&&(n||a.showscale===!0||El(a.cmin)&&El(a.cmax)||BC(a.colorscale)||zs.isPlainObject(a.colorbar))}var ry=["showscale","autocolorscale","colorscale","reversescale","colorbar"],il=["min","max","mid","auto"];function Tw(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<ry.length;n++)o=ry[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 kw(t){for(var e=Tw(t),r=e.min,a=e.max,i=e.reversescale?Aw(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 Aw(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 Mw(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=Pf(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=jC.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 ay(s(v))}:c?u=function(v){return El(v)?s(v):Pf(v).isValid()?v:ty.defaultLine}:u=function(v){return El(v)?ay(s(v)):Pf(v).isValid()?v:ty.defaultLine},u.domain=s.domain,u.range=function(){return a},u}function UC(t,e){return Mw(kw(t),e)}function ay(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return Pf(e).toRgbString()}var ka={hasColorscale:GC,extractOpts:Tw,extractScale:kw,flipScale:Aw,makeColorScaleFunc:Mw,makeColorScaleFuncFromTrace:UC},Sw=V_,VC=Sw.FORMAT_LINK,XC=Sw.DATE_FORMAT_LINK;function YC(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?op:Lw)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function op(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: "+VC+"."].join(" ")}function Lw(t,e){return op(t,e)+[" And for dates see: "+XC+".","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:YC,descriptionOnlyNumbers:op,descriptionWithDates:Lw},Eu=vr,vo=xr,Cw=Hr.dash,lp=Nt.extendFlat,iy=Lt.templatedArray,ny=Xo.descriptionWithDates,WC=Yt.ONEDAY,$a=Lr,Ru=$a.HOUR_PATTERN,zu=$a.WEEKDAY_PATTERN,Ef={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(" ")},qC=lp({},Ef,{values:Ef.values.slice().concat(["sync"]),description:[Ef.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function oy(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 ly={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(" ")},sy={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(" ")},fy={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(" ")},cy={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 uy(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function vy(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var dy={valType:"color",dflt:vo.defaultLine,editType:"ticks",description:"Sets the tick color."},hy={valType:"color",dflt:vo.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function py(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 my=lp({},Cw,{editType:"ticks"}),yy={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:Eu({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:[$a.idRegex.x.toString(),$a.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:[$a.idRegex.x.toString(),$a.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:iy("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:[zu,Ru,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+zu+"* - 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 *"+Ru+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+zu+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+Ru+"', 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:WC,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:qC,nticks:oy(),tick0:ly,dtick:sy,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:fy,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:cy,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:uy(),tickwidth:vy(),tickcolor:dy,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:lp({},Cw,{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:Eu({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:ny("tick label")},tickformatstops:iy("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:ny("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:yy,gridcolor:hy,gridwidth:py(),griddash:my,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",$a.idRegex.x.toString(),$a.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",$a.idRegex.x.toString(),$a.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:Ef,nticks:oy("minor"),tick0:ly,dtick:sy,tickvals:fy,ticks:cy,ticklen:uy("minor"),tickwidth:vy("minor"),tickcolor:dy,gridcolor:hy,gridwidth:py("minor"),griddash:my,showgrid:yy,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:Eu({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},Rt=Na,Iu=vr,gy=Nt.extendFlat,ZC=za.overrideAll,sp=ZC({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:Rt.linecolor,outlinewidth:Rt.linewidth,bordercolor:Rt.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:Rt.minor.tickmode,nticks:Rt.nticks,tick0:Rt.tick0,dtick:Rt.dtick,tickvals:Rt.tickvals,ticktext:Rt.ticktext,ticks:gy({},Rt.ticks,{dflt:""}),ticklabeloverflow:gy({},Rt.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:Rt.ticklen,tickwidth:Rt.tickwidth,tickcolor:Rt.tickcolor,ticklabelstep:Rt.ticklabelstep,showticklabels:Rt.showticklabels,labelalias:Rt.labelalias,tickfont:Iu({description:"Sets the color bar's tick label font"}),tickangle:Rt.tickangle,tickformat:Rt.tickformat,tickformatstops:Rt.tickformatstops,tickprefix:Rt.tickprefix,showtickprefix:Rt.showtickprefix,ticksuffix:Rt.ticksuffix,showticksuffix:Rt.showticksuffix,separatethousands:Rt.separatethousands,exponentformat:Rt.exponentformat,minexponent:Rt.minexponent,showexponent:Rt.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:Iu({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:Iu({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"),KC=sp,QC=Oo.counter,JC=Kh,Dw=Ho.scales,eD=JC(Dw);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"?Dw[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: "+eD+"."].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=KC),r.noColorAxis||(k.coloraxis={valType:"subplotid",regex:QC("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},tD=Nt.extendFlat,rD=Sn,Fu=Ho.scales,Nu="Note that `autocolorscale` must be true for this attribute to work.",$w={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Fu.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",Nu].join(" ")},sequentialminus:{valType:"colorscale",dflt:Fu.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",Nu].join(" ")},diverging:{valType:"colorscale",dflt:Fu.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",Nu].join(" ")}},coloraxis:tD({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},rD("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},aD=me,Pw=function(e){return aD.isPlainObject(e.colorbar)},qc={},Id=dt,by=me,Ew=Yt,iD=Ew.ONEDAY,nD=Ew.ONEWEEK;qc.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?iD:1;if(!t)return n;if(Id(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=Id(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};qc.tick0=function(t,e,r,a){if(e==="date")return by.cleanDate(t,by.dateTick0(r,a%nD===0?1:0));if(!(a==="D1"||a==="D2"))return Id(t)?Number(t):0};var xy=qc,oD=me.isArrayOrTypedArray,lD=Xt.isTypedArraySpec,sD=Xt.decodeTypedArraySpec,Rw=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 lD(w)&&(w=sD(w)),w!==void 0?w:(s._template||{})[b]}var u=c("tick0"),v=c("dtick"),h=c("tickvals"),d=oD(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=xy.dtick(v,i);s.tick0=xy.tick0(u,i,r.calendar,m)}else if(i!=="multicategory"){var y=a(f+"tickvals");y===void 0?s.tickmode="auto":o||a("ticktext")}},Hu=me,_y=Na,zw=function(e,r,a,i){var n=i.isMinor,o=n?e.minor||{}:e,l=n?r.minor:r,s=n?_y.minor:_y,f=n?"minor.":"",c=Hu.coerce2(o,l,s,"ticklen",n?(r.ticklen||5)*.6:void 0),u=Hu.coerce2(o,l,s,"tickwidth",n?r.tickwidth||1:void 0),v=Hu.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)},Iw=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]]},Is=me,fD=Lt,Ha=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=Is.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=fD.arrayTemplater(r,i,n),c,u;for(c=0;c<l.length;c++){var v=l[c];Is.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(Is.isArrayOrTypedArray(o)){var d=Math.min(o.length,s.length);for(c=0;c<d;c++)Is.relinkPrivateKeys(s[c],o[c])}return s},Fd=me,cD=ot.contrast,Fw=Na,uD=Iw,vD=Ha,Nw=function(e,r,a,i,n){n||(n={});var o=a("labelalias");Fd.isPlainObject(o)||delete r.labelalias;var l=uD(e),s=a("showticklabels");if(s){var f=n.font||{},c=r.color,u=r.ticklabelposition||"",v=u.indexOf("inside")!==-1?cD(n.bgColor):c&&c!==Fw.color.dflt?c:f.color;if(Fd.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");vD(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:dD}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!d&&i!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function dD(t,e){function r(i,n){return Fd.coerce(t,e,Fw.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var hD=Iw,Hw=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=hD(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},li=me,pD=Lt,mD=Rw,yD=zw,gD=Nw,bD=Hw,xD=sp,Ow=function(e,r,a){var i=pD.newContainer(r,"colorbar"),n=e.colorbar||{};function o(L,E){return li.coerce(n,i,xD,L,E)}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"),mD(n,i,o,"linear");var k=a.font,T={noAutotickangles:!0,outerTicks:!1,font:k};_.indexOf("inside")!==-1&&(T.bgColor="black"),bD(n,i,o,"linear",T),gD(n,i,o,"linear",T),yD(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")},wy=dt,Nd=me,_D=Pw,wD=Ow,Ty=Ho.isValid,TD=Je.traceIs;function Ou(t,e){var r=e.slice(0,e.length-1);return e?Nd.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=Ou(e,o),c=Ou(r,o),u=Ou(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=TD(r,"contour")&&Nd.nestedProperty(r,"contours.coloring").get()||"heatmap",m=h[d];m?(m[2].push(v),m[0]!==p&&(m[0]=!1,Nd.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=wy(y)&&wy(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=!Ty(x)),_!==void 0&&(k=!Ty(_)),i(o+"autocolorscale",k),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var T;o&&s&&(T=_D(f));var S=i(o+"showscale",T);S&&(o&&u&&(c._template=u),wD(f,c,a))}},ky=me,kD=Lt,Ay=$w,AD=ps,MD=function(e,r){function a(u,v){return ky.coerce(e,r,Ay,u,v)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(u,v){return ky.coerce(n,o,Ay.coloraxis,u,v)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=kD.newContainer(r,s,"coloraxis"),o._name=s,AD(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},SD=me,LD=ka.hasColorscale,CD=ka.extractOpts,DD=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?SD.nestedProperty(c,u.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var h=CD(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);LD(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"})},My=dt,ju=me,$D=ka.extractOpts,fp=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?ju.nestedProperty(r,o).get():r,s=$D(l),f=s.auto!==!1,c=s.min,u=s.max,v=s.mid,h=function(){return ju.aggNums(Math.min,null,n)},d=function(){return ju.aggNums(Math.max,null,n)};if(c===void 0?c=h():f&&(l._colorAx&&My(c)?c=Math.min(c,h()):c=h()),u===void 0?u=d():f&&(l._colorAx&&My(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)}},Fs=Ho,In=ka,So={moduleType:"component",name:"colorscale",attributes:Sn,layoutAttributes:$w,supplyLayoutDefaults:MD,handleDefaults:ps,crossTraceDefaults:DD,calc:fp,scales:Fs.scales,defaultScale:Fs.defaultScale,getScale:Fs.get,isValidScale:Fs.isValid,hasColorscale:In.hasColorscale,extractOpts:In.extractOpts,extractScale:In.extractScale,flipScale:In.flipScale,makeColorScaleFunc:In.makeColorScaleFunc,makeColorScaleFuncFromTrace:In.makeColorScaleFuncFromTrace},Sy=me,PD=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 Sy.isPlainObject(e)&&(Sy.isArrayOrTypedArray(e.size)||PD(e.size))}},ED=dt,jw=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 ED(s)&&s>0?Math.max(s,n):0}},sa={};(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]}})(sa);var Bu,Ly;function RD(){if(Ly)return Bu;Ly=1;var t=f_,e=ft.round,r="M0,0Z",a=Math.sqrt(2),i=Math.sqrt(3),n=Math.PI,o=Math.cos,l=Math.sin;Bu={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 F=o(N),$=l(N),A=H[0],M=H[1]+(p||0);return[A*F-M*$,A*$+M*F]}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 E=y(b,[+T[6],+T[7]]);T[6]=E[0],T[7]=E[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 R=y(b,[w,g]);(S==="H"||S==="V")&&(S="L"),(S==="M"||S==="L"||S==="m"||S==="l")&&(T[1]=R[0],T[2]=R[1]),T[0]=S,_+=T[0]+T.slice(1).join(",")}return c=_,_}return Bu}var ir=ft,St=me,zD=St.numberFormat,mn=dt,Hd=oa,Zc=Je,pr=ot,ID=So,Ul=St.strTranslate,cp=nr,FD=Mn,ND=Cr,HD=ND.LINE_SPACING,Bw=us.DESELECTDIM,OD=_r,jD=jw,BD=sa.appendArrayPointValue,Fe=ww.exports={};Fe.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)};Fe.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};Fe.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};Fe.setRect=function(t,e,r,a,i){t.call(Fe.setPosition,e,r).call(Fe.setSize,a,i)};Fe.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};Fe.translatePoints=function(t,e,r){t.each(function(a){var i=ir.select(this);Fe.translatePoint(a,i,e,r)})};Fe.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};Fe.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=Zc.traceIs(n,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(f){Fe.hideOutsideRangePoint(f,ir.select(this),r,a,o,l)})})}};Fe.crispRound=function(t,e,r){return!e||!mn(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};Fe.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),Fe.dashLine(e,l,o)};Fe.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(Fe.dashLine,l,o)})};Fe.dashLine=function(t,e,r){r=+r||0,e=Fe.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};Fe.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 Gw(t,e,r){var a=e.fillpattern,i=a&&Fe.getPatternAttr(a.shape,0,"");if(i){var n=Fe.getPatternAttr(a.bgcolor,0,null),o=Fe.getPatternAttr(a.fgcolor,0,null),l=a.fgopacity,s=Fe.getPatternAttr(a.size,0,8),f=Fe.getPatternAttr(a.solidity,0,.3),c=e.uid;Fe.pattern(t,"point",r,c,i,s,f,void 0,a.fillmode,n,o,l)}else e.fillcolor&&t.call(pr.fill,e.fillcolor)}Fe.singleFillStyle=function(t,e){var r=ir.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};Gw(t,i,e)};Fe.fillGroupStyle=function(t,e){t.style("stroke-width",0).each(function(r){var a=ir.select(this);r[0].trace&&Gw(a,r[0].trace,e)})};var Cy=RD();Fe.symbolNames=[];Fe.symbolFuncs=[];Fe.symbolBackOffs=[];Fe.symbolNeedLines={};Fe.symbolNoDot={};Fe.symbolNoFill={};Fe.symbolList=[];Object.keys(Cy).forEach(function(t){var e=Cy[t],r=e.n;Fe.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),Fe.symbolNames[r]=t,Fe.symbolFuncs[r]=e.f,Fe.symbolBackOffs[r]=e.backoff||0,e.needLine&&(Fe.symbolNeedLines[r]=!0),e.noDot?Fe.symbolNoDot[r]=!0:Fe.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(Fe.symbolNoFill[r]=!0)});var GD=Fe.symbolNames.length,UD="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Fe.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=Fe.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=GD||t>=400?0:Math.floor(Math.max(t,0))};function Uw(t,e,r,a){var i=t%100;return Fe.symbolFuncs[i](e,r,a)+(t>=200?UD:"")}var Dy={x1:1,x2:0,y1:0,y2:0},$y={x1:0,x2:0,y1:1,y2:0},Py=zD("~f"),Vw={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:Dy},horizontalreversed:{node:"linearGradient",attrs:Dy,reversed:!0},vertical:{node:"linearGradient",attrs:$y},verticalreversed:{node:"linearGradient",attrs:$y,reversed:!0}};Fe.gradient=function(t,e,r,a,i,n){for(var o=i.length,l=Vw[a],s=new Array(o),f=0;f<o;f++)l.reversed?s[o-1-f]=[Py((1-i[f][0])*100),i[f][1]]:s[f]=[Py(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=Hd(p[1]);ir.select(this).attr({offset:p[0]+"%","stop-color":pr.tinyRGB(m),"stop-opacity":m.getAlpha()})})}),t.style(n,up(u,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)};Fe.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(R,N,H,F,$){return F+($-F)*(R-N)/(H-N)},b,w,g,x,_={},k=Hd(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(";"),E=h._defs.select(".patterns").selectAll("#"+d).data([L],St.identity);E.exit().remove(),E.enter().append("pattern").each(function(){var R=ir.select(this);if(R.attr({id:d,width:p+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:v?"scale(0.8)":""}),f){var N=Hd(f),H=pr.tinyRGB(N),F=N.getAlpha(),$=R.selectAll("rect").data([0]);$.exit().remove(),$.enter().append("rect").attr({width:p+"px",height:m+"px",fill:H,"fill-opacity":F})}var A=R.selectAll(x).data([0]);A.exit().remove(),A.enter().append(x).attr(_)}),t.style("fill",up(d,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};Fe.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)};Fe.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)};Fe.getPatternAttr=function(t,e,r){return t&&St.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};Fe.pointStyle=function(t,e,r,a){if(t.size()){var i=Fe.makePointStyleFns(e);t.each(function(n){Fe.singlePointStyle(n,ir.select(this),e,i,r,a)})}};Fe.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=Fe.symbolNumber(t.mx||o.symbol)||0;t.om=f%200>=100;var c=dp(t,r),u=vp(t,r);e.attr("d",Uw(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],Vw[b]||(b=0));var w=o.pattern,g=w&&Fe.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),Fe.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=Fe.getPatternAttr(T,t.i,n&&n.color||null),D=Fe.getPatternAttr(w.bgcolor,t.i,null),L=w.fgopacity,E=Fe.getPatternAttr(w.size,t.i,8),R=Fe.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),Fe.pattern(e,"point",i,N,g,E,R,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)}};Fe.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=Fe.tryColorscale(r,""),e.lineScale=Fe.tryColorscale(r,"line"),Zc.traceIs(t,"symbols")&&(e.ms2mrc=OD.isBubble(t)?jD(t):function(){return(r.size||6)/2}),t.selectedpoints&&St.extendFlat(e,Fe.makeSelectedPointStyleFns(t)),e};Fe.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:Bw*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 Zc.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};Fe.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,Bw))},e};Fe.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Fe.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",Uw(Fe.symbolNumber(l),s,dp(o,e),vp(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)})}};Fe.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 ID.makeColorScaleFuncFromTrace(r)}return St.identity};var Gu={start:1,end:-1,middle:0,bottom:1,top:-1};function Xw(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=(cp.lineCount(t)-1)*HD+1,c=Gu[l]*s,u=r*.75+Gu[o]*s+(Gu[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",Ul(c,u))}function Yw(t,e){var r=t.ts||e.textfont.size;return mn(r)&&r>0?r:0}Fe.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=Fe.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=Yw(l,e),m=a?a(l):l.tc||e.textfont.color;s.call(Fe.font,l.tf||e.textfont.family,p,m).text(f).call(cp.convertToTspans,r).call(Xw,d,p,l.mrc)})}};Fe.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Fe.makeSelectedTextStyleFns(e);t.each(function(a){var i=ir.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=Yw(a,e);pr.fill(i,n);var s=Zc.traceIs(e,"bar-like");Xw(i,o,l,a.mrc2||a.mrc,s)})}};var Ey=.5;Fe.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(Rf(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};Fe.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[Rf(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(Rf(t[n-1],t[n],t[n+1],e));for(i.push(Rf(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 Ww,qw;function ho(t,e,r){return r&&(t=Zw(t)),e?cn(t[1]):fn(t[0])}function fn(t){var e=ir.round(t,2);return Ww=e,e}function cn(t){var e=ir.round(t,2);return qw=e,e}function Rf(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,Ey/2),f=Math.pow(o*o+l*l,Ey/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 VD={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)}},XD=function(t,e,r){return"L"+ho(e,0,r)+","+ho(e,1,r)};Fe.steps=function(t){var e=VD[t]||XD;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 Zw(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]:Ww||0,f=e?e[1]:qw||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?Fe.symbolBackOffs[Fe.symbolNumber(b)]*w:0,p+=Fe.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}Fe.applyBackoff=Zw;Fe.makeTester=function(){var t=St.ensureSingleById(ir.select("body"),"svg","js-plotly-tester",function(r){r.attr(FD.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"})});Fe.tester=t,Fe.testref=e};Fe.savedBBoxes={};var Uu=0,YD=1e4;Fe.bBox=function(t,e,r){r||(r=Ry(t));var a;if(r){if(a=Fe.savedBBoxes[r],a)return St.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=Ry(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=Fe.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=Fe.savedBBoxes[r],a)return St.extendFlat({},a)}}var f,c;e?f=t:(c=Fe.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),ir.select(f).attr("transform",null).call(cp.positionText,0,0);var u=f.getBoundingClientRect(),v=Fe.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 Uu>=YD&&(Fe.savedBBoxes={},Uu=0),r&&(Fe.savedBBoxes[r]=h),Uu++,St.extendFlat({},h)};function Ry(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}Fe.setClipUrl=function(t,e,r){t.attr("clip-path",up(e,r))};function up(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}Fe.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}};Fe.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};Fe.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}};Fe.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 WD=/\s*sc.*/;Fe.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(WD,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var qD=/translate\([^)]*\)\s*$/;Fe.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(qD);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 vp(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}Fe.getMarkerStandoff=vp;var ol=Math.atan2,rn=Math.cos,po=Math.sin;function zy(t,e){var r=e[0],a=e[1];return[r*rn(t)-a*po(t),r*po(t)+a*rn(t)]}var Iy,Fy,Ny,Hy,Vu,Xu;function dp(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=Iy/180*Math.PI,w=Fy/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,Iy=f,Fy=c}var k=zy(h,[rn(p),0]),T=zy(d,[po(p),0]);r=ol(k[1]+T[1],k[0]+T[0])/Math.PI*180,n==="previous"&&!(Xu===e.uid&&t.i===Vu+1)&&(r=null)}if(n==="previous"&&!e._geo)if(Xu===e.uid&&t.i===Vu+1&&mn(a)&&mn(i)){var S=a-Ny,D=i-Hy,L=e.line&&e.line.shape||"",E=L.slice(L.length-1);E==="h"&&(D=0),E==="v"&&(S=0),r+=ol(D,S)/Math.PI*180+90}else r=null}return Ny=a,Hy=i,Vu=t.i,Xu=e.uid,r}Fe.getMarkerAngle=dp;var xt=ww.exports,Ns=ft,ZD=dt,Oy=Qt,jy=Je,no=me,By=no.strTranslate,Gy=xt,Uy=ot,Yu=nr,Vy=us,KD=Cr.OPPOSITE_SIDE,Xy=/ [XY][0-9]* /;function QD(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(Xy," % ")===n.replace(Xy," % ")&&(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(R){no.syncOrAsync([D,L],R)}function D(R){var N;return!f&&k&&(f={}),f?(N="",f.rotate&&(N+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||k)&&(N+=By(0,(f.offset||0)-(k||0)))):N=null,R.attr("transform",N),R.style({"font-family":y,"font-size":Ns.round(b,2)+"px",fill:Uy.rgb(w),opacity:v*Uy.opacity(w),"font-weight":Oy.fontWeight}).attr(s).call(Yu.convertToTspans,t),Oy.previousPromises(t)}function L(R){var N=Ns.select(R.node().parentNode);if(l&&l.selection&&l.side&&p){N.attr("transform",null);var H=KD[l.side],F=l.side==="left"||l.side==="top"?-1:1,$=ZD(l.pad)?l.pad:2,A=Gy.bBox(N.node()),M={t:0,b:0,l:0,r:0},C=t._fullLayout._reservedMargin;for(var P in C)for(var I in C[P]){var j=C[P][I];M[I]=Math.max(M[I],j)}var B={left:M.l,top:M.t,right:u.width-M.r,bottom:u.height-M.b},G=l.maxShift||F*(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=Gy.bBox(this);no.bBoxIntersect(A,X,$)&&(O=Math.max(O,F*(X[l.side]-A[H])+$))}),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",By(Z[0],Z[1]))}}}T.call(S);function E(){v=0,h=!0,T.text(n).on("mouseover.opacity",function(){Ns.select(this).transition().duration(Vy.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Ns.select(this).transition().duration(Vy.HIDE_PLACEHOLDER).style("opacity",0)})}return x&&(p?T.on(".opacity",null):E(),T.call(Yu.makeEditable,{gd:t}).on("edit",function(R){o!==void 0?jy.call("_guiRestyle",t,i,R,o):jy.call("_guiRelayout",t,i,R)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(S)}).on("input",function(R){this.text(R||" ").call(Yu.positionText,s.x,s.y)})),T.classed("js-placeholder",h),c}var Kc={draw:QD},JD=ft,e3=Bl.utcFormat,Pt=me,t3=Pt.numberFormat,Ma=dt,si=Pt.cleanNumber,r3=Pt.ms2DateTime,Yy=Pt.dateTime2ms,Sa=Pt.ensureNumber,Wy=Pt.isArrayOrTypedArray,Ei=Yt,Hs=Ei.FP_SAFE,ua=Ei.BADNUM,a3=Ei.LOG_CLIP,i3=Ei.ONEWEEK,Os=Ei.ONEDAY,js=Ei.ONEHOUR,qy=Ei.ONEMIN,Zy=Ei.ONESEC,Bs=Wt,ec=Lr,Gs=ec.HOUR_PATTERN,Us=ec.WEEKDAY_PATTERN;function ll(t){return Math.pow(10,t)}function Wu(t){return t!=null}var hp=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*a3*Math.abs(_-k))}else return ua}function o(g,x,_,k){if((k||{}).msUTC&&Ma(g))return+g;var T=Yy(g,_||e.calendar);if(T===ua)if(Ma(g)){g=+g;var S=Math.floor(Pt.mod(g+.05,1)*10),D=Math.round(g-S/10);T=Yy(new Date(D))+S/10}else return ua;return T}function l(g,x,_){return r3(g,x,_||e.calendar)}function s(g){return e._categories[Math.round(g)]}function f(g){if(Wu(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 ua}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 JD.round(_+x*g,2)}function p(g,x,_){return(g-_)/x}var m=function(x){return Ma(x)?d(x,e._m,e._b):ua},y=function(g){return p(g,e._m,e._b)};if(e.rangebreaks){var b=i==="y";m=function(g){if(!Ma(g))return ua;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,E=k*e._rangebreaks[D].max;if(T<L)break;if(T>E)S=D+1;else{S=T<(L+E)/2?D:D+1;break}}var R=e._B[S]||0;return isFinite(R)?d(g,e._m2,R):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=Pt.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 Pt.cleanDate(g,ua,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,{}]],E=[];for(_=0;_<x.length;_++){var R=g[x[_]];if(i in R){var N=R[i],H=R._length||Pt.minRowLength(N);if(Wy(N[0])&&Wy(N[1]))for(k=0;k<H;k++){var F=N[0][k],$=N[1][k];Wu(F)&&Wu($)&&(E.push([F,$]),F in L[0][1]||(L[0][1][F]=L[0][0]++),$ in L[1][1]||(L[1][1][$]=L[1][0]++))}}}for(E.sort(function(A,M){var C=L[0][1],P=C[A[0]]-C[M[0]];if(P)return P;var I=L[1][1];return I[A[1]]-I[M[1]]}),_=0;_<E.length;_++)f(E[_])}),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=Pt.nestedProperty(e,g).get(),T=Pt.simpleMap(k,e.r2l),S=T[1]<T[0];S&&T.reverse();var D=Pt.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),E=e.l2r(_);if(x!==void 0){var R=L+1;_!==void 0&&(R=Math.min(R,E)),k[S?1:0]=R}if(_!==void 0){var N=E+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 _=Pt.nestedProperty(e,g).get(),k,T;if(e.type==="date"?T=Pt.dfltRange(e.calendar):i==="y"?T=ec.DFLTRANGEY:e._name==="realaxis"?T=[0,1]:T=x.dfltRange||ec.DFLTRANGEX,T=T.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(T[0]=0),!_||_.length!==2){Pt.nestedProperty(e,g).set(T);return}var S=_[0]===null,D=_[1]===null;for(e.type==="date"&&!e.autorange&&(_[0]=Pt.cleanDate(_[0],ua,e.calendar),_[1]=Pt.cleanDate(_[1],ua,e.calendar)),k=0;k<2;k++)if(e.type==="date"){if(!Pt.isDateTime(_[k],e.calendar)){e[g]=T;break}if(e.r2l(_[0])===e.r2l(_[1])){var L=Pt.constrain(e.r2l(_[0]),Pt.MIN_MS+1e3,Pt.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 E=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=E,_[1]+=E}}},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 E,R;if(e._rangebreaks=e.locateBreaks(Math.min(S,D),Math.max(S,D)),e._rangebreaks.length){for(E=0;E<e._rangebreaks.length;E++)R=e._rangebreaks[E],e._lBreaks+=Math.abs(R.max-R.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)),E=0;E<e._rangebreaks.length;E++)R=e._rangebreaks[E],e._B.push(e._B[e._B.length-1]-H*e._m2*(R.max-R.min));for(E=0;E<e._rangebreaks.length;E++)R=e._rangebreaks[E],R.pmin=m(R.min),R.pmax=m(R.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?Pt.simpleMap(C.bounds,C.pattern?si:e.d2c):null})),x._cachedValues||(x._cachedValues=x.map(function(C){return C.enabled&&C.values?Pt.simpleMap(C.values,e.d2c).sort(Pt.sorterAsc):null}));for(var L=0;L<x.length;L++){var E=x[L];if(E.enabled){if(E.bounds){var R=E.pattern;switch(_=x._cachedPatterns[L],k=_[0],T=_[1],R){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(),F=D.getUTCSeconds(),$=D.getUTCMilliseconds();S=N+(H/60+F/3600+$/36e5),k>T&&(T+=24,S<k&&(S+=24));break;case"":S=g;break}if(S>=k&&S<T)return ua}else for(var A=x._cachedValues[L],M=0;M<A.length;M++)if(k=A[M],T=k+E.dvalue,g>=k&&g<T)return ua}}return g},e.locateBreaks=function(g,x){var _,k,T,S,D=[];if(!e.rangebreaks)return D;var L=e.rangebreaks.slice().sort(function(I,j){return I.pattern===Us&&j.pattern===Gs?-1:j.pattern===Us&&I.pattern===Gs?1:0}),E=function(I,j){if(I=Pt.constrain(I,g,x),j=Pt.constrain(j,g,x),I!==j){for(var B=!0,G=0;G<D.length;G++){var O=D[G];I<O.max&&j>=O.min&&(I<O.min&&(O.min=I),j>O.max&&(O.max=j),B=!1)}B&&D.push({min:I,max:j})}};for(_=0;_<L.length;_++){var R=L[_];if(R.enabled)if(R.bounds){var N=g,H=x;R.pattern&&(N=Math.floor(N)),k=Pt.simpleMap(R.bounds,R.pattern?si:e.r2l),T=k[0],S=k[1];var F=new Date(N),$,A;switch(R.pattern){case Us:A=i3,$=((S<T?7:0)+(S-T))*Os,N+=T*Os-(F.getUTCDay()*Os+F.getUTCHours()*js+F.getUTCMinutes()*qy+F.getUTCSeconds()*Zy+F.getUTCMilliseconds());break;case Gs:A=Os,$=((S<T?24:0)+(S-T))*js,N+=T*js-(F.getUTCHours()*js+F.getUTCMinutes()*qy+F.getUTCSeconds()*Zy+F.getUTCMilliseconds());break;default:N=Math.min(k[0],k[1]),H=Math.max(k[0],k[1]),A=H-N,$=A}for(var M=N;M<H;M+=A)E(M,M+$)}else for(var C=Pt.simpleMap(R.values,e.d2c),P=0;P<C.length;P++)T=C[P],S=T+R.dvalue,E(T,S)}return D.sort(function(I,j){return I.min-j.min}),D},e.makeCalcdata=function(g,x,_){var k,T,S,D,L=e.type,E=L==="date"&&g[x+"calendar"];if(x in g){if(k=g[x],D=g._length||Pt.minRowLength(k),Pt.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,E,_)}else{var R=x+"0"in g?e.d2c(g[x+"0"],0,E):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]=R+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:e3,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=w?w.numberFormat:t3,delete e._minDtick,delete e._forceTick0},Kw=dt,pp=me,n3=Yt.BADNUM,tc=pp.isArrayOrTypedArray,o3=pp.isDateTime,l3=pp.cleanNumber,Qw=Math.round,Jw=function(e,r,a){var i=e,n=a.noMultiCategory;if(tc(i)&&!i.length)return"-";if(!n&&v3(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(tc(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(c3(i,r))return"date";var f=a.autotypenumbers!=="strict";return u3(i,f)?"category":f3(i,f)?"linear":"-"};function s3(t,e){return e?Kw(t):typeof t=="number"}function f3(t,e){for(var r=t.length,a=0;a<r;a++)if(s3(t[a],e))return!0;return!1}function c3(t,e){for(var r=t.length,a=eT(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Qw(l),f=t[s],c=String(f);o[c]||(o[c]=1,o3(f,e)&&i++,Kw(f)&&n++)}return i>n*2}function eT(t){return Math.max(1,(t-1)/1e3)}function u3(t,e){for(var r=t.length,a=eT(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=Qw(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var u=typeof f;u==="boolean"?n++:(e?l3(f)!==n3:u==="number")?i++:u==="string"&&n++}}return n>i*2}function v3(t){return tc(t[0])&&tc(t[1])}var d3=ft,tT=dt,ki=me,zf=Yt.FP_SAFE,h3=Je,p3=xt,rT=Wt,m3=rT.getFromId,y3=rT.isLinked,ms={applyAutorangeOptions:iT,getAutoRange:Od,makePadFn:jd,doAutoRange:b3,findExtremes:x3,concatExtremes:mp};function Od(t,e){var r,a,i=[],n=t._fullLayout,o=jd(n,e,0),l=jd(n,e,1),s=mp(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-Ky(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 E($,A){return Math.max($,l(A))}if(u===v){var R=u-1,N=u+1;if(y)if(u===0)i=[0,1];else{var H=(u>0?c:f).reduce(E,0),F=u/(1-Math.min(.5,H/w));i=u>0?[0,F]:[F,0]}else b?i=[Math.max(0,R),Math.max(1,N)]:i=[R,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-Ky(e,_.val,k.val))/(w-o(T)-l(S)),i=[T.val-x*o(T),S.val+x*l(S)];return i=iT(i,e),e.limitRange&&e.limitRange(),d&&i.reverse(),ki.simpleMap(i,e.l2r||Number)}function Ky(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 jd(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 y3(t,e._id)||(l=g3(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 Qy=3;function g3(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=d3.select(this),g=w.select(".text-math-group");g.empty()&&(b.bb=p3.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*Qy+p.width,y=2*Qy+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 mp(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],Bd(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<w.max.length;f++)c=w.max[f],Gd(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=m3(t,v),d=mp(t,h,!0),p=e._length/h._length;for(f=0;f<d.min.length;f++)c=d.min[f],Bd(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<d.max.length;f++)c=d.max[f],Gd(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function b3(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():Od(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,h3.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=Od(t,e)),n._input.rangeslider[e._name]=ki.extendFlat({},o)}}function x3(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(E){if(Array.isArray(E))return f=!0,function(N){return Math.max(Number(E[N]||0),0)};var R=Math.max(Number(E||0),0);return function(){return R}}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<zf&&(w=v);else for(u=0;u<n;u++)v=e[u],v<b&&v>-zf&&(b=v),v>w&&v<zf&&(w=v);e=[b,w],n=2}var S={tozero:l,extrapad:o};function D(E){h=e[E],tT(h)&&(m=x(E),y=_(E),c?(d=t.c2l(h)-T(E),p=t.c2l(h)+k(E)):(b=h-T(E),w=h+k(E),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)),Jy(d)&&Bd(a,d,y,S),Jy(p)&&Gd(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 Bd(t,e,r,a){aT(t,e,r,a,_3)}function Gd(t,e,r,a){aT(t,e,r,a,w3)}function aT(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 Jy(t){return tT(t)&&Math.abs(t)<zf}function _3(t,e){return t<=e}function w3(t,e){return t>=e}function T3(t,e){var r=e.autorangeoptions;return r&&r.minallowed!==void 0&&rc(e,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&rc(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}function k3(t,e){var r=e.autorangeoptions;return r&&r.maxallowed!==void 0&&rc(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&rc(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}function rc(t,e,r){return e!==void 0&&r!==void 0?(e=t.d2l(e),r=t.d2l(r),e<r):!0}function iT(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=T3(r,e),a=k3(a,e),[r,a]}var Jr=ft,Kt=dt,wo=Qt,Vl=Je,it=me,Lo=it.strTranslate,oo=nr,A3=Kc,Xl=ot,Or=xt,M3=Na,eg=qc,wr=Yt,S3=wr.ONEMAXYEAR,ac=wr.ONEAVGYEAR,Ud=wr.ONEMINYEAR,L3=wr.ONEMAXQUARTER,Vd=wr.ONEAVGQUARTER,Xd=wr.ONEMINQUARTER,C3=wr.ONEMAXMONTH,Co=wr.ONEAVGMONTH,Yd=wr.ONEMINMONTH,aa=wr.ONEWEEK,Sr=wr.ONEDAY,un=Sr/2,Qa=wr.ONEHOUR,ic=wr.ONEMIN,Wd=wr.ONESEC,vn=wr.MINUS_SIGN,Qc=wr.BADNUM,qd={K:"zeroline"},Zd={K:"gridline",L:"path"},Kd={K:"minor-gridline",L:"path"},nT={K:"tick",L:"path"},tg={K:"tick",L:"text"},rg={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Jc=Cr,Vs=Jc.MID_SHIFT,dn=Jc.CAP_SHIFT,nc=Jc.LINE_SPACING,D3=Jc.OPPOSITE_SIDE,oc=3,De=_w.exports={};De.setConvert=hp;var $3=Jw,ei=Wt,P3=ei.idSort,E3=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 oT=ms;De.getAutoRange=oT.getAutoRange;De.findExtremes=oT.findExtremes;var R3=1e-4;function yp(t){var e=(t[1]-t[0])*R3;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 z3=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:$3(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:ig,c2d:ig}:{d2c:ag,c2d:ag}};function ag(t){return+t}function ig(t){return String(t)}De.getDataToCoordFunc=function(t,e,r,a){return z3(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&&eg.dtick(n,s.type),n)s.dtick=n,s.tick0=eg.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=I3(d,t,s,o,l),m=1+Math.floor((l-d)/h),p=d+m*h;else for(s.dtick.charAt(0)==="M"&&(d=F3(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 I3(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 F3(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?qu(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:ng(f/c,2.5)?t.dtick=f/2:t.dtick=f:String(e.dtick).charAt(0)==="M"?s?t.dtick="M1":qu(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"?qu(f,c)||(t.dtick=ng(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 qu(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function ng(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"&&N3(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),cT(t)};function Zu(t){return+t.substring(1)}function N3(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?Zu(t.dtick)<1:t.dtick<Yd)&&(t.dtick="M1")):/%[q]/.test(i)?(e=Vd,n&&(a?Zu(t.dtick)<3:t.dtick<Xd)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=ac,n&&(a?Zu(t.dtick)<12:t.dtick<Ud)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function H3(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>=Ud?f>=Ud&&f<=S3?u=f:u=ac:r===Vd&&c>=Xd?f>=Xd&&f<=L3?u=f:u=Vd:c>=Yd?f>=Yd&&f<=C3?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=og(e,!b)):(p=[],h=og(e,!b));continue}if(w.tickmode==="sync"){d=[],v=O3(e);continue}var g=yp(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,E;if(y){var R;k?R=e.dtick:a==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(R=Co*e.dtick.substring(1)):R=e._roughDTick,E=Math.round((e.r2l(L)-e.r2l(e.tick0))/R)-1}var N=w.dtick;for(w.rangebreaks&&w._tick0Init!==w.tick0&&(L=Ku(L,e),s||(L=De.tickIncrement(L,N,!s,i))),y&&o&&(L=De.tickIncrement(L,N,!s,i),E--);s?L>=_:L<=_;L=De.tickIncrement(L,N,s,i)){if(y&&E++,w.rangebreaks&&!s){if(L<x)continue;if(w.maskBreaks(L)===Qc&&Ku(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&&E%n&&(H.skipLabel=!0),d.push(H)):(H.minor=!0,p.push(H))}}if(m){var F=e.minor.ticks==="inside"&&e.ticks==="outside"||e.minor.ticks==="outside"&&e.ticks==="inside";if(!F){for(var $=d.map(function(ae){return ae.value}),A=[],M=0;M<p.length;M++){var C=p[M],P=C.value;if($.indexOf(P)===-1){for(var I=!1,j=0;!I&&j<d.length;j++)1e7+d[j].value===1e7+P&&(I=!0);I||A.push(C)}}p=A}}o&&H3(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=Ku(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}}_p(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 lT(t,e){return t.rangebreaks&&(e=e.filter(function(r){return t.maskBreaks(r.x)!==Qc})),e}function O3(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=lT(t,r),r}function og(t,e){var r=it.simpleMap(t.range,t.r2l),a=yp(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):gp(t,v,String(c[u]));s&&(h.minor=!0,h.text=""),l.push(h)}}}}return l=lT(t,l),l}var Xs=[2,5,10],lg=[1,2,3,6,12],sg=[1,2,5,10,15,30],j3=[1,2,3,7,14],sT=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],fT=[-.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>ac)e/=ac,a=i(10),t.dtick="M"+12*La(e,a,Xs);else if(n>Co)e/=Co,t.dtick="M"+La(e,1,lg);else if(n>Sr){if(t.dtick=La(e,Sr,t._hasDayOfWeekBreaks?[1,2,7,14]:j3),!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,lg):n>ic?t.dtick=La(e,ic,sg):n>Wd?t.dtick=La(e,Wd,sg):(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))):_p(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 cT(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>=ic&&i<=16||e>=Qa)t._tickround="M";else if(e>=Wd&&i<=19||e>=ic)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&&(lc(t.exponentformat)&&!bp(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"?fT:sT,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=yp(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"?fT:sT,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=gp(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"?G3(t,i,r,o):l==="log"?U3(t,i,r,o,h):l==="category"?V3(t,i):l==="multicategory"?X3(t,i,r):_p(t)?W3(t,i,r,o,h):Y3(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 gp(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 G3(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 U3(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"||lc(u)&&bp(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 V3(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function X3(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 Y3(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 W3(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=q3(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 q3(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 Z3=["f","p","n","μ","m","","k","M","G","T"];function lc(t){return t==="SI"||t==="B"}function bp(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]};cT(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"){lc(o)&&bp(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":lc(o)&&(t+=Z3[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&&th(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),th(e,h,a,!0),th(e,e.shift||0,a,!1)}(r.skipTitle!==!0||e._shift===void 0)&&(e._shift=f$(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]=e$(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 E=K3(e,b);S=De.clipEnds(e,E),T=D?S:E}else S=De.clipEnds(e,b),T=D&&e.ticklabelmode!=="period"?S:b;var R=e._gridVals=S,N=J3(e,b);if(!s._hasOnlyLargeSploms){var H=e._subplotsWith,F={};for(n=0;n<H.length;n++){o=H[n],l=s._plots[o];var $=l[u+"axis"],A=$._mainAxis._id;if(!F[A]){F[A]=1;var M=c==="x"?"M0,"+$._offset+"v"+$._length:"M"+$._offset+",0h"+$._length;De.drawGrid(t,e,{vals:R,counterAxis:$,layer:l.gridlayer.select("."+f),minorLayer:l.minorGridlayer.select("."+f),path:M,transFn:_}),De.drawZeroLine(t,e,{counterAxis:$,layer:l.zerolinelayer,path:M,transFn:_})}}}var C,P=De.getTickSigns(e),I=De.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var j=De.makeTickPath(e,m,P[2]),B=De.makeTickPath(e,m,I[2],{minor:!0}),G,O,W,V;if(e._anchorAxis&&e.mirror&&e.mirror!==!0?(G=De.makeTickPath(e,y,P[3]),O=De.makeTickPath(e,y,I[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?P[0]:I[0],{minor:ue})+De.makeTickPath(e,xe,ue?P[1]:I[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*nc:0);return De.drawLabels(t,e,{vals:Q3(e,b),layer:d,cls:f+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:_,labelFns:De.makeLabelFns(e,m+Le*P[4])})}),le.push(function(){return e._depth=P[4]*(x("tick2")[e.side]-m),r$(t,e,{vals:N,layer:d,path:De.makeTickPath(e,m,P[4],{len:e._depth}),transFn:_})})}else e.title.hasOwnProperty("standoff")&&le.push(function(){e._depth=P[4]*(x()[e.side]-m)});var ge=Vl.getComponentMethod("rangeslider","isVisible")(e);return!r.skipTitle&&!(ge&&e.side==="bottom")&&le.push(function(){return a$(t,e)}),le.push(function(){var Te=e.side.charAt(0),Le=D3[e.side].charAt(0),_e=De.getPxPosition(t,e),ze=L?e.ticklen:0,ce,ye,Pe,Re;(e.automargin||ge||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,ze))));var K=0,ke=0;if(e._shiftPusher&&(K=Math.max(ze,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+=Jd(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,ze),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,ze),ye[Te]=e._depth-pe):(e._depth=Math.max(ce.height>0?ce.right-_e:0,ze),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]+=Jd(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(Pe={x:0,y:0,r:0,l:0,t:0,b:0},Pe[Le]=e.linewidth,e.mirror&&e.mirror!==!0&&(Pe[Le]+=ze),e.mirror===!0||e.mirror==="ticks"?Pe[u]=e._anchorAxis.domain[re[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(Pe[u]=[e._counterDomainMin,e._counterDomainMax][re[1]]))}ge&&(Re=Vl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),typeof e.automargin=="string"&&(fg(ye,e.automargin),fg(Pe,e.automargin)),wo.autoMargin(t,xp(e),ye),wo.autoMargin(t,vT(e),Pe),wo.autoMargin(t,dT(e),Re)}),it.syncOrAsync(le)}};function fg(t,e){if(t){var r=Object.keys(rg).reduce(function(a,i){return e.indexOf(i)!==-1&&rg[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 K3(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 Q3(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(gp(t,it.interp(a[o],.5),o));return r}function J3(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 e$(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=eh(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=t$(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return Lo(r+t._offset+t.l2p(Qd(i)),a)}:function(i){return Lo(a,r+t._offset+t.l2p(Qd(i)))}};function Qd(t){return t.periodX!==void 0?t.periodX:t.x}function t$(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=oc,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+=oc),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(E){return a.indexOf(E)!==-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(E){return E.dx+y+x*E.fontSize},m.yFn=function(E){return E.dy+b+E.fontSize*w},m.anchorFn=function(E,R){if(f){if(o)return"end";if(l)return"start"}return!Kt(R)||R===0||R===180?"middle":R*g<0!==c?"end":"start"},m.heightFn=function(E,R,N){return R<-60||R>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(E){return E.dx+e-(y+E.fontSize*w)*g+x*E.fontSize},m.yFn=function(E){return E.dy+b+E.fontSize*Vs},m.anchorFn=function(E,R){return Kt(R)&&Math.abs(R)===90?"middle":S?"end":"start"},m.heightFn=function(E,R,N){return t.side==="right"&&(R*=-1),R<-30?-N:R<30?-.5*N:0}}return m};function eu(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,eu);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),tu(e,[nT]),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,eu);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)}}tu(e,[Zd,Kd])}};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 P3(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),tu(e,[qd])};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:[],eu),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)}),tu(e,[tg]),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 P=Jr.select(this),I=P.select(".text-math-group"),j=l.anchorFn(C,M),B=r.transFn.call(P.node(),C)+(Kt(M)&&+M!=0?" rotate("+M+","+l.xFn(C)+","+(l.yFn(C)-C.fontSize/2)+")":""),G=oo.lineCount(P),O=nc*C.fontSize,W=l.heightFn(C,Kt(M)?+M:0,(G-1)*O);if(W&&(B+=Lo(0,W)),I.empty()){var V=P.select("text");V.attr({transform:B,"text-anchor":j}),V.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var Z=Or.bBox(I.node()).width,X=Z*{end:-.5,start:.5}[j];I.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",P=0,I=C?t._fullLayout.width:t._fullLayout.height;if(A.indexOf("domain")!==-1){var j=it.simpleMap(e.range,e.r2l);P=e.l2p(j[0])+e._offset,I=e.l2p(j[1])+e._offset}var B=Math.min(P,I),G=Math.max(P,I),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 P in a._plots){var I=a._plots[P];e._id!==I.xaxis._id&&e._id!==I.yaxis._id||C.push(M?I.yaxis:I.xaxis)}C.forEach(function(j,B){j&&Wl(j)&&(A||[qd,Kd,Zd,nT,tg]).forEach(function(G){var O=G.K==="tick"&&G.L==="text"&&e.ticklabelmode==="period",W=a._plots[e._mainSubplot],V;G.K===qd.K?V=W.zerolinelayer.selectAll("."+e._id+"zl"):G.K===Kd.K?V=W.minorGridlayer.selectAll("."+e._id):G.K===Zd.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?Qd(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,P=1;if(c.each(function(ze){A=Math.max(A,ze.fontSize);var ce=e.l2p(ze.x),ye=eh(this),Pe=Or.bBox(ye.node());P=Math.max(P,oo.lineCount(ye)),M.push({top:0,bottom:10,height:10,left:ce-Pe.width/2,right:ce+Pe.width/2+2,width:Pe.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var I=2;for(e.ticks&&(I+=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])<I||j[1]!==null&&e.l2p(j[1])-B.right<I){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(ze){return W.indexOf(ze)!==-1},Z=V("top"),X=V("left"),Q=V("right"),te=V("bottom"),xe=te||X||Z||Q,ue=xe?(e.tickwidth||0)+2*oc:0,ae=O,le=A*1.25*P,de=Math.sqrt(Math.pow(ae,2)+Math.pow(le,2)),ge=ae/de,Te=e.autotickangles.map(function(ze){return ze*Math.PI/180}),Le=Te.find(function(ze){return Math.abs(Math.cos(ze))<=ge});Le===void 0&&(Le=Te.reduce(function(ze,ce){return Math.abs(Math.cos(ze))<Math.abs(Math.cos(ce))?ze: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,P){var I=eh(this),j=I.select(".text-math-group");if(j.empty()){var B;e._vals[P]&&(B=e._vals[P].bb||Or.bBox(I.node()),e._vals[P].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)&&!E3(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*oc,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]),E=a._insideTickLabelsUpdaterange[b._name+".range"];if(E){var R=b.d2p(E[_]),N=b.d2p(E[k]),H=x*(e._id.charAt(0)==="y"?1:-1);H*D<H*R&&(D=R,T[_]=S[_]=E[_]),H*L>H*N&&(L=N,T[k]=S[k]=E[k])}var F=Math.abs(L-D);F-g>0?(F-=g,g*=1+g/F):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 $=it.syncOrAsync(m);return $&&$.then&&t._promises.push($),$};function r$(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,eu);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 Jd(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*nc):e*dn:r?e*(r+1)*nc:e}function a$(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+Jd(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,A3.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)&&(uT(e,0)||!i$(t,e,r,a)||n$(t,e))};De.clipEnds=function(t,e){return e.filter(function(r){return uT(t,r.x)})};function uT(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function i$(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 n$(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 eh(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,xp(a)),a.mirror&&wo.allowAutoMargin(t,vT(a))),Vl.getComponentMethod("rangeslider","isVisible")(a)&&wo.allowAutoMargin(t,dT(a))}};function xp(t){return t._id+".automargin"}function vT(t){return xp(t)+".mirror"}function dT(t){return t._id+".rangeslider"}De.swap=function(t,e){for(var r=o$(t,e),a=0;a<r.length;a++)l$(t,r[a].x,r[a].y)};function o$(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 l$(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(M3),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"),s$(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 s$(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 _p(t){return t._id==="angularaxis"}function Ku(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 tu(t,e){Wl(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function th(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 f$(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}var Dt=_w.exports,c$=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")},u$=c$,hT=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&&(u$(a,c,l),(o==="linear"||o==="-")&&a("rangemode")),r.cleanRange()},wp={},pT={exports:{}},v$=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},cg=me,d$=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],h$=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=cg.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=cg.constrain(Math.floor(r*3),0,2),d$[r][e]},mT={exports:{}},p$=ds,m$=Vc,y$=Oc.getGraphDiv,g$=zc,rh=mT.exports={};rh.wrapped=function(t,e,r){t=y$(t),t._fullLayout&&m$.clear(t._fullLayout._uid+g$.HOVERID),rh.raw(t,e,r)};rh.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&p$.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 b$=mT.exports,x$=ZM,Qu=c_,_$=u_,w$=me.removeElement,T$=Lr,yn=pT.exports={};yn.align=v$;yn.getCursor=h$;var yT=b$;yn.unhover=yT.wrapped;yn.unhoverRaw=yT.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,_$?(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=Ju(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=gT(),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=Ju(w),x=e.minDrag||T$.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?w$(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=Ju(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 gT(){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=gT;function Ju(t){return x$(t.changedTouches?t.changedTouches[0]:t,document.body)}var Oa=pT.exports,ru={},Ri=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},ev=Ri,sl="data-savedcursor",ug="!!",k$=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,ug)}ev(e,r)}else a&&(e.attr(sl,null),a===ug?ev(e):ev(e,a))},tv=vr,A$=xr,bT={_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:A$.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:tv({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:tv({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:tv({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 rv=Je,Pr=me,M$=Lt,S$=la,L$=bT,C$=vs,av=Yo;function D$(t,e,r,a){var i=e[t]||{},n=M$.newContainer(r,t);function o($,A){return Pr.coerce(i,n,L$,$,A)}var l=Pr.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var f,c=function($,A){var M=f._input,C=f;return Pr.coerce(M,C,S$,$,A)},u=r.font||{},v=Pr.coerceFont(o,"grouptitlefont",Pr.extendFlat({},u,{size:Math.round(u.size*1.1)})),h=0,d=!1,p="normal",m=(r.shapes||[]).filter(function($){return $.showlegend}),y=a.concat(m).filter(function($){return t===($.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&&rv.traceIs(f,"pie-like")||f._input.showlegend===!0)&&h++),Pr.coerceFont(c,"legendgrouptitle.font",v)),(!w&&rv.traceIs(f,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(f.fill)!==-1)&&(p=av.isGrouped({traceorder:p})?"grouped+reversed":"reversed"),f.legendgroup!==void 0&&f.legendgroup!==""&&(p=av.isReversed({traceorder:p})?"reversed+grouped":"grouped")}var g=Pr.coerce(e,r,C$,"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,E,R,N="left";T?(L=0,rv.getComponentMethod("rangeslider","isVisible")(e.xaxis)?S?(E=1.1,R="bottom"):(E=1,R="top"):S?(E=-.1,R="top"):(E=0,R="bottom")):(E=1,R="auto",D?L=1.02:(L=1,N="right")),Pr.coerce(i,n,{x:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:L}},"x"),Pr.coerce(i,n,{y:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:E}},"y"),o("traceorder",p),av.isGrouped(r[t])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",N),o("yanchor",R),o("valign"),Pr.noneOrAll(i,n,["x","y"]);var H=o("title.text");if(H){o("title.side",T?"left":"top");var F=Pr.extendFlat({},l,{size:Pr.bigFont(l.size)});Pr.coerceFont(o,"title.font",F)}}}}var xT=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++)Pr.pushUnique(f,n[i].legend);for(r._legends=[],i=0;i<f.length;i++){var c=f[i];D$(c,e,r,n),r[c]&&r[c].visible&&(r[c]._id=c),r._legends.push(c)}},fi=Je,If=me,$$=If.pushUnique,iv=!0,P$=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"&&iv&&r.data&&r._context.showTips&&If.notifier(If._(r,"Double-click on legend to isolate one trace"),"long"),iv=!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,ze){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]=ze,ce}var E=(i.shapes||[]).map(function(_e){return _e._input}),R=!1;function N(_e,ze){E[_e].visible=ze,R=!0}function H(_e,ze){if(!(u.groupTitle&&!f)){var ce=_e._fullInput||_e,ye=ce._isShape,Pe=ce.index;if(Pe===void 0&&(Pe=ce._index),fi.hasTransform(ce,"groupby")){var Re=S[Pe];if(!Re){var K=fi.getTransformIndices(ce,"groupby"),ke=K[K.length-1];Re=If.keyedContainer(ce,"transforms["+ke+"].styles","target","value.visible"),S[Pe]=Re}var re=Re.get(_e._group);re===void 0&&(re=!0),re!==!1&&Re.set(_e._group,ze),D[Pe]=L(Pe,ce.visible!==!1)}else{var pe=ce.visible===!1?!1:ze;ye?N(Pe,pe):L(Pe,pe)}}}var F=p.legend,$=p._fullInput,A=$&&$._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 P=C!==-1,I=[];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;F===j[0].trace.legend&&M!==G&&(c.indexOf(G)===-1&&(P=!0),$$(c,G),I.push(G))}}if(!P)for(var O=0;O<I.length;O++){var W=c.indexOf(I[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,ge=!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===F&&de.visible===!0&&!fi.traceIs(de,"notLegendIsolatable"))){ge=!1;break}for(y=0;y<d.length;y++)if(de=d[y],!(de.visible===!1||de.legend!==F)&&!fi.traceIs(de,"notLegendIsolatable"))switch(p.visible){case"legendonly":H(de,!0);break;case!0:le=ge?!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);R?fi.call("_guiUpdate",r,k,{shapes:E},T):fi.call("_guiRestyle",r,k,T)}},_T={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},vg=Je,nv=Yo,E$=function(e,r,a){var i=r._inHover,n=nv.isGrouped(r),o=nv.isReversed(r),l={},s=[],f=!1,c={},u=0,v=0,h,d;function p($,A,M){if(r.visible!==!1&&!(a&&$!==r._id))if(A===""||!nv.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(vg.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($,A){return $[0]._groupMinRank-A[0]._groupMinRank||$[0]._preGroupSort-A[0]._preGroupSort},E=function($,A){return $.trace.legendrank-A.trace.legendrank||$._preSort-A._preSort};for(k.forEach(function($,A){$[0]._preGroupSort=A}),k.sort(L),h=0;h<k.length;h++){k[h].forEach(function($,A){$._preSort=A}),k[h].sort(E);var R=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 F=!1;for(d=0;d<k[h].length;d++)if(vg.traceIs(k[h][d].trace,"pie-like")){F=!0;break}k[h].unshift({i:-1,groupTitle:N,noClick:F,trace:{showlegend:R.showlegend,legendgroup:R.legendgroup,visible:r.groupclick==="toggleitem"?!0:R.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 R$=xt,z$=ot,I$=function(e,r,a,i){var n=a.marker.pattern;n&&n.shape?R$.pointStyle(e,a,i,r):z$.fill(e,r.color)},dg=ot,hg=Ln.castOption,F$=I$,Tp=function(e,r,a,i){var n=a.marker.line,o=hg(n.color,r.pts)||dg.defaultLine,l=hg(n.width,r.pts)||0;e.call(F$,r,a,i).style("stroke-width",l).call(dg.stroke,o)},yr=ft,ov=Je,hr=me,pg=hr.strTranslate,Ar=xt,Xr=ot,lv=ka.extractOpts,sc=_r,N$=Tp,H$=Ln.castOption,O$=_T,mg=12,yg=5,Xi=2,j$=10,Fn=5,wT=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+O$.itemGap*2)/2,s=pg(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,E=k[0].height;if(D==="middle"||!L||!E)S.attr("transform",null);else{var R={top:1,bottom:-1}[D],N=R*(.5*(L-E+3));S.attr("transform",pg(0,N))}var H=S.selectAll("g.legendfill").data([k]);H.enter().append("g").classed("legendfill",!0);var F=S.selectAll("g.legendlines").data([k]);F.enter().append("g").classed("legendlines",!0);var $=S.selectAll("g.legendsymbols").data([k]);$.enter().append("g").classed("legendsymbols",!0),$.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=gg(k),S=T.showFill,D=T.showLine,L=T.showGradientLine,E=T.showGradientFill,R=T.anyFill,N=T.anyLine,H=k[0],F=H.trace,$,A,M=lv(F),C=M.colorscale,P=M.reversescale,I=function(Z){if(Z.size())if(S)Ar.fillGroupStyle(Z,r);else{var X="legendfill-"+F.uid;Ar.gradient(Z,r,X,sv(P),C,"fill")}},j=function(Z){if(Z.size()){var X="legendline-"+F.uid;Ar.lineGroupStyle(Z),Ar.gradient(Z,r,X,sv(P),C,"stroke")}},B=sc.hasMarkers(F)||!R?"M5,0":N?"M5,-2":"M5,-3",G=yr.select(this),O=G.select(".legendfill").selectAll("path").data(S||E?[k]:[]);if(O.enter().append("path").classed("js-fill",!0),O.exit().remove(),O.attr("d",B+"h"+o+"v6h-"+o+"z").call(I),D||L){var W=f(void 0,F.line,j$,yg);A=hr.minExtend(F,{line:{width:W}}),$=[hr.minExtend(H,{trace:A})]}var V=G.select(".legendlines").selectAll("path").data(D||L?[$]:[]);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=gg(k),S=T.anyFill,D=T.anyLine,L=T.showLine,E=T.showMarker,R=k[0],N=R.trace,H=!E&&!D&&!S&&sc.hasText(N),F,$;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 R._distinct&&R.index&&O[R.index]?O[R.index]:O[0]}if(E||H||L){var C={},P={};if(E){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),P.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var I=A("marker.size",hr.mean,[2,16],mg);C.ms=I,P.marker.size=I}L&&(P.line={width:A("line.width",M,[0,10],yg)}),H&&(C.tx="Aa",C.tp=A("textposition",M),C.ts=10,C.tc=A("textfont.color",M),C.tf=A("textfont.family",M)),F=[hr.minExtend(R,C)],$=hr.minExtend(N,P),$.selectedpoints=null,$.texttemplate=null}var j=yr.select(this).select("g.legendpoints"),B=j.selectAll("path.scatterpts").data(E?F:[]);B.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),B.exit().remove(),B.call(Ar.pointStyle,$,r),E&&(F[0].mrc=3);var G=j.selectAll("g.pointtext").data(H?F:[]);G.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),G.exit().remove(),G.selectAll("text").call(Ar.textPointStyle,$,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 E=yr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(L);E.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(R){var N=yr.select(this),H=T[R[0]].marker,F=f(void 0,H.line,Fn,Xi);N.attr("d",R[1]).style("stroke-width",F+"px").call(Xr.fill,H.color),F&&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||{},E=L.line||{},R=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:ov.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",R).attr("transform",s),H.exit().remove(),H.each(function(F){var $=yr.select(this),A=F[0],M=f(A.mlw,L.line,Fn,Xi);$.style("stroke-width",M+"px");var C=A.mcc;if(!a._inHover&&"mc"in A){var P=lv(L),I=P.mid;I===void 0&&(I=(P.max+P.min)/2),C=Ar.tryColorscale(L,"")(I)}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=bg(B.size,8,10),X=bg(B.solidity,.5,1),Q="legend-"+D.uid;$.call(Ar.pattern,"legend",r,Q,G,Z,X,C,B.fillmode,O,W,V)}else $.call(Xr.fill,j);M&&Xr.stroke($,A.mlc||E.color)})}function m(k){var T=k[0].trace,S=yr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(T.visible&&ov.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?mg:hr.constrain(T.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(Ar.pointStyle,L,r)}else{var E=f(void 0,T.line,Fn,Xi);D.style("stroke-width",E+"px").call(Xr.fill,T.fillcolor),E&&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 E=yr.select(this),R=T[L?"increasing":"decreasing"],N=f(void 0,R.line,Fn,Xi);E.style("stroke-width",N+"px").call(Xr.fill,R.fillcolor),N&&Xr.stroke(E,R.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 E=yr.select(this),R=T[L?"increasing":"decreasing"],N=f(void 0,R.line,Fn,Xi);E.style("fill","none").call(Ar.dashLine,R.line.dash,N),N&&Xr.stroke(E,R.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,E=S?L.visible&&L.type===S:ov.traceIs(L,S),R=yr.select(T).select("g.legendpoints").selectAll("path.legend"+S).data(E?[k]:[]);if(R.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),R.exit().remove(),R.size()){var N=L.marker||{},H=f(H$(N.line.width,D.pts),N.line,Fn,Xi),F="pieLike",$=hr.minExtend(L,{marker:{line:{width:H}}},F),A=hr.minExtend(D,{trace:$},F);N$(R,A,$,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(E,R){var N=yr.select(this),H=lv(T),F=H.colorscale,$=H.reversescale,A=function(I){if(I.size()){var j="legendfill-"+T.uid;Ar.gradient(I,r,j,sv($,S==="radial"),F,"fill")}},M;if(F){if(!S){var P=F.length;M=R===0?F[$?P-1:0][1]:R===1?F[$?0:P-1][1]:F[Math.floor((P-1)/2)][1]}}else{var C=T.vertexcolor||T.facecolor||T.color;M=hr.isArrayOrTypedArray(C)?C[R]||C[0]:C}N.attr("d",E[0]),M?N.call(Xr.fill,M):N.call(A)})}};function sv(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function gg(t){var e=t[0].trace,r=e.contours,a=sc.hasLines(e),i=sc.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 bg(t,e,r){return t&&hr.isArrayOrTypedArray(t)?e:t>r?r:t}var Rr=ft,Gt=me,ah=Qt,xi=Je,xg=ds,fv=Oa,Zt=xt,Ff=ot,hn=nr,_g=P$,tr=_T,kp=Cr,TT=kp.LINE_SPACING,mo=kp.FROM_TL,wg=kp.FROM_BR,Tg=E$,B$=wT,kg=Yo,lo=1,G$=/^legend[0-9]*$/,kT=function(e,r){if(r)Ag(e,r);else{var a=e._fullLayout,i=a._legends,n=a._infolayer.selectAll('[class^="legend"]');n.each(function(){var f=Rr.select(this),c=f.attr("class"),u=c.split(" ")[0];u.match(G$)&&i.indexOf(u)===-1&&f.remove()});for(var o=0;o<i.length;o++){var l=i[o],s=e._fullLayout[l];Ag(e,s)}}};function U$(t,e,r){if(!(e.title.side!=="top center"&&e.title.side!=="top right")){var a=e.title.font,i=a.size*TT,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 Ag(t,e){var r=e||{},a=t._fullLayout,i=au(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=Tg(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&&Tg(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(),ah.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(Ff.stroke,r.bordercolor).call(Ff.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(Ff.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(){Rr.select(this).call(V$,t,r)}).call(B$,t,r).each(function(){l||Rr.select(this).call(X$,t,i)}),Gt.syncOrAsync([ah.previousPromises,function(){return q$(t,_,k,r)},function(){var T=a._size,S=r.borderwidth,D=r.xref==="paper",L=r.yref==="paper";if(w.text&&U$(g,r,S),!l){var E,R;D?E=T.l+T.w*r.x-mo[fc(r)]*r._width:E=a.width*r.x-mo[fc(r)]*r._width,L?R=T.t+T.h*(1-r.y)-mo[cc(r)]*r._effHeight:R=a.height*(1-r.y)-mo[cc(r)]*r._effHeight;var N=Z$(t,i,E,R);if(N)return;if(a.margin.autoexpand){var H=E,F=R;E=D?Gt.constrain(E,0,a.width-r._width):H,R=L?Gt.constrain(R,0,a.height-r._effHeight):F,E!==H&&Gt.log("Constrain "+i+".x to make legend fit inside graph"),R!==F&&Gt.log("Constrain "+i+".y to make legend fit inside graph")}Zt.setTranslate(p,E,R)}if(x.on(".drag",null),p.on("wheel",null),l||r._height<=r._maxHeight||t._context.staticPlot){var $=r._effHeight;l&&($=r._height),y.attr({width:r._width-S,height:$-S,x:S/2,y:S/2}),Zt.setTranslate(b,0,0),m.select("rect").attr({width:r._width-2*S,height:$-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,P=M/C,I=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+I}),Zt.setClipUrl(b,n,t),X(I,A,P),p.on("wheel",function(){I=Gt.constrain(r._scrollY+Rr.event.deltaY/M*C,0,C),X(I,A,P),I!==0&&I!==C&&Rr.event.preventDefault()});var j,B,G,O=function(ae,le,de){var ge=(de-le)/P+ae;return Gt.constrain(ge,0,C)},W=function(ae,le,de){var ge=(le-de)/P+ae;return Gt.constrain(ge,0,C)},V=Rr.behavior.drag().on("dragstart",function(){var ae=Rr.event.sourceEvent;ae.type==="touchstart"?j=ae.changedTouches[0].clientY:j=ae.clientY,G=I}).on("drag",function(){var ae=Rr.event.sourceEvent;ae.buttons===2||ae.ctrlKey||(ae.type==="touchmove"?B=ae.changedTouches[0].clientY:B=ae.clientY,I=O(G,j,B),X(I,A,P))});x.call(V);var Z=Rr.behavior.drag().on("dragstart",function(){var ae=Rr.event.sourceEvent;ae.type==="touchstart"&&(j=ae.changedTouches[0].clientY,G=I)}).on("drag",function(){var ae=Rr.event.sourceEvent;ae.type==="touchmove"&&(B=ae.changedTouches[0].clientY,I=W(G,j,B),X(I,A,P))});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),fv.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,ge=ue+le;Zt.setTranslate(p,de,ge),Q=fv.align(de,r._width,T.l,T.l+T.w,r.xanchor),te=fv.align(ge+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 ge=this.getBoundingClientRect();return le.clientX>=ge.left&&le.clientX<=ge.right&&le.clientY>=ge.top&&le.clientY<=ge.bottom});de.size()>0&&AT(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 AT(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=xg.triggerHandler(t,"plotly_legendclick",o);if(a===1){if(l===!1)return;e._clickTimeout=setTimeout(function(){t._fullLayout&&_g(r,t,a)},t._context.doubleClickDelay)}else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=xg.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&_g(r,t,a)}}function V$(t,e,r){var a=au(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?Mg(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(Mg(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 Mg(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 X$(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(Ff.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)),AT(e,l,t,n,Rr.event)}}))}function Nf(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),hn.convertToTspans(t,r,function(){Y$(e,r,a,i)})}function Y$(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=au(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*TT,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 W$(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 q$(t,e,r,a){var i=t._fullLayout,n=au(a);a||(a=i[n]);var o=i._size,l=kg.isVertical(a),s=kg.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=cc(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=W$(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 _=fc(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,E=0;r.each(function(G){var O=Ws(G,a,h);L=Math.max(L,O),E+=O}),g=null;var R=0;if(s){var N=0,H=0,F=0;e.each(function(){var G=0,O=0;Rr.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?(R=Math.max(R,H),H=0,F+=N+b,N=O):N=Math.max(N,O),Zt.setTranslate(this,H,F),H+=W}),a._width=Math.max(R,H)+c,a._height=F+N+d}else{var $=r.size(),A=E+u+($-1)*v<a._maxWidth,M=0,C=0,P=0,I=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&&(R=Math.max(R,I),C=0,P+=M,a._height+=M,M=0),Zt.setTranslate(this,x[0]+c+C,x[1]+c+P+O/2+v),I=C+W+v,C+=V,M=Math.max(M,O)}),A?(a._width=C+u,a._height=M+d):(a._width=Math.max(R,I)+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=Rr.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 Z$(t,e,r,a){var i=t._fullLayout,n=i[e],o=fc(n),l=cc(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 ah.autoMargin(t,e,{x:n.x,y:n.y,l:n._width*mo[o],r:n._width*wg[o],b:n._effHeight*wg[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 fc(t){return Gt.isRightAnchor(t)?"right":Gt.isCenterAnchor(t)?"center":"left"}function cc(t){return Gt.isBottomAnchor(t)?"bottom":Gt.isMiddleAnchor(t)?"middle":"top"}function au(t){return t._id||"legend"}var nn=ft,Ya=dt,Sg=oa,Vt=me,cv=Vt.strTranslate,K$=Vt.strRotate,Q$=ds,qr=nr,J$=k$,Pa=xt,ar=ot,qs=Oa,mi=Dt,Do=Je,ha=sa,gn=zc,e5=xT,t5=kT,MT=gn.YANGLE,Ap=Math.PI*MT/180,r5=1/Math.sin(Ap),a5=Math.cos(Ap),i5=Math.sin(Ap),kt=gn.HOVERARROWSIZE,ht=gn.HOVERTEXTPAD,Lg={box:!0,ohlc:!0,violin:!0,candlestick:!0},n5={scatter:!0,scattergl:!0,splom:!0};ru.hover=function(e,r,a,i){e=Vt.getGraphDiv(e);var n=r.target;Vt.throttle(e._fullLayout._uid+gn.HOVERID,gn.HOVERMINTIME,function(){o5(e,r,a,i,n)})};ru.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=$T(i),o=PT(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,E=L.offsetLeft,R=L.offsetTop;_+=E,k+=E,T+=R,S+=R}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=LT(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 DT(c,s,d,p),a?c:c.node()};function o5(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,E,R,N,H,F,$,A,M,C={hLinePoint:null,vLinePoint:null},P=!1;if(Array.isArray(e))for(b="array",S=0;S<e.length;S++)L=t.calcdata[e[S].curveNumber||0],L&&(E=L[0].trace,L[0].trace.hoverinfo!=="skip"&&(_.push(L),E.orientation==="h"&&(P=!0)));else{for(D=0;D<t.calcdata.length;D++)L=t.calcdata[D],E=L[0].trace,E.hoverinfo!=="skip"&&ha.isTraceInSubplots(E,n)&&(_.push(L),E.orientation==="h"&&(P=!0));var I=!i,j,B;if(I)"xpx"in e?j=e.xpx:j=v[0]._length/2,"ypx"in e?B=e.ypx:B=h[0]._length/2;else{if(Q$.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=ha.flat(n,e.xval):k=ha.p2c(v,j),"yval"in e?T=ha.flat(n,e.yval):T=ha.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)&&(E=L[0].trace,!(E.visible!==!0||E._length===0)&&["carpet","contourcarpet"].indexOf(E._module.name)===-1)){if(E.type==="splom"?(N=0,R=n[N]):(R=ha.getSubplot(E),N=n.indexOf(R)),H=b,ha.isUnifiedHover(H)&&(H=H.charAt(0)),A={cd:L,trace:E,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:E.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[R]&&(A.subplot=o[R]._subplot),o._splomScenes&&o._splomScenes[E.uid]&&(A.scene=o._splomScenes[E.uid]),M=x.length,H==="array"){var oe=e[D];"pointNumber"in oe?(A.index=oe.pointNumber,H="closest"):(H="","xval"in oe&&(F=oe.xval,H="x"),"yval"in oe&&($=oe.yval,H=H?"closest":"y"))}else U!==void 0&&q!==void 0?(F=U,$=q):(F=k[N],$=T[N]);if(w!==0)if(E._module&&E._module.hoverPoints){var ee=E._module.hoverPoints(A,F,$,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(c5(Ce,b))}else Vt.log("Unrecognized trace type in hover:",E);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=E._module.hoverPoints(A,F,$,"closest",{hoverLayer:o._hoverlayer});if(he&&(he=he.filter(function(nt){return nt.spikeDistance<=g})),he&&he.length){var ne,Ee=he.filter(function(nt){return nt.xa.showspikes&&nt.xa.spikesnap!=="hovered data"});if(Ee.length){var je=Ee[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=v5(x,b)};xe();var ue=b.charAt(0),ae=(ue==="x"||ue==="y")&&x[0]&&n5[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 ge=x.filter(function(U){return U.xa.showspikes}),Te=Z(ge,g,ae);C.vLinePoint=X(Te)}if(x.length===0){var Le=qs.unhoverRaw(t,e);return f&&(C.hLinePoint!==null||C.vLinePoint!==null)&&$g()&&Dg(t,C,Q),Le}if(f&&$g()&&Dg(t,C,Q),ha.isXYhover(H)&&x[0].length!==0&&x[0].trace.type!=="splom"){var _e=x[0];Lg[_e.trace.type]?x=x.filter(function(U){return U.trace.index===_e.trace.index}):x=[_e];var ze=x.length,ce=Eg("x",_e,o),ye=Eg("y",_e,o);V(ce,ye);var Pe=[],Re={},K=0,ke=function(U){var q=Lg[U.trace.type]?ST(U):U.trace.index;if(!Re[q])K++,Re[q]=K,Pe.push(U);else{var oe=Re[q]-1,ee=Pe[oe];oe>0&&Math.abs(U.distance)<Math.abs(ee.distance)&&(Pe[oe]=U)}},re;for(re=0;re<ze;re++)ke(x[re]);for(re=x.length-1;re>ze-1;re--)ke(x[re]);x=Pe,xe()}var pe=t._hoverdata,we=[],se=$T(t),ie=PT(t);for(S=0;S<x.length;S++){var fe=x[S],be=ha.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,$e=fe.x1+fe.xa._offset,He=fe.y0+fe.ya._offset,Oe=fe.y1+fe.ya._offset,ve=Math.min(Se,$e),Be=Math.max(Se,$e),Ne=Math.min(He,Oe),We=Math.max(He,Oe);be.bbox={x0:ve+ie,x1:Be+ie,y0:Ne+se,y1:We+se}}fe.eventData=[be],we.push(be)}t._hoverdata=we;var Ge=b==="y"&&(_.length>1||x.length>1)||b==="closest"&&P&&x.length>1,Ve=ar.combine(o.plot_bgcolor||ar.background,o.paper_bgcolor),Ue=LT(x,{gd:t,hovermode:b,rotateLabels:Ge,bgColor:Ve,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance}),z=Ue.hoverLabels;if(ha.isUnifiedHover(b)||(s5(z,Ge,o,Ue.commonLabelBoundingBox),DT(z,Ge,o._invScaleX,o._invScaleY)),i&&i.tagName){var Y=Do.getComponentMethod("annotations","hasClickToShow")(t,we);J$(nn.select(i),Y?"pointer":"")}!i||a||!u5(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 ST(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 l5=/<extra>([\s\S]*)<\/extra>/;function LT(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 E=l.selectAll("g.axistext").data(k?[0]:[]);E.enter().append("g").classed("axistext",!0),E.exit().remove();var R={minX:0,maxX:0,minY:0,maxY:0};if(E.each(function(){var ce=nn.select(this),ye=Vt.ensureSingle(ce,"path","",function(We){We.style({"stroke-width":"1px"})}),Pe=Vt.ensureSingle(ce,"text","",function(We){We.attr("data-notex",1)}),Re=f.bgcolor||ar.defaultLine,K=f.bordercolor||ar.contrast(Re),ke=ar.contrast(Re),re={family:f.font.family||c,size:f.font.size||u,color:f.font.color||ke};ye.style({fill:Re,stroke:K}),Pe.text(y).call(Pa.font,re).call(qr.positionText,0,0).call(qr.convertToTspans,r),ce.attr("transform","");var pe=Nn(r,Pe.node()),we,se;if(i==="x"){var ie=h.side==="top"?"-":"";Pe.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"),R.minX=we-fe,R.maxX=we+fe,h.side==="top"?(R.minY=se-(ht*2+pe.height),R.maxY=se-ht):(R.minY=se+ht,R.maxY=se+(ht*2+pe.height))}else{var be,Me,Se;d.side==="right"?(be="start",Me=1,Se="",we=h._offset+h._length):(be="end",Me=-1,Se="-",we=h._offset),se=d._offset+(v.y0+v.y1)/2,Pe.attr("text-anchor",be),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"),R.minY=se-(ht+pe.height/2),R.maxY=se+(ht+pe.height/2),d.side==="right"?(R.minX=we+kt,R.maxX=we+kt+(ht*2+pe.width)):(R.minX=we-kt-(ht*2+pe.width),R.maxX=we-kt);var $e=pe.height/2,He=g-pe.top-$e,Oe="clip"+a._uid+"commonlabel"+d._id,ve;if(we<pe.width+2*ht+kt){ve="M-"+(kt+ht)+"-"+$e+"h-"+(pe.width-ht)+"V"+$e+"h"+(pe.width-ht)+"Z";var Be=pe.width-we+ht;qr.positionText(Pe,Be,He),be==="end"&&Pe.selectAll("tspan").each(function(){var We=nn.select(this),Ge=Pa.tester.append("text").text(We.text()).call(Pa.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(Pe,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),Pa.setClipUrl(Pe,ve?Oe:null,r)}ce.attr("transform",cv(we,se))}),ha.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,F=H.font,$={showlegend:!0,legend:{title:{text:y,font:F},font:F,bgcolor:H.bgcolor,bordercolor:H.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},A={font:F};e5($,A,r._fullData);var M=A.legend;M.entries=[];for(var C=0;C<N.length;C++){var P=N[C];if(P.hoverinfo!=="none"){var I=Cg(P,!0,i,a,y),j=I[0],B=I[1];P.name=B,B!==""?P.text=B+" : "+j:P.text=j;var G=P.cd[P.index];G&&(G.mc&&(P.mc=G.mc),G.mcc&&(P.mc=G.mcc),G.mlc&&(P.mlc=G.mlc),G.mlcc&&(P.mlc=G.mlcc),G.mlw&&(P.mlw=G.mlw),G.mrc&&(P.mrc=G.mrc),G.dir&&(P.dir=G.dir)),P._distinct=!0,M.entries.push([P])}}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,t5(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 ge=h._offset,Te=d._offset;ue+=Te,le+=ge,de+=ge-V,ae+=Te-Z;var Le,_e;return le+V<x&&le>=0?Le=le:de+V<x&&de>=0?Le=de:ge+V<x?Le=ge: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",cv(Le-1,_e-1)),O}var ze=l.selectAll("g.hovertext").data(t,function(ce){return ST(ce)});return ze.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(Pa.font,c,u)}),ze.exit().remove(),ze.each(function(ce){var ye=nn.select(this).attr("transform",""),Pe=ce.color;Array.isArray(Pe)&&(Pe=Pe[ce.eventData[0].pointNumber]);var Re=ce.bgcolor||Pe,K=ar.combine(ar.opacity(Re)?Re:ar.defaultLine,o),ke=ar.combine(ar.opacity(Pe)?Pe:ar.defaultLine,o),re=ce.borderColor||ar.contrast(K),pe=Cg(ce,k,i,a,y,ye),we=pe[0],se=pe[1],ie=ye.select("text.nums").call(Pa.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"),be=0,Me=0;if(se&&se!==we){fe.call(Pa.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());be=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 $e=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=be,ce.offset=0;var Ge=(Ne+kt+ht+be)*a._invScaleX,Ve,Ue;if(n)ce.pos=$e,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=$e+Oe/2+Ge<=x,Ue=$e-Oe/2-Ge>=0,(ce.idealAlign==="left"||!Ve)&&Ue)$e-=Oe/2,ce.anchor="end";else if(Ve)$e+=Oe/2,ce.anchor="start";else{ce.anchor="middle";var z=Ge/2,Y=$e+z-x,U=$e-z;Y>0&&($e-=Y),U<0&&($e+=-U)}ce.crossPos=$e}ie.attr("text-anchor",ce.anchor),be&&fe.attr("text-anchor",ce.anchor),ye.attr("transform",cv($e,He)+(n?K$(MT):""))}),{hoverLabels:ze,commonLabelBoundingBox:R}}function Cg(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=Pg(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(l5,function(v,h){return o=Pg(h,t.nameLength),""})}return[l,o]}function s5(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(F){return F*r._invScaleX},m=function(F){return F*r._invScaleY};t.each(function(F){var $=F[i],A=F[n],M=$._id.charAt(0)==="x",C=$.range;c===0&&C&&C[0]>C[1]!==M&&(l=-1);var P=0,I=M?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var j=CT(F,e),B=F.anchor,G=B==="end"?-1:1,O,W;if(B==="middle")O=F.crossPos+(M?m(j.y-F.by/2):p(F.bx/2+F.tx2width/2)),W=O+(M?m(F.by):p(F.bx));else if(M)O=F.crossPos+m(kt+j.y)-m(F.by/2-kt),W=O+m(F.by);else{var V=p(G*kt+j.x),Z=V+p(G*F.bx);O=F.crossPos+Math.min(V,Z),W=F.crossPos+Math.max(V,Z)}M?h!==void 0&&d!==void 0&&Math.min(W,d)-Math.max(O,h)>1&&(A.side==="left"?(P=A._mainLinePosition,I=r.width):I=A._mainLinePosition):u!==void 0&&v!==void 0&&Math.min(W,v)-Math.max(O,u)>1&&(A.side==="top"?(P=A._mainLinePosition,I=r.height):I=A._mainLinePosition)}f[c++]=[{datum:F,traceIndex:F.trace.index,dp:0,pos:F.pos,posref:F.posref,size:F.by*(M?r5:1)/2,pmin:P,pmax:I}]}),f.sort(function(F,$){return F[0].posref-$[0].posref||l*($[0].traceIndex-F[0].traceIndex)});var y,b,w,g,x,_,k;function T(F){var $=F[0],A=F[F.length-1];if(b=$.pmin-$.pos-$.dp+$.size,w=A.pos+A.dp+A.size-$.pmax,b>.01){for(x=F.length-1;x>=0;x--)F[x].dp+=b;y=!1}if(!(w<.01)){if(b<-.01){for(x=F.length-1;x>=0;x--)F[x].dp-=w;y=!1}if(y){var M=0;for(g=0;g<F.length;g++)_=F[g],_.pos+_.dp+_.size>$.pmax&&M++;for(g=F.length-1;g>=0&&!(M<=0);g--)_=F[g],_.pos>$.pmax-1&&(_.del=!0,M--);for(g=0;g<F.length&&!(M<=0);g++)if(_=F[g],_.pos<$.pmin+1)for(_.del=!0,M--,w=_.size*2,x=F.length-1;x>=0;x--)F[x].dp-=w;for(g=F.length-1;g>=0&&!(M<=0);g--)_=F[g],_.pos+_.dp+_.size>$.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],E=D[0];if(b=L.pos+L.dp+L.size-E.pos-E.dp+E.size,b>.01&&L.pmin===E.pmin&&L.pmax===E.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 R=f[g];for(x=R.length-1;x>=0;x--){var N=R[x],H=N.datum;H.offset=N.dp,H.del=N.del}}}function CT(t,e){var r=0,a=t.offset;return e&&(a*=-i5,r=t.offset*a5),{x:r,y:a}}function f5(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 DT(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=f5(o),v=CT(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(Pa.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 c5(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 Dg(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=Sg.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":Pa.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 E=f.spikesnap;E==="cursor"?(D=o.pointerX,L=o.pointerY):(D=f._offset+S.x,L=c._offset+S.y);var R=Sg.readability(S.color,u)<1.5?ar.contrast(u):S.color,N=f.spikemode,H=f.spikethickness,F=f.spikecolor||R,$=mi.getPxPosition(t,f),A,M;if(N.indexOf("toaxis")!==-1||N.indexOf("across")!==-1){if(N.indexOf("toaxis")!==-1&&(A=$,M=L),N.indexOf("across")!==-1){var C=f._counterDomainMin,P=f._counterDomainMax;f.anchor==="free"&&(C=Math.min(C,f.position),P=Math.max(P,f.position)),A=n.t+(1-P)*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:F,"stroke-dasharray":Pa.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:$-(f.side!=="top"?H:-H),r:H,fill:F}).classed("spikeline",!0)}}}function u5(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 $g(t,e){return!0}function Pg(t,e){return qr.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function v5(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 Eg(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 $T(t){return t.offsetTop+t.clientTop}function PT(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 d5=me,h5=ot,p5=sa.isUnifiedHover,Mp=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&&p5(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=h5.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),d5.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},m5=me,y5=Mp,g5=fs,b5=function(e,r){function a(i,n){return m5.coerce(e,r,g5,i,n)}y5(e,r,a)},Rg=me,x5=Ic,_5=Mp,w5=function(e,r,a,i){function n(l,s){return Rg.coerce(e,r,x5,l,s)}var o=Rg.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),_5(e,r,n,o)},T5=me,k5=fs,ET=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:T5.coerce(e,r,k5,i,n)}return a("clickmode"),a("hovermode")},zg=me,A5=fs,M5=ET,S5=Mp,L5=function(e,r){function a(f,c){return zg.coerce(e,r,A5,f,c)}var i=M5(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"),S5(e,r,a),zg.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},ih=me,Ig=Je,C5=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return ih.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!Ig.traceIs(l,"pie-like")){var s=Ig.traceIs(l,"2dMap")?D5:ih.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 D5(t,e,r,a){a=a||ih.identity,Array.isArray(t)&&(e[0][r]=a(t))}var $5=Je,P5=ru.hover,E5=function(e,r,a){var i=$5.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&P5(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())},R5=ft,uc=me,z5=Oa,fl=sa,Fg=fs,Ng=ru,wa={moduleType:"component",name:"fx",constants:zc,schema:{layout:Fg},attributes:Ic,layoutAttributes:Fg,supplyLayoutGlobalDefaults:b5,supplyDefaults:w5,supplyLayoutDefaults:L5,calc:C5,getDistanceFunction:fl.getDistanceFunction,getClosest:fl.getClosest,inbox:fl.inbox,quadrature:fl.quadrature,appendArrayPointValue:fl.appendArrayPointValue,castHoverOption:F5,castHoverinfo:N5,hover:Ng.hover,unhover:z5.unhover,loneHover:Ng.loneHover,loneUnhover:I5,click:E5};function I5(t){var e=uc.isD3Selection(t)?t:R5.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function F5(t,e,r){return uc.castOption(t,e,"hoverlabel."+r)}function N5(t,e,r){function a(i){return uc.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return uc.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 Sp=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})})},iu={},RT={exports:{}},Lp={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("")}},zi={},Zs=32,Cp={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)},H5=me.strTranslate;function zT(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 O5(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 j5(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return zT(t,r[e])}}function B5(t){return H5(t.xaxis._offset,t.yaxis._offset)}var Dp={p2r:zT,r2p:O5,axValue:j5,getTransform:B5};(function(t){var e=f_,r=Cp,a=r.CIRCLE_SIDES,i=r.SQRT2,n=Dp,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=[],E,R,N,H,F=m[D][0],$=F;switch(F){case"M":w(),x=+m[D][1],_=+m[D][2],L.push([$,x,_]),S();break;case"Q":case"S":E=+m[D][1],N=+m[D][2],x=+m[D][3],_=+m[D][4],L.push([$,x,_,E,N]);break;case"C":E=+m[D][1],N=+m[D][2],R=+m[D][3],H=+m[D][4],x=+m[D][5],_=+m[D][6],L.push([$,x,_,E,N,R,H]);break;case"T":case"L":x=+m[D][1],_=+m[D][2],L.push([$,x,_]);break;case"H":$="L",x=+m[D][1],L.push([$,x,_]);break;case"V":$="L",_=+m[D][1],L.push([$,x,_]);break;case"A":$="L";var A=+m[D][1],M=+m[D][2];+m[D][4]||(A=-A,M=-M);var C=x-A,P=_;for(g=1;g<=a/2;g++){var I=2*Math.PI*g/a;L.push([$,C+A*Math.cos(I),P+M*Math.sin(I)])}break;case"Z":(x!==k||_!==T)&&(x=k,_=T,L.push([$,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}})(zi);var IT=Cn,G5=IT.drawMode,U5=IT.openMode,Wo=Cp,Hg=Wo.i000,Og=Wo.i090,jg=Wo.i180,Bg=Wo.i270,V5=Wo.cos45,X5=Wo.sin45,FT=Dp,Ks=FT.p2r,ci=FT.r2p,Y5=An,W5=Y5.clearOutline,nu=zi,q5=nu.readPaths,Z5=nu.writePaths,K5=nu.ellipseOver,Q5=nu.fixDatesForPaths;function J5(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(!G5(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=NT(t,e,n);W5(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 NT(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=U5(r),d=q5(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[Hg][1],b=m[Og][1],w=m[jg][1],g=m[Bg][1],x=m[Hg][2],_=m[Og][2],k=m[jg][2],T=m[Bg][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,E=(x+k)/2,R=(g-b+w-y)/2,N=(T-_+k-x)/2,H=K5({x0:L,y0:E,x1:L+R*V5,y1:E+N*X5});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&&Q5(d,f,c),p.path=Z5(d),m=null;return p}var $p={newShapes:J5,createShapeObj:NT},eP=Cn,tP=eP.selectMode,rP=An,aP=rP.clearOutline,Pp=zi,iP=Pp.readPaths,nP=Pp.writePaths,oP=Pp.fixDatesForPaths,HT=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(!tP(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&&oP(d,s,f),p.path=nP(d),m=null),aP(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():{}}}},Ii={},ou={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=ou,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,E=k+S+","+T,R=k+","+(T-D);return"M"+E+L+" 0 1,1 "+R+L+" 0 0,1 "+E+"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})}})(Ii);var lP=me,Hn=Dt,Gg=nr,Ug=xt,sP=zi.readPaths,nh=Ii,fP=nh.getPathString,Vg=Wh,cP=Cr.FROM_TL,OT=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 Vg){var c=Vg[f](a,l,s);c!==void 0&&(o[f]=c)}}n=lP.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=fP(e,a),x=sP(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 E=Hn.getFromId(e,a.xref),R=Hn.getRefType(a.xref),N=Hn.getFromId(e,a.yref),H=Hn.getRefType(a.yref),F=nh.getDataToPixel(e,E,!1,R),$=nh.getDataToPixel(e,N,!0,H);m=F(a.x0),y=F(a.x1),b=$(a.y0),w=$(a.y1)}var A=a.label.textangle;A==="auto"&&(a.type==="line"?A=uP(m,b,y,w):A=0),p.call(function(B){return B.call(Ug.font,v).attr({}),Gg.convertToTspans(B,e),B});var M=Ug.bBox(p.node()),C=vP(m,b,y,w,a,A,M),P=C.textx,I=C.texty,j=C.xanchor;p.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[j],y:I,x:P,transform:"rotate("+A+","+P+","+I+")"}).call(Gg.positionText,P,I)}};function uP(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 vP(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=cP[p],D=i.label.font.size,L=o.height,E=(L*S-D)*v,R=-(L*S-D)*h;return{textx:m+E,texty:y+R,xanchor:d}}var dP=me,hP=dP.strTranslate,Xg=Oa,jT=Cn,pP=jT.drawMode,BT=jT.selectMode,GT=Je,Yg=ot,lu=Cp,mP=lu.i000,yP=lu.i090,gP=lu.i180,bP=lu.i270,xP=An,UT=xP.clearOutlineControllers,Ep=zi,Qs=Ep.pointsOnRectangle,uv=Ep.pointsOnEllipse,_P=Ep.writePaths,wP=$p.newShapes,TP=$p.createShapeObj,kP=HT,AP=OT,Rp=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),(uv(e[0])||a.hasText)&&l({redrawing:!0})}function l($){var A={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,A=wP(r,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,A=kP(r,a),n._fullLayout._reselect=!0),Object.keys(A).length&&GT.call(($||{}).redrawing?"relayout":"_guiRelayout",n,A)}var s=n._fullLayout,f=s._zoomlayer,c=a.dragmode,u=pP(c),v=BT(c);(u||v)&&(n._fullLayout._outlining=!0),UT(n),r.attr("d",_P(e));var h,d,p,m,y;if(!i&&(a.isActiveShape||a.isActiveSelection)){y=MP([],e);var b=f.append("g").attr("class","outline-controllers");D(b),F()}if(u&&a.hasText){var w=f.select(".label-temp"),g=TP(r,a,a.dragmode);AP(n,"label-temp",g,w)}function x($){p=+$.srcElement.getAttribute("data-i"),m=+$.srcElement.getAttribute("data-j"),h[p][m].moveFn=_}function _($,A){if(e.length){var M=y[p][m][1],C=y[p][m][2],P=e[p],I=P.length;if(Qs(P)){var j=$,B=A;if(a.isActiveSelection){var G=Wg(P,m);G[1]===P[m][1]?B=0:j=0}for(var O=0;O<I;O++)if(O!==m){var W=P[O];W[1]===P[m][1]&&(W[1]=M+j),W[2]===P[m][2]&&(W[2]=C+B)}if(P[m][1]=M+j,P[m][2]=C+B,!Qs(P))for(var V=0;V<I;V++)for(var Z=0;Z<P[V].length;Z++)P[V][Z]=y[p][V][Z]}else P[m][1]=M+$,P[m][2]=C+A;o()}}function k(){l()}function T(){if(e.length&&e[p]&&e[p].length){for(var $=[],A=0;A<e[p].length;A++)A!==m&&$.push(e[p][A]);$.length>1&&!($.length===2&&$[1][0]==="Z")&&(m===0&&($[0][0]="M"),e[p]=$,o(),l())}}function S($,A){if($===2){p=+A.srcElement.getAttribute("data-i"),m=+A.srcElement.getAttribute("data-j");var M=e[p];!Qs(M)&&!uv(M)&&T()}}function D($){h=[];for(var A=0;A<e.length;A++){var M=e[A],C=Qs(M),P=!C&&uv(M);h[A]=[];for(var I=M.length,j=0;j<I;j++)if(M[j][0]!=="Z"&&!(P&&j!==mP&&j!==yP&&j!==gP&&j!==bP)){var B=C&&a.isActiveSelection,G;B&&(G=Wg(M,j));var O=M[j][1],W=M[j][2],V=$.append(B?"rect":"circle").attr("data-i",A).attr("data-j",j).style({fill:Yg.background,stroke:Yg.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",hP(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},Xg.init(h[A][j])}}}function L($,A){if(e.length)for(var M=0;M<e.length;M++)for(var C=0;C<e[M].length;C++)for(var P=0;P+2<e[M][C].length;P+=2)e[M][C][P+1]=y[M][C][P+1]+$,e[M][C][P+2]=y[M][C][P+2]+A}function E($,A){L($,A),o()}function R($){p=+$.srcElement.getAttribute("data-i"),p||(p=0),d[p].moveFn=E}function N(){l()}function H($){$===2&&SP(n)}function F(){if(d=[],!!e.length){var $=0;d[$]={element:r[0][0],gd:n,prepFn:R,doneFn:N,clickFn:H},Xg.init(d[$])}}};function MP(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 Wg(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 SP(t){if(BT(t._fullLayout.dragmode)){UT(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},GT.call("_guiRelayout",t,{selections:a})}}}var LP=ft,VT=Je,qg=me,On=Dt,CP=zi.readPaths,DP=Rp,vc=OT,XT=An.clearOutlineControllers,vv=ot,zp=xt,$P=Lt.arrayEditor,Zg=Oa,Kg=Ri,an=ou,Er=Ii,oh=Er.getPathString,Ip={draw:Fp,drawOne:YT,eraseActiveShape:RP,drawLabel:vc};function Fp(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&&YT(t,i)}function Js(t){return!!t._fullLayout._outlining}function su(t){return!t._context.edits.shapePosition}function YT(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=Er.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=oh(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=su(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(vv.stroke,v).call(vv.fill,u).call(zp.dashLine,d,h);WT(y,t,a),vc(t,e,a,y);var w;if((m||t._context.edits.shapePosition)&&(w=$P(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=CP(s,t);DP(x,b,g)}else t._context.edits.shapePosition?PP(t,b,a,e,l,w):a.editable===!0&&b.style("pointer-events",p||vv.opacity(u)*c<=.5?"stroke":"all");b.node().addEventListener("click",function(){return EP(t,b)})}}function WT(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");zp.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function PP(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,E=LP.select(e.node().parentNode),R=On.getFromId(t,r.xref),N=On.getRefType(r.xref),H=On.getFromId(t,r.yref),F=On.getRefType(r.yref),$=Er.getDataToPixel(t,R,!1,N),A=Er.getDataToPixel(t,H,!0,F),M=Er.getPixelToData(t,R,!1,N),C=Er.getPixelToData(t,H,!0,F),P=B(),I={element:P.node(),gd:t,prepFn:W,doneFn:V,clickFn:Z},j;Zg.init(I),P.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 ge={"fill-opacity":"0"},Te=Math.max(le/2,ae);return de.append("circle").attr({"data-line-point":"start-point",cx:s?$(r.xanchor)+r.x0:$(r.x0),cy:f?A(r.yanchor)-r.y0:A(r.y0),r:Te}).style(ge).classed("cursor-grab",!0),de.append("circle").attr({"data-line-point":"end-point",cx:s?$(r.xanchor)+r.x1:$(r.x1),cy:f?A(r.yanchor)-r.y1:A(r.y1),r:Te}).style(ge).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=I.element.getBoundingClientRect(),de=le.right-le.left,ge=le.bottom-le.top,Te=ae.clientX-le.left,Le=ae.clientY-le.top,_e=!u&&de>o&&ge>l&&!ae.shiftKey?Zg.getCursor(Te/de,1-Le/ge):"move";Kg(e,_e),j=_e.split("-")[0]}}function W(ae){Js(t)||(s&&(y=$(r.xanchor)),f&&(b=A(r.yanchor)),r.type==="path"?L=r.path:(h=s?r.x0:$(r.x0),d=f?r.y0:A(r.y0),p=s?r.x1:$(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),I.moveFn=j==="move"?X:Q,I.altKey=ae.altKey)}function V(){Js(t)||(Kg(e),xe(i),WT(e,t,r),VT.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},ge=de,Te=de;s?v("xanchor",r.xanchor=M(y+ae)):(ge=function(_e){return M($(_e)+ae)},R&&R.type==="date"&&(ge=Er.encodeDate(ge))),f?v("yanchor",r.yanchor=C(b+le)):(Te=function(_e){return C(A(_e)+le)},H&&H.type==="date"&&(Te=Er.encodeDate(Te))),v("path",r.path=Qg(L,ge,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",oh(t,r)),te(i,r),vc(t,a,r,E)}function Q(ae,le){if(u){var de=function(ie){return ie},ge=de,Te=de;s?v("xanchor",r.xanchor=M(y+ae)):(ge=function(fe){return M($(fe)+ae)},R&&R.type==="date"&&(ge=Er.encodeDate(ge))),f?v("yanchor",r.yanchor=C(b+le)):(Te=function(fe){return C(A(fe)+le)},H&&H.type==="date"&&(Te=Er.encodeDate(Te))),v("path",r.path=Qg(L,ge,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 ze=p+ae,ce=f?m-le:m+le;v("x1",r.x1=s?ze:M(ze)),v("y1",r.y1=f?ce:C(ce))}}else{var ye=function(ie){return j.indexOf(ie)!==-1},Pe=ye("n"),Re=ye("s"),K=ye("w"),ke=ye("e"),re=Pe?w+le:w,pe=Re?g+le:g,we=K?x+ae:x,se=ke?_+ae:_;f&&(Pe&&(re=w-le),Re&&(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",oh(t,r)),te(i,r),vc(t,a,r,E)}function te(ae,le){(s||f)&&de();function de(){var ge=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=$(s?le.xanchor:qg.midRange(ge?[le.x0,le.x1]:Er.extractPathCoords(le.path,an.paramIsX))),ze=A(f?le.yanchor:qg.midRange(ge?[le.y0,le.y1]:Er.extractPathCoords(le.path,an.paramIsY)));if(_e=Er.roundPositionForSharpStrokeRendering(_e,Le),ze=Er.roundPositionForSharpStrokeRendering(ze,Le),s&&f){var ce="M"+(_e-1-Le)+","+(ze-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)+","+(ze-9-Le)+"v18 h2 v-18 Z";Te.attr("d",ye)}else{var Pe="M"+(_e-9-Le)+","+(ze-1-Le)+"h18 v2 h-18 Z";Te.attr("d",Pe)}}}function xe(ae){ae.selectAll(".visual-cue").remove()}function ue(ae,le,de){var ge=le.xref,Te=le.yref,Le=On.getFromId(de,ge),_e=On.getFromId(de,Te),ze="";ge!=="paper"&&!Le.autorange&&(ze+=ge),Te!=="paper"&&!_e.autorange&&(ze+=Te),zp.setClipUrl(ae,ze?"clip"+de._fullLayout._uid+ze:null,de)}}function Qg(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 EP(t,e){if(su(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){Jg(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=Jg,Fp(t)}}}function Jg(t){if(su(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(XT(t),delete t._fullLayout._activeShapeIndex,Fp(t))}}function RP(t){if(su(t)){XT(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,VT.call("_guiRelayout",t,{shapes:a})}}}var fa=Je,qT=Qt,ZT=Wt,_t=Lp,zP=Ip.eraseActiveShape,so=me,pt=so._,wt=RT.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])}),fa.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){qT.sendDataToCloud(t)}};wt.editInChartStudio={name:"editInChartStudio",title:function(t){return pt(t,"Edit in Chart Studio")},icon:_t.pencil,click:function(t){qT.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:zP};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=ZT.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,fa.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:fu};wt.pan3d={name:"pan3d",_cat:"pan",title:function(t){return pt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:_t.pan,click:fu};wt.orbitRotation={name:"orbitRotation",title:function(t){return pt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:_t["3d_rotate"],click:fu};wt.tableRotation={name:"tableRotation",title:function(t){return pt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:_t["z-axis"],click:fu};function fu(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,fa.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:Np};wt.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return pt(t,"Reset camera to last save")},attr:"resetLastSave",icon:_t.movie,click:Np};function Np(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)}fa.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:IP};function KT(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 IP(t,e){var r=KT(t,e);fa.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:Hp};wt.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:_t.zoom_minus,click:Hp};wt.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return pt(t,"Reset")},attr:"reset",val:null,icon:_t.autoscale,click:Hp};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:Op};function Hp(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;fa.call("_guiRelayout",t,s+".projection.scale",u)}}a==="reset"&&dc(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:Op};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:Op};function QT(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function Op(t){var e=QT(t);fa.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())}fa.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=KT(t,e);r.hovermode=QT(t),fa.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"),Np(t,e),dc(t,"geo"),dc(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",fa.call("_guiRelayout",t,FP(t))}};function FP(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=ZT.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){dc(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:JT};wt.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return pt(t,"Zoom out")},attr:"zoom",val:"out",icon:_t.zoom_minus,click:JT};function JT(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}fa.call("_guiRelayout",t,l)}function dc(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]}fa.call("_guiRelayout",t,i)}var e2=RT.exports,t2=e2,NP=Object.keys(t2),r2=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],a2=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(r2),yo=[],HP=function(t){if(a2.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)}};NP.forEach(function(t){HP(t2[t])});yo.sort();var i2={DRAW_MODES:r2,backButtons:a2,foreButtons:yo},e0=i2,n2={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 *"+e0.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 *"+e0.foreButtons.join("*, *")+"*."].join(" ")}},OP=me,cl=ot,jP=Lt,BP=n2,GP=function(e,r){var a=e.modebar||{},i=jP.newContainer(r,"modebar");function n(l,s){return OP.coerce(a,i,BP,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")},jp=ft,UP=dt,Za=me,o2=Lp,VP=Rc.version,XP=new DOMParser;function l2(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var ja=l2.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&&jp.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||o2.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};ja.createIcon=function(t){var e=UP(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=XP.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=jp.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 YP(t){return t+" (v"+VP+")"}ja.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",YP(Za._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(o2.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 WP(t,e){var r=t._fullLayout,a=new l2({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&jp.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var qP=WP,ZP=Wt,t0=_r,lh=Je,KP=sa.isUnifiedHover,QP=qP,hc=e2,JP=i2.DRAW_MODES,eE=me.extendDeep,tE=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=lE(n):!a.displayModeBar&&a.watermark?o=[]:o=rE(e),i?i.update(e,o):r._modeBar=QP(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,P=M._cat||M.name;if(C===A||P===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=aE(e),x=KP(e.hovermode),_=[];function k(A){if(A.length){for(var M=[],C=0;C<A.length;C++){for(var P=A[C],I=hc[P],j=I.name.toLowerCase(),B=(I._cat||I.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(hc[P])}_.push(M)}}var T=["toImage"];a.showEditInChartStudio?T.push("editInChartStudio"):a.showSendToCloud&&T.push("sendDataToCloud"),k(T);var S=[],D=[],L=[],E=[];(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"]),(nE(r)||x)&&(D=[]),(f||d)&&!g&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],L[0]!=="resetViews"&&(L=["resetScale2d"])),c?E=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||d)&&!g||p?E=["zoom2d","pan2d"]:m||u?E=["pan2d"]:y&&(E=["zoom2d"]),iE(r)&&E.push("select2d","lasso2d");var R=[],N=function(A){R.indexOf(A)===-1&&D.indexOf(A)!==-1&&R.push(A)};if(Array.isArray(l)){for(var H=[],F=0;F<l.length;F++){var $=l[F];typeof $=="string"?($=$.toLowerCase(),JP.indexOf($)!==-1?(e._has("mapbox")||e._has("cartesian"))&&E.push($):$==="togglespikelines"?N("toggleSpikelines"):$==="togglehover"?N("toggleHover"):$==="hovercompare"?N("hoverCompareCartesian"):$==="hoverclosest"?(N("hoverClosestCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie")):$==="v1hovermode"&&(N("toggleHover"),N("hoverClosestCartesian"),N("hoverCompareCartesian"),N("hoverClosestGeo"),N("hoverClosest3d"),N("hoverClosestGl2d"),N("hoverClosestPie"))):H.push($)}l=H}return k(E),k(S.concat(L)),k(R),oE(_,l)}function aE(t){for(var e=ZP.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||(lh.traceIs(a,"scatter-like")?(t0.hasMarkers(a)||t0.hasText(a))&&(e=!0):lh.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function nE(t){for(var e=0;e<t.length;e++)if(!lh.traceIs(t[e],"noHover"))return!1;return!0}function oE(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 lE(t){for(var e=eE([],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(hc[n]!==void 0)e[r][i]=hc[n];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return e}var s2={moduleType:"component",name:"modebar",layoutAttributes:n2,supplyLayoutDefaults:GP,manage:tE},ti={},sE=Cr.FROM_BL,f2=function(e,r,a){a===void 0&&(a=sE[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,dv=ms,ma=Wt.id2name,fE=Na,r0=f2,cE=hp,uE=Yt.ALMOST_EQUAL,vE=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=ma(a[l]),u=t[c],v=e[c],dE(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[ma(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(v=e[ma(f)],v.fixedrange){for(var m in s){var y=ma(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[ma(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=ma(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[ma(f)],v[h]=h==="range"?d.slice():d,h==="rangebreaks"&&(v._hasDayOfWeekBreaks=g,cE(v,e))}}};function dE(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(E,R){return en.coerce(t,e,fE,E,R)}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[ma(m)];b.type===d&&y.push(m)}var w=c2(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=hv(l,u,_,1);var S=i[ma(_)],D=a0(i,e)/a0(i,S);v!==(_.charAt(0)==="x")&&(D=(v?"x":"y")+D),hv(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),hv(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 a0(t,e){var r=e.domain;return r||(r=t[ma(e.overlaying)].domain),r[1]-r[0]}function c2(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function hv(t,e,r,a){var i,n,o,l,s,f=c2(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]=pv(u,pv(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var v=c[n];f[v]=pv(a,f[v])}f[r]=1}function pv(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 hE(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=hE(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[ma(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>uE*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")r0(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(),r0(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),E=T-L*u*1.0001,R=T+L*u*1.0001,N=dv.makePadFn(r,s,0),H=dv.makePadFn(r,s,1);i0(s,u);var F=Math.abs(s._m),$=dv.concatExtremes(e,s),A=$.min,M=$.max,C,P;for(P=0;P<A.length;P++)C=A[P].val-N(A[P])/F,C>E&&C<S&&(S=C);for(P=0;P<M.length;P++)C=M[P].val+H(M[P])/F,C<R&&C>D&&(D=C);var I=(D-S)/(2*L);u/=I,S=s.l2r(S),D=s.l2r(D),s.range=s._input.range=_<k?[S,D]:[D,S]}i0(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 i0(t,e){var r=t._inputDomain,a=vE[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=Sp,l=ot,s=xt,f=Kc,c=s2,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 P=0;P<C.length;P++){var I=C[P][0],j=C[P][1];if(!(I[0]>=A[1]||I[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,P=C.p,I=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 z=Ge._lw/2;if(Ge._id.charAt(0)==="x"){if(Ve){if(Ue==="top")return Ve._offset-P-z}else return C.t+C.h*(1-(Ge.position||0))+z%1;return Ve._offset+Ve._length+P+z}if(Ve){if(Ue==="right")return Ve._offset+Ve._length+P+z}else return C.l+C.w*(Ge.position||0)+z%1;return Ve._offset-P-z}for(j=0;j<I.length;j++){O=I[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 ge=de.node(),Te=G.bg=i.ensureSingle(de,"rect","bg");ge.insertBefore(Te.node(),ge.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-P,V._offset-P,W._length+2*P,V._length+2*P).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",ze=i.ensureSingleById(M._clips,"clipPath",_e,function(Ge){Ge.classed("plotclip",!0).append("rect")});G.clipRect=ze.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 Pe,Re,K,ke,re,pe,we,se,ie,fe,be,Me,Se;function $e(Ge){return"M"+Pe+","+Ge+"H"+Re}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 z=Ve(Ge._mainLinePosition);return Ge.mirror&&(z+=Ve(Ge._mainMirrorPosition)),z}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,I),Pe=W._offset-(re?P+re:0),pe=T(W,"right",V,I),Re=W._offset+W._length+(pe?P+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,$e,He),Se&&W.showline&&(W.mirror==="all"||W.mirror==="allticks")&&(Ne+=$e(K)+$e(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)&&(be=T(V,"bottom",W,I),we=V._offset+V._length+(be?P:0),Me=T(V,"top",W,I),se=V._offset-(Me?P: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 P=C._anchorAxis;if(!P)return!1;var I=v.FROM_BL[M];return C.side===M?P.domain[I]===A.domain[I]:C.mirror&&P.domain[1-I]===A.domain[1-I]}function T(A,M,C,P){if(k(A,M,C))return C._lw;for(var I=0;I<P.length;I++){var j=P[I];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,P=F(C),I=$(C),j=N(C,I),B=R(C,P);if(f.draw(A,"gtitle",{propContainer:C,propName:"title.text",placeholder:C._dfltTitle.plot,attributes:{x:B,y:j,"text-anchor":P,dy:I}}),M.text&&M.automargin){var G=e.selectAll(".gtitle"),O=s.bBox(G.node()).height,W=L(A,M,O);if(W>0){E(A,j,W,O),G.attr({x:B,y:j,"text-anchor":P,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,P,I){var j=M.yref==="paper"?A._fullLayout._size.h:A._fullLayout.height,B=i.isTopAnchor(M)?P:P-I,G=C==="b"?j-B:B;return i.isTopAnchor(M)&&C==="t"||i.isBottomAnchor(M)&&C==="b"?!1:G<I}function D(A,M,C,P,I){var j=0;return C==="middle"&&(j+=I/2),A==="t"?(C==="top"&&(j+=I),j+=P-M*P):(C==="bottom"&&(j+=I),j+=M*P),j}function L(A,M,C){var P=M.y,I=M.yanchor,j=P>.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,P,I,A._fullLayout.height,C)+M.pad.t+M.pad.b),G>B?G:0}function E(A,M,C,P){var I="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,P)?G[B]=C:j.yref==="container"&&(O[B]=C,A._fullLayout._reservedMargin[I]=O),a.allowAutoMargin(A,I),a.autoMargin(A,I,G)}function R(A,M){var C=A.title,P=A._size,I=0;switch(M===y?I=C.pad.l:M===w&&(I=-C.pad.r),C.xref){case"paper":return P.l+P.w*C.x+I;case"container":default:return A.width*C.x+I}}function N(A,M){var C=A.title,P=A._size,I=0;if(M==="0em"||!M?I=-C.pad.b:M===v.CAP_SHIFT+"em"&&(I=C.pad.t),C.y==="auto")return P.t/2;switch(C.yref){case"paper":return P.t+P.h-P.h*C.y+I;case"container":default:return A.height-A.height*C.y+I}}function H(A){return A==="top"?v.CAP_SHIFT+.3+"em":A==="bottom"?"-0.3em":v.MID_SHIFT+"em"}function F(A){var M=A.title,C=b;return i.isRightAnchor(M)?C=w:i.isLeftAnchor(M)&&(C=y),C}function $(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=[],P;for(P=0;P<M.length;P++){var I=M[P],j=I[0]||{},B=j.trace||{},G=B._module||{},O=G.arraysToCalcdata;O&&O(I,B);var W=G.editStyle;W&&C.push({fn:W,cd0:j})}if(C.length){for(P=0;P<C.length;P++){var V=C[P];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 P=M._basePlotModules[C].updateFx;P&&P(A)}return a.previousPromises(A)},t.doCamera=function(A){for(var M=A._fullLayout,C=M._subplots.gl3d,P=0;P<C.length;P++){var I=M[C[P]],j=I._scene;j.setViewport(I)}},t.drawData=function(A){var M=A._fullLayout;o(A);for(var C=M._basePlotModules,P=0;P<C.length;P++)C[P].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,P=[],I=[],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(P,G.xaxis+G.yaxis):G.type==="scatterpolargl"&&i.pushUnique(I,G.subplot))}for(j=0;j<P.length;j++)B=M._plots[P[j]],B._scene&&B._scene.draw();for(j=0;j<I.length;j++)B=M[I[j]]._subplot,B._scene&&B._scene.draw()}},t.doAutoRangeAndConstraints=function(A){for(var M=u.list(A,"",!0),C,P={},I=0;I<M.length;I++)if(C=M[I],!P[C._id]){P[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),P[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)}})(iu);var pE=zi.readPaths,mE=Rp,u2=An.clearOutlineControllers,mv=ot,v2=xt,yE=Lt.arrayEditor,d2=Ii,gE=d2.getPathString,h2={draw:cu,drawOne:p2,activateLastSelection:_E};function cu(t){var e=t._fullLayout;u2(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++)p2(t,i)}function uu(t){return t._context.editSelection}function p2(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=d2.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input)return;n(t._fullLayout._selectionLayer);function n(o){var l=gE(t,a),s={"data-index":e,"fill-rule":"evenodd",d:l},f=a.opacity,c="rgba(0,0,0,0)",u=a.line.color||mv.contrast(t._fullLayout.plot_bgcolor),v=a.line.width,h=a.line.dash;v||(v=5,h="solid");var d=uu(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(mv.stroke,u).call(mv.fill,c).call(v2.dashLine,m?"solid":h,m?4+v:v);if(bE(y,t,a),d){var b=yE(t.layout,"selections",a);y.style({cursor:"move"});var w={element:y.node(),plotinfo:i,gd:t,editHelpers:b,isActiveSelection:!0},g=pE(l,t);mE(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 xE(t,x)})}}function bE(t,e,r){var a=r.xref+r.yref;v2.setClipUrl(t,"clip"+e._fullLayout._uid+a,e)}function xE(t,e){if(uu(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeSelectionIndex){sh(t);return}t._fullLayout._activeSelectionIndex=a,t._fullLayout._deactivateSelection=sh,cu(t)}}}function _E(t){if(uu(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=sh,cu(t)}}function sh(t){if(uu(t)){var e=t._fullLayout._activeSelectionIndex;e>=0&&(u2(t),delete t._fullLayout._activeSelectionIndex,cu(t))}}var m2={exports:{}},yv=Hc.dot,ef=Yt.BADNUM,pc=m2.exports={};pc.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}};pc.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=yv(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=yv(u,o),v<0||v>l||Math.abs(yv(u,f))>i)return!0;return!1};pc.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||pc.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 y2=m2.exports,wE={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"},n0=KM,TE=QM,ql=Je,kE=xt.dashStyle,ul=ot,AE=wa,ME=sa.makeEventData,ys=Cn,SE=ys.freeMode,LE=ys.rectMode,Zl=ys.drawMode,Bp=ys.openMode,Gp=ys.selectMode,o0=Ii,l0=ou,g2=Rp,b2=An.clearOutline,x2=zi,gv=x2.handleEllipse,CE=x2.readPaths,DE=$p.newShapes,$E=HT,PE=h2.activateLastSelection,Hf=me,EE=Hf.sorterAsc,_2=y2,vl=Vc,ea=Wt.getFromId,RE=Sp,zE=iu.redrawReglTraces,Of=wE,Ca=Of.MINSELECT,IE=_2.filter,Up=_2.tester,Vp=Dp,s0=Vp.p2r,FE=Vp.axValue,NE=Vp.getTransform;function Xp(t){return t.subplot!==void 0}function HE(t,e,r,a,i){var n=!Xp(a),o=SE(i),l=LE(i),s=Bp(i),f=Zl(i),c=Gp(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=NE(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=_,E="M"+x+","+_,R=a.xaxes[0],N=a.yaxes[0],H=R._length,F=N._length,$=t.altKey&&!(Zl(i)&&s),A,M,C,P,I,j,B;T2(t,d,a),o&&(A=IE([[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":kE(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",E+"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=vu(d,a.xaxes,a.yaxes,a.subplot);m&&!t.shiftKey&&(a._clearSubplotSelections=function(){if(n){var ae=R._id,le=N._id;L2(d,ae,le,xe);for(var de=(d.layout||{}).selections||[],ge=[],Te=!1,Le=0;Le<de.length;Le++){var _e=p.selections[Le];_e.xref!==ae||_e.yref!==le?ge.push(de[Le]):Te=!0}Te&&(d._fullLayout._noEmitSelectedAtStart=!0,ql.call("_guiRelayout",d,{selections:ge}))}});var ue=JE(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(F,S*le+_));var de=Math.abs(D-x),ge=Math.abs(L-_);if(l){var Te,Le,_e;if(c){var ze=p.selectdirection;switch(ze==="any"?ge<Math.min(de*.6,Ca)?Te="h":de<Math.min(ge*.6,Ca)?Te="v":Te="d":Te=ze,Te){case"h":Le=v?F/2:0,_e=F;break;case"v":Le=v?H/2:0,_e=H;break}}if(f)switch(p.newshape.drawdirection){case"vertical":Te="h",Le=v?F/2:0,_e=F;break;case"horizontal":Te="v",Le=v?H/2:0,_e=H;break;case"ortho":de<ge?(Te="h",Le=_,_e=L):(Te="v",Le=x,_e=D);break;default:Te="d"}Te==="h"?(P=h?gv(v,[D,Le],[D,_e]):[[x,Le],[x,_e],[D,_e],[D,Le]],P.xmin=h?D:Math.min(x,D),P.xmax=h?D:Math.max(x,D),P.ymin=Math.min(Le,_e),P.ymax=Math.max(Le,_e),Z.attr("d","M"+P.xmin+","+(_-Ca)+"h-4v"+2*Ca+"h4ZM"+(P.xmax-1)+","+(_-Ca)+"h4v"+2*Ca+"h-4Z")):Te==="v"?(P=h?gv(v,[Le,L],[_e,L]):[[Le,_],[Le,L],[_e,L],[_e,_]],P.xmin=Math.min(Le,_e),P.xmax=Math.max(Le,_e),P.ymin=h?L:Math.min(_,L),P.ymax=h?L:Math.max(_,L),Z.attr("d","M"+(x-Ca)+","+P.ymin+"v-4h"+2*Ca+"v4ZM"+(x-Ca)+","+(P.ymax-1)+"v4h"+2*Ca+"v-4Z")):Te==="d"&&(P=h?gv(v,[x,_],[D,L]):[[x,_],[x,L],[D,L],[D,_]],P.xmin=Math.min(x,D),P.xmax=Math.max(x,D),P.ymin=Math.min(_,L),P.ymax=Math.max(_,L),Z.attr("d","M0,0Z"))}else o&&(A.addPt([D,L]),P=A.filtered);if(a.selectionDefs&&a.selectionDefs.length?(C=k2(a.mergedPolygons,P,$),P.subtract=$,M=Yp(a.selectionDefs.concat([P]))):(C=[P],M=Up(P)),g2(M2(C,s),G,a),c){var ce=fh(d,!1),ye=ce.eventData?ce.eventData.points.slice():[];ce=fh(d,!1,M,xe,a),M=ce.selectionTesters,B=ce.eventData;var Pe;A?Pe=A.filtered:Pe=C2(C),vl.throttle(Q,Of.SELECTDELAY,function(){te=S2(M,xe);for(var Re=te.slice(),K=0;K<ye.length;K++){for(var ke=ye[K],re=!1,pe=0;pe<Re.length;pe++)if(Re[pe].curveNumber===ke.curveNumber&&Re[pe].pointNumber===ke.pointNumber){re=!0;break}re||Re.push(ke)}Re.length&&(B||(B={}),B.points=Re),ue(B,Pe),eR(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(),I=0;I<xe.length;I++)j=xe[I],j._module.selectPoints(j,!1);if(Ql(d,xe),Kl(a),qp(d),xe.length){var ge=xe[0].xaxis,Te=xe[0].yaxis;if(ge&&Te){for(var Le=[],_e=d._fullLayout.selections,ze=0;ze<_e.length;ze++){var ce=_e[ze];ce&&(ce.xref!==ge._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&&w2(le,d,a.xaxes,a.yaxes,a.subplot,a,G),de==="event"&&Jl(d,void 0);AE.click(d,le,w.id)}).catch(Hf.error)}},a.doneFn=function(){Z.remove(),vl.done(Q).then(function(){vl.clear(Q),!m&&P&&a.selectionDefs&&(P.subtract=$,a.selectionDefs.push(P),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 w2(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(UE(l)){T2(t,e,n),v=vu(e,r,a,i);var _=VE(l,v),k=_.pointNumbers.length>0;if(k?XE(v,_):YE(v)&&(b=c0(_))){for(o&&o.remove(),x=0;x<v.length;x++)h=v[x],h._module.selectPoints(h,!1);Ql(e,v),Kl(n),c&&qp(e)}else{w=t.shiftKey&&(b!==void 0?b:c0(_)),d=OE(_.pointNumber,_.searchInfo,w);var T=n.selectionDefs.concat([d]);for(p=Yp(T),x=0;x<v.length;x++)if(m=v[x]._module.selectPoints(v[x],p),y=A2(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=Bp(n.dragmode);g2(M2(D,L),o,n)}c&&Jl(e,g)}}}function OE(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}function bv(t){return"pointNumber"in t&&"searchInfo"in t}function jE(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 Yp(t){if(!t.length)return;for(var e=[],r=bv(t[0])?0:t[0][0][0],a=r,i=bv(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(bv(t[o]))e.push(jE(t[o]));else{var l=Up(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 T2(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)&&Bp(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||(b2(e),a._lastSelectedSubplot=i.id)}function BE(t){return t._fullLayout._activeShapeIndex>=0}function GE(t){return t._fullLayout._activeSelectionIndex>=0}function Kl(t,e){var r=t.dragmode,a=t.plotinfo,i=t.gd;BE(i)&&i._fullLayout._deactivateShape(i),GE(i)&&i._fullLayout._deactivateSelection(i);var n=i._fullLayout,o=n._zoomlayer,l=Zl(r),s=Gp(r);if(l||s){var f=o.selectAll(".select-outline-"+a.id);if(f&&i._fullLayout._outlining){var c;l&&(c=DE(f,t)),c&&ql.call("_guiRelayout",i,{shapes:c});var u;s&&!Xp(t)&&(u=$E(f,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,ql.call("_guiRelayout",i,{selections:u}).then(function(){e&&PE(i)})),i._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=t.selectionDefs=[],a.selection.mergedPolygons=t.mergedPolygons=[]}function f0(t){return t._id}function vu(t,e,r,a){if(!t.calcdata)return[];var i=[],n=e.map(f0),o=r.map(f0),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(Xp({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 UE(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function VE(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 c0(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 XE(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 YE(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;WE(t,e)}function WE(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&&(RE(t),zE(t))}function k2(t,e,r){for(var a=r?n0.difference:n0.union,i=a({regions:t},{regions:[e]}),n=i.regions.reverse(),o=0;o<n.length;o++){var l=n[o];l.subtract=Wp(l,n.slice(0,o))}return n}function A2(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=ME(t[i],a,r);return t}function M2(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 S2(t,e){for(var r=[],a,i,n=0;n<e.length;n++){var o=e[n];i=o._module.selectPoints(o,t),a=A2(i,o),r=r.concat(a)}return r}function fh(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=u0(t),v=t._fullLayout;if(o){var h=v._zoomlayer,d=v.dragmode,p=Zl(d),m=Gp(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"),_=CE(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=Wp(D,k),k.push(D)}u=u.concat(k)}}}}var E=l&&s?[l+s]:v._subplots.cartesian;qE(t);for(var R={},N=0;N<E.length;N++){var H=E[N],F=H.indexOf("y"),$=H.slice(0,F),A=H.slice(F),M=l&&s?r:void 0;if(M=KE(u,$,A,M),M){var C=a;if(!n){var P=ea(t,$,"x"),I=ea(t,A,"y");C=vu(t,[P],[I],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]=P.c2p(W[X]),G.t.ypx[X]=I.c2p(V[X])}B._module.name==="splom"&&(R[O.uid]||(R[O.uid]=!0))}}var Q=S2(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=u0(t,!0);if(ae.length){var le=ae[0].xref,de=ae[0].yref;if(le&&de){var ge=C2(ae),Te=D2([ea(t,le,"x"),ea(t,de,"y")]);Te(te,ge)}}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,ZE(l,s,c)||L2(t,l,s,a),ue&&(te.points.length?Jl(t,te):qp(t)),v._deselect=!1}return{eventData:te,selectionTesters:r}}function qE(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 ZE(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 L2(t,e,r,a){a=vu(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 KE(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=k2(i,o,l),a=Yp(i)}else i=[o],a=Up(o)}return a}function u0(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=o0.extractPathCoords(T,l0.paramIsX,"raw"),D=o0.extractPathCoords(T,l0.paramIsY,"raw");v=1/0,h=-1/0,d=1/0,p=-1/0,m=[];for(var L=0;L<S.length;L++){var E=yi(c,S[L]),R=yi(u,D[L]);m.push([E,R]),v=Math.min(E,v),h=Math.max(E,h),d=Math.min(R,d),p=Math.max(R,p)}m.xmin=v,m.xmax=h,m.ymin=d,m.ymax=p,m.xref=s,m.yref=f,m.subtract=Wp(m,_),_.push(m),r.push(m)}}}}return r}function Wp(t,e){for(var r=!1,a=0;a<e.length;a++)for(var i=e[a],n=0;n<t.length;n++)if(TE(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 C2(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 QE(r)}function QE(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 D2(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]=[s0(o,f),s0(o,c)].sort(EE))}else i||(i={}),i[l]=r.map(FE(o))}a&&(e.range=a),i&&(e.lassoPoints=i)}}function JE(t){var e=t.plotinfo;return e.fillRangeItems||D2(t.xaxes.concat(t.yaxes))}function eR(t,e){t.emit("plotly_selecting",e)}function Jl(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function qp(t){t.emit("plotly_deselect",null)}var tR={reselect:fh,prepSelect:HE,clearOutline:b2,clearSelectionsCache:Kl,selectOnClick:w2},$2=[{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}],du={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(" ")}},v0=$2,d0=vr,rf=Lr,rR=Lt.templatedArray,af=du;function h0(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 p0(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:d0({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:v0.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:v0.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:[p0("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[p0("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"),h0("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"),h0("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:d0({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(" ")}}}),hu={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},m0=Xo.axisHoverFormat,aR=mr.texttemplateAttrs,iR=mr.hovertemplateAttrs,y0=Sn,nR=vr,oR=Hr.dash,lR=Hr.pattern,sR=xt,g0=hu,xv=Nt.extendFlat;function b0(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 x0(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 _0(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 Fi={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:b0("x"),yperiod:b0("y"),xperiod0:x0("x0"),yperiod0:x0("y0"),xperiodalignment:_0("x"),yperiodalignment:_0("y"),xhoverformat:m0("x"),yhoverformat:m0("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:aR({},{}),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 "+g0.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:g0.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:xv({},oR,{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:lR,marker:xv({symbol:{valType:"enumerated",values:sR.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:xv({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"},y0("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"},y0("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:nR({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},w0=gs,T0=Fi.line,fR=Hr.dash,nf=Nt.extendFlat,cR=za.overrideAll,uR=Lt.templatedArray,k0=du,P2=cR(uR("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({},w0.xref,{description:["Sets the selection's x coordinate axis.",k0.axisRefDescription("x","left","right")].join(" ")}),yref:nf({},w0.yref,{description:["Sets the selection's x coordinate axis.",k0.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:T0.color,width:nf({},T0.width,{min:1,dflt:1}),dash:nf({},fR,{dflt:"dot"})}}),"arraydraw","from-root"),A0=me,of=Dt,vR=Ha,dR=P2,M0=Ii,hR=function(e,r){vR(e,r,{name:"selections",handleItemDefaults:pR});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 pR(t,e,r){function a(_,k){return A0.coerce(t,e,dR,_,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=M0.rangeToShapePosition(v),h=M0.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&&A0.noneOrAll(t,e,["x0","x1","y0","y1"])}var mR=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")},yR=Je,S0=me,L0=Wt,pu=function(e){return function(a,i){var n=a[e];if(Array.isArray(n))for(var o=yR.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(S0.isPlainObject(d)){var p=L0.cleanId(d.xref,"x",!1),m=L0.cleanId(d.yref,"y",!1),y=l.x.test(p),b=l.y.test(m);if(y||b){v||S0.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)}}}}},C0=h2,dl=tR,bs={moduleType:"component",name:"selections",layoutAttributes:P2,supplyLayoutDefaults:hR,supplyDrawNewSelectionDefaults:mR,includeBasePlot:pu("selections"),draw:C0.draw,drawOne:C0.drawOne,reselect:dl.reselect,prepSelect:dl.prepSelect,clearOutline:dl.clearOutline,clearSelectionsCache:dl.clearSelectionsCache,selectOnClick:dl.selectOnClick},Zp=ft,ta=me,D0=ta.numberFormat,gR=oa,bR=u_,lf=Je,E2=ta.strTranslate,xR=nr,$0=ot,di=xt,_R=wa,P0=Dt,wR=Ri,TR=Oa,R2=Cn,sf=R2.selectingOrDrawing,kR=R2.freeMode,AR=Cr.FROM_TL,MR=Sp,SR=iu.redrawReglTraces,LR=Qt,ch=Wt.getFromId,CR=bs.prepSelect,DR=bs.clearOutline,$R=bs.selectOnClick,_v=f2,Kp=Lr,E0=Kp.MINDRAG,Mr=Kp.MINZOOM,R0=!0;function PR(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,E,R,N,H,F,$;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 be=se[ie].yaxis;d[be._id]=be}p=N0(h),m=N0(d),k=z0(p,l),T=z0(m,o),S=!T&&!k,_=F0(t,t._fullLayout._axisMatchGroups,h,d),x=F0(t,t._fullLayout._axisConstraintGroups,h,d,_);var Me=x.isSubplotConstrained||_.isSubplotConstrained;D=l||Me,L=o||Me;var Se=t._fullLayout;E=Se._has("scattergl"),R=Se._has("splom"),N=Se._has("svg")}A();var M=zR(T+k,t._fullLayout.dragmode,f),C=I2(e,o+l+"drag",M,r,a,i,n);if(S&&!f)return C.onmousedown=null,C.style.pointerEvents="none",C;var P={element:C,gd:t,plotinfo:e};P.prepFn=function(se,ie,fe){var be=P.dragmode,Me=t._fullLayout.dragmode;Me!==be&&(P.dragmode=Me),A(),F=t._fullLayout._invScaleX,$=t._fullLayout._invScaleY,S||(f?se.shiftKey?Me==="pan"?Me="zoom":sf(Me)||(Me="pan"):se.ctrlKey&&(Me="pan"):Me="pan"),kR(Me)?P.minDrag=1:P.minDrag=void 0,sf(Me)?(P.xaxes=p,P.yaxes=m,CR(se,ie,fe,P,Me)):(P.clickFn=j,sf(be)&&I(),S||(Me==="zoom"?(P.moveFn=ae,P.doneFn=de,P.minDrag=1,ue(se,ie,fe)):Me==="pan"&&(P.moveFn=ce,P.doneFn=K))),t._fullLayout._redrag=function(){var Se=t._dragdata;if(Se&&Se.element===C){var $e=t._fullLayout.dragmode;sf($e)||(A(),ke([0,0,w,g]),P.moveFn(Se.dx,Se.dy))}}};function I(){P.plotinfo.selection=!1,DR(t)}function j(se,ie){var fe=P.gd;if(fe._fullLayout._activeShapeIndex>=0){fe._fullLayout._deactivateShape(fe);return}var be=fe._fullLayout.clickmode;if(vh(fe),se===2&&!c&&Re(),f)be.indexOf("select")>-1&&$R(ie,fe,p,m,e.id,P),be.indexOf("event")>-1&&_R.click(fe,ie,e.id);else if(se===1&&c){var Me=o?v:u,Se=o==="s"||l==="w"?0:1,$e=Me._name+".range["+Se+"]",He=ER(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&&Zp.select(C).call(xR.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,$e,Ne)})}}TR.init(P);var B,G,O,W,V,Z,X,Q,te,xe;function ue(se,ie,fe){var be=C.getBoundingClientRect();B=ie-be.left,G=fe-be.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:gR(t._fullLayout.plot_bgcolor).getLuminance(),V="M0,0H"+w+"V"+g+"H0V0",Z=!1,X="xy",xe=!1,Q=F2(s,W,y,b,V),te=N2(s,y,b)}function ae(se,ie){if(t._transitioningWithDuration)return!1;var fe=Math.max(0,Math.min(w,F*se+B)),be=Math.max(0,Math.min(g,$*ie+G)),Me=Math.abs(fe-B),Se=Math.abs(be-G);O.l=Math.min(B,fe),O.r=Math.max(B,fe),O.t=Math.min(G,be),O.b=Math.max(G,be);function $e(){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>be?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",jf(O))):$e();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",jf(O))}else $e();else!T||Se<Math.min(Math.max(Me*.6,E0),Mr)?Me<E0||!k?$e():(O.t=0,O.b=g,X="x",te.attr("d",IR(O,G))):!k||Me<Math.min(Se*.6,Mr)?(O.l=0,O.r=w,X="y",te.attr("d",FR(O,B))):(X="xy",te.attr("d",jf(O)));O.w=O.r-O.l,O.h=O.b-O.t,X&&(xe=!0),t._dragged=xe,H2(Q,te,O,V,Z,W),le(),t.emit("plotly_relayouting",H),Z=!0}function le(){H={},(X==="xy"||X==="x")&&(uh(p,O.l/w,O.r/w,H,x.xaxes),ye("x",H)),(X==="xy"||X==="y")&&(uh(m,(g-O.b)/g,(g-O.t)/g,H,x.yaxes),ye("y",H))}function de(){le(),vh(t),K(),j2(t)}var ge=[0,0,w,g],Te=null,Le=Kp.REDRAWDELAY,_e=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function ze(se){if(!t._context._scrollZoom.cartesian&&!t._fullLayout._enablescrollzoom)return;if(I(),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),be=_e.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Me=(se.clientX-be.left)/be.width,Se=(be.bottom-se.clientY)/be.height,$e;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),$e=0;$e<p.length;$e++)He(p[$e],Me,fe);ye("x"),ge[2]*=fe,ge[0]+=ge[2]*Me*(1/fe-1)}if(L){for(o||(Se=.5),$e=0;$e<m.length;$e++)He(m[$e],Se,fe);ye("y"),ge[3]*=fe,ge[1]+=ge[3]*(1-Se)*(1/fe-1)}ke(ge),Pe(),t.emit("plotly_relayouting",H),Te=setTimeout(function(){t._fullLayout&&(ge=[0,0,w,g],K())},Le),se.preventDefault()}o.length*l.length!==1&&B2(C,ze);function ce(se,ie){if(se=se*F,ie=ie*$,t._transitioningWithDuration)return;if(t._fullLayout._replotting=!0,k==="ew"||T==="ns"){var fe=k?-se:0,be=T?-ie:0;if(_.isSubplotConstrained){if(k&&T){var Me=(se/w-ie/g)/2;se=Me*w,ie=-Me*g,fe=-se,be=-ie}T?fe=-be*w/g:be=-fe*g/w}k&&(I0(p,se),ye("x")),T&&(I0(m,ie),ye("y")),ke([fe,be,w,g]),Pe(),t.emit("plotly_relayouting",H);return}function Se(Ge,Ve,Ue){for(var z=1-Ve,Y,U,q=0;q<Ge.length;q++){var oe=Ge[q];if(!oe.fixedrange){Y=oe,U=oe._rl[z]+(oe._rl[Ve]-oe._rl[z])/RR(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[z])}var $e=k==="w"==(T==="n")?1:-1;if(k&&T&&(x.isSubplotConstrained||_.isSubplotConstrained)){var He=(se/w+$e*ie/g)/2;se=He*w,ie=$e*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&&$e>0){var Be;if(_.isSubplotConstrained||!k&&T.length===1){for(Be=0;Be<p.length;Be++)p[Be].range=p[Be]._r.slice(),_v(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(),_v(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]),Pe(),t.emit("plotly_relayouting",H)}function ye(se,ie){for(var fe=_.isSubplotConstrained?{x:m,y:p}[se]:_[se+"axes"],be=_.isSubplotConstrained?{x:p,y:m}[se]:[],Me=0;Me<fe.length;Me++){var Se=fe[Me],$e=Se._id,He=_.xLinks[$e]||_.yLinks[$e],Oe=be[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 Pe(){var se=[],ie;function fe($e){for(ie=0;ie<$e.length;ie++)$e[ie].fixedrange||se.push($e[ie]._id)}function be($e,He){for(ie=0;ie<$e.length;ie++){var Oe=$e[ie],ve=Oe[He];!Oe.fixedrange&&ve.tickmode==="sync"&&se.push(ve._id)}}for(D&&(fe(p),fe(x.xaxes),fe(_.xaxes),be(e.overlays,"xaxis")),L&&(fe(m),fe(x.yaxes),fe(_.yaxes),be(e.overlays,"yaxis")),H={},ie=0;ie<se.length;ie++){var Me=se[ie],Se=ch(t,Me);P0.drawOne(t,Se,{skipTitle:!0}),H[Se._name+".range[0]"]=Se.range[0],H[Se._name+".range[1]"]=Se.range[1]}P0.redrawComponents(t,se)}function Re(){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={},be,Me;if(se==="reset+autosize")for(se="autosize",Me=0;Me<ie.length;Me++){be=ie[Me];var Se=be._rangeInitial0,$e=be._rangeInitial1,He=Se!==void 0||$e!==void 0;if(He&&(Se!==void 0&&Se!==be.range[0]||$e!==void 0&&$e!==be.range[1])||!He&&be.autorange!==!0){se="reset";break}}if(se==="autosize")for(Me=0;Me<ie.length;Me++)be=ie[Me],be.fixedrange||(fe[be._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(be=ie[Me],!be.fixedrange){var Oe=be._name,ve=be._autorangeInitial;be._rangeInitial0===void 0&&be._rangeInitial1===void 0?fe[Oe+".autorange"]=!0:be._rangeInitial0===void 0?(fe[Oe+".autorange"]=ve,fe[Oe+".range"]=[null,be._rangeInitial1]):be._rangeInitial1===void 0?(fe[Oe+".range"]=[be._rangeInitial0,null],fe[Oe+".autorange"]=ve):fe[Oe+".range"]=[be._rangeInitial0,be._rangeInitial1]}}t.emit("plotly_doubleclick",null),lf.call("_guiRelayout",t,fe)}}function K(){ke([0,0,w,g]),ta.syncOrAsync([LR.previousPromises,function(){t._fullLayout._replotting=!1,lf.call("_guiRelayout",t,H)}],t)}function ke(se){var ie=t._fullLayout,fe=ie._plots,be=ie._subplots.cartesian,Me,Se,$e,He;if(R&&lf.subplotsRegistry.splom.drag(t),E){for(Me=0;Me<be.length;Me++)if(Se=fe[be[Me]],$e=Se.xaxis,He=Se.yaxis,Se._scene){var Oe=ta.simpleMap($e.range,$e.r2l),ve=ta.simpleMap(He.range,He.r2l);$e.limitRange&&$e.limitRange(),He.limitRange&&He.limitRange(),Oe=$e.range,ve=He.range,Se._scene.update({range:[Oe[0],ve[0],Oe[1],ve[1]]})}}if((R||E)&&(MR(t),SR(t)),N){var Be=se[2]/u._length,Ne=se[3]/v._length;for(Me=0;Me<be.length;Me++){Se=fe[be[Me]],$e=Se.xaxis,He=Se.yaxis;var We=(D||_.isSubplotConstrained)&&!$e.fixedrange&&h[$e._id],Ge=(L||_.isSubplotConstrained)&&!He.fixedrange&&d[He._id],Ve,Ue,z,Y;if(We?(Ve=Be,z=l||_.isSubplotConstrained?se[0]:we($e,Ve)):_.xaHash[$e._id]?(Ve=Be,z=se[0]*$e._length/u._length):_.yaHash[$e._id]?(Ve=Ne,z=T==="ns"?-se[1]*$e._length/v._length:we($e,Ve,{n:"top",s:"bottom"}[T])):(Ve=re($e,Be,Ne),z=pe($e,Ve)),Ve>1&&($e.maxallowed!==void 0&&D===($e.range[0]<$e.range[1]?"e":"w")||$e.minallowed!==void 0&&D===($e.range[0]<$e.range[1]?"w":"e"))&&(Ve=1,z=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=$e._offset-z/Ve,q=He._offset-Y/Ue;Se.clipRect.call(di.setTranslate,z,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(),_v(se,ie),we(se,ie)):0}function we(se,ie,fe){return se._length*(1-ie)*AR[fe||se.constraintoward||"middle"]}return C}function z2(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(wR,a),i.node()}function I2(t,e,r,a,i,n,o){var l=z2(t,"rect",e,r);return Zp.select(l).call(di.setRect,a,i,n,o),l}function z0(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function ER(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,D0("."+i+"g")(Math.pow(10,r))):(i=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,D0("."+String(i)+"g")(r))}function uh(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;uh(i,v,1-v,a,[])}}function I0(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 RR(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function zR(t,e,r){return t?t==="nsew"?r?"":e==="pan"?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}function F2(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",E2(r,a)).attr("d",i+"Z")}function N2(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:$0.background,stroke:$0.defaultLine,"stroke-width":1,opacity:0}).attr("transform",E2(e,r)).attr("d","M0,0Z")}function H2(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"),O2(t,e,i,n)}function O2(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 vh(t){Zp.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function j2(t){R0&&t.data&&t._context.showTips&&(ta.notifier(ta._(t,"Double-click to zoom back out"),"long"),R0=!1)}function IR(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 FR(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 jf(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 F0(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=ch(t,c);y.push(b),m[b._id]=b}var w={},g=[];for(u in l){var x=ch(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 B2(t,e){if(!bR)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 N0(t){var e=[];for(var r in t)e.push(t[r]);return e}var NR={makeDragBox:PR,makeDragger:z2,makeRectDragger:I2,makeZoombox:F2,makeCorners:N2,updateZoombox:H2,xyCorners:jf,transitionZoombox:O2,removeZoombox:vh,showDoubleClickNotifier:j2,attachWheelEventHandler:B2};(function(t){var e=ft,r=wa,a=Oa,i=Ri,n=NR.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)}})(wp);var xs={},H0=Je,HR=function(e){for(var r=H0.layoutArrayContainers,a=H0.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:""}},OR=_n,wv=Xh,hl=Bo,jR=Zh.sorterAsc,Tv=Je;xs.containerArrayMatch=HR;var BR=xs.isAddVal=function(e){return e==="add"||OR(e)},O0=xs.isRemoveVal=function(e){return e===null||e==="remove"};xs.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=Tv.getComponentMethod(o,"supplyLayoutDefaults"),s=Tv.getComponentMethod(o,"draw"),f=Tv.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===wv||s===wv,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(O0(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(jR),p=r.get(),m=p||[],y=n(v,o).get(),b=[],w=-1,g=m.length,x,_,k,T,S,D,L,E;for(x=0;x<d.length;x++){if(k=d[x],T=a[k],S=Object.keys(T),D=T[""],L=BR(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),O0(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;_++)E=o+"["+k+"].",n(m[k],S[_],E).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!==wv){var R;if(w===-1)R=d;else{for(g=Math.max(m.length,g),R=[],x=0;x<d.length&&(k=d[x],!(k>=w));x++)R.push(k);for(x=w;x<g;x++)R.push(x)}for(x=0;x<R.length;x++)f(e,R[x])}else s(e);return!0};var G2={};(function(t){var e=dt,r=JM,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 E=L[x];if(k&&k.test(E)){var R=g[E];R.anchor&&R.anchor!=="free"&&(R.anchor=s(R.anchor)),R.overlaying&&(R.overlaying=s(R.overlaying)),R.type||(R.isdate?R.type="date":R.islog?R.type="log":R.isdate===!1&&R.islog===!1&&(R.type="linear")),(R.autorange==="withzero"||R.autorange==="tozero")&&(R.autorange=!0,R.rangemode="tozero"),R.insiderange&&delete R.range,delete R.islog,delete R.isdate,delete R.categories,m(R,"domain")&&delete R.domain,R.autotick!==void 0&&(R.tickmode===void 0&&(R.tickmode=R.autotick?"auto":"linear"),delete R.autotick),v(R)}else if(T&&T.test(E)){var N=g[E];v(N.radialaxis)}else if(S&&S.test(E)){var H=g[E];v(H.aaxis),v(H.baxis),v(H.caxis)}else if(D&&D.test(E)){var F=g[E],$=F.cameraposition;if(Array.isArray($)&&$[0].length===4){var A=$[0],M=$[1],C=$[2],P=r([],A),I=[];for(_=0;_<3;++_)I[_]=M[_]+C*P[2+4*_];F.camera={eye:{x:I[0],y:I[1],z:I[2]},center:{x:M[0],y:M[1],z:M[2]},up:{x:0,y:0,z:1}},delete F.cameraposition}v(F.xaxis),v(F.yaxis),v(F.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,E=L?_[L]:_;E&&E.colorscale&&(E.colorscale==="YIGnBu"&&(E.colorscale="YlGnBu"),E.colorscale==="YIOrRd"&&(E.colorscale="YlOrRd"))}if(_.type==="surface"&&i.isPlainObject(_.contours)){var R=["x","y","z"];for(k=0;k<R.length;k++){var N=_.contours[R[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,F=(_.decreasing||{}).showlegend!==!1,$=h(_.increasing),A=h(_.decreasing);if($!==!1&&A!==!1){var M=d($,A,H,F);M&&(_.name=M)}else($||A)&&!_.name&&(_.name=$||A)}if(Array.isArray(_.transforms)){var C=_.transforms;for(k=0;k<C.length;k++){var P=C[k];if(i.isPlainObject(P))switch(P.type){case"filter":P.filtersrc&&(P.target=P.filtersrc,delete P.filtersrc),P.calendar&&(P.valuecalendar||(P.valuecalendar=P.calendar),delete P.calendar);break;case"groupby":if(P.styles=P.styles||P.style,P.styles&&!Array.isArray(P.styles)){var I=P.styles,j=Object.keys(I);P.styles=[];for(var B=0;B<j.length;B++)P.styles.push({target:j[B],value:I[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 E=T.slice(0,S-1).join("."),R=i.nestedProperty(k,E).get();R.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,E=D._id.substr(1);if(E.substr(0,5)==="scene"){if(_[E]!==void 0)continue;L=E+"."+L}var R=L+".type";_[L]===void 0&&_[R]===void 0&&i.nestedProperty(g.layout,R).set(null)}}}})(G2);(function(t){var e=ft,r=dt,a=c_,i=me,n=i.nestedProperty,o=ds,l=hC,s=Je,f=Vo,c=Qt,u=Dt,v=hT,h=Na,d=xt,p=ot,m=wp.initInteractions,y=Mn,b=bs.clearOutline,w=jo.dfltConfig,g=xs,x=G2,_=iu,k=za,T=Lr.AX_NAME_PATTERN,S=0,D=5;function L(z,Y,U,q){var oe;if(z=i.getGraphDiv(z),o.init(z),i.isPlainObject(Y)){var ee=Y;Y=ee.data,U=ee.layout,q=ee.config,oe=ee.frames}var Ce=o.triggerHandler(z,"plotly_beforeplot",[Y,U,q]);if(Ce===!1)return Promise.reject();!Y&&!U&&!i.isPlotDiv(z)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",z);function Ae(){if(oe)return t.addFrames(z,oe)}F(z,q),U||(U={}),e.select(z).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(z._promises)||(z._promises=[]);var he=(z.data||[]).length===0&&Array.isArray(Y);Array.isArray(Y)&&(x.cleanData(Y),he?z.data=Y:z.data.push.apply(z.data,Y),z.empty=!1),(!z.layout||he)&&(z.layout=x.cleanLayout(U)),c.supplyDefaults(z);var ne=z._fullLayout,Ee=ne._has("cartesian");ne._replotting=!0,(he||ne._shouldCreateBgLayer)&&(Ue(z),ne._shouldCreateBgLayer&&delete ne._shouldCreateBgLayer),d.initGradients(z),d.initPatterns(z),he&&u.saveShowSpikeInitial(z);var je=!z.calcdata||z.calcdata.length!==(z._fullData||[]).length;je&&c.doCalcdata(z);for(var Ye=0;Ye<z.calcdata.length;Ye++)z.calcdata[Ye][0].trace=z._fullData[Ye];z._context.responsive?z._responsiveChartHandler||(z._responsiveChartHandler=function(){i.isHidden(z)||c.resize(z)},window.addEventListener("resize",z._responsiveChartHandler)):i.clearResponsive(z);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(z);!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=z._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([],{},z._fullData,ne),c.supplyDefaults(z),ne=z._fullLayout,c.doCalcdata(z),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(z)}function et(){if(c.clearAutoMarginIds(z),_.drawMarginPushers(z),u.allowAutoMargin(z),z._fullLayout.title.text&&z._fullLayout.title.automargin&&c.allowAutoMargin(z,"title.automargin"),ne._has("pie"))for(var at=z._fullData,qe=0;qe<at.length;qe++){var Ze=at[qe];Ze.type==="pie"&&Ze.automargin&&c.allowAutoMargin(z,"pie."+Ze.uid+".automargin")}return c.doAutoMargin(z),c.previousPromises(z)}function Ct(){if(c.didMarginChange(rt,ne._size))return i.syncOrAsync([et,_.layoutStyles],z)}function lt(){if(!je){Qe();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),Qe],z)}function Qe(){z._transitioning||(_.doAutoRangeAndConstraints(z),he&&u.saveRangeInitial(z),s.getComponentMethod("rangeslider","calcAutorange")(z))}function yt(){return u.draw(z,he?"":"redraw")}var mt=[c.previousPromises,Ae,vt,et,Ct];Ee&&mt.push(lt),mt.push(_.layoutStyles),Ee&&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,z);return(!st||!st.then)&&(st=Promise.resolve()),st.then(function(){return E(z),z})}function E(z){var Y=z._fullLayout;Y._redrawFromAutoMarginCount?Y._redrawFromAutoMarginCount--:z.emit("plotly_afterplot")}function R(z){return i.extendFlat(w,z)}function N(z,Y){try{z._fullLayout._paper.style("background",Y)}catch(U){i.error(U)}}function H(z,Y){var U=p.combine(Y,"white");N(z,U)}function F(z,Y){if(!z._context){z._context=i.extendDeep({},w);var U=e.select("base");z._context._baseUrl=U.size()&&U.attr("href")?window.location.href.split("#")[0]:""}var q=z._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||z.clientHeight===0,q._hasZeroWidth=q._hasZeroWidth||z.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 Ee=he.split("+");for(oe=0;oe<Ee.length;oe++)ne[Ee[oe]]=1}else he!==!1&&(ne.gl3d=1,ne.geo=1,ne.mapbox=1)}function $(z){if(z=i.getGraphDiv(z),!i.isPlotDiv(z))throw new Error("This element is not a Plotly plot: "+z);return x.cleanData(z.data),x.cleanLayout(z.layout),z.calcdata=void 0,t._doPlot(z).then(function(){return z.emit("plotly_redraw"),z})}function A(z,Y,U,q){return z=i.getGraphDiv(z),c.cleanPlot([],{},z._fullData||[],z._fullLayout||{}),c.purge(z),t._doPlot(z,Y,U,q)}function M(z,Y){var U=Y+1,q=[],oe,ee;for(oe=0;oe<z.length;oe++)ee=z[oe],ee<0?q.push(U+ee):q.push(ee);return q}function C(z,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>=z.data.length||oe<-z.data.length)throw new Error(U+" must be valid indices for gd.data.");if(Y.indexOf(oe,q+1)>-1||oe>=0&&Y.indexOf(-z.data.length+oe)>-1||oe<0&&Y.indexOf(z.data.length+oe)>-1)throw new Error("each index in "+U+" must be unique.")}}function P(z,Y,U){if(!Array.isArray(z.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(z,Y,"currentIndices"),typeof U<"u"&&!Array.isArray(U)&&(U=[U]),typeof U<"u"&&C(z,U,"newIndices"),typeof U<"u"&&Y.length!==U.length)throw new Error("current and new indices must be of equal length.")}function I(z,Y,U){var q,oe;if(!Array.isArray(z.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(z,Y,U,q){var oe=i.isPlainObject(q);if(!Array.isArray(z.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(z,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(z,Y,U,q){var oe=i.isPlainObject(q),ee=[],Ce,Ae,he,ne,Ee;Array.isArray(U)||(U=[U]),U=M(U,z.data.length-1);for(var je in Y)for(var Ye=0;Ye<U.length;Ye++){if(Ce=z.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);Ee=oe?q[je][Ye]:q,r(Ee)||(Ee=-1),ee.push({prop:he,target:Ae,insert:ne,maxp:Math.floor(Ee)})}return ee}function G(z,Y,U,q,oe){j(z,Y,U,q);for(var ee=B(z,Y,U,q),Ce={},Ae={},he=0;he<ee.length;he++){var ne=ee[he].prop,Ee=ee[he].maxp,je=oe(ee[he].target,ee[he].insert,Ee);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(z,Y){var U=new z.constructor(z.length+Y.length);return U.set(z),U.set(Y,z.length),U}function W(z,Y,U,q){z=i.getGraphDiv(z);function oe(he,ne,Ee){var je,Ye;if(i.isTypedArray(he))if(Ee<0){var rt=new he.constructor(0),nt=O(he,ne);Ee<0?(je=nt,Ye=rt):(je=rt,Ye=nt)}else if(je=new he.constructor(Ee),Ye=new he.constructor(he.length+ne.length-Ee),Ee===ne.length)je.set(ne),Ye.set(he);else if(Ee<ne.length){var vt=ne.length-Ee;je.set(ne.subarray(vt)),Ye.set(he),Ye.set(ne.subarray(0,vt),he.length)}else{var et=Ee-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=Ee>=0&&Ee<je.length?je.splice(0,je.length-Ee):[];return[je,Ye]}var ee=G(z,Y,U,q,oe),Ce=t.redraw(z),Ae=[z,ee.update,U,ee.maxPoints];return l.add(z,t.prependTraces,Ae,W,arguments),Ce}function V(z,Y,U,q){z=i.getGraphDiv(z);function oe(he,ne,Ee){var je,Ye;if(i.isTypedArray(he))if(Ee<=0){var rt=new he.constructor(0),nt=O(ne,he);Ee<0?(je=nt,Ye=rt):(je=rt,Ye=nt)}else if(je=new he.constructor(Ee),Ye=new he.constructor(he.length+ne.length-Ee),Ee===ne.length)je.set(ne),Ye.set(he);else if(Ee<ne.length){var vt=ne.length-Ee;je.set(ne.subarray(0,vt)),Ye.set(ne.subarray(vt)),Ye.set(he,vt)}else{var et=Ee-ne.length;je.set(ne),je.set(he.subarray(0,et),ne.length),Ye.set(he.subarray(et))}else je=ne.concat(he),Ye=Ee>=0&&Ee<je.length?je.splice(Ee,je.length):[];return[je,Ye]}var ee=G(z,Y,U,q,oe),Ce=t.redraw(z),Ae=[z,ee.update,U,ee.maxPoints];return l.add(z,t.extendTraces,Ae,V,arguments),Ce}function Z(z,Y,U){z=i.getGraphDiv(z);var q=[],oe=t.deleteTraces,ee=Z,Ce=[z,q],Ae=[z,Y],he,ne;for(I(z,Y,U),Array.isArray(Y)||(Y=[Y]),Y=Y.map(function(Ee){return i.extendFlat({},Ee)}),x.cleanData(Y),he=0;he<Y.length;he++)z.data.push(Y[he]);for(he=0;he<Y.length;he++)q.push(-Y.length+he);if(typeof U>"u")return ne=t.redraw(z),l.add(z,oe,Ce,ee,Ae),ne;Array.isArray(U)||(U=[U]);try{P(z,q,U)}catch(Ee){throw z.data.splice(z.data.length-Y.length,Y.length),Ee}return l.startSequence(z),l.add(z,oe,Ce,ee,Ae),ne=t.moveTraces(z,q,U),l.stopSequence(z),ne}function X(z,Y){z=i.getGraphDiv(z);var U=[],q=t.addTraces,oe=X,ee=[z,U,Y],Ce=[z,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(z,Y,"indices"),Y=M(Y,z.data.length-1),Y.sort(i.sorterDes),Ae=0;Ae<Y.length;Ae+=1)he=z.data.splice(Y[Ae],1)[0],U.push(he);var ne=t.redraw(z);return l.add(z,q,ee,oe,Ce),ne}function Q(z,Y,U){z=i.getGraphDiv(z);var q=[],oe=[],ee=Q,Ce=Q,Ae=[z,U,Y],he=[z,Y,U],ne;if(P(z,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,z.data.length-1),U=M(U,z.data.length-1),ne=0;ne<z.data.length;ne++)Y.indexOf(ne)===-1&&q.push(z.data[ne]);for(ne=0;ne<Y.length;ne++)oe.push({newIndex:U[ne],trace:z.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);z.data=q;var Ee=t.redraw(z);return l.add(z,ee,Ae,Ce,he),Ee}function te(z,Y,U,q){z=i.getGraphDiv(z),x.clearPromiseQueue(z);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&&(z.changed=!0);var ee=x.coerceTraceIndices(z,q),Ce=de(z,oe,ee),Ae=Ce.flags;Ae.calc&&(z.calcdata=void 0),Ae.clearAxisTypes&&x.clearAxisTypes(z,ee,{});var he=[];Ae.fullReplot?he.push(t._doPlot):(he.push(c.previousPromises),c.supplyDefaults(z),Ae.markerSize&&(c.doCalcdata(z),_e(he)),Ae.style&&he.push(_.doTraceStyle),Ae.colorbars&&he.push(_.doColorBars),he.push(E)),he.push(c.rehover,c.redrag,c.reselect),l.add(z,te,[z,Ce.undoit,Ce.traces],te,[z,Ce.redoit,Ce.traces]);var ne=i.syncOrAsync(he,z);return(!ne||!ne.then)&&(ne=Promise.resolve()),ne.then(function(){return z.emit("plotly_restyle",Ce.eventData),z})}function xe(z){return z===void 0?null:z}function ue(z,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,z),Ce(Ae)},ee}:n}function ae(z,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(z+"["+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:{},Ee=i.extendFlat({},he,ne);for(var je in Ee)ae(z+"."+je,he[je],ne[je],q)}else q[z]===void 0&&(q[z]=xe(Y))}function le(z,Y,U){for(var q in U){var oe=n(z,q);ae(q,oe.get(),U[q],Y)}}function de(z,Y,U){var q=z._fullLayout,oe=z._fullData,ee=z.data,Ce=q._guiEditing,Ae=ue(q._preGUI,Ce),he=i.extendDeepAll({},Y),ne;ge(Y);var Ee=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(z.layout,Ht.replace("LAYOUT",""));else{var Jo=U[Ga],ca=q._tracePreGUI[lt(Jo)._fullInput.uid];Gi=ue(ca,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(z.layout,st.replace("LAYOUT","")),Ye[st]=[xe(ct.get())],ct.set(Array.isArray(at)?at[0]:at),Ee.calc=!0;continue}for(Ye[st]=nt(),ne=0;ne<U.length;ne++){qe=ee[U[ne]],Ze=lt(U[ne]);var $t=q._tracePreGUI[Ze._fullInput.uid];if(ct=ue($t,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&&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,$n=Dn==="top"||Dn==="bottom";if(Dr==="thicknessmode"){var Ms=$n?Oi.h:Oi.w;Qe(Ur+"thickness",Vr.thickness*(Ke==="fraction"?1/Ms:Ms),ne)}else{var Ba=$n?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 Pn=qe.x&&!qe.y?"h":"v";if((ct.get()||Pn)===Ze.orientation)continue}else st==="orientationaxes"&&(qe.orientation={v:"h",h:"v"}[Ze.orientation]);x.swapXYData(qe),Ee.calc=Ee.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(ct.parts[0])!==-1?(x.manageArrayContainers(ct,Ke,Ye),Ee.calc=!0):(gt?gt.arrayOk&&!s.traceIs(Ze,"regl")&&(i.isArrayOrTypedArray(Ke)||i.isArrayOrTypedArray(Tt))?Ee.calc=!0:k.update(Ee,gt):Ee.calc=!0,ct.set(Ke))}}if(["swapxyaxes","orientationaxes"].indexOf(st)!==-1&&u.swap(z,U),st==="orientationaxes"){var ii=n(z.layout,"hovermode"),En=ii.get();En==="x"?ii.set("y"):En==="y"?ii.set("x"):En==="x unified"?ii.set("y unified"):En==="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(Ee.calc||Ee.plot)&&(Ee.fullReplot=!0),{flags:Ee,undoit:Ye,redoit:je,traces:U,eventData:i.extendDeepNoArrays([],[he,U])}}function ge(z){var Y=i.counterRegex("axis",".title",!1,!1),U=/colorbar\.title$/,q=Object.keys(z),oe,ee,Ce;for(oe=0;oe<q.length;oe++)ee=q[oe],Ce=z[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){z[ne]=z[he],delete z[he]}}function Te(z,Y,U){z=i.getGraphDiv(z),x.clearPromiseQueue(z);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&&(z.changed=!0);var oe=Pe(z,q),ee=oe.flags;ee.calc&&(z.calcdata=void 0);var Ce=[c.previousPromises];ee.layoutReplot?Ce.push(_.layoutReplot):Object.keys(q).length&&(Le(z,ee,oe)||c.supplyDefaults(z),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(E)),Ce.push(c.rehover,c.redrag,c.reselect),l.add(z,Te,[z,oe.undoit],Te,[z,oe.redoit]);var Ae=i.syncOrAsync(Ce,z);return(!Ae||!Ae.then)&&(Ae=Promise.resolve(z)),Ae.then(function(){return z.emit("plotly_relayout",oe.eventData),z})}function Le(z,Y,U){var q=z._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 Ee=u.id2name(ne);if(ee=z.layout[Ee],Ce=q[Ee],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(z,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")};z.push(b,_.doAutoRangeAndConstraints,U,_.drawData,_.finalDraw)}var ze=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ce=/^[xyz]axis[0-9]*\.autorange$/,ye=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Pe(z,Y){var U=z.layout,q=z._fullLayout,oe=q._guiEditing,ee=ue(q._preGUI,oe),Ce=Object.keys(Y),Ae=u.list(z),he=i.extendDeepAll({},Y),ne={},Ee,je,Ye;for(ge(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(ca,ni){if(Array.isArray(ca)){ca.forEach(function(VM){Qe(VM,ni)});return}if(!(ca in Y||x.hasParent(Y,ca))){var Cm=ee(U,ca);ca in lt||(lt[ca]=xe(Cm.get())),ni!==void 0&&Cm.set(ni)}}var yt={},mt;function st(ca){var ni=u.name2id(ca.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,$t=qe.parts.slice(0,Tt).join("."),Dr=n(z.layout,$t).get(),fr=n(q,$t).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]=z._initialAutoSize[at];else if(at==="autosize")Qe("width",Ze?null:q.width),Qe("height",Ze?null:q.height);else if(gt.match(ze))st(gt),n(q,$t+"._inputRange").set(null);else if(gt.match(ce)){st(gt),n(q,$t+"._inputRange").set(null);var Dn=n(q,$t).get();Dn._inputDomain&&(Dn._input.domain=Dn._inputDomain.slice())}else gt.match(ye)&&n(q,$t+"._inputDomain").set(null);if(Ke==="type"){mt=Dr;var $n=fr.type==="linear"&&Ze==="log",Ms=fr.type==="log"&&Ze==="linear";if($n||Ms){if(!mt||!mt.range)Qe($t+".autorange",!0);else if(fr.autorange)$n&&(mt.range=mt.range[1]>mt.range[0]?[1,2]:[2,1]);else{var Ba=mt.range[0],Aa=mt.range[1];$n?(Ba<=0&&Aa<=0&&Qe($t+".autorange",!0),Ba<=0?Ba=Aa/1e6:Aa<=0&&(Aa=Ba/1e6),Qe($t+".range[0]",Math.log(Ba)/Math.LN10),Qe($t+".range[1]",Math.log(Aa)/Math.LN10)):(Qe($t+".range[0]",Math.pow(10,Ba)),Qe($t+".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")(z,fr,Ze,Qe),s.getComponentMethod("images","convertCoords")(z,fr,Ze,Qe)}else Qe($t+".autorange",!0),Qe($t+".range",null);n(q,$t+"._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")(z,Qo,ji,Qe),s.getComponentMethod("images","convertCoords")(z,Qo,ji,Qe)}var Pn=g.containerArrayMatch(at);if(Pn){Ee=Pn.array,je=Pn.index;var ii=Pn.property,En=Vr||{editType:"calc"};je!==""&&ii===""&&(g.isAddVal(Ze)?lt[at]=null:g.isRemoveVal(Ze)?lt[at]=(n(U,Ee).get()||[])[je]:i.warn("unrecognized full object value",Y)),k.update(et,En),ne[Ee]||(ne[Ee]={});var Bi=ne[Ee][je];Bi||(Bi=ne[Ee][je]={}),Bi[ii]=Ze,delete Y[at]}else Ke==="reverse"?(Dr.range?Dr.range.reverse():(Qe($t+".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(Ee in ne){var Ht=g.applyContainerArrayChanges(z,ee(U,Ee),ne[Ee],et,ee);Ht||(et.plot=!0)}for(var dr in yt){mt=u.getFromId(z,dr);var Ga=mt&&mt._constraintGroup;if(Ga){et.calc=!0;for(var Gi in Ga)yt[Gi]||(u.getFromId(z,Gi)._constraintShrinkable=!0)}}(Re(z)||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 Re(z){var Y=z._fullLayout,U=Y.width,q=Y.height;return z.layout.autosize&&c.plotAutoSize(z,z.layout,Y),Y.width!==U||Y.height!==q}function K(z,Y,U,q){z=i.getGraphDiv(z),x.clearPromiseQueue(z),i.isPlainObject(Y)||(Y={}),i.isPlainObject(U)||(U={}),Object.keys(Y).length&&(z.changed=!0),Object.keys(U).length&&(z.changed=!0);var oe=x.coerceTraceIndices(z,q),ee=de(z,i.extendFlat({},Y),oe),Ce=ee.flags,Ae=Pe(z,i.extendFlat({},U)),he=Ae.flags;(Ce.calc||he.calc)&&(z.calcdata=void 0),Ce.clearAxisTypes&&x.clearAxisTypes(z,oe,U);var ne=[];he.layoutReplot?ne.push(_.layoutReplot):Ce.fullReplot?ne.push(t._doPlot):(ne.push(c.previousPromises),Le(z,he,Ae)||c.supplyDefaults(z),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(E)),ne.push(c.rehover,c.redrag,c.reselect),l.add(z,K,[z,ee.undoit,Ae.undoit,ee.traces],K,[z,ee.redoit,Ae.redoit,ee.traces]);var Ee=i.syncOrAsync(ne,z);return(!Ee||!Ee.then)&&(Ee=Promise.resolve(z)),Ee.then(function(){return z.emit("plotly_update",{data:ee.eventData,layout:Ae.eventData}),z})}function ke(z){return function(U){U._fullLayout._guiEditing=!0;var q=z.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(z,Y){for(var U=0;U<Y.length;U++){var q=Y[U],oe=z.match(q.pattern);if(oe){var ee=oe[1]||"";return{head:ee,tail:z.substr(ee.length+1),attr:q.attr}}}}function se(z,Y){var U=n(Y,z).get();if(U!==void 0)return U;var q=z.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(z,Y){for(var U=0;U<Y.length;U++)if(Y[U]._fullInput.uid===z)return U;return-1}function fe(z,Y,U){for(var q=0;q<Y.length;q++)if(Y[q].uid===z)return q;return!Y[U]||Y[U].uid?-1:U}function be(z,Y){var U=i.isPlainObject(z),q=Array.isArray(z);return U||q?(U&&i.isPlainObject(Y)||q&&Array.isArray(Y))&&JSON.stringify(z)===JSON.stringify(Y):z===Y}function Me(z,Y,U,q){var oe=q._preGUI,ee,Ce,Ae,he,ne,Ee,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(Ee=oe[ee],Ee===null&&(Ee=void 0),je=n(Y,ee),Ye=je.get(),be(Ye,Ee)){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&&lt===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 $t=ie(ct,U);if($t<0){delete Ze[ct];break}var Dr=U[$t];gt=Dr._fullInput;var fr=fe(ct,z,gt.index);if(fr<0){delete Ze[ct];break}Ke=z[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&&(Ee=Tt[ee],Ee===null&&(Ee=void 0),je=n(Ke,ee),Ye=je.get(),be(Ye,Ee))){je.set(xe(n(gt,ee).get()));continue}}else i.warn("unrecognized GUI edit: "+ee+" in trace uid "+ct);delete Tt[ee]}}}function Se(z,Y,U,q){var oe,ee;function Ce(){return t.addFrames(z,oe)}z=i.getGraphDiv(z),x.clearPromiseQueue(z);var Ae=z._fullData,he=z._fullLayout;if(!i.isPlotDiv(z)||!Ae||!he)ee=t.newPlot(z,Y,U,q);else{if(i.isPlainObject(Y)){var ne=Y;Y=ne.data,U=ne.layout,q=ne.config,oe=ne.frames}var Ee=!1;if(q){var je=i.extendDeep({},z._context);z._context=void 0,F(z,q),Ee=ve(je,z._context)}z.data=Y||[],x.cleanData(z.data),z.layout=U||{},x.cleanLayout(z.layout),Me(z.data,z.layout,Ae,he),c.supplyDefaults(z,{skipUpdateCalc:!0});var Ye=z._fullData,rt=z._fullLayout,nt=rt.datarevision===void 0,vt=rt.transition,et=He(z,he,rt,nt,vt),Ct=et.newDataRevision,lt=$e(z,Ae,Ye,nt,vt,Ct);if(Re(z)&&(et.layoutReplot=!0),lt.calc||et.calc){z.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(z.calcdata,Ye);var qe=[];if(oe&&(z._transitionData={},c.createTransitionData(z),qe.push(Ce)),rt.transition&&!Ee&&(lt.anim||et.anim))et.ticks&&qe.push(_.doTicksRelayout),c.doCalcdata(z),_.doAutoRangeAndConstraints(z),qe.push(function(){return c.transitionFromReact(z,lt,et,he)});else if(lt.fullReplot||et.layoutReplot||Ee)z._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(z,ct[Ke]);else{var gt=s.getComponentMethod(Ze,"draw");if(gt===i.noop)throw new Error("cannot draw components: "+Ze);gt(z)}}}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(E)}qe.push(c.rehover,c.redrag,c.reselect),ee=i.syncOrAsync(qe,z),(!ee||!ee.then)&&(ee=Promise.resolve(z))}return ee.then(function(){return z.emit("plotly_react",{data:Y,layout:U}),z})}function $e(z,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 Ee(rt){var nt=f.getTraceValObject(ne,rt);return!ne._module.animatable&&nt.anim&&(nt.anim=!1),nt}var je={getValObject:Ee,flags:Ae,immutable:q,transition:oe,newDataRevision:ee,gd:z},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(z,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:z};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(z,Y,U,q){var oe,ee,Ce,Ae=q.getValObject,he=q.flags,ne=q.immutable,Ee=q.inArray,je=q.arrayIndex;function Ye(){var $t=oe.editType;if(Ee&&$t.indexOf("arraydraw")!==-1){i.pushUnique(he.arrays[Ee],je);return}k.update(he,oe),$t!=="none"&&he.nChanges++,q.transition&&oe.anim&&he.nChangesAnim++,(ze.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($t){return $t.valType==="data_array"||$t.arrayOk}for(ee in z){if(he.calc&&!q.transition)return;var nt=z[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=z[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;Ee||(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 z||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(z,Y){var U;for(U in z)if(U.charAt(0)!=="_"){var q=z[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(z,Y,U){if(z=i.getGraphDiv(z),!i.isPlotDiv(z))throw new Error("This element is not a Plotly plot: "+z+". 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=z._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,Ee){var je=0;return function(){if(ne&&++je===Ee)return ne()}}return new Promise(function(ne,Ee){function je(){if(q._frameQueue.length!==0){for(;q._frameQueue.length;){var Ke=q._frameQueue.pop();Ke.onInterrupt&&Ke.onInterrupt()}z.emit("plotly_animationinterrupted",[])}}function Ye(Ke){if(Ke.length!==0){for(var gt=0;gt<Ke.length;gt++){var $t;Ke[gt].type==="byname"?$t=c.computeFrame(z,Ke[gt].name):$t=Ke[gt].data;var Dr=Ae(gt),fr=Ce(gt);fr.duration=Math.min(fr.duration,Dr.duration);var Ur={frame:$t,name:Ke[gt].name,frameOpts:Dr,transitionOpts:fr};gt===Ke.length-1&&(Ur.onComplete=he(ne,2),Ur.onInterrupt=Ee),q._frameQueue.push(Ur)}U.mode==="immediate"&&(q._lastFrameAt=-1/0),q._animationRaf||vt()}}function rt(){z.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;z._fullLayout._currentFrame=gt,q._lastFrameAt=Date.now(),q._timeToNext=Ke.frameOpts.duration,c.transition(z,Ke.frame.data,Ke.frame.layout,x.coerceTraceIndices(z,Ke.frame.traces),Ke.frameOpts,Ke.transitionOpts).then(function(){Ke.onComplete&&Ke.onComplete()}),z.emit("plotly_animatingframe",{name:gt,frame:Ke.frame,animation:{frame:Ke.frameOpts,transition:Ke.transitionOpts}})}else rt()}function vt(){z.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+'"'),Ee();return}["next","immediate"].indexOf(U.mode)!==-1&&je(),U.direction==="reverse"&&yt.reverse();var Ze=z._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):(z.emit("plotly_animated"),ne())})}function Ne(z,Y,U){if(z=i.getGraphDiv(z),Y==null)return Promise.resolve();if(!i.isPlotDiv(z))throw new Error("This element is not a Plotly plot: "+z+". 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=z._transitionData._frames,he=z._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,Ee=[],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},Ee.push({frame:c.supplyFrameDefaults(Y[q]),index:U&&U[q]!==void 0&&U[q]!==null?U[q]:ne+q})}Ee.sort(function(at,qe){return at.index>qe.index?-1:at.index<qe.index?1:0});var et=[],Ct=[],lt=Ae.length;for(q=Ee.length-1;q>=0;q--){if(oe=Ee[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 "+z._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(Ee[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=[z,Ct],st=[z,et];return l&&l.add(z,Qe,mt,yt,st),c.modifyFrames(z,et)}function We(z,Y){if(z=i.getGraphDiv(z),!i.isPlotDiv(z))throw new Error("This element is not a Plotly plot: "+z);var U,q,oe=z._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=[z,Ce],Ee=[z,ee];return l&&l.add(z,Ae,ne,he,Ee),c.modifyFrames(z,ee)}function Ge(z){z=i.getGraphDiv(z);var Y=z._fullLayout||{},U=z._fullData||[];return c.cleanPlot([],{},U,Y),c.purge(z),o.purge(z),Y._container&&Y._container.remove(),delete z._context,z}function Ve(z){var Y=z._fullLayout,U=z.getBoundingClientRect();if(!i.equalDomRects(U,Y._lastBBox)){var q=Y._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(z));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(z){var Y=e.select(z),U=z._fullLayout;if(U._calcInverseTransform=Ve,U._calcInverseTransform(z),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"),z.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=$,t.relayout=Te,t.restyle=te,t.setPlotConfig=R,t.update=K,t._guiRelayout=ke(Te),t._guiRestyle=ke(te),t._guiUpdate=ke(K),t._storeDirectGUIEdit=le})(ap);var kr={},GR=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(){GR.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 U2=window.URL||window.webkitURL;kr.createObjectURL=function(t){return U2.createObjectURL(t)};kr.revokeObjectURL=function(t){return U2.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=UR(window.atob(t));return new window.Blob([r],{type:"image/"+e})};kr.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function UR(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 dh=ft,VR=me,XR=xt,YR=ot,ff=Mn,kv=/"/g,Rl="TOBESTRIPPED",WR=new RegExp('("'+Rl+")|("+Rl+'")',"g");function qR(t){var e=dh.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="&lt;"?"&#60;":a==="&rt;"?"&#62;":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function ZR(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}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(XR.setRect,0,0,l,s).call(YR.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=dh.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(kv,Rl))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var m=dh.select(this),y=this.style.fill;y&&y.indexOf("url(")!==-1&&m.style("fill",y.replace(kv,Rl));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&m.style("stroke",b.replace(kv,Rl))}),(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=qR(p),p=ZR(p),p=p.replace(WR,"'"),VR.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},j0=me,KR=Ih.EventEmitter,jn=kr;function QR(t){var e=t.emitter||new KR,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(j0.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"||j0.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 Jp=QR,B0=dt,G0=ap,JR=Qt,Da=me,pl=kr,ez=Qp,tz=Jp,rz=Rc.version,Av={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 az(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[_],Av[_])}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(Av.format.values,", "," or ")+".");var l={};function s(_,k){return Da.coerce(e,l,Av,_,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&&B0(n.width)&&(m.width=n.width),u?m.height=u:e.height===null&&B0(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=ez(p,f,v),S=p._fullLayout.width,D=p._fullLayout.height;function L(){G0.purge(p),document.body.removeChild(p)}if(f==="full-json"){var E=JR.graphJson(p,!1,"keepdata","object",!0,!0);return E.version=rz,E=JSON.stringify(E),L(),_(d?E:pl.encodeJSON(E))}if(L(),f==="svg")return _(d?T:pl.encodeSVG(T));var R=document.createElement("canvas");R.id=Da.randstr(),tz({format:f,width:S,height:D,scale:v,canvas:R,svg:T,promise:!0}).then(_).catch(k)})}function x(_){return d?_.replace(pl.IMAGE_URL_PREFIX,""):_}return new Promise(function(_,k){G0.newPlot(p,r,m,y).then(b).then(w).then(g).then(function(T){_(x(T))}).catch(function(T){k(T)})})}var V2=az,ia=me,iz=Qt,nz=Vo,oz=jo.dfltConfig,Zr=ia.isPlainObject,Ai=Array.isArray,U0=ia.isArrayOrTypedArray,lz=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=nz.get(),i=[],n={_context:ia.extendFlat({},oz)},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"))),iz.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)),zl(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)},zl(m[b],y[b],x,i,v,w)}}}var _=n._fullLayout,k=sz(a,s);return zl(l,_,k,i,"layout"),i.length===0?void 0:i};function zl(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=uz(r,s),h=(v||{}).valType,d=h==="info_array",p=h==="colorscale",m=(v||{}).items;if(!cz(r,s))a.push(qt("schema",i,f));else if(Zr(c)&&Zr(u)&&h!=="any")zl(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,E;for(L=0;L<u.length;L++){var R=u[L]._index||L;if(E=f.slice(),E.push(R),Zr(c[R])&&Zr(u[L])){D.push(R);var N=c[R],H=u[L];Zr(N)&&N.visible!==!1&&H.visible===!1?a.push(qt("invisible",i,E)):zl(N,H,S,a,i,E)}}for(L=0;L<c.length;L++)E=f.slice(),E.push(L),Zr(c[L])?D.indexOf(L)===-1&&a.push(qt("unused",i,E)):a.push(qt("object",i,E,c[L]))}else!Zr(c)&&Zr(u)?a.push(qt("object",i,f,c)):!U0(c)&&U0(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 sz(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 fz={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=dz(r),s=fz[t](e,l,a,i);return ia.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function cz(t,e){var r=X2(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function uz(t,e){if(e in t)return t[e];var r=X2(e);return t[r.keyMinusId]}var vz=ia.counterRegex("([a-z]+)");function X2(t){var e=t.match(vz);return{keyMinusId:e&&e[1],id:e&&e[2]}}function dz(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 V0=me,ml=kr;function hz(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(V0.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(V0.isSafari()){var c=r==="svg"?",":";base64,";return ml.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var pz=hz,Mv=me,mz=V2,yz=pz,gz=kr;function bz(t,e){var r;return Mv.isPlainObject(t)||(r=Mv.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.")),Mv.isIE()&&e.format!=="svg"&&i(new Error(gz.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=mz(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),yz(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var Y2=bz,em={},Fr=me,Nr=Fr.isPlainObject,W2=Vo,q2=Qt,xz=la,Z2=Lt,K2=jo.dfltConfig;em.makeTemplate=function(t){t=Fr.isPlainObject(t)?t:Fr.getGraphDiv(t),t=Fr.extendDeep({_context:K2},{data:t.data,layout:t.layout}),q2.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={};Il(h,d,wz.bind(null,h));var p=Fr.coerce(h,{},xz,"type"),m=a.data[p];m||(m=a.data[p]=[]),m.push(d)}),Il(r,a.layout,_z.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)&&mc(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++)mc(s[o%f],c[o]);for(o=u;o<f;o++)c.push(Fr.extendDeep({},s[o]))}for(l in v)l in a.data||(a.data[l]=Fr.extendDeep([],v[l]))}}return a};function mc(t,e){t=Fr.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,u,v){if(Nr(u)&&Nr(c))mc(c,u);else if(Array.isArray(u)&&Array.isArray(c)){var h=Z2.arrayTemplater({_template:t},v);for(i=0;i<u.length;i++){var d=u[i],p=h.newItem(d)._template;p&&mc(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,yc(o)===o)for(var s in e){var f=yc(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function yc(t){return t.replace(/[0-9]+$/,"")}function Il(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=yc(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))Il(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]||(Il(m,e,r,Kr(l,h,s),Kr(l,h,f)),h++,d[y]=1);else if(!v){var b=Z2.arrayDefaultKey(o),w=Kr(t,b,a),g=Kr(l,h,s);Il(m,e,r,g,Kr(l,h,f));var x=Fr.nestedProperty(e,g),_=Fr.nestedProperty(e,w);_.set(x.get()),x.set(null),v=!0}}}else{var k=Fr.nestedProperty(e,s);k.set(l)}}}function _z(t,e){return W2.getLayoutValObject(t,Fr.nestedProperty({},e).parts)}function wz(t,e){return W2.getTraceValObject(t,Fr.nestedProperty({},e).parts)}function Kr(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}em.validateTemplate=function(t,e){var r=Fr.extendDeep({},{_context:K2,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,q2.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 _=yc(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(_)&&Tz(_)&&b(_,k)}}if(b({data:s,layout:l},""),o.length)return o.map(kz)};function Tz(t){for(var e=0;e<t.length;e++)if(Nr(t[e]))return!0}function kz(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=ap;zt._doPlot=rr._doPlot;zt.newPlot=rr.newPlot;zt.restyle=rr.restyle;zt.relayout=rr.relayout;zt.redraw=rr.redraw;zt.update=rr.update;zt._guiRestyle=rr._guiRestyle;zt._guiRelayout=rr._guiRelayout;zt._guiUpdate=rr._guiUpdate;zt._storeDirectGUIEdit=rr._storeDirectGUIEdit;zt.react=rr.react;zt.extendTraces=rr.extendTraces;zt.prependTraces=rr.prependTraces;zt.addTraces=rr.addTraces;zt.deleteTraces=rr.deleteTraces;zt.moveTraces=rr.moveTraces;zt.purge=rr.purge;zt.addFrames=rr.addFrames;zt.deleteFrames=rr.deleteFrames;zt.animate=rr.animate;zt.setPlotConfig=rr.setPlotConfig;var Az=Oc.getGraphDiv,Mz=Ip.eraseActiveShape;zt.deleteActiveShape=function(t){return Mz(Az(t))};zt.toImage=V2;zt.validate=lz;zt.downloadImage=Y2;var Q2=em;zt.makeTemplate=Q2.makeTemplate;zt.validateTemplate=Q2.validateTemplate;var Sv=me,Sz=Je,tm=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=Sz.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=Sv.minRowLength(n);o?l=Math.min(f,Sv.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=Sv.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},X0=me.dateTick0,Lz=Yt,Cz=Lz.ONEWEEK;function Y0(t,e){return t%Cz===0?X0(e,1):X0(e,0)}var mu=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",Y0(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",Y0(l,r.ycalendar)),i("yperiodalignment"))}},W0=["orientation","groupnorm","stackgaps"],Dz=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<W0.length;v++){var h=W0[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}},q0=ot,Z0=ka.hasColorscale,K0=ps,$z=_r,J2=function(e,r,a,i,n,o){var l=$z.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),Z0(e,"marker")&&K0(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=q0.background:f=q0.defaultLine,n("marker.line.color",f),Z0(e,"marker.line")&&K0(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")}},Pz=me.isArrayOrTypedArray,Ez=ka.hasColorscale,Rz=ps,ek=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),Ez(e,"line"))Rz(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(Pz(l)?!1:l)||a;n("line.color",s)}n("line.width"),o.noDash||n("line.dash"),o.backoff&&n("line.backoff")},zz=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},Iz=me,tk=function(t,e,r,a,i){i=i||{},a("textposition"),Iz.coerceFont(a,"textfont",i.font||r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},Fz=ot,Q0=me.isArrayOrTypedArray,rk=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!Q0(o)?n=o:l&&!Q0(l)&&(n=l)}i("fillcolor",Fz.addOpacity((r.line||{}).color||n||a,.5))},J0=me,Nz=Je,Hz=Fi,Oz=hu,Bn=_r,jz=tm,Bz=mu,Gz=Dz,Uz=J2,Vz=ek,eb=zz,Xz=tk,Yz=rk,Wz=me.coercePattern,qz=function(e,r,a,i){function n(h,d){return J0.coerce(e,r,Hz,h,d)}var o=jz(e,r,i,n);if(o||(r.visible=!1),!!r.visible){Bz(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=Gz(e,r,i,n);i.scattermode==="group"&&r.orientation===void 0&&n("orientation","v");var s=!l&&o<Oz.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),Bn.hasMarkers(r)&&Uz(e,r,a,i,n,{gradient:!0}),Bn.hasLines(r)&&(Vz(e,r,a,i,n,{backoff:!0}),eb(e,r,n),n("connectgaps"),n("line.simplify")),Bn.hasText(r)&&(n("texttemplate"),Xz(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"&&(Yz(e,r,a,n),Bn.hasLines(r)||eb(e,r,n),Wz(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=Nz.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),J0.coerceSelectionMarkerOpacity(r,n)}},Zz=ti.getAxisGroup,rm=function(e,r,a,i){var n=r.orientation,o=r[{v:"x",h:"y"}[n]+"axis"],l=Zz(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)},Kz=me,Qz=rm,Jz=Fi,ak=function(e,r){var a,i,n;function o(u){return Kz.coerce(i._input,i,Jz,u)}if(r.scattermode==="group")for(n=0;n<e.length;n++)i=e[n],i.type==="scatter"&&(a=i._input,Qz(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}}}}},eI=me,tI=ip,rI=function(t,e){function r(i,n){return eI.coerce(t,e,tI,i,n)}var a=e.barmode==="group";e.scattermode==="group"&&r("scattergap",a?e.bargap:.2)},aI=dt,ik=me,iI=ik.dateTime2ms,cf=ik.incrementMonth,nI=Yt,oI=nI.ONEAVGMONTH,yu=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(aI(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=iI(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*oI)),_=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}},Lv=ka.hasColorscale,Cv=fp,tb=_r,nk=function(e,r){tb.hasLines(r)&&Lv(r,"line")&&Cv(e,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),tb.hasMarkers(r)&&(Lv(r,"marker")&&Cv(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Lv(r,"marker.line")&&Cv(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},cr=me,ok=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"))}},rb=me,lk=function(e,r){rb.isArrayOrTypedArray(r.selectedpoints)&&rb.tagSelected(e,r)},ab=dt,hh=me,es=Dt,ib=yu,Dv=Yt.BADNUM,ph=_r,lI=nk,sI=ok,fI=lk;function cI(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=ib(e,a,"x",n),s=ib(e,i,"y",o),f=l.vals,c=s.vals,u=e._length,v=new Array(u),h=e.ids,d=am(e,r,a,i),p=!1,m,y,b,w,g,x;ck(r,e);var _="x",k="y",T;if(d)hh.pushUnique(d.traceIndices,e._expandedIndex),m=d.orientation==="v",m?(k="s",T="x"):(_="s",T="y"),g=d.stackgaps==="interpolate";else{var S=fk(e,u);sk(t,e,a,i,f,c,S)}var D=!!e.xperiodalignment,L=!!e.yperiodalignment;for(y=0;y<u;y++){var E=v[y]={},R=ab(f[y]),N=ab(c[y]);R&&N?(E[_]=f[y],E[k]=c[y],D&&(E.orig_x=n[y],E.xEnd=l.ends[y],E.xStart=l.starts[y]),L&&(E.orig_y=o[y],E.yEnd=s.ends[y],E.yStart=s.starts[y])):d&&(m?R:N)?(E[T]=m?f[y]:c[y],E.gap=!0,g?(E.s=Dv,p=!0):E.s=0):E[_]=E[k]=Dv,h&&(E.id=String(h[y]))}if(sI(v,e),lI(t,e),fI(v,e),d){for(y=0;y<v.length;)v[y][T]===Dv?v.splice(y,1):y++;if(hh.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],F=v[y-1].s,$=(v[b].s-F)/(v[b][T]-H);y<b;)v[y].s=F+(v[y][T]-H)*$,y++}}}return v}function sk(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,u=s._firstScatter[uk(e)]===e.uid,v=(am(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"||!ph.hasMarkers(e)&&!ph.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 fk(t,e){if(ph.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)},hh.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 ck(t,e){var r=uk(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function uk(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function am(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 im={calc:cI,calcMarkerSize:fk,calcAxisExpansion:sk,setFirstScatter:ck,getStackOpts:am},uI=gu,vI=me.distinctVals;function gu(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=vI(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={}}gu.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};gu.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};gu.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,$o=Yt.BADNUM,dI=Je,ts=Dt,hI=ti.getAxisGroup,bu=uI;function pI(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&&dI.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};mh(t,r,a,s,h),mh(t,a,r,l,h)}function mh(t,e,r,a,i){if(a.length){var n,o,l,s,f;switch(gI(r,a),i.mode){case"overlay":$v(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&&bI(t,e,r,o,i),n.length&&$v(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);yI(o),o.length&&xI(t,e,r,o,i),n.length&&$v(e,r,n,i);break}mI(a),AI(a,e)}}function mI(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 yI(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 gI(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 $v(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new bu([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});vk(t,o,a),a.norm?(yk(o),nm(e,o,a)):mk(e,o)}}function bI(t,e,r,a,i){var n=new bu(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});_I(t,e,n,i),TI(n,e),i.norm?(yk(n),nm(r,n,i)):mk(r,n)}function xI(t,e,r,a,i){var n=new bu(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});vk(e,n,i),wI(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!==$o){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&nm(r,n,i)}function vk(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,dk(e),hk(t,e),pk(t,e)}function _I(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=hI(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,dk(r),hk(e,r),pk(e,r,c)}function dk(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 hk(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 pk(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 mk(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 wI(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!==$o&&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!==$o){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 yk(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!==$o&&t.put(n.p,n.b+n.s)}}function TI(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 bu([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==$o){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function nm(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!==$o){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 kI(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 AI(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&&kI(t,v,h,e)}function qo(t){return t._id.charAt(0)}var om={crossTraceCalc:pI,setGroupPositions:mh},nb=im,ob=om.setGroupPositions;function MI(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};ob(t,r,a,s,u),ob(t,a,r,l,u)}var SI=function(e,r){e._fullLayout.scattermode==="group"&&MI(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++)Pv(v,f,S[c],s,_,b,g),f++;if(d!==S[c]){for(u=0;u<s;u++)Pv(l[T[u]],c,d,u,_,b,g);S.splice(c,0,d)}c++}for(;c<S.length;c++)Pv(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 E=v[0].trace,R=nb.calcMarkerSize(E,E._rawLength),N=Array.isArray(R);if(R&&_[s]||N){var H=R;for(R=new Array(D),f=0;f<D;f++)R[f]=v[f].gap?0:N?H[v[f].i]:H}var F=new Array(D),$=new Array(D);for(f=0;f<D;f++)F[f]=v[f].x,$[f]=v[f].y;nb.calcAxisExpansion(e,E,a,i,F,$,R),v[0].t.orientation=y.orientation}}}}};function Pv(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=LI(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 LI(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 CI=xt,gk=Yt,yl=gk.BADNUM,bk=gk.LOG_CLIP,lb=bk+.5,sb=bk-.5,gc=me,DI=gc.segmentsIntersect,fb=gc.constrain,Ev=hu,$I=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=Ev.minTolerance,w=e.length,g=new Array(w),x=0,_,k,T,S,D,L,E,R,N,H,F,$,A,M,C,P;function I(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?lb:sb)/(n._m*s*(n._m>0?lb:sb)))),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,z=.5-Be,Y=Ge*Ge+Ve*Ve,U=Ge*Ue+Ve*z;if(U>0&&U<Y){var q=Ue*Ve-z*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+Ev.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=Ev.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,ge,Te;function Le(ve,Be){for(var Ne=[],We=0,Ge=0;Ge<4;Ge++){var Ve=xe[Ge],Ue=DI(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[fb(ve[0],Z,X),fb(ve[1],Q,te)]}function ze(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&&ze(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),z=[];if(Ve&&Ue&&ze(Ve,Ue))return z;Ve&&z.push(Ve),Ue&&z.push(Ue);var Y=2*gc.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 z}}var Pe;d==="linear"||d==="spline"?Pe=Le:d==="hv"||d==="vh"?Pe=ce:d==="hvh"?Pe=ye(0,Z,X):d==="vhv"&&(Pe=ye(1,Q,te));function Re(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),ge=null,le=de=0}var re=gc.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(ge){var Be=Pe(ge,ve);Be.length>1&&(ke(Be[0]),g[x++]=Be[1])}else Te=Pe(g[x-1],ve)[0],g[x++]=Te;var Ne=g[x-1];ue&&ae&&(Ne[0]!==ue||Ne[1]!==ae)?(ge&&(le!==ue&&de!==ae?K(le&&de?Re(ge,ve):[le||ue,de||ae]):le&&de&&K([le,de])),K([ue,ae])):le-ue&&de-ae&&K([ue||le,ae||de]),ge=ve,le=ue,de=ae}else ge&&ke(Pe(ge,ve)[0]),g[x++]=ve}for(_=0;_<w;_++)if(k=I(_),!!k){for(x=0,ge=null,pe(k),_++;_<w;_++){if(S=I(_),!S){if(v)continue;break}if(!p||!r.simplify){pe(S);continue}var we=I(_+1);if(H=W(S,k),!(!(m&&(x===0||x===w-1))&&H<O(S,we)*b)){for(R=[(S[0]-k[0])/H,(S[1]-k[1])/H],D=k,F=H,$=M=C=0,E=!1,T=S,_++;_<e.length;_++){if(L=we,we=I(_+1),!L){if(v)continue;break}if(N=[L[0]-k[0],L[1]-k[1]],P=N[0]*R[1]-N[1]*R[0],M=Math.min(M,P),C=Math.max(C,P),C-M>O(L,we))break;T=L,A=N[0]*R[0]+N[1]*R[1],A>F?(F=A,S=L,E=!1):A<$&&($=A,D=L,E=!0)}if(E?(pe(S),T!==D&&pe(D)):(D!==k&&pe(D),T!==S&&pe(S)),pe(T),_>=e.length||!L)break;pe(L),k=L}}ge&&K([le||ge[0],de||ge[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,be=[],Me=0;Me<y.length;Me++)for(var Se=0;Se<y[Me].length-1;Se++){var $e=y[Me][Se],He=y[Me][Se+1],Oe=CI.applyBackoff(He,$e);(Oe[0]!==He[0]||Oe[1]!==He[1])&&(ie=!0),be[fe+1]||(fe++,be[fe]=[$e,[Oe[0],Oe[1]]])}return ie?be:y}return y},cb={tonextx:1,tonexty:1,tonext:1},xk=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 cb&&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 cb&&(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},ya=ft,PI=Je,rs=me,go=rs.ensureSingle,_k=rs.identity,jt=xt,bo=_r,EI=$I,RI=xk,uf=y2.tester,zI=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,u=RI(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(),II(e,l,r),c){o&&(s=o());var v=ya.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){ub(e,d,r,h,u,this,n)})})}else l.each(function(h,d){ub(e,d,r,h,u,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function II(t,e,r){e.each(function(a){var i=go(ya.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,_k);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=go(ya.select(this),"path","js-fill")})})}function ub(t,e,r,a,i,n,o){var l=t._context.staticPlot,s;FI(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=ya.select(n),m=go(p,"g","errorbars"),y=go(p,"g","lines"),b=go(p,"g","points"),w=go(p,"g","text");if(PI.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,E=null,R=null;L&&(S=L._prevRevpath||"",x=L._nextFill,D=L._ownPolygons,E=L._fillsegments,R=L._fillElement);var N,H,F="",$="",A,M,C,P,I,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 Pe=ye[ye.length-1];return ye.length>1&&ye[0][0]===Pe[0]&&ye[0][1]===Pe[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=EI(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=R,h._fillsegments=G.slice(0,V),G=h._fillsegments,O.length&&(P=O[0][0].slice(),I=O[O.length-1],j=I[I.length-1].slice()),W=function(ye){return function(Pe){if(N=A(Pe),H=C(Pe),F?_?(F+="L"+N.substr(1),$=H+("L"+$.substr(1))):(F+="Z"+N,$=H+"Z"+$):(F=N,$=H),bo.hasLines(h)){var Re=ya.select(this);if(Re.datum(a),ye)c(Re.style("opacity",0).attr("d",N).call(jt.lineGroupStyle)).style("opacity",1);else{var K=c(Re);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 Pe,Re;if(!ye||ye.length===0)for(Pe=new Array(G.length),Re=0;Re<G.length;Re++){var K=G[Re][0].slice(),ke=G[Re][G[Re].length-1].slice();K[k]=ke[k]=T;var re=[ke,K],pe=re.concat(G[Re]);Pe[Re]=uf(pe)}else{for(Pe=new Array(ye.length-1+G.length),Re=0;Re<ye.length-1;Re++)Pe[Re]=uf(ye[Re]);var we=ye[ye.length-1].slice();for(we.reverse(),Re=0;Re<G.length;Re++)Pe[ye.length-1+Re]=uf(G[Re].concat(we))}return Pe};O.length?(g?(g.datum(a),P&&j&&(_?(P[k]=j[k]=T,c(g).attr("d","M"+j+"L"+P+"L"+F.substr(1)).call(jt.singleFillStyle,t),B=ue(null)):(c(g).attr("d",F+"Z").call(jt.singleFillStyle,t),B=xe())),h._polygons=B,h._fillElement=g):x&&(h.fill.substr(0,6)==="tonext"&&F&&S?(h.fill==="tonext"?(c(x).attr("d",F+"Z"+S+"Z").call(jt.singleFillStyle,t),B=xe(),h._polygons=B.concat(D)):(c(x).attr("d",F+"L"+S.substr(1)+"Z").call(jt.singleFillStyle,t),B=ue(E),h._polygons=B),h._fillElement=x):te(x)),h._prevRevpath=$):(g?te(g):x&&te(x),h._prevRevpath=null),h._ownPolygons=B;function ae(ye){return ye.filter(function(Pe){return!Pe.gap&&Pe.vis})}function le(ye){return ye.filter(function(Pe){return Pe.vis})}function de(ye){return ye.filter(function(Pe){return!Pe.gap})}function ge(ye){return ye.id}function Te(ye){if(ye.ids)return ge}function Le(){return!1}function _e(ye,Pe,Re){var K,ke,re,pe=Re[0].trace,we=bo.hasMarkers(pe),se=bo.hasText(pe),ie=Te(pe),fe=Le,be=Le;if(we||se){var Me=_k,Se=pe.stackgroup,$e=Se&&t._fullLayout._scatterStackOpts[u._id+v._id][Se].stackgaps==="infer zero";pe.marker.maxdisplayed||pe._needsCull?Me=$e?le:ae:Se&&!$e&&(Me=de),we&&(fe=Me),se&&(be=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=ya.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=Pe.selectAll("g"),K=ke.data(be,ie),K.enter().append("g").classed("textpoint",!0).append("text"),K.order(),K.each(function(ve){var Be=ya.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);ya.select(this).selectAll("tspan.line").each(function(){c(ya.select(this)).attr({x:Be,y:Ne})})}),K.exit().remove()}b.datum(a),w.datum(a),_e(b,w,a);var ze=h.cliponaxis===!1,ce=ze?null:r.layerClipId;jt.setClipUrl(b,ce,t),jt.setClipUrl(w,ce,t)}function FI(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=ya.extent(rs.simpleMap(n.range,n.r2c)),s=ya.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,wk=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},Rv=ft,Po=xt,NI=Je;function HI(t){var e=Rv.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=Rv.select(this),i=r.trace||r[0].trace;lm(a,i,t)}),e.selectAll("g.text").each(function(r){var a=Rv.select(this),i=r.trace||r[0].trace;sm(a,i,t)}),e.selectAll("g.trace path.js-line").call(Po.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(Po.fillGroupStyle,t),NI.getComponentMethod("errorbars","style")(e)}function lm(t,e,r){Po.pointStyle(t.selectAll("path.point"),e,r)}function sm(t,e,r){Po.textPointStyle(t.selectAll("text"),e,r)}function OI(t,e,r){var a=e[0].trace;a.selectedpoints?(Po.selectedPointStyle(r.selectAll("path.point"),a),Po.selectedTextStyle(r.selectAll("text"),a)):(lm(r,a,t),sm(r,a,t))}var vb={style:HI,stylePoints:lm,styleText:sm,styleOnSelect:OI},Gn=ot,jI=_r,Tk=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)&&jI.hasLines(e)&&e.line.width?a:e.fillcolor)},Bf=me,db=wa,BI=Je,GI=Tk,zv=ot,UI=Bf.fillText,VI=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($){if(d){var A=l.c2p($.xStart),M=l.c2p($.xEnd);return f>=Math.min(A,M)&&f<=Math.max(A,M)?0:1/0}var C=Math.max(3,$.mrc||0),P=1-1/C,I=Math.abs(l.c2p($.x)-f);return I<C?P*I/C:I-C+P},y=function($){if(p){var A=s.c2p($.yStart),M=s.c2p($.yEnd);return c>=Math.min(A,M)&&c<=Math.max(A,M)?0:1/0}var C=Math.max(3,$.mrc||0),P=1-1/C,I=Math.abs(s.c2p($.y)-c);return I<C?P*I/C:I-C+P},b=function($){var A=Math.max(h,$.mrc||0),M=l.c2p($.x)-f,C=s.c2p($.y)-c;return Math.max(Math.sqrt(M*M+C*C)-A,1-h/A)},w=db.getDistanceFunction(i,m,y,b);if(db.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 Bf.extendFlat(e,{color:GI(o,g),x0:x-k,x1:x+k,xLabelVal:D,y0:_-k,y1:_+k,yLabelVal:L,spikeDistance:b(g),hovertemplate:o.hovertemplate}),UI(g,o,e),BI.getComponentMethod("errorbars","hoverInfo")(g,o,e),[e]}}function E($){if(!$)return!1;var A=$.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 R($){var A,M=[],C=1/0,P=-1/0,I=1/0,j=-1/0,B;for(A=0;A<$.length;A++){var G=$[A];G.contains(u)&&(M.push(G),I=Math.min(I,G.ymin),j=Math.max(j,G.ymax))}if(M.length===0)return null;I=Math.max(I,0),j=Math.min(j,s._length),B=(I+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),P=Math.max(P,V)));return C=Math.max(C,0),P=Math.min(P,l._length),{x0:C,x1:P,y0:B,y1:B}}if(v.indexOf("fills")!==-1&&o._fillElement){var N=E(o._fillElement)&&!E(o._fillExclusionElement);if(N){var H=R(o._polygons);H===null&&(H={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var F=zv.defaultLine;return zv.opacity(o.fillcolor)?F=o.fillcolor:zv.opacity((o.line||{}).color)&&(F=o.line.color),Bf.extendFlat(e,{distance:e.maxHoverDistance,x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1,color:F,hovertemplate:!1}),delete e.index,o.text&&!Bf.isArrayOrTypedArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},hb=_r,XI=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,u,v=!hb.hasMarkers(l)&&!hb.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={},Iv,pb;function YI(){return pb||(pb=1,Iv={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(" ")}}),Iv}var Fv,mb;function WI(){if(mb)return Fv;mb=1;var t=Je.traceIs,e=Jw;Fv=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 Fv}var qI=Xt.isTypedArraySpec;function ZI(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 KI=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0||qI(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=ZI(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},yb=oa.mix,QI=xr,JI=me,eF=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(k,T){return JI.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=yb(n,i.bgColor,i.blend||QI.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=yb(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)}},gb=dt,tF=Je,Cl=me,rF=Lt,aF=Ha,yh=Na,bb=Rw,xb=zw,iF=Nw,nF=Hw,oF=KI,lF=eF,sF=hT,_b=hp,Gf=Lr.WEEKDAY_PATTERN,fF=Lr.HOUR_PATTERN,kk=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=tF.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"),_b(r,n),sF(e,r,a,i),oF(e,r,a,i),u!=="category"&&!i.noHover&&a("hoverformat");var p=a("color"),m=p!==yh.color.dflt?p:l.color,y=s.label||n._dfltTitle[o];if(nF(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}),bb(e,r,a,u);var b=i.hasMinor;if(b&&(rF.newContainer(r,"minor"),bb(e,r,a,u,{isMinor:!0})),iF(e,r,a,u,i),xb(e,r,a,i),b){var w=i.isMinor;i.isMinor=!0,xb(e,r,a,i),i.isMinor=w}lF(e,r,a,{dfltColor:p,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:b,attributes:yh}),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(aF(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:cF}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var T=0;T<r.rangebreaks.length;T++)if(r.rangebreaks[T].pattern===Gf){r._hasDayOfWeekBreaks=!0;break}if(_b(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 cF(t,e,r){function a(v,h){return Cl.coerce(t,e,yh.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=wb(n[l]),s){o=Gf;break}}var f=a("pattern",o);if(f===Gf)for(l=0;l<2;l++)s=wb(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Gf:if(!gb(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 fF:if(!gb(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 uF={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function wb(t){if(typeof t=="string")return uF[t.substr(0,3).toLowerCase()]}var vF=dt,df=me,Ak=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||(vF(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},Nv,Tb;function dF(){if(Tb)return Nv;Tb=1;var t=me,e=ot,r=sa.isUnifiedHover,a=ET,i=Lt,n=vs,o=Na,l=WI(),s=kk,f=ti,c=Ak,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 Nv=function(g,x,_){var k=x.autotypenumbers,T={},S={},D={},L={},E={},R={},N={},H={},F={},$={},A,M;for(A=0;A<_.length;A++){var C=_[A];if(!(!m(C,"cartesian")&&!m(C,"gl2d"))){var P;if(C.xaxis)P=v(C.xaxis),b(T,P,C);else if(C.xaxes)for(M=0;M<C.xaxes.length;M++)b(T,v(C.xaxes[M]),C);var I;if(C.yaxis)I=v(C.yaxis),b(T,I,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"?(P&&(S[P]=!0),I&&(N[I]=!0)):I&&(D[I]=!0):C.type==="image"?(I&&(H[I]=!0),P&&(H[P]=!0)):(I&&(E[I]=!0,R[I]=!0),(!m(C,"carpet")||C.type==="carpet"&&!C._cheater)&&P&&(L[P]=!0)),C.type==="carpet"&&C._cheater&&P&&(S[P]=!0),m(C,"2dMap")&&(F[P]=!0,F[I]=!0),m(C,"oriented")){var j=C.orientation==="h"?I: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(z){return z._expandedIndex}),le._annIndices=[],le._shapeIndices=[],le._selectionIndices=[],le._imgIndices=[],le._subplotsWith=[],le._counterAxes=[],le._name=le._attr=te,le._id=xe}function ge(Ue,z){return t.coerce(ae,le,o,Ue,z)}function Te(Ue,z){return t.coerce2(ae,le,o,Ue,z)}function Le(Ue){return Ue==="x"?O:G}function _e(Ue,z){for(var Y=Ue==="x"?W:V,U=[],q=0;q<Y.length;q++){var oe=Y[q];oe!==z&&!(g[oe]||{}).overlaying&&U.push(h(oe))}return U}var ze={x:Le("x"),y:Le("y")},ce=ze.x.concat(ze.y),ye={},Pe=[];function Re(){var Ue=ae.matches;d.test(Ue)&&ce.indexOf(Ue)===-1&&(ye[Ue]=ae.type,Pe=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"&&!E[te]&&D[te],pe=ue==="y"&&(!R[te]&&N[te]||H[te]),we={hasMinor:!0,letter:ue,font:x.font,outerTicks:F[te],showGrid:!$[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"};ge("uirevision",x.uirevision),l(ae,le,ge,we),s(ae,le,ge,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),be=Te("spikedash",ke?"dot":void 0),Me=Te("spikemode",ke?"across":void 0),Se=Te("spikesnap"),$e=ge("showspikes",!!se||!!ie||!!fe||!!be||!!Me||!!Se);$e||(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,ge,{letter:ue,counterAxes:ze[ue],overlayableAxes:_e(ue,te),grid:x.grid,overlayingDomain:Oe}),ge("title.standoff"),Re(),le._input=ae}for(A=0;A<Pe.length;){xe=Pe[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:F[te],showGrid:!$[te],data:[],bgColor:Q,calendar:x.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:k,splomStash:((x._splomAxes||{})[ue]||{})[xe]};ge("uirevision",x.uirevision),le.type=ye[xe]||"linear",s(ae,le,ge,Be,x),c(ae,le,ge,{letter:ue,counterAxes:ze[ue],overlayableAxes:_e(ue,te),grid:x.grid}),ge("fixedrange"),Re(),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),ge("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);ge("fixedrange",Ve)}f.handleDefaults(g,x,{axIds:ce.concat(Pe).sort(u.idSort),axHasImage:H})},Nv}var Hv,kb;function hF(){if(kb)return Hv;kb=1;var t=ft,e=Je,r=me,a=xt,i=Dt;return Hv=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,E=!!x.xr1,R=!!x.yr1,N=[];if(E){var H=r.simpleMap(x.xr0,T.r2l),F=r.simpleMap(x.xr1,T.r2l),$=H[1]-H[0],A=F[1]-F[0];N[0]=(H[0]*(1-_)+_*F[0]-H[0])/(H[1]-H[0])*D,N[2]=D*(1-_+_*A/$),T.range[0]=T.l2r(H[0]*(1-_)+_*F[0]),T.range[1]=T.l2r(H[1]*(1-_)+_*F[1])}else N[0]=0,N[2]=D;if(R){var M=r.simpleMap(x.yr0,S.r2l),C=r.simpleMap(x.yr1,S.r2l),P=M[1]-M[0],I=C[1]-C[0];N[1]=(M[1]*(1-_)+_*C[1]-M[1])/(M[0]-M[1])*L,N[3]=L*(1-_+_*I/P),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=E?D/N[2]:1,B=R?L/N[3]:1,G=E?N[0]:0,O=R?N[1]:0,W=E?N[0]/N[2]*D:0,V=R?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()},Hv}var xu=ft,Ab=Je,bc=me,pF=Qt,mF=xt,Mb=hs.getModuleCalcData,Ti=Wt,Ra=Lr,yF=Mn,Mt=bc.ensureSingle;function hf(t,e,r){return bc.ensureSingle(t,e,r,function(a){a.datum(r)})}Jt.name="cartesian";Jt.attr=["xaxis","yaxis"];Jt.idRoot=["x","y"];Jt.idRegex=Ra.idRegex;Jt.attrRegex=Ra.attrRegex;Jt.attributes=YI();Jt.layoutAttributes=Na;Jt.supplyLayoutDefaults=dF();Jt.transitionAxes=hF();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,Ra.idRegex.y.test(u)||(u="y"),n.push(c+u),o.push(c+u),s[u]||(s[u]=1,bc.pushUnique(i,u)));for(f=0;f<i.length;f++)u=i[f],s[u]||(c=(t[Ti.id2name(u)]||{}).anchor,Ra.idRegex.x.test(c)||(c="x"),n.push(c+u),o.push(c+u),l[c]||(l[c]=1,bc.pushUnique(a,c)));if(!o.length){c="",u="";for(var h in t)if(Ra.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=Ra.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=Ab.modules[d].categories;if(p.svg){var m=s.layerName||d+"layer",y=s.plot;f=Mb(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=xu.select(this),_=g.className;g.plotMethod(t,e,g.cdModule,x,a,i),Ra.clipOnAxisFalseQuery.indexOf("."+_)===-1&&mF.setClipUrl(x,e.layerClipId,t)}),o._has("scattergl")&&(s=Ab.getModule("scattergl"),c=Mb(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(Ra.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)Lk(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(),Ck(m,a)}}};Jt.drawFramework=function(t){var e=t._fullLayout,r=gF(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(Lk,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=xu.select(this),Sk(t,o),o.draglayer=Mt(e._draggers,"g",n)})};Jt.rangePlot=function(t,e,r){Sk(t,e),Mk(t,e,r),pF.style(t)};function gF(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 Sk(t,e){var r=e.plotgroup,a=e.id,i=Ra.layerValue2layerClass[e.xaxis.layer],n=Ra.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 Lk(t,e){if(t){var r={};t.each(function(s){var f=s[0],c=xu.select(this);c.remove(),Ck(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 Ck(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=xu.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:yF.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};Jt.updateFx=wp.updateFx;var pf=_r,bF={hasLines:pf.hasLines,hasMarkers:pf.hasMarkers,hasText:pf.hasText,isBubble:pf.isBubble,attributes:Fi,layoutAttributes:ip,supplyDefaults:qz,crossTraceDefaults:ak,supplyLayoutDefaults:rI,calc:im.calc,crossTraceCalc:SI,arraysToCalcdata:ok,plot:zI,colorbar:_s,formatLabels:wk,style:vb.style,styleOnSelect:vb.styleOnSelect,hoverPoints:VI,selectPoints:XI,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(" ")}},xF=ft,_F=ot,Sb=$2,fm=me,wF=fm.strScale,TF=fm.strRotate,kF=fm.strTranslate,AF=function(e,r,a){var i=e.node(),n=Sb[a.arrowhead||0],o=Sb[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),E=i.getPointAtLength(k-.1);m=Math.atan2(L.y-E.y,L.x-E.x),d=i.getPointAtLength(Math.max(0,k-u));var R=T?v+u:u;T+=k-R+"px,"+k+"px",e.style("stroke-dasharray",T)}function N(){e.style("stroke-dasharray","0px,100px")}function H(F,$,A,M){F.path&&(F.noRotate&&(A=0),xF.select(i.parentNode).append("path").attr({class:e.attr("class"),d:F.path,transform:kF($.x,$.y)+TF(A*180/Math.PI)+wF(M)}).style({fill:_F.rgb(a.arrowcolor),"stroke-width":0}))}f&&H(o,h,p,s),c&&H(n,d,m,l)},Lb=ft,Ov=Je,MF=Qt,hi=me,jv=hi.strTranslate,as=Dt,Wi=ot,Ua=xt,Cb=wa,Bv=nr,Gv=Ri,gl=Oa,SF=Lt.arrayEditor,LF=AF,cm={draw:CF,drawOne:Dk,drawRaw:$k};function CF(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&Dk(t,r);return MF.previousPromises(t)}function Dk(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=SF(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){Lb.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(Gv,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",_(Lb.event))});e.hovertext&&k.on("mouseover",function(){var M=e.hoverlabel,C=M.font,P=this.getBoundingClientRect(),I=t.getBoundingClientRect();Cb.loneHover({x0:P.left-I.left,x1:P.right-I.left,y:(P.top+P.bottom)/2-I.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(){Cb.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),E=e.width||e.height,R=o._topclips.selectAll("#"+p).data(E?[0]:[]);R.enter().append("clipPath").classed("annclip",!0).attr("id",p).append("rect"),R.exit().remove();var N=e.font,H=o._meta?hi.templateString(e.text,o._meta):e.text,F=k.append("text").classed("annotation-text",!0).text(H);function $(M){return M.call(Ua.font,N).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),Bv.convertToTspans(M,t,A),M}function A(){var M=F.selectAll("a");if(M.size()===1&&M.text()===F.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 P=k.select(".annotation-text-math-group"),I=!P.empty(),j=Ua.bBox((I?P:F).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],ge=(y+(ue==="x"?0:-90))*Math.PI/180,Te=V*Math.cos(ge),Le=Z*Math.sin(ge),_e=Math.abs(Te)+Math.abs(Le),ze=e[ue+"anchor"],ce=e[ue+"shift"]*(ue==="x"?1:-1),ye=m[ue],Pe,Re,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),Pe=de._offset+de.r2p(e[ue]),ke=.5}else{var se=pe==="domain";ue==="x"?(K=e[ue],Pe=se?de._offset+de._length*K:Pe=l.l+l.w*K):(K=1-e[ue],Pe=se?de._offset+de._length*K:Pe=l.t+l.h*K),ke=e.showarrow?.5:K}if(e.showarrow){ye.head=Pe;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),Re=re}else ye.tail=Pe+ie,Re=re+ie;ye.text=ye.tail+re;var be=o[ue==="x"?"width":"height"];if(ae==="paper"&&(ye.head=hi.constrain(ye.head,1,be-1)),le==="pixel"){var Me=-Math.max(ye.tail-3,ye.text),Se=Math.min(ye.tail+3,ye.text)-be;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,ze),Re=re,ye.text=Pe+re;ye.text+=ce,re+=ce,Re+=ce,e["_"+ue+"padplus"]=_e/2+Re,e["_"+ue+"padminus"]=_e/2-Re,e["_"+ue+"size"]=_e,e["_"+ue+"shift"]=re}if(Q){k.remove();return}var $e=0,He=0;if(e.align!=="left"&&($e=(O-B)*(e.align==="center"?.5:1)),e.valign!=="top"&&(He=(W-G)*(e.valign==="middle"?.5:1)),I)P.select("svg").attr({x:D+$e-1,y:D+He}).call(Ua.setClipUrl,E?p:null,t);else{var Oe=D+He-j.top,ve=D+$e-j.left;F.call(Bv.positionText,ve,Oe).call(Ua.setClipUrl,E?p:null,t)}R.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,z=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,Ee=ne+Ae,je=q-.5*he,Ye=je+he,rt=[[ne,je,ne,Ye],[ne,Ye,Ee,Ye],[Ee,Ye,Ee,je],[Ee,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(z,Y,Ve,Ue,Ze[0],Ze[1],Ze[2],Ze[3]);ct&&(z=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"+z+","+Y+"L"+Ve+","+Ue).style("stroke-width",nt+"px").call(Wi.stroke,Wi.rgb(vt));if(LF(lt,et,e),s.annotationPosition&&lt.node().parentNode&&!a){var Qe=Ve,yt=Ue;if(e.standoff){var mt=Math.sqrt(Math.pow(Ve-z,2)+Math.pow(Ue-Y,2));Qe+=e.standoff*(z-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"+(z-Qe)+","+(Y-yt),transform:jv(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",jv(Ze,ct)),w.attr({transform:"rotate("+y+","+Ke+","+gt+")"})},doneFn:function(){Ov.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,z;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)z=ui(n,Ge,"y",l,e);else{var q=e._ysize/l.h,oe=e.y-(e._yshift+e.yshift)/l.h-q/2;z=gl.align(oe-Ge/l.h,q,0,1,e.yanchor)}h("x",Ue),h("y",z),(!i||!n)&&(Ve=gl.getCursor(i?.5:Ue,n?.5:z,e.xanchor,e.yanchor))}w.attr({transform:jv(We,Ge)+Ne}),Gv(k,Ve)},clickFn:function(We,Ge){e.captureevents&&t.emit("plotly_clickannotation",_(Ge))},doneFn:function(){Gv(k),Ov.call("_guiRelayout",t,d());var We=document.querySelector(".js-notes-box-panel");We&&We.redraw(We.selectedObj)}})}}s.annotationText?F.call(Bv.makeEditable,{delegate:k,gd:t}).call($).on("edit",function(M){e.text=M,this.call($),h("text",M),i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0),Ov.call("_guiRelayout",t,d())}):F.call($)}var Db=me,DF=Je,$b=Lt.arrayEditor,$F={hasClickToShow:PF,onClick:EF};function PF(t,e){var r=Pk(t,e);return r.on.length>0||r.explicitOff.length>0}function EF(t,e){var r=Pk(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=$b(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),Db.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=$b(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),Db.extendFlat(n,s.getUpdateObj());return DF.call("update",t,{},n)}}function Pk(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)===Pb(f._xclick,v)&&h.d2r(u.y)===Pb(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 Pb(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Eb=me,Un=ot,Ek=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"),Eb.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));Eb.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||y})}i("captureevents",!!d)},Uv=me,qi=Dt,RF=Ha,zF=Ek,IF=gs,FF=function(e,r){RF(e,r,{name:"annotations",handleItemDefaults:NF})};function NF(t,e,r){function a(w,g){return Uv.coerce(t,e,IF,w,g)}var i=a("visible"),n=a("clicktoshow");if(i||n){zF(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(Uv.noneOrAll(t,e,["x","y"]),o&&Uv.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 gh=me,on=Dt,HF=cm.draw,OF=function(e){var r=e._fullLayout,a=gh.filterVisible(r.annotations);if(a.length&&e._fullData.length)return gh.syncOrAsync([HF,jF],e)};function jF(t){var e=t._fullLayout;gh.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"&&Rb(r,a),o==="range"&&Rb(r,i)})}function Rb(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 BF=dt,GF=Bh,UF=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=GF(d,r.range):p=Math.pow(10,d),BF(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)},Vv=cm,zb=$F,VF={moduleType:"component",name:"annotations",layoutAttributes:gs,supplyLayoutDefaults:FF,includeBasePlot:pu("annotations"),calcAutorange:OF,draw:Vv.draw,drawOne:Vv.drawOne,drawRaw:Vv.drawRaw,hasClickToShow:zb.hasClickToShow,onClick:zb.onClick,convertCoords:UF},Et=gs,XF=za.overrideAll,YF=Lt.templatedArray,bh=XF(YF("annotation",{visible:Et.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:Et.xanchor,xshift:Et.xshift,yanchor:Et.yanchor,yshift:Et.yshift,text:Et.text,textangle:Et.textangle,font:Et.font,width:Et.width,height:Et.height,opacity:Et.opacity,align:Et.align,valign:Et.valign,bgcolor:Et.bgcolor,bordercolor:Et.bordercolor,borderpad:Et.borderpad,borderwidth:Et.borderwidth,showarrow:Et.showarrow,arrowcolor:Et.arrowcolor,arrowhead:Et.arrowhead,startarrowhead:Et.startarrowhead,arrowside:Et.arrowside,arrowsize:Et.arrowsize,startarrowsize:Et.startarrowsize,arrowwidth:Et.arrowwidth,standoff:Et.standoff,startstandoff:Et.startstandoff,hovertext:Et.hovertext,hoverlabel:Et.hoverlabel,captureevents:Et.captureevents}),"calc","from-root"),Xv=me,WF=Dt,qF=Ha,ZF=Ek,KF=bh,QF=function(e,r,a){qF(e,r,{name:"annotations",handleItemDefaults:JF,fullLayout:a.fullLayout})};function JF(t,e,r,a){function i(l,s){return Xv.coerce(t,e,KF,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],WF.coercePosition(e,f,i,l,l,.5)}var o=i("visible");o&&(ZF(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),Xv.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),Xv.noneOrAll(t,e,["ax","ay"])))}var Ib=me,Fb=Dt,eN=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)tN(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function tN(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={},Ib.extendFlat(t._xa,n),Fb.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={},Ib.extendFlat(t._ya,n),Fb.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 Yv(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 rN(t,e){var r=Yv(t.projection,Yv(t.view,Yv(t.model,[e[0],e[1],e[2],1])));return r}var aN=rN,iN=cm.drawRaw,nN=aN,oN=["x","y","z"],lN=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=oN[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=nN(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),iN(e.graphDiv,o,n,e.id,o._xa,o._ya))}},sN=Je,Nb=me,fN={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:bh}}},layoutAttributes:bh,handleDefaults:QF,includeBasePlot:cN,convert:eN,draw:lN};function cN(t,e){var r=sN.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&&(Nb.pushUnique(e._basePlotModules,r),Nb.pushUnique(e._subplots.gl3d,o))}}var Hb=gs,Ob=vr,jb=Fi.line,uN=Hr.dash,va=Nt.extendFlat,vN=Lt.templatedArray,Bb=du,Vn=la,dN=mr.shapeTexttemplateAttrs,hN=Wh,Rk=vN("shape",{visible:va({},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:va({},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:va({},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:va({},Vn.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Ob({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:va({},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:va({},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:va({},Hb.xref,{description:["Sets the shape's x coordinate axis.",Bb.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:va({},Hb.yref,{description:["Sets the shape's y coordinate axis.",Bb.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:va({},jb.color,{editType:"arraydraw"}),width:va({},jb.width,{editType:"calc+arraydraw"}),dash:va({},uN,{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:dN({},{keys:Object.keys(hN)}),font:Ob({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,pN=Ha,mN=Rk,Gb=Ii,yN=function(e,r){pN(e,r,{name:"shapes",handleItemDefaults:bN})};function gN(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function bN(t,e,r){function a(M,C){return bl.coerce(t,e,mN,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=Gb.rangeToShapePosition(w),g=Gb.shapePositionToRange(w)):g=x=bl.identity,f){var T=.25,S=.75,D=p+"0",L=p+"1",E=t[D],R=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]=E,t[L]=R}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",F,$;if(f&&(F=a("label.texttemplate")),F||($=a("label.text")),$||F){a("label.textangle");var A=a("label.textposition",H?"middle":"middle center");a("label.xanchor"),a("label.yanchor",gN(H,A)),a("label.padding"),bl.coerceFont(a,"label.font",r.font)}}}var xN=ot,Ub=me;function _N(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}var wN=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"),Ub.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",xN.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",_N(o,f)),a("newshape.label.padding"),Ub.coerceFont(a,"newshape.label.font",r.font)}a("activeshape.fillcolor"),a("activeshape.opacity")},xh=me,Yn=Dt,Eo=ou,zk=Ii,TN=function(e){var r=e._fullLayout,a=xh.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=Vb(o,c,u,n.path,Eo.paramIsX),l&&(n._extremes[o._id]=Yn.findExtremes(o,l,kN(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=Vb(o,v,h,n.path,Eo.paramIsY),l&&(n._extremes[o._id]=Yn.findExtremes(o,l,AN(n)))}}};function kN(t){return Ik(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function AN(t){return Ik(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function Ik(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?zk.extractPathCoords(i,n?Eo.paramIsY:Eo.paramIsX):[r,a],f=xh.aggNums(Math.max,null,s),c=xh.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 Vb(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(Eo.segmentRE),f,c,u,v,h;for(t.type==="date"&&(n=zk.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(Eo.paramRE),!(!v||v.length<u)&&(h=n(v[u]),h<o&&(o=h),h>l&&(l=h)));if(l>=o)return[o,l]}}var Xb=Ip,MN={moduleType:"component",name:"shapes",layoutAttributes:Rk,supplyLayoutDefaults:yN,supplyDrawNewShapeDefaults:wN,includeBasePlot:pu("shapes"),calcAutorange:TN,draw:Xb.draw,drawOne:Xb.drawOne},Yb=Lr,SN=Lt.templatedArray,Wb=du,Fk=SN("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",Yb.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",Wb.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",Yb.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",Wb.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),LN=me,Wv=Dt,CN=Ha,DN=Fk,$N="images",PN=function(e,r){var a={name:$N,handleItemDefaults:EN};CN(e,r,a)};function EN(t,e,r){function a(v,h){return LN.coerce(t,e,DN,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=Wv.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var u=Wv.getFromId(o,c);u._imgIndices.push(e._index)}Wv.coercePosition(e,o,a,c,f,0)}return e}var qb=ft,RN=xt,Wn=Dt,Zb=Wt,zN=Mn,IN=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=Zb.ref2id(s.xref)+Zb.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=qb.select(this);if(this._imgSrc!==b.source)if(w.attr("xmlns",zN.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=qb.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,E=D*c.y[b.yanchor].offset,R=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+=E,b.sizing){case"fill":R+=" slice";break;case"stretch":R="none";break}w.attr({x:N,y:H,width:S,height:D,preserveAspectRatio:R,opacity:b.opacity});var F=g&&Wn.getRefType(b.xref)!=="domain"?g._id:"",$=x&&Wn.getRefType(b.yref)!=="domain"?x._id:"",A=F+$;RN.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)})}}},Kb=dt,FN=Bh,NN=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=FN(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));Kb(d)?Kb(p)||(p=null):(d=null,p=null),i(c+s,d),i(c+"size"+s,p)}}},HN={moduleType:"component",name:"images",layoutAttributes:Fk,supplyLayoutDefaults:PN,includeBasePlot:pu("images"),draw:IN,convertCoords:NN},um={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:"▼"}},ON=vr,jN=xr,BN=Nt.extendFlat,GN=za.overrideAll,UN=qh,Nk=Lt.templatedArray,VN=Nk("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(" ")}}),Hk=GN(Nk("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:VN,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:BN(UN({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:ON({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:jN.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"),Uf=me,Ok=Ha,jk=Hk,XN=um,YN=XN.name,WN=jk.buttons,qN=function(e,r){var a={name:YN,handleItemDefaults:ZN};Ok(e,r,a)};function ZN(t,e,r){function a(o,l){return Uf.coerce(t,e,jk,o,l)}var i=Ok(t,e,{name:"buttons",handleItemDefaults:KN}),n=a("visible",i.length>0);n&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Uf.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Uf.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function KN(t,e){function r(i,n){return Uf.coerce(t,e,WN,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 QN=Ot,ga=ft,Qb=ot,To=xt,xc=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 E=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(Qb.fill,Ot.barColor),k?(this.hbar=E.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 R=c>y,N=Ot.barWidth+2*Ot.barPad,H=Ot.barLength+2*Ot.barPad,F=l+s,$=f;F+N>n&&(F=n-N);var A=this.container.selectAll("rect.scrollbar-vertical").data(R?[0]:[]);A.exit().on(".drag",null).remove(),A.enter().append("rect").classed("scrollbar-vertical",!0).call(Qb.fill,Ot.barColor),R?(this.vbar=A.attr({rx:Ot.barRadius,ry:Ot.barRadius,x:F,y:$,width:N,height:H}),this._vbarYMin=$+H/2,this._vbarTranslateMax=y-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var M=this.id,C=b-.5,P=R?w+N+.5:w+.5,I=g-.5,j=k?x+S+.5:x+.5,B=i._topdefs.selectAll("#"+M).data(k||R?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",M).append("rect"),k||R?(this._clipRect=B.select("rect").attr({x:Math.floor(C),y:Math.floor(I),width:Math.ceil(P)-Math.floor(C),height:Math.ceil(j)-Math.floor(I)}),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||R){var G=ga.behavior.drag().on("dragstart",function(){ga.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=ga.behavior.drag().on("dragstart",function(){ga.event.sourceEvent.preventDefault(),ga.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(O),R&&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-=ga.event.dx),this.vbar&&(r-=ga.event.dy),this.setTranslate(e,r)};Ot.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=ga.event.deltaY),this.vbar&&(r+=ga.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=xc.constrain(ga.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=xc.constrain(ga.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=xc.constrain(e||0,0,a),r=xc.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 Ro=ft,is=Qt,ns=ot,zo=xt,jr=me,_c=nr,JN=Lt.arrayEditor,Bk=Cr.LINE_SPACING,tt=um,e4=QN,t4=function(e){var r=e._fullLayout,a=jr.filterVisible(r[tt.name]);function i(v){is.autoMargin(e,Yk(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(){Ro.select(this).selectAll("g."+tt.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+tt.headerGroupClassName).data(a,r4);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];s4(e,f)}var c="updatemenus"+r._uid,u=new e4(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(wh)),o.exit().each(function(v){l.call(wh),i(v)}).remove(),o.each(function(v){var h=Ro.select(this),d=v.type==="dropdown"?l:null;is.manageCommandObserver(e,v,v.buttons,function(p){_h(e,v,v.buttons[p.index],h,d,u,p.index,!0)}),v.type==="dropdown"?(Uk(e,h,l,u,v),Gk(l,v)&&os(e,h,l,u,v)):os(e,h,null,null,v)})}};function r4(t){return t._index}function a4(t){return+t.attr(tt.menuIndexAttrName)==-1}function Gk(t,e){return+t.attr(tt.menuIndexAttrName)===e._index}function _h(t,e,r,a,i,n,o,l){e.active=o,JN(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"),Uk(t,a,i,n,e),l||os(t,a,i,n,e))}function Uk(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(vm,i,s,t).call(Wk,i,f,c);var u=jr.ensureSingle(e,"text",tt.headerArrowClassName,function(v){v.attr("text-anchor","end").call(zo.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(wh,String(Gk(r,i)?-1:i._index)),os(t,e,r,a,i)}),n.on("mouseover",function(){n.call(Vk)}),n.on("mouseout",function(){n.call(Xk,i)}),zo.setTranslate(e,o.lx,o.ly)}function os(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!a4(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=Ro.select(this);b.call(vm,i,m,t).call(Wk,i,d),b.on("click",function(){Ro.event.defaultPrevented||(m.execute&&(m.args2&&i.active===y?(_h(t,i,m,e,r,a,-1),is.executeAPICommand(t,m.method,m.args2)):(_h(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(Vk)}),b.on("mouseout",function(){b.call(Xk,i),l.call(Jb,i)})}),l.call(Jb,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()?i4(t,e,r,a,i,p):n4(a))}function i4(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 n4(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 vm(t,e,r,a){t.call(o4,e).call(l4,e,r,a)}function o4(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 l4(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(zo.font,e.font).text(n).call(_c.convertToTspans,a)}function Jb(t,e){var r=e.active;t.each(function(a,i){var n=Ro.select(this);i===r&&e.showactive&&n.select("rect."+tt.itemRectClassName).call(ns.fill,tt.activeColor)})}function Vk(t){t.select("rect."+tt.itemRectClassName).call(ns.fill,tt.hoverColor)}function Xk(t,e){t.select("rect."+tt.itemRectClassName).call(ns.fill,e.bgcolor)}function s4(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=zo.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=Ro.select(this);v.call(vm,e,c,t);var h=v.select("."+tt.itemTextClassName),d=h.node()&&zo.bBox(h.node()).width,p=Math.max(d+tt.textPadX,tt.minWidth),m=e.font.size*Bk,y=_c.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,Yk(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 Yk(t){return tt.autoMarginIdRoot+t._index}function Wk(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;zo.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*Bk,v=_c.lineCount(n),h=(v-1)*u/2;_c.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 wh(t,e){t.attr(tt.menuIndexAttrName,e||"-1").selectAll("g."+tt.dropdownButtonClassName).remove()}var f4=um,c4={moduleType:"component",name:f4.name,layoutAttributes:Hk,supplyLayoutDefaults:qN,draw:t4},_u={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0},ex=vr,u4=qh,v4=Nt.extendDeepAll,d4=za.overrideAll,h4=jc,qk=Lt.templatedArray,Zi=_u,p4=qk("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(" ")}}),Zk=d4(qk("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:p4,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:v4(u4({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:h4.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:ex({description:"Sets the font of the current value label text."})},font:ex({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,Kk=Ha,Qk=Zk,m4=_u,y4=m4.name,g4=Qk.steps,b4=function(e,r){Kk(e,r,{name:y4,handleItemDefaults:x4})};function x4(t,e,r){function a(u,v){return fo.coerce(t,e,Qk,u,v)}for(var i=Kk(t,e,{name:"steps",handleItemDefaults:_4}),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 _4(t,e){function r(n,o){return fo.coerce(t,e,g4,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 ba=ft,wc=Qt,Li=ot,_a=xt,Br=me,w4=Br.strTranslate,Fl=nr,T4=Lt.arrayEditor,ut=_u,dm=Cr,Jk=dm.LINE_SPACING,qv=dm.FROM_TL,Zv=dm.FROM_BR,k4=function(e){var r=e._context.staticPlot,a=e._fullLayout,i=A4(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),wc.autoMargin(e,eA(c))}if(n.exit().each(function(){ba.select(this).selectAll("g."+ut.groupClassName).each(o)}).remove(),i.length!==0){var l=n.selectAll("g."+ut.groupClassName).data(i,M4);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];S4(e,f)}l.each(function(c){var u=ba.select(this);P4(c),wc.manageCommandObserver(e,c,c._visibleSteps,function(v){var h=u.data()[0];h.active!==v.index&&(h._dragging||rA(e,u,h,v.index,!1,!0))}),L4(e,ba.select(this),c)})}};function eA(t){return ut.autoMarginIdRoot+t._index}function A4(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 M4(t){return t._index}function S4(t,e){var r=_a.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=ba.select(this),m=tA(p,{step:d},e),y=m.node();if(y){var b=_a.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=_a.tester.append("g");r.each(function(d){var p=Tc(c,e,d.label),m=p.node()&&_a.bBox(p.node())||{width:0,height:0},y=Fl.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*Zv[v],t:n.height*qv[v]};e.lenmode==="fraction"?(h.l=0,h.xl=e.x-e.len*qv[u],h.r=0,h.xr=e.x+e.len*Zv[u]):(h.x=e.x,h.l=n.outerLength*qv[u],h.r=n.outerLength*Zv[u]),wc.autoMargin(t,eA(e),h)}function L4(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(Tc,r).call(R4,r).call(D4,r).call($4,r).call(E4,t,r).call(C4,t,r);var a=r._dims;_a.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(iA,r,!1),e.call(Tc,r)}function Tc(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(_a.font,e.currentvalue.font).text(l).call(Fl.convertToTspans,e._gd);var c=Fl.lineCount(o),u=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*Jk;return Fl.positionText(o,i,u),o}}function C4(t,e,r){var a=Br.ensureSingle(t,"rect",ut.gripRectClass,function(i){i.call(aA,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 tA(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(_a.font,r.font).text(i).call(Fl.convertToTspans,r._gd),a}function D4(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=ba.select(this);o.call(tA,n,e),_a.setTranslate(o,hm(e,n.fraction),ut.tickOffset+e.ticklen+e.font.size*Jk+ut.labelOffset+a.currentValueTotalHeight)})}function tx(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&rA(t,e,r,o,!0,i)}function rA(t,e,r,a,i,n){var o=r.active;r.active=a,T4(t.layout,ut.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(iA,r,n),e.call(Tc,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&&wc.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function aA(t,e,r){if(e._context.staticPlot)return;var a=r.node(),i=ba.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);ba.event.stopPropagation(),ba.event.preventDefault(),s.call(Li.fill,l.activebgcolor);var f=rx(l,ba.mouse(a)[0]);tx(e,r,l,f,!0),l._dragging=!0;function c(){var v=n(),h=rx(v,ba.mouse(a)[0]);tx(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 $4(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=ba.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(Li.fill,e.tickcolor),_a.setTranslate(l,hm(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?ut.tickOffset:ut.minorTickOffset)+a.currentValueTotalHeight)})}function P4(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 iA(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=hm(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",w4(o-ut.gripWidth*.5,e._dims.currentValueTotalHeight))}}function hm(t,e){var r=t._dims;return r.inputAreaStart+ut.stepInset+(r.inputAreaLength-2*ut.stepInset)*Math.min(1,Math.max(0,e))}function rx(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 E4(t,e,r){var a=r._dims,i=Br.ensureSingle(t,"rect",ut.railTouchRectClass,function(n){n.call(aA,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),_a.setTranslate(i,0,a.currentValueTotalHeight)}function R4(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"),_a.setTranslate(i,ut.railInset,(r.inputAreaWidth-ut.railWidth)*.5+r.currentValueTotalHeight)}var z4=_u,I4={moduleType:"component",name:z4.name,layoutAttributes:Zk,supplyLayoutDefaults:b4,draw:k4},ax=xr,pm={bgcolor:{valType:"color",dflt:ax.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:ax.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"},nA={_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"},wu={},mm={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},F4=Wt,N4=nr,oA=mm,H4=Cr.LINE_SPACING,kc=oA.name;function lA(t){var e=t&&t[kc];return e&&e.visible}wu.isVisible=lA;wu.makeData=function(t){var e=F4.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(lA(n)){a.push(n);var o=n[kc];o._id=kc+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};wu.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[kc],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(N4.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*H4}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:oA.extraPad+a._offsetShift*2}};var Kv,ix;function O4(){if(ix)return Kv;ix=1;var t=me,e=Lt,r=Wt,a=pm,i=nA;return Kv=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}},Kv}var Qv,nx;function j4(){if(nx)return Qv;nx=1;var t=Wt.list,e=ms.getAutoRange,r=mm;return Qv=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))}},Qv}var Jv,ox;function B4(){if(ox)return Jv;ox=1;var t=ft,e=Je,r=Qt,a=me,i=a.strTranslate,n=xt,o=ot,l=Kc,s=Jt,f=Wt,c=Oa,u=Ri,v=mm;Jv=function(T){for(var S=T._fullLayout,D=S._rangeSliderData,L=0;L<D.length;L++){var E=D[L][v.name];E._clipId=E._id+"-"+S._uid}function R(H){return H._name}var N=S._infolayer.selectAll("g."+v.containerClassName).data(D,R);N.exit().each(function(H){var F=H[v.name];S._topdefs.select("#"+F._clipId).remove()}).remove(),D.length!==0&&(N.enter().append("g").classed(v.containerClassName,!0).attr("pointer-events","all"),N.each(function(H){var F=t.select(this),$=H[v.name],A=S[f.id2name(H.anchor)],M=$[f.id2name(H.anchor)];if($.range){var C=a.simpleMap($.range,H.r2l),P=a.simpleMap(H.range,H.r2l),I;P[0]<P[1]?I=[Math.min(C[0],P[0]),Math.max(C[1],P[1])]:I=[Math.max(C[0],P[0]),Math.min(C[1],P[1])],$.range=$._input.range=a.simpleMap(I,H.l2r)}H.cleanRange("rangeslider.range");var j=S._size,B=H.domain;$._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)+$._offsetShift+v.extraPad);F.attr("transform",i(G,O)),$._rl=a.simpleMap($.range,H.r2l);var W=$._rl[0],V=$._rl[1],Z=V-W;if($.p2d=function(Te){return Te/$._width*Z+W},$.d2p=function(Te){return(Te-W)/Z*$._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=$._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($.d2p=function(Te){for(var Le=ae[0],_e=0;_e<X.length;_e++){var ze=X[_e];if(Te>=ze.max)Le=ae[_e+1];else if(Te<ze.min)break}return Le+ue*Te},Q=0;Q<X.length;Q++)te=X[Q],te.pmin=$.d2p(te.min),te.pmax=$.d2p(te.max);$.p2d=function(Te){for(var Le=ae[0],_e=0;_e<X.length;_e++){var ze=X[_e];if(Te>=ze.pmax)Le=ae[_e+1];else if(Te<ze.pmin)break}return(Te-Le)/ue}}}if(M.rangemode!=="match"){var le=A.r2l(M.range[0]),de=A.r2l(M.range[1]),ge=de-le;$.d2pOppAxis=function(Te){return(Te-le)/ge*$._height}}F.call(y,T,H,$).call(b,T,H,$).call(w,T,H,$).call(x,T,H,$,M).call(_,T,H,$).call(k,T,H,$),d(F,T,H,$),m(F,T,H,$,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+$._height+$._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 E=T.select("rect."+v.slideBoxClassName).node(),R=T.select("rect."+v.grabAreaMinClassName).node(),N=T.select("rect."+v.grabAreaMaxClassName).node();function H(){var F=t.event,$=F.target,A=h(F),M=A-T.node().getBoundingClientRect().left,C=L.d2p(D._rl[0]),P=L.d2p(D._rl[1]),I=c.coverSlip();this.addEventListener("touchmove",j),this.addEventListener("touchend",B),I.addEventListener("mousemove",j),I.addEventListener("mouseup",B);function j(G){var O=h(G),W=+O-A,V,Z,X;switch($){case E:if(X="ew-resize",C+W>D._length||P+W<0)return;V=C+W,Z=P+W;break;case R:if(X="col-resize",C+W>D._length)return;V=C+W,Z=P;break;case N:if(X="col-resize",P+W<0)return;V=C,Z=P+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(I),X),p(T,S,D,L)}function B(){I.removeEventListener("mousemove",j),I.removeEventListener("mouseup",B),this.removeEventListener("touchmove",j),this.removeEventListener("touchend",B),a.removeElement(I)}}T.on("mousedown",H),T.on("touchstart",H)}function p(T,S,D,L){function E(H){return D.l2r(a.constrain(H,L._rl[0],L._rl[1]))}var R=E(L.p2d(L._pixelMin)),N=E(L.p2d(L._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",S,D._name+".range",[R,N])})}function m(T,S,D,L,E,R){var N=v.handleWidth/2;function H(G){return a.constrain(G,0,L._width)}function F(G){return a.constrain(G,0,L._height)}function $(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),R.rangemode!=="match"){var C=L._height-F(L.d2pOppAxis(E._rl[1])),P=L._height-F(L.d2pOppAxis(E._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",P).attr("height",L._height-P).attr("width",M-A),T.select("rect."+v.slideBoxClassName).attr("y",C).attr("height",P-C)}var I=.5,j=Math.round($(A-N))-I,B=Math.round($(M-N))+I;T.select("g."+v.grabberMinClassName).attr("transform",i(j,I)),T.select("g."+v.grabberMaxClassName).attr("transform",i(B,I))}function y(T,S,D,L){var E=a.ensureSingle(T,"rect",v.bgClassName,function(F){F.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),R=L.borderwidth%2===0?L.borderwidth:L.borderwidth-1,N=-L._offsetShift,H=n.crispRound(S,L.borderwidth);E.attr({width:L._width+R,height:L._height+R,transform:i(N,N),"stroke-width":H}).call(o.stroke,L.bordercolor).call(o.fill,L.bgcolor)}function b(T,S,D,L){var E=S._fullLayout,R=a.ensureSingleById(E._topdefs,"clipPath",L._clipId,function(N){N.append("rect").attr({x:0,y:0})});R.select("rect").attr({width:L._width,height:L._height})}function w(T,S,D,L){var E=S.calcdata,R=T.selectAll("g."+v.rangePlotClassName).data(D._subplotsWith,a.identity);R.enter().append("g").attr("class",function(H){return v.rangePlotClassName+" "+H}).call(n.setClipUrl,L._clipId,S),R.order(),R.exit().remove();var N;R.each(function(H,F){var $=t.select(this),A=F===0,M=f.getFromId(S,H,"y"),C=M._name,P=L[C],I={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&&(I.layout.xaxis.rangebreaks=D.rangebreaks),I.layout[C]={type:M.type,domain:[0,1],range:P.rangemode!=="match"?P.range.slice():M.range.slice(),calendar:M.calendar},M.rangebreaks&&(I.layout[C].rangebreaks=M.rangebreaks),r.supplyDefaults(I);var j=I._fullLayout.xaxis,B=I._fullLayout[C];j.clearCalc(),j.setScale(),B.clearCalc(),B.setScale();var G={id:H,plotgroup:$,xaxis:j,yaxis:B,isRangePlot:!0};A?N=G:(G.mainplot="xy",G.mainplotinfo=N),s.rangePlot(S,G,g(E,H))})}function g(T,S){for(var D=[],L=0;L<T.length;L++){var E=T[L],R=E[0].trace;R.xaxis+R.yaxis===S&&D.push(E)}return D}function x(T,S,D,L,E){var R=a.ensureSingle(T,"rect",v.maskMinClassName,function($){$.attr({x:0,y:0,"shape-rendering":"crispEdges"})});R.attr("height",L._height).call(o.fill,v.maskColor);var N=a.ensureSingle(T,"rect",v.maskMaxClassName,function($){$.attr({y:0,"shape-rendering":"crispEdges"})});if(N.attr("height",L._height).call(o.fill,v.maskColor),E.rangemode!=="match"){var H=a.ensureSingle(T,"rect",v.maskMinOppAxisClassName,function($){$.attr({y:0,"shape-rendering":"crispEdges"})});H.attr("width",L._width).call(o.fill,v.maskOppAxisColor);var F=a.ensureSingle(T,"rect",v.maskMaxOppAxisClassName,function($){$.attr({y:0,"shape-rendering":"crispEdges"})});F.attr("width",L._width).style("border-top",v.maskOppBorder).call(o.fill,v.maskOppAxisColor)}}function _(T,S,D,L){if(!S._context.staticPlot){var E=a.ensureSingle(T,"rect",v.slideBoxClassName,function(R){R.attr({y:0,cursor:v.slideBoxCursor,"shape-rendering":"crispEdges"})});E.attr({height:L._height,fill:v.slideBoxFill})}}function k(T,S,D,L){var E=a.ensureSingle(T,"g",v.grabberMinClassName),R=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)},F=a.ensureSingle(E,"rect",v.handleMinClassName,function(P){P.attr(N)});F.attr(H);var $=a.ensureSingle(R,"rect",v.handleMaxClassName,function(P){P.attr(N)});$.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(E,"rect",v.grabAreaMinClassName,function(P){P.attr(A)});M.attr("height",L._height);var C=a.ensureSingle(R,"rect",v.grabAreaMaxClassName,function(P){P.attr(A)});C.attr("height",L._height)}return Jv}var G4=me,U4=pm,V4=nA,ed=wu,X4={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:G4.extendFlat({},U4,{yaxis:V4})}}},layoutAttributes:pm,handleDefaults:O4(),calcAutorange:j4(),draw:B4(),isVisible:ed.isVisible,makeData:ed.makeData,autoMarginOpts:ed.autoMarginOpts},Y4=vr,lx=xr,W4=Lt.templatedArray,q4=W4("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(" ")}),Th={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:q4,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:Y4({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:lx.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:lx.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"},sA={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},Vf=me,Z4=ot,K4=Lt,Q4=Ha,fA=Th,kh=sA,J4=function(e,r,a,i,n){var o=e.rangeselector||{},l=K4.newContainer(r,"rangeselector");function s(h,d){return Vf.coerce(o,l,fA,h,d)}var f=Q4(o,l,{name:"buttons",handleItemDefaults:e6,calendar:n}),c=s("visible",f.length>0);if(c){var u=t6(r,a,i);s("x",u[0]),s("y",u[1]),Vf.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),Vf.coerceFont(s,"font",a.font);var v=s("bgcolor");s("activecolor",Z4.contrast(v,kh.lightAmount,kh.darkAmount)),s("bordercolor"),s("borderwidth")}};function e6(t,e,r,a){var i=a.calendar;function n(s,f){return Vf.coerce(t,e,fA.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 t6(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+kh.yPad]}var r6=eS,a6=me.titleCase,i6=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=n6(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function n6(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=r6["utc"+a6(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 Ac=ft,o6=Je,l6=Qt,sx=ot,cA=xt,Ka=me,fx=Ka.strTranslate,Xf=nr,s6=Wt,ym=Cr,cx=ym.LINE_SPACING,ux=ym.FROM_TL,vx=ym.FROM_BR,Ah=sA,f6=i6,c6=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(u6(e),v6);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Ac.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=Ac.select(this),u=f6(o,f);f._isActive=d6(o,f,u),c.call(td,l,f),c.call(p6,l,f,e),c.on("click",function(){e._dragged||o6.call("_guiRelayout",e,u)}),c.on("mouseover",function(){f._isHovered=!0,c.call(td,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(td,l,f)})}),y6(e,s,l,o._name,n)})};function u6(t){for(var e=s6.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 v6(t){return t._id}function d6(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 td(t,e,r){var a=Ka.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:Ah.rx,ry:Ah.ry}),a.call(sx.stroke,e.bordercolor).call(sx.fill,h6(e,r)).style("stroke-width",e.borderwidth+"px")}function h6(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function p6(t,e,r,a){function i(o){Xf.convertToTspans(o,a)}var n=Ka.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(cA.font,e.font).text(m6(r,a._fullLayout._meta)).call(i)}function m6(t,e){return t.label?e?Ka.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function y6(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var h=Ac.select(this),d=h.select(".selector-text"),p=r.font.size*cx,m=Math.max(p*Xf.lineCount(d),16)+3;o=Math.max(o,m)}),e.each(function(){var h=Ac.select(this),d=h.select(".selector-rect"),p=h.select(".selector-text"),m=p.node()&&cA.bBox(p.node()).width,y=r.font.size*cx,b=Xf.lineCount(p),w=Math.max(m+10,Ah.minButtonWidth);h.attr("transform",fx(l+n,l)),d.attr({x:0,y:0,width:w,height:o}),Xf.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),l6.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*ux[u],r:n*vx[u],b:o*vx[v],t:o*ux[v]}),i.attr("transform",fx(f,c))}var g6={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Th}}},layoutAttributes:Th,handleDefaults:J4,draw:c6},Ni={},dx=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:dx({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:dx({},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 b6=me,x6=Oo.counter,_6=Ni.attributes,hx=Lr.idRegex,w6=Lt,Mh={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:[x6("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:[hx.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:[hx.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:_6({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 Mc(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 T6(t,e){var r=t.grid||{},a=Mc(e,r,"x"),i=Mc(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=w6.newContainer(e,"grid");function v(_,k){return b6.coerce(r,u,Mh,_,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:px("x",v,b,g,d),y:px("y",v,w,x,h,y)}}function px(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 k6(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=Mc(e,a,"x"),_=Mc(e,a,"y");r.xaxes=mx(x,i.xaxis,l,m,"x"),r.yaxes=mx(_,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"],E,R,N;if(L.length<8)k[S]="free";else if(D==="x"){if(L.charAt(0)==="t"===T?(E=0,R=1,N=o):(E=o-1,R=-1,N=-1),n){var H=m[S];for(f=E;f!==N;f+=R)if(h=d[f][H],!!h&&(p=h.indexOf("y"),h.slice(0,p)===S)){k[S]=h.slice(p);break}}else for(f=E;f!==N;f+=R)if(v=r.yaxes[f],i.cartesian.indexOf(S+v)!==-1){k[S]=v;break}}else if(L.charAt(0)==="l"?(E=0,R=1,N=l):(E=l-1,R=-1,N=-1),n){var F=m[S];for(f=E;f!==N;f+=R)if(h=d[F][f],!!h&&(p=h.indexOf("y"),h.slice(p)===S)){k[S]=h.slice(0,p);break}}else for(f=E;f!==N;f+=R)if(u=r.xaxes[f],i.cartesian.indexOf(u+S)!==-1){k[S]=u;break}}}}function mx(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 A6={moduleType:"component",name:"grid",schema:{layout:{grid:Mh}},layoutAttributes:Mh,sizeDefaults:T6,contentDefaults:k6},uA={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(" ")}}},rd,yx;function M6(){if(yx)return rd;yx=1;var t=dt,e=Je,r=me,a=Lt,i=uA;return rd=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))}},rd}var ad,gx;function vA(){if(gx)return ad;gx=1,ad=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 ad}var id,bx;function S6(){if(bx)return id;bx=1;var t=dt,e=Je,r=Dt,a=me,i=vA();id=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 id}var nd,xx;function L6(){if(xx)return nd;xx=1;var t=ft,e=dt,r=xt,a=_r;nd=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 E=b.width;D="M"+(S.x-E)+","+S.yh+"h"+2*E+"m-"+E+",0V"+S.ys,S.noYS||(D+="m-"+E+",0h"+2*E),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 R=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=!R.size(),c?R=T.append("path").style("vector-effect",d?"none":"non-scaling-stroke").classed("xerror",!0):h&&(R=R.transition().duration(f.duration).ease(f.easing)),R.attr("d",D)}else R.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 nd}var od,_x;function C6(){if(_x)return od;_x=1;var t=ft,e=ot;return od=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)})},od}var Nl=me,wx=za.overrideAll,Hl=uA,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 D6={moduleType:"component",name:"errorbars",schema:{traces:{scatter:ln,bar:ln,histogram:ln,scatter3d:wx(ws,"calc","nested"),scattergl:wx(ln,"calc","nested")}},supplyDefaults:M6(),calc:S6(),makeComputeError:vA(),plot:L6(),style:C6(),hoverInfo:$6};function $6(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 P6={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,ld=oa,Yf=Qt,Tx=Je,Va=Dt,mf=Oa,ra=me,pa=ra.strTranslate,dA=Nt.extendFlat,sd=Ri,da=xt,fd=ot,E6=Kc,R6=nr,z6=ka.flipScale,I6=kk,F6=Ak,N6=Na,gm=Cr,kx=gm.LINE_SPACING,Ax=gm.FROM_TL,Mx=gm.FROM_BR,Ft=P6.cn;function H6(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+Ft.colorbar).data(O6(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(Ft.colorbar,!0),r.each(function(a){var i=pi.select(this);ra.ensureSingle(i,"rect",Ft.cbbg),ra.ensureSingle(i,"g",Ft.cbfills),ra.ensureSingle(i,"g",Ft.cblines),ra.ensureSingle(i,"g",Ft.cbaxis,function(o){o.classed(Ft.crisp,!0)}),ra.ensureSingle(i,"g",Ft.cbtitleunshift,function(o){o.append("g").classed(Ft.cbtitle,!0)}),ra.ensureSingle(i,"rect",Ft.cboutline);var n=j6(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&B6(i,a,t)}),r.exit().each(function(a){Yf.autoMargin(t,a._id)}).remove(),r.order()}function O6(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return dA(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?z6(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 j6(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},E=e._levels,R=G6(r,e,S),N=R.fill,H=R.line,F=Math.round(o*(l==="fraction"?a?g.w:g.h:1)),$=F/(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,P=y?g.h:r._fullLayout.height,I=Math.round(a?p*C+h:m*P+d),j={center:.5,right:1}[u]||0,B={top:1,middle:.5}[v]||0,G=a?p-j*$:m-B*$,O=a?m-B*M:p-j*M,W=Math.round(a?P*(1-O):C*O);e._lenFrac=M,e._thickFrac=$,e._uFrac=G,e._vFrac=O;var V=e._axis=U6(r,e,S);V.position=$+(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=E.start;var X=E.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(E.start)/E.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",pa(Math.round(g.l),Math.round(g.t)));var ue=t.select("."+Ft.cbtitleunshift).attr("transform",pa(-Math.round(g.l),-Math.round(g.t))),ae=V.ticklabelposition,le=V.title.font.size,de=t.select("."+Ft.cbaxis),ge,Te=0,Le=0;function _e(Re,K){var ke={propContainer:V,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:w._dfltTitle.colorbar,containerGroup:t.select("."+Ft.cbtitle)},re=Re.charAt(0)==="h"?Re.substr(1):"h"+Re;t.selectAll("."+re+",."+re+"-math-group").remove(),E6.draw(r,Re,dA(ke,K||{}))}function ze(){if(a&&Z||!a&&!Z){var Re,K;T==="top"&&(Re=h+g.l+C*p,K=d+g.t+P*(1-O-M)+3+le*.75),T==="bottom"&&(Re=h+g.l+C*p,K=d+g.t+P*(1-O)-3-le*.25),T==="right"&&(K=d+g.t+P*m+3+le*.75,Re=h+g.l+C*O),_e(V._id+"title",{attributes:{x:Re,y:K,"text-anchor":a?"start":"middle"}})}}function ce(){if(a&&!Z||!a&&Z){var Re=V.position||0,K=V._offset+V._length/2,ke,re;if(T==="right")re=K,ke=g.l+C*Re+10+le*(V.showticklabels?1:.5);else if(ke=K,T==="bottom"&&(re=g.t+P*Re+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+P*Re+10-F-kx*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 Re=t.select("."+Ft.cbtitle),K=Re.select("text"),ke=[-s/2,s/2],re=Re.select(".h"+V._id+"title-math-group").node(),pe=15.6;K.node()&&(pe=parseInt(K.node().style.fontSize,10)*kx);var we;if(re?(we=da.bBox(re),Le=we.width,Te=we.height,Te>pe&&(ke[1]-=(Te-pe)/2)):K.node()&&!K.classed(Ft.jsPlaceholder)&&(we=da.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=R6.lineCount(K);ke[1]+=(1-se)*pe}Re.attr("transform",pa(ke[0],ke[1])),V.setScale()}}else Le&&(T==="right"&&(V.domain[0]+=(Le+le/2)/g.w),Re.attr("transform",pa(ke[0],ke[1])),V.setScale())}t.selectAll("."+Ft.cbfills+",."+Ft.cblines).attr("transform",a?pa(0,Math.round(g.h*(1-V.domain[1]))):pa(Math.round(g.w*V.domain[0]),0)),de.attr("transform",a?pa(0,Math.round(-g.t)):pa(Math.round(-g.l),0));var ie=t.select("."+Ft.cbfills).selectAll("rect."+Ft.cbfill).attr("style","").data(N);ie.enter().append("rect").classed(Ft.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",I).attr(a?"y":"x",pi.min(ve)).attr(a?"width":"height",Math.max(F,2)).attr(a?"height":"width",Math.max(pi.max(ve)-pi.min(ve),2));if(e._fillgradient)da.gradient(Be,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Ne=L(He).replace("e-","");Be.attr("fill",ld(Ne).toHexString())}});var be=t.select("."+Ft.cblines).selectAll("path."+Ft.cbline).data(_.color&&_.width?H:[]);be.enter().append("path").classed(Ft.cbline,!0),be.exit().remove(),be.each(function(He){var Oe=I,ve=Math.round(V.c2p(He))+_.width/2%1;pi.select(this).attr("d","M"+(a?Oe+","+ve:ve+","+Oe)+(a?"h":"v")+F).call(da.lineGroupStyle,_.width,D(He),_.dash)}),de.selectAll("g."+V._id+"tick,path").remove();var Me=I+F+(s||0)/2-(e.ticks==="outside"?1:0),Se=Va.calcTicks(V),$e=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,$e),transFn:Va.makeTransTickFn(V)}),Va.drawLabels(r,V,{vals:Se,layer:de,transFn:Va.makeTransTickLabelFn(V),labelFns:Va.makeLabelFns(V,Me)})}function Pe(){var Re,K=F+s/2;ae.indexOf("inside")===-1&&(Re=da.bBox(de.node()),K+=a?Re.width:Re.height),ge=ue.select("text");var ke=0,re=a&&T==="top",pe=!a&&T==="right",we=0;if(ge.node()&&!ge.classed(Ft.jsPlaceholder)){var se,ie=ue.select(".h"+V._id+"title-math-group").node();ie&&(a&&Z||!a&&!Z)?(Re=da.bBox(ie),ke=Re.width,se=Re.height):(Re=da.bBox(ue.node()),ke=Re.right-g.l-(a?I:W),se=Re.bottom-g.t-(a?W:I),!a&&T==="top"&&(K+=Re.height,we=Re.height)),pe&&(ge.attr("transform",pa(ke/2+le/2,0)),ke*=2),K=Math.max(K,a?ke:se)}var fe=(a?h:d)*2+K+f+s/2,be=0;!a&&k.text&&v==="bottom"&&m<=0&&(be=fe/2,fe+=be,we+=be),w._hColorbarMoveTitle=be,w._hColorbarMoveCBTitle=we;var Me=f+s,Se=(a?I:W)-Me/2-(a?h:0),$e=(a?W:I)-(a?A:d+we-be);t.select("."+Ft.cbbg).attr("x",Se).attr("y",$e).attr(a?"width":"height",Math.max(fe-be,2)).attr(a?"height":"width",Math.max(A+Me,2)).call(fd.fill,c).call(fd.stroke,e.bordercolor).style("stroke-width",f);var He=pe?Math.max(ke-10,0):0;t.selectAll("."+Ft.cboutline).attr("x",(a?I:W+h)+He).attr("y",(a?W+d-A:I)+(re?Te:0)).attr(a?"width":"height",Math.max(F,2)).attr(a?"height":"width",Math.max(A-(a?2*d+Te:2*h+He),2)).call(fd.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",pa(Oe,ve)),!a&&(f||ld(c).getAlpha()&&!ld.equals(w.paper_bgcolor,c))){var Be=de.selectAll("text"),Ne=Be[0].length,We=t.select("."+Ft.cbbg).node(),Ge=da.bBox(We),Ve=da.getTranslate(t),Ue=2;Be.each(function(ne,Ee){var je=0,Ye=Ne-1;if(Ee===je||Ee===Ye){var rt=da.bBox(this),nt=da.getTranslate(this),vt;if(Ee===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(Ee===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 z={},Y=Ax[u],U=Mx[u],q=Ax[v],oe=Mx[v],ee=fe-F;a?(n==="pixels"?(z.y=m,z.t=A*q,z.b=A*oe):(z.t=z.b=0,z.yt=m+i*q,z.yb=m-i*oe),l==="pixels"?(z.x=p,z.l=fe*Y,z.r=fe*U):(z.l=ee*Y,z.r=ee*U,z.xl=p-o*Y,z.xr=p+o*U)):(n==="pixels"?(z.x=p,z.l=A*Y,z.r=A*U):(z.l=z.r=0,z.xl=p+i*Y,z.xr=p-i*U),l==="pixels"?(z.y=1-m,z.t=fe*q,z.b=fe*oe):(z.t=ee*q,z.b=ee*oe,z.yt=m-o*q,z.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+z.r,b:w.height-$e-ve,t:$e+z.b};b&&y?Yf.autoMargin(r,e._id,z):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([Yf.previousPromises,ze,ye,ce,Yf.previousPromises,Pe],r)}function B6(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"),sd(t)},moveFn:function(f,c){t.attr("transform",o+pa(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);sd(t,u)},doneFn:function(){if(sd(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?Tx.call("_guiRestyle",r,f,e._traceIndex):Tx.call("_guiRelayout",r,f)}}})}function G6(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 U6(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,N6,c,u)}return I6(n,l,f,s,a),F6(n,l,f,s),l}var V6={draw:H6},X6={moduleType:"component",name:"colorbar",attributes:sp,supplyDefaults:Ow,draw:V6.draw,hasColorbar:Pw},Y6={moduleType:"component",name:"legend",layoutAttributes:bT,supplyLayoutDefaults:xT,draw:kT,style:wT},W6={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"}},q6={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},Z6=Je,hA=me,cd=hA.extendFlat,Sx=hA.extendDeep;function Lx(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 K6(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var pA=function(e,r){var a,i=e.data,n=e.layout,o=Sx([],i),l=Sx({},n,Lx(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++)K6(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),Z6.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={}),cd(h.xaxis,v),cd(h.yaxis,v),cd(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=Lx(r.tileClass),p},Q6=Ih.EventEmitter,J6=Je,e8=me,Cx=kr,t8=pA,r8=Qp,a8=Jp;function i8(t,e){var r=new Q6,a=t8(t,{format:"png"}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=Cx.getDelay(i._fullLayout);setTimeout(function(){var s=r8(i),f=document.createElement("canvas");f.id=e8.randstr(),r=a8({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=Cx.getRedrawFunc(i);return J6.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var n8=i8,Dx=kr,o8={getDelay:Dx.getDelay,getRedrawFunc:Dx.getRedrawFunc,clone:pA,toSVG:Qp,svgToImg:Jp,toImage:n8,downloadImage:Y2},l8=o8;(function(t){t.version=Rc.version;for(var e=Je,r=t.register=e.register,a=zt,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(bF),r([VF,fN,bs,MN,HN,c4,I4,X4,g6,A6,D6,So,X6,Y6,wa,s2]),r([W6,q6]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=Lp;var l=wa,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=l8,t.PlotSchema=Vo})(p_);var s8=p_;const r9=Ci(s8);var Ts={TEXTPAD:3,eventDataKeys:["value","label"]},Bt=Fi,$x=Xo.axisHoverFormat,f8=mr.hovertemplateAttrs,c8=mr.texttemplateAttrs,mA=Sn,u8=vr,Px=Ts,v8=Hr.pattern,sn=Nt.extendFlat,ud=u8({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),d8=Bt.marker,h8=d8.line,p8=sn({},h8.width,{dflt:0}),m8=sn({width:p8,editType:"calc"},mA("marker.line")),y8=sn({line:m8,editType:"calc"},mA("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:v8,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:$x("x"),yhoverformat:$x("y"),text:Bt.text,texttemplate:c8({editType:"plot"},{keys:Px.eventDataKeys}),hovertext:Bt.hovertext,hovertemplate:f8({},{keys:Px.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({},ud,{description:"Sets the font used for `text`."}),insidetextfont:sn({},ud,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:sn({},ud,{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:y8,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`."}}},bm={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(" ")}},g8=ot,Ex=ka.hasColorscale,Rx=ps,b8=me.coercePattern,yA=function(e,r,a,i,n){var o=a("marker.color",i),l=Ex(e,"marker");l&&Rx(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",g8.defaultLine),Ex(e,"marker.line")&&Rx(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),b8(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},zx=dt,Io=me,Ix=ot,x8=Je,_8=tm,w8=mu,T8=yA,k8=rm,gA=ks,yf=Io.coerceFont;function A8(t,e,r,a){function i(f,c){return Io.coerce(t,e,gA,f,c)}var n=_8(t,e,a,i);if(!n){e.visible=!1;return}w8(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");xA(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),T8(t,e,i,r,a);var l=(e.marker.line||{}).color,s=x8.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||Ix.defaultLine,{axis:"y"}),s(t,e,l||Ix.defaultLine,{axis:"x",inherit:"y"}),Io.coerceSelectionMarkerOpacity(e,i)}function M8(t,e){var r,a;function i(l,s){return Io.coerce(a._input,a,gA,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=bA(o)),e.barmode==="group"&&k8(r,a,e,i)}}function bA(t){if(zx(t)){if(t=+t,t>=0)return t}else if(typeof t=="string"&&(t=t.trim(),t.slice(-1)==="%"&&zx(t.slice(0,-1))&&(t=+t.slice(0,-1),t>=0)))return t+"%"}function xA(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=Io.extendFlat({},m),b=t.textfont&&t.textfont.color,w=!b;if(w&&delete y.color,yf(a,"insidetextfont",y),v){var g=Io.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:A8,crossTraceDefaults:M8,handleText:xA,validateCornerradius:bA},S8=Je,L8=Dt,C8=me,D8=bm,$8=bn.validateCornerradius,_A=function(t,e,r){function a(d,p){return C8.coerce(t,e,D8,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(S8.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=L8.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=$8(h)},qn=me,xm=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"))}},Fx=Dt,Nx=yu,Hx=ka.hasColorscale,Ox=fp,P8=xm,E8=lk,R8=function(e,r){var a=Fx.getFromId(e,r.xaxis||"x"),i=Fx.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=Nx(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",u),l=a.makeCalcdata(r,"x"),s=Nx(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 Hx(r,"marker")&&Ox(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Hx(r,"marker.line")&&Ox(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),P8(h,r),E8(h,r),h},z8=ft,I8=me;function F8(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=z8.select(this).select("text");I8.setTransormAndDisplay(f,s)}})}}function N8(t,e,r){if(r.uniformtext.mode){var a=wA(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 H8(t,e){var r=wA(t);e[r]=void 0}function wA(t){return"_"+t+"Text_minsize"}var ri={recordMinTextSize:N8,clearMinTextSize:H8,resizeText:F8},ai={},O8=dt,j8=oa,TA=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(O8(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 j8(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 TA(t)?e<t.length&&(r=t[e]):r=t,r};ai.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:TA(t.marker.line.width)?0:t.marker.line.width;return r};var Ol=ft,B8=ot,ls=xt,kA=me,AA=Je,MA=ri.resizeText,_m=ks,G8=_m.textfont,U8=_m.insidetextfont,V8=_m.outsidetextfont,Zn=ai;function X8(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;SA(n,o,t)}),AA.getComponentMethod("errorbars","style")(e)}function SA(t,e,r){ls.pointStyle(t.selectAll("path"),e,r),LA(t,e,r)}function LA(t,e,r){t.selectAll("text").each(function(a){var i=Ol.select(this),n=kA.ensureUniformFontSize(r,CA(i,a,e,r));ls.font(i,n)})}function Y8(t,e,r){var a=e[0].trace;a.selectedpoints?W8(r,a,t):(SA(r,a,t),AA.getComponentMethod("errorbars","style")(r))}function W8(t,e,r){ls.selectedPointStyle(t.selectAll("path"),e),q8(t.selectAll("text"),e,r)}function q8(t,e,r){t.each(function(a){var i=Ol.select(this),n;if(a.selected){n=kA.ensureUniformFontSize(r,CA(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 CA(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=EA(e,r);n=$A(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=PA(r,e.i,i));return n}function DA(t,e,r){return wm(G8,t.textfont,e,r)}function $A(t,e,r,a){var i=DA(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:B8.contrast(a),family:i.family,size:i.size}),wm(U8,t.insidetextfont,e,i)}function PA(t,e,r){var a=DA(t,e,r);return wm(V8,t.outsidetextfont,e,a)}function wm(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 EA(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var xn={style:X8,styleTextPoints:LA,styleOnSelect:Y8,getInsideTextFont:$A,getOutsideTextFont:PA,getBarColor:EA,resizeText:MA},gf=ft,bf=dt,or=me,Z8=nr,K8=ot,_i=xt,Q8=Je,Sc=Dt.tickText,RA=ri,J8=RA.recordMinTextSize,eH=RA.clearMinTextSize,vd=xn,Fo=ai,tH=Ts,zA=ks,rH=zA.text,aH=zA.textposition,iH=sa.appendArrayPointValue,br=tH.TEXTPAD;function nH(t){return t.id}function oH(t){if(t.ids)return nH}function dd(t){return(t>0)-(t<0)}function Ea(t,e){return t<e?1:-1}function lH(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 IA(t,e,r,a){if(!e.uniformtext.mode&&FA(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 FA(t){return t&&t.duration>0}function sH(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},eH("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",_=FA(i),k=or.ensureSingle(v,"g","points"),T=oH(h),S=k.selectAll("g.point").data(or.identity,T);S.enter().append("g").classed("point",!0),S.exit().remove(),S.each(function(L,E){var R=gf.select(this),N=lH(L,o,l,x),H=N[0][0],F=N[0][1],$=N[1][0],A=N[1][1],M=(x?F-H:A-$)===0;M&&w&&Fo.getLineWidth(h,L)&&(M=!1),M||(M=!bf(H)||!bf(F)||!bf($)||!bf(A)),L.isBlank=M,M&&(x?F=H:A=$),g&&!M&&(x?(H-=Ea(H,F)*g,F+=Ea(H,F)*g):($-=Ea($,A)*g,A+=Ea($,A)*g));var C,P;if(h.type==="waterfall"){if(!M){var I=h[L.dir].marker;C=I.line.width,P=I.color}}else C=Fo.getLineWidth(h,L),P=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=K8.opacity(P),O=G<1||C>.01?j:B;t._context.staticPlot||(H=O(H,F,x),F=O(F,H,x),$=O($,A,!x),A=O(A,$,!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-$:F-H),pe=Math.abs(x?F-H:A-$),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+","+$+"V"+A+"H"+F+"V"+$+"Z",ue=0;if(X&&L.s){var ae=dd(L.s0)===0||dd(L.s)===dd(L.s0)?L.s1:L.s0;if(ue=O(L.hasB?0:Math.abs(W(V,!0)-W(ae,!0))),ue<X){var le=Ea(H,F),de=Ea($,A),ge=le===-de?1:0;if(x)if(L.hasB)Q="M"+(H+X*le)+","+$+"A "+X+","+X+" 0 0 "+ge+" "+H+","+($+X*de)+"V"+(A-X*de)+"A "+X+","+X+" 0 0 "+ge+" "+(H+X*le)+","+A+"H"+(F-X*le)+"A "+X+","+X+" 0 0 "+ge+" "+F+","+(A-X*de)+"V"+($+X*de)+"A "+X+","+X+" 0 0 "+ge+" "+(F-X*le)+","+$+"Z";else{te=Math.abs(F-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+","+$+"V"+(A-Te*de)+"H"+_e(F-(X-ue)*le,H)+"A "+X+","+X+" 0 0 "+ge+" "+F+","+(A-X*de-Le)+"V"+($+X*de+Le)+"A "+X+","+X+" 0 0 "+ge+" "+_e(F-(X-ue)*le,H)+","+($+Te*de)+"Z"}else if(L.hasB)Q="M"+(H+X*le)+","+$+"A "+X+","+X+" 0 0 "+ge+" "+H+","+($+X*de)+"V"+(A-X*de)+"A "+X+","+X+" 0 0 "+ge+" "+(H+X*le)+","+A+"H"+(F-X*le)+"A "+X+","+X+" 0 0 "+ge+" "+F+","+(A-X*de)+"V"+($+X*de)+"A "+X+","+X+" 0 0 "+ge+" "+(F-X*le)+","+$+"Z";else{te=Math.abs(A-$)+ue;var ze=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+ze*le)+","+$+"V"+ye(A-(X-ue)*de,$)+"A "+X+","+X+" 0 0 "+ge+" "+(H+X*le-ce)+","+A+"H"+(F-X*le+ce)+"A "+X+","+X+" 0 0 "+ge+" "+(F-ze*le)+","+ye(A-(X-ue)*de,$)+"V"+$+"Z"}}else Q=xe}else Q=xe;var Pe=IA(or.ensureSingle(R,"path"),s,i,n);if(Pe.style("vector-effect",f?"none":"non-scaling-stroke").attr("d",isNaN((F-H)*(A-$))||M&&t._context.staticPlot?"M0,0Z":Q).call(_i.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&_){var Re=_i.makePointStyleFns(h);_i.singlePointStyle(L,Pe,h,Re,t)}fH(t,e,R,u,E,H,F,$,A,X,ue,i,n),e.layerClipId&&_i.hideOutsideRangePoint(L,R.select("text"),o,l,h.xcalendar,h.ycalendar)});var D=h.cliponaxis===!1;_i.setClipUrl(v,D?null:e.layerClipId,t)});Q8.getComponentMethod("errorbars","plot")(t,c,e,i)}function fH(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(Z8.convertToTspans,t);return ae}var b=a[0].trace,w=b.orientation==="h",g=vH(p,a,i,h,d);m=dH(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=vd.getBarColor(a[i],b),E=vd.getInsideTextFont(b,i,D,L),R=vd.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 F=Math.abs(o-n),$=Math.abs(s-l),A=F-2*br,M=$-2*br,C,P,I,j,B;if(m==="outside"&&!k&&!_.hasB&&(m="inside"),m==="auto")if(k){m="inside",B=or.ensureUniformFontSize(t,E),C=y(r,g,B),P=_i.bBox(C.node()),I=P.width,j=P.height;var G=I>0&&j>0,O;S?T?O=Ki(A-2*f,M,I,j,w)||Ki(A,M-2*f,I,j,w):w?O=Ki(A-(f-c),M,I,j,w)||Ki(A,M-2*(f-c),I,j,w):O=Ki(A,M-(f-c),I,j,w)||Ki(A-2*(f-c),M,I,j,w):O=Ki(A,M,I,j,w),G&&O?m="inside":(m="outside",C.remove(),C=null)}else m="inside";if(!C){B=or.ensureUniformFontSize(t,m==="outside"?R:E),C=y(r,g,B);var W=C.attr("transform");if(C.attr("transform",""),P=_i.bBox(C.node()),I=P.width,j=P.height,C.attr("transform",W),I<=0||j<=0){C.remove();return}}var V=b.textangle,Z,X;m==="outside"?(X=b.constraintext==="both"||b.constraintext==="outside",Z=uH(n,o,l,s,P,{isHorizontal:w,constrained:X,angle:V})):(X=b.constraintext==="both"||b.constraintext==="inside",Z=OA(n,o,l,s,P,{isHorizontal:w,constrained:X,angle:V,anchor:N,hasB:T,r:f,overhead:c})),Z.fontSize=B.size,J8(b.type==="histogram"?"bar":b.type,Z,p),_.transform=Z;var Q=IA(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 NA(t){return t==="auto"?0:t}function HA(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 OA(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=NA(s);s==="auto"&&!(b<=g&&w<=x)&&(b>g||w>x)&&(!(b>x||w>g)||b<w!=g<x)&&(k+=90);var T=HA(i,k),S,D;if(m&&m-y>br){var L=cH(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 E=i.left*d+i.right*h,R=(i.top+i.bottom)/2,N=(t+br)*d+(e-br)*h,H=(r+a)/2,F=0,$=0;if(u||c){var A=(o?T.x:T.y)/2;m&&(c||p)&&(_+=D);var M=o?Ea(t,e):Ea(r,a);o?u?(N=t+M*_,F=-M*A):(N=e-M*_,F=M*A):u?(H=r+M*_,$=-M*A):(H=a-M*_,$=M*A)}return{textX:E,textY:R,targetX:N,targetY:H,anchorX:F,anchorY:$,scale:S,rotate:k}}function cH(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 uH(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=NA(s),m=HA(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?Ea(e,t):Ea(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 vH(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=hH(t,e,r,a,i):n.textinfo?l=pH(e,r,a,i):l=Fo.getValue(n.text,r),Fo.coerceString(rH,l)}function dH(t,e){var r=Fo.getValue(t.textposition,e);return Fo.coerceEnumerated(aH,r)}function hH(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 Sc(v,v.c2l(_),!0).text}function m(_){return Sc(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={};iH(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 pH(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 Sc(_,x,!0).text}function f(x){var _=n?r:a;return Sc(_,+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 Tm={plot:sH,toMoveInsideBar:OA},xl=wa,mH=Je,jx=ot,yH=me.fillText,gH=ai.getLineWidth,hd=Dt.hoverLabelText,bH=Yt.BADNUM;function xH(t,e,r,a,i){var n=jA(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=BA(l,s),mH.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function jA(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=E):(v=e,h=r,d="x",p="y",y=H,m=E);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 E(O){return L(S(O),D(O),c)}function R(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 F(O){var W=h,V=O.b,Z=N(O);return xl.inbox(V-W,Z-W,u+(Z-W)/(Z-V)-1)}var $=t[d+"a"],A=t[p+"a"];b=Math.abs($.r2c($.range[1])-$.r2c($.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!==bH){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 P=t.index,I=n[P],j=o.base?I.b+I.s:I.s;t[p+"0"]=t[p+"1"]=A.c2p(I[p],!0),t[p+"LabelVal"]=j;var B=l.extents[l.extents.round(I.p)];t[d+"0"]=$.c2p(s?S(I):B[0],!0),t[d+"1"]=$.c2p(s?D(I):B[1],!0);var G=I.orig_p!==void 0;return t[d+"LabelVal"]=G?I.orig_p:I.p,t.labelLabel=hd($,t[d+"LabelVal"],o[d+"hoverformat"]),t.valueLabel=hd(A,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=hd(A,I.b,o[p+"hoverformat"]),t.spikeDistance=(F(I)+R(I))/2,t[d+"Spike"]=$.c2p(I.p,!0),yH(I,o,t),t.hovertemplate=o.hovertemplate,t}}function BA(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=gH(t,e);if(jx.opacity(r))return r;if(jx.opacity(a)&&i)return a}var GA={hoverPoints:xH,hoverOnBars:jA,getTraceColor:BA},_H=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},UA=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:wH(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 wH(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 TH={attributes:ks,layoutAttributes:bm,supplyDefaults:bn.supplyDefaults,crossTraceDefaults:bn.crossTraceDefaults,supplyLayoutDefaults:_A,calc:R8,crossTraceCalc:om.crossTraceCalc,colorbar:_s,arraysToCalcdata:xm,plot:Tm.plot,style:xn.style,styleOnSelect:xn.styleOnSelect,hoverPoints:GA.hoverPoints,eventData:_H,selectPoints:UA,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(" ")}},kH=TH;const a9=Ci(kH);var AH=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"}},MH={eventDataKeys:["binNumber"]},$r=ks,Bx=Xo.axisHoverFormat,SH=mr.hovertemplateAttrs,LH=mr.texttemplateAttrs,pd=vr,Gx=AH,CH=MH,md=Nt.extendFlat,VA={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:Bx("x"),yhoverformat:Bx("y"),text:md({},$r.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:md({},$r.hovertext,{description:"Same as `text`."}),orientation:$r.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:Gx("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:Gx("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:SH({},{keys:CH.eventDataKeys}),texttemplate:LH({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:md({},$r.textposition,{arrayOk:!1}),textfont:pd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:pd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:pd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:$r.insidetextanchor,textangle:$r.textangle,cliponaxis:$r.cliponaxis,constraintext:$r.constraintext,marker:$r.marker,offsetgroup:$r.offsetgroup,alignmentgroup:$r.alignmentgroup,selected:$r.selected,unselected:$r.unselected,_deprecated:{bardir:$r._deprecated.bardir}},Ux=Je,_l=me,Vx=ot,DH=bn.handleText,$H=yA,PH=VA,EH=function(e,r,a,i){function n(b,w){return _l.coerce(e,r,PH,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");DH(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=Ux.getComponentMethod("calendars","handleTraceDefaults");d(e,r,["x","y"],i);var p=r[v];p&&n("histfunc"),n("histnorm"),n("autobin"+u),$H(e,r,n,a,i),_l.coerceSelectionMarkerOpacity(r,n);var m=(r.marker.line||{}).color,y=Ux.getComponentMethod("errorbars","supplyDefaults");y(e,r,m||Vx.defaultLine,{axis:"y"}),y(e,r,m||Vx.defaultLine,{axis:"x",inherit:"y"})},Dl=me,RH=Wt,xf=Je.traceIs,zH=rm,IH=bn.validateCornerradius,Xx=Dl.nestedProperty,yd=ti.getAxisGroup,Yx=[{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"}],FH=["x","y"],NH=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,u,v,h;function d(H,F){return Dl.coerce(l._input,l,l._module.attributes,H,F)}function p(H){return H.orientation==="v"?"x":"y"}function m(H,F){var $=RH.getFromTrace({_fullLayout:r},H,F);return $.type}function y(H,F,$){var A=H.uid+"__"+$;F||(F=A);var M=m(H,$),C=H[$+"calendar"]||"",P=a[F],I=!0;P&&(M===P.axType&&C===P.calendar?(I=!1,P.traces.push(H),P.dirs.push($)):(F=A,M!==P.axType&&Dl.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+M,"axis","with bins on","type:"+P.axType,"axis."].join(" ")),C!==P.calendar&&Dl.warn(["Attempted to group the bins of trace",H.index,"set with a",C,"calendar","with bins",P.calendar?"on a "+P.calendar+" calendar":"w/o a set calendar"].join(" ")))),I&&(a[F]={traces:[H],dirs:[$],axType:M,calendar:H[$+"calendar"]||""}),H["_"+$+"bingroup"]=F}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=IH(b))}xf(l,"2dMap")||zH(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=yd(r,g)+l.orientation;(w[x]||{})[l.alignmentgroup]&&(f=x)}!f&&r.barmode!=="overlay"&&(f=yd(r,l.xaxis)+yd(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=FH[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<Yx.length;v++){var L=Yx[v],E=L.name,R,N;if(!(E==="nbins"&&D.sizeFound)){for(u=0;u<s.length;u++){if(l=s[u],c=D.dirs[u],R=L.aStr[c],Xx(l._input,R).get()!==void 0){D[E]=d(R),D[E+"Found"]=!0;break}N=(l._autoBin||{})[c]||{},N[E]&&Xx(l,R).set(N[E])}if(E==="start"||E==="end")for(;u<s.length;u++)l=s[u],l["_"+c+"bingroup"]&&(N=(l._autoBin||{})[c]||{},d(R,N[E]));E==="nbins"&&!D.sizeFound&&!D.nbinsFound&&(l=s[0],D[E]=d(R))}}}},Kn=dt,HH={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}},OH={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}},jH=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,Wx=Zo.ONEAVGMONTH,Lc=Zo.ONEDAY,qx=Zo.ONEHOUR,Zx=Zo.ONEMIN,Kx=Zo.ONESEC,Qx=Dt.tickIncrement,BH=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>Lc){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 _=Qx(x,m,!1,n);(x+_)/2<y+e&&(x=_)}return b&&d?Qx(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=Jx(i,n),l=0;l<10;l++){var s=Jx(o*80,n);if(o===s)break;if(GH(s,t,e,n,r,a))o=s;else break}return o}function Jx(t,e){return e&&t>Kx?t>Lc?t>pn*1.1?pn:t>Wx*1.1?Wx:Lc:t>qx?qx:t>Zx?Zx:Kx:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function GH(t,e,r,a,i,n){if(a&&t>Lc){var o=e1(e,i,n),l=e1(r,i,n),s=t===pn?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function e1(t,e,r){var a=e.c2d(t,pn,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var Sh=dt,gr=me,t1=Je,Qr=Dt,UH=xm,r1=HH,VH=OH,XH=jH,YH=BH;function WH(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=km(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",E=L?null:0,R=r1.count,N=VH[x],H=!1,F=function(te){return n.r2c(te,0,s)},$;for(gr.isArrayOrTypedArray(e[l])&&_!=="count"&&($=e[l],H=_==="avg",R=r1[_]),c=F(v.start),S=F(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(E),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:F(m.start),end:F(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,P=!0,I=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+=R(D,c,a,$,b),P&&w[D].length&&G!==h[w[D][0]]&&(P=!1),w[D].push(c),B[c]=D,I=Math.min(I,G-p[D]),j=Math.min(j,p[D+1]-G))}M.leftGap=I,M.rightGap=j;var O;P||(O=function(te,xe){return function(){var ue=t._fullLayout._roundFnOpts[A];return YH(ue.leftGap,ue.rightGap,p,n,s)(te,xe)}}),H&&(g=XH(a,b)),N&&N(a,g,y),f.enabled&&KH(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(Sh(r[c])&&Sh(a[c])){var Q={p:r[c],s:a[c],b:0};f.enabled||(Q.pts=w[c],P?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),UH(V,e),gr.isArrayOrTypedArray(e.selectedpoints)&&gr.tagSelected(V,e,B),V}function km(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 Sh(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),t1.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&&!t1.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=qH(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 E=e._input[n]||{},R=gr.extendFlat({},s),N=s.start,H=r.r2l(E.start),F=H!==void 0;if((s.startFound||F)&&H!==r.r2l(N)){var $=F?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:[$,Qr.tickIncrement($,s.size,!1,h)].map(r.l2r)},M=Qr.tickFirst(A);M>r.r2l($)&&(M=Qr.tickIncrement(M,s.size,!0,h)),R.start=r.l2r(M),F||gr.nestedProperty(e,n+".start").set(R.start)}var C=s.end,P=r.r2l(E.end),I=P!==void 0;if((s.endFound||I)&&P!==r.r2l(C)){var j=I?P:gr.aggNums(Math.max,null,d);R.end=r.l2r(j),I||gr.nestedProperty(e,n+".start").set(R.end)}var B="autobin"+a;return e._input[B]===!1&&(e._input[n]=gr.extendFlat({},e[n]||{}),delete e._input[B],delete e[B]),[R,d]}function qH(t,e,r,a,i){var n=t._fullLayout,o=ZH(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=km(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 ZH(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 KH(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 QH={calc:WH,calcAllAutoBins:km},JH=GA.hoverPoints,eO=Dt.hoverLabelText,tO=function(e,r,a,i,n){var o=JH(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"]=eO(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},rO=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},aO={attributes:VA,layoutAttributes:bm,supplyDefaults:EH,crossTraceDefaults:NH,supplyLayoutDefaults:_A,calc:QH.calc,crossTraceCalc:om.crossTraceCalc,plot:Tm.plot,layerName:"barlayer",style:xn.style,styleOnSelect:xn.styleOnSelect,colorbar:_s,hoverPoints:tO,selectPoints:UA,eventData:rO,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(" ")}},iO=aO;const i9=Ci(iO);var nO=la,oO=Ni.attributes,lO=vr,sO=xr,fO=mr.hovertemplateAttrs,cO=mr.texttemplateAttrs,Qn=Nt.extendFlat,uO=Hr.pattern,wl=lO({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),Tu={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:sO.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:uO,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({},nO.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:fO({},{keys:["label","color","value","percent","text"]}),texttemplate:cO({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:oO({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`."}}},vO=dt,jl=me,dO=Tu,hO=Ni.defaults,pO=bn.handleText,mO=me.coercePattern;function XA(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(vO(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function YA(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");mO(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 yO(t,e,r,a){function i(b,w){return jl.coerce(t,e,dO,b,w)}var n=i("labels"),o=i("values"),l=XA(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,YA(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");pO(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")}hO(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 WA={handleLabelsAndValues:XA,handleMarkerDefaults:YA,supplyDefaults:yO},qA={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(" ")}},gO=me,bO=qA,xO=function(e,r){function a(i,n){return gO.coerce(e,r,bO,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},_O=dt,Lh=oa,wO=ot,TO={};function kO(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=ZA(a["_"+e.type+"colormap"]),d=0,p=!1;for(c=0;c<s;c++){var m,y,b;if(f){if(m=l[c],!_O(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 ZA(t){return function(r,a){return!r||(r=Lh(r),!r.isValid())?!1:(r=wO.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function AO(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=KA(n,TO));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 KA(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(Lh(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(Lh(t[r]).darken(20).toHexString());e[a]=i}return i}var Cc={calc:kO,crossTraceCalc:AO,makePullColorFn:ZA,generateExtendedColors:KA},MO=sa.appendArrayMultiPointValues,SO=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]),MO(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},zr=ft,LO=Qt,wf=wa,QA=ot,qa=xt,ur=me,CO=ur.strScale,a1=ur.strTranslate,Ch=nr,JA=ri,DO=JA.recordMinTextSize,$O=JA.clearMinTextSize,eM=Ts.TEXTPAD,At=Ln,Tf=SO,i1=me.isValidTextValue;function PO(t,e){var r=t._context.staticPlot,a=t._fullLayout,i=a._size;$O("pie",a),aM(e,t),cM(e,i);var n=ur.makeTraceGroups(a._pielayer,e,"trace").each(function(o){var l=zr.select(this),s=o[0],f=s.trace;jO(o),l.attr("stroke-linejoin","round"),l.each(function(){var c=zr.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){zr.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=zr.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(tM,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,P){var I=P*(M[0]-A[0]),j=P*(M[1]-A[1]);return"a"+P*s.r+","+P*s.r+" 0 "+g.largeArc+(C?" 1 ":" 0 ")+I+","+j}var E=f.hole;if(g.v===s.vTotal){var R="M"+(_+g.px0[0])+","+(k+g.px0[1])+L(g.px0,g.pxmid,!0,1)+L(g.pxmid,g.px0,!0,1)+"Z";E?S.attr("d","M"+(_+E*g.px0[0])+","+(k+E*g.px0[1])+L(g.px0,g.pxmid,!1,E)+L(g.pxmid,g.px0,!1,E)+"Z"+R):S.attr("d",R)}else{var N=L(g.px0,g.px1,!0,1);if(E){var H=1-E;S.attr("d","M"+(_+E*g.px1[0])+","+(k+E*g.px1[1])+L(g.px1,g.px0,!1,E)+"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")}uM(t,g,s);var F=At.castOption(f.textposition,g.pts),$=T.selectAll("g.slicetext").data(g.text&&F!=="none"?[0]:[]);$.enter().append("g").classed("slicetext",!0),$.exit().remove(),$.each(function(){var A=ur.ensureSingle(zr.select(this),"text","",function(O){O.attr("data-notex",1)}),M=ur.ensureUniformFontSize(t,F==="outside"?RO(f,g,a.font):rM(f,g,a.font));A.text(g.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(qa.font,M).call(Ch.convertToTspans,t);var C=qa.bBox(A.node()),P;if(F==="outside")P=l1(C,g);else if(P=iM(C,g,s),F==="auto"&&P.scale<1){var I=ur.ensureUniformFontSize(t,f.outsidetextfont);A.call(qa.font,I),C=qa.bBox(A.node()),P=l1(C,g)}var j=P.textPosAngle,B=j===void 0?g.pxmid:Wf(s.r,j);if(P.targetX=_+B[0]*P.rCenter+(P.x||0),P.targetY=k+B[1]*P.rCenter+(P.y||0),vM(P,C),P.outside){var G=P.targetY;g.yLabelMin=G-C.height/2,g.yLabelMid=G,g.yLabelMax=G+C.height/2,g.labelExtraX=0,g.labelExtraY=0,v=!0}P.fontSize=M.size,DO(f.type,P,a),o[x].transform=P,ur.setTransormAndDisplay(A,P)})});var h=zr.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(zr.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(Ch.convertToTspans,t);var _;f.title.position==="middle center"?_=FO(s):_=sM(s,i),g.attr("transform",a1(_.x,_.y)+CO(Math.min(1,_.scale))+a1(_.tx,_.ty))}),v&&HO(u,f),EO(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;LO.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=zr.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function EO(t,e){t.each(function(r){var a=zr.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(QA.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function tM(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:zr.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],u=zr.select(this).datum();o._hasHoverEvent&&(s.originalEvent=zr.event,e.emit("plotly_unhover",{points:[Tf(u,c)],event:zr.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,zr.event))})}function RO(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 rM(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||QA.contrast(e.color),family:i,size:n}}function aM(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(Ch.convertToTspans,e),l=qa.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function iM(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(zO(e,T)){var D=Math.abs(T-e.startangle),L=Math.abs(T-e.stopangle),E=D<L?D:L;S==="tan"?m=o1(t,a,o,E,0):m=n1(t,a,o,E,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=n1(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,p.push(m)),(d||v)&&(m=o1(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 zO(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function n1(t,e,r,a,i){e=Math.max(0,e-2*eM);var n=t.width/t.height,o=lM(n,a,e,r);return{scale:o*2/t.height,rCenter:nM(n,o/e),rotate:oM(i)}}function o1(t,e,r,a,i){e=Math.max(0,e-2*eM);var n=t.height/t.width,o=lM(n,a,e,r);return{scale:o*2/t.width,rCenter:nM(n,o/e),rotate:oM(i+Math.PI/2)}}function nM(t,e){return Math.cos(e)-t*e}function oM(t){return(180/Math.PI*t+720)%180-90}function lM(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 IO(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function l1(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 FO(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 sM(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=fM(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=NO(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=Dh(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function NO(t,e){return t/(e===void 0?1:e)}function Dh(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 fM(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 HO(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,E,R,N,H;if(S*s>0&&(w.labelExtraY=S),!!ur.isArrayOrTypedArray(e.pull))for(L=0;L<u.length;L++)E=u[L],!(E===w||(At.castOption(e.pull,w.pts)||0)>=(At.castOption(e.pull,E.pts)||0))&&((w.pxmid[1]-E.pxmid[1])*s>0?(R=E.cyFinal+o(E.px0[1],E.px1[1]),S=R-_-w.labelExtraY,S*s>0&&(w.labelExtraY+=S)):(k+w.labelExtraY-T)*s>0&&(D=3*l*Math.abs(L-u.indexOf(w)),N=E.cxFinal+n(E.px0[0],E.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 cM(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-=Dh(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+fM(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-=Dh(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}OO(t,r)}function OO(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 jO(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=Wf(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=Wf(r,i),f.midangle=i,i+=n*f.v/2,c=Wf(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=IO(f,e))}function Wf(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function uM(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);i1(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);(i1(w)||w==="")&&(b.text=w),e.text=ur.texttemplateString(y,b,t._fullLayout._d3locale,b,i._meta||{})}}}function vM(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 dM={plot:PO,formatSliceLabel:uM,transformInsideText:iM,determineInsideTextFont:rM,positionTitleOutside:sM,prerenderTitles:aM,layoutAreas:cM,attachFxHandlers:tM,computeTransform:vM},s1=ft,BO=Tp,GO=ri.resizeText,UO=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");GO(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=s1.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){s1.select(this).call(BO,l,n,e)})})},hM={};(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)}})(hM);var VO={attributes:Tu,supplyDefaults:WA.supplyDefaults,supplyLayoutDefaults:xO,layoutAttributes:qA,calc:Cc.calc,crossTraceCalc:Cc.crossTraceCalc,plot:dM.plot,style:UO,styleOne:Tp,moduleType:"trace",name:"pie",basePlotModule:hM,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(" ")}},XO=VO;const n9=Ci(XO);var pM={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}},qf=me.extendFlat,Zf=Fi,f1=Xo.axisHoverFormat,$h=Hr.dash,YO=Ic,mM=pM,WO=mM.INCREASING.COLOR,qO=mM.DECREASING.COLOR,Dc=Zf.line;function c1(t){return{line:{color:qf({},Dc.color,{dflt:t}),width:Dc.width,dash:$h,editType:"style"},editType:"style"}}var yM={xperiod:Zf.xperiod,xperiod0:Zf.xperiod0,xperiodalignment:Zf.xperiodalignment,xhoverformat:f1("x"),yhoverformat:f1("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:qf({},Dc.width,{description:[Dc.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:qf({},$h,{description:[$h.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:c1(WO),decreasing:c1(qO),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:qf({},YO.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},ZO=Je,KO=me,QO=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=ZO.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,KO.minRowLength(n))),r._length=u,u}},JO=me,e7=QO,t7=mu,r7=yM,a7=function(e,r,a,i){function n(l,s){return JO.coerce(e,r,r7,l,s)}var o=e7(e,r,n,i);if(!o){r.visible=!1;return}t7(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),u1(e,r,n,"increasing"),u1(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function u1(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._,Kf=Dt,i7=yu,Tl=Yt.BADNUM;function n7(t,e){var r=Kf.getFromId(t,e.xaxis),a=Kf.getFromId(t,e.yaxis),i=l7(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=gM(t,e,o,l,a,o7);return e._extremes[r._id]=Kf.findExtremes(r,l,{vpad:n/2}),s.length?(ko.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function o7(t,e,r,a){return{o:t,h:e,l:r,c:a}}function gM(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]=Kf.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 l7(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=i7(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 s7={calc:n7,calcCommon:gM},f7=ft,v1=me,c7=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;v1.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=f7.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(v1.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})})},gd=ft,u7=xt,v7=ot,d7=function(e,r,a){var i=a||gd.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;gd.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;gd.select(this).style("fill","none").call(v7.stroke,s.color).call(u7.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},Ph=Dt,h7=me,Af=wa,p7=ot,m7=me.fillText,d1=pM,y7={increasing:d1.INCREASING.SYMBOL,decreasing:d1.DECREASING.SYMBOL};function g7(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?xM(t,e,r,a):_M(t,e,r,a)}function bM(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],E=D[c];return L===E||Af.inbox(L-r,E-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 p7.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 xM(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=bM(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]+Ph.hoverLabelText(n,g,o.yhoverformat)):(_=h7.extendFlat({},f),_.y0=_.y1=x,_.yLabelVal=g,_.yLabel=l.labels[w]+Ph.hoverLabelText(n,g,o.yhoverformat),_.name="",s.push(_),y[g]=_)}return s}function _M(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=bM(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]+Ph.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")+" "+y7[v]]:[];return b&&m7(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var b7={hoverPoints:g7,hoverSplit:xM,hoverOnPoints:_M},x7=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},_7={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:yM,supplyDefaults:a7,calc:s7.calc,plot:c7,style:d7,hoverPoints:b7.hoverPoints,selectPoints:x7},w7=_7;const o9=Ci(w7);var T7=Je,Yr=me,k7=Tk;function A7(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,E=h;if(a==="x"){var R=!!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),R){var H=l.c2p(o._xStarts[w]),F=l.c2p(o._xEnds[w]);T=u>=Math.min(H,F)&&u<=Math.max(H,F)?0:1/0}if(T<E){if(E=T,_=c[w],S=s.c2p(_)-v,N){var $=s.c2p(o._yStarts[w]),A=s.c2p(o._yEnds[w]);S=v>=Math.min($,A)&&v<=Math.max($,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<E&&(E=L=D,g=w);return t.index=g,t.distance=E,t.dxy=L,g===void 0?[t]:[wM(t,f,c,o)]}function wM(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:k7(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),T7.getComponentMethod("errorbars","hoverInfo")(f,a,k),k}var M7={hoverPoints:A7,calcHover:wM},TM={exports:{}},h1=20,ku={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:h1,SYMBOL_STROKE:h1/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]}},S7=la,It=Fi,p1=Xo.axisHoverFormat,m1=Sn,L7=Kh,bd=Nt.extendFlat,C7=za.overrideAll,D7=ku.DASHES,y1=It.line,Wa=It.marker,$7=Wa.line,xo=TM.exports=C7({x:It.x,x0:It.x0,dx:It.dx,y:It.y,y0:It.y0,dy:It.dy,xperiod:It.xperiod,yperiod:It.yperiod,xperiod0:It.xperiod0,yperiod0:It.yperiod0,xperiodalignment:It.xperiodalignment,yperiodalignment:It.yperiodalignment,xhoverformat:p1("x"),yhoverformat:p1("y"),text:It.text,hovertext:It.hovertext,textposition:It.textposition,textfont:It.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:y1.color,width:y1.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:L7(D7),dflt:"solid",description:"Sets the style of the lines."}},marker:bd({},m1("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:bd({},m1("marker.line"),{width:$7.width})}),connectgaps:It.connectgaps,fill:bd({},It.fill,{dflt:"none"}),fillcolor:It.fillcolor,selected:{marker:It.selected.marker,textfont:It.selected.textfont},unselected:{marker:It.unselected.marker,textfont:It.unselected.textfont},opacity:S7.opacity},"calc","nested");xo.x.editType=xo.y.editType=xo.x0.editType=xo.y0.editType="calc+clearAxisTypes";xo.hovertemplate=It.hovertemplate;xo.texttemplate=It.texttemplate;var kM=TM.exports,Au={},AM=ku;Au.isOpenSymbol=function(t){return typeof t=="string"?AM.OPEN_RE.test(t):t%200>100};Au.isDotSymbol=function(t){return typeof t=="string"?AM.DOT_RE.test(t):t>200};var g1=me,P7=Je,E7=Au,R7=kM,z7=hu,Mf=_r,I7=tm,F7=mu,N7=J2,H7=ek,O7=rk,j7=tk,B7=function(e,r,a,i){function n(h,d){return g1.coerce(e,r,R7,h,d)}var o=e.marker?E7.isOpenSymbol(e.marker.symbol):!1,l=Mf.isBubble(e),s=I7(e,r,i,n);if(!s){r.visible=!1;return}F7(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<z7.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Mf.hasMarkers(r)&&(N7(e,r,a,i,n,{noAngleRef:!0,noStandOff:!0}),n("marker.line.width",o||l?1:0)),Mf.hasLines(r)&&(n("connectgaps"),H7(e,r,a,i,n),n("line.shape")),Mf.hasText(r)&&(n("texttemplate"),j7(e,r,i,n));var c=(r.line||{}).color,u=(r.marker||{}).color;n("fill"),r.fill!=="none"&&O7(e,r,a,n);var v=P7.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),g1.coerceSelectionMarkerOpacity(r,n)},G7=wk,U7=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]),G7(e,r,a)},MM=dt,V7=oa,$c=v_,Pc=So,X7=xr.defaultLine,b1=Xt.isArrayOrTypedArray,Eh=$c(X7),SM=1;function x1(t,e){var r=t;return r[3]*=e,r}function _1(t){if(MM(t))return Eh;var e=$c(t);return e.length?e:Eh}function w1(t){return MM(t)?t:SM}function Y7(t,e,r){var a=t.color;a&&a._inputArray&&(a=a._inputArray);var i=b1(a),n=b1(e),o=Pc.extractOpts(t),l=[],s,f,c,u,v;if(o.colorscale!==void 0?s=Pc.makeColorScaleFuncFromTrace(t):s=_1,i?f=function(d,p){return d[p]===void 0?Eh:$c(s(d[p]))}:f=_1,n?c=function(d,p){return d[p]===void 0?SM:w1(d[p])}:c=w1,i||n)for(var h=0;h<r;h++)u=f(a,h),v=c(e,h),l[h]=x1(u,v);else l=x1($c(a),e);return l}function W7(t){var e=Pc.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=Pc.flipScale(e.colorscale)),r.map(function(a){var i=a[0],n=V7(a[1]),o=n.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}var q7={formatColor:Y7,parseColorScale:W7},Qf=dt,Z7=tS,Sf=v_,K7=Je,No=me,Ut=No.isArrayOrTypedArray,co=xt,T1=Wt,k1=q7.formatColor,Ao=_r,Q7=jw,Rh=Au,As=ku,J7=us.DESELECTDIM,A1={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},ej=sa.appendArrayPointValue;function tj(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=LM(t,e),a.textSel=M1(t,e,e.selected),a.textUnsel=M1(t,e,e.unselected)),Ao.hasMarkers(e)&&(a.marker=Am(t,e),a.markerSel=zh(t,e,e.selected),a.markerUnsel=zh(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]=J7*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=S1(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=S1(e,e.error_y,i)),e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function LM(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={};ej(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)?Qf(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 Am(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=Rh.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=k1(a,a.opacity,r),y=k1(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=Rh.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]=D1({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=D1({mx:a.symbol,ma:a.angle},e);var _=1,k=Q7(e,_),T;if(u||v){var S=i.sizes=new Array(r),D=i.borderSizes=new Array(r),L=0,E;if(u){for(n=0;n<r;n++)S[n]=k(a.size[n]),L+=S[n];E=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=E}else i.size=k(a&&a.size||10),i.borderSizes=k(a.line.width);return i}function zh(t,e,r){var a=e.marker,i={};return r&&(r.marker&&r.marker.symbol?i=Am(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 M1(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=LM(t,i)}return a}function S1(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 L1=As.SYMBOL_SDF_SIZE,tn=As.SYMBOL_SIZE,C1=As.SYMBOL_STROKE,xd={},rj=co.symbolFuncs[0](tn*.05);function D1(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=Rh.isDotSymbol(r);if(t.ma&&(r+="_"+t.ma),xd[r])return xd[r];var c=co.getMarkerAngle(t,e);return f&&!l?a=o(tn*1.1,c)+rj:a=o(tn,c),i=Z7(a,{w:L1,h:L1,viewBox:[-tn,-tn,tn,tn],stroke:s?C1:-C1}),xd[r]=i,i||null}function aj(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 ij(t,e,r,a,i){var n=K7.getComponentMethod("errorbars","makeComputeError"),o=T1.getFromId(t,e.xaxis,"x"),l=T1.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(Qf(k)){var T=r[x*2+m],S=p(k,x),D=S[0],L=S[1];if(Qf(D)&&Qf(L)){var E=k-D,R=k+L;b[_+y[0]]=T-v.c2l(E),b[_+y[1]]=v.c2l(R)-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 nj(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=A1[v],p=A1[h],m=c?c/.8+1:0,y=-p*m-p*.5;n.offset[o]=[d*m/u,y/u]}}return n}var oj={style:tj,markerStyle:Am,markerSelection:zh,linePositions:aj,errorBarPositions:ij,textPosition:nj},Lf=me,lj=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},sj=rS,Jn=me,$1=Wt,fj=ms.findExtremes,P1=yu,Mm=im,cj=Mm.calcMarkerSize,uj=Mm.calcAxisExpansion,vj=Mm.setFirstScatter,dj=nk,eo=oj,hj=lj,E1=Yt.BADNUM,pj=ku.TOO_MANY_POINTS,mj=function(e,r){var a=e._fullLayout,i=r._xA=$1.getFromId(e,r.xaxis,"x"),n=r._yA=$1.getFromId(e,r.yaxis,"y"),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=pj,f=l*2,c={},u,v=i.makeCalcdata(r,"x"),h=n.makeCalcdata(r,"y"),d=P1(r,i,"x",v),p=P1(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]===E1?NaN:m[u],b[u*2+1]=y[u]===E1?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=sj(b):c.ids=w,dj(e,r);var g=yj(e,o,r,b,m,y),x=hj(e,o);vj(a,r);var _;return s?g.marker&&(_=g.marker.sizeAvg||Math.max(g.marker.size,3)):_=cj(r,l),uj(e,r,i,n,m,y,_),g.errorX&&R1(r,i,g.errorX),g.errorY&&R1(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 R1(t,e,r){var a=t._extremes[e._id],i=fj(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function yj(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 z1=me,gj=ot,bj=us.DESELECTDIM;function xj(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=z1.extendFlat({},s),v,h;if(o.length||l.length){var d=f.color,p=c.color,m=s.color,y=z1.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:gj.addOpacity(b,bj))}}i.glText[n].update(u)}var CM={styleTextSelection:xj},I1=_r,_j=CM.styleTextSelection,wj=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=I1.hasText(l),p=I1.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&&_j(a),o},Tj=M7,kj={moduleType:"trace",name:"scattergl",basePlotModule:Jt,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:kM,supplyDefaults:B7,crossTraceDefaults:ak,colorbar:_s,formatLabels:U7,calc:mj,hoverPoints:Tj.hoverPoints,selectPoints:wj,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(" ")}},DM={exports:{}},F1=ot,Aj=function(){},Mj=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=Aj);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=F1.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=F1.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},Sj=Mj,Lj=aS,Cj=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=Lj({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||XM.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||Sj({container:i._glcontainer.node()}),n},N1=iS,H1=nS,Dj=oS,O1=lS,_d=me,$j=Cn.selectMode,Pj=Cj,Ej=_r,Rj=xk,zj=CM.styleTextSelection,$M={};function Ij(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 Fj=DM.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=Pj(e,["ANGLE_instanced_arrays","OES_element_index_uint"],$M);if(!c){n.init();return}var u=n.count,v=i._glcanvas.data()[0].regl;if(Rj(e,r,a),n.dirty){if((n.line2d||n.error2d)&&!(n.scatter2d||n.fill2d||n.glText)&&v.clear({}),n.error2d===!0&&(n.error2d=Dj(v)),n.line2d===!0&&(n.line2d=H1(v)),n.scatter2d===!0&&(n.scatter2d=N1(v)),n.fill2d===!0&&(n.fill2d=H1(v)),n.glText===!0)for(n.glText=new Array(u),s=0;s<u;s++)n.glText[s]=new O1(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 O1(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,P=0;P<C.length&&(isNaN(C[P])||isNaN(C[P+1]));)P+=2;for(var I=C.length-2;I>P&&(isNaN(C[I])||isNaN(C[I+1]));)I-=2;M.positions=C.slice(P,I+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=_d.repeat(null,u),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(M,C){var P=a[C];if(!(!M||!P||!P[0]||!P[0].trace)){var I=P[0],j=I.trace,B=I.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 ge=n.lineOptions[C-1].positions,Te=Z.length/2;O=Te;var Le=[O];for(W=0;W<ge.length;W+=2)(isNaN(ge[W])||isNaN(ge[W+1]))&&(Le.push(W/2+Te+1),O=W+2);Z=Z.concat(ge),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=$j(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]=_d.selIndices2selPoints(x),E={};for(f=0;f<L.length;f++)E[L[f]]=1;var R=[];for(f=0;f<T;f++)E[f]||R.push(f);n.unselectBatch[k]=R}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=N1(i._glcanvas.data()[1].regl)),n.scatter2d){var F=new Array(u);for(s=0;s<u;s++)F[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update(F)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(M){var C=((M||[])[0]||{}).trace||{};Ej.hasText(C)&&zj(M)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var $={viewport:Ij(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=_d.repeat($,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($)})}}};Fj.reglPrecompiled=$M;var Nj=DM.exports,PM=kj;PM.plot=Nj;var Hj=PM,Oj=Hj;const l9=Ci(Oj);var EM={};(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)}})(EM);var RM={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},jj=la,Bj=mr.hovertemplateAttrs,Gj=mr.texttemplateAttrs,Uj=Sn,Vj=Ni.attributes,Xa=Tu,j1=RM,kl=Nt.extendFlat,Xj=Hr.pattern,Yj={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:Xj,editType:"calc"},Uj("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},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:Gj({editType:"plot"},{keys:j1.eventDataKeys.concat(["label","value"])}),hovertext:Xa.hovertext,hoverinfo:kl({},jj.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:Bj({},{keys:j1.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(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].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:Vj({name:"sunburst",trace:!0,editType:"calc"})},Mu={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},Wj=mr.hovertemplateAttrs,qj=mr.texttemplateAttrs,Zj=Sn,Kj=Ni.attributes,Qi=Tu,Wr=Yj,B1=Mu,wd=Nt.extendFlat,Qj=Hr.pattern,zM={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:wd({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:Qj,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"},Zj("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:wd({},Qi.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Qi.text,textinfo:Wr.textinfo,texttemplate:qj({editType:"plot"},{keys:B1.eventDataKeys.concat(["label","value"])}),hovertext:Qi.hovertext,hoverinfo:Wr.hoverinfo,hovertemplate:Wj({},{keys:B1.eventDataKeys}),textfont:Qi.textfont,insidetextfont:Qi.insidetextfont,outsidetextfont:wd({},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:Kj({name:"treemap",trace:!0,editType:"calc"})},IM={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(" ")}},G1=me,Jj=zM,eB=ot,tB=Ni.defaults,rB=bn.handleText,aB=Ts.TEXTPAD,iB=WA.handleMarkerDefaults,FM=So,nB=FM.hasColorscale,oB=FM.handleDefaults,lB=function(e,r,a,i){function n(m,y){return G1.coerce(e,r,Jj,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",G1.isArrayOrTypedArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var u=n("pathbar.visible"),v="auto";rB(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;iB(e,r,i,n);var d=r._hasColorscale=nB(e,"marker","colors")||(e.marker||{}).coloraxis;d?oB(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:eB.contrast(i.paper_bgcolor)}}},u&&(n("pathbar.thickness",r.pathbar.textfont.size+2*aB),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),tB(r,i,n),r._length=null},sB=me,fB=IM,cB=function(e,r){function a(i,n){return sB.coerce(e,r,fB,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},Ec={},NM={};(function(t){var e=Fh,r=dt,a=me,i=So.makeColorScaleFuncFromTrace,n=Cc.makePullColorFn,o=Cc.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},E,R,N;y?(E=Math.min(m.length,w.length),R=function(X){return D(m[X])&&L(X)},N=function(X){return String(m[X])}):(E=Math.min(b.length,w.length),R=function(X){return D(b[X])&&L(X)},N=function(X){return String(b[X])}),x&&(E=Math.min(E,g.length));for(var H=0;H<E;H++)if(R(H)){var F=N(H),$=D(w[H])?String(w[H]):"",A={i:H,id:F,pid:$,label:D(b[H])?String(b[H]):""};x&&(A.v=+g[H]),_.push(A),S($,F)}if(k[""]){if(k[""].length>1){for(var P=a.randstr(),I=0;I<_.length;I++)_[I].pid===""&&(_[I].pid=P);_.unshift({hasMultipleRoots:!0,id:P,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}})(NM);var HM=NM;Ec.calc=function(t,e){return HM.calc(t,e)};Ec.crossTraceCalc=function(t){return HM._runCrossTraceCalc("treemap",t)};var Hi={};(function(t){var e=me,r=ot,a=Ri,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 uB=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=Fh,vB=uB,OM=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(dB(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)&&vB(v,r,{swapXY:o,flipX:i,flipY:n}),v};function dB(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 hB=xt,pB=ot,jM=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),hB.pointStyle(e,a,i,r)}else pB.fill(e,s)},U1=ft,to=ot,V1=me,Td=Hi,mB=ri.resizeText,yB=jM;function gB(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");mB(t,e,"treemap"),e.each(function(r){var a=U1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){U1.select(this).call(BM,o,n,t,{hovered:!1})})})}function BM(t,e,r,a,i){var n=(i||{}).hovered,o=e.data.data,l=o.i,s,f,c=o.color,u=Td.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=V1.castOption(r,l,"marker.line.color")||to.defaultLine,f=V1.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=Td.getMaxDepth(r);isFinite(m)?Td.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(yB,e,r,a,c).style("stroke-width",f).call(to.stroke,s).style("opacity",v)}var Sm={style:gB,styleOne:BM},ro=ft,X1=Je,bB=sa.appendArrayPointValue,Al=wa,Y1=me,xB=ds,er=Hi,_B=Ln,wB=_B.formatPieValue,Lm=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 Y1.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,E;f&&(L=o.cx+d.pxmid[0]*(1-d.rInscribed),E=o.cy+d.pxmid[1]*(1-d.rInscribed)),c&&(L=d._hoverX,E=d._hoverY);var R={},N=[],H=[],F=function(j){return N.indexOf(j)!==-1};T&&(N=T==="all"?m._module.attributes.hoverinfo.flags:T.split("+")),R.label=y.label,F("label")&&R.label&&H.push(R.label),y.hasOwnProperty("v")&&(R.value=y.v,R.valueLabel=wB(R.value,S),F("value")&&H.push(R.valueLabel)),R.currentPath=d.currentPath=er.getPath(d.data),F("current path")&&!w&&H.push(R.currentPath);var $,A=[],M=function(){A.indexOf($)===-1&&(H.push($),A.push($))};R.percentParent=d.percentParent=x/er.getValue(g),R.parent=d.parentString=er.getPtLabel(g),F("percent parent")&&($=er.formatPercent(R.percentParent,S)+" of "+R.parent,M()),R.percentEntry=d.percentEntry=x/er.getValue(r),R.entry=d.entry=er.getPtLabel(r),F("percent entry")&&!w&&!d.onPathbar&&($=er.formatPercent(R.percentEntry,S)+" of "+R.entry,M()),R.percentRoot=d.percentRoot=x/er.getValue(s),R.root=d.root=er.getPtLabel(s),F("percent root")&&!w&&($=er.formatPercent(R.percentRoot,S)+" of "+R.root,M()),R.text=_("hovertext")||_("text"),F("text")&&($=R.text,Y1.isValidTextValue($)&&H.push($)),D=[Ml(d,m,n.eventDataKeys)];var C={trace:m,y:E,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:H.join("<br>"),name:k||F("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:R,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 P=[];Al.loneHover(C,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:P}),D[0].bbox=P[0],l._hasHoverLabel=!0}if(c){var I=e.select("path.surface");n.styleOne(I,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 _=xB.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){X1.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()),X1.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),bB(i,e,a.i),i}var W1=ft,Cf=me,q1=xt,TB=nr,kB=OM,Z1=Sm.styleOne,kd=Mu,ao=Hi,AB=Lm,Ad=!0,MB=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=kB(k.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();D=D.filter(function(E){var R=S.indexOf(E.data.id);return R===-1?!1:(E.x0=T*R,E.x1=T*(R+1),E.y0=o,E.y1=o+s,E.onPathbar=!0,!0)}),D.reverse(),i=i.data(D,ao.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,Ad,b,[l,s],u),i.order();var L=i;d&&(L=L.transition().each("end",function(){var E=W1.select(this);ao.setSliceCursor(E,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),L.each(function(E){E._x0=f(E.x0),E._x1=f(E.x1),E._y0=c(E.y0),E._y1=c(E.y1),E._hoverX=f(E.x1-Math.min(l,s)/2),E._hoverY=c(E.y1-s/2);var R=W1.select(this),N=Cf.ensureSingle(R,"path","surface",function(A){A.style("pointer-events",w?"none":"all")});d?N.transition().attrTween("d",function(A){var M=m(A,Ad,b,[l,s]);return function(C){return u(M(C))}}):N.attr("d",u),R.call(AB,a,e,r,{styleOne:Z1,eventDataKeys:kd.eventDataKeys,transitionTime:kd.CLICK_TRANSITION_TIME,transitionEasing:kd.CLICK_TRANSITION_EASING}).call(ao.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),N.call(Z1,E,_,e,{hovered:!1}),E._text=(ao.getPtLabel(E)||"").split("<br>").join(" ")||"";var H=Cf.ensureSingle(R,"g","slicetext"),F=Cf.ensureSingle(H,"text","",function(A){A.attr("data-notex",1)}),$=Cf.ensureUniformFontSize(e,ao.determineTextFont(_,E,g.font,{onPathbar:!0}));F.text(E._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(q1.font,$).call(TB.convertToTspans,e),E.textBB=q1.bBox(F.node()),E.transform=v(E,{fontSize:$.size,onPathbar:!0}),E.transform.fontSize=$.size,d?F.transition().attrTween("transform",function(A){var M=y(A,Ad,b,[l,s]);return function(C){return h(M(C))}}):F.attr("transform",h(E))})},K1=ft,Md=d_.interpolate,gi=Hi,Sl=me,Q1=Ts.TEXTPAD,SB=Tm,LB=SB.toMoveInsideBar,CB=ri,Sd=CB.recordMinTextSize,DB=Mu,$B=MB;function Ji(t){return gi.isHierarchyRoot(t)?"":gi.getPtId(t)}var PB=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=K1.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+DB.gapWithPathbar,L=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?k+D:-(S+D):0,E={x0:T,x1:T,y0:L,y1:L+S},R=function(K,ke,re){var pe=s.tiling.pad,we=function(be){return be-pe<=ke.x0},se=function(be){return be+pe>=ke.x1},ie=function(be){return be-pe<=ke.y0},fe=function(be){return be+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={},F={},$=null,A=function(K,ke){return ke?H[Ji(K)]:F[Ji(K)]},M=function(K,ke,re,pe){if(ke)return H[Ji(u)]||E;var we=F[s.level]||re;return w(K)?R(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,P=-k/2+g.t+g.h*(1-(x.y[1]+x.y[0])/2),I=function(K){return C+K},j=function(K){return P+K},B=j(0),G=I(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 be={x:ke,y:pe},Me={x:re,y:pe},Se={x:re,y:we},$e={x:ke,y:we};return Q===">"?(be.x-=se,Me.x-=se,Se.x-=se,$e.x-=se):Q==="/"?(Se.x-=se,$e.x-=se,ie.x-=se/2,fe.x-=se/2):Q==="\\"?(be.x-=se,Me.x-=se,ie.x-=se/2,fe.x-=se/2):Q==="<"&&(ie.x-=se,fe.x-=se),X(be),X($e),X(ie),X(Me),X(Se),X(fe),"M"+V(be.x,be.y)+"L"+V(Me.x,Me.y)+"L"+V(fe.x,fe.y)+"L"+V(Se.x,Se.y)+"L"+V($e.x,$e.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"),ge=ue("bottom"),Te=function(K){var ke=I(K.x0),re=I(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,be=Math.min(fe,se/2,ie/2);be&&K.data&&K.data.data&&K.data.data.label&&(ae&&(be=Math.min(be,xe.t)),le&&(be=Math.min(be,xe.l)),de&&(be=Math.min(be,xe.r)),ge&&(be=Math.min(be,xe.b)));var Me=function(Se,$e){return be?"a"+V(be,be)+" 0 0 1 "+V(Se,$e):""};return"M"+V(ke,pe+be)+Me(be,-be)+"L"+V(re-be,pe)+Me(be,be)+"L"+V(re,we-be)+Me(-be,be)+"L"+V(ke+be,we)+Me(-be,-be)+"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&&!ge,be=fe?"start":ge?"end":"middle",Me=ue("right"),Se=ue("left")||ke.onPathbar,$e=Se?-1:Me?1:0;if(ke.isHeader){if(re+=(c?xe:xe.l)-Q1,pe-=(c?xe:xe.r)-Q1,re>=pe){var He=(re+pe)/2;re=He,pe=He}var Oe;ge?(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=LB(re,pe,we,se,ie,{isHorizontal:!1,constrained:!0,angle:0,anchor:be,leftToRight:$e});return ve.fontSize=ke.fontSize,ve.targetX=I(ve.targetX),ve.targetY=j(ve.targetY),isNaN(ve.targetX)||isNaN(ve.targetY)?{}:(re!==pe&&we!==se&&Sd(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||{}},ze=function(K,ke,re,pe){var we=A(K,ke),se;if(ke)se=E;else{var ie=A(v,ke);ie?se=R(K,ie,pe):se={}}return Md(we,se)},ce=function(K,ke,re,pe,we){var se=A(K,ke),ie;if(se)ie=se;else if(ke)ie=E;else if(N)if(K.parent){var fe=$||re;fe&&!ke?ie=R(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 Md(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&&Sd(s.type,fe,o),Md(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}})},Pe=function(K,ke,re,pe,we){var se=pe[0],ie=pe[1];y?K.exit().transition().each(function(){var fe=K1.select(this),be=fe.select("path.surface");be.transition().attrTween("d",function(Se){var $e=ze(Se,ke,re,[se,ie]);return function(He){return we($e(He))}});var Me=fe.select("g.slicetext");Me.attr("opacity",0)}).remove():K.exit().remove()},Re=function(K){var ke=K.transform;return K.x0!==K.x1&&K.y0!==K.y1&&Sd(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){F[Ji(K)]={x0:K.x0,x1:K.x1,y0:K.y0,y1:K.y1},K.transform&&(F[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)})),$=n(e,r,v,p,{width:_,height:k,viewX:I,viewY:j,pathSlice:Te,toMoveInsideSlice:Le,prevEntry:N,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ye,handleSlicesExit:Pe,hasTransition:y,strTransform:Re}),s.pathbar.visible?$B(e,r,v,d,{barDifY:L,width:T,height:S,viewX:O,viewY:W,pathSlice:te,toMoveInsideSlice:Le,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ye,handleSlicesExit:Pe,hasTransition:y,strTransform:Re}):d.remove()},EB=ft,RB=Hi,zB=ri,IB=zB.clearMinTextSize,FB=xn.resizeText,J1=PB,NB=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(IB(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&&RB.hasTransition(a)){i&&(u=i());var h=EB.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){J1(e,d,this,a,l)})})}else c.each(function(d){J1(e,d,this,a,l)}),s.uniformtext.mode&&FB(e,f.selectAll(".trace"),o);v&&c.exit().remove()},GM={},e_=ft,t_=ot,r_=me,HB=ri.resizeText,OB=jM;function jB(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");HB(t,e,"sunburst"),e.each(function(r){var a=e_.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){e_.select(this).call(UM,o,n,t)})})}function UM(t,e,r,a){var i=e.data.data,n=!e.children,o=i.i,l=r_.castOption(r,o,"marker.line.color")||t_.defaultLine,s=r_.castOption(r,o,"marker.line.width")||0;t.call(OB,e,r,a).style("stroke-width",s).call(t_.stroke,l).style("opacity",n?r.leaf.opacity:null)}var BB={style:jB,styleOne:UM};(function(t){var e=ft,r=Fh,a=d_.interpolate,i=xt,n=me,o=nr,l=ri,s=l.recordMinTextSize,f=l.clearMinTextSize,c=dM,u=Ln.getRotationAngle,v=c.computeTransform,h=c.transformInsideText,d=BB.styleOne,p=xn.resizeText,m=Lm,y=RM,b=Hi;t.plot=function(T,S,D,L){var E=T._fullLayout,R=E._sunburstlayer,N,H,F=!D,$=!E.uniformtext.mode&&b.hasTransition(D);if(f("sunburst",E),N=R.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(),$){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(){R.selectAll("g.trace").each(function(M){w(T,M,this,D)})})}else N.each(function(M){w(T,M,this,D)}),E.uniformtext.mode&&p(T,E._sunburstlayer.selectAll(".trace"),"sunburst");F&&N.exit().remove()};function w(T,S,D,L){var E=T._context.staticPlot,R=T._fullLayout,N=!R.uniformtext.mode&&b.hasTransition(L),H=e.select(D),F=H.selectAll("g.slice"),$=S[0],A=$.trace,M=$.hierarchy,C=b.findEntryWithLevel(M,A.level),P=b.getMaxDepth(A),I=R._size,j=A.domain,B=I.w*(j.x[1]-j.x[0]),G=I.h*(j.y[1]-j.y[0]),O=.5*Math.min(B,G),W=$.cx=I.l+I.w*(j.x[1]+j.x[0])/2,V=$.cy=I.t+I.h*(1-j.y[0])-G/2;if(!C)return F.remove();var Z=null,X={};N&&F.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=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,P),de=function(re){return(re-xe)/le*O},ge=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)};F=F.data(Q,b.getPtId),F.enter().append("g").classed("slice",!0),N?F.exit().transition().each(function(){var re=e.select(this),pe=re.select("path.surface");pe.transition().attrTween("d",function(se){var ie=Pe(se);return function(fe){return Te(ie(fe))}});var we=re.select("g.slicetext");we.attr("opacity",0)}).remove():F.exit().remove(),F.order();var ze=null;if(N&&Z){var ce=b.getPtId(Z);F.each(function(re){ze===null&&b.getPtId(re)===ce&&(ze=re.x1)})}var ye=F;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",E?"none":"all")});re.rpx0=de(re.y0),re.rpx1=de(re.y1),re.xmid=(re.x0+re.x1)/2,re.pxmid=ge(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 $e=Re(Se);return function(He){return Te($e(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,R.font));ie.text(t.formatSliceLabel(re,C,A,S,R)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,fe).call(o.convertToTspans,T);var be=i.bBox(ie.node());re.transform=h(be,re,$),re.transform.targetX=Le(re),re.transform.targetY=_e(re);var Me=function(Se,$e){var He=Se.transform;return v(He,$e),He.fontSize=fe.size,s(A.type,He,R),n.getTextTransform(He)};N?ie.transition().attrTween("transform",function(Se){var $e=K(Se);return function(He){return Me($e(He),be)}}):ie.attr("transform",Me(re,be))});function Pe(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 be,Me=b.getPtId(re.parent);F.each(function(ve){if(b.getPtId(ve)===Me)return be=ve});var Se=be.children,$e;Se.forEach(function(ve,Be){if(b.getPtId(ve)===pe)return $e=Be});var He=Se.length,Oe=a(be.x0,be.x1);ie={rpx0:O,rpx1:O,x0:Oe($e/He),x1:Oe(($e+1)/He)}}return a(we,ie)}function Re(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(ze){var ie=(re.x1>ze?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(ze){var ie=re.x1>ze?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),be=a(we.rpx1,re.rpx1),Me=a(we.x0,re.x0),Se=a(we.x1,re.x1),$e=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=be(Ne),Ge=Me(Ne),Ve=Se(Ne),Ue=Be(Ne),z=ge(We,(Ge+Ve)/2),Y=fe(Ne),U={pxmid:z,rpx1:We,transform:{textPosAngle:Y,rCenter:Ue,x:se.x,y:se.y}};return s(A.type,se,R),{transform:{targetX:Le(U),targetY:_e(U),scale:$e(Ne),rotate:He(Ne),rCenter:Ue}}}}function ke(re){var pe=re.parent,we=X[b.getPtId(pe)],se={};if(we){var ie=pe.children,fe=ie.indexOf(re),be=ie.length,Me=a(we.x0,we.x1);se.x0=Me(fe/be),se.x1=Me(fe/be)}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,E){var R=D.texttemplate,N=D.textinfo;if(!R&&(!N||N==="none"))return"";var H=E.separators,F=L[0],$=T.data.data,A=F.hierarchy,M=b.isHierarchyRoot(T),C=b.getParent(A,T),P=b.getValue(T);if(!R){var I=N.split("+"),j=function(xe){return I.indexOf(xe)!==-1},B=[],G;if(j("label")&&$.label&&B.push($.label),$.hasOwnProperty("v")&&j("value")&&B.push(b.formatValue($.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=P/b.getValue(C),Z("parent")),j("percent entry")&&(V=P/b.getValue(S),Z("entry")),j("percent root")&&(V=P/b.getValue(A),Z("root"))}}return j("text")&&(G=n.castOption(D,$.i,"text"),n.isValidTextValue(G)&&B.push(G)),B.join("<br>")}var X=n.castOption(D,$.i,"texttemplate");if(!X)return"";var Q={};$.label&&(Q.label=$.label),$.hasOwnProperty("v")&&(Q.value=$.v,Q.valueLabel=b.formatValue($.v,H)),Q.currentPath=b.getPath(T.data),M||(Q.percentParent=P/b.getValue(C),Q.percentParentLabel=b.formatPercent(Q.percentParent,H),Q.parent=b.getPtLabel(C)),Q.percentEntry=P/b.getValue(S),Q.percentEntryLabel=b.formatPercent(Q.percentEntry,H),Q.entry=b.getPtLabel(S),Q.percentRoot=P/b.getValue(A),Q.percentRootLabel=b.formatPercent(Q.percentRoot,H),Q.root=b.getPtLabel(A),$.hasOwnProperty("color")&&(Q.color=$.color);var te=n.castOption(D,$.i,"text");return(n.isValidTextValue(te)||te==="")&&(Q.text=te),Q.customdata=n.castOption(D,$.i,"customdata"),n.texttemplateString(X,Q,E._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)]}})(GM);var a_=ft,Df=me,i_=xt,GB=nr,UB=OM,n_=Sm.styleOne,Ld=Mu,vi=Hi,VB=Lm,XB=GM.formatSliceLabel,Cd=!1,YB=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=UB(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}}),E=L.descendants(),R=1/0,N=-1/0;E.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):(R=Math.min(R,C),N=Math.max(N,C))}),i=i.data(E,vi.getPtId),_._maxVisibleLayers=isFinite(N)?N-R+1:0,i.enter().append("g").classed("slice",!0),d(i,Cd,b,[o,l],c),i.order();var H=null;if(h&&y){var F=vi.getPtId(y);i.each(function(M){H===null&&vi.getPtId(M)===F&&(H={x0:M.x0,x1:M.x1,y0:M.y0,y1:M.y1})})}var $=function(){return H||{x0:0,x1:o,y0:0,y1:l}},A=i;return h&&(A=A.transition().each("end",function(){var M=a_.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 P=a_.select(this),I=Df.ensureSingle(P,"path","surface",function(O){O.style("pointer-events",w?"none":"all")});h?I.transition().attrTween("d",function(O){var W=p(O,Cd,$(),[o,l]);return function(V){return c(W(V))}}):I.attr("d",c),P.call(VB,a,e,r,{styleOne:n_,eventDataKeys:Ld.eventDataKeys,transitionTime:Ld.CLICK_TRANSITION_TIME,transitionEasing:Ld.CLICK_TRANSITION_EASING}).call(vi.setSliceCursor,e,{isTransitioning:e._transitioning}),I.call(n_,M,_,e,{hovered:!1}),M.x0===M.x1||M.y0===M.y1?M._text="":C?M._text=D?"":vi.getPtLabel(M)||"":M._text=XB(M,a,_,r,g)||"";var j=Df.ensureSingle(P,"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(i_.font,G).call(GB.convertToTspans,e),M.textBB=i_.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,Cd,$(),[o,l]);return function(V){return v(W(V))}}):B.attr("transform",v(M))}),H},WB=NB,qB=YB,ZB=function(e,r,a,i){return WB(e,r,a,i,{type:"treemap",drawDescendants:qB})},KB={moduleType:"trace",name:"treemap",basePlotModule:EM,categories:[],animatable:!0,attributes:zM,layoutAttributes:IM,supplyDefaults:lB,supplyLayoutDefaults:cB,calc:Ec.calc,crossTraceCalc:Ec.crossTraceCalc,plot:ZB,style:Sm.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(" ")}},QB=KB;const s9=Ci(QB);export{r9 as P,a9 as b,t9 as c,i9 as h,o9 as o,n9 as p,l9 as s,s9 as t};
7
+ //# sourceMappingURL=plotly-Bi-TI-TG.js.map