@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
@@ -1,7 +0,0 @@
1
- import{g as Hi,c as bM}from"./helpers-BosuxZz1.js";import{r as xM,p as _M,a as G1,f as wt,t as wa,d as gt,g as U1,b as Gl,i as wM,c as V1,e as Dh,h as X1,m as TM,j as Y1,k as W1,l as kM,n as AM,o as MM,q as SM,s as q1,u as LM,v as CM,w as DM,x as $M,y as PM,z as EM,A as RM,B as $h,C as Z1}from"./vendor-CiEcCTfT.js";var K1={};(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=b;var r=o(xM),a=i(_M);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 C in x)if(C!=="default"&&Object.prototype.hasOwnProperty.call(x,C)){var L=S?Object.getOwnPropertyDescriptor(x,C):null;L&&(L.get||L.set)?Object.defineProperty(T,C,L):T[C]=x[C]}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 C=m(this).constructor;S=Reflect.construct(T,arguments,C)}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"],g=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],w=typeof window<"u";function b(x){var _=function(k){c(S,k);var T=v(S);function S(C){var L;return l(this,S),L=T.call(this,C),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||g.forEach(function(E){L.el.on(E,L.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var L=this;!this.el||!this.el.removeListener||g.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"}},_}})(K1);const sB=Hi(K1);var Q1={},Dc={};Dc.version="2.29.1";var J1={exports:{}},lr={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:"−"},or={},Sn=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")},zM=G1.decode,IM=Sn,Ph=Array.isArray,FM=ArrayBuffer,NM=DataView;function e_(t){return FM.isView(t)&&!(t instanceof NM)}or.isTypedArray=e_;function qf(t){return Ph(t)||e_(t)}or.isArrayOrTypedArray=qf;function HM(t){return!qf(t[0])}or.isArray1D=HM;or.ensureArray=function(t,e){return Ph(t)||(t=[]),t.length=e,t};var Mr={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};Mr.uint8c=Mr.u1c;Mr.uint8=Mr.u1;Mr.int8=Mr.i1;Mr.uint16=Mr.u2;Mr.int16=Mr.i2;Mr.uint32=Mr.u4;Mr.int32=Mr.i4;Mr.float32=Mr.f4;Mr.float64=Mr.f8;function Eh(t){return t.constructor===ArrayBuffer}or.isArrayBuffer=Eh;or.decodeTypedArraySpec=function(t){var e=[],r=OM(t),a=r.dtype,i=Mr[a];if(!i)throw new Error('Error in dtype: "'+a+'"');var n=i.BYTES_PER_ELEMENT,o=r.bdata;Eh(o)||(o=zM(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};or.isTypedArraySpec=function(t){return IM(t)&&t.hasOwnProperty("dtype")&&typeof t.dtype=="string"&&t.hasOwnProperty("bdata")&&(typeof t.bdata=="string"||Eh(t.bdata))&&(t.shape===void 0||t.hasOwnProperty("shape")&&(typeof t.shape=="string"||typeof t.shape=="number"))};function OM(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}or.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),Ph(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};or.maxRowLength=function(t){return t_(t,Math.max,0)};or.minRowLength=function(t){return t_(t,Math.min,1/0)};function t_(t,e,r){if(qf(t))if(qf(t[0])){for(var a=r,i=0;i<t.length;i++)a=e(a,t[i].length);return a}else return t.length;return 0}var r_=wt,Rh=or.isArrayOrTypedArray,zh=function(e,r){if(r_(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"?UM(e,r,a):{set:i_(e,a,r),get:a_(e,a),astr:r,parts:a,obj:e}};function a_(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]=a_(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!Rh(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 jM=/(^|\.)args\[/;function Sd(t,e){return t===void 0||t===null&&!e.match(jM)}function i_(t,e,r){return function(a){var i=t,n="",o=Sd(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Rh(i))throw"array index but container is not an array";if(l===-1){if(o=!GM(i,e.slice(s+1),a,r),o)break;return}if(!n_(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=BM(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 BM(t,e){var r=e;return r_(e)?r="["+e+"]":t&&(r="."+e),t+r}function GM(t,e,r,a){var i=Rh(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:Sd(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=Sd(o,l)),s&&(n=!1),n_(t,c,f,s)&&i_(t[c],e,a.replace("-1",c))(o);return n}function n_(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function UM(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var In=zh,VM=/^\w*$/,XM=0,xm=1,Ms=2,_m=3,Zi=4,YM=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=In(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=VM.test(i),u={set:function(v,h){var d=h===null?Zi:XM;if(!o){if(!l||d===Zi)return;o=[],l.set(o)}var p=f[v];if(p===void 0){if(d===Zi)return;d=d|_m,p=o.length,f[v]=p}else h!==(c?o[p][i]:In(o[p],i).get())&&(d=d|Ms);var m=o[p]=o[p]||{};return m[a]=v,c?m[i]=h:In(m,i).set(h),h!==null&&(d=d&~Zi),s[p]=s[p]|d,u},get:function(v){if(o){var h=f[v];if(h!==void 0)return c?o[h][i]:In(o[h],i).get()}},rename:function(v,h){var d=f[v];return d===void 0||(s[d]=s[d]|xm,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]|Ms,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 In(d,i).set(null),s[h]=s[h]|Ms|Zi;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]&xm&&(d[v+"."+a]=o[h][a]),s[h]&Ms&&(c?d[v+"."+i]=s[h]&Zi?null:o[h][i]:d[v+"."+i]=s[h]&Zi?null:In(o[h],i).get())):d[v]=null;return d}};return u},WM=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,qM=/^[^\.\[\]]+$/,ZM=function(t,e){for(;e;){var r=t.match(WM);if(r)t=r[1];else if(t.match(qM))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},KM=wt,Ih=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 KM(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},wm=or.isArrayOrTypedArray,el=Sn,QM=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(wm(i)&&wm(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 JM(t,e){var r=t%e;return r<0?r+e:r}function eS(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var fs={mod:JM,modHalf:eS},o_={},Dr=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},$c={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},l_=$c,s_=Dr,Fh=s_({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});Fh.family.dflt=l_.HOVERFONT;Fh.size.dflt=l_.HOVERFONTSIZE;var cs={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:Fh,grouptitlefont:s_({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"}},Qt={},Tm=Sn,tl=Array.isArray;function tS(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}Qt.extendFlat=function(){return us(arguments,!1,!1,!1)};Qt.extendDeep=function(){return us(arguments,!0,!1,!1)};Qt.extendDeepAll=function(){return us(arguments,!0,!0,!1)};Qt.extendDeepNoArrays=function(){return us(arguments,!0,!1,!0)};function us(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=tS(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&&(Tm(f)||(c=tl(f)))?(c?(c=!1,u=s&&tl(s)?s:[]):u=s&&Tm(s)?s:{},i[l]=us([u,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var rS=Dr,Ss=cs.hoverlabel,Ls=Qt.extendFlat,Pc={hoverlabel:{bgcolor:Ls({},Ss.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:Ls({},Ss.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:rS({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:Ls({},Ss.align,{arrayOk:!0}),namelength:Ls({},Ss.namelength,{arrayOk:!0}),editType:"none"}},aS=Dr,iS=Pc,Ta={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:aS({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:iS.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(" ")}},nS=wa,Ec={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)"]]},f_=Ec.RdBu;function oS(t,e){if(e||(e=f_),!t)return e;function r(){try{t=Ec[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),c_(t)?t:e}function c_(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||!nS(a[1]).isValid())return!1;e=+a[0]}return!0}function lS(t){return Ec[t]!==void 0?!0:c_(t)}var jo={scales:Ec,defaultScale:f_,get:oS,isValid:lS},u_={exports:{}},Hr={};Hr.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Hr.defaultLine="#444";Hr.lightLine="#eee";Hr.background="#fff";Hr.borderLine="#BEC8D9";Hr.lightFraction=100*10/11;var Ia=wa,sS=wt,fS=or.isTypedArray,Ar=u_.exports={},Rc=Hr;Ar.defaults=Rc.defaults;var cS=Ar.defaultLine=Rc.defaultLine;Ar.lightLine=Rc.lightLine;var Ld=Ar.background=Rc.background;Ar.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};Ar.rgb=function(t){return Ar.tinyRGB(Ia(t))};Ar.opacity=function(t){return t?Ia(t).getAlpha():0};Ar.addOpacity=function(t,e){var r=Ia(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};Ar.combine=function(t,e){var r=Ia(t).toRgb();if(r.a===1)return Ia(t).toRgbString();var a=Ia(e||Ld).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 Ia(n).toRgbString()};Ar.contrast=function(t,e,r){var a=Ia(t);a.getAlpha()!==1&&(a=Ia(Ar.combine(t,Ld)));var i=a.isDark()?e?a.lighten(e):Ld:r?a.darken(r):cS;return i.toString()};Ar.stroke=function(t,e){var r=Ia(e);t.style({stroke:Ar.tinyRGB(r),"stroke-opacity":r.getAlpha()})};Ar.fill=function(t,e){var r=Ia(e);t.style({fill:Ar.tinyRGB(r),"fill-opacity":r.getAlpha()})};Ar.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]=Tu(n[a]);else t[i]=Tu(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]=Tu(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++)Ar.clean(n[a])}else n&&typeof n=="object"&&!fS(n)&&Ar.clean(n)}};function Tu(t){if(sS(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 pt=u_.exports,vs={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},Bo={};Bo.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=wt,r=wa,a=Ta,i=jo,n=pt,o=vs.DESELECTDIM,l=zh,s=Bo.counter,f=fs.modHalf,c=or.isArrayOrTypedArray,u=or.isTypedArraySpec,v=or.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 g=String(m[y]);if(g.charAt(0)==="/"&&g.charAt(g.length-1)==="/"){var w=new RegExp(g.substr(1,g.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 g=typeof d=="number";y.strict===!0||!g?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(g){return r(g).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 g=y.regex||s(m);if(typeof d=="string"&&g.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 g=d.split("+"),w=0;w<g.length;){var b=g[w];y.flags.indexOf(b)===-1||g.indexOf(b)<w?g.splice(w,1):w++}g.length?p.set(g.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 g(F,$,M){var A,D={set:function(P){A=P}};return M===void 0&&(M=$.dflt),t.valObjectMeta[$.valType].coerceFunction(F,D,M,$),A}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]),b=y.items,x=[],_=Array.isArray(b),k=_&&w&&c(b[0]),T=w&&_&&!k,S=_&&!T?b.length:d.length,C,L,E,R,N,H;if(m=Array.isArray(m)?m:[],w)for(C=0;C<S;C++)for(x[C]=[],E=c(d[C])?d[C]:[],T?N=b.length:_?N=b[C].length:N=E.length,L=0;L<N;L++)T?R=b[L]:_?R=b[C][L]:R=b,H=g(E[L],R,(m[C]||[])[L]),H!==void 0&&(x[C][L]=H);else for(C=0;C<S;C++)H=g(d[C],_?b[C]:b,m[C]),H!==void 0&&(x[C]=H);p.set(x)},validateFunction:function(d,p){if(!c(d))return!1;var m=p.items,y=Array.isArray(m),g=p.dimensions===2;if(!p.freeLength&&d.length!==m.length)return!1;for(var w=0;w<d.length;w++)if(g){if(!c(d[w])||!p.freeLength&&d[w].length!==m[w].length)return!1;for(var b=0;b<d[w].length;b++)if(!h(d[w][b],y?m[w][b]:m))return!1}else if(!h(d[w],y?m[w]:m))return!1;return!0}}},t.coerce=function(d,p,m,y,g){var w=l(m,y).get(),b=l(d,y),x=l(p,y),_=b.get(),k=p._template;if(_===void 0&&k&&(_=l(k,y).get(),k=0),g===void 0&&(g=w.dflt),w.arrayOk){if(c(_))return x.set(_),_;if(u(_))return _=v(_),x.set(_),_}var T=t.valObjectMeta[w.valType].coerceFunction;T(_,x,g,w);var S=x.get();return k&&S===g&&!h(_,w)&&(_=l(k,y).get(),T(_,x,g,w),S=x.get()),S},t.coerce2=function(d,p,m,y,g){var w=l(d,y),b=t.coerce(d,p,m,y,g),x=w.get();return x!=null?b:!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 g=d(p+".shape");if(g){d(p+".solidity"),d(p+".size");var w=d(p+".fillmode"),b=w==="overlay";if(!y){var x=d(p+".bgcolor",b?m:void 0);d(p+".fgcolor",b?n.contrast(x):m)}d(p+".fgopacity",b?.5:1)}},t.coerceHoverinfo=function(d,p,m){var y=p._module.attributes,g=y.hoverinfo?y:a,w=g.hoverinfo,b;if(m._dataLength===1){var x=w.dflt==="all"?w.flags.slice():w.dflt.split("+");x.splice(x.indexOf("name"),1),b=x.join("+")}return t.coerce(d,p,g,"hoverinfo",b)},t.coerceSelectionMarkerOpacity=function(d,p){if(d.marker){var m=d.marker.opacity;if(m!==void 0){var y,g;!c(m)&&!d.selected&&!d.unselected&&(y=m,g=o*m),p("selected.marker.opacity",y),p("unselected.marker.opacity",g)}}};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={},g=y,w={set:function(b){g=b}};return m.coerceFunction(d,w,y,p),g!==y}t.validate=h})(o_);var v_={},d_={exports:{}},h_={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 m_(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),m_(a,e[r]))}}m_(h_,p_);var Go={configAttributes:h_,dfltConfig:p_},ku=gt,uS=wt,rl=[],y_=function(t,e){if(rl.indexOf(t)!==-1)return;rl.push(t);var r=1e3;uS(e)?r=e:e==="long"&&(r=3e3);var a=ku.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),ku.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=ku.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)})},Lo=Go.dfltConfig,Nh=y_,Hh=d_.exports={};Hh.log=function(){var t;if(Lo.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Lo.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Nh(r.join("<br>"),"long")}};Hh.warn=function(){var t;if(Lo.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Lo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Nh(r.join("<br>"),"stick")}};Hh.error=function(){var t;if(Lo.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(Lo.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Nh(r.join("<br>"),"stick")}};var Uo=d_.exports,lt={},Oh=function(){},g_=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},zc={};(function(t){var e=U1;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]]]}})(zc);var vS=gt,dS=Uo,hS=zc,pS=U1;function mS(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 yS(t){var e=vS.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function b_(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function gS(t,e){x_("global",t,e)}function x_(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):dS.warn("addStyleRule failed")}function bS(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&b_(r)}function xS(t){var e=w_(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=__(a);if(i){var n=hS.convertCssMatrix(i);r=pS.multiply(r,r,n)}}),r}function __(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 w_(t){for(var e=[];_S(t);)e.push(t),t=t.parentNode;return e}function _S(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function wS(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var Ic={getGraphDiv:mS,isPlotDiv:yS,removeElement:b_,addStyleRule:gS,addRelatedStyleRule:x_,deleteRelatedStyleRule:bS,getFullTransformMatrix:xS,getElementTransformMatrix:__,getElementAndAncestors:w_,equalDomRects:wS},Fc={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(" ")}}},T_=Qt.extendFlat,TS=Sn,k_={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(" ")},A_={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=k_.flags.slice().concat(["fullReplot"]),AS=A_.flags.slice().concat("layoutReplot"),Za={traces:k_,layout:A_,traceFlags:function(){return km(kS)},layoutFlags:function(){return km(AS)},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:M_};function km(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function M_(t,e,r){var a=T_({},t);for(var i in a){var n=a[i];TS(n)&&(a[i]=S_(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function S_(t,e,r,a){if(t.valType){var i=T_({},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]=S_(t.items[n],e)}return i}else return M_(t,e,a.charAt(0)==="_"?"nested":"from-root")}var ia={};ia.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(" ")};ia.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 Rr={},L_={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"},C_=L_,D_=C_.FORMAT_LINK,$_=C_.DATE_FORMAT_LINK;function P_(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}".`,D_,"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}".`,$_,"for details on the date formatting syntax."].join(" ")}function MS(){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`,D_,"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`,$_,"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 jh(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}Rr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=jh(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`.",P_({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};Rr.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=jh(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`.",P_(),"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};Rr.shapeTexttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=t.newshape?"new ":"",a=jh(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`.",MS(),a].join(" ")};return i};function Ii(t,e){return e?e.d2l(t):t}function E_(t,e){return e?e.l2d(t):t}function SS(t){return t.x0}function LS(t){return t.x1}function CS(t){return t.y0}function DS(t){return t.y1}function Nc(t,e){return Ii(t.x1,e)-Ii(t.x0,e)}function Hc(t,e,r){return Ii(t.y1,r)-Ii(t.y0,r)}function $S(t,e){return Math.abs(Nc(t,e))}function PS(t,e,r){return Math.abs(Hc(t,e,r))}function ES(t,e,r){return t.type!=="line"?void 0:Math.sqrt(Math.pow(Nc(t,e),2)+Math.pow(Hc(t,e,r),2))}function RS(t,e){return E_((Ii(t.x1,e)+Ii(t.x0,e))/2,e)}function zS(t,e,r){return E_((Ii(t.y1,r)+Ii(t.y0,r))/2,r)}function IS(t,e,r){return t.type!=="line"?void 0:Hc(t,e,r)/Nc(t,e)}var Bh={x0:SS,x1:LS,y0:CS,y1:DS,slope:IS,dx:Nc,dy:Hc,width:$S,height:PS,length:ES,xcenter:RS,ycenter:zS},FS=Za.overrideAll,Ki=Ta,Am=Dr,NS=ia.dash,yi=Qt.extendFlat,HS=Rr.shapeTexttemplateAttrs,OS=Bh,jS=FS({newshape:{visible:yi({},Ki.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:yi({},Ki.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:yi({},Ki.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:yi({},Ki.legendgrouptitle.text,{}),font:Am({description:["Sets this legend group's title font."].join(" ")})},legendrank:yi({},Ki.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:yi({},Ki.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:yi({},NS,{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:yi({},Ki.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:HS({newshape:!0},{keys:Object.keys(OS)}),font:Am({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"),BS=ia.dash,GS=Qt.extendFlat,US={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:GS({},BS,{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"}},Gh=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}},Cd=Dr,VS=Fc,Lf=Hr,Mm=jS,Sm=US,XS=Gh,Lm=Qt.extendFlat,Oc=Cd({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});Oc.family.dflt='"Open Sans", verdana, arial, sans-serif';Oc.size.dflt=12;Oc.color.dflt=Lf.defaultLine;var ds={font:Oc,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:Cd({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:Lm(XS({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:Lf.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:Lf.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:Lf.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:Mm.newshape,activeshape:Mm.activeshape,newselection:Sm.newselection,activeselection:Sm.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:Lm({},VS.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:Cd({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=Uo,r=Oh,a=g_,i=Sn,n=Ic.addStyleRule,o=Qt,l=Ta,s=ds,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[b(x)];return _?_._module:!1},t.traceIs=function(x,_){if(x=b(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={},C=0;C<k.length;C++)S[k[C]]=!0,t.allCategories[k[C]]=!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)g(_,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)g(S,x.name)}function p(x){var _=x.name,k=_.split("-")[0],T=x.dictionary,S=x.format,C=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={}),C&&N.dictionary===R.dictionary&&(N.dictionary=T),L&&N.format===R.format&&(N.format=S)}C&&(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 g(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,C=T.attr==="subplot"?T.name:T.attr;Array.isArray(C)&&(C=C[0]);var L=k.subplots[C];S&&L&&c(S,L)}}function b(x){return typeof x=="object"&&(x=x.type),x}})(lt);(function(t){var e=Gl.timeFormat,r=wt,a=Uo,i=fs.mod,n=lr,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,u=n.EPOCHJD,v=lt,h=Gl.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($,M){var A=g($,!!M);if(M<2)return A;var D=t.dateTime2ms(A,$);return D+=l*(M-1),t.ms2DateTime(D,0,$)};function g($,M){return y($)?M?v.getComponentMethod("calendars","CANONICAL_SUNDAY")[$]:v.getComponentMethod("calendars","CANONICAL_TICK")[$]:M?"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,b;t.dateTime2ms=function($,M){if(t.isJSDate($)){var A=$.getTimezoneOffset()*f,D=($.getUTCMinutes()-$.getMinutes())*f+($.getUTCSeconds()-$.getSeconds())*c+($.getUTCMilliseconds()-$.getMilliseconds());if(D){var P=3*f;A=A-P/2+i(D-A+P/2,P)}return $=Number($)-A,$>=w&&$<=b?$:o}if(typeof $!="string"&&typeof $!="number")return o;$=String($);var I=y(M),O=$.charAt(0);I&&(O==="G"||O==="g")&&($=$.substr(1),M="");var B=I&&M.substr(0,7)==="chinese",G=$.match(B?p:d);if(!G)return o;var j=G[1],q=G[3]||"1",V=Number(G[5]||1),K=Number(G[7]||0),Y=Number(G[9]||0),te=Number(G[11]||0);if(I){if(j.length===2)return o;j=Number(j);var oe;try{var _e=v.getComponentMethod("calendars","getCal")(M);if(B){var de=q.charAt(q.length-1)==="i";q=parseInt(q,10),oe=_e.newDate(j,_e.toMonthIndex(j,q,de),V)}else oe=_e.newDate(j,Number(q),V)}catch{return o}return oe?(oe.toJD()-u)*l+K*s+Y*f+te*c:o}j.length===2?j=(Number(j)+2e3-m)%100+m:j=Number(j),q-=1;var X=new Date(Date.UTC(2e3,q,V,K,Y));return X.setUTCFullYear(j),X.getUTCMonth()!==q||X.getUTCDate()!==V?o:X.getTime()+te*c},w=t.MIN_MS=t.dateTime2ms("-9999"),b=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function($,M){return t.dateTime2ms($,M)!==o};function x($,M){return String($+Math.pow(10,M)).substr(1)}var _=90*l,k=3*s,T=5*f;t.ms2DateTime=function($,M,A){if(typeof $!="number"||!($>=w&&$<=b))return o;M||(M=0);var D=Math.floor(i($+.05,1)*10),P=Math.round($-D/10),I,O,B,G,j,q;if(y(A)){var V=Math.floor(P/l)+u,K=Math.floor(i($,l));try{I=v.getComponentMethod("calendars","getCal")(A).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;O=M<_?Math.floor(K/s):0,B=M<_?Math.floor(K%s/f):0,G=M<k?Math.floor(K%f/c):0,j=M<T?K%c*10+D:0}else q=new Date(P),I=h("%Y-%m-%d")(q),O=M<_?q.getUTCHours():0,B=M<_?q.getUTCMinutes():0,G=M<k?q.getUTCSeconds():0,j=M<T?q.getUTCMilliseconds()*10+D:0;return S(I,O,B,G,j)},t.ms2DateTimeLocal=function($){if(!($>=w+l&&$<=b-l))return o;var M=Math.floor(i($+.05,1)*10),A=new Date(Math.round($-M/10)),D=e("%Y-%m-%d")(A),P=A.getHours(),I=A.getMinutes(),O=A.getSeconds(),B=A.getUTCMilliseconds()*10+M;return S(D,P,I,O,B)};function S($,M,A,D,P){if((M||A||D||P)&&($+=" "+x(M,2)+":"+x(A,2),(D||P)&&($+=":"+x(D,2),P))){for(var I=4;P%10===0;)I-=1,P/=10;$+="."+x(P,I)}return $}t.cleanDate=function($,M,A){if($===o)return M;if(t.isJSDate($)||typeof $=="number"&&isFinite($)){if(y(A))return a.error("JS Dates and milliseconds are incompatible with world calendars",$),M;if($=t.ms2DateTimeLocal(+$),!$&&M!==void 0)return M}else if(!t.isDateTime($,A))return a.error("unrecognized date",$),M;return $};var C=/%\d?f/g,L=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function R($,M,A,D){$=$.replace(C,function(I){var O=Math.min(+I.charAt(1)||6,6),B=(M/1e3%1+2).toFixed(O).substr(2).replace(/0+$/,"")||"0";return B});var P=new Date(Math.floor(M+.05));if($=$.replace(L,function(){return E[A("%q")(P)]}),y(D))try{$=v.getComponentMethod("calendars","worldCalFmt")($,M,D)}catch{return"Invalid"}return A($)(P)}var N=[59,59.9,59.99,59.999,59.9999];function H($,M){var A=i($+.05,l),D=x(Math.floor(A/s),2)+":"+x(i(Math.floor(A/f),60),2);if(M!=="M"){r(M)||(M=0);var P=Math.min(i($/c,60),N[M]),I=(100+P).toFixed(M).substr(1);M>0&&(I=I.replace(/0+$/,"").replace(/[\.]$/,"")),D+=":"+I}return D}t.formatDate=function($,M,A,D,P,I){if(P=y(P)&&P,!M)if(A==="y")M=I.year;else if(A==="m")M=I.month;else if(A==="d")M=I.dayMonth+`
2
- `+I.year;else return H($,A)+`
3
- `+R(I.dayMonthYear,$,D,P);return R(M,$,D,P)};var F=3*l;t.incrementMonth=function($,M,A){A=y(A)&&A;var D=i($,l);if($=Math.round($-D),A)try{var P=Math.round($/l)+u,I=v.getComponentMethod("calendars","getCal")(A),O=I.fromJD(P);return M%12?I.add(O,M,"m"):I.add(O,M/12,"y"),(O.toJD()-u)*l+D}catch{a.error("invalid ms "+$+" in calendar "+A)}var B=new Date($+F);return B.setUTCMonth(B.getUTCMonth()+M)+D-F},t.findExactDates=function($,M){for(var A=0,D=0,P=0,I=0,O,B,G=y(M)&&v.getComponentMethod("calendars","getCal")(M),j=0;j<$.length;j++){if(B=$[j],!r(B)){I++;continue}if(!(B%l))if(G)try{O=G.fromJD(B/l+u),O.day()===1?O.month()===1?A++:D++:P++}catch{}else O=new Date(B),O.getUTCDate()===1?O.getUTCMonth()===0?A++:D++:P++}D+=A,P+=D;var q=$.length-I;return{exactYears:A/q,exactMonths:D/q,exactDays:P/q}}})(v_);var Uh={},R_=function(e){return e};(function(t){var e=wt,r=Uo,a=R_,i=lr.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,g;for(m>=0?g=v?o:l:g=v?f:s,c+=m*n*(v?-1:1)*(m>=0?1:-1);h<d&&p++<100;)y=Math.floor((h+d)/2),g(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 g=u[y],w=g-m;m===void 0?(p.push(g),m=g):w>d&&(h=Math.min(h,w),p.push(g),m=g)}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,g=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-g;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}})(Uh);var Vh=function(e){return Object.keys(e).sort()},z_={};(function(t){var e=wt,r=or.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)]}})(z_);var I_=fs,Au=I_.mod,YS=I_.modHalf,Ul=Math.PI,Ci=2*Ul;function WS(t){return t/180*Ul}function qS(t){return t/Ul*180}function Xh(t){return Math.abs(t[1]-t[0])>Ci-1e-14}function F_(t,e){return YS(e-t,Ci)}function ZS(t,e){return Math.abs(F_(t,e))}function N_(t,e){if(Xh(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=Au(r,Ci),a=Au(a,Ci),r>a&&(a+=Ci);var i=Au(t,Ci),n=i+Ci;return i>=r&&i<=a||n>=r&&n<=a}function KS(t,e,r,a){if(!N_(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 Yh(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Xh([r,a]),s,f,c,u,v;l?(s=0,f=Ul,c=Ci):r<a?(s=r,c=a):(s=a,c=r),t<e?(u=t,v=e):(u=e,v=t);function h(y,g){return[y*Math.cos(g)+i,n-y*Math.sin(g)]}var d=Math.abs(c-s)<=Ul?0:1;function p(y,g,w){return"A"+[y,y]+" "+[0,d,w]+" "+h(y,g)}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 QS(t,e,r,a,i){return Yh(null,t,e,r,a,i,0)}function JS(t,e,r,a,i){return Yh(null,t,e,r,a,i,1)}function eL(t,e,r,a,i,n){return Yh(t,e,r,a,i,n,1)}var tL={deg2rad:WS,rad2deg:qS,angleDelta:F_,angleDist:ZS,isFullCircle:Xh,isAngleInsideSector:N_,isPtInsideSector:KS,pathArc:QS,pathSector:JS,pathAnnulus:eL},Ln={};Ln.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};Ln.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};Ln.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};Ln.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};Ln.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};Ln.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var Cn={},Mu=fs.mod;Cn.segmentsIntersect=H_;function H_(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}}Cn.segmentDistance=function(e,r,a,i,n,o,l,s){if(H_(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(Cs(f,c,h,n-e,o-r),Cs(f,c,h,l-e,s-r),Cs(u,v,d,e-n,r-o),Cs(u,v,d,a-n,i-o));return Math.sqrt(p)};function Cs(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 Ds,Dd,Cm;Cn.getTextLocation=function(e,r,a,i){if((e!==Dd||i!==Cm)&&(Ds={},Dd=e,Cm=i),Ds[a])return Ds[a];var n=e.getPointAtLength(Mu(a-i/2,r)),o=e.getPointAtLength(Mu(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(Mu(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 Ds[a]=u,u};Cn.clearLocationCache=function(){Dd=null};Cn.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,g=m.y<o?o-m.y:m.y>l?m.y-l:0;return Math.sqrt(y*y+g*g)}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}};Cn.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 jc={};(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)}})(jc);var rL=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},aL=wt,iL=wM,nL=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=oL(),typeof r!="string")return!0;var a=iL({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(aL(f)&&(f=+f),f>=13)return!0}}}return a};function oL(){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 lL=gt,sL=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]=lL.select(this)}),i},fL=lt,cL=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=fL.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},uL=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},vL=function(e){for(var r=pL(e)?hL:dL,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function dL(t){return t.visible===!0}function hL(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function pL(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var mL=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},yL=wt,gL=lr.BADNUM,bL=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,xL=function(e){return typeof e=="string"&&(e=e.replace(bL,"")),yL(e)?Number(e):gL},Ll=gt,_L=Gl.utcFormat,wL=V1.format,O_=wt,j_=lr,B_=j_.FP_SAFE,TL=-B_,Dm=j_.BADNUM,ae=J1.exports={};ae.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 $m={};ae.warnBadFormat=function(t){var e=String(t);$m[e]||($m[e]=1,ae.warn('encountered bad format: "'+e+'"'))};ae.noFormat=function(t){return String(t)};ae.numberFormat=function(t){var e;try{e=wL(ae.adjustFormat(t))}catch{return ae.warnBadFormat(t),ae.noFormat}return e};ae.nestedProperty=zh;ae.keyedContainer=YM;ae.relativeAttr=ZM;ae.isPlainObject=Sn;ae.toLogRange=Ih;ae.relinkPrivateKeys=QM;var Oi=or;ae.isArrayBuffer=Oi.isArrayBuffer;ae.isTypedArray=Oi.isTypedArray;ae.isArrayOrTypedArray=Oi.isArrayOrTypedArray;ae.isArray1D=Oi.isArray1D;ae.ensureArray=Oi.ensureArray;ae.concat=Oi.concat;ae.maxRowLength=Oi.maxRowLength;ae.minRowLength=Oi.minRowLength;var G_=fs;ae.mod=G_.mod;ae.modHalf=G_.modHalf;var ji=o_;ae.valObjectMeta=ji.valObjectMeta;ae.coerce=ji.coerce;ae.coerce2=ji.coerce2;ae.coerceFont=ji.coerceFont;ae.coercePattern=ji.coercePattern;ae.coerceHoverinfo=ji.coerceHoverinfo;ae.coerceSelectionMarkerOpacity=ji.coerceSelectionMarkerOpacity;ae.validate=ji.validate;var sa=v_;ae.dateTime2ms=sa.dateTime2ms;ae.isDateTime=sa.isDateTime;ae.ms2DateTime=sa.ms2DateTime;ae.ms2DateTimeLocal=sa.ms2DateTimeLocal;ae.cleanDate=sa.cleanDate;ae.isJSDate=sa.isJSDate;ae.formatDate=sa.formatDate;ae.incrementMonth=sa.incrementMonth;ae.dateTick0=sa.dateTick0;ae.dfltRange=sa.dfltRange;ae.findExactDates=sa.findExactDates;ae.MIN_MS=sa.MIN_MS;ae.MAX_MS=sa.MAX_MS;var Dn=Uh;ae.findBin=Dn.findBin;ae.sorterAsc=Dn.sorterAsc;ae.sorterDes=Dn.sorterDes;ae.distinctVals=Dn.distinctVals;ae.roundUp=Dn.roundUp;ae.sort=Dn.sort;ae.findIndexOfMin=Dn.findIndexOfMin;ae.sortObjectKeys=Vh;var Bi=z_;ae.aggNums=Bi.aggNums;ae.len=Bi.len;ae.mean=Bi.mean;ae.median=Bi.median;ae.midRange=Bi.midRange;ae.variance=Bi.variance;ae.stdev=Bi.stdev;ae.interp=Bi.interp;var Ha=zc;ae.init2dArray=Ha.init2dArray;ae.transposeRagged=Ha.transposeRagged;ae.dot=Ha.dot;ae.translationMatrix=Ha.translationMatrix;ae.rotationMatrix=Ha.rotationMatrix;ae.rotationXYMatrix=Ha.rotationXYMatrix;ae.apply3DTransform=Ha.apply3DTransform;ae.apply2DTransform=Ha.apply2DTransform;ae.apply2DTransform2=Ha.apply2DTransform2;ae.convertCssMatrix=Ha.convertCssMatrix;ae.inverseTransformMatrix=Ha.inverseTransformMatrix;var Ka=tL;ae.deg2rad=Ka.deg2rad;ae.rad2deg=Ka.rad2deg;ae.angleDelta=Ka.angleDelta;ae.angleDist=Ka.angleDist;ae.isFullCircle=Ka.isFullCircle;ae.isAngleInsideSector=Ka.isAngleInsideSector;ae.isPtInsideSector=Ka.isPtInsideSector;ae.pathArc=Ka.pathArc;ae.pathSector=Ka.pathSector;ae.pathAnnulus=Ka.pathAnnulus;var Vo=Ln;ae.isLeftAnchor=Vo.isLeftAnchor;ae.isCenterAnchor=Vo.isCenterAnchor;ae.isRightAnchor=Vo.isRightAnchor;ae.isTopAnchor=Vo.isTopAnchor;ae.isMiddleAnchor=Vo.isMiddleAnchor;ae.isBottomAnchor=Vo.isBottomAnchor;var Xo=Cn;ae.segmentsIntersect=Xo.segmentsIntersect;ae.segmentDistance=Xo.segmentDistance;ae.getTextLocation=Xo.getTextLocation;ae.clearLocationCache=Xo.clearLocationCache;ae.getVisibleSegment=Xo.getVisibleSegment;ae.findPointOnPath=Xo.findPointOnPath;var Bc=Qt;ae.extendFlat=Bc.extendFlat;ae.extendDeep=Bc.extendDeep;ae.extendDeepAll=Bc.extendDeepAll;ae.extendDeepNoArrays=Bc.extendDeepNoArrays;var Wh=Uo;ae.log=Wh.log;ae.warn=Wh.warn;ae.error=Wh.error;var kL=Bo;ae.counterRegex=kL.counter;var qh=jc;ae.throttle=qh.throttle;ae.throttleDone=qh.done;ae.clearThrottle=qh.clear;var Qa=Ic;ae.getGraphDiv=Qa.getGraphDiv;ae.isPlotDiv=Qa.isPlotDiv;ae.removeElement=Qa.removeElement;ae.addStyleRule=Qa.addStyleRule;ae.addRelatedStyleRule=Qa.addRelatedStyleRule;ae.deleteRelatedStyleRule=Qa.deleteRelatedStyleRule;ae.getFullTransformMatrix=Qa.getFullTransformMatrix;ae.getElementTransformMatrix=Qa.getElementTransformMatrix;ae.getElementAndAncestors=Qa.getElementAndAncestors;ae.equalDomRects=Qa.equalDomRects;ae.clearResponsive=rL;ae.preserveDrawingBuffer=nL;ae.makeTraceGroups=sL;ae._=cL;ae.notifier=y_;ae.filterUnique=uL;ae.filterVisible=vL;ae.pushUnique=g_;ae.increment=mL;ae.cleanNumber=xL;ae.ensureNumber=function(e){return O_(e)?(e=Number(e),e>B_||e<TL?Dm:e):Dm};ae.isIndex=function(t,e){return e!==void 0&&t>=e?!1:O_(t)&&t>=0&&t%1===0};ae.noop=Oh;ae.identity=R_;ae.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};ae.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=ae.nestedProperty(t,n.replace("?",r)),l=ae.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};ae.raiseToTop=function(e){e.parentNode.appendChild(e)};ae.cancelTransition=function(t){return t.transition().duration(0)};ae.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};ae.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};ae.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};ae.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?(ae.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};ae.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};ae.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};ae.syncOrAsync=function(t,e,r){var a,i;function n(){return ae.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)};ae.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};ae.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]]}};ae.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(ae.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}};ae.mergeArrayCastPositive=function(t,e,r){return ae.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};ae.fillArray=function(t,e,r,a){if(a=a||ae.identity,ae.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};ae.castOption=function(t,e,r,a){a=a||ae.identity;var i=ae.nestedProperty(t,r).get();return ae.isArrayOrTypedArray(i)?Array.isArray(e)&&ae.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};ae.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=ae.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function U_(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}ae.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=U_(i));function o(u){return u!==void 0&&u<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(ae.isIndex(s)||ae.isArrayOrTypedArray(s)&&ae.isIndex(s[0])&&ae.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};ae.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=U_(r),i=[],n=0;n<e.length;n++){var o=e[n];if(ae.isIndex(o)){var l=a[o];ae.isIndex(l)&&i.push(l)}}return i}else return e};ae.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=ae.nestedProperty(t,r).get();return ae.isArrayOrTypedArray(a)?a:!1}else if(ae.isArrayOrTypedArray(r))return r;return!1};function V_(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):ae.isTypedArray(s)?i===-1?a[l]=s.subarray():a[l]=s.subarray(0,i):s&&typeof s=="object"?a[l]=V_(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}ae.minExtend=V_;ae.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};ae.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};ae.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var AL=/Version\/[\d\.]+.*Safari/;ae.isSafari=function(){return AL.test(window.navigator.userAgent)};var ML=/iPad|iPhone|iPod/;ae.isIOS=function(){return ML.test(window.navigator.userAgent)};var SL=/Firefox\/(\d+)\.\d+/;ae.getFirefoxVersion=function(){var t=SL.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};ae.isD3Selection=function(t){return t instanceof Ll.selection};ae.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};ae.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};ae.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 LL=/^([^\[\.]+)\.(.+)?/,CL=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function $s(t){return t.slice(0,2)==="__"}ae.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(LL)){if(i=t[r],a=e[1],$s(a))continue;delete t[r],t[a]=ae.extendDeepNoArrays(t[a]||{},ae.objectFromPath(r,ae.expandObjectPaths(i))[a])}else if(e=r.match(CL)){if(i=t[r],a=e[1],$s(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]||{},ae.extendDeepNoArrays(o,ae.objectFromPath(l,ae.expandObjectPaths(i)));else{if($s(a))continue;t[a][n]=ae.expandObjectPaths(i)}}else{if($s(r))continue;t[r]=ae.expandObjectPaths(t[r])}}return t};ae.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};ae.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var X_=/^\w*$/;ae.templateString=function(t,e){var r={};return t.replace(ae.TEMPLATE_STRING_REGEX,function(a,i){var n;return X_.test(i)?n=e[i]:(r[i]=r[i]||ae.nestedProperty(e,i).get,n=r[i]()),ae.isValidTextValue(n)?n:""})};var DL={max:10,count:0,name:"hovertemplate"};ae.hovertemplateString=function(){return Zh.apply(DL,arguments)};var $L={max:10,count:0,name:"texttemplate"};ae.texttemplateString=function(){return Zh.apply($L,arguments)};var PL=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function EL(t){var e=t.match(PL);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}var RL={max:10,count:0,name:"texttemplate",parseMultDiv:!0};ae.texttemplateStringForShapes=function(){return Zh.apply(RL,arguments)};var Pm=/^[:|\|]/;function Zh(t,e,r){var a=this,i=arguments;e||(e={});var n={};return t.replace(ae.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=EL(d);d=y.key,p=y.op,m=y.number}var g;if(h){if(g=e[d],g===void 0)return""}else{var w,b;for(b=3;b<i.length;b++)if(w=i[b],!!w){if(w.hasOwnProperty(d)){g=w[d];break}if(X_.test(d)||(g=ae.nestedProperty(w,d).get(),g=n[d]||ae.nestedProperty(w,d).get(),g&&(n[d]=g)),g!==void 0)break}}if(g!==void 0&&(p==="*"&&(g*=m),p==="/"&&(g/=m)),g===void 0&&a)return a.count<a.max&&(ae.warn("Variable '"+d+"' in "+a.name+" could not be found!"),g=o),a.count===a.max&&ae.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:ae.numberFormat,g=x(s.replace(Pm,""))(g)),s[0]==="|"){x=r?r.timeFormat:_L;var _=ae.dateTime2ms(g);g=ae.formatDate(_,s.replace(Pm,""),!1,x)}}else{var k=d+"Label";e.hasOwnProperty(k)&&(g=e[k])}return h&&(g="("+g+")",(c||u)&&(g=" "+g),(v||u)&&(g=g+" ")),g})}var Ps=48,Em=57;ae.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>=Ps&&o<=Em,f=l>=Ps&&l<=Em;if(s&&(a=10*a+o-Ps),f&&(i=10*i+l-Ps),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var oo=2e9;ae.seedPseudoRandom=function(){oo=2e9};ae.pseudoRandom=function(){var t=oo;return oo=(69069*oo+1)%4294967296,Math.abs(oo-t)<429496729?ae.pseudoRandom():oo/4294967296};ae.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=ae.extractOption(t,e,"htx","hovertext");if(ae.isValidTextValue(i))return a(i);var n=ae.extractOption(t,e,"tx","text");if(ae.isValidTextValue(n))return a(n)};ae.isValidTextValue=function(t){return t||t===0};ae.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};ae.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};ae.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};ae.strRotate=function(t){return t?"rotate("+t+")":""};ae.strScale=function(t){return t!==1?"scale("+t+")":""};ae.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,ae.strTranslate(i-f*(r+o),n-f*(a+l))+ae.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};ae.setTransormAndDisplay=function(t,e){t.attr("transform",ae.getTextTransform(e)),t.style("display",e.scale?null:"none")};ae.ensureUniformFontSize=function(t,e){var r=ae.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};ae.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)};ae.bigFont=function(t){return Math.round(1.2*t)};var Rm=ae.getFirefoxVersion(),zL=Rm!==null&&Rm<86;ae.getPositionFromD3Event=function(){return zL?[Ll.event.layerX,Ll.event.layerY]:[Ll.event.offsetX,Ll.event.offsetY]};var ge=J1.exports,IL=ge,zm={"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 Im in zm){var FL=Im.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");IL.addStyleRule(FL,zm[Im])}var Wt={},Kh={},Su=Dh.EventEmitter,NL={init:function(t){if(t._ev instanceof Su)return t;var e=new Su,r=new Su;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}},hs=NL,Fm=ge,HL=Go.dfltConfig;function OL(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)?Fm.extendDeep([],a):Fm.extendDeepAll({},a):r[i]=a;return r}var vi={};vi.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>HL.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)};vi.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0};vi.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1};vi.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++)vi.plotDo(e,r.undo.calls[a],r.undo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1}};vi.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++)vi.plotDo(e,r.redo.calls[a],r.redo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}};vi.plotDo=function(t,e,r){t.autoplay=!0,r=OL(t,r),e.apply(null,r)};var jL=vi,Yo={},Y_={_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=lt,r=ge,a=Ta,i=ds,n=Y_,o=Fc,l=Go.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",g=[d,p,m,y];t.IS_SUBPLOT_OBJ=d,t.IS_LINKED_TO_ARRAY=p,t.DEPRECATED=y,t.UNDERSCORE_ATTRS=g,t.get=function(){var F={};e.allTypes.forEach(function(M){F[M]=_(M)});var $={};return Object.keys(e.transformsRegistry).forEach(function(M){$[M]=T(M)}),{defs:{valObjects:h,metaKeys:g.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:C(o),config:C(l)}},t.crawl=function(F,$,M,A){var D=M||0;A=A||"",Object.keys(F).forEach(function(P){var I=F[P];if(g.indexOf(P)===-1){var O=(A?A+".":"")+P;$(I,P,F,D,O),!t.isValObject(I)&&c(I)&&P!=="impliedEdits"&&t.crawl(I,$,D+1,O)}})},t.isValObject=function(F){return F&&F.valType!==void 0},t.findArrayAttributes=function(F){var $=[],M=[],A=[],D,P;function I(V,K,Y,te){M=M.slice(0,te).concat([K]),A=A.slice(0,te).concat([V&&V._isLinkedToArray]);var oe=V&&(V.valType==="data_array"||V.arrayOk===!0)&&!(M[te-1]==="colorbar"&&(K==="ticktext"||K==="tickvals"));oe&&O(D,0,"")}function O(V,K,Y){var te=V[M[K]],oe=Y+M[K];if(K===M.length-1)u(te)&&$.push(P+oe);else if(A[K]){if(Array.isArray(te))for(var _e=0;_e<te.length;_e++)c(te[_e])&&O(te[_e],K+1,oe+"["+_e+"].")}else c(te)&&O(te,K+1,oe+".")}D=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 j=B[G],q=j._module;q&&(P="transforms["+G+"].",D=j,t.crawl(q.attributes,I))}return $},t.getTraceValObject=function(F,$){var M=$[0],A=1,D,P;if(M==="transforms"){if($.length===1)return a.transforms;var I=F.transforms;if(!Array.isArray(I)||!I.length)return!1;var O=$[1];if(!x(O)||O>=I.length)return!1;D=(e.transformsRegistry[I[O].type]||{}).attributes,P=D&&D[$[2]],A=3}else{var B=F._module;if(B||(B=(e.modules[F.type||a.type.dflt]||{})._module),!B)return!1;if(D=B.attributes,P=D&&D[M],!P){var G=B.basePlotModule;G&&G.attributes&&(P=G.attributes[M])}P||(P=a[M])}return b(P,$,A)},t.getLayoutValObject=function(F,$){var M=w(F,$[0]);return b(M,$,1)};function w(F,$){var M,A,D,P,I=F._basePlotModules;if(I){var O;for(M=0;M<I.length;M++){if(D=I[M],D.attrRegex&&D.attrRegex.test($)){if(D.layoutAttrOverrides)return D.layoutAttrOverrides;!O&&D.layoutAttributes&&(O=D.layoutAttributes)}var B=D.baseLayoutAttrOverrides;if(B&&$ in B)return B[$]}if(O)return O}var G=F._modules;if(G){for(M=0;M<G.length;M++)if(P=G[M].layoutAttributes,P&&$ in P)return P[$]}for(A in e.componentsRegistry){if(D=e.componentsRegistry[A],D.name==="colorscale"&&$.indexOf("coloraxis")===0)return D.layoutAttributes[$];if(!D.schema&&$===D.name)return D.layoutAttributes}return $ in i?i[$]:!1}function b(F,$,M){if(!F)return!1;if(F._isLinkedToArray){if(x($[M]))M++;else if(M<$.length)return!1}for(;M<$.length;M++){var A=F[$[M]];if(c(A))F=A;else break;if(M===$.length-1)break;if(F._isLinkedToArray){if(M++,!x($[M]))return!1}else if(F.valType==="info_array"){M++;var D=$[M];if(!x(D))return!1;var P=F.items;if(Array.isArray(P)){if(D>=P.length)return!1;if(F.dimensions===2){if(M++,$.length===M)return F;var I=$[M];if(!x(I))return!1;F=P[D][I]}else F=P[D]}else F=P}}return F}function x(F){return F===Math.round(F)&&F>=0}function _(F){var $,M;$=e.modules[F]._module,M=$.basePlotModule;var A={};A.type=null;var D=f({},a),P=f({},$.attributes);t.crawl(P,function(B,G,j,q,V){v(D,V).set(void 0),B===void 0&&v(P,V).set(void 0)}),f(A,D),e.traceIs(F,"noOpacity")&&delete A.opacity,e.traceIs(F,"showLegend")||(delete A.showlegend,delete A.legendgroup),e.traceIs(F,"noHover")&&(delete A.hoverinfo,delete A.hoverlabel),$.selectPoints||delete A.selectedpoints,f(A,P),M.attributes&&f(A,M.attributes),A.type=F;var I={meta:$.meta||{},categories:$.categories||{},animatable:!!$.animatable,type:F,attributes:C(A)};if($.layoutAttributes){var O={};f(O,$.layoutAttributes),I.layoutAttributes=C(O)}return $.animatable||t.crawl(I,function(B){t.isValObject(B)&&"anim"in B&&delete B.anim}),I}function k(){var F={},$,M;f(F,i);for($ in e.subplotsRegistry)if(M=e.subplotsRegistry[$],!!M.layoutAttributes)if(Array.isArray(M.attr))for(var A=0;A<M.attr.length;A++)N(F,M,M.attr[A]);else{var D=M.attr==="subplot"?M.name:M.attr;N(F,M,D)}for($ in e.componentsRegistry){M=e.componentsRegistry[$];var P=M.schema;if(P&&(P.subplots||P.layout)){var I=P.subplots;if(I&&I.xaxis&&!I.yaxis)for(var O in I.xaxis)delete F.yaxis[O];delete F.xaxis.shift,delete F.xaxis.autoshift}else M.name==="colorscale"?f(F,M.layoutAttributes):M.layoutAttributes&&H(F,M.layoutAttributes,M.name)}return{layoutAttributes:C(F)}}function T(F){var $=e.transformsRegistry[F],M=f({},$.attributes);return Object.keys(e.componentsRegistry).forEach(function(A){var D=e.componentsRegistry[A];D.schema&&D.schema.transforms&&D.schema.transforms[F]&&Object.keys(D.schema.transforms[F]).forEach(function(P){H(M,D.schema.transforms[F][P],P)})}),{attributes:C(M)}}function S(){var F={frames:f({},n)};return C(F),F.frames}function C(F){return L(F),E(F),R(F),F}function L(F){function $(A){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+A+"`.",editType:"none"}}function M(A,D,P){t.isValObject(A)?(A.arrayOk===!0||A.valType==="data_array")&&(P[D+"src"]=$(D)):c(A)&&(A.role="object")}t.crawl(F,M)}function E(F){function $(M,A,D){if(M){var P=M[p];P&&(delete M[p],D[A]={items:{}},D[A].items[P]=M,D[A].role="object")}}t.crawl(F,$)}function R(F){function $(M){for(var A in M)if(c(M[A]))$(M[A]);else if(Array.isArray(M[A]))for(var D=0;D<M[A].length;D++)$(M[A][D]);else M[A]instanceof RegExp&&(M[A]=M[A].toString())}$(F)}function N(F,$,M){var A=v(F,M),D=f({},$.layoutAttributes);D[d]=!0,A.set(D)}function H(F,$,M){var A=v(F,M);A.set(f(A.get()||{},$))}})(Yo);var W_={exports:{}},Ot={},To=ge,BL=Ta,Pi="templateitemname",$d={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(" ")}};$d[Pi]={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(" ")};Ot.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=$d.name,e[Pi]=$d[Pi],e};Ot.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=To.coerce(n,{},BL,"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}};Ot.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);To.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};Ot.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[q_(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[Pi]=f[Pi];if(!Nm(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(Nm(v)&&!o[v]){var h={_template:u,name:v,_input:{_templateitemname:v}};h[Pi]=u[Pi],f.push(h),o[v]=1}}return f}return{newItem:l,defaultItems:s}};function Nm(t){return t&&typeof t=="string"}function q_(t){var e=t.length-1;return t.charAt(e)!=="s"&&To.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}Ot.arrayDefaultKey=q_;Ot.arrayEditor=function(t,e,r){var a=(To.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][Pi]=n)}s();function f(h,d){l[h]=d}function c(h,d){n?To.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)To.nestedProperty(t,m).set(p[m])}return{modifyBase:f,modifyItem:c,getUpdateObj:u,applyUpdate:v}};var sr={},al=Bo.counter,Yr={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=lt,r=Yr;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)}})(sr);function GL(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function UL(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}var $n={clearOutlineControllers:GL,clearOutline:UL},Qh={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(" ")}},ps={},$l=lt,VL=Yr.SUBPLOT_PATTERN;ps.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};ps.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]};ps.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(VL);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 Lu={},Hm;function XL(){return Hm||(Hm=1,function(t){var e=lt,r=ge;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 g=a(s,d,v.cache);return g.changed&&u&&v.lookupTable[g.value]!==void 0&&(v.disable(),Promise.resolve(u({value:g.value,type:d.type,prop:d.prop,traces:d.traces,index:v.lookupTable[g.value]})).then(v.enable,v.enable)),g.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 g=t.computeAPICommandBindings(s,m,y);if(g.length!==1)return!1;if(!h)h=g[0],Array.isArray(h.traces)&&h.traces.sort();else{if(d=g[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=g[0];var b=d.value;if(Array.isArray(b))if(b.length===1)b=b[0];else return!1;c&&(c[b]=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 g,w;if(Array.isArray(y)){w=y.slice();var b=Math.min(w.length,s.data.length);c&&(b=Math.min(b,c.length)),g=[];for(var x=0;x<b;x++)g[x]=c?c[x]:x}else w=y,g=c?c.slice():null;if(g===null)Array.isArray(w)&&(w=w[0]);else if(Array.isArray(g)){if(!Array.isArray(w)){var _=w;w=[];for(var k=0;k<g.length;k++)w[k]=_}w.length=Math.min(g.length,w.length)}d.push({type:"data",prop:p,traces:g,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)}})}}(Lu)),Lu}var Z_=gt,YL=Gl.timeFormatLocale,WL=V1.formatLocale,Pl=wt,qL=G1,Dt=lt,K_=Yo,ZL=Ot,je=ge,Q_=pt,Om=lr.BADNUM,ta=sr,KL=$n.clearOutline,QL=Qh,Jh=Fc,JL=Y_,eC=ps.getModuleCalcData,Pd=je.relinkPrivateKeys,Fn=je._,Ee=W_.exports={};je.extendFlat(Ee,Dt);Ee.attributes=Ta;Ee.attributes.type.values=Ee.allTypes;Ee.fontAttrs=Dr;Ee.layoutAttributes=ds;Ee.fontWeight="normal";var Gc=Ee.transformsRegistry,Uc=XL();Ee.executeAPICommand=Uc.executeAPICommand;Ee.computeAPICommandBindings=Uc.computeAPICommandBindings;Ee.manageCommandObserver=Uc.manageCommandObserver;Ee.hasSimpleAPICommandBindings=Uc.hasSimpleAPICommandBindings;Ee.redrawText=function(t){return t=je.getGraphDiv(t),new Promise(function(e){setTimeout(function(){t._fullLayout&&(Dt.getComponentMethod("annotations","draw")(t),Dt.getComponentMethod("legend","draw")(t),Dt.getComponentMethod("colorbar","draw")(t),e(Ee.previousPromises(t)))},300)})};Ee.resize=function(t){t=je.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||je.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||je.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,Dt.call("relayout",t,{autosize:!0}).then(function(){t.changed=n,t._resolveResize===a&&(delete t._resolveResize,a(t))})},100)});return e&&e(r),r};Ee.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};Ee.addLinks=function(t){if(!(!t._context.showLink&&!t._context.showSources)){var e=t._fullLayout,r=je.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Q_.defaultLine,"pointer-events":"all"}).each(function(){var f=Z_.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&&tC(t,n),o.text(n.text()&&l.text()?" - ":"")}};function tC(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(){Ee.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})}}Ee.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=Z_.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=Ee.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var rC=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],aC=["year","month","dayMonth","dayMonthYear"];Ee.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||Ee.createTransitionData(t),i._dfltTitle={plot:Fn(t,"Click to enter Plot title"),x:Fn(t,"Click to enter X axis title"),y:Fn(t,"Click to enter Y axis title"),colorbar:Fn(t,"Click to enter Colorscale title"),annotation:Fn(t,"new text")},i._traceWord=Fn(t,"trace");var v=jm(t,rC);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var h=a.width,d=a.height;Ee.supplyLayoutGlobalDefaults(n,i,v),n.width||(i.width=h),n.height||(i.height=d),Ee.sanitizeMargins(i)}else{Ee.supplyLayoutGlobalDefaults(n,i,v);var p=!n.width||!n.height,m=i.autosize,y=c.autosizable,g=p&&(m||y);g?Ee.plotAutoSize(t,n,i):p&&Ee.sanitizeMargins(i),!m&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=oC(v,i.separators),i._extraFormat=jm(t,aC),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var w=i._subplots=nC(),b=i._splomAxes={x:{},y:{}},x=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=iC(o,s),i._globalTransforms=(t._context||{}).globalTransforms,Ee.supplyDataDefaults(s,l,n,i);var _=Object.keys(b.x),k=Object.keys(b.y);if(_.length>1&&k.length>1){for(Dt.getComponentMethod("grid","sizeDefaults")(n,i),u=0;u<_.length;u++)je.pushUnique(w.xaxis,_[u]);for(u=0;u<k.length;u++)je.pushUnique(w.yaxis,k[u]);for(var T in x)je.pushUnique(w.cartesian,T)}if(i._has=Ee._hasPlotType.bind(i),o.length===l.length)for(u=0;u<l.length;u++)Pd(l[u],o[u]);Ee.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var S=i._visibleModules,C=[];for(u=0;u<S.length;u++){var L=S[u].crossTraceDefaults;L&&je.pushUnique(C,L)}for(u=0;u<C.length;u++)C[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,Ee.linkSubplots(l,i,o,a),Ee.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&&KL({_fullLayout:a}),lC(l,i),Pd(i,a),Dt.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var M=i._tracePreGUI,A={},D;for(D in M)A[D]="old";for(u=0;u<l.length;u++)D=l[u]._fullInput.uid,A[D]||(M[D]={}),A[D]="new";for(D in A)A[D]==="old"&&delete M[D];ew(i),Dt.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&Ee.supplyDefaultsUpdateCalc(f,l)};Ee.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=je.nestedProperty(n,s).get().slice(),je.nestedProperty(a,s).set(f)}i.trace=a}}};function iC(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(je.randstr(f),i))}return s}function nC(){var t=Dt.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=Dt.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++)je.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function jm(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=Dt.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(Dt.localeRegistry.en.format),i}function oC(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=WL(t).format(je.adjustFormat(r))}catch{return je.warnBadFormat(r),je.noFormat}return r},timeFormat:YL(t).utcFormat}}function lC(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)}Ee.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=[])};Ee._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=Dt.modules[i];if(n&&n.categories[t])return!0}return!1};Ee.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()}};Ee.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=ta.getFromId(f,u,"x"),d=ta.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=ta.list(f,null,!0),g;for(i=0;i<y.length;i++){g=y[i];var w=null;g.overlaying&&(w=ta.getFromId(f,g.overlaying),w&&w.overlaying&&(g.overlaying=!1,w=null)),g._mainAxis=w||g,w&&(g.domain=w.domain.slice()),g._anchorAxis=g.anchor==="free"?null:ta.getFromId(f,g.anchor)}for(i=0;i<y.length;i++)if(g=y[i],g._counterAxes.sort(ta.idSort),g._subplotsWith.sort(je.subplotSort),g._mainSubplot=sC(g,e),g._counterAxes.length&&(g.spikemode&&g.spikemode.indexOf("across")!==-1||g.automargin&&g.mirror&&g.anchor!=="free"||Dt.getComponentMethod("rangeslider","isVisible")(g))){var b=1,x=0;for(n=0;n<g._counterAxes.length;n++){var _=ta.getFromId(f,g._counterAxes[n]);b=Math.min(b,_.domain[0]),x=Math.max(x,_.domain[1])}b<x&&(g._counterDomainMin=b,g._counterDomainMax=x)}};function sC(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=ta.getFromId(r,c);if(l&&v.overlaying===l){n=u;break}}}return n||o}Ee.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=[],K_.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=je.nestedProperty(t,"_input."+e[a]);n.get()||je.nestedProperty(t,e[a]).set(null)}};Ee.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&&(je.pushUnique(i,T),k.visible===!0&&je.pushUnique(n,T),je.pushUnique(o,k._module.basePlotModule),l++,k._input.visible!==!1&&s++)}var h={},d=[],p=(r.template||{}).data||{},m=ZL.traceTemplater(p);for(f=0;f<t.length;f++){if(u=t[f],c=m.newTrace(u),c.uid=a._traceUids[f],Ee.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,g=fC(c,e,r,a),w=0;w<g.length;w++){var b=g[w],x={_template:c._template,type:c.type,uid:c.uid+w};y&&b.visible===!1&&delete b.visible,Ee.supplyTraceDefaults(b,x,l,a,f),Pd(x,b),x.index=f,x._input=u,x._fullInput=c,x._expandedIndex=l,x._expandedInput=b,v(x)}else c._fullInput=c,c._expandedInput=c,v(c);Dt.traceIs(c,"carpetAxis")&&(h[c.carpet]=c),Dt.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}};Ee.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return je.coerce(t||{},r,Jh,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]=Ee.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=Ee.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=Ee.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=Ee.supplyAnimationTransitionDefaults(t.transition||{});return r};Ee.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return je.coerce(t||{},e,Jh.frame,a,i)}return r("duration"),r("redraw"),e};Ee.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return je.coerce(t||{},e,Jh.transition,a,i)}return r("duration"),r("easing"),e};Ee.supplyFrameDefaults=function(t){var e={};function r(a,i){return je.coerce(t,e,JL,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};Ee.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||Q_.defaults,o=n[r%n.length],l;function s(w,b){return je.coerce(t,e,Ee.attributes,w,b)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=Ee.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=je.coerce(t,e,h,m);d[m]&&je.pushUnique(d[m],y),p+=y}else p=je.coerce(t,e,h,v);d[u.name]&&je.pushUnique(d[u.name],p)}}}if(f){if(s("customdata"),s("ids"),s("meta"),Dt.traceIs(e,"showLegend")?(je.coerce(t,e,c.attributes.showlegend?c.attributes:Ee.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),Dt.traceIs(e,"noOpacity")||s("opacity"),Dt.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),Dt.traceIs(e,"noHover")||(e.hovertemplate||je.coerceHoverinfo(t,e,a),e.type!=="parcats"&&Dt.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints){var g=s("selectedpoints");je.isTypedArray(g)&&(e.selectedpoints=Array.from(g))}Ee.supplyTransformDefaults(t,e,a)}return e};function J_(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||Gc[a.type];if(i&&i.makesData)return!0}return!1}Ee.hasMakesDataTransform=J_;Ee.supplyTransformDefaults=function(t,e,r){if(e._length||J_(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=Gc[c],v,h=!(f._module&&f._module===u),d=u&&typeof u.transform=="function";u||je.warn("Unrecognized transform type "+c+"."),u&&u.supplyDefaults&&(h||d)?(v=u.supplyDefaults(f,e,r,t),v.type=c,v._module=u,je.pushUnique(i,u)):v=je.extendFlat({},f),l.push(v)}}};function fC(t,e,r,a){for(var i=t.transforms,n=[t],o=0;o<i.length;o++){var l=i[o],s=Gc[l.type];s&&s.transform&&(n=s.transform(n,{transform:l,fullTrace:t,fullData:e,layout:r,fullLayout:a,transformIndex:o}))}return n}Ee.supplyLayoutGlobalDefaults=function(t,e,r){function a(u,v){return je.coerce(t,e,Ee.layoutAttributes,u,v)}var i=t.template;je.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=je.coerceFont(a,"font"),o=n.size;je.coerceFont(a,"title.font",je.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&&Ee.sanitizeMargins(e),Dt.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),Dt.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),Dt.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),Dt.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,a),a("meta"),je.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),Dt.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),Dt.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a),je.coerce(t,e,QL,"scattermode")};function Es(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}Ee.plotAutoSize=function(e,r,a){var i=e._context||{},n=i.frameMargins,o,l,s=je.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=Es(f.width)||Es(f.maxWidth)||a.width,l=Es(f.height)||Es(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=Ee.layoutAttributes.width.min,v=Ee.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}),Ee.sanitizeMargins(a)};Ee.supplyLayoutModuleDefaults=function(t,e,r,a){var i=Dt.componentsRegistry,n=e._basePlotModules,o,l,s,f=Dt.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(Dt.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(je.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)};Ee.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)),je.clearThrottle(),je.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()};Ee.style=function(t){var e=t._fullLayout._visibleModules,r=[],a;for(a=0;a<e.length;a++){var i=e[a];i.style&&je.pushUnique(r,i.style)}for(a=0;a<r.length;a++)r[a](t)};Ee.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))}};Ee.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};Ee.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function ew(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 tw=2,rw=2;Ee.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=je.constrain(i-o.l-o.r,tw,l),c=je.constrain(n-o.t-o.b,rw,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 g=r.xl!==void 0?r.xl:r.x,w=r.xr!==void 0?r.xr:r.x,b=r.yt!==void 0?r.yt:r.y,x=r.yb!==void 0?r.yb:r.y;h[e]={l:{val:g,size:r.l+p},r:{val:w,size:r.r+p},b:{val:x,size:r.b+p},t:{val:b,size:r.t+p}},d[e]=1}if(!a._replotting)return Ee.doAutoMargin(t)}};function cC(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=ta.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}Ee.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),ew(e);var i=e._size,n=e.margin,o={t:0,b:0,l:0,r:0},l=je.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 g in y)for(var w in y[g]){var b=y[g][w];o[w]=Math.max(o[w],b)}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 C=v[S].l||{},L=v[S].b||{},E=C.val,R=C.size,N=L.val,H=L.size,F=r-o.r-o.l,$=a-o.t-o.b;for(var M in v){if(Pl(R)&&v[M].r){var A=v[M].r.val,D=v[M].r.size;if(A>E){var P=(R*A+(D-F)*E)/(A-E),I=(D*(1-E)+(R-F)*(1-A))/(A-E);P+I>s+f&&(s=P,f=I)}}if(Pl(H)&&v[M].t){var O=v[M].t.val,B=v[M].t.size;if(O>N){var G=(H*O+(B-$)*N)/(O-N),j=(B*(1-N)+(H-$)*(1-O))/(O-N);G+j>u+c&&(u=G,c=j)}}}}}var q=je.constrain(r-n.l-n.r,tw,d),V=je.constrain(a-n.t-n.b,rw,p),K=Math.max(0,r-q),Y=Math.max(0,a-V);if(K){var te=(s+f)/K;te>1&&(s/=te,f/=te)}if(Y){var oe=(u+c)/Y;oe>1&&(u/=oe,c/=oe)}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&&(Ee.didMarginChange(l,i)||cC(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var _e=3*(1+Object.keys(h).length);if(e._redrawFromAutoMarginCount<_e)return Dt.call("_doPlot",t);e._size=l,je.warn("Too many auto-margin redraws.")}uC(t)};function uC(t){var e=ta.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var Bm=["l","r","t","b","p","w","h"];Ee.didMarginChange=function(t,e){for(var r=0;r<Bm.length;r++){var a=Bm[r],i=t[a],n=e[a];if(!Pl(i)||Math.abs(n-i)>1)return!0}return!1};Ee.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&Ee.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(je.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&&!je.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=je.isTypedArray(v);if((m||y)&&v.dtype&&v.shape){var g=v.bdata;return f({dtype:v.dtype,shape:v.shape,bdata:je.isArrayBuffer(g)?qL.encode(g):g},h)}return m?v.map(function(w){return f(w,h)}):y?je.simpleMap(v,je.identity):je.isJSDate(v)?je.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)};Ee.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()};Ee.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=Ee.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]=Ee.extendTrace(c.data[o],l.data[a]))}return c};Ee.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)}};Ee.extendObjectWithContainers=function(t,e,r){var a,i,n,o,l,s,f,c,u=je.extendDeepNoArrays({},e||{}),v=je.expandObjectPaths(u),h={};if(r&&r.length)for(n=0;n<r.length;n++)a=je.nestedProperty(v,r[n]),i=a.get(),i===void 0?je.nestedProperty(h,r[n]).set(null):(a.set(null),je.nestedProperty(h,r[n]).set(i));if(t=je.extendDeepNoArrays(t||{},v),r&&r.length){for(n=0;n<r.length;n++)if(l=je.nestedProperty(h,r[n]),f=l.get(),!!f){for(s=je.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]=Ee.extendObjectWithContainers(c[o],d)}s.set(c)}}return t};Ee.dataArrayContainers=["transforms","dimensions"];Ee.layoutArrayContainers=Dt.layoutArrayContainers;Ee.extendTrace=function(t,e){return Ee.extendObjectWithContainers(t,e,Ee.dataArrayContainers)};Ee.extendLayout=function(t,e){return Ee.extendObjectWithContainers(t,e,Ee.layoutArrayContainers)};Ee.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]]=Ee.extendTrace(t.data[c[u]],e[u])}}var m=je.expandObjectPaths(je.extendDeepNoArrays({},r)),y=/^[xy]axis[0-9]*$/;for(var g in m)y.test(g)&&delete m[g].range;Ee.extendLayout(t.layout,m),delete t.calcdata,Ee.supplyDefaults(t),Ee.doCalcdata(t);var w=je.expandObjectPaths(r);if(w){var b=t._fullLayout._plots;for(var x in b){var _=b[x],k=_.xaxis,T=_.yaxis,S=k.range.slice(),C=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}),C&&E&&(T.r2l(C[0])!==T.r2l(E[0])||T.r2l(C[1])!==T.r2l(E[1]))&&(N={yr0:C,yr1:E}),(R||N)&&s.push(je.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=je.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)}},aw(t,n,o)};Ee.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,g=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]))&&(g={yr0:d,yr1:m}),(y||g)&&l.push(je.extendFlat({plotinfo:c},y,g))}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 g(){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=je.extendFlat({},n,{duration:0}),d=p,h=n,setTimeout(y,n.duration),g()):(v=n,d=null,h=je.extendFlat({},n,{duration:0}),setTimeout(g,v.duration),y()):l.length?(v=n,y()):e.anim&&(d=p,h=n,g())},aw(t,n,o)};function aw(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 Dt.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 Dt.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=[Ee.previousPromises,s,r.prepareFn,Ee.rehover,Ee.reselect,o],c=je.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}Ee.doCalcdata=function(t,e){var r=ta.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=K_.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(g){if(n=a[g],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 b=n.transforms[s];o=Gc[b.type],o&&o.calcTransform&&(n._hasCalcTransform=!0,d=!0,o.calcTransform(t,n,b))}}}function m(g,w){if(n=a[g],o=n._module,!!o.isContainer===w){var b=[];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&&(b=o.calc(t,n))}(!Array.isArray(b)||!b[0])&&(b=[{x:Om,y:Om}]),b[0].t||(b[0].t={}),b[0].trace=n,f[g]=b}}for(Gm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)p(l);for(d&&Gm(r,a,i),l=0;l<a.length;l++)m(l,!0);for(l=0;l<a.length;l++)m(l,!1);Um(t);var y=dC(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);Um(t)}Dt.getComponentMethod("fx","calc")(t),Dt.getComponentMethod("errorbars","calc")(t)};var vC=/(total|sum|min|max|mean|median) (ascending|descending)/;function dC(t,e){var r=[],a,i,n,o,l;function s(M,A,D){var P=A._id.charAt(0);if(M==="histogram2dcontour"){var I=A._counterAxes[0],O=ta.getFromId(e,I),B=P==="x"||I==="x"&&O.type==="category",G=P==="y"||I==="y"&&O.type==="category";return function(j,q){return j===0||q===0||B&&j===D[q].length-1||G&&q===D.length-1?-1:(P==="y"?q:j)-1}}else return function(j,q){return P==="y"?q:j}}var f={min:function(M){return je.aggNums(Math.min,null,M)},max:function(M){return je.aggNums(Math.max,null,M)},sum:function(M){return je.aggNums(function(A,D){return A+D},null,M)},total:function(M){return je.aggNums(function(A,D){return A+D},null,M)},mean:function(M){return je.mean(M)},median:function(M){return je.median(M)}};function c(M,A){return M[1]-A[1]}function u(M,A){return A[1]-M[1]}for(a=0;a<t.length;a++){var v=t[a];if(v.type==="category"){var h=v.categoryorder.match(vC);if(h){var d=h[1],p=h[2],m=v._id.charAt(0),y=m==="x",g=[];for(i=0;i<v._categories.length;i++)g.push([v._categories[i],[]]);for(i=0;i<v._traceIndices.length;i++){var w=v._traceIndices[i],b=e._fullData[w];if(b.visible===!0){var x=b.type;Dt.traceIs(b,"histogram")&&(delete b._xautoBinFinished,delete b._yautoBinFinished);var _=x==="splom",k=x==="scattergl",T=e.calcdata[w];for(n=0;n<T.length;n++){var S=T[n],C,L;if(_){var E=b._axesDim[v._id];if(!y){var R=b._diag[E][0];R&&(v=e._fullLayout[ta.id2name(R)])}var N=S.trace.dimensions[E].values;for(o=0;o<N.length;o++)for(C=v._categoriesMap[N[o]],l=0;l<S.trace.dimensions.length;l++)if(l!==E){var H=S.trace.dimensions[l];g[C][1].push(H.values[o])}}else if(k){for(o=0;o<S.t.x.length;o++)y?(C=S.t.x[o],L=S.t.y[o]):(C=S.t.y[o],L=S.t.x[o]),g[C][1].push(L);S.t&&S.t._scene&&delete S.t._scene.dirty}else if(S.hasOwnProperty("z")){L=S.z;var F=s(b.type,v,L);for(o=0;o<L.length;o++)for(l=0;l<L[o].length;l++)C=F(l,o),C+1&&g[C][1].push(L[o][l])}else for(C=S.p,C===void 0&&(C=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++)g[C][1].push(L[o])}}}v._categoriesValue=g;var $=[];for(i=0;i<g.length;i++)$.push([g[i][0],f[d](g[i][1])]);$.sort(p==="descending"?u:c),v._categoriesAggregatedValue=$,v._initialCategories=$.map(function(M){return M[0]}),r=r.concat(v.sortByInitialCategories())}}}return r}function Gm(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}je.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[ta.id2name(l)])}function Um(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]?je.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)}}Ee.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};Ee.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};Ee.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);Dt.getComponentMethod("selections","reselect")(t,i)};Ee.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,je.filterVisible(h),a)}e.traceHash=n};Ee.plotBasePlot=function(t,e,r,a,i){var n=Dt.getModule(t),o=eC(e.calcdata,n)[0];n.plot(e,o,a,i)};Ee.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 vr=W_.exports,iw={exports:{}},_r={},Pn={};(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}})(Pn);var Wr={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=gt,r=ge,a=r.strTranslate,i=Pn,n=Wr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(A,D,P){var I=A.text(),O=!A.attr("data-notex")&&D&&D._context.typesetMath&&typeof MathJax<"u"&&I.match(o),B=e.select(A.node().parentNode);if(B.empty())return;var G=A.attr("class")?A.attr("class").split(" ")[0]:"text";G+="-math",B.selectAll("svg."+G).remove(),B.selectAll("g."+G+"-group").remove(),A.style("display",null).attr({"data-unformatted":I,"data-math":"N"});function j(){B.empty()||(G=A.attr("class")+"-math",B.select("svg."+G).remove()),A.text("").style("white-space","pre");var q=H(A.node(),I);q&&A.style("pointer-events","all"),t.positionText(A),P&&P.call(A)}return O?(D&&D._promises||[]).push(new Promise(function(q){A.style("display","none");var V=parseInt(A.node().style.fontSize,10),K={fontSize:V};u(O[2],K,function(Y,te,oe){B.selectAll("svg."+G).remove(),B.selectAll("g."+G+"-group").remove();var _e=Y&&Y.select("svg");if(!_e||!_e.node()){j(),q();return}var de=B.append("g").classed(G+"-group",!0).attr({"pointer-events":"none","data-unformatted":I,"data-math":"Y"});de.node().appendChild(_e.node()),te&&te.node()&&_e.node().insertBefore(te.node().cloneNode(!0),_e.node().firstChild);var X=oe.width,Q=oe.height;_e.attr({class:G,height:Q,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var le=A.node().style.fill||"black",se=_e.select("g");se.attr({fill:le,stroke:le});var he=se.node().getBoundingClientRect(),Te=he.width,fe=he.height;(Te>X||fe>Q)&&(_e.style("overflow","hidden"),he=_e.node().getBoundingClientRect(),Te=he.width,fe=he.height);var Ae=+A.attr("x"),ce=+A.attr("y"),ye=V||A.node().getBoundingClientRect().height,Se=-ye/4;if(G[0]==="y")de.attr({transform:"rotate("+[-90,Ae,ce]+")"+a(-Te/2,Se-fe/2)});else if(G[0]==="l")ce=Se-fe/2;else if(G[0]==="a"&&G.indexOf("atitle")!==0)Ae=0,ce=Se;else{var Me=A.attr("text-anchor");Ae=Ae-Te*(Me==="middle"?.5:Me==="end"?1:0),ce=ce+Se-fe/2}_e.attr({x:Ae,y:ce}),P&&P.call(A,de),q(de)})})):j(),A};var l=/(<|&lt;|&#60;)/g,s=/(>|&gt;|&#62;)/g;function f(A){return A.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function u(A,D,P){var I=parseInt((MathJax.version||"").split(".")[0]);if(I!==2&&I!==3){r.warn("No MathJax version:",MathJax.version);return}var O,B,G,j,q=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},K=function(){if(O=MathJax.Hub.config.menuSettings.renderer,O!=="SVG")return MathJax.Hub.setRenderer("SVG")},Y=function(){O=MathJax.config.startup.output,O!=="svg"&&(MathJax.config.startup.output="svg")},te=function(){var le="math-output-"+r.randstr({},64);j=e.select("body").append("div").attr({id:le}).style({visibility:"hidden",position:"absolute","font-size":D.fontSize+"px"}).text(f(A));var se=j.node();return I===2?MathJax.Hub.Typeset(se):MathJax.typeset([se])},oe=function(){var le=j.select(I===2?".MathJax_SVG":".MathJax"),se=!le.empty()&&j.select("svg").node();if(!se)r.log("There was an error in the tex syntax.",A),P();else{var he=se.getBoundingClientRect(),Te;I===2?Te=e.select("body").select("#MathJax_SVG_glyphs"):Te=le.select("defs"),P(le,Te,he)}j.remove()},_e=function(){if(O!=="SVG")return MathJax.Hub.setRenderer(O)},de=function(){O!=="svg"&&(MathJax.config.startup.output=O)},X=function(){return G!==void 0&&(MathJax.Hub.processSectionDelay=G),MathJax.Hub.Config(B)},Q=function(){MathJax.config=B};I===2?MathJax.Hub.Queue(q,K,te,oe,_e,X):I===3&&(V(),Y(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){te(),oe(),de(),Q()}))}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,g=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<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(A,D){if(!A)return null;var P=A.match(D),I=P&&(P[3]||P[4]);return I&&R(I)}var C=/(^|;)\s*color:/;t.plainText=function(A,D){D=D||{};for(var P=D.len!==void 0&&D.len!==-1?D.len:1/0,I=D.allowedTags!==void 0?D.allowedTags:["br"],O="...",B=O.length,G=A.split(g),j=[],q="",V=0,K=0;K<G.length;K++){var Y=G[K],te=Y.match(w),oe=te&&te[2].toLowerCase();if(oe)I.indexOf(oe)!==-1&&(j.push(Y),q=oe);else{var _e=Y.length;if(V+_e<P)j.push(Y),V+=_e;else if(V<P){var de=P-V;q&&(q!=="br"||de<=B||_e<=B)&&j.pop(),P>B?j.push(Y.substr(0,de-B)+O):j.push(Y.substr(0,de));break}q=""}}return j.join("")};var L={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function R(A){return A.replace(E,function(D,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||D})}t.convertEntities=R;function N(A){if(!(A>1114111)){var D=String.fromCodePoint;if(D)return D(A);var P=String.fromCharCode;return A<=65535?P(A):P((A>>10)+55232,A%1024+56320)}}function H(A,D){D=D.replace(y," ");var P=!1,I=[],O,B=-1;function G(){B++;var fe=document.createElementNS(i.svg,"tspan");e.select(fe).attr({class:"line",dy:B*n+"em"}),A.appendChild(fe),O=fe;var Ae=I;if(I=[{node:fe}],Ae.length>1)for(var ce=1;ce<Ae.length;ce++)j(Ae[ce])}function j(fe){var Ae=fe.type,ce={},ye;if(Ae==="a"){ye="a";var Se=fe.target,Me=fe.href,J=fe.popup;Me&&(ce={"xlink:xlink:show":Se==="_blank"||Se.charAt(0)!=="_"?"new":"replace",target:Se,"xlink:xlink:href":Me},J&&(ce.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+J+'");return false;'))}else ye="tspan";fe.style&&(ce.style=fe.style);var xe=document.createElementNS(i.svg,ye);if(Ae==="sup"||Ae==="sub"){q(O,p),O.appendChild(xe);var re=document.createElementNS(i.svg,"tspan");q(re,p),e.select(re).attr("dy",d[Ae]),ce.dy=h[Ae],O.appendChild(xe),O.appendChild(re)}else O.appendChild(xe);e.select(xe).attr(ce),O=fe.node=xe,I.push(fe)}function q(fe,Ae){fe.appendChild(document.createTextNode(Ae))}function V(fe){if(I.length===1){r.log("Ignoring unexpected end tag </"+fe+">.",D);return}var Ae=I.pop();fe!==Ae.type&&r.log("Start tag <"+Ae.type+"> doesnt match end tag <"+fe+">. Pretending it did match.",D),O=I[I.length-1].node}var K=b.test(D);K?G():(O=A,I=[{node:A}]);for(var Y=D.split(g),te=0;te<Y.length;te++){var oe=Y[te],_e=oe.match(w),de=_e&&_e[2].toLowerCase(),X=v[de];if(de==="br")G();else if(X===void 0)q(O,R(oe));else if(_e[1])V(de);else{var Q=_e[4],le={type:de},se=S(Q,x);if(se?(se=se.replace(C,"$1 fill:"),X&&(se+=";"+X)):X&&(se=X),se&&(le.style=se),de==="a"){P=!0;var he=S(Q,_);if(he){var Te=F(he);Te&&(le.href=Te,le.target=S(Q,k)||"_blank",le.popup=S(Q,T))}}j(le)}}return P}function F(A){var D=encodeURI(decodeURI(A)),P=document.createElement("a"),I=document.createElement("a");P.href=A,I.href=D;var O=P.protocol,B=I.protocol;return m.indexOf(O)!==-1&&m.indexOf(B)!==-1?D:""}t.sanitizeHTML=function(D){D=D.replace(y," ");for(var P=document.createElement("p"),I=P,O=[],B=D.split(g),G=0;G<B.length;G++){var j=B[G],q=j.match(w),V=q&&q[2].toLowerCase();if(V in v)if(q[1])O.length&&(I=O.pop());else{var K=q[4],Y=S(K,x),te=Y?{style:Y}:{};if(V==="a"){var oe=S(K,_);if(oe){var _e=F(oe);if(_e){te.href=_e;var de=S(K,k);de&&(te.target=de)}}}var X=document.createElement(V);I.appendChild(X),e.select(X).attr(te),I=X,O.push(X)}else I.appendChild(document.createTextNode(R(j)))}var Q="innerHTML";return P[Q]},t.lineCount=function(D){return D.selectAll("tspan.line").size()||1},t.positionText=function(D,P,I){return D.each(function(){var O=e.select(this);function B(q,V){return V===void 0?(V=O.attr(q),V===null&&(O.attr(q,0),V=0)):O.attr(q,V),V}var G=B("x",P),j=B("y",I);this.nodeName==="text"&&O.selectAll("tspan.line").attr({x:G,y:j})})};function $(A,D,P){var I=P.horizontalAlign,O=P.verticalAlign||"top",B=A.node().getBoundingClientRect(),G=D.node().getBoundingClientRect(),j,q,V;return O==="bottom"?q=function(){return B.bottom-j.height}:O==="middle"?q=function(){return B.top+(B.height-j.height)/2}:q=function(){return B.top},I==="right"?V=function(){return B.right-j.width}:I==="center"?V=function(){return B.left+(B.width-j.width)/2}:V=function(){return B.left},function(){j=this.node().getBoundingClientRect();var K=V()-G.left,Y=q()-G.top,te=P.gd||{};if(P.gd){te._fullLayout._calcInverseTransform(te);var oe=r.apply3DTransform(te._fullLayout._invTransform)(K,Y);K=oe[0],Y=oe[1]}return this.style({top:Y+"px",left:K+"px","z-index":1e3}),this}}var M="1px ";t.makeTextShadow=function(A){var D=M,P=M,I=M;return D+P+I+A+", -"+D+"-"+P+I+A+", "+D+"-"+P+I+A+", -"+D+P+I+A},t.makeEditable=function(A,D){var P=D.gd,I=D.delegate,O=e.dispatch("edit","input","cancel"),B=I||A;if(A.style({"pointer-events":I?"none":"all"}),A.size()!==1)throw new Error("boo");function G(){q(),A.style({opacity:0});var V=B.attr("class"),K;V?K="."+V.split(" ")[0]+"-math-group":K="[class*=-math-group]",K&&e.select(A.node().parentNode).select(K).style({opacity:0})}function j(V){var K=V.node(),Y=document.createRange();Y.selectNodeContents(K);var te=window.getSelection();te.removeAllRanges(),te.addRange(Y),K.focus()}function q(){var V=e.select(P),K=V.select(".svg-container"),Y=K.append("div"),te=A.node().style,oe=parseFloat(te.fontSize||12),_e=D.text;_e===void 0&&(_e=A.attr("data-unformatted")),Y.classed("plugin-editable editable",!0).style({position:"absolute","font-family":te.fontFamily||"Arial","font-size":oe,color:D.fill||te.fill||"black",opacity:1,"background-color":D.background||"transparent",outline:"#ffffff33 1px solid",margin:[-oe/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(_e).call($(A,K,D)).on("blur",function(){P._editing=!1,A.text(this.textContent).style({opacity:1});var de=e.select(this).attr("class"),X;de?X="."+de.split(" ")[0]+"-math-group":X="[class*=-math-group]",X&&e.select(A.node().parentNode).select(X).style({opacity:0});var Q=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),O.edit.call(A,Q)}).on("focus",function(){var de=this;P._editing=!0,e.select(document).on("mouseup",function(){if(e.event.target===de)return!1;document.activeElement===Y.node()&&Y.node().blur()})}).on("keyup",function(){e.event.which===27?(P._editing=!1,A.style({opacity:1}),e.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),O.cancel.call(A,this.textContent)):(O.input.call(A,this.textContent),e.select(this).call($(A,K,D)))}).on("keydown",function(){e.event.which===13&&this.blur()}).call(j)}return D.immediate?G():B.on("click",G),e.rebind(A,O,"on")}})(_r);var nw={exports:{}},hC=gt,Cf=wa,El=wt,Rs=ge,Vm=pt,pC=jo.isValid;function mC(t,e,r){var a=e?Rs.nestedProperty(t,e).get()||{}:t,i=a[r||"color"];i&&i._inputArray&&(i=i._inputArray);var n=!1;if(Rs.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(El(i[o])){n=!0;break}}return Rs.isPlainObject(a)&&(n||a.showscale===!0||El(a.cmin)&&El(a.cmax)||pC(a.colorscale)||Rs.isPlainObject(a.colorbar))}var Xm=["showscale","autocolorscale","colorscale","reversescale","colorbar"],il=["min","max","mid","auto"];function ow(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Xm.length;n++)o=Xm[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 lw(t){for(var e=ow(t),r=e.min,a=e.max,i=e.reversescale?sw(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 sw(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 fw(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=Cf(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=hC.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 Ym(s(v))}:c?u=function(v){return El(v)?s(v):Cf(v).isValid()?v:Vm.defaultLine}:u=function(v){return El(v)?Ym(s(v)):Cf(v).isValid()?v:Vm.defaultLine},u.domain=s.domain,u.range=function(){return a},u}function yC(t,e){return fw(lw(t),e)}function Ym(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return Cf(e).toRgbString()}var Oa={hasColorscale:mC,extractOpts:ow,extractScale:lw,flipScale:sw,makeColorScaleFunc:fw,makeColorScaleFuncFromTrace:yC},cw=L_,gC=cw.FORMAT_LINK,bC=cw.DATE_FORMAT_LINK;function xC(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?ep:uw)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function ep(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: "+gC+"."].join(" ")}function uw(t,e){return ep(t,e)+[" And for dates see: "+bC+".","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 Wo={axisHoverFormat:xC,descriptionOnlyNumbers:ep,descriptionWithDates:uw},Cu=Dr,po=Hr,vw=ia.dash,tp=Qt.extendFlat,Wm=Ot.templatedArray,qm=Wo.descriptionWithDates,_C=lr.ONEDAY,Xa=Yr,Du=Xa.HOUR_PATTERN,$u=Xa.WEEKDAY_PATTERN,Df={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(" ")},wC=tp({},Df,{values:Df.values.slice().concat(["sync"]),description:[Df.description,"If *sync*, the number of ticks will sync with the overlayed axis","set by `overlaying` property."].join(" ")});function Zm(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 Km={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(" ")},Qm={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(" ")},Jm={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(" ")},ey={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 ty(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick length (in px)."};return t||(e.dflt=5),e}function ry(t){var e={valType:"number",min:0,editType:"ticks",description:"Sets the tick width (in px)."};return t||(e.dflt=1),e}var ay={valType:"color",dflt:po.defaultLine,editType:"ticks",description:"Sets the tick color."},iy={valType:"color",dflt:po.lightLine,editType:"ticks",description:"Sets the color of the grid lines."};function ny(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 oy=tp({},vw,{editType:"ticks"}),ly={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(" ")},Ja={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:po.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:Cu({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:[Xa.idRegex.x.toString(),Xa.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:[Xa.idRegex.x.toString(),Xa.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:Wm("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:[$u,Du,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+$u+"* - 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 *"+Du+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+$u+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+Du+"', 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:_C,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:wC,nticks:Zm(),tick0:Km,dtick:Qm,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:Jm,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:ey,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:ty(),tickwidth:ry(),tickcolor:ay,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:tp({},vw,{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:Cu({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:qm("tick label")},tickformatstops:Wm("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:qm("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:po.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:ly,gridcolor:iy,gridwidth:ny(),griddash:oy,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:po.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:po.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",Xa.idRegex.x.toString(),Xa.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",Xa.idRegex.x.toString(),Xa.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:Df,nticks:Zm("minor"),tick0:Km,dtick:Qm,tickvals:Jm,ticks:ey,ticklen:ty("minor"),tickwidth:ry("minor"),tickcolor:ay,gridcolor:iy,gridwidth:ny("minor"),griddash:oy,showgrid:ly,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:Cu({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},Yt=Ja,Pu=Dr,sy=Qt.extendFlat,TC=Za.overrideAll,rp=TC({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:Yt.linecolor,outlinewidth:Yt.linewidth,bordercolor:Yt.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:Yt.minor.tickmode,nticks:Yt.nticks,tick0:Yt.tick0,dtick:Yt.dtick,tickvals:Yt.tickvals,ticktext:Yt.ticktext,ticks:sy({},Yt.ticks,{dflt:""}),ticklabeloverflow:sy({},Yt.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:Yt.ticklen,tickwidth:Yt.tickwidth,tickcolor:Yt.tickcolor,ticklabelstep:Yt.ticklabelstep,showticklabels:Yt.showticklabels,labelalias:Yt.labelalias,tickfont:Pu({description:"Sets the color bar's tick label font"}),tickangle:Yt.tickangle,tickformat:Yt.tickformat,tickformatstops:Yt.tickformatstops,tickprefix:Yt.tickprefix,showtickprefix:Yt.showtickprefix,ticksuffix:Yt.ticksuffix,showticksuffix:Yt.showticksuffix,separatethousands:Yt.separatethousands,exponentformat:Yt.exponentformat,minexponent:Yt.minexponent,showexponent:Yt.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:Pu({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:Pu({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=rp,AC=Bo.counter,MC=Vh,dw=jo.scales,SC=MC(dw);function nl(t){return"`"+t+"`"}var En=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),g=nl(f+d),w=nl(f+p),b=g+" 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",b,"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",b+v,"Defaults to `false` when",b,"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,",g,"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",g,"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",b+".","Alternatively, `colorscale` may be a palette name string","of the following list: "+SC+"."].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,",g,"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:AC("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},LC=Qt.extendFlat,CC=En,Eu=jo.scales,Ru="Note that `autocolorscale` must be true for this attribute to work.",hw={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Eu.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",Ru].join(" ")},sequentialminus:{valType:"colorscale",dflt:Eu.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",Ru].join(" ")},diverging:{valType:"colorscale",dflt:Eu.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",Ru].join(" ")}},coloraxis:LC({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},CC("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},DC=ge,pw=function(e){return DC.isPlainObject(e.colorbar)},Vc={},Ed=wt,fy=ge,mw=lr,$C=mw.ONEDAY,PC=mw.ONEWEEK;Vc.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?$C:1;if(!t)return n;if(Ed(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=Ed(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};Vc.tick0=function(t,e,r,a){if(e==="date")return fy.cleanDate(t,fy.dateTick0(r,a%PC===0?1:0));if(!(a==="D1"||a==="D2"))return Ed(t)?Number(t):0};var cy=Vc,EC=ge.isArrayOrTypedArray,RC=or.isTypedArraySpec,zC=or.decodeTypedArraySpec,yw=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(g){var w=l[g];return RC(w)&&(w=zC(w)),w!==void 0?w:(s._template||{})[g]}var u=c("tick0"),v=c("dtick"),h=c("tickvals"),d=EC(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=cy.dtick(v,i);s.tick0=cy.tick0(u,i,r.calendar,m)}else if(i!=="multicategory"){var y=a(f+"tickvals");y===void 0?s.tickmode="auto":o||a("ticktext")}},zu=ge,uy=Ja,gw=function(e,r,a,i){var n=i.isMinor,o=n?e.minor||{}:e,l=n?r.minor:r,s=n?uy.minor:uy,f=n?"minor.":"",c=zu.coerce2(o,l,s,"ticklen",n?(r.ticklen||5)*.6:void 0),u=zu.coerce2(o,l,s,"tickwidth",n?r.tickwidth||1:void 0),v=zu.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)},bw=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]]},zs=ge,IC=Ot,ei=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=zs.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=IC.arrayTemplater(r,i,n),c,u;for(c=0;c<l.length;c++){var v=l[c];zs.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(zs.isArrayOrTypedArray(o)){var d=Math.min(o.length,s.length);for(c=0;c<d;c++)zs.relinkPrivateKeys(s[c],o[c])}return s},Rd=ge,FC=pt.contrast,xw=Ja,NC=bw,HC=ei,_w=function(e,r,a,i,n){n||(n={});var o=a("labelalias");Rd.isPlainObject(o)||delete r.labelalias;var l=NC(e),s=a("showticklabels");if(s){var f=n.font||{},c=r.color,u=r.ticklabelposition||"",v=u.indexOf("inside")!==-1?FC(n.bgColor):c&&c!==xw.color.dflt?c:f.color;if(Rd.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");HC(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:OC}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!d&&i!=="date"&&(a("showexponent",l),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function OC(t,e){function r(i,n){return Rd.coerce(t,e,xw.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var jC=bw,ww=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=jC(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},gi=ge,BC=Ot,GC=yw,UC=gw,VC=_w,XC=ww,YC=rp,Tw=function(e,r,a){var i=BC.newContainer(r,"colorbar"),n=e.colorbar||{};function o(L,E){return gi.coerce(n,i,YC,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",g,w,b,x="left";u?(b="middle",x=y?"left":"right",g=y?1.02:1,w=.5):(b=m?"bottom":"top",x="center",g=.5,w=m?1.02:1),gi.coerce(n,i,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:g}},"x"),gi.coerce(n,i,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:w}},"y"),o("xanchor",x),o("xpad"),o("yanchor",b),o("ypad"),gi.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var _=gi.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"),GC(n,i,o,"linear");var k=a.font,T={noAutotickangles:!0,outerTicks:!1,font:k};_.indexOf("inside")!==-1&&(T.bgColor="black"),XC(n,i,o,"linear",T),VC(n,i,o,"linear",T),UC(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var S=i.showticklabels?i.tickfont:k,C=gi.extendFlat({},S,{color:k.color,size:gi.bigFont(S.size)});gi.coerceFont(o,"title.font",C),o("title.side",u?"top":"right")},vy=wt,zd=ge,WC=pw,qC=Tw,dy=jo.isValid,ZC=lt.traceIs;function Iu(t,e){var r=e.slice(0,e.length-1);return e?zd.nestedProperty(t,r).get()||{}:t}var ms=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=Iu(e,o),c=Iu(r,o),u=Iu(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=ZC(r,"contour")&&zd.nestedProperty(r,"contours.coloring").get()||"heatmap",m=h[d];m?(m[2].push(v),m[0]!==p&&(m[0]=!1,zd.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):h[d]=[p,r,[v]];return}}var y=f[l+"min"],g=f[l+"max"],w=vy(y)&&vy(g)&&y<g,b=i(o+l+"auto",!w);b?i(o+l+"mid"):(i(o+l+"min"),i(o+l+"max"));var x=f.colorscale,_=u.colorscale,k;if(x!==void 0&&(k=!dy(x)),_!==void 0&&(k=!dy(_)),i(o+"autocolorscale",k),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var T;o&&s&&(T=WC(f));var S=i(o+"showscale",T);S&&(o&&u&&(c._template=u),qC(f,c,a))}},hy=ge,KC=Ot,py=hw,QC=ms,JC=function(e,r){function a(u,v){return hy.coerce(e,r,py,u,v)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(u,v){return hy.coerce(n,o,py.coloraxis,u,v)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=KC.newContainer(r,s,"coloraxis"),o._name=s,QC(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},eD=ge,tD=Oa.hasColorscale,rD=Oa.extractOpts,aD=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?eD.nestedProperty(c,u.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var h=rD(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);tD(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=wt,Fu=ge,iD=Oa.extractOpts,ap=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?Fu.nestedProperty(r,o).get():r,s=iD(l),f=s.auto!==!1,c=s.min,u=s.max,v=s.mid,h=function(){return Fu.aggNums(Math.min,null,n)},d=function(){return Fu.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)}},Is=jo,Nn=Oa,Co={moduleType:"component",name:"colorscale",attributes:En,layoutAttributes:hw,supplyLayoutDefaults:JC,handleDefaults:ms,crossTraceDefaults:aD,calc:ap,scales:Is.scales,defaultScale:Is.defaultScale,getScale:Is.get,isValidScale:Is.isValid,hasColorscale:Nn.hasColorscale,extractOpts:Nn.extractOpts,extractScale:Nn.extractScale,flipScale:Nn.flipScale,makeColorScaleFunc:Nn.makeColorScaleFunc,makeColorScaleFuncFromTrace:Nn.makeColorScaleFuncFromTrace},yy=ge,nD=or.isTypedArraySpec,Or={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 yy.isPlainObject(e)&&(yy.isArrayOrTypedArray(e.size)||nD(e.size))}},oD=wt,kw=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 oD(s)&&s>0?Math.max(s,n):0}},ka={};(function(t){var e=ge;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]}})(ka);var Nu,gy;function lD(){if(gy)return Nu;gy=1;var t=X1,e=gt.round,r="M0,0Z",a=Math.sqrt(2),i=Math.sqrt(3),n=Math.PI,o=Math.cos,l=Math.sin;Nu={circle:{n:0,f:function(d,p,m){if(s(p))return r;var y=e(d,2),g="M"+y+",0A"+y+","+y+" 0 1,1 0,-"+y+"A"+y+","+y+" 0 0,1 "+y+",0Z";return m?h(p,m,g):g}},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),g=e(d*1.2,2);return h(p,m,"M"+g+","+y+"H"+y+"V"+g+"H-"+y+"V"+y+"H-"+g+"V-"+y+"H-"+y+"V-"+g+"H"+y+"V-"+y+"H"+g+"Z")}},x:{n:4,f:function(d,p,m){if(s(p))return r;var y=e(d*.8/a,2),g="l"+y+","+y,w="l"+y+",-"+y,b="l-"+y+",-"+y,x="l-"+y+","+y;return h(p,m,"M0,"+y+g+w+b+w+b+x+b+x+g+x+g+"Z")}},"triangle-up":{n:5,f:function(d,p,m){if(s(p))return r;var y=e(d*2/i,2),g=e(d/2,2),w=e(d,2);return h(p,m,"M-"+y+","+g+"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),g=e(d/2,2),w=e(d,2);return h(p,m,"M-"+y+",-"+g+"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),g=e(d/2,2),w=e(d,2);return h(p,m,"M"+g+",-"+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),g=e(d/2,2),w=e(d,2);return h(p,m,"M-"+g+",-"+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),g=e(d*1.2,2);return h(p,m,"M-"+g+",-"+y+"H"+y+"V"+g+"Z")}},"triangle-se":{n:10,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),g=e(d*1.2,2);return h(p,m,"M"+y+",-"+g+"V"+y+"H-"+g+"Z")}},"triangle-sw":{n:11,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),g=e(d*1.2,2);return h(p,m,"M"+g+","+y+"H-"+y+"V-"+g+"Z")}},"triangle-nw":{n:12,f:function(d,p,m){if(s(p))return r;var y=e(d*.6,2),g=e(d*1.2,2);return h(p,m,"M-"+y+","+g+"V-"+y+"H"+g+"Z")}},pentagon:{n:13,f:function(d,p,m){if(s(p))return r;var y=e(d*.951,2),g=e(d*.588,2),w=e(-d,2),b=e(d*-.309,2),x=e(d*.809,2);return h(p,m,"M"+y+","+b+"L"+g+","+x+"H-"+g+"L-"+y+","+b+"L0,"+w+"Z")}},hexagon:{n:14,f:function(d,p,m){if(s(p))return r;var y=e(d,2),g=e(d/2,2),w=e(d*i/2,2);return h(p,m,"M"+w+",-"+g+"V"+g+"L0,"+y+"L-"+w+","+g+"V-"+g+"L0,-"+y+"Z")}},hexagon2:{n:15,f:function(d,p,m){if(s(p))return r;var y=e(d,2),g=e(d/2,2),w=e(d*i/2,2);return h(p,m,"M-"+g+","+w+"H"+g+"L"+y+",0L"+g+",-"+w+"H-"+g+"L-"+y+",0Z")}},octagon:{n:16,f:function(d,p,m){if(s(p))return r;var y=e(d*.924,2),g=e(d*.383,2);return h(p,m,"M-"+g+",-"+y+"H"+g+"L"+y+",-"+g+"V"+g+"L"+g+","+y+"H-"+g+"L-"+y+","+g+"V-"+g+"Z")}},star:{n:17,f:function(d,p,m){if(s(p))return r;var y=d*1.4,g=e(y*.225,2),w=e(y*.951,2),b=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),C=e(y*.382,2);return h(p,m,"M"+g+","+k+"H"+w+"L"+b+","+T+"L"+x+","+S+"L0,"+C+"L-"+x+","+S+"L-"+b+","+T+"L-"+w+","+k+"H-"+g+"L0,"+_+"Z")}},hexagram:{n:18,f:function(d,p,m){if(s(p))return r;var y=e(d*.66,2),g=e(d*.38,2),w=e(d*.76,2);return h(p,m,"M-"+w+",0l-"+g+",-"+y+"h"+w+"l"+g+",-"+y+"l"+g+","+y+"h"+w+"l-"+g+","+y+"l"+g+","+y+"h-"+w+"l-"+g+","+y+"l-"+g+",-"+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),g=e(d*.8,2),w=e(d*1.6,2),b=e(d*4,2),x="A "+b+","+b+" 0 0 1 ";return h(p,m,"M-"+y+","+g+x+y+","+g+x+"0,-"+w+x+"-"+y+","+g+"Z")}},"star-triangle-down":{n:20,f:function(d,p,m){if(s(p))return r;var y=e(d*i*.8,2),g=e(d*.8,2),w=e(d*1.6,2),b=e(d*4,2),x="A "+b+","+b+" 0 0 1 ";return h(p,m,"M"+y+",-"+g+x+"-"+y+",-"+g+x+"0,"+w+x+y+",-"+g+"Z")}},"star-square":{n:21,f:function(d,p,m){if(s(p))return r;var y=e(d*1.1,2),g=e(d*2,2),w="A "+g+","+g+" 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),g=e(d*1.9,2),w="A "+g+","+g+" 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),g=e(d*1.4,2);return h(p,m,"M0,"+g+"L"+y+",0L0,-"+g+"L-"+y+",0Z")}},"diamond-wide":{n:24,f:function(d,p,m){if(s(p))return r;var y=e(d*1.4,2),g=e(d*.7,2);return h(p,m,"M0,"+g+"L"+y+",0L0,-"+g+"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),g=e(d/a,2);return h(p,m,"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g+"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),g=e(d*.65,2);return h(p,m,"M"+y+",0L0,"+y+"L-"+y+",0L0,-"+y+"ZM-"+g+",-"+g+"L"+g+","+g+"M-"+g+","+g+"L"+g+",-"+g)},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),g=e(d*.85,2);return h(p,m,"M0,"+y+"V-"+y+"M"+y+",0H-"+y+"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g)},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),g=e(d,2);return h(p,m,"M"+y+","+g+"V-"+g+"M"+(y-g)+",-"+g+"V"+g+"M"+g+","+y+"H-"+g+"M-"+g+","+(y-g)+"H"+g)},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),g=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M-"+y+","+w+"L0,0M"+y+","+w+"L0,0M0,-"+g+"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),g=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M-"+y+",-"+w+"L0,0M"+y+",-"+w+"L0,0M0,"+g+"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),g=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M"+w+","+y+"L0,0M"+w+",-"+y+"L0,0M-"+g+",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),g=e(d*1.6,2),w=e(d*.8,2);return h(p,m,"M-"+w+","+y+"L0,0M-"+w+",-"+y+"L0,0M"+g+",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),g=e(d*2,2);return h(p,m,"M0,0L-"+y+","+g+"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),g=e(d*2,2);return h(p,m,"M0,0L-"+y+",-"+g+"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),g=e(d,2);return h(p,m,"M0,0L"+y+",-"+g+"V"+g+"Z")},noDot:!0},"arrow-right":{n:48,f:function(d,p,m){if(s(p))return r;var y=e(d*2,2),g=e(d,2);return h(p,m,"M0,0L-"+y+",-"+g+"V"+g+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(d,p,m){if(s(p))return r;var y=e(d,2),g=e(d*2,2);return h(p,m,"M-"+y+",0H"+y+"M0,0L-"+y+","+g+"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),g=e(d*2,2);return h(p,m,"M-"+y+",0H"+y+"M0,0L-"+y+",-"+g+"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),g=e(d,2);return h(p,m,"M0,-"+g+"V"+g+"M0,0L"+y+",-"+g+"V"+g+"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),g=e(d,2);return h(p,m,"M0,-"+g+"V"+g+"M0,0L-"+y+",-"+g+"V"+g+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(d,p,m){if(s(p))return r;var y=n/2.5,g=2*d*o(y),w=2*d*l(y);return h(p,m,"M0,0L"+-g+","+w+"L"+g+","+w+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(d,p,m){if(s(p))return r;var y=n/4,g=2*d*o(y),w=2*d*l(y);return h(p,m,"M0,0L"+-g+","+w+"A "+2*d+","+2*d+" 0 0 1 "+g+","+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),M=H[0],A=H[1]+(p||0);return[M*F-A*$,M*$+A*F]}for(var g=d/180*n,w=0,b=0,x=t(m),_="",k=0;k<x.length;k++){var T=x[k],S=T[0],C=w,L=b;if(S==="M"||S==="L")w=+T[1],b=+T[2];else if(S==="m"||S==="l")w+=+T[1],b+=+T[2];else if(S==="H")w=+T[1];else if(S==="h")w+=+T[1];else if(S==="V")b=+T[1];else if(S==="v")b+=+T[1];else if(S==="A"){w=+T[1],b=+T[2];var E=y(g,[+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-=C,b-=L);var R=y(g,[w,b]);(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 Nu}var xr=gt,Ht=ge,sD=Ht.numberFormat,wn=wt,Id=wa,Xc=lt,Er=pt,fD=Co,Vl=Ht.strTranslate,ip=_r,cD=Pn,uD=Wr,vD=uD.LINE_SPACING,Aw=vs.DESELECTDIM,dD=Or,hD=kw,pD=ka.appendArrayPointValue,ze=nw.exports={};ze.font=function(t,e,r,a){Ht.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(Er.fill,a)};ze.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};ze.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};ze.setRect=function(t,e,r,a,i){t.call(ze.setPosition,e,r).call(ze.setSize,a,i)};ze.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(wn(i)&&wn(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",Vl(i,n));else return!1;return!0};ze.translatePoints=function(t,e,r){t.each(function(a){var i=xr.select(this);ze.translatePoint(a,i,e,r)})};ze.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};ze.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=Xc.traceIs(n,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(f){ze.hideOutsideRangePoint(f,xr.select(this),r,a,o,l)})})}};ze.crispRound=function(t,e,r){return!e||!wn(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};ze.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||"";Er.stroke(e,a||n.color),ze.dashLine(e,l,o)};ze.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||"";xr.select(this).call(Er.stroke,r||n.color).call(ze.dashLine,l,o)})};ze.dashLine=function(t,e,r){r=+r||0,e=ze.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};ze.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 Mw(t,e,r){var a=e.fillpattern,i=a&&ze.getPatternAttr(a.shape,0,"");if(i){var n=ze.getPatternAttr(a.bgcolor,0,null),o=ze.getPatternAttr(a.fgcolor,0,null),l=a.fgopacity,s=ze.getPatternAttr(a.size,0,8),f=ze.getPatternAttr(a.solidity,0,.3),c=e.uid;ze.pattern(t,"point",r,c,i,s,f,void 0,a.fillmode,n,o,l)}else e.fillcolor&&t.call(Er.fill,e.fillcolor)}ze.singleFillStyle=function(t,e){var r=xr.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};Mw(t,i,e)};ze.fillGroupStyle=function(t,e){t.style("stroke-width",0).each(function(r){var a=xr.select(this);r[0].trace&&Mw(a,r[0].trace,e)})};var by=lD();ze.symbolNames=[];ze.symbolFuncs=[];ze.symbolBackOffs=[];ze.symbolNeedLines={};ze.symbolNoDot={};ze.symbolNoFill={};ze.symbolList=[];Object.keys(by).forEach(function(t){var e=by[t],r=e.n;ze.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),ze.symbolNames[r]=t,ze.symbolFuncs[r]=e.f,ze.symbolBackOffs[r]=e.backoff||0,e.needLine&&(ze.symbolNeedLines[r]=!0),e.noDot?ze.symbolNoDot[r]=!0:ze.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(ze.symbolNoFill[r]=!0)});var mD=ze.symbolNames.length,yD="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ze.symbolNumber=function(t){if(wn(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=ze.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=mD||t>=400?0:Math.floor(Math.max(t,0))};function Sw(t,e,r,a){var i=t%100;return ze.symbolFuncs[i](e,r,a)+(t>=200?yD:"")}var xy={x1:1,x2:0,y1:0,y2:0},_y={x1:0,x2:0,y1:1,y2:0},wy=sD("~f"),Lw={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:xy},horizontalreversed:{node:"linearGradient",attrs:xy,reversed:!0},vertical:{node:"linearGradient",attrs:_y},verticalreversed:{node:"linearGradient",attrs:_y,reversed:!0}};ze.gradient=function(t,e,r,a,i,n){for(var o=i.length,l=Lw[a],s=new Array(o),f=0;f<o;f++)l.reversed?s[o-1-f]=[wy((1-i[f][0])*100),i[f][1]]:s[f]=[wy(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(";")],Ht.identity);v.exit().remove(),v.enter().append(l.node).each(function(){var h=xr.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=Id(p[1]);xr.select(this).attr({offset:p[0]+"%","stop-color":Er.tinyRGB(m),"stop-opacity":m.getAlpha()})})}),t.style(n,np(u,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)};ze.pattern=function(t,e,r,a,i,n,o,l,s,f,c,u){var v=e==="legend";l&&(s==="overlay"?(f=l,c=Er.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)},g,w,b,x,_={},k=Id(c),T=Er.tinyRGB(k),S=k.getAlpha(),C=u*S;switch(i){case"/":p=n*Math.sqrt(2),m=n*Math.sqrt(2),g="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:g,opacity:C,stroke:T,"stroke-width":w+"px"};break;case"\\":p=n*Math.sqrt(2),m=n*Math.sqrt(2),g="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:g,opacity:C,stroke:T,"stroke-width":w+"px"};break;case"x":p=n*Math.sqrt(2),m=n*Math.sqrt(2),g="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:g,opacity:C,stroke:T,"stroke-width":w+"px"};break;case"|":p=n,m=n,x="path",g="M"+p/2+",0L"+p/2+","+m,w=o*n,x="path",_={d:g,opacity:C,stroke:T,"stroke-width":w+"px"};break;case"-":p=n,m=n,x="path",g="M0,"+m/2+"L"+p+","+m/2,w=o*n,x="path",_={d:g,opacity:C,stroke:T,"stroke-width":w+"px"};break;case"+":p=n,m=n,x="path",g="M"+p/2+",0L"+p/2+","+m+"M0,"+m/2+"L"+p+","+m/2,w=n-n*Math.sqrt(1-o),x="path",_={d:g,opacity:C,stroke:T,"stroke-width":w+"px"};break;case".":p=n,m=n,o<Math.PI/4?b=Math.sqrt(o*n*n/Math.PI):b=y(o,Math.PI/4,1,n/2,n/Math.sqrt(2)),x="circle",_={cx:p/2,cy:m/2,r:b,opacity:C,fill:T};break}var L=[i||"noSh",f||"noBg",c||"noFg",n,o].join(";"),E=h._defs.select(".patterns").selectAll("#"+d).data([L],Ht.identity);E.exit().remove(),E.enter().append("pattern").each(function(){var R=xr.select(this);if(R.attr({id:d,width:p+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:v?"scale(0.8)":""}),f){var N=Id(f),H=Er.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 M=R.selectAll(x).data([0]);M.exit().remove(),M.enter().append(x).attr(_)}),t.style("fill",np(d,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};ze.initGradients=function(t){var e=t._fullLayout,r=Ht.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),xr.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};ze.initPatterns=function(t){var e=t._fullLayout,r=Ht.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),xr.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};ze.getPatternAttr=function(t,e,r){return t&&Ht.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};ze.pointStyle=function(t,e,r,a){if(t.size()){var i=ze.makePointStyleFns(e);t.each(function(n){ze.singlePointStyle(n,xr.select(this),e,i,r,a)})}};ze.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=ze.symbolNumber(t.mx||o.symbol)||0;t.om=f%200>=100;var c=lp(t,r),u=op(t,r);e.attr("d",Sw(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):Ht.isArrayOrTypedArray(l.color)?d=Er.defaultLine:d=l.color,Ht.isArrayOrTypedArray(o.color)&&(h=Er.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(Er.stroke,h).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:p)+"px");var y=o.gradient,g=t.mgt;g?v=!0:g=y&&y.type,Ht.isArrayOrTypedArray(g)&&(g=g[0],Lw[g]||(g=0));var w=o.pattern,b=w&&ze.getPatternAttr(w.shape,t.i,"");if(g&&g!=="none"){var x=t.mgc;x?v=!0:x=y.color;var _=r.uid;v&&(_+="-"+t.i),ze.gradient(e,i,_,g,[[0,x],[1,h]],"fill")}else if(b){var k=!1,T=w.fgcolor;!T&&n&&n.color&&(T=n.color,k=!0);var S=ze.getPatternAttr(T,t.i,n&&n.color||null),C=ze.getPatternAttr(w.bgcolor,t.i,null),L=w.fgopacity,E=ze.getPatternAttr(w.size,t.i,8),R=ze.getPatternAttr(w.solidity,t.i,.3);k=k||t.mcc||Ht.isArrayOrTypedArray(w.shape)||Ht.isArrayOrTypedArray(w.bgcolor)||Ht.isArrayOrTypedArray(w.fgcolor)||Ht.isArrayOrTypedArray(w.size)||Ht.isArrayOrTypedArray(w.solidity);var N=r.uid;k&&(N+="-"+t.i),ze.pattern(e,"point",i,N,b,E,R,t.mcc,w.fillmode,C,S,L)}else Ht.isArrayOrTypedArray(h)?Er.fill(e,h[t.i]):Er.fill(e,h);p&&Er.stroke(e,d)}};ze.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=ze.tryColorscale(r,""),e.lineScale=ze.tryColorscale(r,"line"),Xc.traceIs(t,"symbols")&&(e.ms2mrc=dD.isBubble(t)?hD(t):function(){return(r.size||6)/2}),t.selectedpoints&&Ht.extendFlat(e,ze.makeSelectedPointStyleFns(t)),e};ze.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;(Ht.isArrayOrTypedArray(l)||c||u)&&(e.selectedOpacityFn=function(b){var x=b.mo===void 0?i.opacity:b.mo;return b.selected?c?s:x:u?f:Aw*x});var v=i.color,h=n.color,d=o.color;(h||d)&&(e.selectedColorFn=function(b){var x=b.mcc||v;return b.selected?h||x:d||x});var p=i.size,m=n.size,y=o.size,g=m!==void 0,w=y!==void 0;return Xc.traceIs(t,"symbols")&&(g||w)&&(e.selectedSizeFn=function(b){var x=b.mrc||p/2;return b.selected?g?m/2:x:w?y/2:x}),e};ze.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:Er.addOpacity(u,Aw))},e};ze.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=ze.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){Er.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",Sw(ze.symbolNumber(l),s,lp(o,e),op(o,e))),o.mrc2=s}),i.length&&t.each(function(n){for(var o=xr.select(this),l=0;l<i.length;l++)i[l](o,n)})}};ze.tryColorscale=function(t,e){var r=e?Ht.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&Ht.isArrayOrTypedArray(a))return fD.makeColorScaleFuncFromTrace(r)}return Ht.identity};var Hu={start:1,end:-1,middle:0,bottom:1,top:-1};function Cw(t,e,r,a,i){var n=xr.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=(ip.lineCount(t)-1)*vD+1,c=Hu[l]*s,u=r*.75+Hu[o]*s+(Hu[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",Vl(c,u))}function Dw(t,e){var r=t.ts||e.textfont.size;return wn(r)&&r>0?r:0}ze.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var i=ze.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=xr.select(this),f=n?Ht.extractOption(l,e,"txt","texttemplate"):Ht.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={};pD(v,e,l.i);var h=e._meta||{};f=Ht.texttemplateString(f,u,o._d3locale,v,l,h)}var d=l.tp||e.textposition,p=Dw(l,e),m=a?a(l):l.tc||e.textfont.color;s.call(ze.font,l.tf||e.textfont.family,p,m).text(f).call(ip.convertToTspans,r).call(Cw,d,p,l.mrc)})}};ze.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=ze.makeSelectedTextStyleFns(e);t.each(function(a){var i=xr.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=Dw(a,e);Er.fill(i,n);var s=Xc.traceIs(e,"bar-like");Cw(i,o,l,a.mrc2||a.mrc,s)})}};var Ty=.5;ze.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($f(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};ze.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[$f(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push($f(t[n-1],t[n],t[n+1],e));for(i.push($f(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 $w,Pw;function mo(t,e,r){return r&&(t=Ew(t)),e?mn(t[1]):pn(t[0])}function pn(t){var e=xr.round(t,2);return $w=e,e}function mn(t){var e=xr.round(t,2);return Pw=e,e}function $f(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,Ty/2),f=Math.pow(o*o+l*l,Ty/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[[pn(e[0]+(v&&c/v)),mn(e[1]+(v&&u/v))],[pn(e[0]-(h&&c/h)),mn(e[1]-(h&&u/h))]]}var gD={hv:function(t,e,r){return"H"+pn(e[0])+"V"+mo(e,1,r)},vh:function(t,e,r){return"V"+mn(e[1])+"H"+mo(e,0,r)},hvh:function(t,e,r){return"H"+pn((t[0]+e[0])/2)+"V"+mn(e[1])+"H"+mo(e,0,r)},vhv:function(t,e,r){return"V"+mn((t[1]+e[1])/2)+"H"+pn(e[0])+"V"+mo(e,1,r)}},bD=function(t,e,r){return"L"+mo(e,0,r)+","+mo(e,1,r)};ze.steps=function(t){var e=gD[t]||bD;return function(r){for(var a="M"+pn(r[0][0])+","+mn(r[0][1]),i=r.length,n=1;n<i;n++)a+=e(r[n-1],r[n],n===i-1);return a}};function Ew(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=Ht.isArrayOrTypedArray(r),l=t,s=e?e[0]:$w||0,f=e?e[1]:Pw||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,g=y.symbol;Ht.isArrayOrTypedArray(g)&&(g=g[m]);var w=y.size;Ht.isArrayOrTypedArray(w)&&(w=w[m]),p=y?ze.symbolBackOffs[ze.symbolNumber(g)]*w:0,p+=ze.getMarkerStandoff(i[m],a)||0}var b=c-p*Math.cos(d),x=u-p*Math.sin(d);(b<=c&&b>=s||b>=c&&b<=s)&&(x<=u&&x>=f||x>=u&&x<=f)&&(t=[b,x])}return t}ze.applyBackoff=Ew;ze.makeTester=function(){var t=Ht.ensureSingleById(xr.select("body"),"svg","js-plotly-tester",function(r){r.attr(cD.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=Ht.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ze.tester=t,ze.testref=e};ze.savedBBoxes={};var Ou=0,xD=1e4;ze.bBox=function(t,e,r){r||(r=ky(t));var a;if(r){if(a=ze.savedBBoxes[r],a)return Ht.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=ky(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=ze.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=ze.savedBBoxes[r],a)return Ht.extendFlat({},a)}}var f,c;e?f=t:(c=ze.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),xr.select(f).attr("transform",null).call(ip.positionText,0,0);var u=f.getBoundingClientRect(),v=ze.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 Ou>=xD&&(ze.savedBBoxes={},Ou=0),r&&(ze.savedBBoxes[r]=h),Ou++,Ht.extendFlat({},h)};function ky(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}ze.setClipUrl=function(t,e,r){t.attr("clip-path",np(e,r))};function np(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}ze.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}};ze.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+=Vl(e,r),o=o.trim(),t[n]("transform",o),o};ze.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}};ze.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 _D=/\s*sc.*/;ze.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(_D,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var wD=/translate\([^)]*\)\s*$/;ze.setTextPointsScale=function(t,e,r){t&&t.each(function(){var a,i=xr.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(wD);e===1&&r===1?a=[]:a=[Vl(o,l),"scale("+e+","+r+")",Vl(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};function op(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}ze.getMarkerStandoff=op;var ol=Math.atan2,fn=Math.cos,yo=Math.sin;function Ay(t,e){var r=e[0],a=e[1];return[r*fn(t)-a*yo(t),r*yo(t)+a*fn(t)]}var My,Sy,Ly,Cy,ju,Bu;function lp(t,e){var r=t.ma;r===void 0&&(r=e.marker.angle,(!r||Ht.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,g=My/180*Math.PI,w=Sy/180*Math.PI,b=g-m,x=fn(w)*yo(b),_=yo(w)*fn(y)-fn(w)*yo(y)*fn(b);p=-ol(x,_)-Math.PI,My=f,Sy=c}var k=Ay(h,[fn(p),0]),T=Ay(d,[yo(p),0]);r=ol(k[1]+T[1],k[0]+T[0])/Math.PI*180,n==="previous"&&!(Bu===e.uid&&t.i===ju+1)&&(r=null)}if(n==="previous"&&!e._geo)if(Bu===e.uid&&t.i===ju+1&&wn(a)&&wn(i)){var S=a-Ly,C=i-Cy,L=e.line&&e.line.shape||"",E=L.slice(L.length-1);E==="h"&&(C=0),E==="v"&&(S=0),r+=ol(C,S)/Math.PI*180+90}else r=null}return Ly=a,Cy=i,ju=t.i,Bu=e.uid,r}ze.getMarkerAngle=lp;var $t=nw.exports,Fs=gt,TD=wt,Dy=vr,$y=lt,lo=ge,Py=lo.strTranslate,Ey=$t,Ry=pt,Gu=_r,zy=vs,kD=Wr.OPPOSITE_SIDE,Iy=/ [XY][0-9]* /;function AD(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,g=m.size,w=m.color,b;i==="title.text"?b="titleText":i.indexOf("axis")!==-1?b="axisTitleText":i.indexOf("colorbar"!==-1)&&(b="colorbarTitleText");var x=t._context.edits[b];p===""?v=0:p.replace(Iy," % ")===n.replace(Iy," % ")&&(v=.2,h=!0,x||(p="")),r._meta?p=lo.templateString(p,r._meta):u._meta&&(p=lo.templateString(p,u._meta));var _=p||x,k;c||(c=lo.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){lo.syncOrAsync([C,L],R)}function C(R){var N;return!f&&k&&(f={}),f?(N="",f.rotate&&(N+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||k)&&(N+=Py(0,(f.offset||0)-(k||0)))):N=null,R.attr("transform",N),R.style({"font-family":y,"font-size":Fs.round(g,2)+"px",fill:Ry.rgb(w),opacity:v*Ry.opacity(w),"font-weight":Dy.fontWeight}).attr(s).call(Gu.convertToTspans,t),Dy.previousPromises(t)}function L(R){var N=Fs.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,$=TD(l.pad)?l.pad:2,M=Ey.bBox(N.node()),A={t:0,b:0,l:0,r:0},D=t._fullLayout._reservedMargin;for(var P in D)for(var I in D[P]){var O=D[P][I];A[I]=Math.max(A[I],O)}var B={left:A.l,top:A.t,right:u.width-A.r,bottom:u.height-A.b},G=l.maxShift||F*(B[l.side]-M[l.side]),j=0;if(G<0)j=G;else{var q=l.offsetLeft||0,V=l.offsetTop||0;M.left-=q,M.right-=q,M.top-=V,M.bottom-=V,l.selection.each(function(){var Y=Ey.bBox(this);lo.bBoxIntersect(M,Y,$)&&(j=Math.max(j,F*(Y[l.side]-M[H])+$))}),j=Math.min(G,j),a._titleScoot=Math.abs(j)}if(j>0||G<0){var K={left:[-j,0],right:[j,0],top:[0,-j],bottom:[0,j]}[l.side];N.attr("transform",Py(K[0],K[1]))}}}T.call(S);function E(){v=0,h=!0,T.text(n).on("mouseover.opacity",function(){Fs.select(this).transition().duration(zy.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Fs.select(this).transition().duration(zy.HIDE_PLACEHOLDER).style("opacity",0)})}return x&&(p?T.on(".opacity",null):E(),T.call(Gu.makeEditable,{gd:t}).on("edit",function(R){o!==void 0?$y.call("_guiRestyle",t,i,R,o):$y.call("_guiRelayout",t,i,R)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(S)}).on("input",function(R){this.text(R||" ").call(Gu.positionText,s.x,s.y)})),T.classed("js-placeholder",h),c}var Yc={draw:AD},MD=gt,SD=Gl.utcFormat,Vt=ge,LD=Vt.numberFormat,ja=wt,bi=Vt.cleanNumber,CD=Vt.ms2DateTime,Fy=Vt.dateTime2ms,Ba=Vt.ensureNumber,Ny=Vt.isArrayOrTypedArray,Gi=lr,Ns=Gi.FP_SAFE,Sa=Gi.BADNUM,DD=Gi.LOG_CLIP,$D=Gi.ONEWEEK,Hs=Gi.ONEDAY,Os=Gi.ONEHOUR,Hy=Gi.ONEMIN,Oy=Gi.ONESEC,js=sr,Zf=Yr,Bs=Zf.HOUR_PATTERN,Gs=Zf.WEEKDAY_PATTERN;function ll(t){return Math.pow(10,t)}function Uu(t){return t!=null}var sp=function(e,r){r=r||{};var a=e._id||"x",i=a.charAt(0);function n(b,x){if(b>0)return Math.log(b)/Math.LN10;if(b<=0&&x&&e.range&&e.range.length===2){var _=e.range[0],k=e.range[1];return .5*(_+k-2*DD*Math.abs(_-k))}else return Sa}function o(b,x,_,k){if((k||{}).msUTC&&ja(b))return+b;var T=Fy(b,_||e.calendar);if(T===Sa)if(ja(b)){b=+b;var S=Math.floor(Vt.mod(b+.05,1)*10),C=Math.round(b-S/10);T=Fy(new Date(C))+S/10}else return Sa;return T}function l(b,x,_){return CD(b,x,_||e.calendar)}function s(b){return e._categories[Math.round(b)]}function f(b){if(Uu(b)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[b]!==void 0)return e._categoriesMap[b];e._categories.push(typeof b=="number"?String(b):b);var x=e._categories.length-1;return e._categoriesMap[b]=x,x}return Sa}function c(b,x){for(var _=new Array(x),k=0;k<x;k++){var T=(b[0]||[])[k],S=(b[1]||[])[k];_[k]=u([T,S])}return _}function u(b){if(e._categoriesMap)return e._categoriesMap[b]}function v(b){var x=u(b);if(x!==void 0)return x;if(ja(b))return+b}function h(b){return ja(b)?+b:u(b)}function d(b,x,_){return MD.round(_+x*b,2)}function p(b,x,_){return(b-_)/x}var m=function(x){return ja(x)?d(x,e._m,e._b):Sa},y=function(b){return p(b,e._m,e._b)};if(e.rangebreaks){var g=i==="y";m=function(b){if(!ja(b))return Sa;var x=e._rangebreaks.length;if(!x)return d(b,e._m,e._b);var _=g;e.range[0]>e.range[1]&&(_=!_);for(var k=_?-1:1,T=k*b,S=0,C=0;C<x;C++){var L=k*e._rangebreaks[C].min,E=k*e._rangebreaks[C].max;if(T<L)break;if(T>E)S=C+1;else{S=T<(L+E)/2?C:C+1;break}}var R=e._B[S]||0;return isFinite(R)?d(b,e._m2,R):0},y=function(b){var x=e._rangebreaks.length;if(!x)return p(b,e._m,e._b);for(var _=0,k=0;k<x&&!(b<e._rangebreaks[k].pmin);k++)b>e._rangebreaks[k].pmax&&(_=k+1);return p(b,e._m2,e._B[_])}}e.c2l=e.type==="log"?n:Ba,e.l2c=e.type==="log"?ll:Ba,e.l2p=m,e.p2l=y,e.c2p=e.type==="log"?function(b,x){return m(n(b,x))}:m,e.p2c=e.type==="log"?function(b){return ll(y(b))}:y,["linear","-"].indexOf(e.type)!==-1?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=bi,e.c2d=e.c2r=e.l2d=e.l2r=Ba,e.d2p=e.r2p=function(b){return e.l2p(bi(b))},e.p2d=e.p2r=y,e.cleanPos=Ba):e.type==="log"?(e.d2r=e.d2l=function(b,x){return n(bi(b),x)},e.r2d=e.r2c=function(b){return ll(bi(b))},e.d2c=e.r2l=bi,e.c2d=e.l2r=Ba,e.c2r=n,e.l2d=ll,e.d2p=function(b,x){return e.l2p(e.d2r(b,x))},e.p2d=function(b){return ll(y(b))},e.r2p=function(b){return e.l2p(bi(b))},e.p2r=y,e.cleanPos=Ba):e.type==="date"?(e.d2r=e.r2d=Vt.identity,e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=l,e.d2p=e.r2p=function(b,x,_){return e.l2p(o(b,0,_))},e.p2d=e.p2r=function(b,x,_){return l(y(b),x,_)},e.cleanPos=function(b){return Vt.cleanDate(b,Sa,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(b){var x=h(b);return x!==void 0?x:e.fraction2r(.5)},e.l2r=e.c2r=Ba,e.r2l=h,e.d2p=function(b){return e.l2p(e.r2c(b))},e.p2d=function(b){return s(y(b))},e.r2p=e.d2p,e.p2r=y,e.cleanPos=function(b){return typeof b=="string"&&b!==""?b:Ba(b)}):e.type==="multicategory"&&(e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=v,e.r2c=function(b){var x=v(b);return x!==void 0?x:e.fraction2r(.5)},e.r2c_just_indices=u,e.l2r=e.c2r=Ba,e.r2l=v,e.d2p=function(b){return e.l2p(e.r2c(b))},e.p2d=function(b){return s(y(b))},e.r2p=e.d2p,e.p2r=y,e.cleanPos=function(b){return Array.isArray(b)||typeof b=="string"&&b!==""?b:Ba(b)},e.setupMultiCategory=function(b){var x=e._traceIndices,_,k,T=e._matchGroup;if(T&&e._categories.length===0){for(var S in T)if(S!==a){var C=r[js.id2name(S)];x=x.concat(C._traceIndices)}}var L=[[0,{}],[0,{}]],E=[];for(_=0;_<x.length;_++){var R=b[x[_]];if(i in R){var N=R[i],H=R._length||Vt.minRowLength(N);if(Ny(N[0])&&Ny(N[1]))for(k=0;k<H;k++){var F=N[0][k],$=N[1][k];Uu(F)&&Uu($)&&(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(M,A){var D=L[0][1],P=D[M[0]]-D[A[0]];if(P)return P;var I=L[1][1];return I[M[1]]-I[A[1]]}),_=0;_<E.length;_++)f(E[_])}),e.fraction2r=function(b){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return e.l2r(x+b*(_-x))},e.r2fraction=function(b){var x=e.r2l(e.range[0]),_=e.r2l(e.range[1]);return(e.r2l(b)-x)/(_-x)},e.limitRange=function(b){var x=e.minallowed,_=e.maxallowed;if(!(x===void 0&&_===void 0)){b||(b="range");var k=Vt.nestedProperty(e,b).get(),T=Vt.simpleMap(k,e.r2l),S=T[1]<T[0];S&&T.reverse();var C=Vt.simpleMap([x,_],e.r2l);if(x!==void 0&&T[0]<C[0]&&(k[S?1:0]=x),_!==void 0&&T[1]>C[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(b,x){e._cleanRange(b,x),e.limitRange(b)},e._cleanRange=function(b,x){x||(x={}),b||(b="range");var _=Vt.nestedProperty(e,b).get(),k,T;if(e.type==="date"?T=Vt.dfltRange(e.calendar):i==="y"?T=Zf.DFLTRANGEY:e._name==="realaxis"?T=[0,1]:T=x.dfltRange||Zf.DFLTRANGEX,T=T.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(T[0]=0),!_||_.length!==2){Vt.nestedProperty(e,b).set(T);return}var S=_[0]===null,C=_[1]===null;for(e.type==="date"&&!e.autorange&&(_[0]=Vt.cleanDate(_[0],Sa,e.calendar),_[1]=Vt.cleanDate(_[1],Sa,e.calendar)),k=0;k<2;k++)if(e.type==="date"){if(!Vt.isDateTime(_[k],e.calendar)){e[b]=T;break}if(e.r2l(_[0])===e.r2l(_[1])){var L=Vt.constrain(e.r2l(_[0]),Vt.MIN_MS+1e3,Vt.MAX_MS-1e3);_[0]=e.l2r(L-1e3),_[1]=e.l2r(L+1e3);break}}else{if(!ja(_[k]))if(!(S||C)&&ja(_[1-k]))_[k]=_[1-k]*(k?10:.1);else{e[b]=T;break}if(_[k]<-Ns?_[k]=-Ns:_[k]>Ns&&(_[k]=Ns),_[0]===_[1]){var E=Math.max(1,Math.abs(_[0]*1e-6));_[0]-=E,_[1]+=E}}},e.setScale=function(b){var x=r._size;if(e.overlaying){var _=js.getFromId({_fullLayout:r},e.overlaying);e.domain=_.domain}var k=b&&e._r?"_r":"range",T=e.calendar;e.cleanRange(k);var S=e.r2l(e[k][0],T),C=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-C),e._b=-e._m*C):(e._offset=x.l+e.domain[0]*x.w,e._length=x.w*(e.domain[1]-e.domain[0]),e._m=e._length/(C-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,C),Math.max(S,C)),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>C&&(N=!N),N&&e._rangebreaks.reverse();var H=N?-1:1;for(e._m2=H*e._length/(Math.abs(C-S)-e._lBreaks),e._B.push(-e._m2*(L?C: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(b){var x=e.rangebreaks||[],_,k,T,S,C;x._cachedPatterns||(x._cachedPatterns=x.map(function(D){return D.enabled&&D.bounds?Vt.simpleMap(D.bounds,D.pattern?bi:e.d2c):null})),x._cachedValues||(x._cachedValues=x.map(function(D){return D.enabled&&D.values?Vt.simpleMap(D.values,e.d2c).sort(Vt.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 Gs:C=new Date(b),S=C.getUTCDay(),k>T&&(T+=7,S<k&&(S+=7));break;case Bs:C=new Date(b);var N=C.getUTCHours(),H=C.getUTCMinutes(),F=C.getUTCSeconds(),$=C.getUTCMilliseconds();S=N+(H/60+F/3600+$/36e5),k>T&&(T+=24,S<k&&(S+=24));break;case"":S=b;break}if(S>=k&&S<T)return Sa}else for(var M=x._cachedValues[L],A=0;A<M.length;A++)if(k=M[A],T=k+E.dvalue,b>=k&&b<T)return Sa}}return b},e.locateBreaks=function(b,x){var _,k,T,S,C=[];if(!e.rangebreaks)return C;var L=e.rangebreaks.slice().sort(function(I,O){return I.pattern===Gs&&O.pattern===Bs?-1:O.pattern===Gs&&I.pattern===Bs?1:0}),E=function(I,O){if(I=Vt.constrain(I,b,x),O=Vt.constrain(O,b,x),I!==O){for(var B=!0,G=0;G<C.length;G++){var j=C[G];I<j.max&&O>=j.min&&(I<j.min&&(j.min=I),O>j.max&&(j.max=O),B=!1)}B&&C.push({min:I,max:O})}};for(_=0;_<L.length;_++){var R=L[_];if(R.enabled)if(R.bounds){var N=b,H=x;R.pattern&&(N=Math.floor(N)),k=Vt.simpleMap(R.bounds,R.pattern?bi:e.r2l),T=k[0],S=k[1];var F=new Date(N),$,M;switch(R.pattern){case Gs:M=$D,$=((S<T?7:0)+(S-T))*Hs,N+=T*Hs-(F.getUTCDay()*Hs+F.getUTCHours()*Os+F.getUTCMinutes()*Hy+F.getUTCSeconds()*Oy+F.getUTCMilliseconds());break;case Bs:M=Hs,$=((S<T?24:0)+(S-T))*Os,N+=T*Os-(F.getUTCHours()*Os+F.getUTCMinutes()*Hy+F.getUTCSeconds()*Oy+F.getUTCMilliseconds());break;default:N=Math.min(k[0],k[1]),H=Math.max(k[0],k[1]),M=H-N,$=M}for(var A=N;A<H;A+=M)E(A,A+$)}else for(var D=Vt.simpleMap(R.values,e.d2c),P=0;P<D.length;P++)T=D[P],S=T+R.dvalue,E(T,S)}return C.sort(function(I,O){return I.min-O.min}),C},e.makeCalcdata=function(b,x,_){var k,T,S,C,L=e.type,E=L==="date"&&b[x+"calendar"];if(x in b){if(k=b[x],C=b._length||Vt.minRowLength(k),Vt.isTypedArray(k)&&(L==="linear"||L==="log")){if(C===k.length)return k;if(k.subarray)return k.subarray(0,C)}if(L==="multicategory")return c(k,C);for(T=new Array(C),S=0;S<C;S++)T[S]=e.d2c(k[S],0,E,_)}else{var R=x+"0"in b?e.d2c(b[x+"0"],0,E):0,N=b["d"+x]?Number(b["d"+x]):1;for(k=b[{x:"y",y:"x"}[x]],C=b._length||k.length,T=new Array(C),S=0;S<C;S++)T[S]=R+S*N}if(e.rangebreaks)for(S=0;S<C;S++)T[S]=e.maskBreaks(T[S]);return T},e.isValidRange=function(b,x){return Array.isArray(b)&&b.length===2&&(x&&b[0]===null||ja(e.r2l(b[0])))&&(x&&b[1]===null||ja(e.r2l(b[1])))},e.getAutorangeDflt=function(b,x){var _=!e.isValidRange(b,"nullOk");return _&&x&&x.reverseDflt?_="reversed":b&&(b[0]===null&&b[1]===null?_=!0:b[0]===null&&b[1]!==null?_="min":b[0]!==null&&b[1]===null&&(_="max")),_},e.isReversed=function(){var b=e.autorange;return b==="reversed"||b==="min reversed"||b==="max reversed"},e.isPtWithinRange=function(b,x){var _=e.c2l(b[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 b=e._matchGroup;if(b){var x=null,_=null;for(var k in b){var T=r[js.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 b=[];if(e._emptyCategories(),e._initialCategories)for(var x=0;x<e._initialCategories.length;x++)f(e._initialCategories[x]);b=b.concat(e._traceIndices);var _=e._matchGroup;for(var k in _)if(a!==k){var T=r[js.id2name(k)];T._categories=e._categories,T._categoriesMap=e._categoriesMap,b=b.concat(T._traceIndices)}return b};var w=r._d3locale;e.type==="date"&&(e._dateFormat=w?w.timeFormat:SD,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=w?w.numberFormat:LD,delete e._minDtick,delete e._forceTick0},Rw=wt,fp=ge,PD=lr.BADNUM,Kf=fp.isArrayOrTypedArray,ED=fp.isDateTime,RD=fp.cleanNumber,zw=Math.round,Iw=function(e,r,a){var i=e,n=a.noMultiCategory;if(Kf(i)&&!i.length)return"-";if(!n&&HD(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(Kf(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if(FD(i,r))return"date";var f=a.autotypenumbers!=="strict";return ND(i,f)?"category":ID(i,f)?"linear":"-"};function zD(t,e){return e?Rw(t):typeof t=="number"}function ID(t,e){for(var r=t.length,a=0;a<r;a++)if(zD(t[a],e))return!0;return!1}function FD(t,e){for(var r=t.length,a=Fw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=zw(l),f=t[s],c=String(f);o[c]||(o[c]=1,ED(f,e)&&i++,Rw(f)&&n++)}return i>n*2}function Fw(t){return Math.max(1,(t-1)/1e3)}function ND(t,e){for(var r=t.length,a=Fw(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=zw(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var u=typeof f;u==="boolean"?n++:(e?RD(f)!==PD:u==="number")?i++:u==="string"&&n++}}return n>i*2}function HD(t){return Kf(t[0])&&Kf(t[1])}var OD=gt,Nw=wt,Ri=ge,Pf=lr.FP_SAFE,jD=lt,BD=$t,Hw=sr,GD=Hw.getFromId,UD=Hw.isLinked,ys={applyAutorangeOptions:jw,getAutoRange:Fd,makePadFn:Nd,doAutoRange:XD,findExtremes:YD,concatExtremes:cp};function Fd(t,e){var r,a,i=[],n=t._fullLayout,o=Nd(n,e,0),l=Nd(n,e,1),s=cp(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return Ri.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=Ri.simpleMap(e.range,e.r2l);d=p[1]<p[0]}e.autorange==="reversed"&&(e.autorange=!0);var m=e.rangemode,y=m==="tozero",g=m==="nonnegative",w=e._length,b=w/10,x=0,_,k,T,S,C,L;for(r=0;r<f.length;r++)for(_=f[r],a=0;a<c.length;a++)k=c[a],L=k.val-_.val-jy(e,_.val,k.val),L>0&&(C=w-o(_)-l(k),C>b?L/C>x&&(T=_,S=k,x=L/C):L/w>x&&(T={val:_.val,nopad:1},S={val:k.val,nopad:1},x=L/w));function E($,M){return Math.max($,l(M))}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 g?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})):g&&(T.val-x*o(T)<0&&(T={val:0,nopad:1}),S.val<=0&&(S={val:1,nopad:1})),x=(S.val-T.val-jy(e,_.val,k.val))/(w-o(T)-l(S)),i=[T.val-x*o(T),S.val+x*l(S)];return i=jw(i,e),e.limitRange&&e.limitRange(),d&&i.reverse(),Ri.simpleMap(i,e.l2r||Number)}function jy(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 Nd(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=Ri.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return UD(t,e._id)||(l=VD(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 By=3;function VD(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=Ri.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(g){var w=OD.select(this),b=w.select(".text-math-group");b.empty()&&(g.bb=BD.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*By+p.width,y=2*By+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 cp(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 g=m[y[s]],w=(g._extremes||{})[a];if(g.visible===!0&&w){for(f=0;f<w.min.length;f++)c=w.min[f],Hd(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<w.max.length;f++)c=w.max[f],Od(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=GD(t,v),d=cp(t,h,!0),p=e._length/h._length;for(f=0;f<d.min.length;f++)c=d.min[f],Hd(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<d.max.length;f++)c=d.max[f],Od(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function XD(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():Fd(t,e),e._r=e.range.slice(),e._rl=Ri.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,jD.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=Fd(t,e)),n._input.rangeslider[e._name]=Ri.extendFlat({},o)}}function YD(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,g,w;function b(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=b((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),_=b((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),k=b(r.vpadplus||r.vpad),T=b(r.vpadminus||r.vpad);if(!f){if(g=1/0,w=-1/0,s)for(u=0;u<n;u++)v=e[u],v<g&&v>0&&(g=v),v>w&&v<Pf&&(w=v);else for(u=0;u<n;u++)v=e[u],v<g&&v>-Pf&&(g=v),v>w&&v<Pf&&(w=v);e=[g,w],n=2}var S={tozero:l,extrapad:o};function C(E){h=e[E],Nw(h)&&(m=x(E),y=_(E),c?(d=t.c2l(h)-T(E),p=t.c2l(h)+k(E)):(g=h-T(E),w=h+k(E),s&&g<w/10&&(g=w/10),d=t.c2l(g),p=t.c2l(w)),l&&(d=Math.min(0,d),p=Math.max(0,p)),Gy(d)&&Hd(a,d,y,S),Gy(p)&&Od(i,p,m,S))}var L=Math.min(6,n);for(u=0;u<L;u++)C(u);for(u=n-1;u>=L;u--)C(u);return{min:a,max:i,opts:r}}function Hd(t,e,r,a){Ow(t,e,r,a,WD)}function Od(t,e,r,a){Ow(t,e,r,a,qD)}function Ow(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 Gy(t){return Nw(t)&&Math.abs(t)<Pf}function WD(t,e){return t<=e}function qD(t,e){return t>=e}function ZD(t,e){var r=e.autorangeoptions;return r&&r.minallowed!==void 0&&Qf(e,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&Qf(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}function KD(t,e){var r=e.autorangeoptions;return r&&r.maxallowed!==void 0&&Qf(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&Qf(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}function Qf(t,e,r){return e!==void 0&&r!==void 0?(e=t.d2l(e),r=t.d2l(r),e<r):!0}function jw(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);Ri.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=ZD(r,e),a=KD(a,e),[r,a]}var ma=gt,ur=wt,ko=vr,Xl=lt,vt=ge,Do=vt.strTranslate,so=_r,QD=Yc,Yl=pt,na=$t,JD=Ja,Uy=Vc,jr=lr,e3=jr.ONEMAXYEAR,Jf=jr.ONEAVGYEAR,jd=jr.ONEMINYEAR,t3=jr.ONEMAXQUARTER,Bd=jr.ONEAVGQUARTER,Gd=jr.ONEMINQUARTER,r3=jr.ONEMAXMONTH,$o=jr.ONEAVGMONTH,Ud=jr.ONEMINMONTH,ba=jr.ONEWEEK,Xr=jr.ONEDAY,yn=Xr/2,ui=jr.ONEHOUR,ec=jr.ONEMIN,Vd=jr.ONESEC,gn=jr.MINUS_SIGN,Wc=jr.BADNUM,Xd={K:"zeroline"},Yd={K:"gridline",L:"path"},Wd={K:"minor-gridline",L:"path"},Bw={K:"tick",L:"path"},Vy={K:"tick",L:"text"},Xy={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},qc=Wr,Us=qc.MID_SHIFT,bn=qc.CAP_SHIFT,tc=qc.LINE_SPACING,a3=qc.OPPOSITE_SIDE,rc=3,Ce=iw.exports={};Ce.setConvert=sp;var i3=Iw,di=sr,n3=di.idSort,o3=di.isLinked;Ce.id2name=di.id2name;Ce.name2id=di.name2id;Ce.cleanId=di.cleanId;Ce.list=di.list;Ce.listIds=di.listIds;Ce.getFromId=di.getFromId;Ce.getFromTrace=di.getFromTrace;var Gw=ys;Ce.getAutoRange=Gw.getAutoRange;Ce.findExtremes=Gw.findExtremes;var l3=1e-4;function up(t){var e=(t[1]-t[0])*l3;return[t[0]-e,t[1]+e]}Ce.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},vt.coerce(t,e,f,s)};Ce.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};Ce.coercePosition=function(t,e,r,a,i,n){var o,l,s=Ce.getRefType(a);if(s!=="range")o=vt.ensureNumber,l=r(i,n);else{var f=Ce.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};Ce.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?vt.ensureNumber:Ce.getFromId(e,r).cleanPos;return a(t)};Ce.redrawComponents=function(t,e){e=e||Ce.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=Xl.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var u=r[Ce.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 s3=Ce.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(vt.isArrayOrTypedArray(n)){if(i={type:i3(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Ce.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=Ce.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:Wy,c2d:Wy}:{d2c:Yy,c2d:Yy}};function Yy(t){return+t}function Wy(t){return String(t)}Ce.getDataToCoordFunc=function(t,e,r,a){return s3(t,e,r,a).d2c};Ce.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};Ce.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))};Ce.saveRangeInitial=function(t,e){for(var r=Ce.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};Ce.saveShowSpikeInitial=function(t,e){for(var r=Ce.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};Ce.autoBin=function(t,e,r,a,i,n){var o=vt.aggNums(Math.min,null,t),l=vt.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:vt.simpleMap([o,l],e.c2r,0,i),calendar:i},Ce.setConvert(s),n=n&&Uy.dtick(n,s.type),n)s.dtick=n,s.tick0=Uy.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=vt.distinctVals(t),u=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),v=u*vt.roundUp(c.minDiff/u,[.9,1.9,4.9,9.9],!0);f=Math.max(v,2*vt.stdev(t)/Math.pow(t.length,a?.25:.4)),ur(f)||(f=1)}Ce.autoTicks(s,f)}var h=s.dtick,d=Ce.tickIncrement(Ce.tickFirst(s),h,"reverse",i),p,m;if(typeof h=="number")d=f3(d,t,s,o,l),m=1+Math.floor((l-d)/h),p=d+m*h;else for(s.dtick.charAt(0)==="M"&&(d=c3(d,t,h,o,i)),p=d,m=0;p<=l;)p=Ce.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 f3(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++:ur(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 c3(t,e,r,a,i){var n=vt.findExactDates(e,i),o=.8;if(n.exactDays>o){var l=Number(r.substr(1));n.exactYears>o&&l%12===0?t=Ce.tickIncrement(t,"M6","reverse")+Xr*1.5:n.exactMonths>o?t=Ce.tickIncrement(t,"M1","reverse")+Xr*15.5:t-=yn;var s=Ce.tickIncrement(t,r);if(s<=a)return s}return t}Ce.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var a=e.dtick&&ur(e._tmin),i;if(a){var n=Ce.tickIncrement(e._tmin,e.dtick,!0);i=[e._tmin,n*.99+e._tmin*.01]}else{var o=vt.simpleMap(e.range,e.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(t.range=vt.simpleMap(i,e.l2r),t._isMinor=!0,Ce.prepTicks(t,r),a){var l=ur(e.dtick),s=ur(t.dtick),f=l?e.dtick:+e.dtick.substring(1),c=s?t.dtick:+t.dtick.substring(1);l&&s?Vu(f,c)?f===2*ba&&c===2*Xr&&(t.dtick=ba):f===2*ba&&c===3*Xr?t.dtick=ba:f===ba&&!(e._input.minor||{}).nticks?t.dtick=Xr:qy(f/c,2.5)?t.dtick=f/2:t.dtick=f:String(e.dtick).charAt(0)==="M"?s?t.dtick="M1":Vu(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"?Vu(f,c)||(t.dtick=qy(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 Vu(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function qy(t,e){return Math.abs(t/e-1)<.001}Ce.prepTicks=function(t,e){var r=vt.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?vt.bigFont(t.tickfont.size||12):15,a=t._length/i):(i=t._id.charAt(0)==="y"?40:80,a=vt.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,Ce.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"&&u3(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),Yw(t)};function Xu(t){return+t.substring(1)}function u3(t){var e;function r(){return!(ur(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=Ce.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=ui,n&&!a&&t.dtick<ui&&(t.dtick=ui)):/%p/.test(i)?(e=yn,n&&!a&&t.dtick<yn&&(t.dtick=yn)):/%[Aadejuwx]/.test(i)?(e=Xr,n&&!a&&t.dtick<Xr&&(t.dtick=Xr)):/%[UVW]/.test(i)?(e=ba,n&&!a&&t.dtick<ba&&(t.dtick=ba)):/%[Bbm]/.test(i)?(e=$o,n&&(a?Xu(t.dtick)<1:t.dtick<Ud)&&(t.dtick="M1")):/%[q]/.test(i)?(e=Bd,n&&(a?Xu(t.dtick)<3:t.dtick<Gd)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=Jf,n&&(a?Xu(t.dtick)<12:t.dtick<jd)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function v3(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>=jd?f>=jd&&f<=e3?u=f:u=Jf:r===Bd&&c>=Gd?f>=Gd&&f<=t3?u=f:u=Bd:c>=Ud?f>=Ud&&f<=r3?u=f:u=$o:r===ba&&c>=ba?u=ba:c>=Xr?u=Xr:r===yn&&c>=yn?u=yn:r===ui&&c>=ui&&(u=ui);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)!==Wc&&p++}u*=p/d,u||(t[a].drop=!0),v&&f>ba&&(u=f)}(u>0||a===0)&&(t[a].periodX=i+u/2)}}Ce.calcTicks=function(e,r){for(var a=e.type,i=e.calendar,n=e.ticklabelstep,o=e.ticklabelmode==="period",l=vt.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 g=!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:vt.extendFlat({},e,e.minor);if(g?Ce.prepMinorTicks(w,e,r):Ce.prepTicks(w,r),w.tickmode==="array"){y?(d=[],v=Zy(e,!g)):(p=[],h=Zy(e,!g));continue}if(w.tickmode==="sync"){d=[],v=d3(e);continue}var b=up(l),x=b[0],_=b[1],k=ur(w.dtick),T=a==="log"&&!(k||w.dtick.charAt(0)==="L"),S=Ce.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 C=null,L=S,E;if(y){var R;k?R=e.dtick:a==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(R=$o*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=Yu(L,e),s||(L=Ce.tickIncrement(L,N,!s,i))),y&&o&&(L=Ce.tickIncrement(L,N,!s,i),E--);s?L>=_:L<=_;L=Ce.tickIncrement(L,N,s,i)){if(y&&E++,w.rangebreaks&&!s){if(L<x)continue;if(w.maskBreaks(L)===Wc&&Yu(L,w)>=c)break}if(d.length>u||L===C)break;C=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(X){return X.value}),M=[],A=0;A<p.length;A++){var D=p[A],P=D.value;if($.indexOf(P)===-1){for(var I=!1,O=0;!I&&O<d.length;O++)1e7+d[O].value===1e7+P&&(I=!0);I||M.push(D)}}p=M}}o&&v3(d,e,e._definedDelta);var B;if(e.rangebreaks){var G=e._id.charAt(0)==="y",j=1;e.tickmode==="auto"&&(j=e.tickfont?e.tickfont.size:12);var q=NaN;for(B=d.length-1;B>-1;B--){if(d[B].drop){d.splice(B,1);continue}d[B].value=Yu(d[B].value,e);var V=e.c2p(d[B].value);(G?q>V-j:q<V+j)?d.splice(s?B+1:B,1):q=V}}pp(e)&&Math.abs(l[1]-l[0])===360&&d.pop(),e._tmax=(d[d.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var K,Y=function(X){X.text="",e._prevDateHead=K};d=d.concat(p);var te,oe;for(B=0;B<d.length;B++){var _e=d[B].minor,de=d[B].value;_e?h.push({x:de,minor:!0}):(K=e._prevDateHead,te=Ce.tickText(e,de,!1,d[B].simpleLabel),oe=d[B].periodX,oe!==void 0&&(te.periodX=oe,(oe>c||oe<f)&&(oe>c&&(te.periodX=c),oe<f&&(te.periodX=f),Y(te))),d[B].skipLabel&&Y(te),v.push(te))}return v=v.concat(h),e._inCalcTicks=!1,o&&v.length&&(v[0].noTick=!0),v};function Uw(t,e){return t.rangebreaks&&(e=e.filter(function(r){return t.maskBreaks(r.x)!==Wc})),e}function d3(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=Ce.tickText(t,n);e._vals[a].minor&&(o.minor=!0,o.text=""),r.push(o)}}return r=Uw(t,r),r}function Zy(t,e){var r=vt.simpleMap(t.range,t.r2l),a=up(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){vt.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?Ce.tickText(t,v):vp(t,v,String(c[u]));s&&(h.minor=!0,h.text=""),l.push(h)}}}}return l=Uw(t,l),l}var Vs=[2,5,10],Ky=[1,2,3,6,12],Qy=[1,2,5,10,15,30],h3=[1,2,3,7,14],Vw=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Xw=[-.301,0,.301,.699,1],p3=[15,30,45,90,180];function Ga(t,e,r){return e*vt.roundUp(t/e,r)}Ce.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=vt.dateTick0(t.calendar,0);var n=2*e;if(n>Jf)e/=Jf,a=i(10),t.dtick="M"+12*Ga(e,a,Vs);else if(n>$o)e/=$o,t.dtick="M"+Ga(e,1,Ky);else if(n>Xr){if(t.dtick=Ga(e,Xr,t._hasDayOfWeekBreaks?[1,2,7,14]:h3),!r){var o=Ce.getTickFormat(t),l=t.ticklabelmode==="period";l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=vt.dateTick0(t.calendar,2):t.tick0=vt.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}}else n>ui?t.dtick=Ga(e,ui,Ky):n>ec?t.dtick=Ga(e,ec,Qy):n>Vd?t.dtick=Ga(e,Vd,Qy):(a=i(10),t.dtick=Ga(e,a,Vs))}else if(t.type==="log"){t.tick0=0;var s=vt.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"+Ga(e,a,Vs)}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))):pp(t)?(t.tick0=0,a=1,t.dtick=Ga(e,a,p3)):(t.tick0=0,a=i(10),t.dtick=Ga(e,a,Vs));if(t.dtick===0&&(t.dtick=1),!ur(t.dtick)&&typeof t.dtick!="string"){var c=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(c)}};function Yw(t){var e=t.dtick;if(t._tickexponent=0,!ur(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>=Xr&&i<=10||e>=Xr*15)t._tickround="d";else if(e>=ec&&i<=16||e>=ui)t._tickround="M";else if(e>=Vd&&i<=19||e>=ec)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(ur(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);ur(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&&(ac(t.exponentformat)&&!dp(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}Ce.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(ur(e))return vt.increment(t,i*e);var n=e.charAt(0),o=i*Number(e.substr(1));if(n==="M")return vt.incrementMonth(t,o,a);if(n==="L")return Math.log(Math.pow(10,t)+o)/Math.LN10;if(n==="D"){var l=e==="D2"?Xw:Vw,s=t+i*.01,f=vt.roundUp(vt.mod(s,1),l,r);return Math.floor(s)+Math.log(ma.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};Ce.tickFirst=function(t,e){var r=t.r2l||Number,a=vt.simpleMap(t.range,r,void 0,void 0,e),i=a[1]<a[0],n=i?Math.floor:Math.ceil,o=up(a)[0],l=t.dtick,s=r(t.tick0);if(ur(l)){var f=n((o-s)/l)*l+s;return(t.type==="category"||t.type==="multicategory")&&(f=vt.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=Ce.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=Ce.tickIncrement(h,m,p<0?!i:i,t.calendar),v++}return vt.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"?Xw:Vw,g=vt.roundUp(vt.mod(o,1),y,i);return Math.floor(o)+Math.log(ma.round(Math.pow(10,g),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};Ce.tickText=function(t,e,r,a){var i=vp(t,e),n=t.tickmode==="array",o=r||n,l=t.type,s=l==="category"?t.d2l_noadd:t.d2l,f;if(n&&vt.isArrayOrTypedArray(t.ticktext)){var c=vt.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"?m3(t,i,r,o):l==="log"?y3(t,i,r,o,h):l==="category"?g3(t,i):l==="multicategory"?b3(t,i,r):pp(t)?_3(t,i,r,o,h):x3(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};Ce.hoverLabelText=function(t,e,r){r&&(t=vt.extendFlat({},t,{hoverformat:r}));var a=vt.isArrayOrTypedArray(e)?e[0]:e,i=vt.isArrayOrTypedArray(e)?e[1]:void 0;if(i!==void 0&&i!==a)return Ce.hoverLabelText(t,a,r)+" - "+Ce.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=Ce.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":gn+o:o};function vp(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 m3(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||Ce.getTickFormat(t);a=!n&&a,a&&(ur(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=vt.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=ql(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function y3(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=Wl(Math.pow(10,o),t,i,a);else if(ur(n)||s==="D"&&vt.mod(o+.01,1)<.1){var f=Math.round(o),c=Math.abs(f),u=t.exponentformat;u==="power"||ac(u)&&dp(f)?(f===0?e.text=1:f===1?e.text="10":e.text="10<sup>"+(f>1?"":gn)+c+"</sup>",e.fontSize*=1.25):(u==="e"||u==="E")&&c>2?e.text="1"+u+(f>0?"+":gn)+c:(e.text=Wl(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,vt.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 g3(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function b3(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 x3(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=Wl(e.x,t,i,a)}function _3(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=w3(n);if(o[1]>=100)e.text=Wl(vt.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=gn+e.text)}}}else e.text=Wl(e.x,t,i,a)}function w3(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 T3=["f","p","n","μ","m","","k","M","G","T"];function ac(t){return t==="SI"||t==="B"}function dp(t){return t>14||t<-15}function Wl(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=Ce.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:ur(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};Yw(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,gn);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=vt.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){ac(o)&&dp(l)&&(o="power");var d;l<0?d=gn+-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":ac(o)&&(t+=T3[l/3+5])}return i?gn+t:t}Ce.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*$o}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};Ce.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?Ce.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};Ce.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};Ce.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=Ce.list(t,"x",!0),n=Ce.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){ma.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})})}};Ce.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"?Ce.listIds(t):e,n=Ce.list(t),o=n.filter(function(s){return s.autoshift}).map(function(s){return s.overlaying});i.map(function(s){var f=Ce.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 vt.syncOrAsync(i.map(function(s){return function(){if(s){var f=Ce.getFromId(t,s);r||(r={}),r.axShifts=l,r.overlayingShiftedAx=o;var c=Ce.drawOne(t,f,r);return f._shiftPusher&&Qd(f,f._fullDepth||0,l,!0),f._r=f.range.slice(),f._rl=vt.simpleMap(f._r,f.r2l),c}}}))};Ce.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=Ce.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),Qd(e,h,a,!0),Qd(e,e.shift||0,a,!1)}(r.skipTitle!==!0||e._shift===void 0)&&(e._shift=I3(e,a));var d=v[c+"axislayer"],p=e._mainLinePosition,m=p+=e._shift,y=e._mainMirrorPosition,g=e._vals=Ce.calcTicks(e),w=[e.mirror,m,y].join("_");for(n=0;n<g.length;n++)g[n].axInfo=w;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var b={};function x(he){var Te=f+(he||"tick");return b[Te]||(b[Te]=S3(e,Te)),b[Te]}if(e.visible){var _=Ce.makeTransTickFn(e),k=Ce.makeTransTickLabelFn(e),T,S,C=e.ticks==="inside",L=e.ticks==="outside";if(e.tickson==="boundaries"){var E=k3(e,g);S=Ce.clipEnds(e,E),T=C?S:E}else S=Ce.clipEnds(e,g),T=C&&e.ticklabelmode!=="period"?S:g;var R=e._gridVals=S,N=M3(e,g);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"],M=$._mainAxis._id;if(!F[M]){F[M]=1;var A=c==="x"?"M0,"+$._offset+"v"+$._length:"M"+$._offset+",0h"+$._length;Ce.drawGrid(t,e,{vals:R,counterAxis:$,layer:l.gridlayer.select("."+f),minorLayer:l.minorGridlayer.select("."+f),path:A,transFn:_}),Ce.drawZeroLine(t,e,{counterAxis:$,layer:l.zerolinelayer,path:A,transFn:_})}}}var D,P=Ce.getTickSigns(e),I=Ce.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var O=Ce.makeTickPath(e,m,P[2]),B=Ce.makeTickPath(e,m,I[2],{minor:!0}),G,j,q,V;if(e._anchorAxis&&e.mirror&&e.mirror!==!0?(G=Ce.makeTickPath(e,y,P[3]),j=Ce.makeTickPath(e,y,I[3],{minor:!0}),q=O+G,V=B+j):(G="",j="",q=O,V=B),e.showdividers&&L&&e.tickson==="boundaries"){var K={};for(n=0;n<N.length;n++)K[N[n].x]=1;D=function(he){return K[he.x]?G:q}}else D=function(he){return he.minor?V:q}}if(Ce.drawTicks(t,e,{vals:T,layer:d,path:D,transFn:_}),e.mirror==="allticks"){var Y=Object.keys(e._linepositions||{});for(n=0;n<Y.length;n++){o=Y[n],l=s._plots[o];var te=e._linepositions[o]||[],oe=te[0],_e=te[1],de=te[2],X=Ce.makeTickPath(e,oe,de?P[0]:I[0],{minor:de})+Ce.makeTickPath(e,_e,de?P[1]:I[1],{minor:de});Ce.drawTicks(t,e,{vals:T,layer:l[c+"axislayer"],path:X,transFn:_})}}var Q=[];if(Q.push(function(){return Ce.drawLabels(t,e,{vals:g,layer:d,plotinfo:l,transFn:k,labelFns:Ce.makeLabelFns(e,m)})}),e.type==="multicategory"){var le={x:2,y:10}[c];Q.push(function(){var he={x:"height",y:"width"}[c],Te=x()[he]+le+(e._tickAngles[f+"tick"]?e.tickfont.size*tc:0);return Ce.drawLabels(t,e,{vals:A3(e,g),layer:d,cls:f+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:_,labelFns:Ce.makeLabelFns(e,m+Te*P[4])})}),Q.push(function(){return e._depth=P[4]*(x("tick2")[e.side]-m),C3(t,e,{vals:N,layer:d,path:Ce.makeTickPath(e,m,P[4],{len:e._depth}),transFn:_})})}else e.title.hasOwnProperty("standoff")&&Q.push(function(){e._depth=P[4]*(x()[e.side]-m)});var se=Xl.getComponentMethod("rangeslider","isVisible")(e);return!r.skipTitle&&!(se&&e.side==="bottom")&&Q.push(function(){return D3(t,e)}),Q.push(function(){var he=e.side.charAt(0),Te=a3[e.side].charAt(0),fe=Ce.getPxPosition(t,e),Ae=L?e.ticklen:0,ce,ye,Se,Me;(e.automargin||se||e._shiftPusher)&&(e.type==="multicategory"?ce=x("tick2"):(ce=x(),c==="x"&&he==="b"&&(e._depth=Math.max(ce.width>0?ce.bottom-fe:0,Ae))));var J=0,xe=0;if(e._shiftPusher&&(J=Math.max(Ae,ce.height>0?he==="l"?fe-ce.left:ce.right-fe:0),e.title.text!==s._dfltTitle[c]&&(xe=(e._titleStandoff||0)+(e._titleScoot||0),he==="l"&&(xe+=Zd(e))),e._fullDepth=Math.max(J,xe)),e.automargin){ye={x:0,y:0,r:0,l:0,t:0,b:0};var re=[0,1],ue=typeof e._shift=="number"?e._shift:0;if(c==="x"){if(he==="b"?ye[he]=e._depth:(ye[he]=e._depth=Math.max(ce.width>0?fe-ce.top:0,Ae),re.reverse()),ce.width>0){var pe=ce.right-(e._offset+e._length);pe>0&&(ye.xr=1,ye.r=pe);var De=e._offset-ce.left;De>0&&(ye.xl=0,ye.l=De)}}else if(he==="l"?(e._depth=Math.max(ce.height>0?fe-ce.left:0,Ae),ye[he]=e._depth-ue):(e._depth=Math.max(ce.height>0?ce.right-fe:0,Ae),ye[he]=e._depth+ue,re.reverse()),ce.height>0){var $e=ce.bottom-(e._offset+e._length);$e>0&&(ye.yb=0,ye.b=$e);var me=e._offset-ce.top;me>0&&(ye.yt=1,ye.t=me)}ye[u]=e.anchor==="free"?e.position:e._anchorAxis.domain[re[0]],e.title.text!==s._dfltTitle[c]&&(ye[he]+=Zd(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(Se={x:0,y:0,r:0,l:0,t:0,b:0},Se[Te]=e.linewidth,e.mirror&&e.mirror!==!0&&(Se[Te]+=Ae),e.mirror===!0||e.mirror==="ticks"?Se[u]=e._anchorAxis.domain[re[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(Se[u]=[e._counterDomainMin,e._counterDomainMax][re[1]]))}se&&(Me=Xl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),typeof e.automargin=="string"&&(Jy(ye,e.automargin),Jy(Se,e.automargin)),ko.autoMargin(t,hp(e),ye),ko.autoMargin(t,qw(e),Se),ko.autoMargin(t,Zw(e),Me)}),vt.syncOrAsync(Q)}};function Jy(t,e){if(t){var r=Object.keys(Xy).reduce(function(a,i){return e.indexOf(i)!==-1&&Xy[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(vt.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 A3(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(vp(t,vt.interp(a[o],.5),o));return r}function M3(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(vt.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 S3(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=Kd(this),l=na.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}}Ce.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};Ce.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return Do(t._offset+t.l2p(e.x),0)}:function(e){return Do(0,t._offset+t.l2p(e.x))}};Ce.makeTransTickLabelFn=function(t){var e=L3(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return Do(r+t._offset+t.l2p(qd(i)),a)}:function(i){return Do(a,r+t._offset+t.l2p(qd(i)))}};function qd(t){return t.periodX!==void 0?t.periodX:t.x}function L3(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=rc,v=t.tickfont?t.tickfont.size:12;return(o||a)&&(c+=v*bn,u+=(t.linewidth||0)/2),(i||n)&&(c+=(t.linewidth||0)/2,u+=rc),l&&f==="top"&&(u-=v*(1-bn)),(i||a)&&(c=-c),(f==="bottom"||f==="right")&&(u=-u),[s?c:0,l?u:0]}Ce.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};Ce.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=vt.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,g,w,b,x=0,_=t.side,k=t._id.charAt(0),T=t.tickangle,S;if(k==="x")S=!c&&_==="bottom"||c&&_==="top",b=S?1:-1,c&&(b*=-1),y=h*b,g=e+v*b,w=S?1:-.2,Math.abs(T)===90&&(c?w+=Us:T===-90&&_==="bottom"?w=bn:T===90&&_==="top"?w=Us:w=.5,x=Us/2*(T/90)),m.xFn=function(E){return E.dx+y+x*E.fontSize},m.yFn=function(E){return E.dy+g+E.fontSize*w},m.anchorFn=function(E,R){if(f){if(o)return"end";if(l)return"start"}return!ur(R)||R===0||R===180?"middle":R*b<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",b=S?1:-1,c&&(b*=-1),y=v,g=h*b,w=0,!c&&Math.abs(T)===90&&(T===-90&&_==="left"||T===90&&_==="right"?w=bn:w=.5),c){var C=ur(T)?+T:0;if(C!==0){var L=vt.deg2rad(C);x=Math.abs(Math.sin(L))*bn*b,w=0}}m.xFn=function(E){return E.dx+e-(y+E.fontSize*w)*b+x*E.fontSize},m.yFn=function(E){return E.dy+g+E.fontSize*Us},m.anchorFn=function(E,R){return ur(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 Zc(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}Ce.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,Zc);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return Yl.stroke(ma.select(this),o.minor?e.minor.tickcolor:e.tickcolor)}).style("stroke-width",function(o){return na.crispRound(t,o.minor?e.minor.tickwidth:e.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Kc(e,[Bw]),n.attr("transform",r.transFn)};Ce.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&&Ce.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=na.crispRound(t,e.gridwidth,1);for(var u=i?na.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,Zc);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 Yl.stroke(ma.select(this),y.minor?e.minor.gridcolor:e.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return na.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)}}Kc(e,[Yd,Wd])}};Ce.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=Ce.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 n3(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(Yl.stroke,e.zerolinecolor||Yl.defaultLine).style("stroke-width",na.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Kc(e,[Xd])};Ce.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=r.cls||i+"tick",o=r.vals.filter(function(M){return M.text}),l=r.labelFns,s=r.secondary?0:e.tickangle,f=(e._prevTickAngles||{})[n],c=r.layer.selectAll("g."+n).data(e.showticklabels?o:[],Zc),u=[];c.enter().append("g").classed(n,1).append("text").attr("text-anchor","middle").each(function(M){var A=ma.select(this),D=t._promises.length;A.call(so.positionText,l.xFn(M),l.yFn(M)).call(na.font,M.font,M.fontSize,M.fontColor).text(M.text).call(so.convertToTspans,t),t._promises[D]?u.push(t._promises.pop().then(function(){v(A,s)})):v(A,s)}),Kc(e,[Vy]),c.exit().remove(),r.repositionOnUpdate&&c.each(function(M){ma.select(this).select("text").call(so.positionText,l.xFn(M),l.yFn(M))});function v(M,A){M.each(function(D){var P=ma.select(this),I=P.select(".text-math-group"),O=l.anchorFn(D,A),B=r.transFn.call(P.node(),D)+(ur(A)&&+A!=0?" rotate("+A+","+l.xFn(D)+","+(l.yFn(D)-D.fontSize/2)+")":""),G=so.lineCount(P),j=tc*D.fontSize,q=l.heightFn(D,ur(A)?+A:0,(G-1)*j);if(q&&(B+=Do(0,q)),I.empty()){var V=P.select("text");V.attr({transform:B,"text-anchor":O}),V.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var K=na.bBox(I.node()).width,Y=K*{end:-.5,start:.5}[O];I.attr("transform",B+Do(Y,0))}})}e._adjustTickLabelsOverflow=function(){var M=e.ticklabeloverflow;if(!(!M||M==="allow")){var A=M.indexOf("hide")!==-1,D=e._id.charAt(0)==="x",P=0,I=D?t._fullLayout.width:t._fullLayout.height;if(M.indexOf("domain")!==-1){var O=vt.simpleMap(e.range,e.r2l);P=e.l2p(O[0])+e._offset,I=e.l2p(O[1])+e._offset}var B=Math.min(P,I),G=Math.max(P,I),j=e.side,q=1/0,V=-1/0;c.each(function(oe){var _e=ma.select(this),de=_e.select(".text-math-group");if(de.empty()){var X=na.bBox(_e.node()),Q=0;D?(X.right>G||X.left<B)&&(Q=1):(X.bottom>G||X.top+(e.tickangle?0:oe.fontSize/4)<B)&&(Q=1);var le=_e.select("text");Q?A&&le.style("opacity",0):(le.style("opacity",1),j==="bottom"||j==="right"?q=Math.min(q,D?X.top:X.left):q=-1/0,j==="top"||j==="left"?V=Math.max(V,D?X.bottom:X.right):V=1/0)}});for(var K in a._plots){var Y=a._plots[K];if(!(e._id!==Y.xaxis._id&&e._id!==Y.yaxis._id)){var te=D?Y.yaxis:Y.xaxis;te&&(te["_visibleLabelMin_"+e._id]=q,te["_visibleLabelMax_"+e._id]=V)}}}},e._hideCounterAxisInsideTickLabels=function(M){var A=e._id.charAt(0)==="x",D=[];for(var P in a._plots){var I=a._plots[P];e._id!==I.xaxis._id&&e._id!==I.yaxis._id||D.push(A?I.yaxis:I.xaxis)}D.forEach(function(O,B){O&&ql(O)&&(M||[Xd,Wd,Yd,Bw,Vy]).forEach(function(G){var j=G.K==="tick"&&G.L==="text"&&e.ticklabelmode==="period",q=a._plots[e._mainSubplot],V;G.K===Xd.K?V=q.zerolinelayer.selectAll("."+e._id+"zl"):G.K===Wd.K?V=q.minorGridlayer.selectAll("."+e._id):G.K===Yd.K?V=q.gridlayer.selectAll("."+e._id):V=q[e._id.charAt(0)+"axislayer"],V.each(function(){var K=ma.select(this);G.L&&(K=K.selectAll(G.L)),K.each(function(Y){var te=e.l2p(j?qd(Y):Y.x)+e._offset,oe=ma.select(this);te<e["_visibleLabelMax_"+O._id]&&te>e["_visibleLabelMin_"+O._id]?oe.style("display","none"):G.K==="tick"&&!B&&oe.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 M=0,A=[],D,P=1;if(c.each(function(Ae){M=Math.max(M,Ae.fontSize);var ce=e.l2p(Ae.x),ye=Kd(this),Se=na.bBox(ye.node());P=Math.max(P,so.lineCount(ye)),A.push({top:0,bottom:10,height:10,left:ce-Se.width/2,right:ce+Se.width/2+2,width:Se.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var I=2;for(e.ticks&&(I+=e.tickwidth/2),D=0;D<A.length;D++){var O=o&&o[D].xbnd?o[D].xbnd:[null,null],B=A[D];if(O[0]!==null&&B.left-e.l2p(O[0])<I||O[1]!==null&&e.l2p(O[1])-B.right<I){d=90;break}}}else{var G=o.length,j=Math.abs((o[G-1].x-o[0].x)*e._m)/(G-1),q=e.ticklabelposition||"",V=function(Ae){return q.indexOf(Ae)!==-1},K=V("top"),Y=V("left"),te=V("right"),oe=V("bottom"),_e=oe||Y||K||te,de=_e?(e.tickwidth||0)+2*rc:0,X=j,Q=M*1.25*P,le=Math.sqrt(Math.pow(X,2)+Math.pow(Q,2)),se=X/le,he=e.autotickangles.map(function(Ae){return Ae*Math.PI/180}),Te=he.find(function(Ae){return Math.abs(Math.cos(Ae))<=se});Te===void 0&&(Te=he.reduce(function(Ae,ce){return Math.abs(Math.cos(Ae))<Math.abs(Math.cos(ce))?Ae:ce},he[0]));var fe=Te*(180/Math.PI);for(D=0;D<A.length-1;D++)if(vt.bBoxIntersect(A[D],A[D+1],de)){d=fe;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?ur(s)?s:0:d});var y=function(){var M=0,A=0;return c.each(function(D,P){var I=Kd(this),O=I.select(".text-math-group");if(O.empty()){var B;e._vals[P]&&(B=e._vals[P].bb||na.bBox(I.node()),e._vals[P].bb=B),M=Math.max(M,B.width),A=Math.max(A,B.height)}}),{labelsMaxW:M,labelsMaxH:A}},g=e._anchorAxis;if(g&&(g.autorange||g.insiderange)&&ql(e)&&!o3(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),g.autorange&&(a._insideTickLabelsUpdaterange[g._name+".autorange"]=g.autorange,m.push(y)),g.insiderange)){var w=y(),b=e._id.charAt(0)==="y"?w.labelsMaxW:w.labelsMaxH;b+=2*rc,e.ticklabelposition==="inside"&&(b+=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]=g.range[k];var S=g.range,C=g.d2p(S[_]),L=g.d2p(S[k]),E=a._insideTickLabelsUpdaterange[g._name+".range"];if(E){var R=g.d2p(E[_]),N=g.d2p(E[k]),H=x*(e._id.charAt(0)==="y"?1:-1);H*C<H*R&&(C=R,T[_]=S[_]=E[_]),H*L>H*N&&(L=N,T[k]=S[k]=E[k])}var F=Math.abs(L-C);F-b>0?(F-=b,b*=1+b/F):b=0,e._id.charAt(0)!=="y"&&(b=-b),T[_]=g.p2d(g.d2p(S[_])+x*b),g.autorange==="min"||g.autorange==="max reversed"?(T[0]=null,g._rangeInitial0=void 0,g._rangeInitial1=void 0):(g.autorange==="max"||g.autorange==="min reversed")&&(T[1]=null,g._rangeInitial0=void 0,g._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[g._name+".range"]=T}var $=vt.syncOrAsync(m);return $&&$.then&&t._promises.push($),$};function C3(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,Zc);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(Yl.stroke,e.dividercolor).style("stroke-width",na.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}Ce.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 Zd(t){var e=t.title.font.size,r=(t.title.text.match(so.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(bn+r*tc):e*bn:r?e*(r+1)*tc:e}function D3(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+Zd(e);else{var l=ql(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=Ce.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=na.getTranslate(d.node().parentNode);h.offsetLeft=p.x,h.offsetTop=p.y}e.title.hasOwnProperty("standoff")&&(h.pad=0)}return e._titleStandoff=o,QD.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"}})}Ce.shouldShowZeroLine=function(t,e,r){var a=vt.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===Wc)&&(Ww(e,0)||!$3(t,e,r,a)||P3(t,e))};Ce.clipEnds=function(t,e){return e.filter(function(r){return Ww(t,r.x)})};function Ww(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function $3(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=Ce.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 g in y)if(m(y[g][0])||m(y[g][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var u=Ce.list(t,l),v=0;v<u.length;v++){var h=u[v];if(h._mainAxis===i&&f(h))return!0}}function P3(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&&(Xl.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 Kd(t){var e=ma.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}Ce.allowAutoMargin=function(t){for(var e=Ce.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(ko.allowAutoMargin(t,hp(a)),a.mirror&&ko.allowAutoMargin(t,qw(a))),Xl.getComponentMethod("rangeslider","isVisible")(a)&&ko.allowAutoMargin(t,Zw(a))}};function hp(t){return t._id+".automargin"}function qw(t){return hp(t)+".mirror"}function Zw(t){return t._id+".rangeslider"}Ce.swap=function(t,e){for(var r=E3(t,e),a=0;a<r.length;a++)R3(t,r[a].x,r[a].y)};function E3(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]],Xs(s.x,f.x),Xs(s.y,f.y);Xs(s.x,[o]),Xs(s.y,[l])}}return r}function Xs(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function R3(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(Ce.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(Ce.getFromId(t,r[o]));var s=Object.keys(JD),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 g=i[l][u];u==="type"&&c.indexOf(h)!==-1&&c.indexOf(g)!==-1&&h!==g?m=!0:i[l][u]!==h&&(d=!1)}d&&(p&&(n[a[0]._name].type="linear"),m&&(n[i[0]._name].type="linear"),z3(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&&vt.swapAttrs(n.annotations[o],["?"])}}function z3(t,e,r,a,i){var n=vt.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 pp(t){return t._id==="angularaxis"}function Yu(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 ql(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function Kc(t,e){ql(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function Qd(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 I3(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}var Bt=iw.exports,F3=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")},N3=F3,Kw=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&&(N3(a,c,l),(o==="linear"||o==="-")&&a("rangemode")),r.cleanRange()},Wu={},Qw={exports:{}},H3=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},eg=ge,O3=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],j3=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=eg.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=eg.constrain(Math.floor(r*3),0,2),O3[r][e]},Jw={exports:{}},B3=hs,G3=jc,U3=Ic.getGraphDiv,V3=$c,Jd=Jw.exports={};Jd.wrapped=function(t,e,r){t=U3(t),t._fullLayout&&G3.clear(t._fullLayout._uid+V3.HOVERID),Jd.raw(t,e,r)};Jd.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&B3.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 X3=Jw.exports,Y3=TM,qu=Y1,W3=W1,q3=ge.removeElement,Z3=Yr,Tn=Qw.exports={};Tn.align=H3;Tn.getCursor=j3;var eT=X3;Tn.unhover=eT.wrapped;Tn.unhoverRaw=eT.raw;Tn.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,W3?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=m,n.addEventListener("touchstart",m,{passive:!1})):n.ontouchstart=m;function d(w,b,x){return Math.abs(w)<x&&(w=0),Math.abs(b)<x&&(b=0),[w,b]}var p=e.clampFn||d;function m(w){r._dragged=!1,r._dragging=!0;var b=Zu(w);o=b[0],l=b[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=tT(),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",g),document.addEventListener("touchend",g),e.dragmode!==!1&&(w.preventDefault(),document.addEventListener("mousemove",y),document.addEventListener("touchmove",y,{passive:!1}))}function y(w){w.preventDefault();var b=Zu(w),x=e.minDrag||Z3.MINDRAG,_=p(b[0]-o,b[1]-l,x),k=_[0],T=_[1];(k||T)&&(r._dragged=!0,Tn.unhover(r,w)),r._dragged&&e.moveFn&&!h&&(r._dragdata={element:n,dx:k,dy:T},e.moveFn(k,T))}function g(w){if(delete r._dragdata,e.dragmode!==!1&&(w.preventDefault(),document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",y)),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g),qu?q3(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 b;try{b=new MouseEvent("click",w)}catch{var x=Zu(w);b=document.createEvent("MouseEvents"),b.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(b)}r._dragging=!1,r._dragged=!1}};function tT(){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}Tn.coverSlip=tT;function Zu(t){return Y3(t.changedTouches?t.changedTouches[0]:t,document.body)}var ti=Qw.exports,Qc={},Ui=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},Ku=Ui,sl="data-savedcursor",tg="!!",K3=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,tg)}Ku(e,r)}else a&&(e.attr(sl,null),a===tg?Ku(e):Ku(e,a))},Qu=Dr,Q3=Hr,rT={_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:Q3.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:Qu({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:Qu({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},entrywidth:{valType:"number",min:0,editType:"legend",description:["Sets the width (in px or fraction) of the legend.","Use 0 to size the entry based on the text width,","when `entrywidthmode` is set to *pixels*."].join(" ")},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend",description:"Determines what entrywidth means."},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",editType:"legend",description:["Sets the x position with respect to `xref` (in normalized coordinates) of the legend.","When `xref` is *paper*, defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends.","When `xref` is *container*, defaults to *1* for vertical legends and","defaults to *0* for horizontal legends.","Must be between *0* and *1* if `xref` is *container*.","and between *-2* and *3* if `xref` is *paper*."].join(" ")},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",editType:"legend",description:["Sets the y position with respect to `yref` (in normalized coordinates) of the legend.","When `yref` is *paper*, defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders.","When `yref` is *container*, defaults to *1*.","Must be between *0* and *1* if `yref` is *container*","and between *-2* and *3* if `yref` is *paper*."].join(" ")},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:Qu({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","top center and top right are for horizontal alignment","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},qo={};qo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};qo.isVertical=function(e){return e.orientation!=="h"};qo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var Ju=lt,Kr=ge,J3=Ot,e5=Ta,t5=rT,r5=ds,ev=qo;function a5(t,e,r,a){var i=e[t]||{},n=J3.newContainer(r,t);function o($,M){return Kr.coerce(i,n,t5,$,M)}var l=Kr.coerceFont(o,"font",r.font);o("bgcolor",r.paper_bgcolor),o("bordercolor");var s=o("visible");if(s){for(var f,c=function($,M){var A=f._input,D=f;return Kr.coerce(A,D,e5,$,M)},u=r.font||{},v=Kr.coerceFont(o,"grouptitlefont",Kr.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")}),g=0;g<y.length;g++)if(f=y[g],!!f.visible){var w=f._isShape;(f.showlegend||f._dfltShowLegend&&!(f._module&&f._module.attributes&&f._module.attributes.showlegend&&f._module.attributes.showlegend.dflt===!1))&&(h++,f.showlegend&&(d=!0,(!w&&Ju.traceIs(f,"pie-like")||f._input.showlegend===!0)&&h++),Kr.coerceFont(c,"legendgrouptitle.font",v)),(!w&&Ju.traceIs(f,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(f.fill)!==-1)&&(p=ev.isGrouped({traceorder:p})?"grouped+reversed":"reversed"),f.legendgroup!==void 0&&f.legendgroup!==""&&(p=ev.isReversed({traceorder:p})?"reversed+grouped":"grouped")}var b=Kr.coerce(e,r,r5,"showlegend",d&&h>(t==="legend"?1:0));if(b===!1&&(r[t]=void 0),!(b===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),b!==!1)){o("borderwidth");var x=o("orientation"),_=o("yref"),k=o("xref"),T=x==="h",S=_==="paper",C=k==="paper",L,E,R,N="left";T?(L=0,Ju.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",C?L=1.02:(L=1,N="right")),Kr.coerce(i,n,{x:{valType:"number",editType:"legend",min:C?-2:0,max:C?3:1,dflt:L}},"x"),Kr.coerce(i,n,{y:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:E}},"y"),o("traceorder",p),ev.isGrouped(r[t])&&o("tracegroupgap"),o("entrywidth"),o("entrywidthmode"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("xanchor",N),o("yanchor",R),o("valign"),Kr.noneOrAll(i,n,["x","y"]);var H=o("title.text");if(H){o("title.side",T?"left":"top");var F=Kr.extendFlat({},l,{size:Kr.bigFont(l.size)});Kr.coerceFont(o,"title.font",F)}}}}var aT=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++)Kr.pushUnique(f,n[i].legend);for(r._legends=[],i=0;i<f.length;i++){var c=f[i];a5(c,e,r,n),r[c]&&r[c].visible&&(r[c]._id=c),r._legends.push(c)}},xi=lt,Ef=ge,i5=Ef.pushUnique,tv=!0,n5=function(e,r,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var n=i.legend.itemclick,o=i.legend.itemdoubleclick,l=i.legend.groupclick;a===1&&n==="toggle"&&o==="toggleothers"&&tv&&r.data&&r._context.showTips&&Ef.notifier(Ef._(r,"Double-click on legend to isolate one trace"),"long"),tv=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],u=e.data()[0][0];if(u.groupTitle&&u.noClick)return;var v=r._fullData,h=(i.shapes||[]).filter(function(fe){return fe.showlegend}),d=v.concat(h),p=u.trace;p._isShape&&(p=p._fullInput);var m=p.legendgroup,y,g,w,b,x,_,k={},T=[],S=[],C=[];function L(fe,Ae){var ce=T.indexOf(fe),ye=k.visible;return ye||(ye=k.visible=[]),T.indexOf(fe)===-1&&(T.push(fe),ce=T.length-1),ye[ce]=Ae,ce}var E=(i.shapes||[]).map(function(fe){return fe._input}),R=!1;function N(fe,Ae){E[fe].visible=Ae,R=!0}function H(fe,Ae){if(!(u.groupTitle&&!f)){var ce=fe._fullInput||fe,ye=ce._isShape,Se=ce.index;if(Se===void 0&&(Se=ce._index),xi.hasTransform(ce,"groupby")){var Me=S[Se];if(!Me){var J=xi.getTransformIndices(ce,"groupby"),xe=J[J.length-1];Me=Ef.keyedContainer(ce,"transforms["+xe+"].styles","target","value.visible"),S[Se]=Me}var re=Me.get(fe._group);re===void 0&&(re=!0),re!==!1&&Me.set(fe._group,Ae),C[Se]=L(Se,ce.visible!==!1)}else{var ue=ce.visible===!1?!1:Ae;ye?N(Se,ue):L(Se,ue)}}}var F=p.legend,$=p._fullInput,M=$&&$._isShape;if(!M&&xi.traceIs(p,"pie-like")){var A=u.label,D=c.indexOf(A);if(s==="toggle")D===-1?c.push(A):c.splice(D,1);else if(s==="toggleothers"){var P=D!==-1,I=[];for(y=0;y<r.calcdata.length;y++){var O=r.calcdata[y];for(g=0;g<O.length;g++){var B=O[g],G=B.label;F===O[0].trace.legend&&A!==G&&(c.indexOf(G)===-1&&(P=!0),i5(c,G),I.push(G))}}if(!P)for(var j=0;j<I.length;j++){var q=c.indexOf(I[j]);q!==-1&&c.splice(q,1)}}xi.call("_guiRelayout",r,"hiddenlabels",c)}else{var V=m&&m.length,K=[],Y;if(V)for(y=0;y<d.length;y++)Y=d[y],Y.visible&&Y.legendgroup===m&&K.push(y);if(s==="toggle"){var te;switch(p.visible){case!0:te="legendonly";break;case!1:te=!1;break;case"legendonly":te=!0;break}if(V)if(f)for(y=0;y<d.length;y++){var oe=d[y];oe.visible!==!1&&oe.legendgroup===m&&H(oe,te)}else H(p,te);else H(p,te)}else if(s==="toggleothers"){var _e,de,X,Q,le,se=!0;for(y=0;y<d.length;y++)if(le=d[y],_e=le===p,X=le.showlegend!==!0,!(_e||X)&&(de=V&&le.legendgroup===m,!de&&le.legend===F&&le.visible===!0&&!xi.traceIs(le,"notLegendIsolatable"))){se=!1;break}for(y=0;y<d.length;y++)if(le=d[y],!(le.visible===!1||le.legend!==F)&&!xi.traceIs(le,"notLegendIsolatable"))switch(p.visible){case"legendonly":H(le,!0);break;case!0:Q=se?!0:"legendonly",_e=le===p,X=le.showlegend!==!0&&!le.legendgroup,de=_e||V&&le.legendgroup===m,H(le,de||X?!0:Q);break}}for(y=0;y<S.length;y++)if(w=S[y],!!w){var he=w.constructUpdate(),Te=Object.keys(he);for(g=0;g<Te.length;g++)b=Te[g],_=k[b]=k[b]||[],_[C[y]]=he[b]}for(x=Object.keys(k),y=0;y<x.length;y++)for(b=x[y],g=0;g<T.length;g++)k[b].hasOwnProperty(g)||(k[b][g]=void 0);R?xi.call("_guiUpdate",r,k,{shapes:E},T):xi.call("_guiRestyle",r,k,T)}},iT={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},rg=lt,rv=qo,o5=function(e,r,a){var i=r._inHover,n=rv.isGrouped(r),o=rv.isReversed(r),l={},s=[],f=!1,c={},u=0,v=0,h,d;function p($,M,A){if(r.visible!==!1&&!(a&&$!==r._id))if(M===""||!rv.isGrouped(r)){var D="~~i"+u;s.push(D),l[D]=[A],u++}else s.indexOf(M)===-1?(s.push(M),f=!0,l[M]=[A]):l[M].push(A)}for(h=0;h<e.length;h++){var m=e[h],y=m[0],g=y.trace,w=g.legend,b=g.legendgroup;if(!(!i&&(!g.visible||!g.showlegend)))if(rg.traceIs(g,"pie-like"))for(c[b]||(c[b]={}),d=0;d<m.length;d++){var x=m[d].label;c[b][x]||(p(w,b,{label:x,color:m[d].color,i:m[d].i,trace:g,pts:m[d].pts}),c[b][x]=!0,v=Math.max(v,(x||"").length))}else p(w,b,y),v=Math.max(v,(g.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 C=k[h][d].trace.legendrank;S>C&&(S=C)}k[h][0]._groupMinRank=S,k[h][0]._preGroupSort=h}var L=function($,M){return $[0]._groupMinRank-M[0]._groupMinRank||$[0]._preGroupSort-M[0]._preGroupSort},E=function($,M){return $.trace.legendrank-M.trace.legendrank||$._preSort-M._preSort};for(k.forEach(function($,M){$[0]._preGroupSort=M}),k.sort(L),h=0;h<k.length;h++){k[h].forEach(function($,M){$._preSort=M}),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(rg.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},Rn={};(function(t){var e=ge;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}})(Rn);var l5=$t,s5=pt,f5=function(e,r,a,i){var n=a.marker.pattern;n&&n.shape?l5.pointStyle(e,a,i,r):s5.fill(e,r.color)},ag=pt,ig=Rn.castOption,c5=f5,mp=function(e,r,a,i){var n=a.marker.line,o=ig(n.color,r.pts)||ag.defaultLine,l=ig(n.width,r.pts)||0;e.call(c5,r,a,i).style("stroke-width",l).call(ag.stroke,o)},Ir=gt,av=lt,Pr=ge,ng=Pr.strTranslate,Vr=$t,fa=pt,iv=Oa.extractOpts,ic=Or,u5=mp,v5=Rn.castOption,d5=iT,og=12,lg=5,Qi=2,h5=10,Hn=5,nT=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+d5.itemGap*2)/2,s=ng(l,0),f=function(k,T,S,C){var L;if(k+1)L=k;else if(T&&T.width>0)L=T.width;else return 0;return n?C:Math.min(L,S)};e.each(function(k){var T=Ir.select(this),S=Pr.ensureSingle(T,"g","layers");S.style("opacity",k[0].trace.opacity);var C=a.valign,L=k[0].lineHeight,E=k[0].height;if(C==="middle"||!L||!E)S.attr("transform",null);else{var R={top:1,bottom:-1}[C],N=R*(.5*(L-E+3));S.attr("transform",ng(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(b).each(w).each(c).each(u).each(y).each(g);function c(k){var T=sg(k),S=T.showFill,C=T.showLine,L=T.showGradientLine,E=T.showGradientFill,R=T.anyFill,N=T.anyLine,H=k[0],F=H.trace,$,M,A=iv(F),D=A.colorscale,P=A.reversescale,I=function(K){if(K.size())if(S)Vr.fillGroupStyle(K,r);else{var Y="legendfill-"+F.uid;Vr.gradient(K,r,Y,nv(P),D,"fill")}},O=function(K){if(K.size()){var Y="legendline-"+F.uid;Vr.lineGroupStyle(K),Vr.gradient(K,r,Y,nv(P),D,"stroke")}},B=ic.hasMarkers(F)||!R?"M5,0":N?"M5,-2":"M5,-3",G=Ir.select(this),j=G.select(".legendfill").selectAll("path").data(S||E?[k]:[]);if(j.enter().append("path").classed("js-fill",!0),j.exit().remove(),j.attr("d",B+"h"+o+"v6h-"+o+"z").call(I),C||L){var q=f(void 0,F.line,h5,lg);M=Pr.minExtend(F,{line:{width:q}}),$=[Pr.minExtend(H,{trace:M})]}var V=G.select(".legendlines").selectAll("path").data(C||L?[$]:[]);V.enter().append("path").classed("js-line",!0),V.exit().remove(),V.attr("d",B+(L?"l"+o+",0.0001":"h"+o)).call(C?Vr.lineGroupStyle:O)}function u(k){var T=sg(k),S=T.anyFill,C=T.anyLine,L=T.showLine,E=T.showMarker,R=k[0],N=R.trace,H=!E&&!C&&!S&&ic.hasText(N),F,$;function M(j,q,V,K){var Y=Pr.nestedProperty(N,j).get(),te=Pr.isArrayOrTypedArray(Y)&&q?q(Y):Y;if(n&&te&&K!==void 0&&(te=K),V){if(te<V[0])return V[0];if(te>V[1])return V[1]}return te}function A(j){return R._distinct&&R.index&&j[R.index]?j[R.index]:j[0]}if(E||H||L){var D={},P={};if(E){D.mc=M("marker.color",A),D.mx=M("marker.symbol",A),D.mo=M("marker.opacity",Pr.mean,[.2,1]),D.mlc=M("marker.line.color",A),D.mlw=M("marker.line.width",Pr.mean,[0,5],Qi),P.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var I=M("marker.size",Pr.mean,[2,16],og);D.ms=I,P.marker.size=I}L&&(P.line={width:M("line.width",A,[0,10],lg)}),H&&(D.tx="Aa",D.tp=M("textposition",A),D.ts=10,D.tc=M("textfont.color",A),D.tf=M("textfont.family",A)),F=[Pr.minExtend(R,D)],$=Pr.minExtend(N,P),$.selectedpoints=null,$.texttemplate=null}var O=Ir.select(this).select("g.legendpoints"),B=O.selectAll("path.scatterpts").data(E?F:[]);B.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),B.exit().remove(),B.call(Vr.pointStyle,$,r),E&&(F[0].mrc=3);var G=O.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(Vr.textPointStyle,$,r)}function v(k){var T=k[0].trace,S=T.type==="waterfall";if(k[0]._distinct&&S){var C=k[0].trace[k[0].dir].marker;return k[0].mc=C.color,k[0].mlw=C.line.width,k[0].mlc=C.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=Ir.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=Ir.select(this),H=T[R[0]].marker,F=f(void 0,H.line,Hn,Qi);N.attr("d",R[1]).style("stroke-width",F+"px").call(fa.fill,H.color),F&&N.call(fa.stroke,H.line.color)})}function h(k){p(k,this)}function d(k){p(k,this,"funnel")}function p(k,T,S){var C=k[0].trace,L=C.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?C.visible&&C.type===S:av.traceIs(C,"bar"),H=Ir.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 $=Ir.select(this),M=F[0],A=f(M.mlw,L.line,Hn,Qi);$.style("stroke-width",A+"px");var D=M.mcc;if(!a._inHover&&"mc"in M){var P=iv(L),I=P.mid;I===void 0&&(I=(P.max+P.min)/2),D=Vr.tryColorscale(L,"")(I)}var O=D||M.mc||L.color,B=L.pattern,G=B&&Vr.getPatternAttr(B.shape,0,"");if(G){var j=Vr.getPatternAttr(B.bgcolor,0,null),q=Vr.getPatternAttr(B.fgcolor,0,null),V=B.fgopacity,K=fg(B.size,8,10),Y=fg(B.solidity,.5,1),te="legend-"+C.uid;$.call(Vr.pattern,"legend",r,te,G,K,Y,D,B.fillmode,j,q,V)}else $.call(fa.fill,O);A&&fa.stroke($,M.mlc||E.color)})}function m(k){var T=k[0].trace,S=Ir.select(this).select("g.legendpoints").selectAll("path.legendbox").data(T.visible&&av.traceIs(T,"box-violin")?[k]:[]);S.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),S.exit().remove(),S.each(function(){var C=Ir.select(this);if((T.boxpoints==="all"||T.points==="all")&&fa.opacity(T.fillcolor)===0&&fa.opacity((T.line||{}).color)===0){var L=Pr.minExtend(T,{marker:{size:n?og:Pr.constrain(T.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(Vr.pointStyle,L,r)}else{var E=f(void 0,T.line,Hn,Qi);C.style("stroke-width",E+"px").call(fa.fill,T.fillcolor),E&&fa.stroke(C,T.line.color)}})}function y(k){var T=k[0].trace,S=Ir.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(C,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(C,L){var E=Ir.select(this),R=T[L?"increasing":"decreasing"],N=f(void 0,R.line,Hn,Qi);E.style("stroke-width",N+"px").call(fa.fill,R.fillcolor),N&&fa.stroke(E,R.line.color)})}function g(k){var T=k[0].trace,S=Ir.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(C,L){return L?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(C,L){var E=Ir.select(this),R=T[L?"increasing":"decreasing"],N=f(void 0,R.line,Hn,Qi);E.style("fill","none").call(Vr.dashLine,R.line.dash,N),N&&fa.stroke(E,R.line.color)})}function w(k){x(k,this,"pie")}function b(k){x(k,this,"funnelarea")}function x(k,T,S){var C=k[0],L=C.trace,E=S?L.visible&&L.type===S:av.traceIs(L,S),R=Ir.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(v5(N.line.width,C.pts),N.line,Hn,Qi),F="pieLike",$=Pr.minExtend(L,{marker:{line:{width:H}}},F),M=Pr.minExtend(C,{trace:$},F);u5(R,M,$,r)}}function _(k){var T=k[0].trace,S,C=[];if(T.visible)switch(T.type){case"histogram2d":case"heatmap":C=[["M-15,-2V4H15V-2Z"]],S=!0;break;case"choropleth":case"choroplethmapbox":C=[["M-6,-6V6H6V-6Z"]],S=!0;break;case"densitymapbox":C=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],S="radial";break;case"cone":C=[["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":C=[["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":C=[["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":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!1;break;case"volume":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!0;break;case"isosurface":C=[["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=Ir.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(C);L.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(E,R){var N=Ir.select(this),H=iv(T),F=H.colorscale,$=H.reversescale,M=function(I){if(I.size()){var O="legendfill-"+T.uid;Vr.gradient(I,r,O,nv($,S==="radial"),F,"fill")}},A;if(F){if(!S){var P=F.length;A=R===0?F[$?P-1:0][1]:R===1?F[$?0:P-1][1]:F[Math.floor((P-1)/2)][1]}}else{var D=T.vertexcolor||T.facecolor||T.color;A=Pr.isArrayOrTypedArray(D)?D[R]||D[0]:D}N.attr("d",E[0]),A?N.call(fa.fill,A):N.call(M)})}};function nv(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function sg(t){var e=t[0].trace,r=e.contours,a=ic.hasLines(e),i=ic.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 fg(t,e,r){return t&&Pr.isArrayOrTypedArray(t)?e:t>r?r:t}var Jr=gt,ar=ge,eh=vr,Di=lt,cg=hs,ov=ti,cr=$t,Rf=pt,xn=_r,ug=n5,mr=iT,yp=Wr,oT=yp.LINE_SPACING,go=yp.FROM_TL,vg=yp.FROM_BR,dg=o5,p5=nT,hg=qo,fo=1,m5=/^legend[0-9]*$/,lT=function(e,r){if(r)pg(e,r);else{var a=e._fullLayout,i=a._legends,n=a._infolayer.selectAll('[class^="legend"]');n.each(function(){var f=Jr.select(this),c=f.attr("class"),u=c.split(" ")[0];u.match(m5)&&i.indexOf(u)===-1&&f.remove()});for(var o=0;o<i.length;o++){var l=i[o],s=e._fullLayout[l];pg(e,s)}}};function y5(t,e,r){if(!(e.title.side!=="top center"&&e.title.side!=="top right")){var a=e.title.font,i=a.size*oT,n=0,o=t.node(),l=cr.bBox(o).width;e.title.side==="top center"?n=.5*(e._width-2*r-2*mr.titlePad-l):e.title.side==="top right"&&(n=e._width-2*r-2*mr.titlePad-l),xn.positionText(t,r+mr.titlePad+n,r+i)}}function pg(t,e){var r=e||{},a=t._fullLayout,i=Jc(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=dg(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&&dg(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(),eh.autoMargin(t,i);var p=ar.ensureSingle(o,"g",i,function(T){l||T.attr("pointer-events","all")}),m=ar.ensureSingleById(a._topdefs,"clipPath",n,function(T){T.append("rect")}),y=ar.ensureSingle(p,"rect","bg",function(T){T.attr("shape-rendering","crispEdges")});y.call(Rf.stroke,r.bordercolor).call(Rf.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var g=ar.ensureSingle(p,"g","scrollbox"),w=r.title;r._titleWidth=0,r._titleHeight=0;var b;w.text?(b=ar.ensureSingle(g,"text",i+"titletext"),b.attr("text-anchor","start").call(cr.font,w.font).text(w.text),zf(b,g,t,r,fo)):g.selectAll("."+i+"titletext").remove();var x=ar.ensureSingle(p,"rect","scrollbar",function(T){T.attr(mr.scrollBarEnterAttrs).call(Rf.fill,mr.scrollBarColor)}),_=g.selectAll("g.groups").data(s);_.enter().append("g").attr("class","groups"),_.exit().remove();var k=_.selectAll("g.traces").data(ar.identity);k.enter().append("g").attr("class","traces"),k.exit().remove(),k.style("opacity",function(T){var S=T[0].trace;return Di.traceIs(S,"pie-like")?d.indexOf(T[0].label)!==-1?.5:1:S.visible==="legendonly"?.5:1}).each(function(){Jr.select(this).call(g5,t,r)}).call(p5,t,r).each(function(){l||Jr.select(this).call(b5,t,i)}),ar.syncOrAsync([eh.previousPromises,function(){return w5(t,_,k,r)},function(){var T=a._size,S=r.borderwidth,C=r.xref==="paper",L=r.yref==="paper";if(w.text&&y5(b,r,S),!l){var E,R;C?E=T.l+T.w*r.x-go[nc(r)]*r._width:E=a.width*r.x-go[nc(r)]*r._width,L?R=T.t+T.h*(1-r.y)-go[oc(r)]*r._effHeight:R=a.height*(1-r.y)-go[oc(r)]*r._effHeight;var N=T5(t,i,E,R);if(N)return;if(a.margin.autoexpand){var H=E,F=R;E=C?ar.constrain(E,0,a.width-r._width):H,R=L?ar.constrain(R,0,a.height-r._effHeight):F,E!==H&&ar.log("Constrain "+i+".x to make legend fit inside graph"),R!==F&&ar.log("Constrain "+i+".y to make legend fit inside graph")}cr.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}),cr.setTranslate(g,0,0),m.select("rect").attr({width:r._width-2*S,height:$-2*S,x:S,y:S}),cr.setClipUrl(g,n,t),cr.setRect(x,0,0,0,0),delete r._scrollY}else{var M=Math.max(mr.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),A=r._effHeight-M-2*mr.scrollBarMargin,D=r._height-r._effHeight,P=A/D,I=Math.min(r._scrollY||0,D);y.attr({width:r._width-2*S+mr.scrollBarWidth+mr.scrollBarMargin,height:r._effHeight-S,x:S/2,y:S/2}),m.select("rect").attr({width:r._width-2*S+mr.scrollBarWidth+mr.scrollBarMargin,height:r._effHeight-2*S,x:S,y:S+I}),cr.setClipUrl(g,n,t),Y(I,M,P),p.on("wheel",function(){I=ar.constrain(r._scrollY+Jr.event.deltaY/A*D,0,D),Y(I,M,P),I!==0&&I!==D&&Jr.event.preventDefault()});var O,B,G,j=function(X,Q,le){var se=(le-Q)/P+X;return ar.constrain(se,0,D)},q=function(X,Q,le){var se=(Q-le)/P+X;return ar.constrain(se,0,D)},V=Jr.behavior.drag().on("dragstart",function(){var X=Jr.event.sourceEvent;X.type==="touchstart"?O=X.changedTouches[0].clientY:O=X.clientY,G=I}).on("drag",function(){var X=Jr.event.sourceEvent;X.buttons===2||X.ctrlKey||(X.type==="touchmove"?B=X.changedTouches[0].clientY:B=X.clientY,I=j(G,O,B),Y(I,M,P))});x.call(V);var K=Jr.behavior.drag().on("dragstart",function(){var X=Jr.event.sourceEvent;X.type==="touchstart"&&(O=X.changedTouches[0].clientY,G=I)}).on("drag",function(){var X=Jr.event.sourceEvent;X.type==="touchmove"&&(B=X.changedTouches[0].clientY,I=q(G,O,B),Y(I,M,P))});g.call(K)}function Y(X,Q,le){r._scrollY=t._fullLayout[i]._scrollY=X,cr.setTranslate(g,0,-X),cr.setRect(x,r._width,mr.scrollBarMargin+X*le,mr.scrollBarWidth,Q),m.select("rect").attr("y",S+X)}if(t._context.edits.legendPosition){var te,oe,_e,de;p.classed("cursor-move",!0),ov.init({element:p.node(),gd:t,prepFn:function(){var X=cr.getTranslate(p);_e=X.x,de=X.y},moveFn:function(X,Q){var le=_e+X,se=de+Q;cr.setTranslate(p,le,se),te=ov.align(le,r._width,T.l,T.l+T.w,r.xanchor),oe=ov.align(se+r._height,-r._height,T.t+T.h,T.t,r.yanchor)},doneFn:function(){if(te!==void 0&&oe!==void 0){var X={};X[i+".x"]=te,X[i+".y"]=oe,Di.call("_guiRelayout",t,X)}},clickFn:function(X,Q){var le=o.selectAll("g.traces").filter(function(){var se=this.getBoundingClientRect();return Q.clientX>=se.left&&Q.clientX<=se.right&&Q.clientY>=se.top&&Q.clientY<=se.bottom});le.size()>0&&sT(t,p,le,X,Q)}})}}],t)}}function Ys(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 sT(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),Di.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=cg.triggerHandler(t,"plotly_legendclick",o);if(a===1){if(l===!1)return;e._clickTimeout=setTimeout(function(){t._fullLayout&&ug(r,t,a)},t._context.doubleClickDelay)}else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=cg.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&l!==!1&&ug(r,t,a)}}function g5(t,e,r){var a=Jc(r),i=t.data()[0][0],n=i.trace,o=Di.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=ar.templateString(f,n._meta))));var u=ar.ensureSingle(t,"text",a+"text");u.attr("text-anchor","start").call(cr.font,c).text(l?mg(f,s):f);var v=r.itemwidth+mr.itemGap*2;xn.positionText(u,v,0),l?u.call(xn.makeEditable,{gd:e,text:f}).call(zf,t,e,r).on("edit",function(h){this.text(mg(h,s)).call(zf,t,e,r);var d=i.trace._fullInput||{},p={};if(Di.hasTransform(d,"groupby")){var m=Di.getTransformIndices(d,"groupby"),y=m[m.length-1],g=ar.keyedContainer(d,"transforms["+y+"].styles","target","value.name");g.set(i.trace._group,h),p=g.constructUpdate()}else p.name=h;return d._isShape?Di.call("_guiRelayout",e,"shapes["+n.index+"].name",p.name):Di.call("_guiRestyle",e,p,n.index)}):zf(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 b5(t,e,r){var a=e._context.doubleClickDelay,i,n=1,o=ar.ensureSingle(t,"rect",r+"toggle",function(l){e._context.staticPlot||l.style("cursor","pointer").attr("pointer-events","all"),l.call(Rf.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)),sT(e,l,t,n,Jr.event)}}))}function zf(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),xn.convertToTspans(t,r,function(){x5(e,r,a,i)})}function x5(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=Jc(r);r||(r=e._fullLayout[l]);var s=r.borderwidth,f;a===fo?f=r.title.font:i.groupTitle?f=i.groupTitle.font:f=r.font;var c=f.size*oT,u,v;if(o){var h=cr.bBox(o);u=h.height,v=h.width,a===fo?cr.setTranslate(n,s,s+u*.75):cr.setTranslate(n,0,u*.25)}else{var d="."+l+(a===fo?"title":"")+"text",p=t.select(d),m=xn.lineCount(p),y=p.node();if(u=c*m,v=y?cr.bBox(y).width:0,a===fo)r.title.side==="left"&&(v+=mr.itemGap*2),xn.positionText(p,s+mr.titlePad,s+c);else{var g=mr.itemGap*2+r.itemwidth;i.groupTitle&&(g=mr.itemGap,v-=r.itemwidth),xn.positionText(p,g,-c*((m-1)/2-.3))}}a===fo?(r._titleWidth=v,r._titleHeight=u):(i.lineHeight=c,i.height=Math.max(u,16)+3,i.width=v)}function _5(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 w5(t,e,r,a){var i=t._fullLayout,n=Jc(a);a||(a=i[n]);var o=i._size,l=hg.isVertical(a),s=hg.isGrouped(a),f=a.entrywidthmode==="fraction",c=a.borderwidth,u=2*c,v=mr.itemGap,h=a.itemwidth+v*2,d=2*(c+v),p=oc(a),m=a.y<0||a.y===0&&p==="top",y=a.y>1||a.y===1&&p==="bottom",g=a.tracegroupgap,w={};a._maxHeight=Math.max(m||y?i.height/2:o.h,30);var b=0;a._width=0,a._height=0;var x=_5(a);if(l)r.each(function(G){var j=G[0].height;cr.setTranslate(this,c+x[0],c+x[1]+a._height+j/2+v),a._height+=j,a._width=Math.max(a._width,G[0].width)}),b=h+a._width,a._width+=v+h+u,a._height+=d,s&&(e.each(function(G,j){cr.setTranslate(this,0,j*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var _=nc(a),k=a.x<0||a.x===0&&_==="right",T=a.x>1||a.x===1&&_==="left",S=y||m,C=i.width/2;a._maxWidth=Math.max(k?S&&_==="left"?o.l+o.w:C:T?S&&_==="right"?o.r+o.w:C:o.w,2*h);var L=0,E=0;r.each(function(G){var j=Ys(G,a,h);L=Math.max(L,j),E+=j}),b=null;var R=0;if(s){var N=0,H=0,F=0;e.each(function(){var G=0,j=0;Jr.select(this).selectAll("g.traces").each(function(V){var K=Ys(V,a,h),Y=V[0].height;cr.setTranslate(this,x[0],x[1]+c+v+Y/2+j),j+=Y,G=Math.max(G,K),w[V[0].trace.legendgroup]=G});var q=G+v;H>0&&q+c+H>a._maxWidth?(R=Math.max(R,H),H=0,F+=N+g,N=j):N=Math.max(N,j),cr.setTranslate(this,H,F),H+=q}),a._width=Math.max(R,H)+c,a._height=F+N+d}else{var $=r.size(),M=E+u+($-1)*v<a._maxWidth,A=0,D=0,P=0,I=0;r.each(function(G){var j=G[0].height,q=Ys(G,a,h),V=M?q:L;f||(V+=v),V+c+D-v>=a._maxWidth&&(R=Math.max(R,I),D=0,P+=A,a._height+=A,A=0),cr.setTranslate(this,x[0]+c+D,x[1]+c+P+j/2+v),I=D+q+v,D+=V,A=Math.max(A,j)}),M?(a._width=D+u,a._height=A+d):(a._width=Math.max(R,I)+u,a._height+=A+d)}}a._width=Math.ceil(Math.max(a._width+x[0],a._titleWidth+2*(c+mr.titlePad))),a._height=Math.ceil(Math.max(a._height+x[1],a._titleHeight+2*(c+mr.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var O=t._context.edits,B=O.legendText||O.legendPosition;r.each(function(G){var j=Jr.select(this).select("."+n+"toggle"),q=G[0].height,V=G[0].trace.legendgroup,K=Ys(G,a,h);s&&V!==""&&(K=w[V]);var Y=B?h:b||K;!l&&!f&&(Y+=v/2),cr.setRect(j,0,-q/2,Y,q)})}function T5(t,e,r,a){var i=t._fullLayout,n=i[e],o=nc(n),l=oc(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 eh.autoMargin(t,e,{x:n.x,y:n.y,l:n._width*go[o],r:n._width*vg[o],b:n._effHeight*vg[l],t:n._effHeight*go[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 nc(t){return ar.isRightAnchor(t)?"right":ar.isCenterAnchor(t)?"center":"left"}function oc(t){return ar.isBottomAnchor(t)?"bottom":ar.isMiddleAnchor(t)?"middle":"top"}function Jc(t){return t._id||"legend"}var un=gt,oi=wt,yg=wa,nr=ge,lv=nr.strTranslate,k5=nr.strRotate,A5=hs,va=_r,M5=K3,Ya=$t,br=pt,Ws=ti,Mi=Bt,Po=lt,Da=ka,kn=$c,S5=aT,L5=lT,fT=kn.YANGLE,gp=Math.PI*fT/180,C5=1/Math.sin(gp),D5=Math.cos(gp),$5=Math.sin(gp),It=kn.HOVERARROWSIZE,Tt=kn.HOVERTEXTPAD,gg={box:!0,ohlc:!0,violin:!0,candlestick:!0},P5={scatter:!0,scattergl:!0,splom:!0};Qc.hover=function(e,r,a,i){e=nr.getGraphDiv(e);var n=r.target;nr.throttle(e._fullLayout._uid+kn.HOVERID,kn.HOVERMINTIME,function(){E5(e,r,a,i,n)})};Qc.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=hT(i),o=pT(i),l=e.map(function(m){var y=m._x0||m.x0||m.x||0,g=m._x1||m.x1||m.x||0,w=m._y0||m.y0||m.y||0,b=m._y1||m.y1||m.y||0,x=m.eventData;if(x){var _=Math.min(y,g),k=Math.max(y,g),T=Math.min(w,b),S=Math.max(w,b),C=m.trace;if(Po.traceIs(C,"gl3d")){var L=i._fullLayout[C.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||br.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=uT(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||br.background,container:un.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 g=m.y0-m.by/2;g-u<v?m.offset=v-g+u:m.offset=0,v=g+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 E5(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{nr.warn("Unrecognized subplot: "+m);return}}var g=e.hovermode||o.hovermode;if(g&&!d&&(g="closest"),["x","y","closest","x unified","y unified"].indexOf(g)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return Ws.unhoverRaw(t,e);var w=o.hoverdistance;w===-1&&(w=1/0);var b=o.spikedistance;b===-1&&(b=1/0);var x=[],_=[],k,T,S,C,L,E,R,N,H,F,$,M,A,D={hLinePoint:null,vLinePoint:null},P=!1;if(Array.isArray(e))for(g="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(C=0;C<t.calcdata.length;C++)L=t.calcdata[C],E=L[0].trace,E.hoverinfo!=="skip"&&Da.isTraceInSubplots(E,n)&&(_.push(L),E.orientation==="h"&&(P=!0));var I=!i,O,B;if(I)"xpx"in e?O=e.xpx:O=v[0]._length/2,"ypx"in e?B=e.ypx:B=h[0]._length/2;else{if(A5.triggerHandler(t,"plotly_beforehover",e)===!1)return;var G=i.getBoundingClientRect();O=e.clientX-G.left,B=e.clientY-G.top,o._calcInverseTransform(t);var j=nr.apply3DTransform(o._invTransform)(O,B);if(O=j[0],B=j[1],O<0||O>v[0]._length||B<0||B>h[0]._length)return Ws.unhoverRaw(t,e)}if(e.pointerX=O+v[0]._offset,e.pointerY=B+h[0]._offset,"xval"in e?k=Da.flat(n,e.xval):k=Da.p2c(v,O),"yval"in e?T=Da.flat(n,e.yval):T=Da.p2c(h,B),!oi(k[0])||!oi(T[0]))return nr.warn("Fx.hover failed",e,t),Ws.unhoverRaw(t,e)}var q=1/0;function V(U,Z){for(C=0;C<_.length;C++)if(L=_[C],!(!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=Da.getSubplot(E),N=n.indexOf(R)),H=g,Da.isUnifiedHover(H)&&(H=H.charAt(0)),M={cd:L,trace:E,xa:v[N],ya:h[N],maxHoverDistance:w,maxSpikeDistance:b,index:!1,distance:Math.min(q,w),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:br.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]&&(M.subplot=o[R]._subplot),o._splomScenes&&o._splomScenes[E.uid]&&(M.scene=o._splomScenes[E.uid]),A=x.length,H==="array"){var ne=e[C];"pointNumber"in ne?(M.index=ne.pointNumber,H="closest"):(H="","xval"in ne&&(F=ne.xval,H="x"),"yval"in ne&&($=ne.yval,H=H?"closest":"y"))}else U!==void 0&&Z!==void 0?(F=U,$=Z):(F=k[N],$=T[N]);if(w!==0)if(E._module&&E._module.hoverPoints){var ie=E._module.hoverPoints(M,F,$,H,{finiteRange:!0,hoverLayer:o._hoverlayer});if(ie)for(var Le,we=0;we<ie.length;we++)Le=ie[we],oi(Le.x0)&&oi(Le.y0)&&x.push(F5(Le,g))}else nr.log("Unrecognized trace type in hover:",E);if(g==="closest"&&x.length>A&&(x.splice(0,A),q=x[0].distance),f&&b!==0&&x.length===0){M.distance=b,M.index=!1;var ve=E._module.hoverPoints(M,F,$,"closest",{hoverLayer:o._hoverlayer});if(ve&&(ve=ve.filter(function(ft){return ft.spikeDistance<=b})),ve&&ve.length){var ee,Pe=ve.filter(function(ft){return ft.xa.showspikes&&ft.xa.spikesnap!=="hovered data"});if(Pe.length){var Re=Pe[0];oi(Re.x0)&&oi(Re.y0)&&(ee=Y(Re),(!D.vLinePoint||D.vLinePoint.spikeDistance>ee.spikeDistance)&&(D.vLinePoint=ee))}var He=ve.filter(function(ft){return ft.ya.showspikes&&ft.ya.spikesnap!=="hovered data"});if(He.length){var tt=He[0];oi(tt.x0)&&oi(tt.y0)&&(ee=Y(tt),(!D.hLinePoint||D.hLinePoint.spikeDistance>ee.spikeDistance)&&(D.hLinePoint=ee))}}}}}V();function K(U,Z,ne){for(var ie=null,Le=1/0,we,ve=0;ve<U.length;ve++)we=U[ve].spikeDistance,ne&&ve===0&&(we=-1/0),we<=Le&&we<=Z&&(ie=U[ve],Le=we);return ie}function Y(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 te={fullLayout:o,container:o._hoverlayer,event:e};t._spikepoints;var oe={vLinePoint:D.vLinePoint,hLinePoint:D.hLinePoint};t._spikepoints=oe;var _e=function(){x.sort(function(U,Z){return U.distance-Z.distance}),x=H5(x,g)};_e();var de=g.charAt(0),X=(de==="x"||de==="y")&&x[0]&&P5[x[0].trace.type];if(f&&b!==0&&x.length!==0){var Q=x.filter(function(U){return U.ya.showspikes}),le=K(Q,b,X);D.hLinePoint=Y(le);var se=x.filter(function(U){return U.xa.showspikes}),he=K(se,b,X);D.vLinePoint=Y(he)}if(x.length===0){var Te=Ws.unhoverRaw(t,e);return f&&(D.hLinePoint!==null||D.vLinePoint!==null)&&_g()&&xg(t,D,te),Te}if(f&&_g()&&xg(t,D,te),Da.isXYhover(H)&&x[0].length!==0&&x[0].trace.type!=="splom"){var fe=x[0];gg[fe.trace.type]?x=x.filter(function(U){return U.trace.index===fe.trace.index}):x=[fe];var Ae=x.length,ce=Tg("x",fe,o),ye=Tg("y",fe,o);V(ce,ye);var Se=[],Me={},J=0,xe=function(U){var Z=gg[U.trace.type]?cT(U):U.trace.index;if(!Me[Z])J++,Me[Z]=J,Se.push(U);else{var ne=Me[Z]-1,ie=Se[ne];ne>0&&Math.abs(U.distance)<Math.abs(ie.distance)&&(Se[ne]=U)}},re;for(re=0;re<Ae;re++)xe(x[re]);for(re=x.length-1;re>Ae-1;re--)xe(x[re]);x=Se,_e()}var ue=t._hoverdata,pe=[],De=hT(t),$e=pT(t);for(S=0;S<x.length;S++){var me=x[S],ke=Da.makeEventData(me,me.trace,me.cd);if(me.hovertemplate!==!1){var Ve=!1;me.cd[me.index]&&me.cd[me.index].ht&&(Ve=me.cd[me.index].ht),me.hovertemplate=Ve||me.trace.hovertemplate||!1}if(me.xa&&me.ya){var Ie=me.x0+me.xa._offset,Oe=me.x1+me.xa._offset,Xe=me.y0+me.ya._offset,it=me.y1+me.ya._offset,be=Math.min(Ie,Oe),Ue=Math.max(Ie,Oe),Be=Math.min(Xe,it),Ye=Math.max(Xe,it);ke.bbox={x0:be+$e,x1:Ue+$e,y0:Be+De,y1:Ye+De}}me.eventData=[ke],pe.push(ke)}t._hoverdata=pe;var Ne=g==="y"&&(_.length>1||x.length>1)||g==="closest"&&P&&x.length>1,We=br.combine(o.plot_bgcolor||br.background,o.paper_bgcolor),Qe=uT(x,{gd:t,hovermode:g,rotateLabels:Ne,bgColor:We,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance}),z=Qe.hoverLabels;if(Da.isUnifiedHover(g)||(z5(z,Ne,o,Qe.commonLabelBoundingBox),dT(z,Ne,o._invScaleX,o._invScaleY)),i&&i.tagName){var W=Po.getComponentMethod("annotations","hasClickToShow")(t,pe);M5(un.select(i),W?"pointer":"")}!i||a||!N5(t,e,ue)||(ue&&t.emit("plotly_unhover",{event:e,points:ue}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:v,yaxes:h,xvals:k,yvals:T}))}function cT(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 R5=/<extra>([\s\S]*)<\/extra>/;function uT(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||kn.HOVERFONT,u=e.fontSize||kn.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 g=0;g<t.length&&(y=t[g][m],y===void 0);g++);var w=On(r,s),b=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,C;for(S=0;S<t.length;S++)if(T&&t[S].zLabel===void 0&&(T=!1),C=t[S].hoverinfo||t[S].trace.hoverinfo,C){var L=Array.isArray(C)?C:C.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=un.select(this),ye=nr.ensureSingle(ce,"path","",function(Ye){Ye.style({"stroke-width":"1px"})}),Se=nr.ensureSingle(ce,"text","",function(Ye){Ye.attr("data-notex",1)}),Me=f.bgcolor||br.defaultLine,J=f.bordercolor||br.contrast(Me),xe=br.contrast(Me),re={family:f.font.family||c,size:f.font.size||u,color:f.font.color||xe};ye.style({fill:Me,stroke:J}),Se.text(y).call(Ya.font,re).call(va.positionText,0,0).call(va.convertToTspans,r),ce.attr("transform","");var ue=On(r,Se.node()),pe,De;if(i==="x"){var $e=h.side==="top"?"-":"";Se.attr("text-anchor","middle").call(va.positionText,0,h.side==="top"?b-ue.bottom-It-Tt:b-ue.top+It+Tt),pe=h._offset+(v.x0+v.x1)/2,De=d._offset+(h.side==="top"?0:d._length);var me=ue.width/2+Tt;pe<me?(pe=me,ye.attr("d","M-"+(me-It)+",0L-"+(me-It*2)+","+$e+It+"H"+me+"v"+$e+(Tt*2+ue.height)+"H-"+me+"V"+$e+It+"Z")):pe>a.width-me?(pe=a.width-me,ye.attr("d","M"+(me-It)+",0L"+me+","+$e+It+"v"+$e+(Tt*2+ue.height)+"H-"+me+"V"+$e+It+"H"+(me-It*2)+"Z")):ye.attr("d","M0,0L"+It+","+$e+It+"H"+me+"v"+$e+(Tt*2+ue.height)+"H-"+me+"V"+$e+It+"H-"+It+"Z"),R.minX=pe-me,R.maxX=pe+me,h.side==="top"?(R.minY=De-(Tt*2+ue.height),R.maxY=De-Tt):(R.minY=De+Tt,R.maxY=De+(Tt*2+ue.height))}else{var ke,Ve,Ie;d.side==="right"?(ke="start",Ve=1,Ie="",pe=h._offset+h._length):(ke="end",Ve=-1,Ie="-",pe=h._offset),De=d._offset+(v.y0+v.y1)/2,Se.attr("text-anchor",ke),ye.attr("d","M0,0L"+Ie+It+","+It+"V"+(Tt+ue.height/2)+"h"+Ie+(Tt*2+ue.width)+"V-"+(Tt+ue.height/2)+"H"+Ie+It+"V-"+It+"Z"),R.minY=De-(Tt+ue.height/2),R.maxY=De+(Tt+ue.height/2),d.side==="right"?(R.minX=pe+It,R.maxX=pe+It+(Tt*2+ue.width)):(R.minX=pe-It-(Tt*2+ue.width),R.maxX=pe-It);var Oe=ue.height/2,Xe=b-ue.top-Oe,it="clip"+a._uid+"commonlabel"+d._id,be;if(pe<ue.width+2*Tt+It){be="M-"+(It+Tt)+"-"+Oe+"h-"+(ue.width-Tt)+"V"+Oe+"h"+(ue.width-Tt)+"Z";var Ue=ue.width-pe+Tt;va.positionText(Se,Ue,Xe),ke==="end"&&Se.selectAll("tspan").each(function(){var Ye=un.select(this),Ne=Ya.tester.append("text").text(Ye.text()).call(Ya.font,re),We=On(r,Ne.node());Math.round(We.width)<Math.round(ue.width)&&Ye.attr("x",Ue-We.width),Ne.remove()})}else va.positionText(Se,Ve*(Tt+It),Xe),be=null;var Be=a._topclips.selectAll("#"+it).data(be?[0]:[]);Be.enter().append("clipPath").attr("id",it).append("path"),Be.exit().remove(),Be.select("path").attr("d",be),Ya.setClipUrl(Se,be?it:null,r)}ce.attr("transform",lv(pe,De))}),Da.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var N=t.filter(function(ce){return ce.hoverinfo!=="none"});if(N.length===0)return[];var H=a.hoverlabel,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"}},M={font:F};S5($,M,r._fullData);var A=M.legend;A.entries=[];for(var D=0;D<N.length;D++){var P=N[D];if(P.hoverinfo!=="none"){var I=bg(P,!0,i,a,y),O=I[0],B=I[1];P.name=B,B!==""?P.text=B+" : "+O:P.text=O;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,A.entries.push([P])}}A.entries.sort(function(ce,ye){return ce[0].trace.index-ye[0].trace.index}),A.layer=l,A._inHover=!0,A._groupTitleFont=H.grouptitlefont,L5(r,A);var j=l.select("g.legend"),q=On(r,j.node()),V=q.width+2*Tt,K=q.height+2*Tt,Y=N[0],te=(Y.x0+Y.x1)/2,oe=(Y.y0+Y.y1)/2,_e=!(Po.traceIs(Y.trace,"bar-like")||Po.traceIs(Y.trace,"box-violin")),de,X;p==="y"?_e?(X=oe-Tt,de=oe+Tt):(X=Math.min.apply(null,N.map(function(ce){return Math.min(ce.y0,ce.y1)})),de=Math.max.apply(null,N.map(function(ce){return Math.max(ce.y0,ce.y1)}))):X=de=nr.mean(N.map(function(ce){return(ce.y0+ce.y1)/2}))-K/2;var Q,le;p==="x"?_e?(Q=te+Tt,le=te-Tt):(Q=Math.max.apply(null,N.map(function(ce){return Math.max(ce.x0,ce.x1)})),le=Math.min.apply(null,N.map(function(ce){return Math.min(ce.x0,ce.x1)}))):Q=le=nr.mean(N.map(function(ce){return(ce.x0+ce.x1)/2}))-V/2;var se=h._offset,he=d._offset;de+=he,Q+=se,le+=se-V,X+=he-K;var Te,fe;return Q+V<x&&Q>=0?Te=Q:le+V<x&&le>=0?Te=le:se+V<x?Te=se:Q-te<te-le+V?Te=x-V:Te=0,Te+=Tt,de+K<_&&de>=0?fe=de:X+K<_&&X>=0?fe=X:he+K<_?fe=he:de-oe<oe-X+K?fe=_-K:fe=0,fe+=Tt,j.attr("transform",lv(Te-1,fe-1)),j}var Ae=l.selectAll("g.hovertext").data(t,function(ce){return cT(ce)});return Ae.enter().append("g").classed("hovertext",!0).each(function(){var ce=un.select(this);ce.append("rect").call(br.fill,br.addOpacity(o,.8)),ce.append("text").classed("name",!0),ce.append("path").style("stroke-width","1px"),ce.append("text").classed("nums",!0).call(Ya.font,c,u)}),Ae.exit().remove(),Ae.each(function(ce){var ye=un.select(this).attr("transform",""),Se=ce.color;Array.isArray(Se)&&(Se=Se[ce.eventData[0].pointNumber]);var Me=ce.bgcolor||Se,J=br.combine(br.opacity(Me)?Me:br.defaultLine,o),xe=br.combine(br.opacity(Se)?Se:br.defaultLine,o),re=ce.borderColor||br.contrast(J),ue=bg(ce,k,i,a,y,ye),pe=ue[0],De=ue[1],$e=ye.select("text.nums").call(Ya.font,ce.fontFamily||c,ce.fontSize||u,ce.fontColor||re).text(pe).attr("data-notex",1).call(va.positionText,0,0).call(va.convertToTspans,r),me=ye.select("text.name"),ke=0,Ve=0;if(De&&De!==pe){me.call(Ya.font,ce.fontFamily||c,ce.fontSize||u,xe).text(De).attr("data-notex",1).call(va.positionText,0,0).call(va.convertToTspans,r);var Ie=On(r,me.node());ke=Ie.width+2*Tt,Ve=Ie.height+2*Tt}else me.remove(),ye.select("rect").remove();ye.select("path").style({fill:J,stroke:re});var Oe=ce.xa._offset+(ce.x0+ce.x1)/2,Xe=ce.ya._offset+(ce.y0+ce.y1)/2,it=Math.abs(ce.x1-ce.x0),be=Math.abs(ce.y1-ce.y0),Ue=On(r,$e.node()),Be=Ue.width/a._invScaleX,Ye=Ue.height/a._invScaleY;ce.ty0=(b-Ue.top)/a._invScaleY,ce.bx=Be+2*Tt,ce.by=Math.max(Ye+2*Tt,Ve),ce.anchor="start",ce.txwidth=Be,ce.tx2width=ke,ce.offset=0;var Ne=(Be+It+Tt+ke)*a._invScaleX,We,Qe;if(n)ce.pos=Oe,We=Xe+be/2+Ne<=_,Qe=Xe-be/2-Ne>=0,(ce.idealAlign==="top"||!We)&&Qe?(Xe-=be/2,ce.anchor="end"):We?(Xe+=be/2,ce.anchor="start"):ce.anchor="middle",ce.crossPos=Xe;else{if(ce.pos=Xe,We=Oe+it/2+Ne<=x,Qe=Oe-it/2-Ne>=0,(ce.idealAlign==="left"||!We)&&Qe)Oe-=it/2,ce.anchor="end";else if(We)Oe+=it/2,ce.anchor="start";else{ce.anchor="middle";var z=Ne/2,W=Oe+z-x,U=Oe-z;W>0&&(Oe-=W),U<0&&(Oe+=-U)}ce.crossPos=Oe}$e.attr("text-anchor",ce.anchor),ke&&me.attr("text-anchor",ce.anchor),ye.attr("transform",lv(Oe,Xe)+(n?k5(fT):""))}),{hoverLabels:Ae,commonLabelBoundingBox:R}}function bg(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=nr.templateString(t.name,t.trace._meta)),o=wg(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=nr.hovertemplateString(c,u,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(R5,function(v,h){return o=wg(h,t.nameLength),""})}return[l,o]}function z5(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],M=F[n],A=$._id.charAt(0)==="x",D=$.range;c===0&&D&&D[0]>D[1]!==A&&(l=-1);var P=0,I=A?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var O=vT(F,e),B=F.anchor,G=B==="end"?-1:1,j,q;if(B==="middle")j=F.crossPos+(A?m(O.y-F.by/2):p(F.bx/2+F.tx2width/2)),q=j+(A?m(F.by):p(F.bx));else if(A)j=F.crossPos+m(It+O.y)-m(F.by/2-It),q=j+m(F.by);else{var V=p(G*It+O.x),K=V+p(G*F.bx);j=F.crossPos+Math.min(V,K),q=F.crossPos+Math.max(V,K)}A?h!==void 0&&d!==void 0&&Math.min(q,d)-Math.max(j,h)>1&&(M.side==="left"?(P=M._mainLinePosition,I=r.width):I=M._mainLinePosition):u!==void 0&&v!==void 0&&Math.min(q,v)-Math.max(j,u)>1&&(M.side==="top"?(P=M._mainLinePosition,I=r.height):I=M._mainLinePosition)}f[c++]=[{datum:F,traceIndex:F.trace.index,dp:0,pos:F.pos,posref:F.posref,size:F.by*(A?C5:1)/2,pmin:P,pmax:I}]}),f.sort(function(F,$){return F[0].posref-$[0].posref||l*($[0].traceIndex-F[0].traceIndex)});var y,g,w,b,x,_,k;function T(F){var $=F[0],M=F[F.length-1];if(g=$.pmin-$.pos-$.dp+$.size,w=M.pos+M.dp+M.size-$.pmax,g>.01){for(x=F.length-1;x>=0;x--)F[x].dp+=g;y=!1}if(!(w<.01)){if(g<-.01){for(x=F.length-1;x>=0;x--)F[x].dp-=w;y=!1}if(y){var A=0;for(b=0;b<F.length;b++)_=F[b],_.pos+_.dp+_.size>$.pmax&&A++;for(b=F.length-1;b>=0&&!(A<=0);b--)_=F[b],_.pos>$.pmax-1&&(_.del=!0,A--);for(b=0;b<F.length&&!(A<=0);b++)if(_=F[b],_.pos<$.pmin+1)for(_.del=!0,A--,w=_.size*2,x=F.length-1;x>=0;x--)F[x].dp-=w;for(b=F.length-1;b>=0&&!(A<=0);b--)_=F[b],_.pos+_.dp+_.size>$.pmax&&(_.del=!0,A--)}}}for(;!y&&o<=s;){for(o++,y=!0,b=0;b<f.length-1;){var S=f[b],C=f[b+1],L=S[S.length-1],E=C[0];if(g=L.pos+L.dp+L.size-E.pos-E.dp+E.size,g>.01&&L.pmin===E.pmin&&L.pmax===E.pmax){for(x=C.length-1;x>=0;x--)C[x].dp+=g;for(S.push.apply(S,C),f.splice(b+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 b++}f.forEach(T)}for(b=f.length-1;b>=0;b--){var R=f[b];for(x=R.length-1;x>=0;x--){var N=R[x],H=N.datum;H.offset=N.dp,H.del=N.del}}}function vT(t,e){var r=0,a=t.offset;return e&&(a*=-$5,r=t.offset*D5),{x:r,y:a}}function I5(t){var e={start:1,end:-1,middle:0}[t.anchor],r=e*(It+Tt),a=r+e*(t.txwidth+Tt),i=t.anchor==="middle";return i&&(r-=t.tx2width/2,a+=t.txwidth/2+Tt),{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=un.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,u=I5(o),v=vT(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*It+h)+","+n(It+d)+"v"+n(o.by/2-It)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*It+h)+"V"+n(d-It)+"Z");var m=h+u.textShiftX,y=d+o.ty0-o.by/2+Tt,g=o.textAlign||"auto";g!=="auto"&&(g==="left"&&f!=="start"?(s.attr("text-anchor","start"),m=p?-o.bx/2-o.tx2width/2+Tt:-o.bx-Tt):g==="right"&&f!=="end"&&(s.attr("text-anchor","end"),m=p?o.bx/2-o.tx2width/2-Tt:o.bx+Tt)),s.call(va.positionText,i(m),n(y)),o.tx2width&&(l.select("text.name").call(va.positionText,i(u.text2ShiftX+u.alignShift*Tt+h),n(d+o.ty0-o.by/2+Tt)),l.select("rect").call(Ya.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 F5(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(v){return v||oi(v)&&v===0}var l=Array.isArray(r)?function(v,h){var d=nr.castOption(i,r,v);return o(d)?d:nr.extractOption({},a,"",h)}:function(v,h){return nr.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=nr.constrain(t.x0,0,t.xa._length),t.x1=nr.constrain(t.x1,0,t.xa._length),t.y0=nr.constrain(t.y0,0,t.ya._length),t.y1=nr.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 xg(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=br.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=yg.readability(v.color,u)<1.5?br.contrast(u):v.color,y=c.spikemode,g=c.spikethickness,w=c.spikecolor||m,b=Mi.getPxPosition(t,c),x,_;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(x=b,_=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":g,stroke:w,"stroke-dasharray":Ya.dashStyle(c.spikedash,g)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:x,x2:_,y1:d,y2:d,"stroke-width":g+2,stroke:u}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:b+(c.side!=="right"?g:-g),cy:d,r:g,fill:w}).classed("spikeline",!0)}if(s){var S=e.vLinePoint,C,L;f=S&&S.xa,c=S&&S.ya;var E=f.spikesnap;E==="cursor"?(C=o.pointerX,L=o.pointerY):(C=f._offset+S.x,L=c._offset+S.y);var R=yg.readability(S.color,u)<1.5?br.contrast(u):S.color,N=f.spikemode,H=f.spikethickness,F=f.spikecolor||R,$=Mi.getPxPosition(t,f),M,A;if(N.indexOf("toaxis")!==-1||N.indexOf("across")!==-1){if(N.indexOf("toaxis")!==-1&&(M=$,A=L),N.indexOf("across")!==-1){var D=f._counterDomainMin,P=f._counterDomainMax;f.anchor==="free"&&(D=Math.min(D,f.position),P=Math.max(P,f.position)),M=n.t+(1-P)*n.h,A=n.t+(1-D)*n.h}a.insert("line",":first-child").attr({x1:C,x2:C,y1:M,y2:A,"stroke-width":H,stroke:F,"stroke-dasharray":Ya.dashStyle(f.spikedash,H)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:C,x2:C,y1:M,y2:A,"stroke-width":H+2,stroke:u}).classed("spikeline",!0).classed("crisp",!0)}N.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:C,cy:$-(f.side!=="top"?H:-H),r:H,fill:F}).classed("spikeline",!0)}}}function N5(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 wg(t,e){return va.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function H5(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];Po.traceIs(l.trace,"bar-like")||Po.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 Tg(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 hT(t){return t.offsetTop+t.clientTop}function pT(t){return t.offsetLeft+t.clientLeft}function On(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.left,n=a.top,o=i+a.width,l=n+a.height,s=nr.apply3DTransform(r._invTransform)(i,n),f=nr.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 O5=ge,j5=pt,B5=ka.isUnifiedHover,bp=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&&B5(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=j5.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),O5.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},G5=ge,U5=bp,V5=cs,X5=function(e,r){function a(i,n){return G5.coerce(e,r,V5,i,n)}U5(e,r,a)},kg=ge,Y5=Pc,W5=bp,q5=function(e,r,a,i){function n(l,s){return kg.coerce(e,r,Y5,l,s)}var o=kg.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),W5(e,r,n,o)},Z5=ge,K5=cs,mT=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:Z5.coerce(e,r,K5,i,n)}return a("clickmode"),a("hovermode")},Ag=ge,Q5=cs,J5=mT,e$=bp,t$=function(e,r){function a(f,c){return Ag.coerce(e,r,Q5,f,c)}var i=J5(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"),e$(e,r,a),Ag.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},th=ge,Mg=lt,r$=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return th.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!Mg.traceIs(l,"pie-like")){var s=Mg.traceIs(l,"2dMap")?a$:th.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 a$(t,e,r,a){a=a||th.identity,Array.isArray(t)&&(e[0][r]=a(t))}var i$=lt,n$=Qc.hover,o$=function(e,r,a){var i=i$.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&n$(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())},l$=gt,lc=ge,s$=ti,fl=ka,Sg=cs,Lg=Qc,Na={moduleType:"component",name:"fx",constants:$c,schema:{layout:Sg},attributes:Pc,layoutAttributes:Sg,supplyLayoutGlobalDefaults:X5,supplyDefaults:q5,supplyLayoutDefaults:t$,calc:r$,getDistanceFunction:fl.getDistanceFunction,getClosest:fl.getClosest,inbox:fl.inbox,quadrature:fl.quadrature,appendArrayPointValue:fl.appendArrayPointValue,castHoverOption:c$,castHoverinfo:u$,hover:Lg.hover,unhover:s$.unhover,loneHover:Lg.loneHover,loneUnhover:f$,click:o$};function f$(t){var e=lc.isD3Selection(t)?t:l$.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function c$(t,e,r){return lc.castOption(t,e,"hoverlabel."+r)}function u$(t,e,r){function a(i){return lc.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return lc.castOption(t,r,"hoverinfo",a)}var zn={};(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)}})(zn);var xp=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})})},eu={},yT={exports:{}},_p={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("")}},Vi={},qs=32,wp={CIRCLE_SIDES:qs,i000:0,i090:qs/4,i180:qs/2,i270:qs/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},v$=ge.strTranslate;function gT(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 d$(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 h$(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return gT(t,r[e])}}function p$(t){return v$(t.xaxis._offset,t.yaxis._offset)}var Tp={p2r:gT,r2p:d$,axValue:h$,getTransform:p$};(function(t){var e=X1,r=wp,a=r.CIRCLE_SIDES,i=r.SQRT2,n=Tp,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 g=v[p][y][0];if(g==="Z")d+="Z";else for(var w=v[p][y].length,b=0;b<w;b++){var x=b;g==="Q"||g==="S"?x=f[b]:g==="C"&&(x=s[b]),d+=v[p][y][x],b>0&&b<w-1&&(d+=",")}}return d},t.readPaths=function(v,h,d,p){var m=e(v),y=[],g=-1,w=function(){g++,y[g]=[]},b,x=0,_=0,k,T,S=function(){k=x,T=_};S();for(var C=0;C<m.length;C++){var L=[],E,R,N,H,F=m[C][0],$=F;switch(F){case"M":w(),x=+m[C][1],_=+m[C][2],L.push([$,x,_]),S();break;case"Q":case"S":E=+m[C][1],N=+m[C][2],x=+m[C][3],_=+m[C][4],L.push([$,x,_,E,N]);break;case"C":E=+m[C][1],N=+m[C][2],R=+m[C][3],H=+m[C][4],x=+m[C][5],_=+m[C][6],L.push([$,x,_,E,N,R,H]);break;case"T":case"L":x=+m[C][1],_=+m[C][2],L.push([$,x,_]);break;case"H":$="L",x=+m[C][1],L.push([$,x,_]);break;case"V":$="L",_=+m[C][1],L.push([$,x,_]);break;case"A":$="L";var M=+m[C][1],A=+m[C][2];+m[C][4]||(M=-M,A=-A);var D=x-M,P=_;for(b=1;b<=a/2;b++){var I=2*Math.PI*b/a;L.push([$,D+M*Math.cos(I),P+A*Math.sin(I)])}break;case"Z":(x!==k||_!==T)&&(x=k,_=T,L.push([$,x,_]));break}for(var O=(d||{}).domain,B=h._fullLayout._size,G=d&&d.xsizemode==="pixel",j=d&&d.ysizemode==="pixel",q=p===!1,V=0;V<L.length;V++){for(b=0;b+2<7;b+=2){var K=L[V][b+1],Y=L[V][b+2];K===void 0||Y===void 0||(x=K,_=Y,d&&(d.xaxis&&d.xaxis.p2r?(q&&(K-=d.xaxis._offset),G?K=l(d.xaxis,d.xanchor)+K:K=o(d.xaxis,K)):(q&&(K-=B.l),O?K=O.x[0]+K/B.w:K=K/B.w),d.yaxis&&d.yaxis.p2r?(q&&(Y-=d.yaxis._offset),j?Y=l(d.yaxis,d.yanchor)-Y:Y=o(d.yaxis,Y)):(q&&(Y-=B.t),O?Y=O.y[1]-Y/B.h:Y=1-Y/B.h)),L[V][b+1]=K,L[V][b+2]=Y)}y[g].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],g=v[1][d]-v[2][d];if(!c(y,g))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,g=(p.x1-p.x0)/2,w=(p.y1-p.y0)/2;g||(g=w=w/i),w||(w=g=g/i);for(var b=[],x=0;x<a;x++){var _=x*2*Math.PI/a;b.push([m+g*Math.cos(_),y+w*Math.sin(_)])}return b},t.ellipseOver=function(v){var h=v.x0,d=v.y0,p=v.x1,m=v.y1,y=p-h,g=m-d;h-=y,d-=g;var w=(h+p)/2,b=(d+m)/2,x=i;return y*=x,g*=x,{x0:w-y,y0:b-g,x1:w+y,y1:b+g}},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 g=0;g<v[y].length;g++)for(var w=0;w+2<v[y][g].length;w+=2)p&&(v[y][g][w+1]=v[y][g][w+1].replace(" ","_")),m&&(v[y][g][w+2]=v[y][g][w+2].replace(" ","_"));return v}})(Vi);var bT=zn,m$=bT.drawMode,y$=bT.openMode,Zo=wp,Cg=Zo.i000,Dg=Zo.i090,$g=Zo.i180,Pg=Zo.i270,g$=Zo.cos45,b$=Zo.sin45,xT=Tp,Zs=xT.p2r,_i=xT.r2p,x$=$n,_$=x$.clearOutline,tu=Vi,w$=tu.readPaths,T$=tu.writePaths,k$=tu.ellipseOver,A$=tu.fixDatesForPaths;function M$(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(!m$(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=_T(t,e,n);_$(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 _T(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=y$(r),d=w$(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[Cg][1],g=m[Dg][1],w=m[$g][1],b=m[Pg][1],x=m[Cg][2],_=m[Dg][2],k=m[$g][2],T=m[Pg][2],S=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),C=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");S&&(y=_i(l.xaxis,y),g=_i(l.xaxis,g),w=_i(l.xaxis,w),b=_i(l.xaxis,b)),C&&(x=_i(l.yaxis,x),_=_i(l.yaxis,_),k=_i(l.yaxis,k),T=_i(l.yaxis,T));var L=(g+b)/2,E=(x+k)/2,R=(b-g+w-y)/2,N=(T-_+k-x)/2,H=k$({x0:L,y0:E,x1:L+R*g$,y1:E+N*b$});S&&(H.x0=Zs(l.xaxis,H.x0),H.x1=Zs(l.xaxis,H.x1)),C&&(H.y0=Zs(l.yaxis,H.y0),H.y1=Zs(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&&A$(d,f,c),p.path=T$(d),m=null;return p}var kp={newShapes:M$,createShapeObj:_T},S$=zn,L$=S$.selectMode,C$=$n,D$=C$.clearOutline,Ap=Vi,$$=Ap.readPaths,P$=Ap.writePaths,E$=Ap.fixDatesForPaths,wT=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(!L$(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=$$(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&&E$(d,s,f),p.path=P$(d),m=null),D$(n);for(var y=r.editHelpers,g=(y||{}).modifyItem,w=[],b=0;b<v.length;b++){var x=n._fullLayout.selections[b];if(!x){w[b]=x;continue}if(w[b]=x._input,c!==void 0&&b===n._fullLayout._activeSelectionIndex){var _=p;switch(x.type){case"rect":g("x0",_.x0),g("x1",_.x1),g("y0",_.y0),g("y1",_.y1);break;case"path":g("path",_.path);break}}}return c===void 0?(w.push(p),w):y?y.getUpdateObj():{}}}},Xi={},ru={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=ru,r=ge,a=Bt;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,g,w,b;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,g=x+o.x1}else y=d(o.x0),g=d(o.x1);if(o.ysizemode==="pixel"){var _=m(o.yanchor);w=_-o.y0,b=_-o.y1}else w=m(o.y0),b=m(o.y1);if(l==="line")return"M"+y+","+w+"L"+g+","+b;if(l==="rect")return"M"+y+","+w+"H"+g+"V"+b+"H"+y+"Z";var k=(y+g)/2,T=(w+b)/2,S=Math.abs(k-y),C=Math.abs(T-w),L="A"+S+","+C,E=k+S+","+T,R=k+","+(T-C);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],g=e.numParams[p],w=h.substr(1).replace(e.paramRE,function(b){return m[d]?f==="pixel"?b=o(u)+Number(b):b=o(b):y[d]&&(c==="pixel"?b=l(v)-Number(b):b=l(b)),d++,d>g&&(b="X"),b});return d>g&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+h)),p+w})}})(Xi);var R$=ge,jn=Bt,Eg=_r,Rg=$t,z$=Vi.readPaths,rh=Xi,I$=rh.getPathString,zg=Bh,F$=Wr.FROM_TL,TT=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=jn.getFromId(e,a.xref),s=jn.getFromId(e,a.yref);for(var f in zg){var c=zg[f](a,l,s);c!==void 0&&(o[f]=c)}}n=R$.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,g,w;if(a.path){var b=I$(e,a),x=z$(b,e);m=1/0,g=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 C=T[S],L=T[S+1];m=Math.min(m,C),y=Math.max(y,C),g=Math.min(g,L),w=Math.max(w,L)}}else{var E=jn.getFromId(e,a.xref),R=jn.getRefType(a.xref),N=jn.getFromId(e,a.yref),H=jn.getRefType(a.yref),F=rh.getDataToPixel(e,E,!1,R),$=rh.getDataToPixel(e,N,!0,H);m=F(a.x0),y=F(a.x1),g=$(a.y0),w=$(a.y1)}var M=a.label.textangle;M==="auto"&&(a.type==="line"?M=N$(m,g,y,w):M=0),p.call(function(B){return B.call(Rg.font,v).attr({}),Eg.convertToTspans(B,e),B});var A=Rg.bBox(p.node()),D=H$(m,g,y,w,a,M,A),P=D.textx,I=D.texty,O=D.xanchor;p.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[O],y:I,x:P,transform:"rotate("+M+","+P+","+I+")"}).call(Eg.positionText,P,I)}};function N$(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 H$(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,g,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 b={left:1,center:0,right:-1},x={bottom:-1,middle:0,top:1};if(s==="auto"){var _=x[p];g=-f*v*_,w=f*h*_}else{var k=b[d],T=x[p];g=f*k,w=f*T}m=m+g,y=y+w}else g=f+3,l.indexOf("right")!==-1?(m=Math.max(t,r)-g,d==="auto"&&(d="right")):l.indexOf("left")!==-1?(m=Math.min(t,r)+g,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=F$[p],C=i.label.font.size,L=o.height,E=(L*S-C)*v,R=-(L*S-C)*h;return{textx:m+E,texty:y+R,xanchor:d}}var O$=ge,j$=O$.strTranslate,Ig=ti,kT=zn,B$=kT.drawMode,AT=kT.selectMode,MT=lt,Fg=pt,au=wp,G$=au.i000,U$=au.i090,V$=au.i180,X$=au.i270,Y$=$n,ST=Y$.clearOutlineControllers,Mp=Vi,Ks=Mp.pointsOnRectangle,sv=Mp.pointsOnEllipse,W$=Mp.writePaths,q$=kp.newShapes,Z$=kp.createShapeObj,K$=wT,Q$=TT,Sp=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),(sv(e[0])||a.hasText)&&l({redrawing:!0})}function l($){var M={};a.isActiveShape!==void 0&&(a.isActiveShape=!1,M=q$(r,a)),a.isActiveSelection!==void 0&&(a.isActiveSelection=!1,M=K$(r,a),n._fullLayout._reselect=!0),Object.keys(M).length&&MT.call(($||{}).redrawing?"relayout":"_guiRelayout",n,M)}var s=n._fullLayout,f=s._zoomlayer,c=a.dragmode,u=B$(c),v=AT(c);(u||v)&&(n._fullLayout._outlining=!0),ST(n),r.attr("d",W$(e));var h,d,p,m,y;if(!i&&(a.isActiveShape||a.isActiveSelection)){y=J$([],e);var g=f.append("g").attr("class","outline-controllers");C(g),F()}if(u&&a.hasText){var w=f.select(".label-temp"),b=Z$(r,a,a.dragmode);Q$(n,"label-temp",b,w)}function x($){p=+$.srcElement.getAttribute("data-i"),m=+$.srcElement.getAttribute("data-j"),h[p][m].moveFn=_}function _($,M){if(e.length){var A=y[p][m][1],D=y[p][m][2],P=e[p],I=P.length;if(Ks(P)){var O=$,B=M;if(a.isActiveSelection){var G=Ng(P,m);G[1]===P[m][1]?B=0:O=0}for(var j=0;j<I;j++)if(j!==m){var q=P[j];q[1]===P[m][1]&&(q[1]=A+O),q[2]===P[m][2]&&(q[2]=D+B)}if(P[m][1]=A+O,P[m][2]=D+B,!Ks(P))for(var V=0;V<I;V++)for(var K=0;K<P[V].length;K++)P[V][K]=y[p][V][K]}else P[m][1]=A+$,P[m][2]=D+M;o()}}function k(){l()}function T(){if(e.length&&e[p]&&e[p].length){for(var $=[],M=0;M<e[p].length;M++)M!==m&&$.push(e[p][M]);$.length>1&&!($.length===2&&$[1][0]==="Z")&&(m===0&&($[0][0]="M"),e[p]=$,o(),l())}}function S($,M){if($===2){p=+M.srcElement.getAttribute("data-i"),m=+M.srcElement.getAttribute("data-j");var A=e[p];!Ks(A)&&!sv(A)&&T()}}function C($){h=[];for(var M=0;M<e.length;M++){var A=e[M],D=Ks(A),P=!D&&sv(A);h[M]=[];for(var I=A.length,O=0;O<I;O++)if(A[O][0]!=="Z"&&!(P&&O!==G$&&O!==U$&&O!==V$&&O!==X$)){var B=D&&a.isActiveSelection,G;B&&(G=Ng(A,O));var j=A[O][1],q=A[O][2],V=$.append(B?"rect":"circle").attr("data-i",M).attr("data-j",O).style({fill:Fg.background,stroke:Fg.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(B){var K=G[1]-j,Y=G[2]-q,te=Y?5:Math.max(Math.min(25,Math.abs(K)-5),5),oe=K?5:Math.max(Math.min(25,Math.abs(Y)-5),5);V.classed(Y?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",te).attr("height",oe).attr("x",j-te/2).attr("y",q-oe/2).attr("transform",j$(K/2,Y/2))}else V.classed("cursor-grab",!0).attr("r",5).attr("cx",j).attr("cy",q);h[M][O]={element:V.node(),gd:n,prepFn:x,doneFn:k,clickFn:S},Ig.init(h[M][O])}}}function L($,M){if(e.length)for(var A=0;A<e.length;A++)for(var D=0;D<e[A].length;D++)for(var P=0;P+2<e[A][D].length;P+=2)e[A][D][P+1]=y[A][D][P+1]+$,e[A][D][P+2]=y[A][D][P+2]+M}function E($,M){L($,M),o()}function R($){p=+$.srcElement.getAttribute("data-i"),p||(p=0),d[p].moveFn=E}function N(){l()}function H($){$===2&&eP(n)}function F(){if(d=[],!!e.length){var $=0;d[$]={element:r[0][0],gd:n,prepFn:R,doneFn:N,clickFn:H},Ig.init(d[$])}}};function J$(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 Ng(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 eP(t){if(AT(t._fullLayout.dragmode)){ST(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},MT.call("_guiRelayout",t,{selections:a})}}}var tP=gt,LT=lt,Hg=ge,Bn=Bt,rP=Vi.readPaths,aP=Sp,sc=TT,CT=$n.clearOutlineControllers,fv=pt,Lp=$t,iP=Ot.arrayEditor,Og=ti,jg=Ui,cn=ru,Qr=Xi,ah=Qr.getPathString,Cp={draw:Dp,drawOne:DT,eraseActiveShape:lP,drawLabel:sc};function Dp(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&&DT(t,i)}function Qs(t){return!!t._fullLayout._outlining}function iu(t){return!t._context.edits.shapePosition}function DT(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=Qr.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=ah(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=iu(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}),g=y.append("path").attr(f).style("opacity",c).call(fv.stroke,v).call(fv.fill,u).call(Lp.dashLine,d,h);$T(y,t,a),sc(t,e,a,y);var w;if((m||t._context.edits.shapePosition)&&(w=iP(t.layout,"shapes",a)),m){g.style({cursor:"move"});var b={element:g.node(),plotinfo:i,gd:t,editHelpers:w,hasText:a.label.text||a.label.texttemplate,isActiveShape:!0},x=rP(s,t);aP(x,g,b)}else t._context.edits.shapePosition?nP(t,g,a,e,l,w):a.editable===!0&&g.style("pointer-events",p||fv.opacity(u)*c<=.5?"stroke":"all");g.node().addEventListener("click",function(){return oP(t,g)})}}function $T(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");Lp.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function nP(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,g,w,b,x,_,k,T,S,C,L,E=tP.select(e.node().parentNode),R=Bn.getFromId(t,r.xref),N=Bn.getRefType(r.xref),H=Bn.getFromId(t,r.yref),F=Bn.getRefType(r.yref),$=Qr.getDataToPixel(t,R,!1,N),M=Qr.getDataToPixel(t,H,!0,F),A=Qr.getPixelToData(t,R,!1,N),D=Qr.getPixelToData(t,H,!0,F),P=B(),I={element:P.node(),gd:t,prepFn:q,doneFn:V,clickFn:K},O;Og.init(I),P.node().onmousemove=j;function B(){return c?G():e}function G(){var X=10,Q=Math.max(r.line.width,X),le=i.append("g").attr("data-index",a).attr("drag-helper",!0);le.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":Q,"stroke-opacity":"0"});var se={"fill-opacity":"0"},he=Math.max(Q/2,X);return le.append("circle").attr({"data-line-point":"start-point",cx:s?$(r.xanchor)+r.x0:$(r.x0),cy:f?M(r.yanchor)-r.y0:M(r.y0),r:he}).style(se).classed("cursor-grab",!0),le.append("circle").attr({"data-line-point":"end-point",cx:s?$(r.xanchor)+r.x1:$(r.x1),cy:f?M(r.yanchor)-r.y1:M(r.y1),r:he}).style(se).classed("cursor-grab",!0),le}function j(X){if(Qs(t)){O=null;return}if(c)X.target.tagName==="path"?O="move":O=X.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Q=I.element.getBoundingClientRect(),le=Q.right-Q.left,se=Q.bottom-Q.top,he=X.clientX-Q.left,Te=X.clientY-Q.top,fe=!u&&le>o&&se>l&&!X.shiftKey?Og.getCursor(he/le,1-Te/se):"move";jg(e,fe),O=fe.split("-")[0]}}function q(X){Qs(t)||(s&&(y=$(r.xanchor)),f&&(g=M(r.yanchor)),r.type==="path"?L=r.path:(h=s?r.x0:$(r.x0),d=f?r.y0:M(r.y0),p=s?r.x1:$(r.x1),m=f?r.y1:M(r.y1)),h<p?(x=h,S="x0",_=p,C="x1"):(x=p,S="x1",_=h,C="x0"),!f&&d<m||f&&d>m?(w=d,k="y0",b=m,T="y1"):(w=m,k="y1",b=d,T="y0"),j(X),oe(i,r),de(e,r,t),I.moveFn=O==="move"?Y:te,I.altKey=X.altKey)}function V(){Qs(t)||(jg(e),_e(i),$T(e,t,r),LT.call("_guiRelayout",t,n.getUpdateObj()))}function K(){Qs(t)||_e(i)}function Y(X,Q){if(r.type==="path"){var le=function(Te){return Te},se=le,he=le;s?v("xanchor",r.xanchor=A(y+X)):(se=function(fe){return A($(fe)+X)},R&&R.type==="date"&&(se=Qr.encodeDate(se))),f?v("yanchor",r.yanchor=D(g+Q)):(he=function(fe){return D(M(fe)+Q)},H&&H.type==="date"&&(he=Qr.encodeDate(he))),v("path",r.path=Bg(L,se,he))}else s?v("xanchor",r.xanchor=A(y+X)):(v("x0",r.x0=A(h+X)),v("x1",r.x1=A(p+X))),f?v("yanchor",r.yanchor=D(g+Q)):(v("y0",r.y0=D(d+Q)),v("y1",r.y1=D(m+Q)));e.attr("d",ah(t,r)),oe(i,r),sc(t,a,r,E)}function te(X,Q){if(u){var le=function($e){return $e},se=le,he=le;s?v("xanchor",r.xanchor=A(y+X)):(se=function(me){return A($(me)+X)},R&&R.type==="date"&&(se=Qr.encodeDate(se))),f?v("yanchor",r.yanchor=D(g+Q)):(he=function(me){return D(M(me)+Q)},H&&H.type==="date"&&(he=Qr.encodeDate(he))),v("path",r.path=Bg(L,se,he))}else if(c){if(O==="resize-over-start-point"){var Te=h+X,fe=f?d-Q:d+Q;v("x0",r.x0=s?Te:A(Te)),v("y0",r.y0=f?fe:D(fe))}else if(O==="resize-over-end-point"){var Ae=p+X,ce=f?m-Q:m+Q;v("x1",r.x1=s?Ae:A(Ae)),v("y1",r.y1=f?ce:D(ce))}}else{var ye=function($e){return O.indexOf($e)!==-1},Se=ye("n"),Me=ye("s"),J=ye("w"),xe=ye("e"),re=Se?w+Q:w,ue=Me?b+Q:b,pe=J?x+X:x,De=xe?_+X:_;f&&(Se&&(re=w-Q),Me&&(ue=b-Q)),(!f&&ue-re>l||f&&re-ue>l)&&(v(k,r[k]=f?re:D(re)),v(T,r[T]=f?ue:D(ue))),De-pe>o&&(v(S,r[S]=s?pe:A(pe)),v(C,r[C]=s?De:A(De)))}e.attr("d",ah(t,r)),oe(i,r),sc(t,a,r,E)}function oe(X,Q){(s||f)&&le();function le(){var se=Q.type!=="path",he=X.selectAll(".visual-cue").data([0]),Te=1;he.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Te}).classed("visual-cue",!0);var fe=$(s?Q.xanchor:Hg.midRange(se?[Q.x0,Q.x1]:Qr.extractPathCoords(Q.path,cn.paramIsX))),Ae=M(f?Q.yanchor:Hg.midRange(se?[Q.y0,Q.y1]:Qr.extractPathCoords(Q.path,cn.paramIsY)));if(fe=Qr.roundPositionForSharpStrokeRendering(fe,Te),Ae=Qr.roundPositionForSharpStrokeRendering(Ae,Te),s&&f){var ce="M"+(fe-1-Te)+","+(Ae-1-Te)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";he.attr("d",ce)}else if(s){var ye="M"+(fe-1-Te)+","+(Ae-9-Te)+"v18 h2 v-18 Z";he.attr("d",ye)}else{var Se="M"+(fe-9-Te)+","+(Ae-1-Te)+"h18 v2 h-18 Z";he.attr("d",Se)}}}function _e(X){X.selectAll(".visual-cue").remove()}function de(X,Q,le){var se=Q.xref,he=Q.yref,Te=Bn.getFromId(le,se),fe=Bn.getFromId(le,he),Ae="";se!=="paper"&&!Te.autorange&&(Ae+=se),he!=="paper"&&!fe.autorange&&(Ae+=he),Lp.setClipUrl(X,Ae?"clip"+le._fullLayout._uid+Ae:null,le)}}function Bg(t,e,r){return t.replace(cn.segmentRE,function(a){var i=0,n=a.charAt(0),o=cn.paramIsX[n],l=cn.paramIsY[n],s=cn.numParams[n],f=a.substr(1).replace(cn.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function oP(t,e){if(iu(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){Gg(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=Gg,Dp(t)}}}function Gg(t){if(iu(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(CT(t),delete t._fullLayout._activeShapeIndex,Dp(t))}}function lP(t){if(iu(t)){CT(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,LT.call("_guiRelayout",t,{shapes:a})}}}var Aa=lt,PT=vr,ET=sr,Pt=_p,sP=Cp.eraseActiveShape,co=ge,St=co._,Et=yT.exports={};Et.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?St(t,"Download plot as a png"):St(t,"Download plot")},icon:Pt.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};co.notifier(St(t,"Taking snapshot - this may take a few seconds"),"long"),r.format!=="svg"&&co.isIE()&&(co.notifier(St(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])}),Aa.call("downloadImage",t,r).then(function(a){co.notifier(St(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){co.notifier(St(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Et.sendDataToCloud={name:"sendDataToCloud",title:function(t){return St(t,"Edit in Chart Studio")},icon:Pt.disk,click:function(t){PT.sendDataToCloud(t)}};Et.editInChartStudio={name:"editInChartStudio",title:function(t){return St(t,"Edit in Chart Studio")},icon:Pt.pencil,click:function(t){PT.sendDataToCloud(t)}};Et.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return St(t,"Zoom")},attr:"dragmode",val:"zoom",icon:Pt.zoombox,click:Br};Et.pan2d={name:"pan2d",_cat:"pan",title:function(t){return St(t,"Pan")},attr:"dragmode",val:"pan",icon:Pt.pan,click:Br};Et.select2d={name:"select2d",_cat:"select",title:function(t){return St(t,"Box Select")},attr:"dragmode",val:"select",icon:Pt.selectbox,click:Br};Et.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return St(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Pt.lasso,click:Br};Et.drawclosedpath={name:"drawclosedpath",title:function(t){return St(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Pt.drawclosedpath,click:Br};Et.drawopenpath={name:"drawopenpath",title:function(t){return St(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Pt.drawopenpath,click:Br};Et.drawline={name:"drawline",title:function(t){return St(t,"Draw line")},attr:"dragmode",val:"drawline",icon:Pt.drawline,click:Br};Et.drawrect={name:"drawrect",title:function(t){return St(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Pt.drawrect,click:Br};Et.drawcircle={name:"drawcircle",title:function(t){return St(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Pt.drawcircle,click:Br};Et.eraseshape={name:"eraseshape",title:function(t){return St(t,"Erase active shape")},icon:Pt.eraseshape,click:sP};Et.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return St(t,"Zoom in")},attr:"zoom",val:"in",icon:Pt.zoom_plus,click:Br};Et.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return St(t,"Zoom out")},attr:"zoom",val:"out",icon:Pt.zoom_minus,click:Br};Et.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return St(t,"Autoscale")},attr:"zoom",val:"auto",icon:Pt.autoscale,click:Br};Et.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return St(t,"Reset axes")},attr:"zoom",val:"reset",icon:Pt.home,click:Br};Et.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return St(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Pt.tooltip_basic,gravity:"ne",click:Br};Et.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return St(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:Pt.tooltip_compare,gravity:"ne",click:Br};function Br(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=ET.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,Aa.call("_guiRelayout",t,o)}Et.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return St(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:Pt.zoombox,click:nu};Et.pan3d={name:"pan3d",_cat:"pan",title:function(t){return St(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:Pt.pan,click:nu};Et.orbitRotation={name:"orbitRotation",title:function(t){return St(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:Pt["3d_rotate"],click:nu};Et.tableRotation={name:"tableRotation",title:function(t){return St(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:Pt["z-axis"],click:nu};function nu(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,Aa.call("_guiRelayout",t,o)}Et.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return St(t,"Reset camera to default")},attr:"resetDefault",icon:Pt.home,click:$p};Et.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return St(t,"Reset camera to last save")},attr:"resetLastSave",icon:Pt.movie,click:$p};function $p(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)}Aa.call("_guiRelayout",t,s)}Et.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return St(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Pt.tooltip_basic,gravity:"ne",click:fP};function RT(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 fP(t,e){var r=RT(t,e);Aa.call("_guiRelayout",t,r)}Et.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return St(t,"Zoom in")},attr:"zoom",val:"in",icon:Pt.zoom_plus,click:Pp};Et.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return St(t,"Zoom out")},attr:"zoom",val:"out",icon:Pt.zoom_minus,click:Pp};Et.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return St(t,"Reset")},attr:"reset",val:null,icon:Pt.autoscale,click:Pp};Et.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return St(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Pt.tooltip_basic,gravity:"ne",click:Ep};function Pp(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;Aa.call("_guiRelayout",t,s+".projection.scale",u)}}a==="reset"&&fc(t,"geo")}Et.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return St(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Pt.tooltip_basic,gravity:"ne",click:Ep};Et.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return St(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:Pt.tooltip_basic,gravity:"ne",click:Ep};function zT(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function Ep(t){var e=zT(t);Aa.call("_guiRelayout",t,"hovermode",e)}Et.resetViewSankey={name:"resetSankeyGroup",title:function(t){return St(t,"Reset view")},icon:Pt.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())}Aa.call("restyle",t,e)}};Et.toggleHover={name:"toggleHover",title:function(t){return St(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Pt.tooltip_basic,gravity:"ne",click:function(t,e){var r=RT(t,e);r.hovermode=zT(t),Aa.call("_guiRelayout",t,r)}};Et.resetViews={name:"resetViews",title:function(t){return St(t,"Reset views")},icon:Pt.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Br(t,e),r.setAttribute("data-attr","resetLastSave"),$p(t,e),fc(t,"geo"),fc(t,"mapbox")}};Et.toggleSpikelines={name:"toggleSpikelines",title:function(t){return St(t,"Toggle Spike Lines")},icon:Pt.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",Aa.call("_guiRelayout",t,cP(t))}};function cP(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=ET.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}Et.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return St(t,"Reset view")},attr:"reset",icon:Pt.home,click:function(t){fc(t,"mapbox")}};Et.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return St(t,"Zoom in")},attr:"zoom",val:"in",icon:Pt.zoom_plus,click:IT};Et.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return St(t,"Zoom out")},attr:"zoom",val:"out",icon:Pt.zoom_minus,click:IT};function IT(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}Aa.call("_guiRelayout",t,l)}function fc(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]}Aa.call("_guiRelayout",t,i)}var FT=yT.exports,NT=FT,uP=Object.keys(NT),HT=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],OT=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(HT),bo=[],vP=function(t){if(OT.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();bo.indexOf(e)===-1&&bo.push(e),bo.indexOf(r)===-1&&bo.push(r)}};uP.forEach(function(t){vP(NT[t])});bo.sort();var jT={DRAW_MODES:HT,backButtons:OT,foreButtons:bo},Ug=jT,BT={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 *"+Ug.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 *"+Ug.foreButtons.join("*, *")+"*."].join(" ")}},dP=ge,cl=pt,hP=Ot,pP=BT,mP=function(e,r){var a=e.modebar||{},i=hP.newContainer(r,"modebar");function n(l,s){return dP.coerce(a,i,pP,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")},Rp=gt,yP=wt,fi=ge,GT=_p,gP=Dc.version,bP=new DOMParser;function UT(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var ri=UT.prototype;ri.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 ":"";fi.deleteRelatedStyleRule(i),fi.addRelatedStyleRule(i,o+"#"+i+" .modebar-group","background-color: "+n.bgcolor),fi.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+n.color),fi.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+n.activecolor),fi.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()};ri.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)})};ri.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t};ri.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&&Rp.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||GT.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};ri.createIcon=function(t){var e=yP(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=bP.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};ri.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=Rp.select(a);if(o)n===r&&l.classed("active",!l.classed("active"));else{var s=n===null?n:fi.nestedProperty(e,n).get();l.classed("active",s===i)}})};ri.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 xP(t){return t+" (v"+gP+")"}ri.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",xP(fi._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(GT.newplotlylogo)),t.appendChild(e),t};ri.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};ri.destroy=function(){fi.removeElement(this.container.querySelector(".modebar")),fi.deleteRelatedStyleRule(this._uid)};function _P(t,e){var r=t._fullLayout,a=new UT({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&Rp.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var wP=_P,TP=sr,Vg=Or,ih=lt,kP=ka.isUnifiedHover,AP=wP,cc=FT,MP=jT.DRAW_MODES,SP=ge.extendDeep,LP=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=RP(n):!a.displayModeBar&&a.watermark?o=[]:o=CP(e),i?i.update(e,o):r._modeBar=AP(e,o)};function CP(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(M,A){if(typeof A=="string"){if(A.toLowerCase()===M.toLowerCase())return!0}else{var D=A.name,P=A._cat||A.name;if(D===M||P===M.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(M){for(var A=0;A<a.modeBarButtonsToRemove.length;A++)if(i(M,a.modeBarButtonsToRemove[A]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(M){for(var A=0;A<a.modeBarButtonsToAdd.length;A++)if(i(M,a.modeBarButtonsToAdd[A]))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"),g=e._has("smith"),w=e._has("sankey"),b=DP(e),x=kP(e.hovermode),_=[];function k(M){if(M.length){for(var A=[],D=0;D<M.length;D++){for(var P=M[D],I=cc[P],O=I.name.toLowerCase(),B=(I._cat||I.name).toLowerCase(),G=!1,j=0;j<s.length;j++){var q=s[j].toLowerCase();if(q===O||q===B){G=!0;break}}G||A.push(cc[P])}_.push(A)}}var T=["toImage"];a.showEditInChartStudio?T.push("editInChartStudio"):a.showSendToCloud&&T.push("sendDataToCloud"),k(T);var S=[],C=[],L=[],E=[];(f||d||v||h||p)+u+c+m+y+g>1?(C=["toggleHover"],L=["resetViews"]):u?(S=["zoomInGeo","zoomOutGeo"],C=["hoverClosestGeo"],L=["resetGeo"]):c?(C=["hoverClosest3d"],L=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(S=["zoomInMapbox","zoomOutMapbox"],C=["toggleHover"],L=["resetViewMapbox"]):d?C=["hoverClosestGl2d"]:v?C=["hoverClosestPie"]:w?(C=["hoverClosestCartesian","hoverCompareCartesian"],L=["resetViewSankey"]):C=["toggleHover"],f&&(C=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(PP(r)||x)&&(C=[]),(f||d)&&!b&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],L[0]!=="resetViews"&&(L=["resetScale2d"])),c?E=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||d)&&!b||p?E=["zoom2d","pan2d"]:m||u?E=["pan2d"]:y&&(E=["zoom2d"]),$P(r)&&E.push("select2d","lasso2d");var R=[],N=function(M){R.indexOf(M)===-1&&C.indexOf(M)!==-1&&R.push(M)};if(Array.isArray(l)){for(var H=[],F=0;F<l.length;F++){var $=l[F];typeof $=="string"?($=$.toLowerCase(),MP.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),EP(_,l)}function DP(t){for(var e=TP.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}function $P(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(ih.traceIs(a,"scatter-like")?(Vg.hasMarkers(a)||Vg.hasText(a))&&(e=!0):ih.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function PP(t){for(var e=0;e<t.length;e++)if(!ih.traceIs(t[e],"noHover"))return!1;return!0}function EP(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 RP(t){for(var e=SP([],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(cc[n]!==void 0)e[r][i]=cc[n];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return e}var VT={moduleType:"component",name:"modebar",layoutAttributes:BT,supplyLayoutDefaults:mP,manage:LP},hi={},zP=Wr.FROM_BL,XT=function(e,r,a){a===void 0&&(a=zP[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()},ln=ge,cv=ys,Pa=sr.id2name,IP=Ja,Xg=XT,FP=sp,NP=lr.ALMOST_EQUAL,HP=Wr.FROM_BL;hi.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,u,v,h,d;for(l=0;l<a.length;l++)c=Pa(a[l]),u=t[c],v=e[c],OP(u,v,{axIds:a,layoutOut:e,hasImage:i[c]});function p(T,S){for(l=0;l<T.length;l++){s=T[l];for(f in s)e[Pa(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(v=e[Pa(f)],v.fixedrange){for(var m in s){var y=Pa(m);(t[y]||{}).fixedrange===!1&&ln.warn("fixedrange was specified as false for axis "+y+" but was overridden because another axis in its constraint group has fixedrange true"),e[y].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){v=e[Pa(f)],v._matchGroup&&Object.keys(v._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}p(n,"_constraintGroup");var g=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],w=!1,b=!1;function x(){d=v[h],h==="rangebreaks"&&(b=v._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var _=0;_<g.length;_++){h=g[_],d=null;var k;for(f in s)if(c=Pa(f),u=t[c],v=e[c],h in v){if(!v.matches&&(k=v,h in u)){x();break}d===null&&h in u&&x()}if(h==="range"&&d&&u.range&&u.range.length===2&&u.range[0]!==null&&u.range[1]!==null&&(w=!0),h==="autorange"&&d===null&&w&&(d=!1),d===null&&h in k&&(d=k[h]),d!==null)for(f in s)v=e[Pa(f)],v[h]=h==="range"?d.slice():d,h==="rangebreaks"&&(v._hasDayOfWeekBreaks=b,FP(v,e))}}};function OP(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 ln.coerce(t,e,IP,E,R)}h("constrain",n?"domain":"range"),ln.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 g=i[Pa(m)];g.type===d&&y.push(m)}var w=YT(o,u);if(w){var b=[];for(p=0;p<y.length;p++)m=y[p],w[m]||b.push(m);y=b}var x=y.length,_,k;x&&(t.matches||c.matches)&&(_=ln.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=ln.coerce(t,e,{scaleanchor:{valType:"enumerated",values:y.concat([!1])}},"scaleanchor",T)),_){e._matchGroup=uv(l,u,_,1);var S=i[Pa(_)],C=Yg(i,e)/Yg(i,S);v!==(_.charAt(0)==="x")&&(C=(v?"x":"y")+C),uv(o,u,_,C)}else t.matches&&a.indexOf(t.matches)!==-1&&ln.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(k){var L=h("scaleratio");L||(L=e.scaleratio=1),uv(o,u,k,L)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&ln.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 Yg(t,e){var r=e.domain;return r||(r=t[Pa(e.overlaying)].domain),r[1]-r[0]}function YT(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function uv(t,e,r,a){var i,n,o,l,s,f=YT(t,e);f===null?(f={},f[e]=1,s=t.length,t.push(f)):s=t.indexOf(f);var c=Object.keys(f);for(i=0;i<t.length;i++)if(o=t[i],i!==s&&o[r]){var u=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=vv(u,vv(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var v=c[n];f[v]=vv(a,f[v])}f[r]=1}function vv(t,e){var r="",a="",i,n;typeof t=="string"&&(r=t.match(/^[xy]*/)[0],i=r.length,t=+t.substr(i)),typeof e=="string"&&(a=e.match(/^[xy]*/)[0],n=a.length,e=+e.substr(n));var o=t*e;return!i&&!n?o:!i||!n||r.charAt(0)===a.charAt(0)?r+a+t*e:i===n?o:(i>n?r.substr(n):a.substr(i))+o}function jP(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}hi.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=jP(a[i],r);var v=Object.keys(o),h=1/0,d=0,p=1/0,m={},y={},g=!1;for(n=0;n<v.length;n++)l=v[n],y[l]=s=r[Pa(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),m[l]=f=Math.abs(s._m)/o[l],h=Math.min(h,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(p=Math.min(p,f)),delete s._constraintShrinkable,d=Math.max(d,f),s.constrain==="domain"&&(g=!0);if(!(h>NP*d&&!g)){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")Xg(s,u);else{var w=s._inputDomain,b=(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/=b,u*x<1){s.domain=s._input.domain=w.slice(),Xg(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,C=T,L=Math.abs(k-T),E=T-L*u*1.0001,R=T+L*u*1.0001,N=cv.makePadFn(r,s,0),H=cv.makePadFn(r,s,1);Wg(s,u);var F=Math.abs(s._m),$=cv.concatExtremes(e,s),M=$.min,A=$.max,D,P;for(P=0;P<M.length;P++)D=M[P].val-N(M[P])/F,D>E&&D<S&&(S=D);for(P=0;P<A.length;P++)D=A[P].val+H(A[P])/F,D<R&&D>C&&(C=D);var I=(C-S)/(2*L);u/=I,S=s.l2r(S),C=s.l2r(C),s.range=s._input.range=_<k?[S,C]:[C,S]}Wg(s,u)}}}};hi.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};hi.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 Wg(t,e){var r=t._inputDomain,a=HP[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=gt,r=lt,a=vr,i=ge,n=_r,o=xp,l=pt,s=$t,f=Yc,c=VT,u=Bt,v=Wr,h=hi,d=h.enforce,p=h.clean,m=ys.doAutoRange,y="start",g="middle",w="end";t.layoutStyles=function(M){return i.syncOrAsync([a.doAutoMargin,x],M)};function b(M,A,D){for(var P=0;P<D.length;P++){var I=D[P][0],O=D[P][1];if(!(I[0]>=M[1]||I[1]<=M[0])&&O[0]<A[1]&&O[1]>A[0])return!0}return!1}function x(M){var A=M._fullLayout,D=A._size,P=D.p,I=u.list(M,"",!0),O,B,G,j,q,V;if(A._paperdiv.style({width:M._context.responsive&&A.autosize&&!M._context._hasZeroWidth&&!M.layout.width?"100%":A.width+"px",height:M._context.responsive&&A.autosize&&!M._context._hasZeroHeight&&!M.layout.height?"100%":A.height+"px"}).selectAll(".main-svg").call(s.setSize,A.width,A.height),M._context.setBackground(M,A.paper_bgcolor),t.drawMainTitle(M),c.manage(M),!A._has("cartesian"))return a.previousPromises(M);function K(Ne,We,Qe){var z=Ne._lw/2;if(Ne._id.charAt(0)==="x"){if(We){if(Qe==="top")return We._offset-P-z}else return D.t+D.h*(1-(Ne.position||0))+z%1;return We._offset+We._length+P+z}if(We){if(Qe==="right")return We._offset+We._length+P+z}else return D.l+D.w*(Ne.position||0)+z%1;return We._offset-P-z}for(O=0;O<I.length;O++){j=I[O];var Y=j._anchorAxis;j._linepositions={},j._lw=s.crispRound(M,j.linewidth,1),j._mainLinePosition=K(j,Y,j.side),j._mainMirrorPosition=j.mirror&&Y?K(j,Y,v.OPPOSITE_SIDE[j.side]):null}var te=[],oe=[],_e=[],de=l.opacity(A.paper_bgcolor)===1&&l.opacity(A.plot_bgcolor)===1&&A.paper_bgcolor===A.plot_bgcolor;for(B in A._plots)if(G=A._plots[B],G.mainplot)G.bg&&G.bg.remove(),G.bg=void 0;else{var X=G.xaxis.domain,Q=G.yaxis.domain,le=G.plotgroup;if(b(X,Q,_e)){var se=le.node(),he=G.bg=i.ensureSingle(le,"rect","bg");se.insertBefore(he.node(),se.childNodes[0]),oe.push(B)}else le.select("rect.bg").remove(),_e.push([X,Q]),de||(te.push(B),oe.push(B))}var Te=A._bgLayer.selectAll(".bg").data(te);for(Te.enter().append("rect").classed("bg",!0),Te.exit().remove(),Te.each(function(Ne){A._plots[Ne].bg=e.select(this)}),O=0;O<oe.length;O++)G=A._plots[oe[O]],q=G.xaxis,V=G.yaxis,G.bg&&q._offset!==void 0&&V._offset!==void 0&&G.bg.call(s.setRect,q._offset-P,V._offset-P,q._length+2*P,V._length+2*P).call(l.fill,A.plot_bgcolor).style("stroke-width",0);if(!A._hasOnlyLargeSploms)for(B in A._plots){G=A._plots[B],q=G.xaxis,V=G.yaxis;var fe=G.clipId="clip"+A._uid+B+"plot",Ae=i.ensureSingleById(A._clips,"clipPath",fe,function(Ne){Ne.classed("plotclip",!0).append("rect")});G.clipRect=Ae.select("rect").attr({width:q._length,height:V._length}),s.setTranslate(G.plot,q._offset,V._offset);var ce,ye;G._hasClipOnAxisFalse?(ce=null,ye=fe):(ce=fe,ye=null),s.setClipUrl(G.plot,ce,M),G.layerClipId=ye}var Se,Me,J,xe,re,ue,pe,De,$e,me,ke,Ve,Ie;function Oe(Ne){return"M"+Se+","+Ne+"H"+Me}function Xe(Ne){return"M"+q._offset+","+Ne+"h"+q._length}function it(Ne){return"M"+Ne+","+De+"V"+pe}function be(Ne){return V._shift!==void 0&&(Ne+=V._shift),"M"+Ne+","+V._offset+"v"+V._length}function Ue(Ne,We,Qe){if(!Ne.showline||B!==Ne._mainSubplot)return"";if(!Ne._anchorAxis)return Qe(Ne._mainLinePosition);var z=We(Ne._mainLinePosition);return Ne.mirror&&(z+=We(Ne._mainMirrorPosition)),z}for(B in A._plots){G=A._plots[B],q=G.xaxis,V=G.yaxis;var Be="M0,0";_(q,B)&&(re=T(q,"left",V,I),Se=q._offset-(re?P+re:0),ue=T(q,"right",V,I),Me=q._offset+q._length+(ue?P+ue:0),J=K(q,V,"bottom"),xe=K(q,V,"top"),Ie=!q._anchorAxis||B!==q._mainSubplot,Ie&&(q.mirror==="allticks"||q.mirror==="all")&&(q._linepositions[B]=[J,xe]),Be=Ue(q,Oe,Xe),Ie&&q.showline&&(q.mirror==="all"||q.mirror==="allticks")&&(Be+=Oe(J)+Oe(xe)),G.xlines.style("stroke-width",q._lw+"px").call(l.stroke,q.showline?q.linecolor:"rgba(0,0,0,0)")),G.xlines.attr("d",Be);var Ye="M0,0";_(V,B)&&(ke=T(V,"bottom",q,I),pe=V._offset+V._length+(ke?P:0),Ve=T(V,"top",q,I),De=V._offset-(Ve?P:0),$e=K(V,q,"left"),me=K(V,q,"right"),Ie=!V._anchorAxis||B!==V._mainSubplot,Ie&&(V.mirror==="allticks"||V.mirror==="all")&&(V._linepositions[B]=[$e,me]),Ye=Ue(V,it,be),Ie&&V.showline&&(V.mirror==="all"||V.mirror==="allticks")&&(Ye+=it($e)+it(me)),G.ylines.style("stroke-width",V._lw+"px").call(l.stroke,V.showline?V.linecolor:"rgba(0,0,0,0)")),G.ylines.attr("d",Ye)}return u.makeClipPaths(M),a.previousPromises(M)}function _(M,A){return(M.ticks||M.showline)&&(A===M._mainSubplot||M.mirror==="all"||M.mirror==="allticks")}function k(M,A,D){if(!D.showline||!D._lw)return!1;if(D.mirror==="all"||D.mirror==="allticks")return!0;var P=D._anchorAxis;if(!P)return!1;var I=v.FROM_BL[A];return D.side===A?P.domain[I]===M.domain[I]:D.mirror&&P.domain[1-I]===M.domain[1-I]}function T(M,A,D,P){if(k(M,A,D))return D._lw;for(var I=0;I<P.length;I++){var O=P[I];if(O._mainAxis===D._mainAxis&&k(M,A,O))return O._lw}return 0}t.drawMainTitle=function(M){var A=M._fullLayout.title,D=M._fullLayout,P=F(D),I=$(D),O=N(D,I),B=R(D,P);if(f.draw(M,"gtitle",{propContainer:D,propName:"title.text",placeholder:D._dfltTitle.plot,attributes:{x:B,y:O,"text-anchor":P,dy:I}}),A.text&&A.automargin){var G=e.selectAll(".gtitle"),j=s.bBox(G.node()).height,q=L(M,A,j);if(q>0){E(M,O,q,j),G.attr({x:B,y:O,"text-anchor":P,dy:H(A.yanchor)}).call(n.positionText,B,O);var V=(A.text.match(n.BR_TAG_ALL)||[]).length;if(V){var K=v.LINE_SPACING*V+v.MID_SHIFT;A.y===0&&(K=-K),G.selectAll(".line").each(function(){var Y=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",Y)})}}}};function S(M,A,D,P,I){var O=A.yref==="paper"?M._fullLayout._size.h:M._fullLayout.height,B=i.isTopAnchor(A)?P:P-I,G=D==="b"?O-B:B;return i.isTopAnchor(A)&&D==="t"||i.isBottomAnchor(A)&&D==="b"?!1:G<I}function C(M,A,D,P,I){var O=0;return D==="middle"&&(O+=I/2),M==="t"?(D==="top"&&(O+=I),O+=P-A*P):(D==="bottom"&&(O+=I),O+=A*P),O}function L(M,A,D){var P=A.y,I=A.yanchor,O=P>.5?"t":"b",B=M._fullLayout.margin[O],G=0;return A.yref==="paper"?G=D+A.pad.t+A.pad.b:A.yref==="container"&&(G=C(O,P,I,M._fullLayout.height,D)+A.pad.t+A.pad.b),G>B?G:0}function E(M,A,D,P){var I="title.automargin",O=M._fullLayout.title,B=O.y>.5?"t":"b",G={x:O.x,y:O.y,t:0,b:0},j={};O.yref==="paper"&&S(M,O,B,A,P)?G[B]=D:O.yref==="container"&&(j[B]=D,M._fullLayout._reservedMargin[I]=j),a.allowAutoMargin(M,I),a.autoMargin(M,I,G)}function R(M,A){var D=M.title,P=M._size,I=0;switch(A===y?I=D.pad.l:A===w&&(I=-D.pad.r),D.xref){case"paper":return P.l+P.w*D.x+I;case"container":default:return M.width*D.x+I}}function N(M,A){var D=M.title,P=M._size,I=0;if(A==="0em"||!A?I=-D.pad.b:A===v.CAP_SHIFT+"em"&&(I=D.pad.t),D.y==="auto")return P.t/2;switch(D.yref){case"paper":return P.t+P.h-P.h*D.y+I;case"container":default:return M.height-M.height*D.y+I}}function H(M){return M==="top"?v.CAP_SHIFT+.3+"em":M==="bottom"?"-0.3em":v.MID_SHIFT+"em"}function F(M){var A=M.title,D=g;return i.isRightAnchor(A)?D=w:i.isLeftAnchor(A)&&(D=y),D}function $(M){var A=M.title,D="0em";return i.isTopAnchor(A)?D=v.CAP_SHIFT+"em":i.isMiddleAnchor(A)&&(D=v.MID_SHIFT+"em"),D}t.doTraceStyle=function(M){var A=M.calcdata,D=[],P;for(P=0;P<A.length;P++){var I=A[P],O=I[0]||{},B=O.trace||{},G=B._module||{},j=G.arraysToCalcdata;j&&j(I,B);var q=G.editStyle;q&&D.push({fn:q,cd0:O})}if(D.length){for(P=0;P<D.length;P++){var V=D[P];V.fn(M,V.cd0)}o(M),t.redrawReglTraces(M)}return a.style(M),r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doColorBars=function(M){return r.getComponentMethod("colorbar","draw")(M),a.previousPromises(M)},t.layoutReplot=function(M){var A=M.layout;return M.layout=void 0,r.call("_doPlot",M,"",A)},t.doLegend=function(M){return r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doTicksRelayout=function(M){return u.draw(M,"redraw"),M._fullLayout._hasOnlyLargeSploms&&(r.subplotsRegistry.splom.updateGrid(M),o(M),t.redrawReglTraces(M)),t.drawMainTitle(M),a.previousPromises(M)},t.doModeBar=function(M){var A=M._fullLayout;c.manage(M);for(var D=0;D<A._basePlotModules.length;D++){var P=A._basePlotModules[D].updateFx;P&&P(M)}return a.previousPromises(M)},t.doCamera=function(M){for(var A=M._fullLayout,D=A._subplots.gl3d,P=0;P<D.length;P++){var I=A[D[P]],O=I._scene;O.setViewport(I)}},t.drawData=function(M){var A=M._fullLayout;o(M);for(var D=A._basePlotModules,P=0;P<D.length;P++)D[P].plot(M);return t.redrawReglTraces(M),a.style(M),r.getComponentMethod("selections","draw")(M),r.getComponentMethod("shapes","draw")(M),r.getComponentMethod("annotations","draw")(M),r.getComponentMethod("images","draw")(M),A._replotting=!1,a.previousPromises(M)},t.redrawReglTraces=function(M){var A=M._fullLayout;if(A._has("regl")){var D=M._fullData,P=[],I=[],O,B;for(A._hasOnlyLargeSploms&&A._splomGrid.draw(),O=0;O<D.length;O++){var G=D[O];G.visible===!0&&G._length!==0&&(G.type==="splom"?A._splomScenes[G.uid].draw():G.type==="scattergl"?i.pushUnique(P,G.xaxis+G.yaxis):G.type==="scatterpolargl"&&i.pushUnique(I,G.subplot))}for(O=0;O<P.length;O++)B=A._plots[P[O]],B._scene&&B._scene.draw();for(O=0;O<I.length;O++)B=A[I[O]]._subplot,B._scene&&B._scene.draw()}},t.doAutoRangeAndConstraints=function(M){for(var A=u.list(M,"",!0),D,P={},I=0;I<A.length;I++)if(D=A[I],!P[D._id]){P[D._id]=1,p(M,D),m(M,D);var O=D._matchGroup;if(O)for(var B in O){var G=u.getFromId(M,B);m(M,G,D.range),P[B]=1}}d(M)},t.finalDraw=function(M){r.getComponentMethod("rangeslider","draw")(M),r.getComponentMethod("rangeselector","draw")(M)},t.drawMarginPushers=function(M){r.getComponentMethod("legend","draw")(M),r.getComponentMethod("rangeselector","draw")(M),r.getComponentMethod("sliders","draw")(M),r.getComponentMethod("updatemenus","draw")(M),r.getComponentMethod("colorbar","draw")(M)}})(eu);var BP=Vi.readPaths,GP=Sp,WT=$n.clearOutlineControllers,dv=pt,qT=$t,UP=Ot.arrayEditor,ZT=Xi,VP=ZT.getPathString,KT={draw:ou,drawOne:QT,activateLastSelection:WP};function ou(t){var e=t._fullLayout;WT(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++)QT(t,i)}function lu(t){return t._context.editSelection}function QT(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=ZT.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input)return;n(t._fullLayout._selectionLayer);function n(o){var l=VP(t,a),s={"data-index":e,"fill-rule":"evenodd",d:l},f=a.opacity,c="rgba(0,0,0,0)",u=a.line.color||dv.contrast(t._fullLayout.plot_bgcolor),v=a.line.width,h=a.line.dash;v||(v=5,h="solid");var d=lu(t)&&t._fullLayout._activeSelectionIndex===e;d&&(c=t._fullLayout.activeselection.fillcolor,f=t._fullLayout.activeselection.opacity);for(var p=[],m=1;m>=0;m--){var y=o.append("path").attr(s).style("opacity",m?.1:f).call(dv.stroke,u).call(dv.fill,c).call(qT.dashLine,m?"solid":h,m?4+v:v);if(XP(y,t,a),d){var g=UP(t.layout,"selections",a);y.style({cursor:"move"});var w={element:y.node(),plotinfo:i,gd:t,editHelpers:g,isActiveSelection:!0},b=BP(l,t);GP(b,y,w)}else y.style("pointer-events",m?"all":"none");p[m]=y}var x=p[0],_=p[1];_.node().addEventListener("click",function(){return YP(t,x)})}}function XP(t,e,r){var a=r.xref+r.yref;qT.setClipUrl(t,"clip"+e._fullLayout._uid+a,e)}function YP(t,e){if(lu(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeSelectionIndex){nh(t);return}t._fullLayout._activeSelectionIndex=a,t._fullLayout._deactivateSelection=nh,ou(t)}}}function WP(t){if(lu(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=nh,ou(t)}}function nh(t){if(lu(t)){var e=t._fullLayout._activeSelectionIndex;e>=0&&(WT(t),delete t._fullLayout._activeSelectionIndex,ou(t))}}var JT={exports:{}},hv=zc.dot,Js=lr.BADNUM,uc=JT.exports={};uc.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===Js||m<a||m>i||y===Js||y<n||y>o||p&&f(d))}function u(d,p){var m=d[0],y=d[1];if(m===Js||m<a||m>i||y===Js||y<n||y>o)return!1;var g=r.length,w=r[0][0],b=r[0][1],x=0,_,k,T,S,C;for(_=1;_<g;_++)if(k=w,T=b,w=r[_][0],b=r[_][1],S=Math.min(k,w),!(m<S||m>Math.max(k,w)||y>Math.max(T,b)))if(y<Math.min(T,b))m!==S&&x++;else{if(w===k?C=y:C=T+(m-k)*(b-T)/(w-k),y===C)return!(_===1&&p);y<=C&&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}};uc.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=hv(o,o),s=Math.sqrt(l),f=[-o[1]/s,o[0]/s],c,u,v;for(c=r+1;c<a;c++)if(u=[e[c][0]-n[0],e[c][1]-n[1]],v=hv(u,o),v<0||v>l||Math.abs(hv(u,f))>i)return!0;return!1};uc.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||uc.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 e2=JT.exports,qP={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"},qg=kM,ZP=AM,Zl=lt,KP=$t.dashStyle,ul=pt,QP=Na,JP=ka.makeEventData,gs=zn,eE=gs.freeMode,tE=gs.rectMode,Kl=gs.drawMode,zp=gs.openMode,Ip=gs.selectMode,Zg=Xi,Kg=ru,t2=Sp,r2=$n.clearOutline,a2=Vi,pv=a2.handleEllipse,rE=a2.readPaths,aE=kp.newShapes,iE=wT,nE=KT.activateLastSelection,If=ge,oE=If.sorterAsc,i2=e2,vl=jc,ya=sr.getFromId,lE=xp,sE=eu.redrawReglTraces,Ff=qP,Ua=Ff.MINSELECT,fE=i2.filter,Fp=i2.tester,Np=Tp,Qg=Np.p2r,cE=Np.axValue,uE=Np.getTransform;function Hp(t){return t.subplot!==void 0}function vE(t,e,r,a,i){var n=!Hp(a),o=eE(i),l=tE(i),s=zp(i),f=Kl(i),c=Ip(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,g=a.element.getBoundingClientRect(),w=a.plotinfo,b=uE(w),x=e-g.left,_=r-g.top;p._calcInverseTransform(d);var k=If.apply3DTransform(p._invTransform)(x,_);x=k[0],_=k[1];var T=p._invScaleX,S=p._invScaleY,C=x,L=_,E="M"+x+","+_,R=a.xaxes[0],N=a.yaxes[0],H=R._length,F=N._length,$=t.altKey&&!(Kl(i)&&s),M,A,D,P,I,O,B;o2(t,d,a),o&&(M=fE([[x,_]],Ff.BENDPX));var G=y.selectAll("path.select-outline-"+w.id).data([1]),j=f?p.newshape:p.newselection;f&&(a.hasText=j.label.text||j.label.texttemplate);var q=f&&!s?j.fillcolor:"rgba(0,0,0,0)",V=j.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?j.opacity/2:1,"stroke-dasharray":KP(j.line.dash,j.line.width),"stroke-width":j.line.width+"px","shape-rendering":"crispEdges"}).call(ul.stroke,V).call(ul.fill,q).attr("fill-rule","evenodd").classed("cursor-move",!!f).attr("transform",b).attr("d",E+"Z");var K=y.append("path").attr("class","zoombox-corners").style({fill:ul.background,stroke:ul.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z");if(f&&a.hasText){var Y=y.select(".label-temp");Y.empty()&&(Y=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var te=p._uid+Ff.SELECTID,oe=[],_e=su(d,a.xaxes,a.yaxes,a.subplot);m&&!t.shiftKey&&(a._clearSubplotSelections=function(){if(n){var X=R._id,Q=N._id;u2(d,X,Q,_e);for(var le=(d.layout||{}).selections||[],se=[],he=!1,Te=0;Te<le.length;Te++){var fe=p.selections[Te];fe.xref!==X||fe.yref!==Q?se.push(le[Te]):he=!0}he&&(d._fullLayout._noEmitSelectedAtStart=!0,Zl.call("_guiRelayout",d,{selections:se}))}});var de=ME(a);a.moveFn=function(X,Q){a._clearSubplotSelections&&(a._clearSubplotSelections(),a._clearSubplotSelections=void 0),C=Math.max(0,Math.min(H,T*X+x)),L=Math.max(0,Math.min(F,S*Q+_));var le=Math.abs(C-x),se=Math.abs(L-_);if(l){var he,Te,fe;if(c){var Ae=p.selectdirection;switch(Ae==="any"?se<Math.min(le*.6,Ua)?he="h":le<Math.min(se*.6,Ua)?he="v":he="d":he=Ae,he){case"h":Te=v?F/2:0,fe=F;break;case"v":Te=v?H/2:0,fe=H;break}}if(f)switch(p.newshape.drawdirection){case"vertical":he="h",Te=v?F/2:0,fe=F;break;case"horizontal":he="v",Te=v?H/2:0,fe=H;break;case"ortho":le<se?(he="h",Te=_,fe=L):(he="v",Te=x,fe=C);break;default:he="d"}he==="h"?(P=h?pv(v,[C,Te],[C,fe]):[[x,Te],[x,fe],[C,fe],[C,Te]],P.xmin=h?C:Math.min(x,C),P.xmax=h?C:Math.max(x,C),P.ymin=Math.min(Te,fe),P.ymax=Math.max(Te,fe),K.attr("d","M"+P.xmin+","+(_-Ua)+"h-4v"+2*Ua+"h4ZM"+(P.xmax-1)+","+(_-Ua)+"h4v"+2*Ua+"h-4Z")):he==="v"?(P=h?pv(v,[Te,L],[fe,L]):[[Te,_],[Te,L],[fe,L],[fe,_]],P.xmin=Math.min(Te,fe),P.xmax=Math.max(Te,fe),P.ymin=h?L:Math.min(_,L),P.ymax=h?L:Math.max(_,L),K.attr("d","M"+(x-Ua)+","+P.ymin+"v-4h"+2*Ua+"v4ZM"+(x-Ua)+","+(P.ymax-1)+"v4h"+2*Ua+"v-4Z")):he==="d"&&(P=h?pv(v,[x,_],[C,L]):[[x,_],[x,L],[C,L],[C,_]],P.xmin=Math.min(x,C),P.xmax=Math.max(x,C),P.ymin=Math.min(_,L),P.ymax=Math.max(_,L),K.attr("d","M0,0Z"))}else o&&(M.addPt([C,L]),P=M.filtered);if(a.selectionDefs&&a.selectionDefs.length?(D=l2(a.mergedPolygons,P,$),P.subtract=$,A=Op(a.selectionDefs.concat([P]))):(D=[P],A=Fp(P)),t2(f2(D,s),G,a),c){var ce=oh(d,!1),ye=ce.eventData?ce.eventData.points.slice():[];ce=oh(d,!1,A,_e,a),A=ce.selectionTesters,B=ce.eventData;var Se;M?Se=M.filtered:Se=v2(D),vl.throttle(te,Ff.SELECTDELAY,function(){oe=c2(A,_e);for(var Me=oe.slice(),J=0;J<ye.length;J++){for(var xe=ye[J],re=!1,ue=0;ue<Me.length;ue++)if(Me[ue].curveNumber===xe.curveNumber&&Me[ue].pointNumber===xe.pointNumber){re=!0;break}re||Me.push(xe)}Me.length&&(B||(B={}),B.points=Me),de(B,Se),SE(d,B)})}},a.clickFn=function(X,Q){if(K.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!f){var le=p.clickmode;vl.done(te).then(function(){if(vl.clear(te),X===2){for(G.remove(),I=0;I<_e.length;I++)O=_e[I],O._module.selectPoints(O,!1);if(Jl(d,_e),Ql(a),Bp(d),_e.length){var se=_e[0].xaxis,he=_e[0].yaxis;if(se&&he){for(var Te=[],fe=d._fullLayout.selections,Ae=0;Ae<fe.length;Ae++){var ce=fe[Ae];ce&&(ce.xref!==se._id||ce.yref!==he._id)&&Te.push(ce)}Te.length<fe.length&&(d._fullLayout._noEmitSelectedAtStart=!0,Zl.call("_guiRelayout",d,{selections:Te}))}}}else le.indexOf("select")>-1&&n2(Q,d,a.xaxes,a.yaxes,a.subplot,a,G),le==="event"&&es(d,void 0);QP.click(d,Q,w.id)}).catch(If.error)}},a.doneFn=function(){K.remove(),vl.done(te).then(function(){vl.clear(te),!m&&P&&a.selectionDefs&&(P.subtract=$,a.selectionDefs.push(P),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,D)),(m||f)&&Ql(a,m),a.doneFnCompleted&&a.doneFnCompleted(oe),c&&es(d,B)}).catch(If.error)}}function n2(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,g,w,b,x;if(yE(l)){o2(t,e,n),v=su(e,r,a,i);var _=gE(l,v),k=_.pointNumbers.length>0;if(k?bE(v,_):xE(v)&&(g=e0(_))){for(o&&o.remove(),x=0;x<v.length;x++)h=v[x],h._module.selectPoints(h,!1);Jl(e,v),Ql(n),c&&Bp(e)}else{w=t.shiftKey&&(g!==void 0?g:e0(_)),d=dE(_.pointNumber,_.searchInfo,w);var T=n.selectionDefs.concat([d]);for(p=Op(T),x=0;x<v.length;x++)if(m=v[x]._module.selectPoints(v[x],p),y=s2(m,v[x]),u.length)for(var S=0;S<y.length;S++)u.push(y[S]);else u=y;if(b={points:u},Jl(e,v,b),d&&n&&n.selectionDefs.push(d),o){var C=n.mergedPolygons,L=zp(n.dragmode);t2(f2(C,L),o,n)}c&&es(e,b)}}}function dE(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}function mv(t){return"pointNumber"in t&&"searchInfo"in t}function hE(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 Op(t){if(!t.length)return;for(var e=[],r=mv(t[0])?0:t[0][0][0],a=r,i=mv(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(mv(t[o]))e.push(hE(t[o]));else{var l=Fp(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 o2(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)&&!(Kl(n)&&zp(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&Ql(r),o||(r2(e),a._lastSelectedSubplot=i.id)}function pE(t){return t._fullLayout._activeShapeIndex>=0}function mE(t){return t._fullLayout._activeSelectionIndex>=0}function Ql(t,e){var r=t.dragmode,a=t.plotinfo,i=t.gd;pE(i)&&i._fullLayout._deactivateShape(i),mE(i)&&i._fullLayout._deactivateSelection(i);var n=i._fullLayout,o=n._zoomlayer,l=Kl(r),s=Ip(r);if(l||s){var f=o.selectAll(".select-outline-"+a.id);if(f&&i._fullLayout._outlining){var c;l&&(c=aE(f,t)),c&&Zl.call("_guiRelayout",i,{shapes:c});var u;s&&!Hp(t)&&(u=iE(f,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,Zl.call("_guiRelayout",i,{selections:u}).then(function(){e&&nE(i)})),i._fullLayout._outlining=!1}}a.selection={},a.selection.selectionDefs=t.selectionDefs=[],a.selection.mergedPolygons=t.mergedPolygons=[]}function Jg(t){return t._id}function su(t,e,r,a){if(!t.calcdata)return[];var i=[],n=e.map(Jg),o=r.map(Jg),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(Hp({subplot:a})&&(s.subplot===a||s.geo===a))i.push(ef(s._module,l,e[0],r[0]));else if(s.type==="splom"){if(s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=ef(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}}else if(s.type==="sankey"){var u=ef(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(ef(s._module,l,ya(t,s.xaxis),ya(t,s.yaxis)))}return i}function ef(t,e,r,a){return{_module:t,cd:e,xaxis:r,yaxis:a}}function yE(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function gE(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 e0(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 bE(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 xE(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 Jl(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;_E(t,e)}function _E(t,e){for(var r=!1,a=0;a<e.length;a++){var i=e[a],n=i.cd;Zl.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&&(lE(t),sE(t))}function l2(t,e,r){for(var a=r?qg.difference:qg.union,i=a({regions:t},{regions:[e]}),n=i.regions.reverse(),o=0;o<n.length;o++){var l=n[o];l.subtract=jp(l,n.slice(0,o))}return n}function s2(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=JP(t[i],a,r);return t}function f2(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 c2(t,e){for(var r=[],a,i,n=0;n<e.length;n++){var o=e[n];i=o._module.selectPoints(o,t),a=s2(i,o),r=r.concat(a)}return r}function oh(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=t0(t),v=t._fullLayout;if(o){var h=v._zoomlayer,d=v.dragmode,p=Kl(d),m=Ip(d);if(p||m){var y=ya(t,l,"x"),g=ya(t,s,"y");if(y&&g){var w=h.selectAll(".select-outline-"+o.id);if(w&&t._fullLayout._outlining&&w.length){for(var b=w[0][0],x=b.getAttribute("d"),_=rE(x,t,o),k=[],T=0;T<_.length;T++){for(var S=_[T],C=[],L=0;L<S.length;L++)C.push([Si(y,S[L][1]),Si(g,S[L][2])]);C.xref=l,C.yref=s,C.subtract=jp(C,k),k.push(C)}u=u.concat(k)}}}}var E=l&&s?[l+s]:v._subplots.cartesian;wE(t);for(var R={},N=0;N<E.length;N++){var H=E[N],F=H.indexOf("y"),$=H.slice(0,F),M=H.slice(F),A=l&&s?r:void 0;if(A=kE(u,$,M,A),A){var D=a;if(!n){var P=ya(t,$,"x"),I=ya(t,M,"y");D=su(t,[P],[I],H);for(var O=0;O<D.length;O++){var B=D[O],G=B.cd[0],j=G.trace;if(B._module.name==="scattergl"&&!G.t.xpx){var q=j.x,V=j.y,K=j._length;G.t.xpx=[],G.t.ypx=[];for(var Y=0;Y<K;Y++)G.t.xpx[Y]=P.c2p(q[Y]),G.t.ypx[Y]=I.c2p(V[Y])}B._module.name==="splom"&&(R[j.uid]||(R[j.uid]=!0))}}var te=c2(A,D);f=f.concat(te),c=c.concat(D)}}var oe={points:f};Jl(t,c,oe);var _e=v.clickmode,de=_e.indexOf("event")>-1&&e;if(!o&&e){var X=t0(t,!0);if(X.length){var Q=X[0].xref,le=X[0].yref;if(Q&&le){var se=v2(X),he=d2([ya(t,Q,"x"),ya(t,le,"y")]);he(oe,se)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:de&&es(t,oe),v._reselect=!1}if(!o&&v._deselect){var Te=v._deselect;l=Te.xref,s=Te.yref,TE(l,s,c)||u2(t,l,s,a),de&&(oe.points.length?es(t,oe):Bp(t)),v._deselect=!1}return{eventData:oe,selectionTesters:r}}function wE(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 TE(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 u2(t,e,r,a){a=su(t,[ya(t,e,"x")],[ya(t,r,"y")],e+r);for(var i=0;i<a.length;i++){var n=a[i];n._module.selectPoints(n,!1)}Jl(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=l2(i,o,l),a=Op(i)}else i=[o],a=Fp(o)}return a}function t0(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=ya(t,s,"x"),u=ya(t,f,"y"),v,h,d,p,m;if(l.type==="rect"){m=[];var y=Si(c,l.x0),g=Si(c,l.x1),w=Si(u,l.y0),b=Si(u,l.y1);m=[[y,w],[y,b],[g,b],[g,w]],v=Math.min(y,g),h=Math.max(y,g),d=Math.min(w,b),p=Math.max(w,b),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=Zg.extractPathCoords(T,Kg.paramIsX,"raw"),C=Zg.extractPathCoords(T,Kg.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=Si(c,S[L]),R=Si(u,C[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=jp(m,_),_.push(m),r.push(m)}}}}return r}function jp(t,e){for(var r=!1,a=0;a<e.length;a++)for(var i=e[a],n=0;n<t.length;n++)if(ZP(t[n],i)){r=!r;break}return r}function Si(t,e){return t.type==="date"&&(e=e.replace("_"," ")),t.type==="log"?t.c2p(e):t.r2p(e,null,t.calendar)}function v2(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 AE(r)}function AE(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]=[Qg(o,f),Qg(o,c)].sort(oE))}else i||(i={}),i[l]=r.map(cE(o))}a&&(e.range=a),i&&(e.lassoPoints=i)}}function ME(t){var e=t.plotinfo;return e.fillRangeItems||d2(t.xaxes.concat(t.yaxes))}function SE(t,e){t.emit("plotly_selecting",e)}function es(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function Bp(t){t.emit("plotly_deselect",null)}var LE={reselect:oh,prepSelect:vE,clearOutline:r2,clearSelectionsCache:Ql,selectOnClick:n2},h2=[{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}],fu={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(" ")}},r0=h2,a0=Dr,tf=Yr,CE=Ot.templatedArray,rf=fu;function i0(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 n0(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 bs=CE("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:a0({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:r0.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:r0.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:[n0("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[n0("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",tf.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",rf.axisRefDescription("x","left","right"),i0("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",tf.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",rf.axisRefDescription("y","bottom","top"),i0("y")].join(" ")},xref:{valType:"enumerated",values:["paper",tf.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",rf.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",tf.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",rf.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:a0({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(" ")}}}),cu={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},o0=Wo.axisHoverFormat,DE=Rr.texttemplateAttrs,$E=Rr.hovertemplateAttrs,l0=En,PE=Dr,EE=ia.dash,RE=ia.pattern,zE=$t,s0=cu,yv=Qt.extendFlat;function f0(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 c0(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 u0(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 Yi={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:f0("x"),yperiod:f0("y"),xperiod0:c0("x0"),yperiod0:c0("y0"),xperiodalignment:u0("x"),yperiodalignment:u0("y"),xhoverformat:o0("x"),yhoverformat:o0("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:DE({},{}),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 "+s0.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:$E({},{keys:s0.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:yv({},EE,{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:RE,marker:yv({symbol:{valType:"enumerated",values:zE.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1,description:["Sets the marker angle in respect to `angleref`."].join(" ")},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1,description:["Sets the reference for marker angle.","With *previous*, angle 0 points along the line from the previous point to this one.","With *up*, angle 0 points toward the top of the screen."].join(" ")},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0,description:["Moves the marker away from the data point in the direction of `angle` (in px).","This can be useful for example if you have another marker at this","location and you want to point an arrowhead marker at it."].join(" ")},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:yv({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},l0("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"},l0("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:PE({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},v0=bs,d0=Yi.line,IE=ia.dash,af=Qt.extendFlat,FE=Za.overrideAll,NE=Ot.templatedArray,h0=fu,p2=FE(NE("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:af({},v0.xref,{description:["Sets the selection's x coordinate axis.",h0.axisRefDescription("x","left","right")].join(" ")}),yref:af({},v0.yref,{description:["Sets the selection's x coordinate axis.",h0.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:d0.color,width:af({},d0.width,{min:1,dflt:1}),dash:af({},IE,{dflt:"dot"})}}),"arraydraw","from-root"),p0=ge,nf=Bt,HE=ei,OE=p2,m0=Xi,jE=function(e,r){HE(e,r,{name:"selections",handleItemDefaults:BE});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 BE(t,e,r){function a(_,k){return p0.coerce(t,e,OE,_,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=nf.coerceRef(t,e,u,c);if(v=nf.getFromId(u,p),v._selectionIndices.push(e._index),d=m0.rangeToShapePosition(v),h=m0.shapePositionToRange(v),l){var m=c+"0",y=c+"1",g=t[m],w=t[y];t[m]=h(t[m],!0),t[y]=h(t[y],!0),nf.coercePosition(e,u,a,p,m),nf.coercePosition(e,u,a,p,y);var b=e[m],x=e[y];b!==void 0&&x!==void 0&&(e[m]=d(b),e[y]=d(x),t[m]=g,t[y]=w)}}l&&p0.noneOrAll(t,e,["x0","x1","y0","y1"])}var GE=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")},UE=lt,y0=ge,g0=sr,uu=function(e){return function(a,i){var n=a[e];if(Array.isArray(n))for(var o=UE.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(y0.isPlainObject(d)){var p=g0.cleanId(d.xref,"x",!1),m=g0.cleanId(d.yref,"y",!1),y=l.x.test(p),g=l.y.test(m);if(y||g){v||y0.pushUnique(i._basePlotModules,o);var w=!1;y&&f.indexOf(p)===-1&&(f.push(p),w=!0),g&&c.indexOf(m)===-1&&(c.push(m),w=!0),w&&y&&g&&u.push(p+m)}}}}},b0=KT,dl=LE,Rl={moduleType:"component",name:"selections",layoutAttributes:p2,supplyLayoutDefaults:jE,supplyDrawNewSelectionDefaults:GE,includeBasePlot:uu("selections"),draw:b0.draw,drawOne:b0.drawOne,reselect:dl.reselect,prepSelect:dl.prepSelect,clearOutline:dl.clearOutline,clearSelectionsCache:dl.clearSelectionsCache,selectOnClick:dl.selectOnClick},gv,x0;function VE(){if(x0)return gv;x0=1;var t=gt,e=ge,r=e.numberFormat,a=wa,i=W1,n=lt,o=e.strTranslate,l=_r,s=pt,f=$t,c=Na,u=Bt,v=Ui,h=ti,d=zn,p=d.selectingOrDrawing,m=d.freeMode,y=Wr.FROM_TL,g=xp,w=eu.redrawReglTraces,b=vr,x=sr.getFromId,_=Rl.prepSelect,k=Rl.clearOutline,T=Rl.selectOnClick,S=XT,C=Yr,L=C.MINDRAG,E=C.MINZOOM,R=!0;function N(X,Q,le,se,he,Te,fe,Ae){var ce=X._fullLayout._zoomlayer,ye=fe+Ae==="nsew",Se=(fe+Ae).length===1,Me,J,xe,re,ue,pe,De,$e,me,ke,Ve,Ie,Oe,Xe,it,be,Ue,Be,Ye,Ne,We,Qe,z;le+=Q.yaxis._shift;function W(){if(Me=Q.xaxis,J=Q.yaxis,me=Me._length,ke=J._length,De=Me._offset,$e=J._offset,xe={},xe[Me._id]=Me,re={},re[J._id]=J,fe&&Ae)for(var Ge=Q.overlays,Fe=0;Fe<Ge.length;Fe++){var ot=Ge[Fe].xaxis;xe[ot._id]=ot;var st=Ge[Fe].yaxis;re[st._id]=st}ue=de(xe),pe=de(re),Oe=$(ue,Ae),Xe=$(pe,fe),it=!Xe&&!Oe,Ie=oe(X,X._fullLayout._axisMatchGroups,xe,re),Ve=oe(X,X._fullLayout._axisConstraintGroups,xe,re,Ie);var Ke=Ve.isSubplotConstrained||Ie.isSubplotConstrained;be=Ae||Ke,Ue=fe||Ke;var et=X._fullLayout;Be=et._has("scattergl"),Ye=et._has("splom"),Ne=et._has("svg")}W();var U=I(Xe+Oe,X._fullLayout.dragmode,ye),Z=F(Q,fe+Ae+"drag",U,le,se,he,Te);if(it&&!ye)return Z.onmousedown=null,Z.style.pointerEvents="none",Z;var ne={element:Z,gd:X,plotinfo:Q};ne.prepFn=function(Ge,Fe,ot){var st=ne.dragmode,Ke=X._fullLayout.dragmode;Ke!==st&&(ne.dragmode=Ke),W(),Qe=X._fullLayout._invScaleX,z=X._fullLayout._invScaleY,it||(ye?Ge.shiftKey?Ke==="pan"?Ke="zoom":p(Ke)||(Ke="pan"):Ge.ctrlKey&&(Ke="pan"):Ke="pan"),m(Ke)?ne.minDrag=1:ne.minDrag=void 0,p(Ke)?(ne.xaxes=ue,ne.yaxes=pe,_(Ge,Fe,ot,ne,Ke)):(ne.clickFn=Le,p(st)&&ie(),it||(Ke==="zoom"?(ne.moveFn=mt,ne.doneFn=Lt,ne.minDrag=1,Rt(Ge,Fe,ot)):Ke==="pan"&&(ne.moveFn=yt,ne.doneFn=zt))),X._fullLayout._redrag=function(){var et=X._dragdata;if(et&&et.element===Z){var nt=X._fullLayout.dragmode;p(nt)||(W(),gr([0,0,me,ke]),ne.moveFn(et.dx,et.dy))}}};function ie(){ne.plotinfo.selection=!1,k(X)}function Le(Ge,Fe){var ot=ne.gd;if(ot._fullLayout._activeShapeIndex>=0){ot._fullLayout._deactivateShape(ot);return}var st=ot._fullLayout.clickmode;if(q(ot),Ge===2&&!Se&&Ct(),ye)st.indexOf("select")>-1&&T(Fe,ot,ue,pe,Q.id,ne),st.indexOf("event")>-1&&c.click(ot,Fe,Q.id);else if(Ge===1&&Se){var Ke=fe?J:Me,et=fe==="s"||Ae==="w"?0:1,nt=Ke._name+".range["+et+"]",_t=M(Ke,et),kt="left",qt="middle";if(Ke.fixedrange)return;fe?(qt=fe==="n"?"top":"bottom",Ke.side==="right"&&(kt="right")):Ae==="e"&&(kt="right"),ot._context.showAxisRangeEntryBoxes&&t.select(Z).call(l.makeEditable,{gd:ot,immediate:!0,background:ot._fullLayout.paper_bgcolor,text:String(_t),fill:Ke.tickfont?Ke.tickfont.color:"#444",horizontalAlign:kt,verticalAlign:qt}).on("edit",function(Gt){var er=Ke.d2r(Gt);er!==void 0&&n.call("_guiRelayout",ot,nt,er)})}}h.init(ne);var we,ve,ee,Pe,Re,He,tt,ft,dt,at;function Rt(Ge,Fe,ot){var st=Z.getBoundingClientRect();we=Fe-st.left,ve=ot-st.top,X._fullLayout._calcInverseTransform(X);var Ke=e.apply3DTransform(X._fullLayout._invTransform)(we,ve);we=Ke[0],ve=Ke[1],ee={l:we,r:we,w:0,t:ve,b:ve,h:0},Pe=X._hmpixcount?X._hmlumcount/X._hmpixcount:a(X._fullLayout.plot_bgcolor).getLuminance(),Re="M0,0H"+me+"V"+ke+"H0V0",He=!1,tt="xy",at=!1,ft=O(ce,Pe,De,$e,Re),dt=B(ce,De,$e)}function mt(Ge,Fe){if(X._transitioningWithDuration)return!1;var ot=Math.max(0,Math.min(me,Qe*Ge+we)),st=Math.max(0,Math.min(ke,z*Fe+ve)),Ke=Math.abs(ot-we),et=Math.abs(st-ve);ee.l=Math.min(we,ot),ee.r=Math.max(we,ot),ee.t=Math.min(ve,st),ee.b=Math.max(ve,st);function nt(){tt="",ee.r=ee.l,ee.t=ee.b,dt.attr("d","M0,0Z")}if(Ve.isSubplotConstrained)Ke>E||et>E?(tt="xy",Ke/me>et/ke?(et=Ke*ke/me,ve>st?ee.t=ve-et:ee.b=ve+et):(Ke=et*me/ke,we>ot?ee.l=we-Ke:ee.r=we+Ke),dt.attr("d",te(ee))):nt();else if(Ie.isSubplotConstrained)if(Ke>E||et>E){tt="xy";var _t=Math.min(ee.l/me,(ke-ee.b)/ke),kt=Math.max(ee.r/me,(ke-ee.t)/ke);ee.l=_t*me,ee.r=kt*me,ee.b=(1-_t)*ke,ee.t=(1-kt)*ke,dt.attr("d",te(ee))}else nt();else!Xe||et<Math.min(Math.max(Ke*.6,L),E)?Ke<L||!Oe?nt():(ee.t=0,ee.b=ke,tt="x",dt.attr("d",K(ee,ve))):!Oe||Ke<Math.min(et*.6,E)?(ee.l=0,ee.r=me,tt="y",dt.attr("d",Y(ee,we))):(tt="xy",dt.attr("d",te(ee)));ee.w=ee.r-ee.l,ee.h=ee.b-ee.t,tt&&(at=!0),X._dragged=at,G(ft,dt,ee,Re,He,Pe),rt(),X.emit("plotly_relayouting",We),He=!0}function rt(){We={},(tt==="xy"||tt==="x")&&(A(ue,ee.l/me,ee.r/me,We,Ve.xaxes),Mt("x",We)),(tt==="xy"||tt==="y")&&(A(pe,(ke-ee.b)/ke,(ke-ee.t)/ke,We,Ve.yaxes),Mt("y",We))}function Lt(){rt(),q(X),zt(),V(X)}var bt=[0,0,me,ke],ht=null,ct=C.REDRAWDELAY,qe=Q.mainplot?X._fullLayout._plots[Q.mainplot]:Q;function Je(Ge){if(!X._context._scrollZoom.cartesian&&!X._fullLayout._enablescrollzoom)return;if(ie(),X._transitioningWithDuration){Ge.preventDefault(),Ge.stopPropagation();return}W(),clearTimeout(ht);var Fe=-Ge.deltaY;if(isFinite(Fe)||(Fe=Ge.wheelDelta/10),!isFinite(Fe)){e.log("Did not find wheel motion attributes: ",Ge);return}var ot=Math.exp(-Math.min(Math.max(Fe,-20),20)/200),st=qe.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Ke=(Ge.clientX-st.left)/st.width,et=(st.bottom-Ge.clientY)/st.height,nt;function _t(kt,qt,Gt){if(kt.fixedrange)return;var er=e.simpleMap(kt.range,kt.r2l),zr=er[0]+(er[1]-er[0])*qt;function jt(At){return kt.l2r(zr+(At-zr)*Gt)}kt.range=er.map(jt)}if(be){for(Ae||(Ke=.5),nt=0;nt<ue.length;nt++)_t(ue[nt],Ke,ot);Mt("x"),bt[2]*=ot,bt[0]+=bt[2]*Ke*(1/ot-1)}if(Ue){for(fe||(et=.5),nt=0;nt<pe.length;nt++)_t(pe[nt],et,ot);Mt("y"),bt[3]*=ot,bt[1]+=bt[3]*(1-et)*(1/ot-1)}gr(bt),Ze(),X.emit("plotly_relayouting",We),ht=setTimeout(function(){X._fullLayout&&(bt=[0,0,me,ke],zt())},ct),Ge.preventDefault()}fe.length*Ae.length!==1&&_e(Z,Je);function yt(Ge,Fe){if(Ge=Ge*Qe,Fe=Fe*z,X._transitioningWithDuration)return;if(X._fullLayout._replotting=!0,Oe==="ew"||Xe==="ns"){var ot=Oe?-Ge:0,st=Xe?-Fe:0;if(Ie.isSubplotConstrained){if(Oe&&Xe){var Ke=(Ge/me-Fe/ke)/2;Ge=Ke*me,Fe=-Ke*ke,ot=-Ge,st=-Fe}Xe?ot=-st*me/ke:st=-ot*ke/me}Oe&&(D(ue,Ge),Mt("x")),Xe&&(D(pe,Fe),Mt("y")),gr([ot,st,me,ke]),Ze(),X.emit("plotly_relayouting",We);return}function et(jt,At,Ut){for(var wr=1-At,Tr,$r,qr=0;qr<jt.length;qr++){var Ma=jt[qr];if(!Ma.fixedrange){Tr=Ma,$r=Ma._rl[wr]+(Ma._rl[At]-Ma._rl[wr])/P(Ut/Ma._length);var Jo=Ma.l2r($r);Jo!==!1&&Jo!==void 0&&(Ma.range[At]=Jo)}}return Tr._length*(Tr._rl[At]-$r)/(Tr._rl[At]-Tr._rl[wr])}var nt=Oe==="w"==(Xe==="n")?1:-1;if(Oe&&Xe&&(Ve.isSubplotConstrained||Ie.isSubplotConstrained)){var _t=(Ge/me+nt*Fe/ke)/2;Ge=_t*me,Fe=nt*_t*ke}var kt,qt;if(Oe==="w"?Ge=et(ue,0,Ge):Oe==="e"?Ge=et(ue,1,-Ge):Oe||(Ge=0),Xe==="n"?Fe=et(pe,1,Fe):Xe==="s"?Fe=et(pe,0,-Fe):Xe||(Fe=0),kt=Oe==="w"?Ge:0,qt=Xe==="n"?Fe:0,Ve.isSubplotConstrained&&!Ie.isSubplotConstrained||Ie.isSubplotConstrained&&Oe&&Xe&&nt>0){var Gt;if(Ie.isSubplotConstrained||!Oe&&Xe.length===1){for(Gt=0;Gt<ue.length;Gt++)ue[Gt].range=ue[Gt]._r.slice(),S(ue[Gt],1-Fe/ke);Ge=Fe*me/ke,kt=Ge/2}if(Ie.isSubplotConstrained||!Xe&&Oe.length===1){for(Gt=0;Gt<pe.length;Gt++)pe[Gt].range=pe[Gt]._r.slice(),S(pe[Gt],1-Ge/me);Fe=Ge*ke/me,qt=Fe/2}}(!Ie.isSubplotConstrained||!Xe)&&Mt("x"),(!Ie.isSubplotConstrained||!Oe)&&Mt("y");var er=me-Ge,zr=ke-Fe;Ie.isSubplotConstrained&&!(Oe&&Xe)&&(Oe?(qt=kt?0:Ge*ke/me,zr=er*ke/me):(kt=qt?0:Fe*me/ke,er=zr*me/ke)),gr([kt,qt,er,zr]),Ze(),X.emit("plotly_relayouting",We)}function Mt(Ge,Fe){for(var ot=Ie.isSubplotConstrained?{x:pe,y:ue}[Ge]:Ie[Ge+"axes"],st=Ie.isSubplotConstrained?{x:ue,y:pe}[Ge]:[],Ke=0;Ke<ot.length;Ke++){var et=ot[Ke],nt=et._id,_t=Ie.xLinks[nt]||Ie.yLinks[nt],kt=st[0]||xe[_t]||re[_t];kt&&(Fe?(Fe[et._name+".range[0]"]=Fe[kt._name+".range[0]"],Fe[et._name+".range[1]"]=Fe[kt._name+".range[1]"]):et.range=kt.range.slice())}}function Ze(){var Ge=[],Fe;function ot(nt){for(Fe=0;Fe<nt.length;Fe++)nt[Fe].fixedrange||Ge.push(nt[Fe]._id)}function st(nt,_t){for(Fe=0;Fe<nt.length;Fe++){var kt=nt[Fe],qt=kt[_t];!kt.fixedrange&&qt.tickmode==="sync"&&Ge.push(qt._id)}}for(be&&(ot(ue),ot(Ve.xaxes),ot(Ie.xaxes),st(Q.overlays,"xaxis")),Ue&&(ot(pe),ot(Ve.yaxes),ot(Ie.yaxes),st(Q.overlays,"yaxis")),We={},Fe=0;Fe<Ge.length;Fe++){var Ke=Ge[Fe],et=x(X,Ke);u.drawOne(X,et,{skipTitle:!0}),We[et._name+".range[0]"]=et.range[0],We[et._name+".range[1]"]=et.range[1]}u.redrawComponents(X,Ge)}function Ct(){if(!X._transitioningWithDuration){var Ge=X._context.doubleClick,Fe=[];Oe&&(Fe=Fe.concat(ue)),Xe&&(Fe=Fe.concat(pe)),Ie.xaxes&&(Fe=Fe.concat(Ie.xaxes)),Ie.yaxes&&(Fe=Fe.concat(Ie.yaxes));var ot={},st,Ke;if(Ge==="reset+autosize")for(Ge="autosize",Ke=0;Ke<Fe.length;Ke++){st=Fe[Ke];var et=st._rangeInitial0,nt=st._rangeInitial1,_t=et!==void 0||nt!==void 0;if(_t&&(et!==void 0&&et!==st.range[0]||nt!==void 0&&nt!==st.range[1])||!_t&&st.autorange!==!0){Ge="reset";break}}if(Ge==="autosize")for(Ke=0;Ke<Fe.length;Ke++)st=Fe[Ke],st.fixedrange||(ot[st._name+".autorange"]=!0);else if(Ge==="reset"){for((Oe||Ve.isSubplotConstrained)&&(Fe=Fe.concat(Ve.xaxes)),Xe&&!Ve.isSubplotConstrained&&(Fe=Fe.concat(Ve.yaxes)),Ve.isSubplotConstrained&&(Oe?Xe||(Fe=Fe.concat(pe)):Fe=Fe.concat(ue)),Ke=0;Ke<Fe.length;Ke++)if(st=Fe[Ke],!st.fixedrange){var kt=st._name,qt=st._autorangeInitial;st._rangeInitial0===void 0&&st._rangeInitial1===void 0?ot[kt+".autorange"]=!0:st._rangeInitial0===void 0?(ot[kt+".autorange"]=qt,ot[kt+".range"]=[null,st._rangeInitial1]):st._rangeInitial1===void 0?(ot[kt+".range"]=[st._rangeInitial0,null],ot[kt+".autorange"]=qt):ot[kt+".range"]=[st._rangeInitial0,st._rangeInitial1]}}X.emit("plotly_doubleclick",null),n.call("_guiRelayout",X,ot)}}function zt(){gr([0,0,me,ke]),e.syncOrAsync([b.previousPromises,function(){X._fullLayout._replotting=!1,n.call("_guiRelayout",X,We)}],X)}function gr(Ge){var Fe=X._fullLayout,ot=Fe._plots,st=Fe._subplots.cartesian,Ke,et,nt,_t;if(Ye&&n.subplotsRegistry.splom.drag(X),Be){for(Ke=0;Ke<st.length;Ke++)if(et=ot[st[Ke]],nt=et.xaxis,_t=et.yaxis,et._scene){var kt=e.simpleMap(nt.range,nt.r2l),qt=e.simpleMap(_t.range,_t.r2l);nt.limitRange&&nt.limitRange(),_t.limitRange&&_t.limitRange(),kt=nt.range,qt=_t.range,et._scene.update({range:[kt[0],qt[0],kt[1],qt[1]]})}}if((Ye||Be)&&(g(X),w(X)),Ne){var Gt=Ge[2]/Me._length,er=Ge[3]/J._length;for(Ke=0;Ke<st.length;Ke++){et=ot[st[Ke]],nt=et.xaxis,_t=et.yaxis;var zr=(be||Ie.isSubplotConstrained)&&!nt.fixedrange&&xe[nt._id],jt=(Ue||Ie.isSubplotConstrained)&&!_t.fixedrange&&re[_t._id],At,Ut,wr,Tr;if(zr?(At=Gt,wr=Ae||Ie.isSubplotConstrained?Ge[0]:Sr(nt,At)):Ie.xaHash[nt._id]?(At=Gt,wr=Ge[0]*nt._length/Me._length):Ie.yaHash[nt._id]?(At=er,wr=Xe==="ns"?-Ge[1]*nt._length/J._length:Sr(nt,At,{n:"top",s:"bottom"}[Xe])):(At=hr(nt,Gt,er),wr=Ur(nt,At)),At>1&&(nt.maxallowed!==void 0&&be===(nt.range[0]<nt.range[1]?"e":"w")||nt.minallowed!==void 0&&be===(nt.range[0]<nt.range[1]?"w":"e"))&&(At=1,wr=0),jt?(Ut=er,Tr=fe||Ie.isSubplotConstrained?Ge[1]:Sr(_t,Ut)):Ie.yaHash[_t._id]?(Ut=er,Tr=Ge[1]*_t._length/J._length):Ie.xaHash[_t._id]?(Ut=Gt,Tr=Oe==="ew"?-Ge[0]*_t._length/Me._length:Sr(_t,Ut,{e:"right",w:"left"}[Oe])):(Ut=hr(_t,Gt,er),Tr=Ur(_t,Ut)),Ut>1&&(_t.maxallowed!==void 0&&Ue===(_t.range[0]<_t.range[1]?"n":"s")||_t.minallowed!==void 0&&Ue===(_t.range[0]<_t.range[1]?"s":"n"))&&(Ut=1,Tr=0),!(!At&&!Ut)){At||(At=1),Ut||(Ut=1);var $r=nt._offset-wr/At,qr=_t._offset-Tr/Ut;et.clipRect.call(f.setTranslate,wr,Tr).call(f.setScale,At,Ut),et.plot.call(f.setTranslate,$r,qr).call(f.setScale,1/At,1/Ut),(At!==et.xScaleFactor||Ut!==et.yScaleFactor)&&(f.setPointGroupScale(et.zoomScalePts,At,Ut),f.setTextPointsScale(et.zoomScaleTxt,At,Ut)),f.hideOutsideRangePoints(et.clipOnAxisFalseTraces,et),et.xScaleFactor=At,et.yScaleFactor=Ut}}}}function hr(Ge,Fe,ot){return Ge.fixedrange?0:be&&Ve.xaHash[Ge._id]?Fe:Ue&&(Ve.isSubplotConstrained?Ve.xaHash:Ve.yaHash)[Ge._id]?ot:0}function Ur(Ge,Fe){return Fe?(Ge.range=Ge._r.slice(),S(Ge,Fe),Sr(Ge,Fe)):0}function Sr(Ge,Fe,ot){return Ge._length*(1-Fe)*y[ot||Ge.constraintoward||"middle"]}return Z}function H(X,Q,le,se){var he=e.ensureSingle(X.draglayer,Q,le,function(Te){Te.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",X.id)});return he.call(v,se),he.node()}function F(X,Q,le,se,he,Te,fe){var Ae=H(X,"rect",Q,le);return t.select(Ae).call(f.setRect,se,he,Te,fe),Ae}function $(X,Q){for(var le=0;le<X.length;le++)if(!X[le].fixedrange)return Q;return""}function M(X,Q){var le=X.range[Q],se=Math.abs(le-X.range[1-Q]),he;return X.type==="date"?le:X.type==="log"?(he=Math.ceil(Math.max(0,-Math.log(se)/Math.LN10))+3,r("."+he+"g")(Math.pow(10,le))):(he=Math.floor(Math.log(Math.abs(le))/Math.LN10)-Math.floor(Math.log(se)/Math.LN10)+4,r("."+String(he)+"g")(le))}function A(X,Q,le,se,he){for(var Te=0;Te<X.length;Te++){var fe=X[Te];if(!fe.fixedrange)if(fe.rangebreaks){var Ae=fe._id.charAt(0)==="y",ce=Ae?1-Q:Q,ye=Ae?1-le:le;se[fe._name+".range[0]"]=fe.l2r(fe.p2l(ce*fe._length)),se[fe._name+".range[1]"]=fe.l2r(fe.p2l(ye*fe._length))}else{var Se=fe._rl[0],Me=fe._rl[1]-Se;se[fe._name+".range[0]"]=fe.l2r(Se+Me*Q),se[fe._name+".range[1]"]=fe.l2r(Se+Me*le)}}if(he&&he.length){var J=(Q+(1-le))/2;A(he,J,1-J,se,[])}}function D(X,Q){for(var le=0;le<X.length;le++){var se=X[le];if(!se.fixedrange){if(se.rangebreaks){var he=0,Te=se._length,fe=se.p2l(he+Q)-se.p2l(he),Ae=se.p2l(Te+Q)-se.p2l(Te),ce=(fe+Ae)/2;se.range=[se.l2r(se._rl[0]-ce),se.l2r(se._rl[1]-ce)]}else se.range=[se.l2r(se._rl[0]-Q/se._m),se.l2r(se._rl[1]-Q/se._m)];se.limitRange&&se.limitRange()}}}function P(X){return 1-(X>=0?Math.min(X,.9):1/(1/Math.max(X,-.3)+3.222))}function I(X,Q,le){return X?X==="nsew"?le?"":Q==="pan"?"move":"crosshair":X.toLowerCase()+"-resize":"pointer"}function O(X,Q,le,se,he){return X.append("path").attr("class","zoombox").style({fill:Q>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",o(le,se)).attr("d",he+"Z")}function B(X,Q,le){return X.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("transform",o(Q,le)).attr("d","M0,0Z")}function G(X,Q,le,se,he,Te){X.attr("d",se+"M"+le.l+","+le.t+"v"+le.h+"h"+le.w+"v-"+le.h+"h-"+le.w+"Z"),j(X,Q,he,Te)}function j(X,Q,le,se){le||(X.transition().style("fill",se>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Q.transition().style("opacity",1).duration(200))}function q(X){t.select(X).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(X){R&&X.data&&X._context.showTips&&(e.notifier(e._(X,"Double-click to zoom back out"),"long"),R=!1)}function K(X,Q){return"M"+(X.l-.5)+","+(Q-E-.5)+"h-3v"+(2*E+1)+"h3ZM"+(X.r+.5)+","+(Q-E-.5)+"h3v"+(2*E+1)+"h-3Z"}function Y(X,Q){return"M"+(Q-E-.5)+","+(X.t-.5)+"v-3h"+(2*E+1)+"v3ZM"+(Q-E-.5)+","+(X.b+.5)+"v3h"+(2*E+1)+"v-3Z"}function te(X){var Q=Math.floor(Math.min(X.b-X.t,X.r-X.l,E)/2);return"M"+(X.l-3.5)+","+(X.t-.5+Q)+"h3v"+-Q+"h"+Q+"v-3h-"+(Q+3)+"ZM"+(X.r+3.5)+","+(X.t-.5+Q)+"h-3v"+-Q+"h"+-Q+"v-3h"+(Q+3)+"ZM"+(X.r+3.5)+","+(X.b+.5-Q)+"h-3v"+Q+"h"+-Q+"v3h"+(Q+3)+"ZM"+(X.l-3.5)+","+(X.b+.5-Q)+"h3v"+Q+"h"+Q+"v3h-"+(Q+3)+"Z"}function oe(X,Q,le,se,he){for(var Te=!1,fe={},Ae={},ce,ye,Se,Me,J=(he||{}).xaHash,xe=(he||{}).yaHash,re=0;re<Q.length;re++){var ue=Q[re];for(ce in le)if(ue[ce]){for(Se in ue)!(he&&(J[Se]||xe[Se]))&&!(Se.charAt(0)==="x"?le:se)[Se]&&(fe[Se]=ce);for(ye in se)!(he&&(J[ye]||xe[ye]))&&ue[ye]&&(Te=!0)}for(ye in se)if(ue[ye])for(Me in ue)!(he&&(J[Me]||xe[Me]))&&!(Me.charAt(0)==="x"?le:se)[Me]&&(Ae[Me]=ye)}Te&&(e.extendFlat(fe,Ae),Ae={});var pe={},De=[];for(Se in fe){var $e=x(X,Se);De.push($e),pe[$e._id]=$e}var me={},ke=[];for(Me in Ae){var Ve=x(X,Me);ke.push(Ve),me[Ve._id]=Ve}return{xaHash:pe,yaHash:me,xaxes:De,yaxes:ke,xLinks:fe,yLinks:Ae,isSubplotConstrained:Te}}function _e(X,Q){if(!i)X.onwheel!==void 0?X.onwheel=Q:X.onmousewheel!==void 0?X.onmousewheel=Q:X.isAddedWheelEvent||(X.isAddedWheelEvent=!0,X.addEventListener("wheel",Q,{passive:!1}));else{var le=X.onwheel!==void 0?"wheel":"mousewheel";X._onwheel&&X.removeEventListener(le,X._onwheel),X._onwheel=Q,X.addEventListener(le,Q,{passive:!1})}}function de(X){var Q=[];for(var le in X)Q.push(X[le]);return Q}return gv={makeDragBox:N,makeDragger:H,makeRectDragger:F,makeZoombox:O,makeCorners:B,updateZoombox:G,xyCorners:te,transitionZoombox:j,removeZoombox:q,showDoubleClickNotifier:V,attachWheelEventHandler:_e},gv}var _0;function m2(){return _0||(_0=1,function(t){var e=gt,r=Na,a=ti,i=Ui,n=VE().makeDragBox,o=Yr.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 g=p._mainLinePosition;p.side!=="right"&&(g-=o),n(s,h,g,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,h,g,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,h,g,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)}}(Wu)),Wu}var xs={},w0=lt,XE=function(e){for(var r=w0.layoutArrayContainers,a=w0.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:""}},YE=Sn,bv=Oh,hl=Uo,WE=Uh.sorterAsc,xv=lt;xs.containerArrayMatch=XE;var qE=xs.isAddVal=function(e){return e==="add"||YE(e)},T0=xs.isRemoveVal=function(e){return e===null||e==="remove"};xs.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=xv.getComponentMethod(o,"supplyLayoutDefaults"),s=xv.getComponentMethod(o,"draw"),f=xv.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===bv||s===bv,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(T0(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(WE),p=r.get(),m=p||[],y=n(v,o).get(),g=[],w=-1,b=m.length,x,_,k,T,S,C,L,E;for(x=0;x<d.length;x++){if(k=d[x],T=a[k],S=Object.keys(T),C=T[""],L=qE(C),k<0||k>m.length-(L?0:1)){hl.warn("index out of range",o,k);continue}if(C!==void 0)S.length>1&&hl.warn("Insertion & removal are incompatible with edits to the same index.",o,k),T0(C)?g.push(k):L?(C==="add"&&(C={}),m.splice(k,0,C),y&&y.splice(k,0,{})):hl.warn("Unrecognized full object edit value",o,k,C),w===-1&&(w=k);else for(_=0;_<S.length;_++)E=o+"["+k+"].",n(m[k],S[_],E).set(T[S[_]])}for(x=g.length-1;x>=0;x--)m.splice(g[x],1),y&&y.splice(g[x],1);if(m.length?p||r.set(m):r.set(null),c)return!1;if(l(u,v),f!==bv){var R;if(w===-1)R=d;else{for(b=Math.max(m.length,b),R=[],x=0;x<d.length&&(k=d[x],!(k>=w));x++)R.push(k);for(x=w;x<b;x++)R.push(x)}for(x=0;x<R.length;x++)f(e,R[x])}else s(e);return!0};var y2={};(function(t){var e=wt,r=MM,a=lt,i=ge,n=vr,o=sr,l=pt,s=o.cleanId,f=o.getFromTrace,c=a.traceIs;t.clearPromiseQueue=function(b){Array.isArray(b._promises)&&b._promises.length>0&&i.log("Clearing previous rejected promises from queue."),b._promises=[]},t.cleanLayout=function(b){var x,_;b||(b={}),b.xaxis1&&(b.xaxis||(b.xaxis=b.xaxis1),delete b.xaxis1),b.yaxis1&&(b.yaxis||(b.yaxis=b.yaxis1),delete b.yaxis1),b.scene1&&(b.scene||(b.scene=b.scene1),delete b.scene1);var k=(n.subplotsRegistry.cartesian||{}).attrRegex,T=(n.subplotsRegistry.polar||{}).attrRegex,S=(n.subplotsRegistry.ternary||{}).attrRegex,C=(n.subplotsRegistry.gl3d||{}).attrRegex,L=Object.keys(b);for(x=0;x<L.length;x++){var E=L[x];if(k&&k.test(E)){var R=b[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=b[E];v(N.radialaxis)}else if(S&&S.test(E)){var H=b[E];v(H.aaxis),v(H.baxis),v(H.caxis)}else if(C&&C.test(E)){var F=b[E],$=F.cameraposition;if(Array.isArray($)&&$[0].length===4){var M=$[0],A=$[1],D=$[2],P=r([],M),I=[];for(_=0;_<3;++_)I[_]=A[_]+D*P[2+4*_];F.camera={eye:{x:I[0],y:I[1],z:I[2]},center:{x:A[0],y:A[1],z:A[2]},up:{x:0,y:0,z:1}},delete F.cameraposition}v(F.xaxis),v(F.yaxis),v(F.zaxis)}}var O=Array.isArray(b.annotations)?b.annotations.length:0;for(x=0;x<O;x++){var B=b.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(b.shapes)?b.shapes.length:0;for(x=0;x<G;x++){var j=b.shapes[x];i.isPlainObject(j)&&(u(j,"xref"),u(j,"yref"))}var q=Array.isArray(b.images)?b.images.length:0;for(x=0;x<q;x++){var V=b.images[x];i.isPlainObject(V)&&(u(V,"xref"),u(V,"yref"))}var K=b.legend;return K&&(K.x>3?(K.x=1.02,K.xanchor="left"):K.x<-2&&(K.x=-.02,K.xanchor="right"),K.y>3?(K.y=1.02,K.yanchor="bottom"):K.y<-2&&(K.y=-.02,K.yanchor="top")),v(b),b.dragmode==="rotate"&&(b.dragmode="orbit"),l.clean(b),b.template&&b.template.layout&&t.cleanLayout(b.template.layout),b};function u(b,x){var _=b[x],k=x.charAt(0);_&&_!=="paper"&&(b[x]=s(_,k,!0))}function v(b){b&&((typeof b.title=="string"||typeof b.title=="number")&&(b.title={text:b.title}),x("titlefont","font"),x("titleposition","position"),x("titleside","side"),x("titleoffset","offset"));function x(_,k){var T=b[_],S=b.title&&b.title[k];T&&!S&&(b.title||(b.title={}),b.title[k]=b[_],delete b[_])}}t.cleanData=function(b){for(var x=0;x<b.length;x++){var _=b[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 C=a.getModule(_);if(C&&C.colorbar){var L=C.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),M=h(_.decreasing);if($!==!1&&M!==!1){var A=d($,M,H,F);A&&(_.name=A)}else($||M)&&!_.name&&(_.name=$||M)}if(Array.isArray(_.transforms)){var D=_.transforms;for(k=0;k<D.length;k++){var P=D[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,O=Object.keys(I);P.styles=[];for(var B=0;B<O.length;B++)P.styles.push({target:O[B],value:I[O[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(b){if(!i.isPlainObject(b))return!1;var x=b.name;return delete b.name,delete b.showlegend,(typeof x=="string"||typeof x=="number")&&String(x)}function d(b,x,_,k){if(_&&!k)return b;if(k&&!_||!b.trim())return x;if(!x.trim())return b;var T=Math.min(b.length,x.length),S;for(S=0;S<T&&b.charAt(S)===x.charAt(S);S++);var C=b.substr(0,S);return C.trim()}function p(b){var x="middle",_="center";return typeof b=="string"&&(b.indexOf("top")!==-1?x="top":b.indexOf("bottom")!==-1&&(x="bottom"),b.indexOf("left")!==-1?_="left":b.indexOf("right")!==-1&&(_="right")),x+" "+_}function m(b,x){return x in b&&typeof b[x]=="object"&&Object.keys(b[x]).length===0}t.swapXYData=function(b){var x;if(i.swapAttrs(b,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(b.z)&&Array.isArray(b.z[0])&&(b.transpose?delete b.transpose:b.transpose=!0),b.error_x&&b.error_y){var _=b.error_y,k="copy_ystyle"in _?_.copy_ystyle:!(_.color||_.thickness||_.width);i.swapAttrs(b,["error_?.copy_ystyle"]),k&&i.swapAttrs(b,["error_?.color","error_?.thickness","error_?.width"])}if(typeof b.hoverinfo=="string"){var T=b.hoverinfo.split("+");for(x=0;x<T.length;x++)T[x]==="x"?T[x]="y":T[x]==="y"&&(T[x]="x");b.hoverinfo=T.join("+")}},t.coerceTraceIndices=function(b,x){if(e(x))return[x];if(!Array.isArray(x)||!x.length)return b.data.map(function(T,S){return S});if(Array.isArray(x)){for(var _=[],k=0;k<x.length;k++)i.isIndex(x[k],b.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(b,x,_){var k=b.obj,T=b.parts,S=T.length,C=T[S-1],L=e(C);if(L&&x===null){var E=T.slice(0,S-1).join("."),R=i.nestedProperty(k,E).get();R.splice(C,1)}else L&&b.get()===void 0&&b.get()===void 0&&(_[b.astr]=null),b.set(x)};var y=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function g(b){var x=b.search(y);if(x>0)return b.substr(0,x)}t.hasParent=function(b,x){for(var _=g(x);_;){if(_ in b)return!0;_=g(_)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(b,x,_){for(var k=0;k<x.length;k++)for(var T=b._fullData[k],S=0;S<3;S++){var C=f(b,T,w[S]);if(C&&C.type!=="log"){var L=C._name,E=C._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(b.layout,R).set(null)}}}})(y2);(function(t){var e=gt,r=wt,a=Y1,i=ge,n=i.nestedProperty,o=hs,l=jL,s=lt,f=Yo,c=vr,u=Bt,v=Kw,h=Ja,d=$t,p=pt,m=m2().initInteractions,y=Pn,g=Rl.clearOutline,w=Go.dfltConfig,b=xs,x=y2,_=eu,k=Za,T=Yr.AX_NAME_PATTERN,S=0,C=5;function L(z,W,U,Z){var ne;if(z=i.getGraphDiv(z),o.init(z),i.isPlainObject(W)){var ie=W;W=ie.data,U=ie.layout,Z=ie.config,ne=ie.frames}var Le=o.triggerHandler(z,"plotly_beforeplot",[W,U,Z]);if(Le===!1)return Promise.reject();!W&&!U&&!i.isPlotDiv(z)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",z);function we(){if(ne)return t.addFrames(z,ne)}F(z,Z),U||(U={}),e.select(z).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(z._promises)||(z._promises=[]);var ve=(z.data||[]).length===0&&Array.isArray(W);Array.isArray(W)&&(x.cleanData(W),ve?z.data=W:z.data.push.apply(z.data,W),z.empty=!1),(!z.layout||ve)&&(z.layout=x.cleanLayout(U)),c.supplyDefaults(z);var ee=z._fullLayout,Pe=ee._has("cartesian");ee._replotting=!0,(ve||ee._shouldCreateBgLayer)&&(Qe(z),ee._shouldCreateBgLayer&&delete ee._shouldCreateBgLayer),d.initGradients(z),d.initPatterns(z),ve&&u.saveShowSpikeInitial(z);var Re=!z.calcdata||z.calcdata.length!==(z._fullData||[]).length;Re&&c.doCalcdata(z);for(var He=0;He<z.calcdata.length;He++)z.calcdata[He][0].trace=z._fullData[He];z._context.responsive?z._responsiveChartHandler||(z._responsiveChartHandler=function(){i.isHidden(z)||c.resize(z)},window.addEventListener("resize",z._responsiveChartHandler)):i.clearResponsive(z);var tt=i.extendFlat({},ee._size),ft=0;function dt(){for(var ct=ee._basePlotModules,qe=0;qe<ct.length;qe++)ct[qe].drawFramework&&ct[qe].drawFramework(z);!ee._glcanvas&&ee._has("gl")&&(ee._glcanvas=ee._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Ze){return Ze.key}),ee._glcanvas.enter().append("canvas").attr("class",function(Ze){return"gl-canvas gl-canvas-"+Ze.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var Je=z._context.plotGlPixelRatio;if(ee._glcanvas){ee._glcanvas.attr("width",ee.width*Je).attr("height",ee.height*Je).style("width",ee.width+"px").style("height",ee.height+"px");var yt=ee._glcanvas.data()[0].regl;if(yt&&(Math.floor(ee.width*Je)!==yt._gl.drawingBufferWidth||Math.floor(ee.height*Je)!==yt._gl.drawingBufferHeight)){var Mt="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(ft)i.error(Mt);else return i.log(Mt+" Clearing graph and plotting again."),c.cleanPlot([],{},z._fullData,ee),c.supplyDefaults(z),ee=z._fullLayout,c.doCalcdata(z),ft++,dt()}}return ee.modebar.orientation==="h"?ee._modebardiv.style("height",null).style("width","100%"):ee._modebardiv.style("width",null).style("height",ee.height+"px"),c.previousPromises(z)}function at(){if(c.clearAutoMarginIds(z),_.drawMarginPushers(z),u.allowAutoMargin(z),z._fullLayout.title.text&&z._fullLayout.title.automargin&&c.allowAutoMargin(z,"title.automargin"),ee._has("pie"))for(var ct=z._fullData,qe=0;qe<ct.length;qe++){var Je=ct[qe];Je.type==="pie"&&Je.automargin&&c.allowAutoMargin(z,"pie."+Je.uid+".automargin")}return c.doAutoMargin(z),c.previousPromises(z)}function Rt(){if(c.didMarginChange(tt,ee._size))return i.syncOrAsync([at,_.layoutStyles],z)}function mt(){if(!Re){rt();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),rt],z)}function rt(){z._transitioning||(_.doAutoRangeAndConstraints(z),ve&&u.saveRangeInitial(z),s.getComponentMethod("rangeslider","calcAutorange")(z))}function Lt(){return u.draw(z,ve?"":"redraw")}var bt=[c.previousPromises,we,dt,at,Rt];Pe&&bt.push(mt),bt.push(_.layoutStyles),Pe&&bt.push(Lt,function(qe){var Je=qe._fullLayout._insideTickLabelsUpdaterange;if(Je)return qe._fullLayout._insideTickLabelsUpdaterange=void 0,he(qe,Je).then(function(){u.saveRangeInitial(qe,!0)})}),bt.push(_.drawData,_.finalDraw,m,c.addLinks,c.rehover,c.redrag,c.reselect,c.doAutoMargin,c.previousPromises);var ht=i.syncOrAsync(bt,z);return(!ht||!ht.then)&&(ht=Promise.resolve()),ht.then(function(){return E(z),z})}function E(z){var W=z._fullLayout;W._redrawFromAutoMarginCount?W._redrawFromAutoMarginCount--:z.emit("plotly_afterplot")}function R(z){return i.extendFlat(w,z)}function N(z,W){try{z._fullLayout._paper.style("background",W)}catch(U){i.error(U)}}function H(z,W){var U=p.combine(W,"white");N(z,U)}function F(z,W){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 Z=z._context,ne,ie,Le;if(W){for(ie=Object.keys(W),ne=0;ne<ie.length;ne++)Le=ie[ne],!(Le==="editable"||Le==="edits")&&Le in Z&&(Le==="setBackground"&&W[Le]==="opaque"?Z[Le]=H:Z[Le]=W[Le]);W.plot3dPixelRatio&&!Z.plotGlPixelRatio&&(Z.plotGlPixelRatio=Z.plot3dPixelRatio);var we=W.editable;if(we!==void 0)for(Z.editable=we,ie=Object.keys(Z.edits),ne=0;ne<ie.length;ne++)Z.edits[ie[ne]]=we;if(W.edits)for(ie=Object.keys(W.edits),ne=0;ne<ie.length;ne++)Le=ie[ne],Le in Z.edits&&(Z.edits[Le]=W.edits[Le]);Z._exportedPlot=W._exportedPlot}Z.staticPlot&&(Z.editable=!1,Z.edits={},Z.autosizable=!1,Z.scrollZoom=!1,Z.doubleClick=!1,Z.showTips=!1,Z.showLink=!1,Z.displayModeBar=!1),Z.displayModeBar==="hover"&&!a&&(Z.displayModeBar=!0),(Z.setBackground==="transparent"||typeof Z.setBackground!="function")&&(Z.setBackground=N),Z._hasZeroHeight=Z._hasZeroHeight||z.clientHeight===0,Z._hasZeroWidth=Z._hasZeroWidth||z.clientWidth===0;var ve=Z.scrollZoom,ee=Z._scrollZoom={};if(ve===!0)ee.cartesian=1,ee.gl3d=1,ee.geo=1,ee.mapbox=1;else if(typeof ve=="string"){var Pe=ve.split("+");for(ne=0;ne<Pe.length;ne++)ee[Pe[ne]]=1}else ve!==!1&&(ee.gl3d=1,ee.geo=1,ee.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 M(z,W,U,Z){return z=i.getGraphDiv(z),c.cleanPlot([],{},z._fullData||[],z._fullLayout||{}),c.purge(z),t._doPlot(z,W,U,Z)}function A(z,W){var U=W+1,Z=[],ne,ie;for(ne=0;ne<z.length;ne++)ie=z[ne],ie<0?Z.push(U+ie):Z.push(ie);return Z}function D(z,W,U){var Z,ne;for(Z=0;Z<W.length;Z++){if(ne=W[Z],ne!==parseInt(ne,10))throw new Error("all values in "+U+" must be integers");if(ne>=z.data.length||ne<-z.data.length)throw new Error(U+" must be valid indices for gd.data.");if(W.indexOf(ne,Z+1)>-1||ne>=0&&W.indexOf(-z.data.length+ne)>-1||ne<0&&W.indexOf(z.data.length+ne)>-1)throw new Error("each index in "+U+" must be unique.")}}function P(z,W,U){if(!Array.isArray(z.data))throw new Error("gd.data must be an array.");if(typeof W>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(W)||(W=[W]),D(z,W,"currentIndices"),typeof U<"u"&&!Array.isArray(U)&&(U=[U]),typeof U<"u"&&D(z,U,"newIndices"),typeof U<"u"&&W.length!==U.length)throw new Error("current and new indices must be of equal length.")}function I(z,W,U){var Z,ne;if(!Array.isArray(z.data))throw new Error("gd.data must be an array.");if(typeof W>"u")throw new Error("traces must be defined.");for(Array.isArray(W)||(W=[W]),Z=0;Z<W.length;Z++)if(ne=W[Z],typeof ne!="object"||Array.isArray(ne)||ne===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!==W.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function O(z,W,U,Z){var ne=i.isPlainObject(Z);if(!Array.isArray(z.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(W))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");D(z,U,"indices");for(var ie in W){if(!Array.isArray(W[ie])||W[ie].length!==U.length)throw new Error("attribute "+ie+" must be an array of length equal to indices array length");if(ne&&(!(ie in Z)||!Array.isArray(Z[ie])||Z[ie].length!==W[ie].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,W,U,Z){var ne=i.isPlainObject(Z),ie=[],Le,we,ve,ee,Pe;Array.isArray(U)||(U=[U]),U=A(U,z.data.length-1);for(var Re in W)for(var He=0;He<U.length;He++){if(Le=z.data[U[He]],ve=n(Le,Re),we=ve.get(),ee=W[Re][He],!i.isArrayOrTypedArray(ee))throw new Error("attribute: "+Re+" index: "+He+" must be an array");if(!i.isArrayOrTypedArray(we))throw new Error("cannot extend missing or non-array attribute: "+Re);if(we.constructor!==ee.constructor)throw new Error("cannot extend array with an array of a different type: "+Re);Pe=ne?Z[Re][He]:Z,r(Pe)||(Pe=-1),ie.push({prop:ve,target:we,insert:ee,maxp:Math.floor(Pe)})}return ie}function G(z,W,U,Z,ne){O(z,W,U,Z);for(var ie=B(z,W,U,Z),Le={},we={},ve=0;ve<ie.length;ve++){var ee=ie[ve].prop,Pe=ie[ve].maxp,Re=ne(ie[ve].target,ie[ve].insert,Pe);ee.set(Re[0]),Array.isArray(Le[ee.astr])||(Le[ee.astr]=[]),Le[ee.astr].push(Re[1]),Array.isArray(we[ee.astr])||(we[ee.astr]=[]),we[ee.astr].push(ie[ve].target.length)}return{update:Le,maxPoints:we}}function j(z,W){var U=new z.constructor(z.length+W.length);return U.set(z),U.set(W,z.length),U}function q(z,W,U,Z){z=i.getGraphDiv(z);function ne(ve,ee,Pe){var Re,He;if(i.isTypedArray(ve))if(Pe<0){var tt=new ve.constructor(0),ft=j(ve,ee);Pe<0?(Re=ft,He=tt):(Re=tt,He=ft)}else if(Re=new ve.constructor(Pe),He=new ve.constructor(ve.length+ee.length-Pe),Pe===ee.length)Re.set(ee),He.set(ve);else if(Pe<ee.length){var dt=ee.length-Pe;Re.set(ee.subarray(dt)),He.set(ve),He.set(ee.subarray(0,dt),ve.length)}else{var at=Pe-ee.length,Rt=ve.length-at;Re.set(ve.subarray(Rt)),Re.set(ee,at),He.set(ve.subarray(0,Rt))}else Re=ve.concat(ee),He=Pe>=0&&Pe<Re.length?Re.splice(0,Re.length-Pe):[];return[Re,He]}var ie=G(z,W,U,Z,ne),Le=t.redraw(z),we=[z,ie.update,U,ie.maxPoints];return l.add(z,t.prependTraces,we,q,arguments),Le}function V(z,W,U,Z){z=i.getGraphDiv(z);function ne(ve,ee,Pe){var Re,He;if(i.isTypedArray(ve))if(Pe<=0){var tt=new ve.constructor(0),ft=j(ee,ve);Pe<0?(Re=ft,He=tt):(Re=tt,He=ft)}else if(Re=new ve.constructor(Pe),He=new ve.constructor(ve.length+ee.length-Pe),Pe===ee.length)Re.set(ee),He.set(ve);else if(Pe<ee.length){var dt=ee.length-Pe;Re.set(ee.subarray(0,dt)),He.set(ee.subarray(dt)),He.set(ve,dt)}else{var at=Pe-ee.length;Re.set(ee),Re.set(ve.subarray(0,at),ee.length),He.set(ve.subarray(at))}else Re=ee.concat(ve),He=Pe>=0&&Pe<Re.length?Re.splice(Pe,Re.length):[];return[Re,He]}var ie=G(z,W,U,Z,ne),Le=t.redraw(z),we=[z,ie.update,U,ie.maxPoints];return l.add(z,t.extendTraces,we,V,arguments),Le}function K(z,W,U){z=i.getGraphDiv(z);var Z=[],ne=t.deleteTraces,ie=K,Le=[z,Z],we=[z,W],ve,ee;for(I(z,W,U),Array.isArray(W)||(W=[W]),W=W.map(function(Pe){return i.extendFlat({},Pe)}),x.cleanData(W),ve=0;ve<W.length;ve++)z.data.push(W[ve]);for(ve=0;ve<W.length;ve++)Z.push(-W.length+ve);if(typeof U>"u")return ee=t.redraw(z),l.add(z,ne,Le,ie,we),ee;Array.isArray(U)||(U=[U]);try{P(z,Z,U)}catch(Pe){throw z.data.splice(z.data.length-W.length,W.length),Pe}return l.startSequence(z),l.add(z,ne,Le,ie,we),ee=t.moveTraces(z,Z,U),l.stopSequence(z),ee}function Y(z,W){z=i.getGraphDiv(z);var U=[],Z=t.addTraces,ne=Y,ie=[z,U,W],Le=[z,W],we,ve;if(typeof W>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(W)||(W=[W]),D(z,W,"indices"),W=A(W,z.data.length-1),W.sort(i.sorterDes),we=0;we<W.length;we+=1)ve=z.data.splice(W[we],1)[0],U.push(ve);var ee=t.redraw(z);return l.add(z,Z,ie,ne,Le),ee}function te(z,W,U){z=i.getGraphDiv(z);var Z=[],ne=[],ie=te,Le=te,we=[z,U,W],ve=[z,W,U],ee;if(P(z,W,U),W=Array.isArray(W)?W:[W],typeof U>"u")for(U=[],ee=0;ee<W.length;ee++)U.push(-W.length+ee);for(U=Array.isArray(U)?U:[U],W=A(W,z.data.length-1),U=A(U,z.data.length-1),ee=0;ee<z.data.length;ee++)W.indexOf(ee)===-1&&Z.push(z.data[ee]);for(ee=0;ee<W.length;ee++)ne.push({newIndex:U[ee],trace:z.data[W[ee]]});for(ne.sort(function(Re,He){return Re.newIndex-He.newIndex}),ee=0;ee<ne.length;ee+=1)Z.splice(ne[ee].newIndex,0,ne[ee].trace);z.data=Z;var Pe=t.redraw(z);return l.add(z,ie,we,Le,ve),Pe}function oe(z,W,U,Z){z=i.getGraphDiv(z),x.clearPromiseQueue(z);var ne={};if(typeof W=="string")ne[W]=U;else if(i.isPlainObject(W))ne=i.extendFlat({},W),Z===void 0&&(Z=U);else return i.warn("Restyle fail.",W,U,Z),Promise.reject();Object.keys(ne).length&&(z.changed=!0);var ie=x.coerceTraceIndices(z,Z),Le=le(z,ne,ie),we=Le.flags;we.calc&&(z.calcdata=void 0),we.clearAxisTypes&&x.clearAxisTypes(z,ie,{});var ve=[];we.fullReplot?ve.push(t._doPlot):(ve.push(c.previousPromises),c.supplyDefaults(z),we.markerSize&&(c.doCalcdata(z),fe(ve)),we.style&&ve.push(_.doTraceStyle),we.colorbars&&ve.push(_.doColorBars),ve.push(E)),ve.push(c.rehover,c.redrag,c.reselect),l.add(z,oe,[z,Le.undoit,Le.traces],oe,[z,Le.redoit,Le.traces]);var ee=i.syncOrAsync(ve,z);return(!ee||!ee.then)&&(ee=Promise.resolve()),ee.then(function(){return z.emit("plotly_restyle",Le.eventData),z})}function _e(z){return z===void 0?null:z}function de(z,W){return W?function(U,Z,ne){var ie=n(U,Z),Le=ie.set;return ie.set=function(we){var ve=(ne||"")+Z;X(ve,ie.get(),we,z),Le(we)},ie}:n}function X(z,W,U,Z){if(Array.isArray(W)||Array.isArray(U))for(var ne=Array.isArray(W)?W:[],ie=Array.isArray(U)?U:[],Le=Math.max(ne.length,ie.length),we=0;we<Le;we++)X(z+"["+we+"]",ne[we],ie[we],Z);else if(i.isPlainObject(W)||i.isPlainObject(U)){var ve=i.isPlainObject(W)?W:{},ee=i.isPlainObject(U)?U:{},Pe=i.extendFlat({},ve,ee);for(var Re in Pe)X(z+"."+Re,ve[Re],ee[Re],Z)}else Z[z]===void 0&&(Z[z]=_e(W))}function Q(z,W,U){for(var Z in U){var ne=n(z,Z);X(Z,ne.get(),U[Z],W)}}function le(z,W,U){var Z=z._fullLayout,ne=z._fullData,ie=z.data,Le=Z._guiEditing,we=de(Z._preGUI,Le),ve=i.extendDeepAll({},W),ee;se(W);var Pe=k.traceFlags(),Re={},He={},tt;function ft(){return U.map(function(){})}function dt(jt){var At=u.id2name(jt);tt.indexOf(At)===-1&&tt.push(At)}function at(jt){return"LAYOUT"+jt+".autorange"}function Rt(jt){return"LAYOUT"+jt+".range"}function mt(jt){for(var At=jt;At<ne.length;At++)if(ne[At]._input===ie[jt])return ne[At]}function rt(jt,At,Ut){if(Array.isArray(jt)){jt.forEach(function(qr){rt(qr,At,Ut)});return}if(!(jt in W||x.hasParent(W,jt))){var wr;if(jt.substr(0,6)==="LAYOUT")wr=we(z.layout,jt.replace("LAYOUT",""));else{var Tr=U[Ut],$r=Z._tracePreGUI[mt(Tr)._fullInput.uid];wr=de($r,Le)(ie[Tr],jt)}jt in He||(He[jt]=ft()),He[jt][Ut]===void 0&&(He[jt][Ut]=_e(wr.get())),At!==void 0&&wr.set(At)}}function Lt(jt){return function(At){return ne[At][jt]}}function bt(jt){return function(At,Ut){return At===!1?ne[U[Ut]][jt]:null}}for(var ht in W){if(x.hasParent(W,ht))throw new Error("cannot set "+ht+" and a parent attribute simultaneously");var ct=W[ht],qe,Je,yt,Mt,Ze,Ct;if((ht==="autobinx"||ht==="autobiny")&&(ht=ht.charAt(ht.length-1)+"bins",Array.isArray(ct)?ct=ct.map(bt(ht)):ct===!1?ct=U.map(Lt(ht)):ct=null),Re[ht]=ct,ht.substr(0,6)==="LAYOUT"){yt=we(z.layout,ht.replace("LAYOUT","")),He[ht]=[_e(yt.get())],yt.set(Array.isArray(ct)?ct[0]:ct),Pe.calc=!0;continue}for(He[ht]=ft(),ee=0;ee<U.length;ee++){qe=ie[U[ee]],Je=mt(U[ee]);var zt=Z._tracePreGUI[Je._fullInput.uid];if(yt=de(zt,Le)(qe,ht),Mt=yt.get(),Ze=Array.isArray(ct)?ct[ee%ct.length]:ct,Ze!==void 0){var gr=yt.parts[yt.parts.length-1],hr=ht.substr(0,ht.length-gr.length-1),Ur=hr?hr+".":"",Sr=hr?n(Je,hr).get():Je;if(Ct=f.getTraceValObject(Je,yt.parts),Ct&&Ct.impliedEdits&&Ze!==null)for(var Ge in Ct.impliedEdits)rt(i.relativeAttr(ht,Ge),Ct.impliedEdits[Ge],ee);else if((gr==="thicknessmode"||gr==="lenmode")&&Mt!==Ze&&(Ze==="fraction"||Ze==="pixels")&&Sr){var Fe=Z._size,ot=Sr.orient,st=ot==="top"||ot==="bottom";if(gr==="thicknessmode"){var Ke=st?Fe.h:Fe.w;rt(Ur+"thickness",Sr.thickness*(Ze==="fraction"?1/Ke:Ke),ee)}else{var et=st?Fe.w:Fe.h;rt(Ur+"len",Sr.len*(Ze==="fraction"?1/et:et),ee)}}else if(ht==="type"&&(Ze==="pie"!=(Mt==="pie")||Ze==="funnelarea"!=(Mt==="funnelarea"))){var nt="x",_t="y";(Ze==="bar"||Mt==="bar")&&qe.orientation==="h"&&(nt="y",_t="x"),i.swapAttrs(qe,["?","?src"],"labels",nt),i.swapAttrs(qe,["d?","?0"],"label",nt),i.swapAttrs(qe,["?","?src"],"values",_t),Mt==="pie"||Mt==="funnelarea"?(n(qe,"marker.color").set(n(qe,"marker.colors").get()),Z._pielayer.selectAll("g.trace").remove()):s.traceIs(qe,"cartesian")&&n(qe,"marker.colors").set(n(qe,"marker.color").get())}He[ht][ee]=_e(Mt);var kt=["swapxy","swapxyaxes","orientation","orientationaxes"];if(kt.indexOf(ht)!==-1){if(ht==="orientation"){yt.set(Ze);var qt=qe.x&&!qe.y?"h":"v";if((yt.get()||qt)===Je.orientation)continue}else ht==="orientationaxes"&&(qe.orientation={v:"h",h:"v"}[Je.orientation]);x.swapXYData(qe),Pe.calc=Pe.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(yt.parts[0])!==-1?(x.manageArrayContainers(yt,Ze,He),Pe.calc=!0):(Ct?Ct.arrayOk&&!s.traceIs(Je,"regl")&&(i.isArrayOrTypedArray(Ze)||i.isArrayOrTypedArray(Mt))?Pe.calc=!0:k.update(Pe,Ct):Pe.calc=!0,yt.set(Ze))}}if(["swapxyaxes","orientationaxes"].indexOf(ht)!==-1&&u.swap(z,U),ht==="orientationaxes"){var Gt=n(z.layout,"hovermode"),er=Gt.get();er==="x"?Gt.set("y"):er==="y"?Gt.set("x"):er==="x unified"?Gt.set("y unified"):er==="y unified"&&Gt.set("x unified")}if(["orientation","type"].indexOf(ht)!==-1){for(tt=[],ee=0;ee<U.length;ee++){var zr=ie[U[ee]];s.traceIs(zr,"cartesian")&&(dt(zr.xaxis||"x"),dt(zr.yaxis||"y"))}rt(tt.map(at),!0,0),rt(tt.map(Rt),[0,1],0)}}return(Pe.calc||Pe.plot)&&(Pe.fullReplot=!0),{flags:Pe,undoit:He,redoit:Re,traces:U,eventData:i.extendDeepNoArrays([],[ve,U])}}function se(z){var W=i.counterRegex("axis",".title",!1,!1),U=/colorbar\.title$/,Z=Object.keys(z),ne,ie,Le;for(ne=0;ne<Z.length;ne++)ie=Z[ne],Le=z[ie],(ie==="title"||W.test(ie)||U.test(ie))&&(typeof Le=="string"||typeof Le=="number")?we(ie,ie.replace("title","title.text")):ie.indexOf("titlefont")>-1&&ie.indexOf("grouptitlefont")===-1?we(ie,ie.replace("titlefont","title.font")):ie.indexOf("titleposition")>-1?we(ie,ie.replace("titleposition","title.position")):ie.indexOf("titleside")>-1?we(ie,ie.replace("titleside","title.side")):ie.indexOf("titleoffset")>-1&&we(ie,ie.replace("titleoffset","title.offset"));function we(ve,ee){z[ee]=z[ve],delete z[ve]}}function he(z,W,U){z=i.getGraphDiv(z),x.clearPromiseQueue(z);var Z={};if(typeof W=="string")Z[W]=U;else if(i.isPlainObject(W))Z=i.extendFlat({},W);else return i.warn("Relayout fail.",W,U),Promise.reject();Object.keys(Z).length&&(z.changed=!0);var ne=Se(z,Z),ie=ne.flags;ie.calc&&(z.calcdata=void 0);var Le=[c.previousPromises];ie.layoutReplot?Le.push(_.layoutReplot):Object.keys(Z).length&&(Te(z,ie,ne)||c.supplyDefaults(z),ie.legend&&Le.push(_.doLegend),ie.layoutstyle&&Le.push(_.layoutStyles),ie.axrange&&fe(Le,ne.rangesAltered),ie.ticks&&Le.push(_.doTicksRelayout),ie.modebar&&Le.push(_.doModeBar),ie.camera&&Le.push(_.doCamera),ie.colorbars&&Le.push(_.doColorBars),Le.push(E)),Le.push(c.rehover,c.redrag,c.reselect),l.add(z,he,[z,ne.undoit],he,[z,ne.redoit]);var we=i.syncOrAsync(Le,z);return(!we||!we.then)&&(we=Promise.resolve(z)),we.then(function(){return z.emit("plotly_relayout",ne.eventData),z})}function Te(z,W,U){var Z=z._fullLayout;if(!W.axrange)return!1;for(var ne in W)if(ne!=="axrange"&&W[ne])return!1;var ie,Le,we=function(tt,ft){return i.coerce(ie,Le,h,tt,ft)},ve={};for(var ee in U.rangesAltered){var Pe=u.id2name(ee);if(ie=z.layout[Pe],Le=Z[Pe],v(ie,Le,we,ve),Le._matchGroup){for(var Re in Le._matchGroup)if(Re!==ee){var He=Z[u.id2name(Re)];He.autorange=Le.autorange,He.range=Le.range.slice(),He._input.range=Le.range.slice()}}}return!0}function fe(z,W){var U=W?function(Z){var ne=[],ie=!0;for(var Le in W){var we=u.getFromId(Z,Le);if(ne.push(Le),(we.ticklabelposition||"").indexOf("inside")!==-1&&we._anchorAxis&&ne.push(we._anchorAxis._id),we._matchGroup)for(var ve in we._matchGroup)W[ve]||ne.push(ve)}return u.draw(Z,ne,{skipTitle:ie})}:function(Z){return u.draw(Z,"redraw")};z.push(g,_.doAutoRangeAndConstraints,U,_.drawData,_.finalDraw)}var Ae=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ce=/^[xyz]axis[0-9]*\.autorange$/,ye=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Se(z,W){var U=z.layout,Z=z._fullLayout,ne=Z._guiEditing,ie=de(Z._preGUI,ne),Le=Object.keys(W),we=u.list(z),ve=i.extendDeepAll({},W),ee={},Pe,Re,He;for(se(W),Le=Object.keys(W),Re=0;Re<Le.length;Re++)if(Le[Re].indexOf("allaxes")===0){for(He=0;He<we.length;He++){var tt=we[He]._id.substr(1),ft=tt.indexOf("scene")!==-1?tt+".":"",dt=Le[Re].replace("allaxes",ft+we[He]._name);W[dt]||(W[dt]=W[Le[Re]])}delete W[Le[Re]]}var at=k.layoutFlags(),Rt={},mt={};function rt($r,qr){if(Array.isArray($r)){$r.forEach(function(Jo){rt(Jo,qr)});return}if(!($r in W||x.hasParent(W,$r))){var Ma=ie(U,$r);$r in mt||(mt[$r]=_e(Ma.get())),qr!==void 0&&Ma.set(qr)}}var Lt={},bt;function ht($r){var qr=u.name2id($r.split(".")[0]);return Lt[qr]=1,qr}for(var ct in W){if(x.hasParent(W,ct))throw new Error("cannot set "+ct+" and a parent attribute simultaneously");for(var qe=ie(U,ct),Je=W[ct],yt=qe.parts.length,Mt=yt-1;Mt>0&&typeof qe.parts[Mt]!="string";)Mt--;var Ze=qe.parts[Mt],Ct=qe.parts[Mt-1]+"."+Ze,zt=qe.parts.slice(0,Mt).join("."),gr=n(z.layout,zt).get(),hr=n(Z,zt).get(),Ur=qe.get();if(Je!==void 0){Rt[ct]=Je,mt[ct]=Ze==="reverse"?Je:_e(Ur);var Sr=f.getLayoutValObject(Z,qe.parts);if(Sr&&Sr.impliedEdits&&Je!==null)for(var Ge in Sr.impliedEdits)rt(i.relativeAttr(ct,Ge),Sr.impliedEdits[Ge]);if(["width","height"].indexOf(ct)!==-1)if(Je){rt("autosize",null);var Fe=ct==="height"?"width":"height";rt(Fe,Z[Fe])}else Z[ct]=z._initialAutoSize[ct];else if(ct==="autosize")rt("width",Je?null:Z.width),rt("height",Je?null:Z.height);else if(Ct.match(Ae))ht(Ct),n(Z,zt+"._inputRange").set(null);else if(Ct.match(ce)){ht(Ct),n(Z,zt+"._inputRange").set(null);var ot=n(Z,zt).get();ot._inputDomain&&(ot._input.domain=ot._inputDomain.slice())}else Ct.match(ye)&&n(Z,zt+"._inputDomain").set(null);if(Ze==="type"){bt=gr;var st=hr.type==="linear"&&Je==="log",Ke=hr.type==="log"&&Je==="linear";if(st||Ke){if(!bt||!bt.range)rt(zt+".autorange",!0);else if(hr.autorange)st&&(bt.range=bt.range[1]>bt.range[0]?[1,2]:[2,1]);else{var et=bt.range[0],nt=bt.range[1];st?(et<=0&&nt<=0&&rt(zt+".autorange",!0),et<=0?et=nt/1e6:nt<=0&&(nt=et/1e6),rt(zt+".range[0]",Math.log(et)/Math.LN10),rt(zt+".range[1]",Math.log(nt)/Math.LN10)):(rt(zt+".range[0]",Math.pow(10,et)),rt(zt+".range[1]",Math.pow(10,nt)))}Array.isArray(Z._subplots.polar)&&Z._subplots.polar.length&&Z[qe.parts[0]]&&qe.parts[1]==="radialaxis"&&delete Z[qe.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(z,hr,Je,rt),s.getComponentMethod("images","convertCoords")(z,hr,Je,rt)}else rt(zt+".autorange",!0),rt(zt+".range",null);n(Z,zt+"._inputRange").set(null)}else if(Ze.match(T)){var _t=n(Z,ct).get(),kt=(Je||{}).type;(!kt||kt==="-")&&(kt="linear"),s.getComponentMethod("annotations","convertCoords")(z,_t,kt,rt),s.getComponentMethod("images","convertCoords")(z,_t,kt,rt)}var qt=b.containerArrayMatch(ct);if(qt){Pe=qt.array,Re=qt.index;var Gt=qt.property,er=Sr||{editType:"calc"};Re!==""&&Gt===""&&(b.isAddVal(Je)?mt[ct]=null:b.isRemoveVal(Je)?mt[ct]=(n(U,Pe).get()||[])[Re]:i.warn("unrecognized full object value",W)),k.update(at,er),ee[Pe]||(ee[Pe]={});var zr=ee[Pe][Re];zr||(zr=ee[Pe][Re]={}),zr[Gt]=Je,delete W[ct]}else Ze==="reverse"?(gr.range?gr.range.reverse():(rt(zt+".autorange",!0),gr.range=[1,0]),hr.autorange?at.calc=!0:at.plot=!0):(ct==="dragmode"&&(Je===!1&&Ur!==!1||Je!==!1&&Ur===!1)||Z._has("scatter-like")&&Z._has("regl")&&ct==="dragmode"&&(Je==="lasso"||Je==="select")&&!(Ur==="lasso"||Ur==="select")||Z._has("gl2d")?at.plot=!0:Sr?k.update(at,Sr):at.calc=!0,qe.set(Je))}}for(Pe in ee){var jt=b.applyContainerArrayChanges(z,ie(U,Pe),ee[Pe],at,ie);jt||(at.plot=!0)}for(var At in Lt){bt=u.getFromId(z,At);var Ut=bt&&bt._constraintGroup;if(Ut){at.calc=!0;for(var wr in Ut)Lt[wr]||(u.getFromId(z,wr)._constraintShrinkable=!0)}}(Me(z)||W.height||W.width)&&(at.plot=!0);var Tr=Z.shapes;for(Re=0;Re<Tr.length;Re++)if(Tr[Re].showlegend){at.calc=!0;break}return(at.plot||at.calc)&&(at.layoutReplot=!0),{flags:at,rangesAltered:Lt,undoit:mt,redoit:Rt,eventData:ve}}function Me(z){var W=z._fullLayout,U=W.width,Z=W.height;return z.layout.autosize&&c.plotAutoSize(z,z.layout,W),W.width!==U||W.height!==Z}function J(z,W,U,Z){z=i.getGraphDiv(z),x.clearPromiseQueue(z),i.isPlainObject(W)||(W={}),i.isPlainObject(U)||(U={}),Object.keys(W).length&&(z.changed=!0),Object.keys(U).length&&(z.changed=!0);var ne=x.coerceTraceIndices(z,Z),ie=le(z,i.extendFlat({},W),ne),Le=ie.flags,we=Se(z,i.extendFlat({},U)),ve=we.flags;(Le.calc||ve.calc)&&(z.calcdata=void 0),Le.clearAxisTypes&&x.clearAxisTypes(z,ne,U);var ee=[];ve.layoutReplot?ee.push(_.layoutReplot):Le.fullReplot?ee.push(t._doPlot):(ee.push(c.previousPromises),Te(z,ve,we)||c.supplyDefaults(z),Le.style&&ee.push(_.doTraceStyle),(Le.colorbars||ve.colorbars)&&ee.push(_.doColorBars),ve.legend&&ee.push(_.doLegend),ve.layoutstyle&&ee.push(_.layoutStyles),ve.axrange&&fe(ee,we.rangesAltered),ve.ticks&&ee.push(_.doTicksRelayout),ve.modebar&&ee.push(_.doModeBar),ve.camera&&ee.push(_.doCamera),ee.push(E)),ee.push(c.rehover,c.redrag,c.reselect),l.add(z,J,[z,ie.undoit,we.undoit,ie.traces],J,[z,ie.redoit,we.redoit,ie.traces]);var Pe=i.syncOrAsync(ee,z);return(!Pe||!Pe.then)&&(Pe=Promise.resolve(z)),Pe.then(function(){return z.emit("plotly_update",{data:ie.eventData,layout:we.eventData}),z})}function xe(z){return function(U){U._fullLayout._guiEditing=!0;var Z=z.apply(null,arguments);return U._fullLayout._guiEditing=!1,Z}}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"}],ue=[{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 pe(z,W){for(var U=0;U<W.length;U++){var Z=W[U],ne=z.match(Z.pattern);if(ne){var ie=ne[1]||"";return{head:ie,tail:z.substr(ie.length+1),attr:Z.attr}}}}function De(z,W){var U=n(W,z).get();if(U!==void 0)return U;var Z=z.split(".");for(Z.pop();Z.length>1;)if(Z.pop(),U=n(W,Z.join(".")+".uirevision").get(),U!==void 0)return U;return W.uirevision}function $e(z,W){for(var U=0;U<W.length;U++)if(W[U]._fullInput.uid===z)return U;return-1}function me(z,W,U){for(var Z=0;Z<W.length;Z++)if(W[Z].uid===z)return Z;return!W[U]||W[U].uid?-1:U}function ke(z,W){var U=i.isPlainObject(z),Z=Array.isArray(z);return U||Z?(U&&i.isPlainObject(W)||Z&&Array.isArray(W))&&JSON.stringify(z)===JSON.stringify(W):z===W}function Ve(z,W,U,Z){var ne=Z._preGUI,ie,Le,we,ve,ee,Pe,Re,He,tt,ft,dt=[],at={},Rt={};for(ie in ne){if(ee=pe(ie,re),ee){if(tt=ee.head,ft=ee.tail,Le=ee.attr||tt+".uirevision",we=n(Z,Le).get(),ve=we&&De(Le,W),ve&&ve===we){if(Pe=ne[ie],Pe===null&&(Pe=void 0),Re=n(W,ie),He=Re.get(),ke(He,Pe)){He===void 0&&ft==="autorange"&&dt.push(tt),Re.set(_e(n(Z,ie).get()));continue}else if(ft==="autorange"||ft.substr(0,6)==="range["){var mt=ne[tt+".range[0]"],rt=ne[tt+".range[1]"],Lt=ne[tt+".autorange"];if(Lt||Lt===null&&mt===null&&rt===null){if(!(tt in at)){var bt=n(W,tt).get();at[tt]=bt&&(bt.autorange||bt.autorange!==!1&&(!bt.range||bt.range.length!==2))}if(at[tt]){Re.set(_e(n(Z,ie).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+ie);delete ne[ie],ee&&ee.tail.substr(0,6)==="range["&&(Rt[ee.head]=1)}for(var ht=0;ht<dt.length;ht++){var ct=dt[ht];if(Rt[ct]){var qe=n(W,ct).get();qe&&delete qe.autorange}}var Je=Z._tracePreGUI;for(var yt in Je){var Mt=Je[yt],Ze=null,Ct;for(ie in Mt){if(!Ze){var zt=$e(yt,U);if(zt<0){delete Je[yt];break}var gr=U[zt];Ct=gr._fullInput;var hr=me(yt,z,Ct.index);if(hr<0){delete Je[yt];break}Ze=z[hr]}if(ee=pe(ie,ue),ee){if(ee.attr?(we=n(Z,ee.attr).get(),ve=we&&De(ee.attr,W)):(we=Ct.uirevision,ve=Ze.uirevision,ve===void 0&&(ve=W.uirevision)),ve&&ve===we&&(Pe=Mt[ie],Pe===null&&(Pe=void 0),Re=n(Ze,ie),He=Re.get(),ke(He,Pe))){Re.set(_e(n(Ct,ie).get()));continue}}else i.warn("unrecognized GUI edit: "+ie+" in trace uid "+yt);delete Mt[ie]}}}function Ie(z,W,U,Z){var ne,ie;function Le(){return t.addFrames(z,ne)}z=i.getGraphDiv(z),x.clearPromiseQueue(z);var we=z._fullData,ve=z._fullLayout;if(!i.isPlotDiv(z)||!we||!ve)ie=t.newPlot(z,W,U,Z);else{if(i.isPlainObject(W)){var ee=W;W=ee.data,U=ee.layout,Z=ee.config,ne=ee.frames}var Pe=!1;if(Z){var Re=i.extendDeep({},z._context);z._context=void 0,F(z,Z),Pe=be(Re,z._context)}z.data=W||[],x.cleanData(z.data),z.layout=U||{},x.cleanLayout(z.layout),Ve(z.data,z.layout,we,ve),c.supplyDefaults(z,{skipUpdateCalc:!0});var He=z._fullData,tt=z._fullLayout,ft=tt.datarevision===void 0,dt=tt.transition,at=Xe(z,ve,tt,ft,dt),Rt=at.newDataRevision,mt=Oe(z,we,He,ft,dt,Rt);if(Me(z)&&(at.layoutReplot=!0),mt.calc||at.calc){z.calcdata=void 0;for(var rt=Object.getOwnPropertyNames(tt),Lt=0;Lt<rt.length;Lt++){var bt=rt[Lt],ht=bt.substring(0,5);if(ht==="xaxis"||ht==="yaxis"){var ct=tt[bt]._emptyCategories;ct&&ct()}}}else c.supplyDefaultsUpdateCalc(z.calcdata,He);var qe=[];if(ne&&(z._transitionData={},c.createTransitionData(z),qe.push(Le)),tt.transition&&!Pe&&(mt.anim||at.anim))at.ticks&&qe.push(_.doTicksRelayout),c.doCalcdata(z),_.doAutoRangeAndConstraints(z),qe.push(function(){return c.transitionFromReact(z,mt,at,ve)});else if(mt.fullReplot||at.layoutReplot||Pe)z._fullLayout._skipDefaults=!0,qe.push(t._doPlot);else{for(var Je in at.arrays){var yt=at.arrays[Je];if(yt.length){var Mt=s.getComponentMethod(Je,"drawOne");if(Mt!==i.noop)for(var Ze=0;Ze<yt.length;Ze++)Mt(z,yt[Ze]);else{var Ct=s.getComponentMethod(Je,"draw");if(Ct===i.noop)throw new Error("cannot draw components: "+Je);Ct(z)}}}qe.push(c.previousPromises),mt.style&&qe.push(_.doTraceStyle),(mt.colorbars||at.colorbars)&&qe.push(_.doColorBars),at.legend&&qe.push(_.doLegend),at.layoutstyle&&qe.push(_.layoutStyles),at.axrange&&fe(qe),at.ticks&&qe.push(_.doTicksRelayout),at.modebar&&qe.push(_.doModeBar),at.camera&&qe.push(_.doCamera),qe.push(E)}qe.push(c.rehover,c.redrag,c.reselect),ie=i.syncOrAsync(qe,z),(!ie||!ie.then)&&(ie=Promise.resolve(z))}return ie.then(function(){return z.emit("plotly_react",{data:W,layout:U}),z})}function Oe(z,W,U,Z,ne,ie){var Le=W.length===U.length;if(!ne&&!Le)return{fullReplot:!0,calc:!0};var we=k.traceFlags();we.arrays={},we.nChanges=0,we.nChangesAnim=0;var ve,ee;function Pe(tt){var ft=f.getTraceValObject(ee,tt);return!ee._module.animatable&&ft.anim&&(ft.anim=!1),ft}var Re={getValObject:Pe,flags:we,immutable:Z,transition:ne,newDataRevision:ie,gd:z},He={};for(ve=0;ve<W.length;ve++)if(U[ve]){if(ee=U[ve]._fullInput,c.hasMakesDataTransform(ee)&&(ee=U[ve]),He[ee.uid])continue;He[ee.uid]=1,it(W[ve]._fullInput,ee,[],Re)}return(we.calc||we.plot)&&(we.fullReplot=!0),ne&&we.nChanges&&we.nChangesAnim&&(we.anim=we.nChanges===we.nChangesAnim&&Le?"all":"some"),we}function Xe(z,W,U,Z,ne){var ie=k.layoutFlags();ie.arrays={},ie.rangesAltered={},ie.nChanges=0,ie.nChangesAnim=0;function Le(ve){return f.getLayoutValObject(U,ve)}var we={getValObject:Le,flags:ie,immutable:Z,transition:ne,gd:z};return it(W,U,[],we),(ie.plot||ie.calc)&&(ie.layoutReplot=!0),ne&&ie.nChanges&&ie.nChangesAnim&&(ie.anim=ie.nChanges===ie.nChangesAnim?"all":"some"),ie}function it(z,W,U,Z){var ne,ie,Le,we=Z.getValObject,ve=Z.flags,ee=Z.immutable,Pe=Z.inArray,Re=Z.arrayIndex;function He(){var zt=ne.editType;if(Pe&&zt.indexOf("arraydraw")!==-1){i.pushUnique(ve.arrays[Pe],Re);return}k.update(ve,ne),zt!=="none"&&ve.nChanges++,Z.transition&&ne.anim&&ve.nChangesAnim++,(Ae.test(Le)||ce.test(Le))&&(ve.rangesAltered[U[0]]=1),ye.test(Le)&&n(W,"_inputDomain").set(null),ie==="datarevision"&&(ve.newDataRevision=1)}function tt(zt){return zt.valType==="data_array"||zt.arrayOk}for(ie in z){if(ve.calc&&!Z.transition)return;var ft=z[ie],dt=W[ie],at=U.concat(ie);if(Le=at.join("."),!(ie.charAt(0)==="_"||typeof ft=="function"||ft===dt)){if((ie==="tick0"||ie==="dtick")&&U[0]!=="geo"){var Rt=W.tickmode;if(Rt==="auto"||Rt==="array"||!Rt)continue}if(!(ie==="range"&&W.autorange)&&!((ie==="zmin"||ie==="zmax")&&W.type==="contourcarpet")&&(ne=we(at),!!ne&&!(ne._compareAsJSON&&JSON.stringify(ft)===JSON.stringify(dt)))){var mt=ne.valType,rt,Lt=tt(ne),bt=Array.isArray(ft),ht=Array.isArray(dt);if(bt&&ht){var ct="_input_"+ie,qe=z[ct],Je=W[ct];if(Array.isArray(qe)&&qe===Je)continue}if(dt===void 0)Lt&&bt?ve.calc=!0:He();else if(ne._isLinkedToArray){var yt=[],Mt=!1;Pe||(ve.arrays[ie]=yt);var Ze=Math.min(ft.length,dt.length),Ct=Math.max(ft.length,dt.length);if(Ze!==Ct)if(ne.editType==="arraydraw")Mt=!0;else{He();continue}for(rt=0;rt<Ze;rt++)it(ft[rt],dt[rt],at.concat(rt),i.extendFlat({inArray:ie,arrayIndex:rt},Z));if(Mt)for(rt=Ze;rt<Ct;rt++)yt.push(rt)}else!mt&&i.isPlainObject(ft)?it(ft,dt,at,Z):Lt?bt&&ht?(ee&&(ve.calc=!0),(ee||Z.newDataRevision)&&He()):bt!==ht?ve.calc=!0:He():bt&&ht?(ft.length!==dt.length||String(ft)!==String(dt))&&He():He()}}}for(ie in W)if(!(ie in z||ie.charAt(0)==="_"||typeof W[ie]=="function"))if(ne=we(U.concat(ie)),tt(ne)&&Array.isArray(W[ie])){ve.calc=!0;return}else He()}function be(z,W){var U;for(U in z)if(U.charAt(0)!=="_"){var Z=z[U],ne=W[U];if(Z!==ne)if(i.isPlainObject(Z)&&i.isPlainObject(ne)){if(be(Z,ne))return!0}else if(Array.isArray(Z)&&Array.isArray(ne)){if(Z.length!==ne.length)return!0;for(var ie=0;ie<Z.length;ie++)if(Z[ie]!==ne[ie])if(i.isPlainObject(Z[ie])&&i.isPlainObject(ne[ie])){if(be(Z[ie],ne[ie]))return!0}else return!0}else return!0}}function Ue(z,W,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 Z=z._transitionData;Z._frameQueue||(Z._frameQueue=[]),U=c.supplyAnimationDefaults(U);var ne=U.transition,ie=U.frame;Z._frameWaitingCnt===void 0&&(Z._frameWaitingCnt=0);function Le(ee){return Array.isArray(ne)?ee>=ne.length?ne[0]:ne[ee]:ne}function we(ee){return Array.isArray(ie)?ee>=ie.length?ie[0]:ie[ee]:ie}function ve(ee,Pe){var Re=0;return function(){if(ee&&++Re===Pe)return ee()}}return new Promise(function(ee,Pe){function Re(){if(Z._frameQueue.length!==0){for(;Z._frameQueue.length;){var Ze=Z._frameQueue.pop();Ze.onInterrupt&&Ze.onInterrupt()}z.emit("plotly_animationinterrupted",[])}}function He(Ze){if(Ze.length!==0){for(var Ct=0;Ct<Ze.length;Ct++){var zt;Ze[Ct].type==="byname"?zt=c.computeFrame(z,Ze[Ct].name):zt=Ze[Ct].data;var gr=we(Ct),hr=Le(Ct);hr.duration=Math.min(hr.duration,gr.duration);var Ur={frame:zt,name:Ze[Ct].name,frameOpts:gr,transitionOpts:hr};Ct===Ze.length-1&&(Ur.onComplete=ve(ee,2),Ur.onInterrupt=Pe),Z._frameQueue.push(Ur)}U.mode==="immediate"&&(Z._lastFrameAt=-1/0),Z._animationRaf||dt()}}function tt(){z.emit("plotly_animated"),window.cancelAnimationFrame(Z._animationRaf),Z._animationRaf=null}function ft(){Z._currentFrame&&Z._currentFrame.onComplete&&Z._currentFrame.onComplete();var Ze=Z._currentFrame=Z._frameQueue.shift();if(Ze){var Ct=Ze.name?Ze.name.toString():null;z._fullLayout._currentFrame=Ct,Z._lastFrameAt=Date.now(),Z._timeToNext=Ze.frameOpts.duration,c.transition(z,Ze.frame.data,Ze.frame.layout,x.coerceTraceIndices(z,Ze.frame.traces),Ze.frameOpts,Ze.transitionOpts).then(function(){Ze.onComplete&&Ze.onComplete()}),z.emit("plotly_animatingframe",{name:Ct,frame:Ze.frame,animation:{frame:Ze.frameOpts,transition:Ze.transitionOpts}})}else tt()}function dt(){z.emit("plotly_animating"),Z._lastFrameAt=-1/0,Z._timeToNext=0,Z._runningTransitions=0,Z._currentFrame=null;var Ze=function(){Z._animationRaf=window.requestAnimationFrame(Ze),Date.now()-Z._lastFrameAt>Z._timeToNext&&ft()};Ze()}var at=0;function Rt(Ze){return Array.isArray(ne)?at>=ne.length?Ze.transitionOpts=ne[at]:Ze.transitionOpts=ne[0]:Ze.transitionOpts=ne,at++,Ze}var mt,rt,Lt=[],bt=W==null,ht=Array.isArray(W),ct=!bt&&!ht&&i.isPlainObject(W);if(ct)Lt.push({type:"object",data:Rt(i.extendFlat({},W))});else if(bt||["string","number"].indexOf(typeof W)!==-1)for(mt=0;mt<Z._frames.length;mt++)rt=Z._frames[mt],rt&&(bt||String(rt.group)===String(W))&&Lt.push({type:"byname",name:String(rt.name),data:Rt({name:rt.name})});else if(ht)for(mt=0;mt<W.length;mt++){var qe=W[mt];["number","string"].indexOf(typeof qe)!==-1?(qe=String(qe),Lt.push({type:"byname",name:qe,data:Rt({name:qe})})):i.isPlainObject(qe)&&Lt.push({type:"object",data:Rt(i.extendFlat({},qe))})}for(mt=0;mt<Lt.length;mt++)if(rt=Lt[mt],rt.type==="byname"&&!Z._frameHash[rt.data.name]){i.warn('animate failure: frame not found: "'+rt.data.name+'"'),Pe();return}["next","immediate"].indexOf(U.mode)!==-1&&Re(),U.direction==="reverse"&&Lt.reverse();var Je=z._fullLayout._currentFrame;if(Je&&U.fromcurrent){var yt=-1;for(mt=0;mt<Lt.length;mt++)if(rt=Lt[mt],rt.type==="byname"&&rt.name===Je){yt=mt;break}if(yt>0&&yt<Lt.length-1){var Mt=[];for(mt=0;mt<Lt.length;mt++)rt=Lt[mt],(Lt[mt].type!=="byname"||mt>yt)&&Mt.push(rt);Lt=Mt}}Lt.length>0?He(Lt):(z.emit("plotly_animated"),ee())})}function Be(z,W,U){if(z=i.getGraphDiv(z),W==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 Z,ne,ie,Le,we=z._transitionData._frames,ve=z._transitionData._frameHash;if(!Array.isArray(W))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+W);var ee=we.length+W.length*2,Pe=[],Re={};for(Z=W.length-1;Z>=0;Z--)if(i.isPlainObject(W[Z])){var He=W[Z].name,tt=(ve[He]||Re[He]||{}).name,ft=W[Z].name,dt=ve[tt]||Re[tt];tt&&ft&&typeof ft=="number"&&dt&&S<C&&(S++,i.warn('addFrames: overwriting frame "'+(ve[tt]||Re[tt]).name+'" with a frame whose name of type "number" also equates to "'+tt+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),S===C&&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.")),Re[He]={name:He},Pe.push({frame:c.supplyFrameDefaults(W[Z]),index:U&&U[Z]!==void 0&&U[Z]!==null?U[Z]:ee+Z})}Pe.sort(function(ct,qe){return ct.index>qe.index?-1:ct.index<qe.index?1:0});var at=[],Rt=[],mt=we.length;for(Z=Pe.length-1;Z>=0;Z--){if(ne=Pe[Z].frame,typeof ne.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ne.name)for(;ve[ne.name="frame "+z._transitionData._counter++];);if(ve[ne.name]){for(ie=0;ie<we.length&&(we[ie]||{}).name!==ne.name;ie++);at.push({type:"replace",index:ie,value:ne}),Rt.unshift({type:"replace",index:ie,value:we[ie]})}else Le=Math.max(0,Math.min(Pe[Z].index,mt)),at.push({type:"insert",index:Le,value:ne}),Rt.unshift({type:"delete",index:Le}),mt++}var rt=c.modifyFrames,Lt=c.modifyFrames,bt=[z,Rt],ht=[z,at];return l&&l.add(z,rt,bt,Lt,ht),c.modifyFrames(z,at)}function Ye(z,W){if(z=i.getGraphDiv(z),!i.isPlotDiv(z))throw new Error("This element is not a Plotly plot: "+z);var U,Z,ne=z._transitionData._frames,ie=[],Le=[];if(!W)for(W=[],U=0;U<ne.length;U++)W.push(U);for(W=W.slice(),W.sort(),U=W.length-1;U>=0;U--)Z=W[U],ie.push({type:"delete",index:Z}),Le.unshift({type:"insert",index:Z,value:ne[Z]});var we=c.modifyFrames,ve=c.modifyFrames,ee=[z,Le],Pe=[z,ie];return l&&l.add(z,we,ee,ve,Pe),c.modifyFrames(z,ie)}function Ne(z){z=i.getGraphDiv(z);var W=z._fullLayout||{},U=z._fullData||[];return c.cleanPlot([],{},U,W),c.purge(z),o.purge(z),W._container&&W._container.remove(),delete z._context,z}function We(z){var W=z._fullLayout,U=z.getBoundingClientRect();if(!i.equalDomRects(U,W._lastBBox)){var Z=W._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(z));W._invScaleX=Math.sqrt(Z[0][0]*Z[0][0]+Z[0][1]*Z[0][1]+Z[0][2]*Z[0][2]),W._invScaleY=Math.sqrt(Z[1][0]*Z[1][0]+Z[1][1]*Z[1][1]+Z[1][2]*Z[1][2]),W._lastBBox=U}}function Qe(z){var W=e.select(z),U=z._fullLayout;if(U._calcInverseTransform=We,U._calcInverseTransform(z),U._container=W.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 Z={};e.selectAll("defs").each(function(){this.id&&(Z[this.id.split("-")[1]]=1)}),U._uid=i.randstr(Z)}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 ne=U._paper.append("g").classed("layer-below",!0);U._imageLowerLayer=ne.append("g").classed("imagelayer",!0),U._shapeLowerLayer=ne.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 ie=U._toppaper.append("g").classed("layer-above",!0);U._imageUpperLayer=ie.append("g").classed("imagelayer",!0),U._shapeUpperLayer=ie.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=Ue,t.addFrames=Be,t.deleteFrames=Ye,t.addTraces=K,t.deleteTraces=Y,t.extendTraces=q,t.moveTraces=te,t.prependTraces=V,t.newPlot=M,t._doPlot=L,t.purge=Ne,t.react=Ie,t.redraw=$,t.relayout=he,t.restyle=oe,t.setPlotConfig=R,t.update=J,t._guiRelayout=xe(he),t._guiRestyle=xe(oe),t._guiUpdate=xe(J),t._storeDirectGUIEdit=Q})(Kh);var Gr={},ZE=lt;Gr.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0};Gr.getRedrawFunc=function(t){return function(){ZE.getComponentMethod("colorbar","draw")(t)}};Gr.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};Gr.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var g2=window.URL||window.webkitURL;Gr.createObjectURL=function(t){return g2.createObjectURL(t)};Gr.revokeObjectURL=function(t){return g2.revokeObjectURL(t)};Gr.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=KE(window.atob(t));return new window.Blob([r],{type:"image/"+e})};Gr.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function KE(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}Gr.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;Gr.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";var lh=gt,QE=ge,JE=$t,eR=pt,of=Pn,_v=/"/g,zl="TOBESTRIPPED",tR=new RegExp('("'+zl+")|("+zl+'")',"g");function rR(t){var e=lh.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 aR(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}var Gp=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(JE.setRect,0,0,l,s).call(eR.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=lh.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(_v,zl))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var m=lh.select(this),y=this.style.fill;y&&y.indexOf("url(")!==-1&&m.style("fill",y.replace(_v,zl));var g=this.style.stroke;g&&g.indexOf("url(")!==-1&&m.style("stroke",g.replace(_v,zl))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),n.node().setAttributeNS(of.xmlns,"xmlns",of.svg),n.node().setAttributeNS(of.xmlns,"xmlns:xlink",of.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=rR(p),p=aR(p),p=p.replace(tR,"'"),QE.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},k0=ge,iR=Dh.EventEmitter,Gn=Gr;function nR(t){var e=t.emitter||new iR,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(k0.isIE()&&l!=="svg"){var s=new Error(Gn.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,g;l==="svg"||k0.isSafari()?g=Gn.encodeSVG(o):(y=Gn.createBlob(o,"svg"),g=Gn.createObjectURL(y)),f.width=h,f.height=d,m.onload=function(){var w;switch(y=null,Gn.revokeObjectURL(g),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=g;break;default:var b="Image format is not jpeg, png, svg or webp.";if(i(new Error(b)),!t.promise)return e.emit("error",b)}a(w),t.promise||e.emit("success",w)},m.onerror=function(w){if(y=null,Gn.revokeObjectURL(g),i(w),!t.promise)return e.emit("error",w)},m.src=g});return t.promise?r:e}var Up=nR,A0=wt,M0=Kh,oR=vr,Va=ge,pl=Gr,lR=Gp,sR=Up,fR=Dc.version,wv={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 cR(t,e){e=e||{};var r,a,i,n;Va.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=Va.getGraphDiv(t),r=Va.extendDeep([],t.data),a=Va.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(_){return!(_ in e)||Va.validate(e[_],wv[_])}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 "+Va.join2(wv.format.values,", "," or ")+".");var l={};function s(_,k){return Va.coerce(e,l,wv,_,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=Va.extendFlat({},a);c?m.width=c:e.width===null&&A0(n.width)&&(m.width=n.width),u?m.height=u:e.height===null&&A0(n.height)&&(m.height=n.height);var y=Va.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:h}),g=pl.getRedrawFunc(p);function w(){return new Promise(function(_){setTimeout(_,pl.getDelay(p._fullLayout))})}function b(){return new Promise(function(_,k){var T=lR(p,f,v),S=p._fullLayout.width,C=p._fullLayout.height;function L(){M0.purge(p),document.body.removeChild(p)}if(f==="full-json"){var E=oR.graphJson(p,!1,"keepdata","object",!0,!0);return E.version=fR,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=Va.randstr(),sR({format:f,width:S,height:C,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){M0.newPlot(p,r,m,y).then(g).then(w).then(b).then(function(T){_(x(T))}).catch(function(T){k(T)})})}var b2=cR,xa=ge,uR=vr,vR=Yo,dR=Go.dfltConfig,da=xa.isPlainObject,zi=Array.isArray,S0=xa.isArrayOrTypedArray,hR=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=vR.get(),i=[],n={_context:xa.extendFlat({},dR)},o,l;zi(e)?(n.data=xa.extendDeep([],e),o=e):(n.data=[],o=[],i.push(fr("array","data"))),da(r)?(n.layout=xa.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(fr("object","layout"))),uR.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var u=o[c],v=["data",c];if(!da(u)){i.push(fr("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(fr("invisible",v)),Il(u,h,p,i,v);var m=u.transforms,y=h.transforms;if(m){zi(m)||i.push(fr("array",v,["transforms"])),v.push("transforms");for(var g=0;g<m.length;g++){var w=["transforms",g],b=m[g].type;if(!da(m[g])){i.push(fr("object",v,w));continue}var x=a.transforms[b]?a.transforms[b].attributes:{};x.type={valType:"enumerated",values:Object.keys(a.transforms)},Il(m[g],y[g],x,i,v,w)}}}var _=n._fullLayout,k=pR(a,s);return Il(l,_,k,i,"layout"),i.length===0?void 0:i};function Il(t,e,r,a,i,n){n=n||[];for(var o=Object.keys(t),l=0;l<o.length;l++){var s=o[l];if(s!=="transforms"){var f=n.slice();f.push(s);var c=t[s],u=e[s],v=gR(r,s),h=(v||{}).valType,d=h==="info_array",p=h==="colorscale",m=(v||{}).items;if(!yR(r,s))a.push(fr("schema",i,f));else if(da(c)&&da(u)&&h!=="any")Il(c,u,v,a,i,f);else if(d&&zi(c)){c.length>u.length&&a.push(fr("unused",i,f.concat(u.length)));var y=u.length,g=Array.isArray(m);g&&(y=Math.min(y,m.length));var w,b,x,_,k;if(v.dimensions===2)for(b=0;b<y;b++)if(zi(c[b])){c[b].length>u[b].length&&a.push(fr("unused",i,f.concat(b,u[b].length)));var T=u[b].length;for(w=0;w<(g?Math.min(T,m[b].length):T);w++)x=g?m[b][w]:m,_=c[b][w],k=u[b][w],xa.validate(_,x)?k!==_&&k!==+_&&a.push(fr("dynamic",i,f.concat(b,w),_,k)):a.push(fr("value",i,f.concat(b,w),_))}else a.push(fr("array",i,f.concat(b),c[b]));else for(b=0;b<y;b++)x=g?m[b]:m,_=c[b],k=u[b],xa.validate(_,x)?k!==_&&k!==+_&&a.push(fr("dynamic",i,f.concat(b),_,k)):a.push(fr("value",i,f.concat(b),_))}else if(v.items&&!d&&zi(c)){var S=m[Object.keys(m)[0]],C=[],L,E;for(L=0;L<u.length;L++){var R=u[L]._index||L;if(E=f.slice(),E.push(R),da(c[R])&&da(u[L])){C.push(R);var N=c[R],H=u[L];da(N)&&N.visible!==!1&&H.visible===!1?a.push(fr("invisible",i,E)):Il(N,H,S,a,i,E)}}for(L=0;L<c.length;L++)E=f.slice(),E.push(L),da(c[L])?C.indexOf(L)===-1&&a.push(fr("unused",i,E)):a.push(fr("object",i,E,c[L]))}else!da(c)&&da(u)?a.push(fr("object",i,f,c)):!S0(c)&&S0(u)&&!d&&!p?a.push(fr("array",i,f,c)):s in e?xa.validate(c,v)?v.valType==="enumerated"&&(v.coerceNumber&&c!==+u||c!==u)&&a.push(fr("dynamic",i,f,c,u)):a.push(fr("value",i,f,c)):a.push(fr("unused",i,f,c))}}return a}function pR(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?xa.extendFlat(r[n.attributes.subplot.dflt],o):xa.extendFlat(r,o))}return r}var mR={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=Ji(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=Ji(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Ji(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=da(r)?"container":"key";return Ji(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Ji(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Ji(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Ji(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Ji(t){return zi(t)?"In data trace "+t[1]+", ":"In "+t+", "}function fr(t,e,r,a,i){r=r||"";var n,o;zi(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=xR(r),s=mR[t](e,l,a,i);return xa.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function yR(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 gR(t,e){if(e in t)return t[e];var r=x2(e);return t[r.keyMinusId]}var bR=xa.counterRegex("([a-z]+)");function x2(t){var e=t.match(bR);return{keyMinusId:e&&e[1],id:e&&e[2]}}function xR(t){if(!zi(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 L0=ge,ml=Gr;function _R(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(L0.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(L0.isSafari()){var c=r==="svg"?",":";base64,";return ml.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var wR=_R,Tv=ge,TR=b2,kR=wR,AR=Gr;function MR(t,e){var r;return Tv.isPlainObject(t)||(r=Tv.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.")),Tv.isIE()&&e.format!=="svg"&&i(new Error(AR.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=TR(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),kR(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var _2=MR,Vp={},ra=ge,aa=ra.isPlainObject,w2=Yo,T2=vr,SR=Ta,k2=Ot,A2=Go.dfltConfig;Vp.makeTemplate=function(t){t=ra.isPlainObject(t)?t:ra.getGraphDiv(t),t=ra.extendDeep({_context:A2},{data:t.data,layout:t.layout}),T2.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach(function(h){var d={};Fl(h,d,CR.bind(null,h));var p=ra.coerce(h,{},SR,"type"),m=a.data[p];m||(m=a.data[p]=[]),m.push(d)}),Fl(r,a.layout,LR.bind(null,r)),delete a.layout.template;var i=r.template;if(aa(i)){var n=i.layout,o,l,s,f,c,u;aa(n)&&vc(n,a.layout);var v=i.data;if(aa(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++)vc(s[o%f],c[o]);for(o=u;o<f;o++)c.push(ra.extendDeep({},s[o]))}for(l in v)l in a.data||(a.data[l]=ra.extendDeep([],v[l]))}}return a};function vc(t,e){t=ra.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,u,v){if(aa(u)&&aa(c))vc(c,u);else if(Array.isArray(u)&&Array.isArray(c)){var h=k2.arrayTemplater({_template:t},v);for(i=0;i<u.length;i++){var d=u[i],p=h.newItem(d)._template;p&&vc(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,dc(o)===o)for(var s in e){var f=dc(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function dc(t){return t.replace(/[0-9]+$/,"")}function Fl(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=ha(t,o,a),f=ha(t,o,i),c=r(f);if(!c){var u=dc(o);u!==o&&(f=ha(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&&aa(l))Fl(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var v=!1,h=0,d={},p=0;p<l.length;p++){var m=l[p];if(aa(m)){var y=m.name;if(y)d[y]||(Fl(m,e,r,ha(l,h,s),ha(l,h,f)),h++,d[y]=1);else if(!v){var g=k2.arrayDefaultKey(o),w=ha(t,g,a),b=ha(l,h,s);Fl(m,e,r,b,ha(l,h,f));var x=ra.nestedProperty(e,b),_=ra.nestedProperty(e,w);_.set(x.get()),x.set(null),v=!0}}}else{var k=ra.nestedProperty(e,s);k.set(l)}}}function LR(t,e){return w2.getLayoutValObject(t,ra.nestedProperty({},e).parts)}function CR(t,e){return w2.getTraceValObject(t,ra.nestedProperty({},e).parts)}function ha(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Vp.validateTemplate=function(t,e){var r=ra.extendDeep({},{_context:A2,data:t.data,layout:t.layout}),a=r.layout||{};aa(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,T2.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(w,b){for(var x in w)if(x.charAt(0)!=="_"&&aa(w[x])){var _=dc(x),k=[],T;for(T=0;T<b.length;T++)k.push(ha(w,x,b[T])),_!==x&&k.push(ha(w,_,b[T]));for(T=0;T<k.length;T++)f[k[T]]=1;c(w[x],k)}}function u(w,b){for(var x in w)if(x.indexOf("defaults")===-1&&aa(w[x])){var _=ha(w,x,b);f[_]?u(w[x],_):o.push({code:"unused",path:_})}}if(aa(i)?(c(l,["layout"]),u(i,"layout")):o.push({code:"layout"}),!aa(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 g(w,b){for(var x in w)if(x.charAt(0)!=="_"){var _=w[x],k=ha(w,x,b);aa(_)?(Array.isArray(w)&&_._template===!1&&_.templateitemname&&o.push({code:"missing",path:k,templateitemname:_.templateitemname}),g(_,k)):Array.isArray(_)&&DR(_)&&g(_,k)}}if(g({data:s,layout:l},""),o.length)return o.map($R)};function DR(t){for(var e=0;e<t.length;e++)if(aa(t[e]))return!0}function $R(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 yr=Kh;Wt._doPlot=yr._doPlot;Wt.newPlot=yr.newPlot;Wt.restyle=yr.restyle;Wt.relayout=yr.relayout;Wt.redraw=yr.redraw;Wt.update=yr.update;Wt._guiRestyle=yr._guiRestyle;Wt._guiRelayout=yr._guiRelayout;Wt._guiUpdate=yr._guiUpdate;Wt._storeDirectGUIEdit=yr._storeDirectGUIEdit;Wt.react=yr.react;Wt.extendTraces=yr.extendTraces;Wt.prependTraces=yr.prependTraces;Wt.addTraces=yr.addTraces;Wt.deleteTraces=yr.deleteTraces;Wt.moveTraces=yr.moveTraces;Wt.purge=yr.purge;Wt.addFrames=yr.addFrames;Wt.deleteFrames=yr.deleteFrames;Wt.animate=yr.animate;Wt.setPlotConfig=yr.setPlotConfig;var PR=Ic.getGraphDiv,ER=Cp.eraseActiveShape;Wt.deleteActiveShape=function(t){return ER(PR(t))};Wt.toImage=b2;Wt.validate=hR;Wt.downloadImage=_2;var M2=Vp;Wt.makeTemplate=M2.makeTemplate;Wt.validateTemplate=M2.validateTemplate;var kv=ge,RR=lt,Xp=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=RR.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=kv.minRowLength(n);o?l=Math.min(f,kv.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=kv.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},C0=ge.dateTick0,zR=lr,IR=zR.ONEWEEK;function D0(t,e){return t%IR===0?C0(e,1):C0(e,0)}var vu=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",D0(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",D0(l,r.ycalendar)),i("yperiodalignment"))}},$0=["orientation","groupnorm","stackgaps"],FR=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<$0.length;v++){var h=$0[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 g=f.traces[y];g._input.fill!==g.fill&&(g.fill=f.fillDflt)}}}return f}},P0=pt,E0=Oa.hasColorscale,R0=ms,NR=Or,S2=function(e,r,a,i,n,o){var l=NR.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),E0(e,"marker")&&R0(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=P0.background:f=P0.defaultLine,n("marker.line.color",f),E0(e,"marker.line")&&R0(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")}},HR=ge.isArrayOrTypedArray,OR=Oa.hasColorscale,jR=ms,L2=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),OR(e,"line"))jR(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(HR(l)?!1:l)||a;n("line.color",s)}n("line.width"),o.noDash||n("line.dash"),o.backoff&&n("line.backoff")},BR=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},GR=ge,C2=function(t,e,r,a,i){i=i||{},a("textposition"),GR.coerceFont(a,"textfont",i.font||r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},UR=pt,z0=ge.isArrayOrTypedArray,D2=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!z0(o)?n=o:l&&!z0(l)&&(n=l)}i("fillcolor",UR.addOpacity((r.line||{}).color||n||a,.5))},I0=ge,VR=lt,XR=Yi,YR=cu,Un=Or,WR=Xp,qR=vu,ZR=FR,KR=S2,QR=L2,F0=BR,JR=C2,ez=D2,tz=ge.coercePattern,rz=function(e,r,a,i){function n(h,d){return I0.coerce(e,r,XR,h,d)}var o=WR(e,r,i,n);if(o||(r.visible=!1),!!r.visible){qR(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=ZR(e,r,i,n);i.scattermode==="group"&&r.orientation===void 0&&n("orientation","v");var s=!l&&o<YR.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),Un.hasMarkers(r)&&KR(e,r,a,i,n,{gradient:!0}),Un.hasLines(r)&&(QR(e,r,a,i,n,{backoff:!0}),F0(e,r,n),n("connectgaps"),n("line.simplify")),Un.hasText(r)&&(n("texttemplate"),JR(e,r,i,n));var f=[];(Un.hasMarkers(r)||Un.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(ez(e,r,a,n),Un.hasLines(r)||F0(e,r,n),tz(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=VR.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),I0.coerceSelectionMarkerOpacity(r,n)}},az=hi.getAxisGroup,Yp=function(e,r,a,i){var n=r.orientation,o=r[{v:"x",h:"y"}[n]+"axis"],l=az(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)},iz=ge,nz=Yp,oz=Yi,$2=function(e,r){var a,i,n;function o(u){return iz.coerce(i._input,i,oz,u)}if(r.scattermode==="group")for(n=0;n<e.length;n++)i=e[n],i.type==="scatter"&&(a=i._input,nz(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}}}}},lz=ge,sz=Qh,fz=function(t,e){function r(i,n){return lz.coerce(t,e,sz,i,n)}var a=e.barmode==="group";e.scattermode==="group"&&r("scattergap",a?e.bargap:.2)},cz=wt,P2=ge,uz=P2.dateTime2ms,lf=P2.incrementMonth,vz=lr,dz=vz.ONEAVGMONTH,du=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(cz(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=uz(v,f)||0,d=[],p=[],m=[],y=i.length,g=0;g<y;g++){var w=i[g],b,x,_;if(l){for(b=Math.round((w-h)/(l*dz)),_=lf(h,l*b,f);_>w;)_=lf(_,-l,f);for(;_<=w;)_=lf(_,l,f);x=lf(_,-l,f)}else{for(b=Math.round((w-h)/o),_=h+b*o;_>w;)_-=o;for(;_<=w;)_+=o;x=_-o}d[g]=c?x:u?_:(x+_)/2,p[g]=x,m[g]=_}return{vals:d,starts:p,ends:m}},Av=Oa.hasColorscale,Mv=ap,N0=Or,E2=function(e,r){N0.hasLines(r)&&Av(r,"line")&&Mv(e,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),N0.hasMarkers(r)&&(Av(r,"marker")&&Mv(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Av(r,"marker.line")&&Mv(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},Lr=ge,R2=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Lr.mergeArray(r.text,e,"tx"),Lr.mergeArray(r.texttemplate,e,"txt"),Lr.mergeArray(r.hovertext,e,"htx"),Lr.mergeArray(r.customdata,e,"data"),Lr.mergeArray(r.textposition,e,"tp"),r.textfont&&(Lr.mergeArrayCastPositive(r.textfont.size,e,"ts"),Lr.mergeArray(r.textfont.color,e,"tc"),Lr.mergeArray(r.textfont.family,e,"tf"));var i=r.marker;if(i){Lr.mergeArrayCastPositive(i.size,e,"ms"),Lr.mergeArrayCastPositive(i.opacity,e,"mo"),Lr.mergeArray(i.symbol,e,"mx"),Lr.mergeArray(i.angle,e,"ma"),Lr.mergeArray(i.standoff,e,"mf"),Lr.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(Lr.mergeArray(n.color,e,"mlc"),Lr.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(Lr.mergeArray(o.type,e,"mgt"),Lr.mergeArray(o.color,e,"mgc"))}},H0=ge,z2=function(e,r){H0.isArrayOrTypedArray(r.selectedpoints)&&H0.tagSelected(e,r)},O0=wt,sh=ge,ts=Bt,j0=du,Sv=lr.BADNUM,fh=Or,hz=E2,pz=R2,mz=z2;function yz(t,e){var r=t._fullLayout,a=e._xA=ts.getFromId(t,e.xaxis||"x","x"),i=e._yA=ts.getFromId(t,e.yaxis||"y","y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=j0(e,a,"x",n),s=j0(e,i,"y",o),f=l.vals,c=s.vals,u=e._length,v=new Array(u),h=e.ids,d=Wp(e,r,a,i),p=!1,m,y,g,w,b,x;N2(r,e);var _="x",k="y",T;if(d)sh.pushUnique(d.traceIndices,e._expandedIndex),m=d.orientation==="v",m?(k="s",T="x"):(_="s",T="y"),b=d.stackgaps==="interpolate";else{var S=F2(e,u);I2(t,e,a,i,f,c,S)}var C=!!e.xperiodalignment,L=!!e.yperiodalignment;for(y=0;y<u;y++){var E=v[y]={},R=O0(f[y]),N=O0(c[y]);R&&N?(E[_]=f[y],E[k]=c[y],C&&(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,b?(E.s=Sv,p=!0):E.s=0):E[_]=E[k]=Sv,h&&(E.id=String(h[y]))}if(pz(v,e),hz(t,e),mz(v,e),d){for(y=0;y<v.length;)v[y][T]===Sv?v.splice(y,1):y++;if(sh.sort(v,function(M,A){return M[T]-A[T]||M.i-A.i}),p){for(y=0;y<v.length-1&&v[y].gap;)y++;for(x=v[y].s,x||(x=v[y].s=0),g=0;g<y;g++)v[g].s=x;for(w=v.length-1;w>y&&v[w].gap;)w--;for(x=v[w].s,g=v.length-1;g>w;g--)v[g].s=x;for(;y<w;)if(y++,v[y].gap){for(g=y+1;v[g].gap;)g++;for(var H=v[y-1][T],F=v[y-1].s,$=(v[g].s-F)/(v[g][T]-H);y<g;)v[y].s=F+(v[y][T]-H)*$,y++}}}return v}function I2(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,u=s._firstScatter[H2(e)]===e.uid,v=(Wp(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"||!fh.hasMarkers(e)&&!fh.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]=ts.findExtremes(r,i,d)),c&&(e._extremes[c]=ts.findExtremes(a,n,p))}function F2(t,e){if(fh.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)},sh.isArrayOrTypedArray(r.size)){var n={type:"linear"};ts.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 N2(t,e){var r=H2(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function H2(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function Wp(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 qp={calc:yz,calcMarkerSize:F2,calcAxisExpansion:I2,setFirstScatter:N2,getStackOpts:Wp},gz=hu,bz=ge.distinctVals;function hu(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=bz(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={}}hu.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};hu.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};hu.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 _a=wt,Fi=ge.isArrayOrTypedArray,Eo=lr.BADNUM,xz=lt,rs=Bt,_z=hi.getAxisGroup,pu=gz;function wz(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&&xz.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};ch(t,r,a,s,h),ch(t,a,r,l,h)}function ch(t,e,r,a,i){if(a.length){var n,o,l,s,f;switch(Az(r,a),i.mode){case"overlay":Lv(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&&Mz(t,e,r,o,i),n.length&&Lv(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);kz(o),o.length&&Sz(t,e,r,o,i),n.length&&Lv(e,r,n,i);break}Tz(a),Pz(a,e)}}function Tz(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=_a(n)?+n:+n.slice(0,-1),l=_a(n)?"px":"%",i.cornerradiusvalue=o,i.cornerradiusform=l))}function kz(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=_a(n)?+n:+n.slice(0,-1),l=_a(n)?"px":"%",e=0;e<t.length;e++)r=t[e],i=r[0].t,i.cornerradiusvalue=o,i.cornerradiusform=l}}function Az(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(Fi(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),_a(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=_a(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function Lv(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new pu([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});O2(t,o,a),a.norm?(V2(o),Zp(e,o,a)):U2(e,o)}}function Mz(t,e,r,a,i){var n=new pu(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});Lz(t,e,n,i),Dz(n,e),i.norm?(V2(n),Zp(r,n,i)):U2(r,n)}function Sz(t,e,r,a,i){var n=new pu(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});O2(e,n,i),Cz(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!==Eo){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&Zp(r,n,i)}function O2(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,j2(e),B2(t,e),G2(t,e)}function Lz(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=_z(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]||{},g=Object.keys(y.offsetGroups||{}).length,w;g?w=u/g:w=c?u/f:u;var b=w*(1-(a.groupgap||0)),x;g?x=((2*m._offsetIndex+1-g)*w-b)/2:x=c?((2*d+1-f)*w-b)/2:-b/2;var _=p[0].t;_.barwidth=b,_.poffset=x,_.bargroupwidth=u,_.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,j2(r),B2(e,r),G2(e,r,c)}function j2(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(Fi(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)_a(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(Fi(u)){var h=Array.prototype.slice.call(u,0,i.length);for(a=0;a<h.length;a++)_a(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 B2(t,e){for(var r=e.traces,a=Ko(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Fi(l),f=o.barwidth,c=Fi(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 G2(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;rs.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,g=Fi(m),w=Fi(y);for(d=0;d<l.length;d++){u=l[d];var b=g?m[d]:m,x=w?y[d]:y;v=u.p+b,h=v+x,c.push(v,h)}}f._extremes[t._id]=rs.findExtremes(t,c,{padded:!1})}}function U2(t,e){for(var r=e.traces,a=Ko(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]=rs.findExtremes(t,f,{tozero:c,padded:!0})}}function Cz(t,e,r){var a=Ko(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!==Eo&&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!==Eo){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]=rs.findExtremes(t,u,{tozero:!0,padded:!0}))}}function V2(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!==Eo&&t.put(n.p,n.b+n.s)}}function Dz(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 pu([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==Eo){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function Zp(t,e,r){var a=e.traces,i=Ko(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 _a(t.c2l(x))&&(x<l-o||x>s+o||!_a(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!==Eo){var g=Math.abs(n/e.get(y.p,y.s));y.b*=g,y.s*=g;var w=y.b,b=w+y.s;y[i]=b,h.push(b),p=p||f(b),y.hasB&&(h.push(w),p=p||f(w)),(!y.hasB||!y.b)&&(d=!0)}}v._extremes[t._id]=rs.findExtremes(t,h,{tozero:d,padded:p})}}function $z(t,e,r,a){for(var i=Ko(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 Pz(t,e){var r=Ko(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;_a(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=Fi(p);for(n=0;n<o.length;n++){var y=o[n],g=y[r]-y.w/2;if(_a(g)){var w=y[r]+y.w/2,b=u(y.p);a[b]?a[b]=[Math.min(g,a[b][0]),Math.max(w,a[b][1])]:a[b]=[g,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&&$z(t,v,h,e)}function Ko(t){return t._id.charAt(0)}var Kp={crossTraceCalc:wz,setGroupPositions:ch},B0=qp,G0=Kp.setGroupPositions;function Ez(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};G0(t,r,a,s,u),G0(t,a,r,l,u)}var Rz=function(e,r){e._fullLayout.scattermode==="group"&&Ez(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,g,w,b,x,_;for(var k in o){y=o[k];var T=y.traceIndices;if(T.length){for(g=y.stackgaps==="interpolate",w=y.groupnorm,y.orientation==="v"?(b="x",x="y"):(b="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][b];for(s=1;s<T.length;s++){for(v=l[T[s]],f=c=0;f<v.length;f++){for(d=v[f][b];d>S[c]&&c<S.length;c++)Cv(v,f,S[c],s,_,g,b),f++;if(d!==S[c]){for(u=0;u<s;u++)Cv(l[T[u]],c,d,u,_,g,b);S.splice(c,0,d)}c++}for(;c<S.length;c++)Cv(v,f,S[c],s,_,g,b),f++}var C=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=C,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=B0.calcMarkerSize(E,E._rawLength),N=Array.isArray(R);if(R&&_[s]||N){var H=R;for(R=new Array(C),f=0;f<C;f++)R[f]=v[f].gap?0:N?H[v[f].i]:H}var F=new Array(C),$=new Array(C);for(f=0;f<C;f++)F[f]=v[f].x,$[f]=v[f].y;B0.calcAxisExpansion(e,E,a,i,F,$,R),v[0].t.orientation=y.orientation}}}}};function Cv(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=zz(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 zz(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 Iz=$t,X2=lr,yl=X2.BADNUM,Y2=X2.LOG_CLIP,U0=Y2+.5,V0=Y2-.5,hc=ge,Fz=hc.segmentsIntersect,X0=hc.constrain,Dv=cu,Nz=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=[],g=Dv.minTolerance,w=e.length,b=new Array(w),x=0,_,k,T,S,C,L,E,R,N,H,F,$,M,A,D,P;function I(be){var Ue=e[be];if(!Ue)return!1;var Be=r.linearized?i.l2p(Ue.x):i.c2p(Ue.x),Ye=r.linearized?n.l2p(Ue.y):n.c2p(Ue.y);if(Be===yl){if(o&&(Be=i.c2p(Ue.x,!0)),Be===yl)return!1;l&&Ye===yl&&(Be*=Math.abs(i._m*f*(i._m>0?U0:V0)/(n._m*s*(n._m>0?U0:V0)))),Be*=1e3}if(Ye===yl){if(l&&(Ye=n.c2p(Ue.y,!0)),Ye===yl)return!1;Ye*=1e3}return[Be,Ye]}function O(be,Ue,Be,Ye){var Ne=Be-be,We=Ye-Ue,Qe=.5-be,z=.5-Ue,W=Ne*Ne+We*We,U=Ne*Qe+We*z;if(U>0&&U<W){var Z=Qe*We-z*Ne;if(Z*Z<W)return!0}}var B,G;function j(be,Ue){var Be=be[0]/s,Ye=be[1]/f,Ne=Math.max(0,-Be,Be-1,-Ye,Ye-1);return Ne&&B!==void 0&&O(Be,Ye,B,G)&&(Ne=0),Ne&&Ue&&O(Be,Ye,Ue[0]/s,Ue[1]/f)&&(Ne=0),(1+Dv.toleranceGrowth*Ne)*h}function q(be,Ue){var Be=be[0]-Ue[0],Ye=be[1]-Ue[1];return Math.sqrt(Be*Be+Ye*Ye)}var V=Dv.maxScreensAway,K=-s*V,Y=s*(1+V),te=-f*V,oe=f*(1+V),_e=[[K,te,Y,te],[Y,te,Y,oe],[Y,oe,K,oe],[K,oe,K,te]],de,X,Q,le,se,he;function Te(be,Ue){for(var Be=[],Ye=0,Ne=0;Ne<4;Ne++){var We=_e[Ne],Qe=Fz(be[0],be[1],Ue[0],Ue[1],We[0],We[1],We[2],We[3]);Qe&&(!Ye||Math.abs(Qe.x-Be[0][0])>1||Math.abs(Qe.y-Be[0][1])>1)&&(Qe=[Qe.x,Qe.y],Ye&&q(Qe,be)<q(Be[0],be)?Be.unshift(Qe):Be.push(Qe),Ye++)}return Be}function fe(be){if(be[0]<K||be[0]>Y||be[1]<te||be[1]>oe)return[X0(be[0],K,Y),X0(be[1],te,oe)]}function Ae(be,Ue){if(be[0]===Ue[0]&&(be[0]===K||be[0]===Y)||be[1]===Ue[1]&&(be[1]===te||be[1]===oe))return!0}function ce(be,Ue){var Be=[],Ye=fe(be),Ne=fe(Ue);return Ye&&Ne&&Ae(Ye,Ne)||(Ye&&Be.push(Ye),Ne&&Be.push(Ne)),Be}function ye(be,Ue,Be){return function(Ye,Ne){var We=fe(Ye),Qe=fe(Ne),z=[];if(We&&Qe&&Ae(We,Qe))return z;We&&z.push(We),Qe&&z.push(Qe);var W=2*hc.constrain((Ye[be]+Ne[be])/2,Ue,Be)-((We||Ye)[be]+(Qe||Ne)[be]);if(W){var U;We&&Qe?U=W>0==We[be]>Qe[be]?We:Qe:U=We||Qe,U[be]+=W}return z}}var Se;d==="linear"||d==="spline"?Se=Te:d==="hv"||d==="vh"?Se=ce:d==="hvh"?Se=ye(0,K,Y):d==="vhv"&&(Se=ye(1,te,oe));function Me(be,Ue){var Be=Ue[0]-be[0],Ye=(Ue[1]-be[1])/Be,Ne=(be[1]*Ue[0]-Ue[1]*be[0])/Be;return Ne>0?[Ye>0?K:Y,oe]:[Ye>0?Y:K,te]}function J(be){var Ue=be[0],Be=be[1],Ye=Ue===b[x-1][0],Ne=Be===b[x-1][1];if(!(Ye&&Ne))if(x>1){var We=Ue===b[x-2][0],Qe=Be===b[x-2][1];Ye&&(Ue===K||Ue===Y)&&We?Qe?x--:b[x-1]=be:Ne&&(Be===te||Be===oe)&&Qe?We?x--:b[x-1]=be:b[x++]=be}else b[x++]=be}function xe(be){b[x-1][0]!==be[0]&&b[x-1][1]!==be[1]&&J([Q,le]),J(be),se=null,Q=le=0}var re=hc.isArrayOrTypedArray(u);function ue(be){if(be&&c&&(be.i=_,be.d=e,be.trace=a,be.marker=re?u[be.i]:u,be.backoff=c),B=be[0]/s,G=be[1]/f,de=be[0]<K?K:be[0]>Y?Y:0,X=be[1]<te?te:be[1]>oe?oe:0,de||X){if(!x)b[x++]=[de||be[0],X||be[1]];else if(se){var Ue=Se(se,be);Ue.length>1&&(xe(Ue[0]),b[x++]=Ue[1])}else he=Se(b[x-1],be)[0],b[x++]=he;var Be=b[x-1];de&&X&&(Be[0]!==de||Be[1]!==X)?(se&&(Q!==de&&le!==X?J(Q&&le?Me(se,be):[Q||de,le||X]):Q&&le&&J([Q,le])),J([de,X])):Q-de&&le-X&&J([de||Q,X||le]),se=be,Q=de,le=X}else se&&xe(Se(se,be)[0]),b[x++]=be}for(_=0;_<w;_++)if(k=I(_),!!k){for(x=0,se=null,ue(k),_++;_<w;_++){if(S=I(_),!S){if(v)continue;break}if(!p||!r.simplify){ue(S);continue}var pe=I(_+1);if(H=q(S,k),!(!(m&&(x===0||x===w-1))&&H<j(S,pe)*g)){for(R=[(S[0]-k[0])/H,(S[1]-k[1])/H],C=k,F=H,$=A=D=0,E=!1,T=S,_++;_<e.length;_++){if(L=pe,pe=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],A=Math.min(A,P),D=Math.max(D,P),D-A>j(L,pe))break;T=L,M=N[0]*R[0]+N[1]*R[1],M>F?(F=M,S=L,E=!1):M<$&&($=M,C=L,E=!0)}if(E?(ue(S),T!==C&&ue(C)):(C!==k&&ue(C),T!==S&&ue(S)),ue(T),_>=e.length||!L)break;ue(L),k=L}}se&&J([Q||se[0],le||se[1]]),y.push(b.slice(0,x))}var De=d.slice(d.length-1);if(c&&De!=="h"&&De!=="v"){for(var $e=!1,me=-1,ke=[],Ve=0;Ve<y.length;Ve++)for(var Ie=0;Ie<y[Ve].length-1;Ie++){var Oe=y[Ve][Ie],Xe=y[Ve][Ie+1],it=Iz.applyBackoff(Xe,Oe);(it[0]!==Xe[0]||it[1]!==Xe[1])&&($e=!0),ke[me+1]||(me++,ke[me]=[Oe,[it[0],it[1]]])}return $e?ke:y}return y},Y0={tonextx:1,tonexty:1,tonext:1},W2=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 Y0&&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 g=m[0].trace,w=y[0].trace;return g._groupIndex-w._groupIndex||g.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 Y0&&(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},Ea=gt,Hz=lt,as=ge,xo=as.ensureSingle,q2=as.identity,tr=$t,_o=Or,Oz=Nz,jz=W2,sf=e2.tester,Bz=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,u=jz(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(),Gz(e,l,r),c){o&&(s=o());var v=Ea.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){W0(e,d,r,h,u,this,n)})})}else l.each(function(h,d){W0(e,d,r,h,u,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function Gz(t,e,r){e.each(function(a){var i=xo(Ea.select(this),"g","fills");tr.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,q2);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=xo(Ea.select(this),"path","js-fill")})})}function W0(t,e,r,a,i,n,o){var l=t._context.staticPlot,s;Uz(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=Ea.select(n),m=xo(p,"g","errorbars"),y=xo(p,"g","lines"),g=xo(p,"g","points"),w=xo(p,"g","text");if(Hz.getComponentMethod("errorbars","plot")(t,m,r,o),h.visible!==!0)return;c(p).style("opacity",h.opacity);var b,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="",C=[],L=h._prevtrace,E=null,R=null;L&&(S=L._prevRevpath||"",x=L._nextFill,C=L._ownPolygons,E=L._fillsegments,R=L._fillElement);var N,H,F="",$="",M,A,D,P,I,O,B=[];h._polygons=[];var G=[],j=[],q=as.noop;if(b=h._ownFill,_o.hasLines(h)||h.fill!=="none"){x&&x.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(M=tr.steps(d.shape),A=tr.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?M=A=function(ye){var Se=ye[ye.length-1];return ye.length>1&&ye[0][0]===Se[0]&&ye[0][1]===Se[1]?tr.smoothclosed(ye.slice(1),d.smoothing):tr.smoothopen(ye,d.smoothing)}:M=A=function(ye){return"M"+ye.join("L")},D=function(ye){return A(ye.reverse())},j=Oz(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(j.length);var V=0;for(s=0;s<j.length;s++){var K,Y=j[s];!K||!_?(K=Y.slice(),G[V]=K,V++):K.push.apply(K,Y)}h._fillElement=null,h._fillExclusionElement=R,h._fillsegments=G.slice(0,V),G=h._fillsegments,j.length&&(P=j[0][0].slice(),I=j[j.length-1],O=I[I.length-1].slice()),q=function(ye){return function(Se){if(N=M(Se),H=D(Se),F?_?(F+="L"+N.substr(1),$=H+("L"+$.substr(1))):(F+="Z"+N,$=H+"Z"+$):(F=N,$=H),_o.hasLines(h)){var Me=Ea.select(this);if(Me.datum(a),ye)c(Me.style("opacity",0).attr("d",N).call(tr.lineGroupStyle)).style("opacity",1);else{var J=c(Me);J.attr("d",N),tr.singleLineStyle(a,J)}}}}}var te=y.selectAll(".js-line").data(j);c(te.exit()).style("opacity",0).remove(),te.each(q(!1)),te.enter().append("path").classed("js-line",!0).style("vector-effect",l?"none":"non-scaling-stroke").call(tr.lineGroupStyle).each(q(!0)),tr.setClipUrl(te,r.layerClipId,t);function oe(ye){c(ye).attr("d","M0,0Z")}var _e=function(){var ye=new Array(G.length);for(s=0;s<G.length;s++)ye[s]=sf(G[s]);return ye},de=function(ye){var Se,Me;if(!ye||ye.length===0)for(Se=new Array(G.length),Me=0;Me<G.length;Me++){var J=G[Me][0].slice(),xe=G[Me][G[Me].length-1].slice();J[k]=xe[k]=T;var re=[xe,J],ue=re.concat(G[Me]);Se[Me]=sf(ue)}else{for(Se=new Array(ye.length-1+G.length),Me=0;Me<ye.length-1;Me++)Se[Me]=sf(ye[Me]);var pe=ye[ye.length-1].slice();for(pe.reverse(),Me=0;Me<G.length;Me++)Se[ye.length-1+Me]=sf(G[Me].concat(pe))}return Se};j.length?(b?(b.datum(a),P&&O&&(_?(P[k]=O[k]=T,c(b).attr("d","M"+O+"L"+P+"L"+F.substr(1)).call(tr.singleFillStyle,t),B=de(null)):(c(b).attr("d",F+"Z").call(tr.singleFillStyle,t),B=_e())),h._polygons=B,h._fillElement=b):x&&(h.fill.substr(0,6)==="tonext"&&F&&S?(h.fill==="tonext"?(c(x).attr("d",F+"Z"+S+"Z").call(tr.singleFillStyle,t),B=_e(),h._polygons=B.concat(C)):(c(x).attr("d",F+"L"+S.substr(1)+"Z").call(tr.singleFillStyle,t),B=de(E),h._polygons=B),h._fillElement=x):oe(x)),h._prevRevpath=$):(b?oe(b):x&&oe(x),h._prevRevpath=null),h._ownPolygons=B;function X(ye){return ye.filter(function(Se){return!Se.gap&&Se.vis})}function Q(ye){return ye.filter(function(Se){return Se.vis})}function le(ye){return ye.filter(function(Se){return!Se.gap})}function se(ye){return ye.id}function he(ye){if(ye.ids)return se}function Te(){return!1}function fe(ye,Se,Me){var J,xe,re,ue=Me[0].trace,pe=_o.hasMarkers(ue),De=_o.hasText(ue),$e=he(ue),me=Te,ke=Te;if(pe||De){var Ve=q2,Ie=ue.stackgroup,Oe=Ie&&t._fullLayout._scatterStackOpts[u._id+v._id][Ie].stackgaps==="infer zero";ue.marker.maxdisplayed||ue._needsCull?Ve=Oe?Q:X:Ie&&!Oe&&(Ve=le),pe&&(me=Ve),De&&(ke=Ve)}xe=ye.selectAll("path.point"),J=xe.data(me,$e);var Xe=J.enter().append("path").classed("point",!0);f&&Xe.call(tr.pointStyle,ue,t).call(tr.translatePoints,u,v).style("opacity",0).transition().style("opacity",1),J.order();var it;pe&&(it=tr.makePointStyleFns(ue)),J.each(function(be){var Ue=Ea.select(this),Be=c(Ue);re=tr.translatePoint(be,Be,u,v),re?(tr.singlePointStyle(be,Be,ue,it,t),r.layerClipId&&tr.hideOutsideRangePoint(be,Be,u,v,ue.xcalendar,ue.ycalendar),ue.customdata&&Ue.classed("plotly-customdata",be.data!==null&&be.data!==void 0)):Be.remove()}),f?J.exit().transition().style("opacity",0).remove():J.exit().remove(),xe=Se.selectAll("g"),J=xe.data(ke,$e),J.enter().append("g").classed("textpoint",!0).append("text"),J.order(),J.each(function(be){var Ue=Ea.select(this),Be=c(Ue.select("text"));re=tr.translatePoint(be,Be,u,v),re?r.layerClipId&&tr.hideOutsideRangePoint(be,Ue,u,v,ue.xcalendar,ue.ycalendar):Ue.remove()}),J.selectAll("text").call(tr.textPointStyle,ue,t).each(function(be){var Ue=u.c2p(be.x),Be=v.c2p(be.y);Ea.select(this).selectAll("tspan.line").each(function(){c(Ea.select(this)).attr({x:Ue,y:Be})})}),J.exit().remove()}g.datum(a),w.datum(a),fe(g,w,a);var Ae=h.cliponaxis===!1,ce=Ae?null:r.layerClipId;tr.setClipUrl(g,ce,t),tr.setClipUrl(w,ce,t)}function Uz(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=Ea.extent(as.simpleMap(n.range,n.r2c)),s=Ea.extent(as.simpleMap(o.range,o.r2c)),f=a[0].trace;if(_o.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;_o.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"},ff=Bt,Z2=function(e,r,a){var i={},n={_fullLayout:a},o=ff.getFromTrace(n,r,"x"),l=ff.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=ff.tickText(o,o.c2l(s),!0).text,i.yLabel=ff.tickText(l,l.c2l(f),!0).text,i},$v=gt,Ro=$t,Vz=lt;function Xz(t){var e=$v.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=$v.select(this),i=r.trace||r[0].trace;Qp(a,i,t)}),e.selectAll("g.text").each(function(r){var a=$v.select(this),i=r.trace||r[0].trace;Jp(a,i,t)}),e.selectAll("g.trace path.js-line").call(Ro.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(Ro.fillGroupStyle,t),Vz.getComponentMethod("errorbars","style")(e)}function Qp(t,e,r){Ro.pointStyle(t.selectAll("path.point"),e,r)}function Jp(t,e,r){Ro.textPointStyle(t.selectAll("text"),e,r)}function Yz(t,e,r){var a=e[0].trace;a.selectedpoints?(Ro.selectedPointStyle(r.selectAll("path.point"),a),Ro.selectedTextStyle(r.selectAll("text"),a)):(Qp(r,a,t),Jp(r,a,t))}var q0={style:Xz,stylePoints:Qp,styleText:Jp,styleOnSelect:Yz},Vn=pt,Wz=Or,K2=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&Vn.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&&Vn.opacity(n)?n:o&&Vn.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?Vn.opacity(i)<.3?Vn.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&Vn.opacity(a)&&Wz.hasLines(e)&&e.line.width?a:e.fillcolor)},Nf=ge,Z0=Na,qz=lt,Zz=K2,Pv=pt,Kz=Nf.fillText,Qz=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 M=l.c2p($.xStart),A=l.c2p($.xEnd);return f>=Math.min(M,A)&&f<=Math.max(M,A)?0:1/0}var D=Math.max(3,$.mrc||0),P=1-1/D,I=Math.abs(l.c2p($.x)-f);return I<D?P*I/D:I-D+P},y=function($){if(p){var M=s.c2p($.yStart),A=s.c2p($.yEnd);return c>=Math.min(M,A)&&c<=Math.max(M,A)?0:1/0}var D=Math.max(3,$.mrc||0),P=1-1/D,I=Math.abs(s.c2p($.y)-c);return I<D?P*I/D:I-D+P},g=function($){var M=Math.max(h,$.mrc||0),A=l.c2p($.x)-f,D=s.c2p($.y)-c;return Math.max(Math.sqrt(A*A+D*D)-M,1-h/M)},w=Z0.getDistanceFunction(i,m,y,g);if(Z0.getClosest(n,w,e),e.index!==!1){var b=n[e.index],x=l.c2p(b.x,!0),_=s.c2p(b.y,!0),k=b.mrc||1;e.index=b.i;var T=n[0].t.orientation,S=T&&(b.sNorm||b.s),C=T==="h"?S:b.orig_x!==void 0?b.orig_x:b.x,L=T==="v"?S:b.orig_y!==void 0?b.orig_y:b.y;return Nf.extendFlat(e,{color:Zz(o,b),x0:x-k,x1:x+k,xLabelVal:C,y0:_-k,y1:_+k,yLabelVal:L,spikeDistance:g(b),hovertemplate:o.hovertemplate}),Kz(b,o,e),qz.getComponentMethod("errorbars","hoverInfo")(b,o,e),[e]}}function E($){if(!$)return!1;var M=$.node();try{var A=new DOMPoint(u[0],u[1]);return M.isPointInFill(A)}catch{var D=M.ownerSVGElement.createSVGPoint();return D.x=u[0],D.y=u[1],M.isPointInFill(D)}}function R($){var M,A=[],D=1/0,P=-1/0,I=1/0,O=-1/0,B;for(M=0;M<$.length;M++){var G=$[M];G.contains(u)&&(A.push(G),I=Math.min(I,G.ymin),O=Math.max(O,G.ymax))}if(A.length===0)return null;I=Math.max(I,0),O=Math.min(O,s._length),B=(I+O)/2;var j,q,V,K,Y,te,oe;for(M=0;M<A.length;M++)for(q=A[M].pts,j=1;j<q.length;j++)te=q[j-1][1],oe=q[j][1],te>B!=oe>=B&&(K=q[j-1][0],Y=q[j][0],oe-te&&(V=K+(Y-K)*(B-te)/(oe-te),D=Math.min(D,V),P=Math.max(P,V)));return D=Math.max(D,0),P=Math.min(P,l._length),{x0:D,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=Pv.defaultLine;return Pv.opacity(o.fillcolor)?F=o.fillcolor:Pv.opacity((o.line||{}).color)&&(F=o.line.color),Nf.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&&!Nf.isArrayOrTypedArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},K0=Or,Jz=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,u,v=!K0.hasMarkers(l)&&!K0.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},dr={},Ev,Q0;function eI(){return Q0||(Q0=1,Ev={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(" ")}}),Ev}var Rv,J0;function tI(){if(J0)return Rv;J0=1;var t=lt.traceIs,e=Iw;Rv=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 g=u.dimensions,w=g[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 Rv}var rI=or.isTypedArraySpec;function aI(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 iI=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0||rI(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=aI(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},eb=wa.mix,nI=Hr,oI=ge,lI=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(k,T){return oI.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=eb(n,i.bgColor,i.blend||nI.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=eb(r.gridcolor,i.bgColor,67).toRgbString(),m=o("minor.gridcolor",p),y=o("minor.gridwidth",r.gridwidth||1),g=o("minor.griddash",r.griddash||"solid"),w=a("minor.showgrid",!!m||!!y||!!g);w||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var b=o("zerolinecolor",n),x=o("zerolinewidth"),_=a("zeroline",i.showGrid||!!b||!!x);_||(delete r.zerolinecolor,delete r.zerolinewidth)}},tb=wt,sI=lt,Cl=ge,fI=Ot,cI=ei,uh=Ja,rb=yw,ab=gw,uI=_w,vI=ww,dI=iI,hI=lI,pI=Kw,ib=sp,Hf=Yr.WEEKDAY_PATTERN,mI=Yr.HOUR_PATTERN,Q2=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=sI.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"),ib(r,n),pI(e,r,a,i),dI(e,r,a,i),u!=="category"&&!i.noHover&&a("hoverformat");var p=a("color"),m=p!==uh.color.dflt?p:l.color,y=s.label||n._dfltTitle[o];if(vI(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}),rb(e,r,a,u);var g=i.hasMinor;if(g&&(fI.newContainer(r,"minor"),rb(e,r,a,u,{isMinor:!0})),uI(e,r,a,u,i),ab(e,r,a,i),g){var w=i.isMinor;i.isMinor=!0,ab(e,r,a,i),i.isMinor=w}hI(e,r,a,{dfltColor:p,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:g,attributes:uh}),g&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&a("mirror");var b=u==="multicategory";if(!i.noTickson&&(u==="category"||b)&&(r.ticks||r.showgrid)){var x;b&&(x="boundaries");var _=a("tickson",x);_==="boundaries"&&delete r.ticklabelposition}if(b){var k=a("showdividers");k&&(a("dividercolor"),a("dividerwidth"))}if(u==="date")if(cI(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:yI}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var T=0;T<r.rangebreaks.length;T++)if(r.rangebreaks[T].pattern===Hf){r._hasDayOfWeekBreaks=!0;break}if(ib(r,n),n._has("scattergl")||n._has("splom"))for(var S=0;S<i.data.length;S++){var C=i.data[S];(C.type==="scattergl"||C.type==="splom")&&(C.visible=!1,Cl.warn(C.type+" traces do not work on axes with rangebreaks. Setting trace "+C.index+" to `visible: false`."))}}return r};function yI(t,e,r){function a(v,h){return Cl.coerce(t,e,uh.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=nb(n[l]),s){o=Hf;break}}var f=a("pattern",o);if(f===Hf)for(l=0;l<2;l++)s=nb(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Hf:if(!tb(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 mI:if(!tb(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 gI={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function nb(t){if(typeof t=="string")return gI[t.substr(0,3).toLowerCase()]}var bI=wt,cf=ge,J2=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||(bI(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),h=h||0,d=0,p=!1;var m=cf.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:c}},"anchor"),y=cf.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(m==="free"){if(l==="y"){var g=a("autoshift");g&&(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=cf.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!w){var b=a("domain",u);b[0]>b[1]-1/4096&&(r.domain=u),cf.noneOrAll(e.domain,r.domain,u),r.tickmode==="sync"&&(r.tickmode="auto")}return a("layer"),r},zv,ob;function xI(){if(ob)return zv;ob=1;var t=ge,e=pt,r=ka.isUnifiedHover,a=mT,i=Ot,n=ds,o=Ja,l=tI(),s=Q2,f=hi,c=J2,u=sr,v=u.id2name,h=u.name2id,d=Yr.AX_ID_PATTERN,p=lt,m=p.traceIs,y=p.getComponentMethod;function g(w,b,x){Array.isArray(w[b])?w[b].push(x):w[b]=[x]}return zv=function(b,x,_){var k=x.autotypenumbers,T={},S={},C={},L={},E={},R={},N={},H={},F={},$={},M,A;for(M=0;M<_.length;M++){var D=_[M];if(!(!m(D,"cartesian")&&!m(D,"gl2d"))){var P;if(D.xaxis)P=v(D.xaxis),g(T,P,D);else if(D.xaxes)for(A=0;A<D.xaxes.length;A++)g(T,v(D.xaxes[A]),D);var I;if(D.yaxis)I=v(D.yaxis),g(T,I,D);else if(D.yaxes)for(A=0;A<D.yaxes.length;A++)g(T,v(D.yaxes[A]),D);if(D.type==="funnel"?D.orientation==="h"?(P&&(S[P]=!0),I&&(N[I]=!0)):I&&(C[I]=!0):D.type==="image"?(I&&(H[I]=!0),P&&(H[P]=!0)):(I&&(E[I]=!0,R[I]=!0),(!m(D,"carpet")||D.type==="carpet"&&!D._cheater)&&P&&(L[P]=!0)),D.type==="carpet"&&D._cheater&&P&&(S[P]=!0),m(D,"2dMap")&&(F[P]=!0,F[I]=!0),m(D,"oriented")){var O=D.orientation==="h"?I:P;$[O]=!0}}}var B=x._subplots,G=B.xaxis,j=B.yaxis,q=t.simpleMap(G,v),V=t.simpleMap(j,v),K=q.concat(V),Y=e.background;G.length&&j.length&&(Y=t.coerce(b,x,n,"plot_bgcolor"));var te=e.combine(Y,x.paper_bgcolor),oe,_e,de,X,Q;function le(){var Qe=T[oe]||[];Q._traceIndices=Qe.map(function(z){return z._expandedIndex}),Q._annIndices=[],Q._shapeIndices=[],Q._selectionIndices=[],Q._imgIndices=[],Q._subplotsWith=[],Q._counterAxes=[],Q._name=Q._attr=oe,Q._id=_e}function se(Qe,z){return t.coerce(X,Q,o,Qe,z)}function he(Qe,z){return t.coerce2(X,Q,o,Qe,z)}function Te(Qe){return Qe==="x"?j:G}function fe(Qe,z){for(var W=Qe==="x"?q:V,U=[],Z=0;Z<W.length;Z++){var ne=W[Z];ne!==z&&!(b[ne]||{}).overlaying&&U.push(h(ne))}return U}var Ae={x:Te("x"),y:Te("y")},ce=Ae.x.concat(Ae.y),ye={},Se=[];function Me(){var Qe=X.matches;d.test(Qe)&&ce.indexOf(Qe)===-1&&(ye[Qe]=X.type,Se=Object.keys(ye))}var J=a(b,x),xe=r(J);for(M=0;M<K.length;M++){oe=K[M],_e=h(oe),de=oe.charAt(0),t.isPlainObject(b[oe])||(b[oe]={}),X=b[oe],Q=i.newContainer(x,oe,de+"axis"),le();var re=de==="x"&&!L[oe]&&S[oe]||de==="y"&&!E[oe]&&C[oe],ue=de==="y"&&(!R[oe]&&N[oe]||H[oe]),pe={hasMinor:!0,letter:de,font:x.font,outerTicks:F[oe],showGrid:!$[oe],data:T[oe]||[],bgColor:te,calendar:x.calendar,automargin:!0,visibleDflt:re,reverseDflt:ue,autotypenumbersDflt:k,splomStash:((x._splomAxes||{})[de]||{})[_e],noAutotickangles:de==="y"};se("uirevision",x.uirevision),l(X,Q,se,pe),s(X,Q,se,pe,x);var De=xe&&de===J.charAt(0),$e=he("spikecolor",xe?Q.color:void 0),me=he("spikethickness",xe?1.5:void 0),ke=he("spikedash",xe?"dot":void 0),Ve=he("spikemode",xe?"across":void 0),Ie=he("spikesnap"),Oe=se("showspikes",!!De||!!$e||!!me||!!ke||!!Ve||!!Ie);Oe||(delete Q.spikecolor,delete Q.spikethickness,delete Q.spikedash,delete Q.spikemode,delete Q.spikesnap);var Xe=v(X.overlaying),it=[0,1];if(x[Xe]!==void 0){var be=v(x[Xe].anchor);x[be]!==void 0&&(it=x[be].domain)}c(X,Q,se,{letter:de,counterAxes:Ae[de],overlayableAxes:fe(de,oe),grid:x.grid,overlayingDomain:it}),se("title.standoff"),Me(),Q._input=X}for(M=0;M<Se.length;){_e=Se[M++],oe=v(_e),de=oe.charAt(0),t.isPlainObject(b[oe])||(b[oe]={}),X=b[oe],Q=i.newContainer(x,oe,de+"axis"),le();var Ue={letter:de,font:x.font,outerTicks:F[oe],showGrid:!$[oe],data:[],bgColor:te,calendar:x.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:k,splomStash:((x._splomAxes||{})[de]||{})[_e]};se("uirevision",x.uirevision),Q.type=ye[_e]||"linear",s(X,Q,se,Ue,x),c(X,Q,se,{letter:de,counterAxes:Ae[de],overlayableAxes:fe(de,oe),grid:x.grid}),se("fixedrange"),Me(),Q._input=X}var Be=y("rangeslider","handleDefaults"),Ye=y("rangeselector","handleDefaults");for(M=0;M<q.length;M++)oe=q[M],X=b[oe],Q=x[oe],Be(b,x,oe),Q.type==="date"&&Ye(X,Q,x,V,Q.calendar),se("fixedrange");for(M=0;M<V.length;M++){oe=V[M],X=b[oe],Q=x[oe];var Ne=x[v(Q.anchor)],We=y("rangeslider","isVisible")(Ne);se("fixedrange",We)}f.handleDefaults(b,x,{axIds:ce.concat(Se).sort(u.idSort),axHasImage:H})},zv}var Iv,lb;function _I(){if(lb)return Iv;lb=1;var t=gt,e=lt,r=ge,a=$t,i=Bt;return Iv=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,C=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],M=F[1]-F[0];N[0]=(H[0]*(1-_)+_*F[0]-H[0])/(H[1]-H[0])*C,N[2]=C*(1-_+_*M/$),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]=C;if(R){var A=r.simpleMap(x.yr0,S.r2l),D=r.simpleMap(x.yr1,S.r2l),P=A[1]-A[0],I=D[1]-D[0];N[1]=(A[1]*(1-_)+_*D[1]-A[1])/(A[0]-A[1])*L,N[3]=L*(1-_+_*I/P),S.range[0]=T.l2r(A[0]*(1-_)+_*D[0]),S.range[1]=S.l2r(A[1]*(1-_)+_*D[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 O=E?C/N[2]:1,B=R?L/N[3]:1,G=E?N[0]:0,j=R?N[1]:0,q=E?N[0]/N[2]*C:0,V=R?N[1]/N[3]*L:0,K=T._offset-q,Y=S._offset-V;k.clipRect.call(a.setTranslate,G,j).call(a.setScale,1/O,1/B),k.plot.call(a.setTranslate,K,Y).call(a.setScale,O,B),a.setPointGroupScale(k.zoomScalePts,1/O,1/B),a.setTextPointsScale(k.zoomScaleTxt,1/O,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 C=0;C<l.length;C++)u(l[C].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 C=0;C<l.length;C++)u(l[C].plotinfo)})}var m,y,g,w=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(g),g=null,p()});function b(){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(),g=window.cancelAnimationFrame(b)):g=window.requestAnimationFrame(b)}return m=Date.now(),g=window.requestAnimationFrame(b),Promise.resolve()},Iv}var mu=gt,sb=lt,pc=ge,wI=vr,TI=$t,fb=ps.getModuleCalcData,Ei=sr,qa=Yr,kI=Pn,Nt=pc.ensureSingle;function uf(t,e,r){return pc.ensureSingle(t,e,r,function(a){a.datum(r)})}dr.name="cartesian";dr.attr=["xaxis","yaxis"];dr.idRoot=["x","y"];dr.idRegex=qa.idRegex;dr.attrRegex=qa.attrRegex;dr.attributes=eI();dr.layoutAttributes=Ja;dr.supplyLayoutDefaults=xI();dr.transitionAxes=_I();dr.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[Ei.id2name(c)]||{}).anchor,qa.idRegex.y.test(u)||(u="y"),n.push(c+u),o.push(c+u),s[u]||(s[u]=1,pc.pushUnique(i,u)));for(f=0;f<i.length;f++)u=i[f],s[u]||(c=(t[Ei.id2name(u)]||{}).anchor,qa.idRegex.x.test(c)||(c="x"),n.push(c+u),o.push(c+u),l[c]||(l[c]=1,pc.pushUnique(a,c)));if(!o.length){c="",u="";for(var h in t)if(qa.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?Ei.name2id(c):"x",u=u?Ei.name2id(u):"y",a.push(c),i.push(u),n.push(c+u)}};dr.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)}ek(t,f,c,r,a)}};function ek(t,e,r,a,i){for(var n=qa.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=sb.modules[d].categories;if(p.svg){var m=s.layerName||d+"layer",y=s.plot;f=fb(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(b,x){return b.i-x.i});var g=e.plot.selectAll("g.mlayer").data(u,function(b){return b.className});if(g.enter().append("g").attr("class",function(b){return b.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),g.exit().remove(),g.order(),g.each(function(b){var x=mu.select(this),_=b.className;b.plotMethod(t,e,b.cdModule,x,a,i),qa.clipOnAxisFalseQuery.indexOf("."+_)===-1&&TI.setClipUrl(x,e.layerClipId,t)}),o._has("scattergl")&&(s=sb.getModule("scattergl"),c=fb(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(qa.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")}}dr.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=Ei.listIds({_fullLayout:a});for(s=0;s<v.length;s++){var h=v[s];e[Ei.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)rk(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(),ak(m,a)}}};dr.drawFramework=function(t){var e=t._fullLayout,r=AI(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(rk,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=mu.select(this),tk(t,o),o.draglayer=Nt(e._draggers,"g",n)})};dr.rangePlot=function(t,e,r){tk(t,e),ek(t,e,r),wI.style(t)};function AI(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 g=[o,s.layer,f.layer,s.overlaying||"",f.overlaying||""];for(n=0;n<l.overlays.length;n++)g.push(l.overlays[n].id);y[i]=g}return y}function tk(t,e){var r=e.plotgroup,a=e.id,i=qa.layerValue2layerClass[e.xaxis.layer],n=qa.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,Nt(s.overlinesBelow,"path",c),Nt(s.overlinesBelow,"path",u),Nt(s.overaxesBelow,"g",c),Nt(s.overaxesBelow,"g",u),e.plot=Nt(s.overplot,"g",a),Nt(s.overlinesAbove,"path",c),Nt(s.overlinesAbove,"path",u),Nt(s.overaxesAbove,"g",c),Nt(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=Nt(r,"path","xlines-above"),e.ylines=Nt(r,"path","ylines-above"),e.xaxislayer=Nt(r,"g","xaxislayer-above"),e.yaxislayer=Nt(r,"g","yaxislayer-above");else{var l=Nt(r,"g","layer-subplot");e.shapelayer=Nt(l,"g","shapelayer"),e.imagelayer=Nt(l,"g","imagelayer"),e.minorGridlayer=Nt(r,"g","minor-gridlayer"),e.gridlayer=Nt(r,"g","gridlayer"),e.zerolinelayer=Nt(r,"g","zerolinelayer"),Nt(r,"path","xlines-below"),Nt(r,"path","ylines-below"),e.overlinesBelow=Nt(r,"g","overlines-below"),Nt(r,"g","xaxislayer-below"),Nt(r,"g","yaxislayer-below"),e.overaxesBelow=Nt(r,"g","overaxes-below"),e.plot=Nt(r,"g","plot"),e.overplot=Nt(r,"g","overplot"),e.xlines=Nt(r,"path","xlines-above"),e.ylines=Nt(r,"path","ylines-above"),e.overlinesAbove=Nt(r,"g","overlines-above"),Nt(r,"g","xaxislayer-above"),Nt(r,"g","yaxislayer-above"),e.overaxesAbove=Nt(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||(uf(e.minorGridlayer,"g",e.xaxis._id),uf(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map(function(v){return v[0]}).sort(Ei.idSort),uf(e.gridlayer,"g",e.xaxis._id),uf(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(v){return v[0]}).sort(Ei.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function rk(t,e){if(t){var r={};t.each(function(s){var f=s[0],c=mu.select(this);c.remove(),ak(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 ak(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}dr.toSVG=function(t){var e=t._fullLayout._glimages,r=mu.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:kI.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};dr.updateFx=m2().updateFx;var vf=Or,MI={hasLines:vf.hasLines,hasMarkers:vf.hasMarkers,hasText:vf.hasText,isBubble:vf.isBubble,attributes:Yi,layoutAttributes:Qh,supplyDefaults:rz,crossTraceDefaults:$2,supplyLayoutDefaults:fz,calc:qp.calc,crossTraceCalc:Rz,arraysToCalcdata:R2,plot:Bz,colorbar:_s,formatLabels:Z2,style:q0.style,styleOnSelect:q0.styleOnSelect,hoverPoints:Qz,selectPoints:Jz,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:dr,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(" ")}},SI=gt,LI=pt,cb=h2,em=ge,CI=em.strScale,DI=em.strRotate,$I=em.strTranslate,PI=function(e,r,a){var i=e.node(),n=cb[a.arrowhead||0],o=cb[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,g=h.y-d.y;if(p=Math.atan2(g,y),m=p+Math.PI,u&&v&&u+v>Math.sqrt(y*y+g*g)){N();return}if(u){if(u*u>y*y+g*g){N();return}var w=u*Math.cos(p),b=u*Math.sin(p);d.x+=w,d.y+=b,e.attr({x2:d.x,y2:d.y})}if(v){if(v*v>y*y+g*g){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),C=i.getPointAtLength(.1);p=Math.atan2(S.y-C.y,S.x-C.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,$,M,A){F.path&&(F.noRotate&&(M=0),SI.select(i.parentNode).append("path").attr({class:e.attr("class"),d:F.path,transform:$I($.x,$.y)+DI(M*180/Math.PI)+CI(A)}).style({fill:LI.rgb(a.arrowcolor),"stroke-width":0}))}f&&H(o,h,p,s),c&&H(n,d,m,l)},ub=gt,Fv=lt,EI=vr,ki=ge,Nv=ki.strTranslate,is=Bt,en=pt,ai=$t,vb=Na,Hv=_r,Ov=Ui,gl=ti,RI=Ot.arrayEditor,zI=PI,tm={draw:II,drawOne:ik,drawRaw:nk};function II(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&ik(t,r);return EI.previousPromises(t)}function ik(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=is.getFromId(t,a.xref),n=is.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),nk(t,a,e,!1,i,n)}function wi(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=is.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 nk(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=RI(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){ub.selectAll("#"+p).remove();return}var m={x:{},y:{}},y=+e.textangle||0,g=o._infolayer.append("g").classed(f,!0).attr("data-index",String(r)).style("opacity",e.opacity),w=g.append("g").classed("annotation-text-g",!0),b=s[e.showarrow?"annotationTail":"annotationPosition"],x=e.captureevents||s.annotationText||b;function _(A){var D={index:r,annotation:e._input,fullAnnotation:e,event:A};return a&&(D.subplotId=a),D}var k=w.append("g").style("pointer-events",x?"all":null).call(Ov,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",_(ub.event))});e.hovertext&&k.on("mouseover",function(){var A=e.hoverlabel,D=A.font,P=this.getBoundingClientRect(),I=t.getBoundingClientRect();vb.loneHover({x0:P.left-I.left,x1:P.right-I.left,y:(P.top+P.bottom)/2-I.top,text:e.hovertext,color:A.bgcolor,borderColor:A.bordercolor,fontFamily:D.family,fontSize:D.size,fontColor:D.color},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){vb.loneUnhover(o._hoverlayer.node())});var T=e.borderwidth,S=e.borderpad,C=T+S,L=k.append("rect").attr("class","bg").style("stroke-width",T+"px").call(en.stroke,e.bordercolor).call(en.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?ki.templateString(e.text,o._meta):e.text,F=k.append("text").classed("annotation-text",!0).text(H);function $(A){return A.call(ai.font,N).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),Hv.convertToTspans(A,t,M),A}function M(){var A=F.selectAll("a");if(A.size()===1&&A.text()===F.text()){var D=k.insert("a",":first-child").attr({"xlink:xlink:href":A.attr("xlink:href"),"xlink:xlink:show":A.attr("xlink:show")}).style({cursor:"pointer"});D.node().appendChild(L.node())}var P=k.select(".annotation-text-math-group"),I=!P.empty(),O=ai.bBox((I?P:F).node()),B=O.width,G=O.height,j=e.width||B,q=e.height||G,V=Math.round(j+2*C),K=Math.round(q+2*C);function Y(Ye,Ne){return Ne==="auto"&&(Ye<1/3?Ne="left":Ye>2/3?Ne="right":Ne="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ne]}for(var te=!1,oe=["x","y"],_e=0;_e<oe.length;_e++){var de=oe[_e],X=e[de+"ref"]||de,Q=e["a"+de+"ref"],le={x:i,y:n}[de],se=(y+(de==="x"?0:-90))*Math.PI/180,he=V*Math.cos(se),Te=K*Math.sin(se),fe=Math.abs(he)+Math.abs(Te),Ae=e[de+"anchor"],ce=e[de+"shift"]*(de==="x"?1:-1),ye=m[de],Se,Me,J,xe,re,ue=is.getRefType(X);if(le&&ue!=="domain"){var pe=le.r2fraction(e[de]);(pe<0||pe>1)&&(Q===X?(pe=le.r2fraction(e["a"+de]),(pe<0||pe>1)&&(te=!0)):te=!0),Se=le._offset+le.r2p(e[de]),xe=.5}else{var De=ue==="domain";de==="x"?(J=e[de],Se=De?le._offset+le._length*J:Se=l.l+l.w*J):(J=1-e[de],Se=De?le._offset+le._length*J:Se=l.t+l.h*J),xe=e.showarrow?.5:J}if(e.showarrow){ye.head=Se;var $e=e["a"+de];if(re=he*Y(.5,e.xanchor)-Te*Y(.5,e.yanchor),Q===X){var me=is.getRefType(Q);me==="domain"?(de==="y"&&($e=1-$e),ye.tail=le._offset+le._length*$e):me==="paper"?de==="y"?($e=1-$e,ye.tail=l.t+l.h*$e):ye.tail=l.l+l.w*$e:ye.tail=le._offset+le.r2p($e),Me=re}else ye.tail=Se+$e,Me=re+$e;ye.text=ye.tail+re;var ke=o[de==="x"?"width":"height"];if(X==="paper"&&(ye.head=ki.constrain(ye.head,1,ke-1)),Q==="pixel"){var Ve=-Math.max(ye.tail-3,ye.text),Ie=Math.min(ye.tail+3,ye.text)-ke;Ve>0?(ye.tail+=Ve,ye.text+=Ve):Ie>0&&(ye.tail-=Ie,ye.text-=Ie)}ye.tail+=ce,ye.head+=ce}else re=fe*Y(xe,Ae),Me=re,ye.text=Se+re;ye.text+=ce,re+=ce,Me+=ce,e["_"+de+"padplus"]=fe/2+Me,e["_"+de+"padminus"]=fe/2-Me,e["_"+de+"size"]=fe,e["_"+de+"shift"]=re}if(te){k.remove();return}var Oe=0,Xe=0;if(e.align!=="left"&&(Oe=(j-B)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Xe=(q-G)*(e.valign==="middle"?.5:1)),I)P.select("svg").attr({x:C+Oe-1,y:C+Xe}).call(ai.setClipUrl,E?p:null,t);else{var it=C+Xe-O.top,be=C+Oe-O.left;F.call(Hv.positionText,be,it).call(ai.setClipUrl,E?p:null,t)}R.select("rect").call(ai.setRect,C,C,j,q),L.call(ai.setRect,T/2,T/2,V-T,K-T),k.call(ai.setTranslate,Math.round(m.x.text-V/2),Math.round(m.y.text-K/2)),w.attr({transform:"rotate("+y+","+m.x.text+","+m.y.text+")"});var Ue=function(Ye,Ne){g.selectAll(".annotation-arrow-g").remove();var We=m.x.head,Qe=m.y.head,z=m.x.tail+Ye,W=m.y.tail+Ne,U=m.x.text+Ye,Z=m.y.text+Ne,ne=ki.rotationXYMatrix(y,U,Z),ie=ki.apply2DTransform(ne),Le=ki.apply2DTransform2(ne),we=+L.attr("width"),ve=+L.attr("height"),ee=U-.5*we,Pe=ee+we,Re=Z-.5*ve,He=Re+ve,tt=[[ee,Re,ee,He],[ee,He,Pe,He],[Pe,He,Pe,Re],[Pe,Re,ee,Re]].map(Le);if(!tt.reduce(function(Je,yt){return Je^!!ki.segmentsIntersect(We,Qe,We+1e6,Qe+1e6,yt[0],yt[1],yt[2],yt[3])},!1)){tt.forEach(function(Je){var yt=ki.segmentsIntersect(z,W,We,Qe,Je[0],Je[1],Je[2],Je[3]);yt&&(z=yt.x,W=yt.y)});var ft=e.arrowwidth,dt=e.arrowcolor,at=e.arrowside,Rt=g.append("g").style({opacity:en.opacity(dt)}).classed("annotation-arrow-g",!0),mt=Rt.append("path").attr("d","M"+z+","+W+"L"+We+","+Qe).style("stroke-width",ft+"px").call(en.stroke,en.rgb(dt));if(zI(mt,at,e),s.annotationPosition&&mt.node().parentNode&&!a){var rt=We,Lt=Qe;if(e.standoff){var bt=Math.sqrt(Math.pow(We-z,2)+Math.pow(Qe-W,2));rt+=e.standoff*(z-We)/bt,Lt+=e.standoff*(W-Qe)/bt}var ht=Rt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(z-rt)+","+(W-Lt),transform:Nv(rt,Lt)}).style("stroke-width",ft+6+"px").call(en.stroke,"rgba(0,0,0,0)").call(en.fill,"rgba(0,0,0,0)"),ct,qe;gl.init({element:ht.node(),gd:t,prepFn:function(){var Je=ai.getTranslate(k);ct=Je.x,qe=Je.y,i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0)},moveFn:function(Je,yt){var Mt=ie(ct,qe),Ze=Mt[0]+Je,Ct=Mt[1]+yt;k.call(ai.setTranslate,Ze,Ct),h("x",wi(i,Je,"x",l,e)),h("y",wi(n,yt,"y",l,e)),e.axref===e.xref&&h("ax",wi(i,Je,"ax",l,e)),e.ayref===e.yref&&h("ay",wi(n,yt,"ay",l,e)),Rt.attr("transform",Nv(Je,yt)),w.attr({transform:"rotate("+y+","+Ze+","+Ct+")"})},doneFn:function(){Fv.call("_guiRelayout",t,d());var Je=document.querySelector(".js-notes-box-panel");Je&&Je.redraw(Je.selectedObj)}})}}};if(e.showarrow&&Ue(0,0),b){var Be;gl.init({element:k.node(),gd:t,prepFn:function(){Be=w.attr("transform")},moveFn:function(Ye,Ne){var We="pointer";if(e.showarrow)e.axref===e.xref?h("ax",wi(i,Ye,"ax",l,e)):h("ax",e.ax+Ye),e.ayref===e.yref?h("ay",wi(n,Ne,"ay",l.w,e)):h("ay",e.ay+Ne),Ue(Ye,Ne);else{if(a)return;var Qe,z;if(i)Qe=wi(i,Ye,"x",l,e);else{var W=e._xsize/l.w,U=e.x+(e._xshift-e.xshift)/l.w-W/2;Qe=gl.align(U+Ye/l.w,W,0,1,e.xanchor)}if(n)z=wi(n,Ne,"y",l,e);else{var Z=e._ysize/l.h,ne=e.y-(e._yshift+e.yshift)/l.h-Z/2;z=gl.align(ne-Ne/l.h,Z,0,1,e.yanchor)}h("x",Qe),h("y",z),(!i||!n)&&(We=gl.getCursor(i?.5:Qe,n?.5:z,e.xanchor,e.yanchor))}w.attr({transform:Nv(Ye,Ne)+Be}),Ov(k,We)},clickFn:function(Ye,Ne){e.captureevents&&t.emit("plotly_clickannotation",_(Ne))},doneFn:function(){Ov(k),Fv.call("_guiRelayout",t,d());var Ye=document.querySelector(".js-notes-box-panel");Ye&&Ye.redraw(Ye.selectedObj)}})}}s.annotationText?F.call(Hv.makeEditable,{delegate:k,gd:t}).call($).on("edit",function(A){e.text=A,this.call($),h("text",A),i&&i.autorange&&v(i._name+".autorange",!0),n&&n.autorange&&v(n._name+".autorange",!0),Fv.call("_guiRelayout",t,d())}):F.call($)}var db=ge,FI=lt,hb=Ot.arrayEditor,NI={hasClickToShow:HI,onClick:OI};function HI(t,e){var r=ok(t,e);return r.on.length>0||r.explicitOff.length>0}function OI(t,e){var r=ok(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=hb(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),db.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=hb(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),db.extendFlat(n,s.getUpdateObj());return FI.call("update",t,{},n)}}function ok(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 mb=ge,Xn=pt,lk=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=Xn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),mb.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:Xn.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||(Xn.opacity(n)?Xn.rgb(n):Xn.defaultLine)),y=i("hoverlabel.bordercolor",p.bordercolor||Xn.contrast(m));mb.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||y})}i("captureevents",!!d)},jv=ge,tn=Bt,jI=ei,BI=lk,GI=bs,UI=function(e,r){jI(e,r,{name:"annotations",handleItemDefaults:VI})};function VI(t,e,r){function a(w,b){return jv.coerce(t,e,GI,w,b)}var i=a("visible"),n=a("clicktoshow");if(i||n){BI(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=tn.coerceRef(t,e,f,u,"","paper");if(v!=="paper"){var h=tn.getFromId(f,v);h._annIndices.push(e._index)}if(tn.coercePosition(e,f,a,v,u,.5),o){var d="a"+u,p=tn.coerceRef(t,e,f,d,"pixel",["pixel","paper"]);p!=="pixel"&&p!==v&&(p=e[d]="pixel");var m=p==="pixel"?s[c]:.4;tn.coercePosition(e,f,a,p,d,m)}a(u+"anchor"),a(u+"shift")}if(jv.noneOrAll(t,e,["x","y"]),o&&jv.noneOrAll(t,e,["ax","ay"]),n){var y=a("xclick"),g=a("yclick");e._xclick=y===void 0?e.x:tn.cleanPosition(y,f,e.xref),e._yclick=g===void 0?e.y:tn.cleanPosition(g,f,e.yref)}}}var vh=ge,vn=Bt,XI=tm.draw,YI=function(e){var r=e._fullLayout,a=vh.filterVisible(r.annotations);if(a.length&&e._fullData.length)return vh.syncOrAsync([XI,WI],e)};function WI(t){var e=t._fullLayout;vh.filterVisible(e.annotations).forEach(function(r){var a=vn.getFromId(t,r.xref),i=vn.getFromId(t,r.yref),n=vn.getRefType(r.xref),o=vn.getRefType(r.yref);r._extremes={},n==="range"&&yb(r,a),o==="range"&&yb(r,i)})}function yb(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 g=vn.findExtremes(e,[e.r2c(i)],{ppadplus:v,ppadminus:h}),w=vn.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,m)});y={min:[g.min[0],w.min[0]],max:[g.max[0],w.max[0]]}}else p=n?p+n:p,m=n?m-n:m,y=vn.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,v,p),ppadminus:Math.max(f,h,m)});t._extremes[r]=y}var qI=wt,ZI=Ih,KI=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=ZI(d,r.range):p=Math.pow(10,d),qI(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)},Bv=tm,gb=NI,QI={moduleType:"component",name:"annotations",layoutAttributes:bs,supplyLayoutDefaults:UI,includeBasePlot:uu("annotations"),calcAutorange:YI,draw:Bv.draw,drawOne:Bv.drawOne,drawRaw:Bv.drawRaw,hasClickToShow:gb.hasClickToShow,onClick:gb.onClick,convertCoords:KI},Xt=bs,JI=Za.overrideAll,eF=Ot.templatedArray,dh=JI(eF("annotation",{visible:Xt.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:Xt.xanchor,xshift:Xt.xshift,yanchor:Xt.yanchor,yshift:Xt.yshift,text:Xt.text,textangle:Xt.textangle,font:Xt.font,width:Xt.width,height:Xt.height,opacity:Xt.opacity,align:Xt.align,valign:Xt.valign,bgcolor:Xt.bgcolor,bordercolor:Xt.bordercolor,borderpad:Xt.borderpad,borderwidth:Xt.borderwidth,showarrow:Xt.showarrow,arrowcolor:Xt.arrowcolor,arrowhead:Xt.arrowhead,startarrowhead:Xt.startarrowhead,arrowside:Xt.arrowside,arrowsize:Xt.arrowsize,startarrowsize:Xt.startarrowsize,arrowwidth:Xt.arrowwidth,standoff:Xt.standoff,startstandoff:Xt.startstandoff,hovertext:Xt.hovertext,hoverlabel:Xt.hoverlabel,captureevents:Xt.captureevents}),"calc","from-root"),Gv=ge,tF=Bt,rF=ei,aF=lk,iF=dh,nF=function(e,r,a){rF(e,r,{name:"annotations",handleItemDefaults:oF,fullLayout:a.fullLayout})};function oF(t,e,r,a){function i(l,s){return Gv.coerce(t,e,iF,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],tF.coercePosition(e,f,i,l,l,.5)}var o=i("visible");o&&(aF(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),Gv.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),Gv.noneOrAll(t,e,["ax","ay"])))}var bb=ge,xb=Bt,lF=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)sF(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function sF(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={},bb.extendFlat(t._xa,n),xb.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={},bb.extendFlat(t._ya,n),xb.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 Uv(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 fF(t,e){var r=Uv(t.projection,Uv(t.view,Uv(t.model,[e[0],e[1],e[2],1])));return r}var cF=fF,uF=tm.drawRaw,vF=cF,dF=["x","y","z"],hF=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=dF[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=vF(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),uF(e.graphDiv,o,n,e.id,o._xa,o._ya))}},pF=lt,_b=ge,mF={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:dh}}},layoutAttributes:dh,handleDefaults:nF,includeBasePlot:yF,convert:lF,draw:hF};function yF(t,e){var r=pF.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&&(_b.pushUnique(e._basePlotModules,r),_b.pushUnique(e._subplots.gl3d,o))}}var wb=bs,Tb=Dr,kb=Yi.line,gF=ia.dash,La=Qt.extendFlat,bF=Ot.templatedArray,Ab=fu,Yn=Ta,xF=Rr.shapeTexttemplateAttrs,_F=Bh,sk=bF("shape",{visible:La({},Yn.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:La({},Yn.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:La({},Yn.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:La({},Yn.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Tb({editType:"calc+arraydraw",description:["Sets this legend group's title font."].join(" ")}),editType:"calc+arraydraw"},legendrank:La({},Yn.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:La({},Yn.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:La({},wb.xref,{description:["Sets the shape's x coordinate axis.",Ab.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:La({},wb.yref,{description:["Sets the shape's y coordinate axis.",Ab.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:La({},kb.color,{editType:"arraydraw"}),width:La({},kb.width,{editType:"calc+arraydraw"}),dash:La({},gF,{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:xF({},{keys:Object.keys(_F)}),font:Tb({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=ge,Wn=Bt,wF=ei,TF=sk,Mb=Xi,kF=function(e,r){wF(e,r,{name:"shapes",handleItemDefaults:MF})};function AF(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function MF(t,e,r){function a(A,D){return bl.coerce(t,e,TF,A,D)}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,g={_fullLayout:r},w,b,x,_=Wn.coerceRef(t,e,g,p,void 0,"paper"),k=Wn.getRefType(_);if(k==="range"?(w=Wn.getFromId(g,_),w._shapeIndices.push(e._index),x=Mb.rangeToShapePosition(w),b=Mb.shapePositionToRange(w)):b=x=bl.identity,f){var T=.25,S=.75,C=p+"0",L=p+"1",E=t[C],R=t[L];t[C]=b(t[C],!0),t[L]=b(t[L],!0),y==="pixel"?(a(C,0),a(L,10)):(Wn.coercePosition(e,g,a,_,C,T),Wn.coercePosition(e,g,a,_,L,S)),e[C]=x(e[C]),e[L]=x(e[L]),t[C]=E,t[L]=R}if(y==="pixel"){var N=t[m];t[m]=b(t[m],!0),Wn.coercePosition(e,g,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 M=a("label.textposition",H?"middle":"middle center");a("label.xanchor"),a("label.yanchor",AF(H,M)),a("label.padding"),bl.coerceFont(a,"label.font",r.font)}}}var SF=pt,Sb=ge;function LF(t,e){return t?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}var CF=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"),Sb.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",SF.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",LF(o,f)),a("newshape.label.padding"),Sb.coerceFont(a,"newshape.label.font",r.font)}a("activeshape.fillcolor"),a("activeshape.opacity")},hh=ge,qn=Bt,zo=ru,fk=Xi,DF=function(e){var r=e._fullLayout,a=hh.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=qn.getRefType(n.xref),f=qn.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=qn.getFromId(e,n.xref),l=Lb(o,c,u,n.path,zo.paramIsX),l&&(n._extremes[o._id]=qn.findExtremes(o,l,$F(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=qn.getFromId(e,n.yref),l=Lb(o,v,h,n.path,zo.paramIsY),l&&(n._extremes[o._id]=qn.findExtremes(o,l,PF(n)))}}};function $F(t){return ck(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function PF(t){return ck(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function ck(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?fk.extractPathCoords(i,n?zo.paramIsY:zo.paramIsX):[r,a],f=hh.aggNums(Math.max,null,s),c=hh.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 Lb(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(zo.segmentRE),f,c,u,v,h;for(t.type==="date"&&(n=fk.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(zo.paramRE),!(!v||v.length<u)&&(h=n(v[u]),h<o&&(o=h),h>l&&(l=h)));if(l>=o)return[o,l]}}var Cb=Cp,EF={moduleType:"component",name:"shapes",layoutAttributes:sk,supplyLayoutDefaults:kF,supplyDrawNewShapeDefaults:CF,includeBasePlot:uu("shapes"),calcAutorange:DF,draw:Cb.draw,drawOne:Cb.drawOne},Db=Yr,RF=Ot.templatedArray,$b=fu,uk=RF("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",Db.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",$b.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",Db.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",$b.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),zF=ge,Vv=Bt,IF=ei,FF=uk,NF="images",HF=function(e,r){var a={name:NF,handleItemDefaults:OF};IF(e,r,a)};function OF(t,e,r){function a(v,h){return zF.coerce(t,e,FF,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=Vv.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var u=Vv.getFromId(o,c);u._imgIndices.push(e._index)}Vv.coercePosition(e,o,a,c,f,0)}return e}var Pb=gt,jF=$t,Zn=Bt,Eb=sr,BF=Pn,GF=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=Eb.ref2id(s.xref)+Eb.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(g){var w=Pb.select(this);if(this._imgSrc!==g.source)if(w.attr("xmlns",BF.svg),g.source&&g.source.slice(0,5)==="data:")w.attr("xlink:href",g.source),this._imgSrc=g.source;else{var b=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 C=T.toDataURL("image/png");w.attr("xlink:href",C),x()},w.on("error",k),_.src=g.source,this._imgSrc=g.source;function k(){w.remove(),x()}}).bind(this));e._promises.push(b)}}function v(g){var w=Pb.select(this),b=Zn.getFromId(e,g.xref),x=Zn.getFromId(e,g.yref),_=Zn.getRefType(g.xref)==="domain",k=Zn.getRefType(g.yref)==="domain",T=r._size,S,C;b!==void 0?S=typeof g.xref=="string"&&_?b._length*g.sizex:Math.abs(b.l2p(g.sizex)-b.l2p(0)):S=g.sizex*T.w,x!==void 0?C=typeof g.yref=="string"&&k?x._length*g.sizey:Math.abs(x.l2p(g.sizey)-x.l2p(0)):C=g.sizey*T.h;var L=S*c.x[g.xanchor].offset,E=C*c.y[g.yanchor].offset,R=c.x[g.xanchor].sizing+c.y[g.yanchor].sizing,N,H;switch(b!==void 0?N=typeof g.xref=="string"&&_?b._length*g.x+b._offset:b.r2p(g.x)+b._offset:N=g.x*T.w+T.l,N+=L,x!==void 0?H=typeof g.yref=="string"&&k?x._length*(1-g.y)+x._offset:x.r2p(g.y)+x._offset:H=T.h-g.y*T.h+T.t,H+=E,g.sizing){case"fill":R+=" slice";break;case"stretch":R="none";break}w.attr({x:N,y:H,width:S,height:C,preserveAspectRatio:R,opacity:g.opacity});var F=b&&Zn.getRefType(g.xref)!=="domain"?b._id:"",$=x&&Zn.getRefType(g.yref)!=="domain"?x._id:"",M=F+$;jF.setClipUrl(w,M?"clip"+r._uid+M: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(g){u.bind(this)(g),v.bind(this)(g)}),d.each(function(g){u.bind(this)(g),v.bind(this)(g)});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(g){u.bind(this)(g),v.bind(this)(g)})}}},Rb=wt,UF=Ih,VF=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=UF(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));Rb(d)?Rb(p)||(p=null):(d=null,p=null),i(c+s,d),i(c+"size"+s,p)}}},XF={moduleType:"component",name:"images",layoutAttributes:uk,supplyLayoutDefaults:HF,includeBasePlot:uu("images"),draw:GF,convertCoords:VF},rm={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:"▼"}},YF=Dr,WF=Hr,qF=Qt.extendFlat,ZF=Za.overrideAll,KF=Gh,vk=Ot.templatedArray,QF=vk("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(" ")}}),dk=ZF(vk("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:QF,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:qF(KF({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:YF({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:WF.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"),Of=ge,hk=ei,pk=dk,JF=rm,eN=JF.name,tN=pk.buttons,rN=function(e,r){var a={name:eN,handleItemDefaults:aN};hk(e,r,a)};function aN(t,e,r){function a(o,l){return Of.coerce(t,e,pk,o,l)}var i=hk(t,e,{name:"buttons",handleItemDefaults:iN}),n=a("visible",i.length>0);n&&(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Of.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Of.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function iN(t,e){function r(i,n){return Of.coerce(t,e,tN,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 nN=Jt,Ra=gt,zb=pt,Ao=$t,mc=ge;function Jt(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})}Jt.barWidth=2;Jt.barLength=20;Jt.barRadius=2;Jt.barPad=1;Jt.barColor="#808BA4";Jt.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,g,w,b,x;!v&&!h&&!d&&!p&&(this.position.direction="down",v=!0);var _=v||p;_?(g=l,w=g+m,v?(b=f,x=Math.min(b+y,o),y=x-b):(x=f+y,b=Math.max(x-y,0),y=x-b)):(b=f,x=b+y,h?(w=l+m,g=Math.max(w-m,0),m=w-g):(g=l,w=Math.min(g+m,n),m=w-g)),this._box={l:g,t:b,w:m,h:y};var k=s>m,T=Jt.barLength+2*Jt.barPad,S=Jt.barWidth+2*Jt.barPad,C=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(zb.fill,Jt.barColor),k?(this.hbar=E.attr({rx:Jt.barRadius,ry:Jt.barRadius,x:C,y:L,width:T,height:S}),this._hbarXMin=C+T/2,this._hbarTranslateMax=m-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var R=c>y,N=Jt.barWidth+2*Jt.barPad,H=Jt.barLength+2*Jt.barPad,F=l+s,$=f;F+N>n&&(F=n-N);var M=this.container.selectAll("rect.scrollbar-vertical").data(R?[0]:[]);M.exit().on(".drag",null).remove(),M.enter().append("rect").classed("scrollbar-vertical",!0).call(zb.fill,Jt.barColor),R?(this.vbar=M.attr({rx:Jt.barRadius,ry:Jt.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 A=this.id,D=g-.5,P=R?w+N+.5:w+.5,I=b-.5,O=k?x+S+.5:x+.5,B=i._topdefs.selectAll("#"+A).data(k||R?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",A).append("rect"),k||R?(this._clipRect=B.select("rect").attr({x:Math.floor(D),y:Math.floor(I),width:Math.ceil(P)-Math.floor(D),height:Math.ceil(O)-Math.floor(I)}),this.container.call(Ao.setClipUrl,A,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(Ao.setClipUrl,null),delete this._clipRect),k||R){var G=Ra.behavior.drag().on("dragstart",function(){Ra.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 j=Ra.behavior.drag().on("dragstart",function(){Ra.event.sourceEvent.preventDefault(),Ra.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(j),R&&this.vbar.on(".drag",null).call(j)}this.setTranslate(r,a)};Jt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Ao.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)};Jt.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=Ra.event.dx),this.vbar&&(r-=Ra.event.dy),this.setTranslate(e,r)};Jt.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=Ra.event.deltaY),this.vbar&&(r+=Ra.event.deltaY),this.setTranslate(e,r)};Jt.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=mc.constrain(Ra.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=mc.constrain(Ra.event.y,s,f),u=(c-s)/(f-s),v=this.position.h-this._box.h;r=u*v}this.setTranslate(e,r)};Jt.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=mc.constrain(e||0,0,a),r=mc.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(Ao.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(Ao.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(Ao.setTranslate,e,r+o*this._vbarTranslateMax)}};var Io=gt,ns=vr,os=pt,Fo=$t,oa=ge,yc=_r,oN=Ot.arrayEditor,mk=Wr.LINE_SPACING,ut=rm,lN=nN,sN=function(e){var r=e._fullLayout,a=oa.filterVisible(r[ut.name]);function i(v){ns.autoMargin(e,_k(v))}var n=r._menulayer.selectAll("g."+ut.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(ut.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){Io.select(this).selectAll("g."+ut.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+ut.headerGroupClassName).data(a,fN);o.enter().append("g").classed(ut.headerGroupClassName,!0);for(var l=oa.ensureSingle(n,"g",ut.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];pN(e,f)}var c="updatemenus"+r._uid,u=new lN(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(mh)),o.exit().each(function(v){l.call(mh),i(v)}).remove(),o.each(function(v){var h=Io.select(this),d=v.type==="dropdown"?l:null;ns.manageCommandObserver(e,v,v.buttons,function(p){ph(e,v,v.buttons[p.index],h,d,u,p.index,!0)}),v.type==="dropdown"?(gk(e,h,l,u,v),yk(l,v)&&ls(e,h,l,u,v)):ls(e,h,null,null,v)})}};function fN(t){return t._index}function cN(t){return+t.attr(ut.menuIndexAttrName)==-1}function yk(t,e){return+t.attr(ut.menuIndexAttrName)===e._index}function ph(t,e,r,a,i,n,o,l){e.active=o,oN(t.layout,ut.name,e).applyUpdate("active",o),e.type==="buttons"?ls(t,a,null,null,e):e.type==="dropdown"&&(i.attr(ut.menuIndexAttrName,"-1"),gk(t,a,i,n,e),l||ls(t,a,i,n,e))}function gk(t,e,r,a,i){var n=oa.ensureSingle(e,"g",ut.headerClassName,function(v){v.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||ut.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(am,i,s,t).call(wk,i,f,c);var u=oa.ensureSingle(e,"text",ut.headerArrowClassName,function(v){v.attr("text-anchor","end").call(Fo.font,i.font).text(ut.arrowSymbol[i.direction])});u.attr({x:o.headerWidth-ut.arrowOffsetX+i.pad.l,y:o.headerHeight/2+ut.textOffsetY+i.pad.t}),n.on("click",function(){r.call(mh,String(yk(r,i)?-1:i._index)),ls(t,e,r,a,i)}),n.on("mouseover",function(){n.call(bk)}),n.on("mouseout",function(){n.call(xk,i)}),Fo.setTranslate(e,o.lx,o.ly)}function ls(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!cN(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?ut.dropdownButtonClassName:ut.buttonClassName,l=r.selectAll("g."+o).data(oa.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+ut.gapButtonHeader:c=v.headerWidth+ut.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(u=-ut.gapButtonHeader+ut.gapButton-v.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-ut.gapButtonHeader+ut.gapButton-v.openWidth);var d={x:v.lx+c+i.pad.l,y:v.ly+u+i.pad.t,yPad:ut.gapButton,xPad:ut.gapButton,index:0},p={l:d.x+i.borderwidth,t:d.y+i.borderwidth};l.each(function(m,y){var g=Io.select(this);g.call(am,i,m,t).call(wk,i,d),g.on("click",function(){Io.event.defaultPrevented||(m.execute&&(m.args2&&i.active===y?(ph(t,i,m,e,r,a,-1),ns.executeAPICommand(t,m.method,m.args2)):(ph(t,i,m,e,r,a,y),ns.executeAPICommand(t,m.method,m.args))),t.emit("plotly_buttonclicked",{menu:i,button:m,active:i.active}))}),g.on("mouseover",function(){g.call(bk)}),g.on("mouseout",function(){g.call(xk,i),l.call(Ib,i)})}),l.call(Ib,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()?uN(t,e,r,a,i,p):vN(a))}function uN(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]+ut.gapButton;else for(c=0,v=0;v<f;v++)c+=s.widths[v]+ut.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 vN(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 am(t,e,r,a){t.call(dN,e).call(hN,e,r,a)}function dN(t,e){var r=oa.ensureSingle(t,"rect",ut.itemRectClassName,function(a){a.attr({rx:ut.rx,ry:ut.ry,"shape-rendering":"crispEdges"})});r.call(os.stroke,e.bordercolor).call(os.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function hN(t,e,r,a){var i=oa.ensureSingle(t,"text",ut.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=oa.templateString(n,o)),i.call(Fo.font,e.font).text(n).call(yc.convertToTspans,a)}function Ib(t,e){var r=e.active;t.each(function(a,i){var n=Io.select(this);i===r&&e.showactive&&n.select("rect."+ut.itemRectClassName).call(os.fill,ut.activeColor)})}function bk(t){t.select("rect."+ut.itemRectClassName).call(os.fill,ut.hoverColor)}function xk(t,e){t.select("rect."+ut.itemRectClassName).call(os.fill,e.bgcolor)}function pN(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=Fo.tester.selectAll("g."+ut.dropdownButtonClassName).data(oa.filterVisible(e.buttons));a.enter().append("g").classed(ut.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,u){var v=Io.select(this);v.call(am,e,c,t);var h=v.select("."+ut.itemTextClassName),d=h.node()&&Fo.bBox(h.node()).width,p=Math.max(d+ut.textPadX,ut.minWidth),m=e.font.size*mk,y=yc.lineCount(h),g=Math.max(m*y,ut.minHeight)+ut.textOffsetY;g=Math.ceil(g),p=Math.ceil(p),r.widths[u]=p,r.heights[u]=g,r.height1=Math.max(r.height1,g),r.width1=Math.max(r.width1,p),i?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=g+ut.gapButton,r.openHeight+=g+ut.gapButton):(r.totalWidth+=p+ut.gapButton,r.openWidth+=p+ut.gapButton,r.totalHeight=Math.max(r.totalHeight,g),r.openHeight=r.totalHeight)}),i?r.totalHeight-=ut.gapButton:r.totalWidth-=ut.gapButton,r.headerWidth=r.width1+ut.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=ut.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=ut.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";oa.isRightAnchor(e)&&(r.lx-=n,s="right"),oa.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";oa.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),oa.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),ns.autoMargin(t,_k(e),{x:e.x,y:e.y,l:n*({right:1,center:.5}[s]||0),r:n*({left:1,center:.5}[s]||0),b:o*({top:1,middle:.5}[f]||0),t:o*({bottom:1,middle:.5}[f]||0)})}function _k(t){return ut.autoMarginIdRoot+t._index}function wk(t,e,r,a){a=a||{};var i=t.select("."+ut.itemRectClassName),n=t.select("."+ut.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;Fo.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*mk,v=yc.lineCount(n),h=(v-1)*u/2;yc.positionText(n,ut.textOffsetX,c/2-h+ut.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function mh(t,e){t.attr(ut.menuIndexAttrName,e||"-1").selectAll("g."+ut.dropdownButtonClassName).remove()}var mN=rm,yN={moduleType:"component",name:mN.name,layoutAttributes:dk,supplyLayoutDefaults:rN,draw:sN},yu={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},Fb=Dr,gN=Gh,bN=Qt.extendDeepAll,xN=Za.overrideAll,_N=Fc,Tk=Ot.templatedArray,rn=yu,wN=Tk("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(" ")}}),kk=xN(Tk("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:wN,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:bN(gN({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:_N.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:Fb({description:"Sets the font of the current value label text."})},font:Fb({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:rn.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:rn.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:rn.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:rn.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:rn.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:rn.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:rn.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),uo=ge,Ak=ei,Mk=kk,TN=yu,kN=TN.name,AN=Mk.steps,MN=function(e,r){Ak(e,r,{name:kN,handleItemDefaults:SN})};function SN(t,e,r){function a(u,v){return uo.coerce(t,e,Mk,u,v)}for(var i=Ak(t,e,{name:"steps",handleItemDefaults:LN}),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=uo.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),uo.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"),uo.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),uo.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 LN(t,e){function r(n,o){return uo.coerce(t,e,AN,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 za=gt,gc=vr,Ni=pt,Fa=$t,la=ge,CN=la.strTranslate,Nl=_r,DN=Ot.arrayEditor,xt=yu,im=Wr,Sk=im.LINE_SPACING,Xv=im.FROM_TL,Yv=im.FROM_BR,$N=function(e){var r=e._context.staticPlot,a=e._fullLayout,i=PN(a,e),n=a._infolayer.selectAll("g."+xt.containerClassName).data(i.length>0?[0]:[]);n.enter().append("g").classed(xt.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),gc.autoMargin(e,Lk(c))}if(n.exit().each(function(){za.select(this).selectAll("g."+xt.groupClassName).each(o)}).remove(),i.length!==0){var l=n.selectAll("g."+xt.groupClassName).data(i,EN);l.enter().append("g").classed(xt.groupClassName,!0),l.exit().each(o).remove();for(var s=0;s<i.length;s++){var f=i[s];RN(e,f)}l.each(function(c){var u=za.select(this);HN(c),gc.manageCommandObserver(e,c,c._visibleSteps,function(v){var h=u.data()[0];h.active!==v.index&&(h._dragging||Dk(e,u,h,v.index,!1,!0))}),zN(e,za.select(this),c)})}};function Lk(t){return xt.autoMarginIdRoot+t._index}function PN(t,e){for(var r=t[xt.name],a=[],i=0;i<r.length;i++){var n=r[i];n.visible&&(n._gd=e,a.push(n))}return a}function EN(t){return t._index}function RN(t,e){var r=Fa.tester.selectAll("g."+xt.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(xt.labelGroupClass,!0);var a=0,i=0;r.each(function(d){var p=za.select(this),m=Ck(p,{step:d},e),y=m.node();if(y){var g=Fa.bBox(y);i=Math.max(i,g.height),a=Math.max(a,g.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(xt.railWidth,xt.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*xt.stepInset,s=l/(e._stepCount-1),f=a+xt.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=Fa.tester.append("g");r.each(function(d){var p=bc(c,e,d.label),m=p.node()&&Fa.bBox(p.node())||{width:0,height:0},y=Nl.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+xt.tickOffset+e.ticklen+xt.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var u="left";la.isRightAnchor(e)&&(n.lx-=n.outerLength,u="right"),la.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,u="center");var v="top";la.isBottomAnchor(e)&&(n.ly-=n.height,v="bottom"),la.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*Yv[v],t:n.height*Xv[v]};e.lenmode==="fraction"?(h.l=0,h.xl=e.x-e.len*Xv[u],h.r=0,h.xr=e.x+e.len*Yv[u]):(h.x=e.x,h.l=n.outerLength*Xv[u],h.r=n.outerLength*Yv[u]),gc.autoMargin(t,Lk(e),h)}function zN(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(bc,r).call(jN,r).call(FN,r).call(NN,r).call(ON,t,r).call(IN,t,r);var a=r._dims;Fa.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(Pk,r,!1),e.call(bc,r)}function bc(t,e,r){if(e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-xt.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=xt.currentValueInset,n="left"}var o=la.ensureSingle(t,"text",xt.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=la.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(Fa.font,e.currentvalue.font).text(l).call(Nl.convertToTspans,e._gd);var c=Nl.lineCount(o),u=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*Sk;return Nl.positionText(o,i,u),o}}function IN(t,e,r){var a=la.ensureSingle(t,"rect",xt.gripRectClass,function(i){i.call($k,e,t,r).style("pointer-events","all")});a.attr({width:xt.gripWidth,height:xt.gripHeight,rx:xt.gripRadius,ry:xt.gripRadius}).call(Ni.stroke,r.bordercolor).call(Ni.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function Ck(t,e,r){var a=la.ensureSingle(t,"text",xt.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=la.templateString(i,n)),a.call(Fa.font,r.font).text(i).call(Nl.convertToTspans,r._gd),a}function FN(t,e){var r=la.ensureSingle(t,"g",xt.labelsClass),a=e._dims,i=r.selectAll("g."+xt.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(xt.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=za.select(this);o.call(Ck,n,e),Fa.setTranslate(o,nm(e,n.fraction),xt.tickOffset+e.ticklen+e.font.size*Sk+xt.labelOffset+a.currentValueTotalHeight)})}function Nb(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&Dk(t,e,r,o,!0,i)}function Dk(t,e,r,a,i,n){var o=r.active;r.active=a,DN(t.layout,xt.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(Pk,r,n),e.call(bc,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&&gc.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function $k(t,e,r){if(e._context.staticPlot)return;var a=r.node(),i=za.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+xt.gripRectClass);za.event.stopPropagation(),za.event.preventDefault(),s.call(Ni.fill,l.activebgcolor);var f=Hb(l,za.mouse(a)[0]);Nb(e,r,l,f,!0),l._dragging=!0;function c(){var v=n(),h=Hb(v,za.mouse(a)[0]);Nb(e,r,v,h,!1)}i.on("mousemove",c),i.on("touchmove",c);function u(){var v=n();v._dragging=!1,s.call(Ni.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 NN(t,e){var r=t.selectAll("rect."+xt.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(xt.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=za.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(Ni.fill,e.tickcolor),Fa.setTranslate(l,nm(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?xt.tickOffset:xt.minorTickOffset)+a.currentValueTotalHeight)})}function HN(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 Pk(t,e,r){for(var a=t.select("rect."+xt.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=nm(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",CN(o-xt.gripWidth*.5,e._dims.currentValueTotalHeight))}}function nm(t,e){var r=t._dims;return r.inputAreaStart+xt.stepInset+(r.inputAreaLength-2*xt.stepInset)*Math.min(1,Math.max(0,e))}function Hb(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-xt.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*xt.stepInset-2*r.inputAreaStart)))}function ON(t,e,r){var a=r._dims,i=la.ensureSingle(t,"rect",xt.railTouchRectClass,function(n){n.call($k,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,xt.tickOffset+r.ticklen+a.labelHeight)}).call(Ni.fill,r.bgcolor).attr("opacity",0),Fa.setTranslate(i,0,a.currentValueTotalHeight)}function jN(t,e){var r=e._dims,a=r.inputAreaLength-xt.railInset*2,i=la.ensureSingle(t,"rect",xt.railRectClass);i.attr({width:a,height:xt.railWidth,rx:xt.railRadius,ry:xt.railRadius,"shape-rendering":"crispEdges"}).call(Ni.stroke,e.bordercolor).call(Ni.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),Fa.setTranslate(i,xt.railInset,(r.inputAreaWidth-xt.railWidth)*.5+r.currentValueTotalHeight)}var BN=yu,GN={moduleType:"component",name:BN.name,layoutAttributes:kk,supplyLayoutDefaults:MN,draw:$N},Ob=Hr,om={bgcolor:{valType:"color",dflt:Ob.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:Ob.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"},Ek={_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"},gu={},lm={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},UN=sr,VN=_r,Rk=lm,XN=Wr.LINE_SPACING,xc=Rk.name;function zk(t){var e=t&&t[xc];return e&&e.visible}gu.isVisible=zk;gu.makeData=function(t){var e=UN.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(zk(n)){a.push(n);var o=n[xc];o._id=xc+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};gu.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[xc],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(VN.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*XN}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:Rk.extraPad+a._offsetShift*2}};var Wv,jb;function YN(){if(jb)return Wv;jb=1;var t=ge,e=Ot,r=sr,a=om,i=Ek;return Wv=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(C,L){return t.coerce(u,v,a,C,L)}var d,p;function m(C,L){return t.coerce(d,p,i,C,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 g=l._subplots;if(g)for(var w=g.cartesian.filter(function(C){return C.substr(0,C.indexOf("y"))===r.name2id(s)}).map(function(C){return C.substr(C.indexOf("y"),C.length)}),b=t.simpleMap(w,r.id2name),x=0;x<b.length;x++){var _=b[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}},Wv}var qv,Bb;function WN(){if(Bb)return qv;Bb=1;var t=sr.list,e=ys.getAutoRange,r=lm;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 Zv,Gb;function qN(){if(Gb)return Zv;Gb=1;var t=gt,e=lt,r=vr,a=ge,i=a.strTranslate,n=$t,o=pt,l=Yc,s=dr,f=sr,c=ti,u=Ui,v=lm;Zv=function(T){for(var S=T._fullLayout,C=S._rangeSliderData,L=0;L<C.length;L++){var E=C[L][v.name];E._clipId=E._id+"-"+S._uid}function R(H){return H._name}var N=S._infolayer.selectAll("g."+v.containerClassName).data(C,R);N.exit().each(function(H){var F=H[v.name];S._topdefs.select("#"+F._clipId).remove()}).remove(),C.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],M=S[f.id2name(H.anchor)],A=$[f.id2name(H.anchor)];if($.range){var D=a.simpleMap($.range,H.r2l),P=a.simpleMap(H.range,H.r2l),I;P[0]<P[1]?I=[Math.min(D[0],P[0]),Math.max(D[1],P[1])]:I=[Math.max(D[0],P[0]),Math.min(D[1],P[1])],$.range=$._input.range=a.simpleMap(I,H.l2r)}H.cleanRange("rangeslider.range");var O=S._size,B=H.domain;$._width=O.w*(B[1]-B[0]);var G=Math.round(O.l+O.w*B[0]),j=Math.round(O.t+O.h*(1-H._counterDomainMin)+(H.side==="bottom"?H._depth:0)+$._offsetShift+v.extraPad);F.attr("transform",i(G,j)),$._rl=a.simpleMap($.range,H.r2l);var q=$._rl[0],V=$._rl[1],K=V-q;if($.p2d=function(he){return he/$._width*K+q},$.d2p=function(he){return(he-q)/K*$._width},H.rangebreaks){var Y=H.locateBreaks(q,V);if(Y.length){var te,oe,_e=0;for(te=0;te<Y.length;te++)oe=Y[te],_e+=oe.max-oe.min;var de=$._width/(V-q-_e),X=[-de*q];for(te=0;te<Y.length;te++)oe=Y[te],X.push(X[X.length-1]-de*(oe.max-oe.min));for($.d2p=function(he){for(var Te=X[0],fe=0;fe<Y.length;fe++){var Ae=Y[fe];if(he>=Ae.max)Te=X[fe+1];else if(he<Ae.min)break}return Te+de*he},te=0;te<Y.length;te++)oe=Y[te],oe.pmin=$.d2p(oe.min),oe.pmax=$.d2p(oe.max);$.p2d=function(he){for(var Te=X[0],fe=0;fe<Y.length;fe++){var Ae=Y[fe];if(he>=Ae.pmax)Te=X[fe+1];else if(he<Ae.pmin)break}return(he-Te)/de}}}if(A.rangemode!=="match"){var Q=M.r2l(A.range[0]),le=M.r2l(A.range[1]),se=le-Q;$.d2pOppAxis=function(he){return(he-Q)/se*$._height}}F.call(y,T,H,$).call(g,T,H,$).call(w,T,H,$).call(x,T,H,$,A).call(_,T,H,$).call(k,T,H,$),d(F,T,H,$),m(F,T,H,$,M,A),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:j+$._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,C,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,M=h(F),A=M-T.node().getBoundingClientRect().left,D=L.d2p(C._rl[0]),P=L.d2p(C._rl[1]),I=c.coverSlip();this.addEventListener("touchmove",O),this.addEventListener("touchend",B),I.addEventListener("mousemove",O),I.addEventListener("mouseup",B);function O(G){var j=h(G),q=+j-M,V,K,Y;switch($){case E:if(Y="ew-resize",D+q>C._length||P+q<0)return;V=D+q,K=P+q;break;case R:if(Y="col-resize",D+q>C._length)return;V=D+q,K=P;break;case N:if(Y="col-resize",P+q<0)return;V=D,K=P+q;break;default:Y="ew-resize",V=A,K=A+q;break}if(K<V){var te=K;K=V,V=te}L._pixelMin=V,L._pixelMax=K,u(t.select(I),Y),p(T,S,C,L)}function B(){I.removeEventListener("mousemove",O),I.removeEventListener("mouseup",B),this.removeEventListener("touchmove",O),this.removeEventListener("touchend",B),a.removeElement(I)}}T.on("mousedown",H),T.on("touchstart",H)}function p(T,S,C,L){function E(H){return C.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,C._name+".range",[R,N])})}function m(T,S,C,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 M=H(L.d2p(C._rl[0])),A=H(L.d2p(C._rl[1]));if(T.select("rect."+v.slideBoxClassName).attr("x",M).attr("width",A-M),T.select("rect."+v.maskMinClassName).attr("width",M),T.select("rect."+v.maskMaxClassName).attr("x",A).attr("width",L._width-A),R.rangemode!=="match"){var D=L._height-F(L.d2pOppAxis(E._rl[1])),P=L._height-F(L.d2pOppAxis(E._rl[0]));T.select("rect."+v.maskMinOppAxisClassName).attr("x",M).attr("height",D).attr("width",A-M),T.select("rect."+v.maskMaxOppAxisClassName).attr("x",M).attr("y",P).attr("height",L._height-P).attr("width",A-M),T.select("rect."+v.slideBoxClassName).attr("y",D).attr("height",P-D)}var I=.5,O=Math.round($(M-N))-I,B=Math.round($(A-N))+I;T.select("g."+v.grabberMinClassName).attr("transform",i(O,I)),T.select("g."+v.grabberMaxClassName).attr("transform",i(B,I))}function y(T,S,C,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 g(T,S,C,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,C,L){var E=S.calcdata,R=T.selectAll("g."+v.rangePlotClassName).data(C._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),M=F===0,A=f.getFromId(S,H,"y"),D=A._name,P=L[D],I={data:[],layout:{xaxis:{type:C.type,domain:[0,1],range:L.range.slice(),calendar:C.calendar},width:L._width,height:L._height,margin:{t:0,b:0,l:0,r:0}},_context:S._context};C.rangebreaks&&(I.layout.xaxis.rangebreaks=C.rangebreaks),I.layout[D]={type:A.type,domain:[0,1],range:P.rangemode!=="match"?P.range.slice():A.range.slice(),calendar:A.calendar},A.rangebreaks&&(I.layout[D].rangebreaks=A.rangebreaks),r.supplyDefaults(I);var O=I._fullLayout.xaxis,B=I._fullLayout[D];O.clearCalc(),O.setScale(),B.clearCalc(),B.setScale();var G={id:H,plotgroup:$,xaxis:O,yaxis:B,isRangePlot:!0};M?N=G:(G.mainplot="xy",G.mainplotinfo=N),s.rangePlot(S,G,b(E,H))})}function b(T,S){for(var C=[],L=0;L<T.length;L++){var E=T[L],R=E[0].trace;R.xaxis+R.yaxis===S&&C.push(E)}return C}function x(T,S,C,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,C,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,C,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 M={width:v.grabAreaWidth,x:0,y:0,fill:v.grabAreaFill,cursor:S._context.staticPlot?void 0:v.grabAreaCursor},A=a.ensureSingle(E,"rect",v.grabAreaMinClassName,function(P){P.attr(M)});A.attr("height",L._height);var D=a.ensureSingle(R,"rect",v.grabAreaMaxClassName,function(P){P.attr(M)});D.attr("height",L._height)}return Zv}var ZN=ge,KN=om,QN=Ek,Kv=gu,JN={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:ZN.extendFlat({},KN,{yaxis:QN})}}},layoutAttributes:om,handleDefaults:YN(),calcAutorange:WN(),draw:qN(),isVisible:Kv.isVisible,makeData:Kv.makeData,autoMarginOpts:Kv.autoMarginOpts},e4=Dr,Ub=Hr,t4=Ot.templatedArray,r4=t4("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(" ")}),yh={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:r4,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:e4({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:Ub.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:Ub.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"},Ik={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},jf=ge,a4=pt,i4=Ot,n4=ei,Fk=yh,gh=Ik,o4=function(e,r,a,i,n){var o=e.rangeselector||{},l=i4.newContainer(r,"rangeselector");function s(h,d){return jf.coerce(o,l,Fk,h,d)}var f=n4(o,l,{name:"buttons",handleItemDefaults:l4,calendar:n}),c=s("visible",f.length>0);if(c){var u=s4(r,a,i);s("x",u[0]),s("y",u[1]),jf.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),jf.coerceFont(s,"font",a.font);var v=s("bgcolor");s("activecolor",a4.contrast(v,gh.lightAmount,gh.darkAmount)),s("bordercolor"),s("borderwidth")}};function l4(t,e,r,a){var i=a.calendar;function n(s,f){return jf.coerce(t,e,Fk.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 s4(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+gh.yPad]}var f4=SM,c4=ge.titleCase,u4=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=v4(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function v4(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=f4["utc"+c4(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 _c=gt,d4=lt,h4=vr,Vb=pt,Nk=$t,ci=ge,Xb=ci.strTranslate,Bf=_r,p4=sr,sm=Wr,Yb=sm.LINE_SPACING,Wb=sm.FROM_TL,qb=sm.FROM_BR,bh=Ik,m4=u4,y4=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(g4(e),b4);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=_c.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(ci.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=_c.select(this),u=m4(o,f);f._isActive=x4(o,f,u),c.call(Qv,l,f),c.call(w4,l,f,e),c.on("click",function(){e._dragged||d4.call("_guiRelayout",e,u)}),c.on("mouseover",function(){f._isHovered=!0,c.call(Qv,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(Qv,l,f)})}),k4(e,s,l,o._name,n)})};function g4(t){for(var e=p4.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 b4(t){return t._id}function x4(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 Qv(t,e,r){var a=ci.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:bh.rx,ry:bh.ry}),a.call(Vb.stroke,e.bordercolor).call(Vb.fill,_4(e,r)).style("stroke-width",e.borderwidth+"px")}function _4(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function w4(t,e,r,a){function i(o){Bf.convertToTspans(o,a)}var n=ci.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(Nk.font,e.font).text(T4(r,a._fullLayout._meta)).call(i)}function T4(t,e){return t.label?e?ci.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function k4(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var h=_c.select(this),d=h.select(".selector-text"),p=r.font.size*Yb,m=Math.max(p*Bf.lineCount(d),16)+3;o=Math.max(o,m)}),e.each(function(){var h=_c.select(this),d=h.select(".selector-rect"),p=h.select(".selector-text"),m=p.node()&&Nk.bBox(p.node()).width,y=r.font.size*Yb,g=Bf.lineCount(p),w=Math.max(m+10,bh.minButtonWidth);h.attr("transform",Xb(l+n,l)),d.attr({x:0,y:0,width:w,height:o}),Bf.positionText(p,w/2,o/2-(g-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";ci.isRightAnchor(r)&&(f-=n,u="right"),ci.isCenterAnchor(r)&&(f-=n/2,u="center");var v="top";ci.isBottomAnchor(r)&&(c-=o,v="bottom"),ci.isMiddleAnchor(r)&&(c-=o/2,v="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),h4.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*Wb[u],r:n*qb[u],b:o*qb[v],t:o*Wb[v]}),i.attr("transform",Xb(f,c))}var A4={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:yh}}},layoutAttributes:yh,handleDefaults:o4,draw:y4},Wi={},Zb=Qt.extendFlat;Wi.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:Zb({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:Zb({},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};Wi.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 M4=ge,S4=Bo.counter,L4=Wi.attributes,Kb=Yr.idRegex,C4=Ot,xh={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:[S4("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:[Kb.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:[Kb.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:L4({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 wc(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 D4(t,e){var r=t.grid||{},a=wc(e,r,"x"),i=wc(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=C4.newContainer(e,"grid");function v(_,k){return M4.coerce(r,u,xh,_,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",g=n?.2:.1,w=n?.3:.1,b,x;s&&e._splomGridDflt&&(b=e._splomGridDflt.xside,x=e._splomGridDflt.yside),u._domains={x:Qb("x",v,g,b,d),y:Qb("y",v,w,x,h,y)}}function Qb(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 $4(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 g=1;for(f=0;f<o;f++){var w=d[f]=new Array(l),b=y[f]||[];for(c=0;c<l;c++)if(s?(h=g===1?"xy":"x"+g+"y"+g,g++):h=b[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=wc(e,a,"x"),_=wc(e,a,"y");r.xaxes=Jb(x,i.xaxis,l,m,"x"),r.yaxes=Jb(_,i.yaxis,o,m,"y")}var k=r._anchors={},T=r.roworder==="top to bottom";for(var S in m){var C=S.charAt(0),L=r[C+"side"],E,R,N;if(L.length<8)k[S]="free";else if(C==="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 Jb(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 P4={moduleType:"component",name:"grid",schema:{layout:{grid:xh}},layoutAttributes:xh,sizeDefaults:D4,contentDefaults:$4},Hk={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(" ")}}},Jv,ex;function E4(){if(ex)return Jv;ex=1;var t=wt,e=lt,r=ge,a=Ot,i=Hk;return Jv=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),u=n[f]||{};function v(w,b){return r.coerce(u,c,i,w,b)}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 g=o["error_"+s.inherit];(g||{}).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))}},Jv}var ed,tx;function Ok(){if(tx)return ed;tx=1,ed=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 ed}var td,rx;function R4(){if(rx)return td;rx=1;var t=wt,e=lt,r=Bt,a=ge,i=Ok();td=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 g=h(y,m);if(t(g[0])&&t(g[1])){var w=p[f+"s"]=y-g[0],b=p[f+"h"]=y+g[1];v.push(w,b)}}}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 td}var rd,ax;function z4(){if(ax)return rd;ax=1;var t=gt,e=wt,r=$t,a=Or;rd=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||{},g=m.error_y||{},w;m.ids&&(w=function(k){return k.id});var b=a.hasMarkers(m)&&m.marker.maxdisplayed>0;!g.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(),g.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(!(b&&!k.vis)){var C,L=T.select("path.yerror");if(g.visible&&e(S.x)&&e(S.yh)&&e(S.ys)){var E=g.width;C="M"+(S.x-E)+","+S.yh+"h"+2*E+"m-"+E+",0V"+S.ys,S.noYS||(C+="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",C)}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?g:y).width;C="M"+S.xh+","+(S.y-N)+"v"+2*N+"m0,-"+N+"H"+S.xs,S.noXS||(C+="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",C)}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 rd}var ad,ix;function I4(){if(ix)return ad;ix=1;var t=gt,e=pt;return ad=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)})},ad}var Hl=ge,nx=Za.overrideAll,Ol=Hk,dn={error_x:Hl.extendFlat({},Ol),error_y:Hl.extendFlat({},Ol)};delete dn.error_x.copy_zstyle;delete dn.error_y.copy_zstyle;delete dn.error_y.copy_ystyle;var ws={error_x:Hl.extendFlat({},Ol),error_y:Hl.extendFlat({},Ol),error_z:Hl.extendFlat({},Ol)};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 F4={moduleType:"component",name:"errorbars",schema:{traces:{scatter:dn,bar:dn,histogram:dn,scatter3d:nx(ws,"calc","nested"),scattergl:nx(dn,"calc","nested")}},supplyDefaults:E4(),calc:R4(),makeComputeError:Ok(),plot:z4(),style:I4(),hoverInfo:N4};function N4(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 H4={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"}},Ai=gt,id=wa,Gf=vr,ox=lt,ii=Bt,df=ti,ga=ge,$a=ga.strTranslate,jk=Qt.extendFlat,nd=Ui,Ca=$t,od=pt,O4=Yc,j4=_r,B4=Oa.flipScale,G4=Q2,U4=J2,V4=Ja,fm=Wr,lx=fm.LINE_SPACING,sx=fm.FROM_TL,fx=fm.FROM_BR,Kt=H4.cn;function X4(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+Kt.colorbar).data(Y4(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(Kt.colorbar,!0),r.each(function(a){var i=Ai.select(this);ga.ensureSingle(i,"rect",Kt.cbbg),ga.ensureSingle(i,"g",Kt.cbfills),ga.ensureSingle(i,"g",Kt.cblines),ga.ensureSingle(i,"g",Kt.cbaxis,function(o){o.classed(Kt.crisp,!0)}),ga.ensureSingle(i,"g",Kt.cbtitleunshift,function(o){o.append("g").classed(Kt.cbtitle,!0)}),ga.ensureSingle(i,"rect",Kt.cboutline);var n=W4(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&q4(i,a,t)}),r.exit().each(function(a){Gf.autoMargin(t,a._id)}).remove(),r.order()}function Y4(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return jk(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?B4(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 g=e._colorAxes[y];i=s(n.colorbar),i._id="cb"+y,i._propPrefix=y+".colorbar.",i._meta=e._meta,l={min:"cmin",max:"cmax"},g[0]!=="heatmap"&&(o=g[1],l.calc=o._module.colorbar.calc),f(),a.push(i)}return a}function W4(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",g=e.xref==="paper",w=r._fullLayout,b=w._size,x=e._fillcolor,_=e._line,k=e.title,T=k.side,S=e._zrange||Ai.extent((typeof x=="function"?x:_.color).domain()),C=typeof _.color=="function"?_.color:function(){return _.color},L=typeof x=="function"?x:function(){return x},E=e._levels,R=Z4(r,e,S),N=R.fill,H=R.line,F=Math.round(o*(l==="fraction"?a?b.w:b.h:1)),$=F/(a?b.w:b.h),M=Math.round(i*(n==="fraction"?a?b.h:b.w:1)),A=M/(a?b.h:b.w),D=g?b.w:r._fullLayout.width,P=y?b.h:r._fullLayout.height,I=Math.round(a?p*D+h:m*P+d),O={center:.5,right:1}[u]||0,B={top:1,middle:.5}[v]||0,G=a?p-O*$:m-B*$,j=a?m-B*A:p-O*A,q=Math.round(a?P*(1-j):D*j);e._lenFrac=A,e._thickFrac=$,e._uFrac=G,e._vFrac=j;var V=e._axis=K4(r,e,S);V.position=$+(a?p+h/b.w:m+d/b.h);var K=["top","bottom"].indexOf(T)!==-1;if(a&&K&&(V.title.side=T,V.titlex=p+h/b.w,V.titley=j+(k.side==="top"?A-d/b.h:d/b.h)),!a&&!K&&(V.title.side=T,V.titley=m+d/b.h,V.titlex=j+h/b.w),_.color&&e.tickmode==="auto"){V.tickmode="linear",V.tick0=E.start;var Y=E.size,te=ga.constrain(M/50,4,15)+1,oe=(S[1]-S[0])/((e.nticks||te)*Y);if(oe>1){var _e=Math.pow(10,Math.floor(Math.log(oe)/Math.LN10));Y*=_e*ga.roundUp(oe/_e,[2,5,10]),(Math.abs(E.start)/E.size+1e-6)%1<2e-6&&(V.tick0=0)}V.dtick=Y}V.domain=a?[j+d/b.h,j+A-d/b.h]:[j+h/b.w,j+A-h/b.w],V.setScale(),t.attr("transform",$a(Math.round(b.l),Math.round(b.t)));var de=t.select("."+Kt.cbtitleunshift).attr("transform",$a(-Math.round(b.l),-Math.round(b.t))),X=V.ticklabelposition,Q=V.title.font.size,le=t.select("."+Kt.cbaxis),se,he=0,Te=0;function fe(Me,J){var xe={propContainer:V,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:w._dfltTitle.colorbar,containerGroup:t.select("."+Kt.cbtitle)},re=Me.charAt(0)==="h"?Me.substr(1):"h"+Me;t.selectAll("."+re+",."+re+"-math-group").remove(),O4.draw(r,Me,jk(xe,J||{}))}function Ae(){if(a&&K||!a&&!K){var Me,J;T==="top"&&(Me=h+b.l+D*p,J=d+b.t+P*(1-j-A)+3+Q*.75),T==="bottom"&&(Me=h+b.l+D*p,J=d+b.t+P*(1-j)-3-Q*.25),T==="right"&&(J=d+b.t+P*m+3+Q*.75,Me=h+b.l+D*j),fe(V._id+"title",{attributes:{x:Me,y:J,"text-anchor":a?"start":"middle"}})}}function ce(){if(a&&!K||!a&&K){var Me=V.position||0,J=V._offset+V._length/2,xe,re;if(T==="right")re=J,xe=b.l+D*Me+10+Q*(V.showticklabels?1:.5);else if(xe=J,T==="bottom"&&(re=b.t+P*Me+10+(X.indexOf("inside")===-1?V.tickfont.size:0)+(V.ticks!=="intside"&&e.ticklen||0)),T==="top"){var ue=k.text.split("<br>").length;re=b.t+P*Me+10-F-lx*Q*ue}fe((a?"h":"v")+V._id+"title",{avoid:{selection:Ai.select(r).selectAll("g."+V._id+"tick"),side:T,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?w.width:w.height},attributes:{x:xe,y:re,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function ye(){if(!a&&!K||a&&K){var Me=t.select("."+Kt.cbtitle),J=Me.select("text"),xe=[-s/2,s/2],re=Me.select(".h"+V._id+"title-math-group").node(),ue=15.6;J.node()&&(ue=parseInt(J.node().style.fontSize,10)*lx);var pe;if(re?(pe=Ca.bBox(re),Te=pe.width,he=pe.height,he>ue&&(xe[1]-=(he-ue)/2)):J.node()&&!J.classed(Kt.jsPlaceholder)&&(pe=Ca.bBox(J.node()),Te=pe.width,he=pe.height),a){if(he){if(he+=5,T==="top")V.domain[1]-=he/b.h,xe[1]*=-1;else{V.domain[0]+=he/b.h;var De=j4.lineCount(J);xe[1]+=(1-De)*ue}Me.attr("transform",$a(xe[0],xe[1])),V.setScale()}}else Te&&(T==="right"&&(V.domain[0]+=(Te+Q/2)/b.w),Me.attr("transform",$a(xe[0],xe[1])),V.setScale())}t.selectAll("."+Kt.cbfills+",."+Kt.cblines).attr("transform",a?$a(0,Math.round(b.h*(1-V.domain[1]))):$a(Math.round(b.w*V.domain[0]),0)),le.attr("transform",a?$a(0,Math.round(-b.t)):$a(Math.round(-b.l),0));var $e=t.select("."+Kt.cbfills).selectAll("rect."+Kt.cbfill).attr("style","").data(N);$e.enter().append("rect").classed(Kt.cbfill,!0).attr("style",""),$e.exit().remove();var me=S.map(V.c2p).map(Math.round).sort(function(Xe,it){return Xe-it});$e.each(function(Xe,it){var be=[it===0?S[0]:(N[it]+N[it-1])/2,it===N.length-1?S[1]:(N[it]+N[it+1])/2].map(V.c2p).map(Math.round);a&&(be[1]=ga.constrain(be[1]+(be[1]>be[0])?1:-1,me[0],me[1]));var Ue=Ai.select(this).attr(a?"x":"y",I).attr(a?"y":"x",Ai.min(be)).attr(a?"width":"height",Math.max(F,2)).attr(a?"height":"width",Math.max(Ai.max(be)-Ai.min(be),2));if(e._fillgradient)Ca.gradient(Ue,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Be=L(Xe).replace("e-","");Ue.attr("fill",id(Be).toHexString())}});var ke=t.select("."+Kt.cblines).selectAll("path."+Kt.cbline).data(_.color&&_.width?H:[]);ke.enter().append("path").classed(Kt.cbline,!0),ke.exit().remove(),ke.each(function(Xe){var it=I,be=Math.round(V.c2p(Xe))+_.width/2%1;Ai.select(this).attr("d","M"+(a?it+","+be:be+","+it)+(a?"h":"v")+F).call(Ca.lineGroupStyle,_.width,C(Xe),_.dash)}),le.selectAll("g."+V._id+"tick,path").remove();var Ve=I+F+(s||0)/2-(e.ticks==="outside"?1:0),Ie=ii.calcTicks(V),Oe=ii.getTickSigns(V)[2];return ii.drawTicks(r,V,{vals:V.ticks==="inside"?ii.clipEnds(V,Ie):Ie,layer:le,path:ii.makeTickPath(V,Ve,Oe),transFn:ii.makeTransTickFn(V)}),ii.drawLabels(r,V,{vals:Ie,layer:le,transFn:ii.makeTransTickLabelFn(V),labelFns:ii.makeLabelFns(V,Ve)})}function Se(){var Me,J=F+s/2;X.indexOf("inside")===-1&&(Me=Ca.bBox(le.node()),J+=a?Me.width:Me.height),se=de.select("text");var xe=0,re=a&&T==="top",ue=!a&&T==="right",pe=0;if(se.node()&&!se.classed(Kt.jsPlaceholder)){var De,$e=de.select(".h"+V._id+"title-math-group").node();$e&&(a&&K||!a&&!K)?(Me=Ca.bBox($e),xe=Me.width,De=Me.height):(Me=Ca.bBox(de.node()),xe=Me.right-b.l-(a?I:q),De=Me.bottom-b.t-(a?q:I),!a&&T==="top"&&(J+=Me.height,pe=Me.height)),ue&&(se.attr("transform",$a(xe/2+Q/2,0)),xe*=2),J=Math.max(J,a?xe:De)}var me=(a?h:d)*2+J+f+s/2,ke=0;!a&&k.text&&v==="bottom"&&m<=0&&(ke=me/2,me+=ke,pe+=ke),w._hColorbarMoveTitle=ke,w._hColorbarMoveCBTitle=pe;var Ve=f+s,Ie=(a?I:q)-Ve/2-(a?h:0),Oe=(a?q:I)-(a?M:d+pe-ke);t.select("."+Kt.cbbg).attr("x",Ie).attr("y",Oe).attr(a?"width":"height",Math.max(me-ke,2)).attr(a?"height":"width",Math.max(M+Ve,2)).call(od.fill,c).call(od.stroke,e.bordercolor).style("stroke-width",f);var Xe=ue?Math.max(xe-10,0):0;t.selectAll("."+Kt.cboutline).attr("x",(a?I:q+h)+Xe).attr("y",(a?q+d-M:I)+(re?he:0)).attr(a?"width":"height",Math.max(F,2)).attr(a?"height":"width",Math.max(M-(a?2*d+he:2*h+Xe),2)).call(od.stroke,e.outlinecolor).style({fill:"none","stroke-width":s});var it=a?O*me:0,be=a?0:(1-B)*me-pe;if(it=g?b.l-it:-it,be=y?b.t-be:-be,t.attr("transform",$a(it,be)),!a&&(f||id(c).getAlpha()&&!id.equals(w.paper_bgcolor,c))){var Ue=le.selectAll("text"),Be=Ue[0].length,Ye=t.select("."+Kt.cbbg).node(),Ne=Ca.bBox(Ye),We=Ca.getTranslate(t),Qe=2;Ue.each(function(ee,Pe){var Re=0,He=Be-1;if(Pe===Re||Pe===He){var tt=Ca.bBox(this),ft=Ca.getTranslate(this),dt;if(Pe===He){var at=tt.right+ft.x,Rt=Ne.right+We.x+q-f-Qe+p;dt=Rt-at,dt>0&&(dt=0)}else if(Pe===Re){var mt=tt.left+ft.x,rt=Ne.left+We.x+q+f+Qe;dt=rt-mt,dt<0&&(dt=0)}dt&&(Be<3?this.setAttribute("transform","translate("+dt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var z={},W=sx[u],U=fx[u],Z=sx[v],ne=fx[v],ie=me-F;a?(n==="pixels"?(z.y=m,z.t=M*Z,z.b=M*ne):(z.t=z.b=0,z.yt=m+i*Z,z.yb=m-i*ne),l==="pixels"?(z.x=p,z.l=me*W,z.r=me*U):(z.l=ie*W,z.r=ie*U,z.xl=p-o*W,z.xr=p+o*U)):(n==="pixels"?(z.x=p,z.l=M*W,z.r=M*U):(z.l=z.r=0,z.xl=p+i*W,z.xr=p-i*U),l==="pixels"?(z.y=1-m,z.t=me*Z,z.b=me*ne):(z.t=ie*Z,z.b=ie*ne,z.yt=m-o*Z,z.yb=m+o*ne));var Le=e.y<.5?"b":"t",we=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var ve={r:w.width-Ie-it,l:Ie+z.r,b:w.height-Oe-be,t:Oe+z.b};g&&y?Gf.autoMargin(r,e._id,z):g?r._fullLayout._reservedMargin[e._id][Le]=ve[Le]:y||a?r._fullLayout._reservedMargin[e._id][we]=ve[we]:r._fullLayout._reservedMargin[e._id][Le]=ve[Le]}return ga.syncOrAsync([Gf.previousPromises,Ae,ye,ce,Gf.previousPromises,Se],r)}function q4(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;df.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),nd(t)},moveFn:function(f,c){t.attr("transform",o+$a(f,c)),l=df.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=df.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var u=df.getCursor(l,s,e.xanchor,e.yanchor);nd(t,u)},doneFn:function(){if(nd(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?ox.call("_guiRestyle",r,f,e._traceIndex):ox.call("_guiRelayout",r,f)}}})}function Z4(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 K4(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 ga.coerce(n,l,V4,c,u)}return G4(n,l,f,s,a),U4(n,l,f,s),l}var Q4={draw:X4},J4={moduleType:"component",name:"colorbar",attributes:rp,supplyDefaults:Tw,draw:Q4.draw,hasColorbar:pw},e6={moduleType:"component",name:"legend",layoutAttributes:rT,supplyLayoutDefaults:aT,draw:lT,style:nT},t6={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"}},r6={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},a6=lt,Bk=ge,ld=Bk.extendFlat,cx=Bk.extendDeep;function ux(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 i6(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var Gk=function(e,r){var a,i=e.data,n=e.layout,o=cx([],i),l=cx({},n,ux(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++)i6(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),a6.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={}),ld(h.xaxis,v),ld(h.yaxis,v),ld(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=ux(r.tileClass),p},n6=Dh.EventEmitter,o6=lt,l6=ge,vx=Gr,s6=Gk,f6=Gp,c6=Up;function u6(t,e){var r=new n6,a=s6(t,{format:"png"}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=vx.getDelay(i._fullLayout);setTimeout(function(){var s=f6(i),f=document.createElement("canvas");f.id=l6.randstr(),r=c6({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=vx.getRedrawFunc(i);return o6.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var v6=u6,dx=Gr,d6={getDelay:dx.getDelay,getRedrawFunc:dx.getRedrawFunc,clone:Gk,toSVG:Gp,svgToImg:Up,toImage:v6,downloadImage:_2},h6=d6;(function(t){t.version=Dc.version;for(var e=lt,r=t.register=e.register,a=Wt,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(MI),r([QI,mF,Rl,EF,XF,yN,GN,JN,A4,P4,F4,Co,J4,e6,Na,VT]),r([t6,r6]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=_p;var l=Na,s=vr;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=h6,t.PlotSchema=Yo})(Q1);var p6=Q1;const fB=Hi(p6);var Ts={TEXTPAD:3,eventDataKeys:["value","label"]},rr=Yi,hx=Wo.axisHoverFormat,m6=Rr.hovertemplateAttrs,y6=Rr.texttemplateAttrs,Uk=En,g6=Dr,px=Ts,b6=ia.pattern,hn=Qt.extendFlat,sd=g6({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),x6=rr.marker,_6=x6.line,w6=hn({},_6.width,{dflt:0}),T6=hn({width:w6,editType:"calc"},Uk("marker.line")),k6=hn({line:T6,editType:"calc"},Uk("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:b6,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:rr.x,x0:rr.x0,dx:rr.dx,y:rr.y,y0:rr.y0,dy:rr.dy,xperiod:rr.xperiod,yperiod:rr.yperiod,xperiod0:rr.xperiod0,yperiod0:rr.yperiod0,xperiodalignment:rr.xperiodalignment,yperiodalignment:rr.yperiodalignment,xhoverformat:hx("x"),yhoverformat:hx("y"),text:rr.text,texttemplate:y6({editType:"plot"},{keys:px.eventDataKeys}),hovertext:rr.hovertext,hovertemplate:m6({},{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:hn({},sd,{description:"Sets the font used for `text`."}),insidetextfont:hn({},sd,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:hn({},sd,{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:hn({},rr.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:k6,offsetgroup:rr.offsetgroup,alignmentgroup:rr.alignmentgroup,selected:{marker:{opacity:rr.selected.marker.opacity,color:rr.selected.marker.color,editType:"style"},textfont:rr.selected.textfont,editType:"style"},unselected:{marker:{opacity:rr.unselected.marker.opacity,color:rr.unselected.marker.color,editType:"style"},textfont:rr.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}},cm={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(" ")}},A6=pt,mx=Oa.hasColorscale,yx=ms,M6=ge.coercePattern,Vk=function(e,r,a,i,n){var o=a("marker.color",i),l=mx(e,"marker");l&&yx(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",A6.defaultLine),mx(e,"marker.line")&&yx(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),M6(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},gx=wt,No=ge,bx=pt,S6=lt,L6=Xp,C6=vu,D6=Vk,$6=Yp,Xk=ks,hf=No.coerceFont;function P6(t,e,r,a){function i(f,c){return No.coerce(t,e,Xk,f,c)}var n=L6(t,e,a,i);if(!n){e.visible=!1;return}C6(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");Wk(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),D6(t,e,i,r,a);var l=(e.marker.line||{}).color,s=S6.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||bx.defaultLine,{axis:"y"}),s(t,e,l||bx.defaultLine,{axis:"x",inherit:"y"}),No.coerceSelectionMarkerOpacity(e,i)}function E6(t,e){var r,a;function i(l,s){return No.coerce(a._input,a,Xk,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=Yk(o)),e.barmode==="group"&&$6(r,a,e,i)}}function Yk(t){if(gx(t)){if(t=+t,t>=0)return t}else if(typeof t=="string"&&(t=t.trim(),t.slice(-1)==="%"&&gx(t.slice(0,-1))&&(t=+t.slice(0,-1),t>=0)))return t+"%"}function Wk(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=hf(a,"textfont",r.font),y=No.extendFlat({},m),g=t.textfont&&t.textfont.color,w=!g;if(w&&delete y.color,hf(a,"insidetextfont",y),v){var b=No.extendFlat({},m);w&&delete b.color,hf(a,"pathbar.textfont",b)}p&&hf(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 An={supplyDefaults:P6,crossTraceDefaults:E6,handleText:Wk,validateCornerradius:Yk},R6=lt,z6=Bt,I6=ge,F6=cm,N6=An.validateCornerradius,qk=function(t,e,r){function a(d,p){return I6.coerce(t,e,F6,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(R6.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=z6.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=N6(h)},Kn=ge,um=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Kn.mergeArray(r.text,e,"tx"),Kn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){Kn.mergeArray(i.opacity,e,"mo",!0),Kn.mergeArray(i.color,e,"mc");var n=i.line;n&&(Kn.mergeArray(n.color,e,"mlc"),Kn.mergeArrayCastPositive(n.width,e,"mlw"))}},xx=Bt,_x=du,wx=Oa.hasColorscale,Tx=ap,H6=um,O6=z2,j6=function(e,r){var a=xx.getFromId(e,r.xaxis||"x"),i=xx.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=_x(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",u),l=a.makeCalcdata(r,"x"),s=_x(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 wx(r,"marker")&&Tx(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),wx(r,"marker.line")&&Tx(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),H6(h,r),O6(h,r),h},B6=gt,G6=ge;function U6(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=B6.select(this).select("text");G6.setTransormAndDisplay(f,s)}})}}function V6(t,e,r){if(r.uniformtext.mode){var a=Zk(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 X6(t,e){var r=Zk(t);e[r]=void 0}function Zk(t){return"_"+t+"Text_minsize"}var pi={recordMinTextSize:V6,clearMinTextSize:X6,resizeText:U6},mi={},Y6=wt,W6=wa,Kk=ge.isArrayOrTypedArray;mi.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};mi.coerceNumber=function(t,e,r){if(Y6(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};mi.coerceColor=function(t,e,r){return W6(e).isValid()?e:r!==void 0?r:t.dflt};mi.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};mi.getValue=function(t,e){var r;return Kk(t)?e<t.length&&(r=t[e]):r=t,r};mi.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:Kk(t.marker.line.width)?0:t.marker.line.width;return r};var jl=gt,q6=pt,ss=$t,Qk=ge,Jk=lt,eA=pi.resizeText,vm=ks,Z6=vm.textfont,K6=vm.insidetextfont,Q6=vm.outsidetextfont,Qn=mi;function J6(t){var e=jl.select(t).selectAll("g.barlayer").selectAll("g.trace");eA(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)&&jl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=jl.select(this),o=i[0].trace;tA(n,o,t)}),Jk.getComponentMethod("errorbars","style")(e)}function tA(t,e,r){ss.pointStyle(t.selectAll("path"),e,r),rA(t,e,r)}function rA(t,e,r){t.selectAll("text").each(function(a){var i=jl.select(this),n=Qk.ensureUniformFontSize(r,aA(i,a,e,r));ss.font(i,n)})}function e8(t,e,r){var a=e[0].trace;a.selectedpoints?t8(r,a,t):(tA(r,a,t),Jk.getComponentMethod("errorbars","style")(r))}function t8(t,e,r){ss.selectedPointStyle(t.selectAll("path"),e),r8(t.selectAll("text"),e,r)}function r8(t,e,r){t.each(function(a){var i=jl.select(this),n;if(a.selected){n=Qk.ensureUniformFontSize(r,aA(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),ss.font(i,n)}else ss.selectedTextStyle(i,e)})}function aA(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=lA(e,r);n=nA(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=oA(r,e.i,i));return n}function iA(t,e,r){return dm(Z6,t.textfont,e,r)}function nA(t,e,r,a){var i=iA(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:q6.contrast(a),family:i.family,size:i.size}),dm(K6,t.insidetextfont,e,i)}function oA(t,e,r){var a=iA(t,e,r);return dm(Q6,t.outsidetextfont,e,a)}function dm(t,e,r,a){e=e||{};var i=Qn.getValue(e.family,r),n=Qn.getValue(e.size,r),o=Qn.getValue(e.color,r);return{family:Qn.coerceString(t.family,i,a.family),size:Qn.coerceNumber(t.size,n,a.size),color:Qn.coerceColor(t.color,o,a.color)}}function lA(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var Mn={style:J6,styleTextPoints:rA,styleOnSelect:e8,getInsideTextFont:nA,getOutsideTextFont:oA,getBarColor:lA,resizeText:eA},pf=gt,mf=wt,kr=ge,a8=_r,i8=pt,$i=$t,n8=lt,Tc=Bt.tickText,sA=pi,o8=sA.recordMinTextSize,l8=sA.clearMinTextSize,fd=Mn,Ho=mi,s8=Ts,fA=ks,f8=fA.text,c8=fA.textposition,u8=ka.appendArrayPointValue,Nr=s8.TEXTPAD;function v8(t){return t.id}function d8(t){if(t.ids)return v8}function cd(t){return(t>0)-(t<0)}function Wa(t,e){return t<e?1:-1}function h8(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 cA(t,e,r,a){if(!e.uniformtext.mode&&uA(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 uA(t){return t&&t.duration>0}function p8(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},l8("bar",s));var c=kr.makeTraceGroups(a,r,"trace bars").each(function(u){var v=pf.select(this),h=u[0].trace,d=u[0].t,p=h.type==="waterfall",m=h.type==="funnel",y=h.type==="histogram",g=h.type==="bar",w=g||m,b=0;p&&h.connector.visible&&h.connector.mode==="between"&&(b=h.connector.line.width/2);var x=h.orientation==="h",_=uA(i),k=kr.ensureSingle(v,"g","points"),T=d8(h),S=k.selectAll("g.point").data(kr.identity,T);S.enter().append("g").classed("point",!0),S.exit().remove(),S.each(function(L,E){var R=pf.select(this),N=h8(L,o,l,x),H=N[0][0],F=N[0][1],$=N[1][0],M=N[1][1],A=(x?F-H:M-$)===0;A&&w&&Ho.getLineWidth(h,L)&&(A=!1),A||(A=!mf(H)||!mf(F)||!mf($)||!mf(M)),L.isBlank=A,A&&(x?F=H:M=$),b&&!A&&(x?(H-=Wa(H,F)*b,F+=Wa(H,F)*b):($-=Wa($,M)*b,M+=Wa($,M)*b));var D,P;if(h.type==="waterfall"){if(!A){var I=h[L.dir].marker;D=I.line.width,P=I.color}}else D=Ho.getLineWidth(h,L),P=L.mc||h.marker.color;function O(J){var xe=pf.round(D/2%1,2);return i.gap===0&&i.groupgap===0?pf.round(Math.round(J)-xe,2):J}function B(J,xe,re){return re&&J===xe?J:Math.abs(J-xe)>=2?O(J):J>xe?Math.ceil(J):Math.floor(J)}var G=i8.opacity(P),j=G<1||D>.01?O:B;t._context.staticPlot||(H=j(H,F,x),F=j(F,H,x),$=j($,M,!x),M=j(M,$,!x));var q=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 K(J,xe){if(!J)return 0;var re=Math.abs(x?M-$:F-H),ue=Math.abs(x?F-H:M-$),pe=j(Math.abs(q(V,!0)-q(0,!0))),De=L.hasB?Math.min(re/2,ue/2):Math.min(re/2,pe),$e;if(xe==="%"){var me=Math.min(50,J);$e=re*(me/100)}else $e=J;return j(Math.max(Math.min($e,De),0))}var Y=g||y?K(d.cornerradiusvalue,d.cornerradiusform):0,te,oe,_e="M"+H+","+$+"V"+M+"H"+F+"V"+$+"Z",de=0;if(Y&&L.s){var X=cd(L.s0)===0||cd(L.s)===cd(L.s0)?L.s1:L.s0;if(de=j(L.hasB?0:Math.abs(q(V,!0)-q(X,!0))),de<Y){var Q=Wa(H,F),le=Wa($,M),se=Q===-le?1:0;if(x)if(L.hasB)te="M"+(H+Y*Q)+","+$+"A "+Y+","+Y+" 0 0 "+se+" "+H+","+($+Y*le)+"V"+(M-Y*le)+"A "+Y+","+Y+" 0 0 "+se+" "+(H+Y*Q)+","+M+"H"+(F-Y*Q)+"A "+Y+","+Y+" 0 0 "+se+" "+F+","+(M-Y*le)+"V"+($+Y*le)+"A "+Y+","+Y+" 0 0 "+se+" "+(F-Y*Q)+","+$+"Z";else{oe=Math.abs(F-H)+de;var he=oe<Y?Y-Math.sqrt(oe*(2*Y-oe)):0,Te=de>0?Math.sqrt(de*(2*Y-de)):0,fe=Q>0?Math.max:Math.min;te="M"+H+","+$+"V"+(M-he*le)+"H"+fe(F-(Y-de)*Q,H)+"A "+Y+","+Y+" 0 0 "+se+" "+F+","+(M-Y*le-Te)+"V"+($+Y*le+Te)+"A "+Y+","+Y+" 0 0 "+se+" "+fe(F-(Y-de)*Q,H)+","+($+he*le)+"Z"}else if(L.hasB)te="M"+(H+Y*Q)+","+$+"A "+Y+","+Y+" 0 0 "+se+" "+H+","+($+Y*le)+"V"+(M-Y*le)+"A "+Y+","+Y+" 0 0 "+se+" "+(H+Y*Q)+","+M+"H"+(F-Y*Q)+"A "+Y+","+Y+" 0 0 "+se+" "+F+","+(M-Y*le)+"V"+($+Y*le)+"A "+Y+","+Y+" 0 0 "+se+" "+(F-Y*Q)+","+$+"Z";else{oe=Math.abs(M-$)+de;var Ae=oe<Y?Y-Math.sqrt(oe*(2*Y-oe)):0,ce=de>0?Math.sqrt(de*(2*Y-de)):0,ye=le>0?Math.max:Math.min;te="M"+(H+Ae*Q)+","+$+"V"+ye(M-(Y-de)*le,$)+"A "+Y+","+Y+" 0 0 "+se+" "+(H+Y*Q-ce)+","+M+"H"+(F-Y*Q+ce)+"A "+Y+","+Y+" 0 0 "+se+" "+(F-Ae*Q)+","+ye(M-(Y-de)*le,$)+"V"+$+"Z"}}else te=_e}else te=_e;var Se=cA(kr.ensureSingle(R,"path"),s,i,n);if(Se.style("vector-effect",f?"none":"non-scaling-stroke").attr("d",isNaN((F-H)*(M-$))||A&&t._context.staticPlot?"M0,0Z":te).call($i.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&_){var Me=$i.makePointStyleFns(h);$i.singlePointStyle(L,Se,h,Me,t)}m8(t,e,R,u,E,H,F,$,M,Y,de,i,n),e.layerClipId&&$i.hideOutsideRangePoint(L,R.select("text"),o,l,h.xcalendar,h.ycalendar)});var C=h.cliponaxis===!1;$i.setClipUrl(v,C?null:e.layerClipId,t)});n8.getComponentMethod("errorbars","plot")(t,c,e,i)}function m8(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(oe,_e,de){var X=kr.ensureSingle(oe,"text").text(_e).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call($i.font,de).call(a8.convertToTspans,t);return X}var g=a[0].trace,w=g.orientation==="h",b=b8(p,a,i,h,d);m=x8(g,i);var x=u.mode==="stack"||u.mode==="relative",_=a[i],k=!x||_._outmost,T=_.hasB,S=f&&f-c>Nr;if(!b||m==="none"||(_.isBlank||n===o||l===s)&&(m==="auto"||m==="inside")){r.select("text").remove();return}var C=p.font,L=fd.getBarColor(a[i],g),E=fd.getInsideTextFont(g,i,C,L),R=fd.getOutsideTextFont(g,i,C),N=g.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),M=F-2*Nr,A=$-2*Nr,D,P,I,O,B;if(m==="outside"&&!k&&!_.hasB&&(m="inside"),m==="auto")if(k){m="inside",B=kr.ensureUniformFontSize(t,E),D=y(r,b,B),P=$i.bBox(D.node()),I=P.width,O=P.height;var G=I>0&&O>0,j;S?T?j=an(M-2*f,A,I,O,w)||an(M,A-2*f,I,O,w):w?j=an(M-(f-c),A,I,O,w)||an(M,A-2*(f-c),I,O,w):j=an(M,A-(f-c),I,O,w)||an(M-2*(f-c),A,I,O,w):j=an(M,A,I,O,w),G&&j?m="inside":(m="outside",D.remove(),D=null)}else m="inside";if(!D){B=kr.ensureUniformFontSize(t,m==="outside"?R:E),D=y(r,b,B);var q=D.attr("transform");if(D.attr("transform",""),P=$i.bBox(D.node()),I=P.width,O=P.height,D.attr("transform",q),I<=0||O<=0){D.remove();return}}var V=g.textangle,K,Y;m==="outside"?(Y=g.constraintext==="both"||g.constraintext==="outside",K=g8(n,o,l,s,P,{isHorizontal:w,constrained:Y,angle:V})):(Y=g.constraintext==="both"||g.constraintext==="inside",K=hA(n,o,l,s,P,{isHorizontal:w,constrained:Y,angle:V,anchor:N,hasB:T,r:f,overhead:c})),K.fontSize=B.size,o8(g.type==="histogram"?"bar":g.type,K,p),_.transform=K;var te=cA(D,p,u,v);kr.setTransormAndDisplay(te,K)}function an(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 vA(t){return t==="auto"?0:t}function dA(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 hA(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,g=i.width,w=i.height,b=Math.abs(e-t),x=Math.abs(a-r),_=b>2*Nr&&x>2*Nr?Nr:0;b-=2*_,x-=2*_;var k=vA(s);s==="auto"&&!(g<=b&&w<=x)&&(g>b||w>x)&&(!(g>x||w>b)||g<w!=b<x)&&(k+=90);var T=dA(i,k),S,C;if(m&&m-y>Nr){var L=y8(t,e,r,a,T,m,y,o,p);S=L.scale,C=L.pad}else S=1,l&&(S=Math.min(1,b/T.x,x/T.y)),C=0;var E=i.left*d+i.right*h,R=(i.top+i.bottom)/2,N=(t+Nr)*d+(e-Nr)*h,H=(r+a)/2,F=0,$=0;if(u||c){var M=(o?T.x:T.y)/2;m&&(c||p)&&(_+=C);var A=o?Wa(t,e):Wa(r,a);o?u?(N=t+A*_,F=-A*M):(N=e-A*_,F=A*M):u?(H=r+A*_,$=-A*M):(H=a-A*_,$=A*M)}return{textX:E,textY:R,targetX:N,targetY:H,anchorX:F,anchorY:$,scale:S,rotate:k}}function y8(t,e,r,a,i,n,o,l,s){var f=Math.max(0,Math.abs(e-t)-2*Nr),c=Math.max(0,Math.abs(a-r)-2*Nr),u=n-Nr,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,g,w;return i.y/i.x>=c/(f-h)?g=c/i.y:i.y/i.x<=(c-d)/f?g=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,g=(-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,g=(-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,g=(-m+Math.sqrt(m*m-4*p*y))/(2*p)),g=Math.min(1,g),l?w=Math.max(0,u-Math.sqrt(Math.max(0,u*u-(u-(c-i.y*g)/2)*(u-(c-i.y*g)/2)))-o):w=Math.max(0,u-Math.sqrt(Math.max(0,u*u-(u-(f-i.x*g)/2)*(u-(f-i.x*g)/2)))-o),{scale:g,pad:w}}function g8(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*Nr?Nr:0:h=u>2*Nr?Nr:0;var d=1;l&&(d=o?Math.min(1,v/c):Math.min(1,u/f));var p=vA(s),m=dA(i,p),y=(o?m.x:m.y)/2,g=(i.left+i.right)/2,w=(i.top+i.bottom)/2,b=(t+e)/2,x=(r+a)/2,_=0,k=0,T=o?Wa(e,t):Wa(r,a);return o?(b=e-T*h,_=T*y):(x=a+T*h,k=-T*y),{textX:g,textY:w,targetX:b,targetY:x,anchorX:_,anchorY:k,scale:d,rotate:p}}function b8(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=_8(t,e,r,a,i):n.textinfo?l=w8(e,r,a,i):l=Ho.getValue(n.text,r),Ho.coerceString(f8,l)}function x8(t,e){var r=Ho.getValue(t.textposition,e);return Ho.coerceEnumerated(c8,r)}function _8(t,e,r,a,i){var n=e[0].trace,o=kr.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 Tc(v,v.c2l(_),!0).text}function m(_){return Tc(d,d.c2l(_),!0).text}var y=e[r],g={};g.label=y.p,g.labelLabel=g[u+"Label"]=p(y.p);var w=kr.castOption(n,y.i,"text");(w===0||w)&&(g.text=w),g.value=y.s,g.valueLabel=g[h+"Label"]=m(y.s);var b={};u8(b,n,y.i),(l||b.x===void 0)&&(b.x=c?g.value:g.label),(l||b.y===void 0)&&(b.y=c?g.label:g.value),(l||b.xLabel===void 0)&&(b.xLabel=c?g.valueLabel:g.labelLabel),(l||b.yLabel===void 0)&&(b.yLabel=c?g.labelLabel:g.valueLabel),s&&(g.delta=+y.rawS||y.s,g.deltaLabel=m(g.delta),g.final=y.v,g.finalLabel=m(g.final),g.initial=g.final-g.delta,g.initialLabel=m(g.initial)),f&&(g.value=y.s,g.valueLabel=m(g.value),g.percentInitial=y.begR,g.percentInitialLabel=kr.formatPercent(y.begR),g.percentPrevious=y.difR,g.percentPreviousLabel=kr.formatPercent(y.difR),g.percentTotal=y.sumR,g.percenTotalLabel=kr.formatPercent(y.sumR));var x=kr.castOption(n,y.i,"customdata");return x&&(g.customdata=x),kr.texttemplateString(o,g,t._d3locale,b,g,n._meta||{})}function w8(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 Tc(_,x,!0).text}function f(x){var _=n?r:a;return Tc(_,+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=kr.castOption(i,u.i,"text"),(d===0||d)&&h.push(d)),o){var m=+u.rawS||u.s,y=u.v,g=y-m;p("initial")&&h.push(f(g)),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 b=w>1;p("percent initial")&&(d=kr.formatPercent(u.begR),b&&(d+=" of initial"),h.push(d)),p("percent previous")&&(d=kr.formatPercent(u.difR),b&&(d+=" of previous"),h.push(d)),p("percent total")&&(d=kr.formatPercent(u.sumR),b&&(d+=" of total"),h.push(d))}return h.join("<br>")}var hm={plot:p8,toMoveInsideBar:hA},xl=Na,T8=lt,kx=pt,k8=ge.fillText,A8=mi.getLineWidth,ud=Bt.hoverLabelText,M8=lr.BADNUM;function S8(t,e,r,a,i){var n=pA(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=mA(l,s),T8.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function pA(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,g;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"],b=s||w;function x(j){return k(j,-1)}function _(j){return k(j,1)}function k(j,q){var V=j.w;return j[d]+q*V/2}function T(j){return j[d+"End"]-j[d+"Start"]}var S=s?x:w?function(j){return j.p-T(j)/2}:function(j){return Math.min(x(j),j.p-l.bardelta/2)},C=s?_:w?function(j){return j.p+T(j)/2}:function(j){return Math.max(_(j),j.p+l.bardelta/2)};function L(j,q,V){return i.finiteRange&&(V=0),xl.inbox(j-v,q-v,V+Math.min(1,Math.abs(q-j)/g)-1)}function E(j){return L(S(j),C(j),c)}function R(j){return L(x(j),_(j),u)}function N(j){var q=j[p];if(f){var V=Math.abs(j.rawS)||0;h>0?q+=V:h<0&&(q-=V)}return q}function H(j){var q=h,V=j.b,K=N(j);return xl.inbox(V-q,K-q,c+(K-q)/(K-V)-1)}function F(j){var q=h,V=j.b,K=N(j);return xl.inbox(V-q,K-q,u+(K-q)/(K-V)-1)}var $=t[d+"a"],M=t[p+"a"];g=Math.abs($.r2c($.range[1])-$.r2c($.range[0]));function A(j){return(m(j)+y(j))/2}var D=xl.getDistanceFunction(a,m,y,A);if(xl.getClosest(n,D,t),t.index!==!1&&n[t.index].p!==M8){b||(S=function(j){return Math.min(x(j),j.p-l.bargroupwidth/2)},C=function(j){return Math.max(_(j),j.p+l.bargroupwidth/2)});var P=t.index,I=n[P],O=o.base?I.b+I.s:I.s;t[p+"0"]=t[p+"1"]=M.c2p(I[p],!0),t[p+"LabelVal"]=O;var B=l.extents[l.extents.round(I.p)];t[d+"0"]=$.c2p(s?S(I):B[0],!0),t[d+"1"]=$.c2p(s?C(I):B[1],!0);var G=I.orig_p!==void 0;return t[d+"LabelVal"]=G?I.orig_p:I.p,t.labelLabel=ud($,t[d+"LabelVal"],o[d+"hoverformat"]),t.valueLabel=ud(M,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=ud(M,I.b,o[p+"hoverformat"]),t.spikeDistance=(F(I)+R(I))/2,t[d+"Spike"]=$.c2p(I.p,!0),k8(I,o,t),t.hovertemplate=o.hovertemplate,t}}function mA(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=A8(t,e);if(kx.opacity(r))return r;if(kx.opacity(a)&&i)return a}var yA={hoverPoints:S8,hoverOnBars:pA,getTraceColor:mA},L8=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},gA=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:C8(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 C8(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 D8={attributes:ks,layoutAttributes:cm,supplyDefaults:An.supplyDefaults,crossTraceDefaults:An.crossTraceDefaults,supplyLayoutDefaults:qk,calc:j6,crossTraceCalc:Kp.crossTraceCalc,colorbar:_s,arraysToCalcdata:um,plot:hm.plot,style:Mn.style,styleOnSelect:Mn.styleOnSelect,hoverPoints:yA.hoverPoints,eventData:L8,selectPoints:gA,moduleType:"trace",name:"bar",basePlotModule:dr,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(" ")}},$8=D8;const cB=Hi($8);var P8=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"}},E8={eventDataKeys:["binNumber"]},Zr=ks,Ax=Wo.axisHoverFormat,R8=Rr.hovertemplateAttrs,z8=Rr.texttemplateAttrs,vd=Dr,Mx=P8,I8=E8,dd=Qt.extendFlat,bA={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:Ax("x"),yhoverformat:Ax("y"),text:dd({},Zr.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:dd({},Zr.hovertext,{description:"Same as `text`."}),orientation:Zr.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:Mx("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:Mx("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:R8({},{keys:I8.eventDataKeys}),texttemplate:z8({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:dd({},Zr.textposition,{arrayOk:!1}),textfont:vd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:vd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:vd({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:Zr.insidetextanchor,textangle:Zr.textangle,cliponaxis:Zr.cliponaxis,constraintext:Zr.constraintext,marker:Zr.marker,offsetgroup:Zr.offsetgroup,alignmentgroup:Zr.alignmentgroup,selected:Zr.selected,unselected:Zr.unselected,_deprecated:{bardir:Zr._deprecated.bardir}},Sx=lt,_l=ge,Lx=pt,F8=An.handleText,N8=Vk,H8=bA,O8=function(e,r,a,i){function n(g,w){return _l.coerce(e,r,H8,g,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");F8(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=Sx.getComponentMethod("calendars","handleTraceDefaults");d(e,r,["x","y"],i);var p=r[v];p&&n("histfunc"),n("histnorm"),n("autobin"+u),N8(e,r,n,a,i),_l.coerceSelectionMarkerOpacity(r,n);var m=(r.marker.line||{}).color,y=Sx.getComponentMethod("errorbars","supplyDefaults");y(e,r,m||Lx.defaultLine,{axis:"y"}),y(e,r,m||Lx.defaultLine,{axis:"x",inherit:"y"})},Dl=ge,j8=sr,yf=lt.traceIs,B8=Yp,G8=An.validateCornerradius,Cx=Dl.nestedProperty,hd=hi.getAxisGroup,Dx=[{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"}],U8=["x","y"],V8=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 $=j8.getFromTrace({_fullLayout:r},H,F);return $.type}function y(H,F,$){var M=H.uid+"__"+$;F||(F=M);var A=m(H,$),D=H[$+"calendar"]||"",P=a[F],I=!0;P&&(A===P.axType&&D===P.calendar?(I=!1,P.traces.push(H),P.dirs.push($)):(F=M,A!==P.axType&&Dl.warn(["Attempted to group the bins of trace",H.index,"set on a","type:"+A,"axis","with bins on","type:"+P.axType,"axis."].join(" ")),D!==P.calendar&&Dl.warn(["Attempted to group the bins of trace",H.index,"set with a",D,"calendar","with bins",P.calendar?"on a "+P.calendar+" calendar":"w/o a set calendar"].join(" ")))),I&&(a[F]={traces:[H],dirs:[$],axType:A,calendar:H[$+"calendar"]||""}),H["_"+$+"bingroup"]=F}for(u=0;u<e.length;u++)if(l=e[u],yf(l,"histogram")){if(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,l.type==="histogram"){var g=d("marker.cornerradius",r.barcornerradius);l.marker&&(l.marker.cornerradius=G8(g))}yf(l,"2dMap")||B8(l._input,l,r,d)}var w=r._alignmentOpts||{};for(u=0;u<i.length;u++){if(l=i[u],f="",!yf(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var b=l[c+"axis"],x=hd(r,b)+l.orientation;(w[x]||{})[l.alignmentgroup]&&(f=x)}!f&&r.barmode!=="overlay"&&(f=hd(r,l.xaxis)+hd(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(yf(l,"2dMap"))for(h=0;h<2;h++){c=U8[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 C=a[f];for(s=C.traces,v=0;v<Dx.length;v++){var L=Dx[v],E=L.name,R,N;if(!(E==="nbins"&&C.sizeFound)){for(u=0;u<s.length;u++){if(l=s[u],c=C.dirs[u],R=L.aStr[c],Cx(l._input,R).get()!==void 0){C[E]=d(R),C[E+"Found"]=!0;break}N=(l._autoBin||{})[c]||{},N[E]&&Cx(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"&&!C.sizeFound&&!C.nbinsFound&&(l=s[0],C[E]=d(R))}}}},Jn=wt,X8={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return Jn(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return Jn(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if(Jn(i))if(i=Number(i),Jn(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(Jn(i))if(i=Number(i),Jn(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},Y8={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}},W8=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},Qo=lr,_n=Qo.ONEAVGYEAR,$x=Qo.ONEAVGMONTH,kc=Qo.ONEDAY,Px=Qo.ONEHOUR,Ex=Qo.ONEMIN,Rx=Qo.ONESEC,zx=Bt.tickIncrement,q8=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(gf(f+l,f+s,i,n),gf(c+l,c+s,i,n)),v=Math.min(gf(f+o,f+l,i,n),gf(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>kc){var p=h===_n?1:6,m=h===_n?"M12":"M1";return function(y,g){var w=i.c2d(y,_n,n),b=w.indexOf("-",p);b>0&&(w=w.substr(0,b));var x=i.d2c(w,0,n);if(x<y){var _=zx(x,m,!1,n);(x+_)/2<y+e&&(x=_)}return g&&d?zx(x,m,!0,n):x}}return function(y,g){var w=h*Math.round(y/h);return w+h/10<y&&w+h*.9<y+e&&(w+=h),g&&d&&(w-=h),w}};function gf(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=Ix(i,n),l=0;l<10;l++){var s=Ix(o*80,n);if(o===s)break;if(Z8(s,t,e,n,r,a))o=s;else break}return o}function Ix(t,e){return e&&t>Rx?t>kc?t>_n*1.1?_n:t>$x*1.1?$x:kc:t>Px?Px:t>Ex?Ex:Rx:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function Z8(t,e,r,a,i,n){if(a&&t>kc){var o=Fx(e,i,n),l=Fx(r,i,n),s=t===_n?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function Fx(t,e,r){var a=e.c2d(t,_n,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var _h=wt,Fr=ge,Nx=lt,pa=Bt,K8=um,Hx=X8,Q8=Y8,J8=W8,eH=q8;function tH(t,e){var r=[],a=[],i=e.orientation==="h",n=pa.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=pm(t,e,n,o),v=u[0],h=u[1],d=typeof v.size=="string",p=[],m=d?p:v,y=[],g=[],w=[],b=0,x=e.histnorm,_=e.histfunc,k=x.indexOf("density")!==-1,T,S,C;f.enabled&&k&&(x=x.replace(/ ?density$/,""),k=!1);var L=_==="max"||_==="min",E=L?null:0,R=Hx.count,N=Q8[x],H=!1,F=function(oe){return n.r2c(oe,0,s)},$;for(Fr.isArrayOrTypedArray(e[l])&&_!=="count"&&($=e[l],H=_==="avg",R=Hx[_]),c=F(v.start),S=F(v.end)+(c-pa.tickIncrement(c,v.size,!1,s))/1e6;c<S&&r.length<1e6&&(T=pa.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&&g.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 M=e["_"+o+"bingroup"],A={leftGap:1/0,rightGap:1/0};M&&(t._fullLayout._roundFnOpts[M]||(t._fullLayout._roundFnOpts[M]=A),A=t._fullLayout._roundFnOpts[M]);var D=a.length,P=!0,I=A.leftGap,O=A.rightGap,B={};for(c=0;c<h.length;c++){var G=h[c];C=Fr.findBin(G,m),C>=0&&C<D&&(b+=R(C,c,a,$,g),P&&w[C].length&&G!==h[w[C][0]]&&(P=!1),w[C].push(c),B[c]=C,I=Math.min(I,G-p[C]),O=Math.min(O,p[C+1]-G))}A.leftGap=I,A.rightGap=O;var j;P||(j=function(oe,_e){return function(){var de=t._fullLayout._roundFnOpts[M];return eH(de.leftGap,de.rightGap,p,n,s)(oe,_e)}}),H&&(b=J8(a,g)),N&&N(a,b,y),f.enabled&&iH(a,f.direction,f.currentbin);var q=Math.min(r.length,a.length),V=[],K=0,Y=q-1;for(c=0;c<q;c++)if(a[c]){K=c;break}for(c=q-1;c>=K;c--)if(a[c]){Y=c;break}for(c=K;c<=Y;c++)if(_h(r[c])&&_h(a[c])){var te={p:r[c],s:a[c],b:0};f.enabled||(te.pts=w[c],P?te.ph0=te.ph1=w[c].length?h[w[c][0]]:r[c]:(e._computePh=!0,te.ph0=j(p[c]),te.ph1=j(p[c+1],!0))),V.push(te)}return V.length===1&&(V[0].width1=pa.tickIncrement(V[0].p,v.size,!1,s)-V[0].p),K8(V,e),Fr.isArrayOrTypedArray(e.selectedpoints)&&Fr.tagSelected(V,e,B),V}function pm(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)},g=function(G){return r.c2r(G,0,h)},w=r.type==="date"?function(G){return G||G===0?Fr.cleanDate(G,null,h):null}:function(G){return _h(G)?Number(G):null};function b(G,j,q){j[G+"Found"]?(j[G]=w(j[G]),j[G]===null&&(j[G]=q[G])):(p[G]=j[G]=q[G],Fr.nestedProperty(u[0],n+"."+G).set(q[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=Fr.concat(x,d),delete v["_"+a+"autoBinFinished"],e.visible===!0&&(_?_=!1:(delete v._autoBin,v["_"+a+"autoBinFinished"]=1),Nx.traceIs(v,"2dMap")&&(k=!0),v.type==="histogram2dcontour"&&(T=!0))}h=u[0][a+"calendar"];var C=pa.autoBin(x,r,s.nbins,k,h,s.sizeFound&&s.size),L=u[0]._autoBin={};if(p=L[s.dirs[0]]={},T&&(s.size||(C.start=g(pa.tickIncrement(y(C.start),C.size,!0,h))),s.end===void 0&&(C.end=g(pa.tickIncrement(y(C.end),C.size,!1,h)))),f&&!Nx.traceIs(e,"2dMap")&&C._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"&&e.bingroup===""&&typeof e.xbins>"u"){if(i)return[C,d,!0];C=rH(t,e,r,a,n)}m=v.cumulative||{},m.enabled&&m.currentbin!=="include"&&(m.direction==="decreasing"?C.start=g(pa.tickIncrement(y(C.start),C.size,!0,h)):C.end=g(pa.tickIncrement(y(C.end),C.size,!1,h))),s.size=C.size,s.sizeFound||(p.size=C.size,Fr.nestedProperty(u[0],n+".size").set(C.size)),b("start",s,C),b("end",s,C)}d=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var E=e._input[n]||{},R=Fr.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:Fr.aggNums(Math.min,null,d),M={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:N,calendar:h,range:[$,pa.tickIncrement($,s.size,!1,h)].map(r.l2r)},A=pa.tickFirst(M);A>r.r2l($)&&(A=pa.tickIncrement(A,s.size,!0,h)),R.start=r.l2r(A),F||Fr.nestedProperty(e,n+".start").set(R.start)}var D=s.end,P=r.r2l(E.end),I=P!==void 0;if((s.endFound||I)&&P!==r.r2l(D)){var O=I?P:Fr.aggNums(Math.max,null,d);R.end=r.l2r(O),I||Fr.nestedProperty(e,n+".start").set(R.end)}var B="autobin"+a;return e._input[B]===!1&&(e._input[n]=Fr.extendFlat({},e[n]||{}),delete e._input[B],delete e[B]),[R,d]}function rH(t,e,r,a,i){var n=t._fullLayout,o=aH(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=pm(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"],g=0;g<y.length;g++)if(y[g]!==void 0){m[c]=y[g];break}for(isFinite(s)||(s=Fr.distinctVals(m).minDiff),c=0;c<f.length;c++){u=f[c];var w=u[a+"calendar"],b={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]=b,v=n._histogramBinOpts[u["_"+a+"bingroup"]],v&&Fr.extendFlat(v,b)}return e[i]}function aH(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 iH(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 nH={calc:tH,calcAllAutoBins:pm},oH=yA.hoverPoints,lH=Bt.hoverLabelText,sH=function(e,r,a,i,n){var o=oH(e,r,a,i,n);if(o){e=o[0];var l=e.cd[e.index],s=e.cd[0].trace;if(!s.cumulative.enabled){var f=s.orientation==="h"?"y":"x";e[f+"Label"]=lH(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},fH=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},cH={attributes:bA,layoutAttributes:cm,supplyDefaults:O8,crossTraceDefaults:V8,supplyLayoutDefaults:qk,calc:nH.calc,crossTraceCalc:Kp.crossTraceCalc,plot:hm.plot,layerName:"barlayer",style:Mn.style,styleOnSelect:Mn.styleOnSelect,colorbar:_s,hoverPoints:sH,selectPoints:gA,eventData:fH,moduleType:"trace",name:"histogram",basePlotModule:dr,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(" ")}},uH=cH;const uB=Hi(uH);var vH=Ta,dH=Wi.attributes,hH=Dr,pH=Hr,mH=Rr.hovertemplateAttrs,yH=Rr.texttemplateAttrs,eo=Qt.extendFlat,gH=ia.pattern,wl=hH({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),bu={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:pH.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:gH,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:eo({},vH.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:mH({},{keys:["label","color","value","percent","text"]}),texttemplate:yH({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:eo({},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:eo({},wl,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:eo({},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:eo({},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:dH({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:eo({},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`."}}},bH=wt,Bl=ge,xH=bu,_H=Wi.defaults,wH=An.handleText,TH=ge.coercePattern;function xA(t,e){var r=Bl.isArrayOrTypedArray(t),a=Bl.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(bH(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function _A(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");TH(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 kH(t,e,r,a){function i(g,w){return Bl.coerce(t,e,xH,g,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,_A(t,e,a,i,!0),i("scalegroup");var f=i("text"),c=i("texttemplate"),u;if(c||(u=i("textinfo",Bl.isArrayOrTypedArray(f)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),c||u&&u!=="none"){var v=i("textposition");wH(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")}_H(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"),Bl.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var wA={handleLabelsAndValues:xA,handleMarkerDefaults:_A,supplyDefaults:kH},TA={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(" ")}},AH=ge,MH=TA,SH=function(e,r){function a(i,n){return AH.coerce(e,r,MH,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},LH=wt,wh=wa,CH=pt,DH={};function $H(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=kA(a["_"+e.type+"colormap"]),d=0,p=!1;for(c=0;c<s;c++){var m,y,g;if(f){if(m=l[c],!LH(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,g=i.indexOf(y)!==-1,g||(d+=m),r.push({v:m,label:y,color:h(o[c],y),i:c,pts:[c],hidden:g})):(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 b=e.type==="funnelarea"?p:e.sort;return b&&r.sort(function(x,_){return _.v-x.v}),r[0]&&(r[0].vTotal=d),r}function kA(t){return function(r,a){return!r||(r=wh(r),!r.isValid())?!1:(r=CH.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function PH(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=AA(n,DH));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 AA(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(wh(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(wh(t[r]).darken(20).toHexString());e[a]=i}return i}var Ac={calc:$H,crossTraceCalc:PH,makePullColorFn:kA,generateExtendedColors:AA},EH=ka.appendArrayMultiPointValues,RH=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]),EH(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},ea=gt,zH=vr,bf=Na,MA=pt,si=$t,Cr=ge,IH=Cr.strScale,Ox=Cr.strTranslate,Th=_r,SA=pi,FH=SA.recordMinTextSize,NH=SA.clearMinTextSize,LA=Ts.TEXTPAD,Ft=Rn,xf=RH,jx=ge.isValidTextValue;function HH(t,e){var r=t._context.staticPlot,a=t._fullLayout,i=a._size;NH("pie",a),$A(e,t),NA(e,i);var n=Cr.makeTraceGroups(a._pielayer,e,"trace").each(function(o){var l=ea.select(this),s=o[0],f=s.trace;WH(o),l.attr("stroke-linejoin","round"),l.each(function(){var c=ea.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var u=[[[],[]],[[],[]]],v=!1;c.each(function(b,x){if(b.hidden){ea.select(this).selectAll("path,g").remove();return}b.pointNumber=b.i,b.curveNumber=f.index,u[b.pxmid[1]<0?0:1][b.pxmid[0]<0?0:1].push(b);var _=s.cx,k=s.cy,T=ea.select(this),S=T.selectAll("path.surface").data([b]);if(S.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),T.call(CA,t,o),f.pull){var C=+Ft.castOption(f.pull,b.pts)||0;C>0&&(_+=C*b.pxmid[0],k+=C*b.pxmid[1])}b.cxFinal=_,b.cyFinal=k;function L(M,A,D,P){var I=P*(A[0]-M[0]),O=P*(A[1]-M[1]);return"a"+P*s.r+","+P*s.r+" 0 "+b.largeArc+(D?" 1 ":" 0 ")+I+","+O}var E=f.hole;if(b.v===s.vTotal){var R="M"+(_+b.px0[0])+","+(k+b.px0[1])+L(b.px0,b.pxmid,!0,1)+L(b.pxmid,b.px0,!0,1)+"Z";E?S.attr("d","M"+(_+E*b.px0[0])+","+(k+E*b.px0[1])+L(b.px0,b.pxmid,!1,E)+L(b.pxmid,b.px0,!1,E)+"Z"+R):S.attr("d",R)}else{var N=L(b.px0,b.px1,!0,1);if(E){var H=1-E;S.attr("d","M"+(_+E*b.px1[0])+","+(k+E*b.px1[1])+L(b.px1,b.px0,!1,E)+"l"+H*b.px0[0]+","+H*b.px0[1]+N+"Z")}else S.attr("d","M"+_+","+k+"l"+b.px0[0]+","+b.px0[1]+N+"Z")}HA(t,b,s);var F=Ft.castOption(f.textposition,b.pts),$=T.selectAll("g.slicetext").data(b.text&&F!=="none"?[0]:[]);$.enter().append("g").classed("slicetext",!0),$.exit().remove(),$.each(function(){var M=Cr.ensureSingle(ea.select(this),"text","",function(j){j.attr("data-notex",1)}),A=Cr.ensureUniformFontSize(t,F==="outside"?jH(f,b,a.font):DA(f,b,a.font));M.text(b.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(si.font,A).call(Th.convertToTspans,t);var D=si.bBox(M.node()),P;if(F==="outside")P=Ux(D,b);else if(P=PA(D,b,s),F==="auto"&&P.scale<1){var I=Cr.ensureUniformFontSize(t,f.outsidetextfont);M.call(si.font,I),D=si.bBox(M.node()),P=Ux(D,b)}var O=P.textPosAngle,B=O===void 0?b.pxmid:Uf(s.r,O);if(P.targetX=_+B[0]*P.rCenter+(P.x||0),P.targetY=k+B[1]*P.rCenter+(P.y||0),OA(P,D),P.outside){var G=P.targetY;b.yLabelMin=G-D.height/2,b.yLabelMid=G,b.yLabelMax=G+D.height/2,b.labelExtraX=0,b.labelExtraY=0,v=!0}P.fontSize=A.size,FH(f.type,P,a),o[x].transform=P,Cr.setTransormAndDisplay(M,P)})});var h=ea.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 b=Cr.ensureSingle(ea.select(this),"text","",function(k){k.attr("data-notex",1)}),x=f.title.text;f._meta&&(x=Cr.templateString(x,f._meta)),b.text(x).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(si.font,f.title.font).call(Th.convertToTspans,t);var _;f.title.position==="middle center"?_=UH(s):_=IA(s,i),b.attr("transform",Ox(_.x,_.y)+IH(Math.min(1,_.scale))+Ox(_.tx,_.ty))}),v&&XH(u,f),OH(c,f),v&&f.automargin){var d=si.bBox(l.node()),p=f.domain,m=i.w*(p.x[1]-p.x[0]),y=i.h*(p.y[1]-p.y[0]),g=(.5*m-s.r)/i.w,w=(.5*y-s.r)/i.h;zH.autoMargin(t,"pie."+f.uid+".automargin",{xl:p.x[0]-g,xr:p.x[1]+g,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=ea.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function OH(t,e){t.each(function(r){var a=ea.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,Cr.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;Cr.ensureSingle(a,"path","textline").call(MA.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function CA(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=bf.castHoverinfo({hoverinfo:[Ft.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=Ft.castOption(c.hovertext||c.text,s.pts),u&&u.indexOf("text")!==-1){var y=s.text;Cr.isValidTextValue(y)&&m.push(y)}s.value=s.v,s.valueLabel=Ft.formatPieValue(s.v,p),u&&u.indexOf("value")!==-1&&m.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=Ft.formatPiePercent(s.percent,p),u&&u.indexOf("percent")!==-1&&m.push(s.percentLabel);var g=c.hoverlabel,w=g.font,b=[];bf.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:Ft.castOption(g.bgcolor,s.pts)||s.color,borderColor:Ft.castOption(g.bordercolor,s.pts),fontFamily:Ft.castOption(w.family,s.pts),fontSize:Ft.castOption(w.size,s.pts),fontColor:Ft.castOption(w.color,s.pts),nameLength:Ft.castOption(g.namelength,s.pts),textAlign:Ft.castOption(g.align,s.pts),hovertemplate:Ft.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[xf(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:b}),s.bbox=b[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[xf(s,c)],event:ea.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],u=ea.select(this).datum();o._hasHoverEvent&&(s.originalEvent=ea.event,e.emit("plotly_unhover",{points:[xf(u,c)],event:ea.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(bf.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=[xf(s,c)],bf.click(e,ea.event))})}function jH(t,e,r){var a=Ft.castOption(t.outsidetextfont.color,e.pts)||Ft.castOption(t.textfont.color,e.pts)||r.color,i=Ft.castOption(t.outsidetextfont.family,e.pts)||Ft.castOption(t.textfont.family,e.pts)||r.family,n=Ft.castOption(t.outsidetextfont.size,e.pts)||Ft.castOption(t.textfont.size,e.pts)||r.size;return{color:a,family:i,size:n}}function DA(t,e,r){var a=Ft.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=Ft.castOption(t._input.textfont.color,e.pts));var i=Ft.castOption(t.insidetextfont.family,e.pts)||Ft.castOption(t.textfont.family,e.pts)||r.family,n=Ft.castOption(t.insidetextfont.size,e.pts)||Ft.castOption(t.textfont.size,e.pts)||r.size;return{color:a||MA.contrast(e.color),family:i,size:n}}function $A(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=Cr.templateString(n,a._meta));var o=si.tester.append("text").attr("data-notex",1).text(n).call(si.font,a.title.font).call(Th.convertToTspans,e),l=si.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function PA(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(BH(e,T)){var C=Math.abs(T-e.startangle),L=Math.abs(T-e.stopangle),E=C<L?C:L;S==="tan"?m=Gx(t,a,o,E,0):m=Bx(t,a,o,E,Math.PI/2),m.textPosAngle=T,p.push(m)}},g;if(u||v){for(g=4;g>=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(u||h){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.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=Bx(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,p.push(m)),(d||v)&&(m=Gx(t,a,o,s,f),m.textPosAngle=(e.startangle+e.stopangle)/2,p.push(m));for(var b=0,x=0,_=0;_<p.length;_++){var k=p[_].scale;if(x<k&&(x=k,b=_),!d&&x>=1)break}return p[b]}function BH(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function Bx(t,e,r,a,i){e=Math.max(0,e-2*LA);var n=t.width/t.height,o=zA(n,a,e,r);return{scale:o*2/t.height,rCenter:EA(n,o/e),rotate:RA(i)}}function Gx(t,e,r,a,i){e=Math.max(0,e-2*LA);var n=t.height/t.width,o=zA(n,a,e,r);return{scale:o*2/t.width,rCenter:EA(n,o/e),rotate:RA(i+Math.PI/2)}}function EA(t,e){return Math.cos(e)-t*e}function RA(t){return(180/Math.PI*t+720)%180-90}function zA(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 GH(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function Ux(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 UH(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 IA(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=FA(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=VH(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=kh(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function VH(t,e){return t/(e===void 0?1:e)}function kh(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 FA(t){var e=t.pull;if(!e)return 0;var r;if(Cr.isArrayOrTypedArray(e))for(e=0,r=0;r<t.pull.length;r++)t.pull[r]>e&&(e=t.pull[r]);return e}function XH(t,e){var r,a,i,n,o,l,s,f,c,u,v,h,d;function p(w,b){return w.pxmid[1]-b.pxmid[1]}function m(w,b){return b.pxmid[1]-w.pxmid[1]}function y(w,b){b||(b={});var x=b.labelExtraY+(a?b.yLabelMax:b.yLabelMin),_=a?w.yLabelMin:w.yLabelMax,k=a?w.yLabelMax:w.yLabelMin,T=w.cyFinal+o(w.px0[1],w.px1[1]),S=x-_,C,L,E,R,N,H;if(S*s>0&&(w.labelExtraY=S),!!Cr.isArrayOrTypedArray(e.pull))for(L=0;L<u.length;L++)E=u[L],!(E===w||(Ft.castOption(e.pull,w.pts)||0)>=(Ft.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&&(C=3*l*Math.abs(L-u.indexOf(w)),N=E.cxFinal+n(E.px0[0],E.px1[0]),H=N+C-(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 g=v&&h[v-1];d&&!v&&(g=d),y(h[v],g)}}}function NA(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-=kh(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+FA(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-=kh(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}YH(t,r)}function YH(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 WH(t){var e=t[0],r=e.r,a=e.trace,i=Ft.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=Uf(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=Uf(r,i),f.midangle=i,i+=n*f.v/2,c=Uf(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=GH(f,e))}function Uf(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function HA(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(b){return l.indexOf(b)!==-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=Ft.getFirstFilled(i.text,e.pts);jx(p)&&d.push(p)}u&&d.push(Ft.formatPieValue(e.v,h)),v&&d.push(Ft.formatPiePercent(e.v/r.vTotal,h)),e.text=d.join("<br>")}function m(b){return{label:b.label,value:b.v,valueLabel:Ft.formatPieValue(b.v,a.separators),percent:b.v/r.vTotal,percentLabel:Ft.formatPiePercent(b.v/r.vTotal,a.separators),color:b.color,text:b.text,customdata:Cr.castOption(i,b.i,"customdata")}}if(n){var y=Cr.castOption(i,e.i,"texttemplate");if(!y)e.text="";else{var g=m(e),w=Ft.getFirstFilled(i.text,e.pts);(jx(w)||w==="")&&(g.text=w),e.text=Cr.texttemplateString(y,g,t._fullLayout._d3locale,g,i._meta||{})}}}function OA(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 jA={plot:HH,formatSliceLabel:HA,transformInsideText:PA,determineInsideTextFont:DA,positionTitleOutside:IA,prerenderTitles:$A,layoutAreas:NA,attachFxHandlers:CA,computeTransform:OA},Vx=gt,qH=mp,ZH=pi.resizeText,KH=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");ZH(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=Vx.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){Vx.select(this).call(qH,l,n,e)})})},BA={};(function(t){var e=vr;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)}})(BA);var QH={attributes:bu,supplyDefaults:wA.supplyDefaults,supplyLayoutDefaults:SH,layoutAttributes:TA,calc:Ac.calc,crossTraceCalc:Ac.crossTraceCalc,plot:jA.plot,style:KH,styleOne:mp,moduleType:"trace",name:"pie",basePlotModule:BA,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(" ")}},JH=QH;const vB=Hi(JH);var GA={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}},Vf=ge.extendFlat,Xf=Yi,Xx=Wo.axisHoverFormat,Ah=ia.dash,eO=Pc,UA=GA,tO=UA.INCREASING.COLOR,rO=UA.DECREASING.COLOR,Mc=Xf.line;function Yx(t){return{line:{color:Vf({},Mc.color,{dflt:t}),width:Mc.width,dash:Ah,editType:"style"},editType:"style"}}var VA={xperiod:Xf.xperiod,xperiod0:Xf.xperiod0,xperiodalignment:Xf.xperiodalignment,xhoverformat:Xx("x"),yhoverformat:Xx("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:Vf({},Mc.width,{description:[Mc.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:Vf({},Ah,{description:[Ah.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:Yx(tO),decreasing:Yx(rO),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:Vf({},eO.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},aO=lt,iO=ge,nO=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=aO.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,iO.minRowLength(n))),r._length=u,u}},oO=ge,lO=nO,sO=vu,fO=VA,cO=function(e,r,a,i){function n(l,s){return oO.coerce(e,r,fO,l,s)}var o=lO(e,r,n,i);if(!o){r.visible=!1;return}sO(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),Wx(e,r,n,"increasing"),Wx(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function Wx(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var Mo=ge,_f=Mo._,Yf=Bt,uO=du,Tl=lr.BADNUM;function vO(t,e){var r=Yf.getFromId(t,e.xaxis),a=Yf.getFromId(t,e.yaxis),i=hO(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=XA(t,e,o,l,a,dO);return e._extremes[r._id]=Yf.findExtremes(r,l,{vpad:n/2}),s.length?(Mo.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function dO(t,e,r,a){return{o:t,h:e,l:r,c:a}}function XA(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=Mo.isArrayOrTypedArray(e.text),u=Mo.isArrayOrTypedArray(e.hovertext),v=!0,h=null,d=!!e.xperiodalignment,p=[],m=0;m<a.length;m++){var y=a[m],g=o[m],w=l[m],b=s[m],x=f[m];if(y!==Tl&&g!==Tl&&w!==Tl&&b!==Tl&&x!==Tl){x===g?h!==null&&x!==h&&(v=x>h):v=x>g,h=x;var _=n(g,w,b,x);_.pos=y,_.yc=(g+x)/2,_.i=m,_.dir=v?"increasing":"decreasing",_.x=_.pos,_.y=[b,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]=Yf.findExtremes(i,Mo.concat(s,l),{padded:!0}),p.length&&(p[0].t={labels:{open:_f(t,"open:")+" ",high:_f(t,"high:")+" ",low:_f(t,"low:")+" ",close:_f(t,"close:")+" "}}),p}function hO(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=uO(r,e,"x",s).vals;l._xcalc=f;var c=Mo.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 pO={calc:vO,calcCommon:XA},mO=gt,qx=ge,yO=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;qx.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=mO.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(qx.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),g=l?(m+y)/2:o.c2p(p.pos,!0),w=n.c2p(p.o,!0),b=n.c2p(p.h,!0),x=n.c2p(p.l,!0),_=n.c2p(p.c,!0);return"M"+m+","+w+"H"+g+"M"+g+","+b+"V"+x+"M"+y+","+_+"H"+g})})},pd=gt,gO=$t,bO=pt,xO=function(e,r,a){var i=a||pd.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;pd.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;pd.select(this).style("fill","none").call(bO.stroke,s.color).call(gO.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},Mh=Bt,_O=ge,wf=Na,wO=pt,TO=ge.fillText,Zx=GA,kO={increasing:Zx.INCREASING.SYMBOL,decreasing:Zx.DECREASING.SYMBOL};function AO(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?WA(t,e,r,a):qA(t,e,r,a)}function YA(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(C){return C.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 g(C){var L=d(C);return wf.inbox(L-m,L+m,u)}function w(C){var L=C[f],E=C[c];return L===E||wf.inbox(L-r,E-r,u)}function b(C){return(g(C)+w(C))/2}var x=wf.getDistanceFunction(a,g,w,b);if(wf.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 wO.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=b(_)*v/u,t.xSpike=n.c2p(_.pos,!0),t}function WA(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=YA(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={},g=0;g<m.length;g++){var w=m[g],b=o[w][f.index],x=n.c2p(b,!0),_;b in y?(_=y[b],_.yLabel+="<br>"+l.labels[w]+Mh.hoverLabelText(n,b,o.yhoverformat)):(_=_O.extendFlat({},f),_.y0=_.y1=x,_.yLabelVal=b,_.yLabel=l.labels[w]+Mh.hoverLabelText(n,b,o.yhoverformat),_.name="",s.push(_),y[b]=_)}return s}function qA(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=YA(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],u=s.index=c.i,v=c.dir;function h(b){return l.labels[b]+Mh.hoverLabelText(n,o[b][u],o.yhoverformat)}var d=c.hi||o.hoverinfo,p=d.split("+"),m=d==="all",y=m||p.indexOf("y")!==-1,g=m||p.indexOf("text")!==-1,w=y?[h("open"),h("high"),h("low"),h("close")+" "+kO[v]]:[];return g&&TO(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var MO={hoverPoints:AO,hoverSplit:WA,hoverOnPoints:qA},SO=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},LO={moduleType:"trace",name:"ohlc",basePlotModule:dr,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:VA,supplyDefaults:cO,calc:pO.calc,plot:yO,style:xO,hoverPoints:MO.hoverPoints,selectPoints:SO},CO=LO;const dB=Hi(CO);var DO=lt,ca=ge,$O=K2;function PO(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),g=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,g),Math.max(p,m),Math.max(y,g))}else d=n.ids;var w,b,x,_,k,T,S,C,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]),M=s.c2p(o._yEnds[w]);S=v>=Math.min($,M)&&v<=Math.max($,M)?0:1/0}L=Math.sqrt(T*T+S*S),b=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,C=Math.sqrt(T*T+S*S),C<E&&(E=L=C,b=w);return t.index=b,t.distance=E,t.dxy=L,b===void 0?[t]:[ZA(t,f,c,o)]}function ZA(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=ca.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=ca.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=ca.isArrayOrTypedArray(u.size)?u.size[s]:u.size,f.mo=ca.isArrayOrTypedArray(u.opacity)?u.opacity[s]:u.opacity,f.mx=ca.isArrayOrTypedArray(u.symbol)?u.symbol[s]:u.symbol,f.ma=ca.isArrayOrTypedArray(u.angle)?u.angle[s]:u.angle,f.mc=ca.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=ca.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=ca.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=ca.isArrayOrTypedArray(y.namelength)?y.namelength[s]:y.namelength);var g=a.hoverinfo;g&&(f.hi=Array.isArray(g)?g[s]:g);var w=a.hovertemplate;w&&(f.ht=Array.isArray(w)?w[s]:w);var b={};b[t.index]=f;var x=a._origX,_=a._origY,k=ca.extendFlat({},t,{color:$O(a,f),x0:d-m,x1:d+m,xLabelVal:x?x[s]:f.x,y0:p-m,y1:p+m,yLabelVal:_?_[s]:f.y,cd:b,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),ca.fillText(f,a,k),DO.getComponentMethod("errorbars","hoverInfo")(f,a,k),k}var EO={hoverPoints:PO,calcHover:ZA},KA={exports:{}},Kx=20,xu={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:Kx,SYMBOL_STROKE:Kx/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]}},RO=Ta,Zt=Yi,Qx=Wo.axisHoverFormat,Jx=En,zO=Vh,md=Qt.extendFlat,IO=Za.overrideAll,FO=xu.DASHES,e1=Zt.line,li=Zt.marker,NO=li.line,wo=KA.exports=IO({x:Zt.x,x0:Zt.x0,dx:Zt.dx,y:Zt.y,y0:Zt.y0,dy:Zt.dy,xperiod:Zt.xperiod,yperiod:Zt.yperiod,xperiod0:Zt.xperiod0,yperiod0:Zt.yperiod0,xperiodalignment:Zt.xperiodalignment,yperiodalignment:Zt.yperiodalignment,xhoverformat:Qx("x"),yhoverformat:Qx("y"),text:Zt.text,hovertext:Zt.hovertext,textposition:Zt.textposition,textfont:Zt.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:e1.color,width:e1.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:zO(FO),dflt:"solid",description:"Sets the style of the lines."}},marker:md({},Jx("marker"),{symbol:li.symbol,angle:li.angle,size:li.size,sizeref:li.sizeref,sizemin:li.sizemin,sizemode:li.sizemode,opacity:li.opacity,colorbar:li.colorbar,line:md({},Jx("marker.line"),{width:NO.width})}),connectgaps:Zt.connectgaps,fill:md({},Zt.fill,{dflt:"none"}),fillcolor:Zt.fillcolor,selected:{marker:Zt.selected.marker,textfont:Zt.selected.textfont},unselected:{marker:Zt.unselected.marker,textfont:Zt.unselected.textfont},opacity:RO.opacity},"calc","nested");wo.x.editType=wo.y.editType=wo.x0.editType=wo.y0.editType="calc+clearAxisTypes";wo.hovertemplate=Zt.hovertemplate;wo.texttemplate=Zt.texttemplate;var QA=KA.exports,_u={},JA=xu;_u.isOpenSymbol=function(t){return typeof t=="string"?JA.OPEN_RE.test(t):t%200>100};_u.isDotSymbol=function(t){return typeof t=="string"?JA.DOT_RE.test(t):t>200};var t1=ge,HO=lt,OO=_u,jO=QA,BO=cu,Tf=Or,GO=Xp,UO=vu,VO=S2,XO=L2,YO=D2,WO=C2,qO=function(e,r,a,i){function n(h,d){return t1.coerce(e,r,jO,h,d)}var o=e.marker?OO.isOpenSymbol(e.marker.symbol):!1,l=Tf.isBubble(e),s=GO(e,r,i,n);if(!s){r.visible=!1;return}UO(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<BO.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Tf.hasMarkers(r)&&(VO(e,r,a,i,n,{noAngleRef:!0,noStandOff:!0}),n("marker.line.width",o||l?1:0)),Tf.hasLines(r)&&(n("connectgaps"),XO(e,r,a,i,n),n("line.shape")),Tf.hasText(r)&&(n("texttemplate"),WO(e,r,i,n));var c=(r.line||{}).color,u=(r.marker||{}).color;n("fill"),r.fill!=="none"&&YO(e,r,a,n);var v=HO.getComponentMethod("errorbars","supplyDefaults");v(e,r,c||u||a,{axis:"y"}),v(e,r,c||u||a,{axis:"x",inherit:"y"}),t1.coerceSelectionMarkerOpacity(r,n)},ZO=Z2,KO=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]),ZO(e,r,a)},eM=wt,QO=wa,Sc=q1,Lc=Co,JO=Hr.defaultLine,r1=or.isArrayOrTypedArray,Sh=Sc(JO),tM=1;function a1(t,e){var r=t;return r[3]*=e,r}function i1(t){if(eM(t))return Sh;var e=Sc(t);return e.length?e:Sh}function n1(t){return eM(t)?t:tM}function e7(t,e,r){var a=t.color;a&&a._inputArray&&(a=a._inputArray);var i=r1(a),n=r1(e),o=Lc.extractOpts(t),l=[],s,f,c,u,v;if(o.colorscale!==void 0?s=Lc.makeColorScaleFuncFromTrace(t):s=i1,i?f=function(d,p){return d[p]===void 0?Sh:Sc(s(d[p]))}:f=i1,n?c=function(d,p){return d[p]===void 0?tM:n1(d[p])}:c=n1,i||n)for(var h=0;h<r;h++)u=f(a,h),v=c(e,h),l[h]=a1(u,v);else l=a1(Sc(a),e);return l}function t7(t){var e=Lc.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=Lc.flipScale(e.colorscale)),r.map(function(a){var i=a[0],n=QO(a[1]),o=n.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}var r7={formatColor:e7,parseColorScale:t7},Wf=wt,a7=LM,kf=q1,i7=lt,Oo=ge,ir=Oo.isArrayOrTypedArray,vo=$t,o1=sr,l1=r7.formatColor,So=Or,n7=kw,Lh=_u,As=xu,o7=vs.DESELECTDIM,s1={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},l7=ka.appendArrayPointValue;function s7(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(So.hasText(e)&&(a.text=rM(t,e),a.textSel=f1(t,e,e.selected),a.textUnsel=f1(t,e,e.unselected)),So.hasMarkers(e)&&(a.marker=mm(t,e),a.markerSel=Ch(t,e,e.selected),a.markerUnsel=Ch(t,e,e.unselected),!e.unselected&&ir(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]=o7*n[r]}if(So.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=c1(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=c1(e,e.error_y,i)),e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function rM(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=ir(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 g={i:u},w=e._module.formatLabels(g,e,r),b={};l7(b,e,u);var x=e._meta||{};c.text.push(Oo.texttemplateString(y(u),w,d,b,g,x))}}else ir(e.text)&&e.text.length<a?c.text=e.text.slice():c.text=e.text;if(ir(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(ir(l))for(c.color=new Array(a),u=0;u<a;u++)c.color[u]=l[u];else c.color=l;if(ir(s)||ir(f))for(c.font=new Array(a),u=0;u<a;u++){var k=c.font[u]={};k.size=(Oo.isTypedArray(s)?s[u]:ir(s)?Wf(s[u])?s[u]:0:s)*v,k.family=ir(f)?f[u]:f}else c.font={size:s*v,family:f};return c}function mm(t,e){var r=e._length,a=e.marker,i={},n,o=ir(a.symbol),l=ir(a.angle),s=ir(a.color),f=ir(a.line.color),c=ir(a.opacity),u=ir(a.size),v=ir(a.line.width),h;if(o||(h=Lh.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=l1(a,a.opacity,r),y=l1(a.line,a.opacity,r);if(!ir(y[0])){var g=y;for(y=Array(r),n=0;n<r;n++)y[n]=g}if(!ir(m[0])){var w=m;for(m=Array(r),n=0;n<r;n++)m[n]=w}if(!ir(d)){var b=d;for(d=Array(r),n=0;n<r;n++)d[n]=b}if(!ir(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=Lh.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=kf(a.color,"uint8"),i.color[3]=0,i.borderColor=kf(a.color,"uint8")):(i.color=kf(a.color,"uint8"),i.borderColor=kf(a.line.color,"uint8")),i.opacity=e.opacity*a.opacity,i.marker=d1({mx:a.symbol,ma:a.angle},e);var _=1,k=n7(e,_),T;if(u||v){var S=i.sizes=new Array(r),C=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++)C[n]=a.line.width[n];else for(T=a.line.width,n=0;n<r;n++)C[n]=T;i.sizeAvg=E}else i.size=k(a&&a.size||10),i.borderSizes=k(a.line.width);return i}function Ch(t,e,r){var a=e.marker,i={};return r&&(r.marker&&r.marker.symbol?i=mm(t,Oo.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 f1(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:Oo.extendFlat({},e.textfont)};r.textfont&&Oo.extendFlat(i.textfont,r.textfont),a=rM(t,i)}return a}function c1(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 u1=As.SYMBOL_SDF_SIZE,sn=As.SYMBOL_SIZE,v1=As.SYMBOL_STROKE,yd={},f7=vo.symbolFuncs[0](sn*.05);function d1(t,e){var r=t.mx;if(r==="circle")return null;var a,i,n=vo.symbolNumber(r),o=vo.symbolFuncs[n%100],l=!!vo.symbolNoDot[n%100],s=!!vo.symbolNoFill[n%100],f=Lh.isDotSymbol(r);if(t.ma&&(r+="_"+t.ma),yd[r])return yd[r];var c=vo.getMarkerAngle(t,e);return f&&!l?a=o(sn*1.1,c)+f7:a=o(sn,c),i=a7(a,{w:u1,h:u1,viewBox:[-sn,-sn,sn,sn],stroke:s?v1:-v1}),yd[r]=i,i||null}function c7(t,e,r){var a=r.length,i=a/2,n,o;if(So.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||So.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 u7(t,e,r,a,i){var n=i7.getComponentMethod("errorbars","makeComputeError"),o=o1.getFromId(t,e.xaxis,"x"),l=o1.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],g=new Float64Array(4*s),w=1/0,b=-1/0,x=0,_=0;x<s;x++,_+=4){var k=u[x];if(Wf(k)){var T=r[x*2+m],S=p(k,x),C=S[0],L=S[1];if(Wf(C)&&Wf(L)){var E=k-C,R=k+L;g[_+y[0]]=T-v.c2l(E),g[_+y[1]]=v.c2l(R)-T,g[_+y[2]]=0,g[_+y[3]]=0,w=Math.min(w,k-C),b=Math.max(b,k+L)}}}f[h]={positions:r,errors:g,_bnds:[w,b]}}}return c(a,o),c(i,l),f}function v7(t,e,r,a){var i=e._length,n={},o;if(So.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=ir(l)?l[o].size:l.size,v=ir(s)?s.length>1?s[o]:s[0]:s,h=ir(f)?f.length>1?f[o]:f[0]:f,d=s1[v],p=s1[h],m=c?c/.8+1:0,y=-p*m-p*.5;n.offset[o]=[d*m/u,y/u]}}return n}var d7={style:s7,markerStyle:mm,markerSelection:Ch,linePositions:c7,errorBarPositions:u7,textPosition:v7},Af=ge,h7=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(){Af.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=Af.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=Af.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||Af.extendFlat(a,i),a},p7=CM,to=ge,h1=sr,m7=ys.findExtremes,p1=du,ym=qp,y7=ym.calcMarkerSize,g7=ym.calcAxisExpansion,b7=ym.setFirstScatter,x7=E2,ro=d7,_7=h7,m1=lr.BADNUM,w7=xu.TOO_MANY_POINTS,T7=function(e,r){var a=e._fullLayout,i=r._xA=h1.getFromId(e,r.xaxis,"x"),n=r._yA=h1.getFromId(e,r.yaxis,"y"),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=w7,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 g=new Array(f),w=new Array(l);for(u=0;u<l;u++)g[u*2]=m[u]===m1?NaN:m[u],g[u*2+1]=y[u]===m1?NaN:y[u],w[u]=u;if(i.type==="log")for(u=0;u<f;u+=2)g[u]=i.c2l(g[u]);if(n.type==="log")for(u=1;u<f;u+=2)g[u]=n.c2l(g[u]);s&&i.type!=="log"&&n.type!=="log"?c.tree=p7(g):c.ids=w,x7(e,r);var b=k7(e,o,r,g,m,y),x=_7(e,o);b7(a,r);var _;return s?b.marker&&(_=b.marker.sizeAvg||Math.max(b.marker.size,3)):_=y7(r,l),g7(e,r,i,n,m,y,_),b.errorX&&y1(r,i,b.errorX),b.errorY&&y1(r,n,b.errorY),b.fill&&!x.fill2d&&(x.fill2d=!0),b.marker&&!x.scatter2d&&(x.scatter2d=!0),b.line&&!x.line2d&&(x.line2d=!0),(b.errorX||b.errorY)&&!x.error2d&&(x.error2d=!0),b.text&&!x.glText&&(x.glText=!0),b.marker&&(b.marker.snap=l),x.lineOptions.push(b.line),x.errorXOptions.push(b.errorX),x.errorYOptions.push(b.errorY),x.fillOptions.push(b.fill),x.markerOptions.push(b.marker),x.markerSelectedOptions.push(b.markerSel),x.markerUnselectedOptions.push(b.markerUnsel),x.textOptions.push(b.text),x.textSelectedOptions.push(b.textSel),x.textUnselectedOptions.push(b.textUnsel),x.selectBatch.push([]),x.unselectBatch.push([]),c._scene=x,c.index=x.count,c.x=m,c.y=y,c.positions=g,x.count++,[{x:!1,y:!1,t:c,trace:r}]};function y1(t,e,r){var a=t._extremes[e._id],i=m7(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function k7(t,e,r,a,i,n){var o=ro.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&to.extendFlat(o.line,ro.linePositions(t,r,a)),o.errorX||o.errorY){var l=ro.errorBarPositions(t,r,a,i,n);o.errorX&&to.extendFlat(o.errorX,l.x),o.errorY&&to.extendFlat(o.errorY,l.y)}return o.text&&(to.extendFlat(o.text,{positions:a},ro.textPosition(t,r,o.text,o.marker)),to.extendFlat(o.textSel,{positions:a},ro.textPosition(t,r,o.text,o.markerSel)),to.extendFlat(o.textUnsel,{positions:a},ro.textPosition(t,r,o.text,o.markerUnsel))),o}var g1=ge,A7=pt,M7=vs.DESELECTDIM;function S7(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=g1.extendFlat({},s),v,h;if(o.length||l.length){var d=f.color,p=c.color,m=s.color,y=g1.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 g=y?m[h]:m;u.color[h]=p||(d?g:A7.addOpacity(g,M7))}}i.glText[n].update(u)}var aM={styleTextSelection:S7},b1=Or,L7=aM.styleTextSelection,C7=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=b1.hasText(l),p=b1.hasMarkers(l),m=!p&&!d;if(l.visible!==!0||m)return o;var y=[],g=[];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])})):g.push(w);if(p){var b=v.scatter2d;if(!y.length&&!g.length){var x=new Array(v.count);x[h]=v.markerOptions[h],b.update.apply(b,x)}else if(!v.selectBatch[h].length&&!v.unselectBatch[h].length){var _=new Array(v.count);_[h]=v.markerUnselectedOptions[h],b.update.apply(b,_)}}return v.selectBatch[h]=y,v.unselectBatch[h]=g,d&&L7(a),o},D7=EO,$7={moduleType:"trace",name:"scattergl",basePlotModule:dr,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:QA,supplyDefaults:qO,crossTraceDefaults:$2,colorbar:_s,formatLabels:KO,calc:T7,hoverPoints:D7.hoverPoints,selectPoints:C7,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(" ")}},iM={exports:{}},x1=pt,P7=function(){},E7=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=P7);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=x1.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=x1.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},R7=E7,z7=DM,I7=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=z7({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||bM.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||R7({container:i._glcontainer.node()}),n},_1=$M,w1=PM,F7=EM,T1=RM,gd=ge,N7=zn.selectMode,H7=I7,O7=Or,j7=W2,B7=aM.styleTextSelection,nM={};function G7(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 U7=iM.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=H7(e,["ANGLE_instanced_arrays","OES_element_index_uint"],nM);if(!c){n.init();return}var u=n.count,v=i._glcanvas.data()[0].regl;if(j7(e,r,a),n.dirty){if((n.line2d||n.error2d)&&!(n.scatter2d||n.fill2d||n.glText)&&v.clear({}),n.error2d===!0&&(n.error2d=F7(v)),n.line2d===!0&&(n.line2d=w1(v)),n.scatter2d===!0&&(n.scatter2d=_1(v)),n.fill2d===!0&&(n.fill2d=w1(v)),n.glText===!0)for(n.glText=new Array(u),s=0;s<u;s++)n.glText[s]=new T1(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 T1(v))}else if(u<n.glText.length){var d=n.glText.length-u,p=n.glText.splice(u,d);p.forEach(function(A){A.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(A){if(A&&A.positions){for(var D=A.positions,P=0;P<D.length&&(isNaN(D[P])||isNaN(D[P+1]));)P+=2;for(var I=D.length-2;I>P&&(isNaN(D[I])||isNaN(D[I+1]));)I-=2;A.positions=D.slice(P,I+2)}return A}),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=gd.repeat(null,u),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(A,D){var P=a[D];if(!(!A||!P||!P[0]||!P[0].trace)){var I=P[0],O=I.trace,B=I.t,G=n.lineOptions[D],j,q,V=[];O._ownfill&&V.push(D),O._nexttrace&&V.push(D+1),V.length&&(n.fillOrder[D]=V);var K=[],Y=G&&G.positions||B.positions,te,oe;if(O.fill==="tozeroy"){for(te=0;te<Y.length&&isNaN(Y[te+1]);)te+=2;for(oe=Y.length-2;oe>te&&isNaN(Y[oe+1]);)oe-=2;Y[te+1]!==0&&(K=[Y[te],0]),K=K.concat(Y.slice(te,oe+2)),Y[oe+1]!==0&&(K=K.concat([Y[oe],0]))}else if(O.fill==="tozerox"){for(te=0;te<Y.length&&isNaN(Y[te]);)te+=2;for(oe=Y.length-2;oe>te&&isNaN(Y[oe]);)oe-=2;Y[te]!==0&&(K=[0,Y[te+1]]),K=K.concat(Y.slice(te,oe+2)),Y[oe]!==0&&(K=K.concat([0,Y[oe+1]]))}else if(O.fill==="toself"||O.fill==="tonext"){for(K=[],j=0,A.splitNull=!0,q=0;q<Y.length;q+=2)(isNaN(Y[q])||isNaN(Y[q+1]))&&(K=K.concat(Y.slice(j,q)),K.push(Y[j],Y[j+1]),K.push(null,null),j=q+2);K=K.concat(Y.slice(j)),j&&K.push(Y[j],Y[j+1])}else{var _e=O._nexttrace;if(_e){var de=n.lineOptions[D+1];if(de){var X=de.positions;if(O.fill==="tonexty"){for(K=Y.slice(),D=Math.floor(X.length/2);D--;){var Q=X[D*2],le=X[D*2+1];isNaN(Q)||isNaN(le)||K.push(Q,le)}A.fill=_e.fillcolor}}}}if(O._prevtrace&&O._prevtrace.fill==="tonext"){var se=n.lineOptions[D-1].positions,he=K.length/2;j=he;var Te=[j];for(q=0;q<se.length;q+=2)(isNaN(se[q])||isNaN(se[q+1]))&&(Te.push(q/2+he+1),j=q+2);K=K.concat(se),A.hole=Te}return A.fillmode=O.fill,A.opacity=O.opacity,A.positions=K,A}}),n.fill2d.update(n.fillOptions))}var y=i.dragmode,g=N7(y),w=i.clickmode.indexOf("select")>-1;for(s=0;s<u;s++){var b=a[s][0],x=b.trace,_=b.t,k=_.index,T=x._length,S=_.x,C=_.y;if(x.selectedpoints||g||w){if(g||(g=!0),x.selectedpoints){var L=n.selectBatch[k]=gd.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(C[f])}else _.xpx=_.ypx=null}if(g){if(n.select2d||(n.select2d=_1(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(A){var D=((A||[])[0]||{}).trace||{};O7.hasText(D)&&B7(A)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var $={viewport:G7(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]]},M=gd.repeat($,n.count);n.fill2d&&n.fill2d.update(M),n.line2d&&n.line2d.update(M),n.error2d&&n.error2d.update(M.concat(M)),n.scatter2d&&n.scatter2d.update(M),n.select2d&&n.select2d.update(M),n.glText&&n.glText.forEach(function(A){A.update($)})}}};U7.reglPrecompiled=nM;var V7=iM.exports,oM=$7;oM.plot=V7;var X7=oM,Y7=X7;const hB=Hi(Y7);var lM={};(function(t){var e=vr;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)}})(lM);var sM={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},W7=Ta,q7=Rr.hovertemplateAttrs,Z7=Rr.texttemplateAttrs,K7=En,Q7=Wi.attributes,ni=bu,k1=sM,kl=Qt.extendFlat,J7=ia.pattern,ej={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({},ni.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:kl({},ni.marker.line.width,{dflt:1}),editType:"calc"},pattern:J7,editType:"calc"},K7("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:ni.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:Z7({editType:"plot"},{keys:k1.eventDataKeys.concat(["label","value"])}),hovertext:ni.hovertext,hoverinfo:kl({},W7.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:q7({},{keys:k1.eventDataKeys}),textfont:ni.textfont,insidetextorientation:ni.insidetextorientation,insidetextfont:ni.insidetextfont,outsidetextfont:kl({},ni.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:ni.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:Q7({name:"sunburst",trace:!0,editType:"calc"})},wu={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},tj=Rr.hovertemplateAttrs,rj=Rr.texttemplateAttrs,aj=En,ij=Wi.attributes,nn=bu,ua=ej,A1=wu,bd=Qt.extendFlat,nj=ia.pattern,fM={labels:ua.labels,parents:ua.parents,values:ua.values,branchvalues:ua.branchvalues,count:ua.count,level:ua.level,maxdepth:ua.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:bd({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:ua.marker.colors,pattern:nj,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:ua.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the maximum rounding of corners (in px)."].join(" ")},editType:"calc"},aj("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:bd({},nn.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:nn.text,textinfo:ua.textinfo,texttemplate:rj({editType:"plot"},{keys:A1.eventDataKeys.concat(["label","value"])}),hovertext:nn.hovertext,hoverinfo:ua.hoverinfo,hovertemplate:tj({},{keys:A1.eventDataKeys}),textfont:nn.textfont,insidetextfont:nn.insidetextfont,outsidetextfont:bd({},nn.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:nn.sort,root:ua.root,domain:ij({name:"treemap",trace:!0,editType:"calc"})},cM={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(" ")}},M1=ge,oj=fM,lj=pt,sj=Wi.defaults,fj=An.handleText,cj=Ts.TEXTPAD,uj=wA.handleMarkerDefaults,uM=Co,vj=uM.hasColorscale,dj=uM.handleDefaults,hj=function(e,r,a,i){function n(m,y){return M1.coerce(e,r,oj,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",M1.isArrayOrTypedArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var u=n("pathbar.visible"),v="auto";fj(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;uj(e,r,i,n);var d=r._hasColorscale=vj(e,"marker","colors")||(e.marker||{}).coloraxis;d?dj(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:lj.contrast(i.paper_bgcolor)}}},u&&(n("pathbar.thickness",r.pathbar.textfont.size+2*cj),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),sj(r,i,n),r._length=null},pj=ge,mj=cM,yj=function(e,r){function a(i,n){return pj.coerce(e,r,mj,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},Cc={},vM={};(function(t){var e=$h,r=wt,a=ge,i=Co.makeColorScaleFuncFromTrace,n=Ac.makePullColorFn,o=Ac.generateExtendedColors,l=Co.calc,s=lr.ALMOST_EQUAL,f={},c={},u={};t.calc=function(h,d){var p=h._fullLayout,m=d.ids,y=a.isArrayOrTypedArray(m),g=d.labels,w=d.parents,b=d.values,x=a.isArrayOrTypedArray(b),_=[],k={},T={},S=function(Y,te){k[Y]?k[Y].push(te):k[Y]=[te],T[te]=1},C=function(Y){return Y||typeof Y=="number"},L=function(Y){return!x||r(b[Y])&&b[Y]>=0},E,R,N;y?(E=Math.min(m.length,w.length),R=function(Y){return C(m[Y])&&L(Y)},N=function(Y){return String(m[Y])}):(E=Math.min(g.length,w.length),R=function(Y){return C(g[Y])&&L(Y)},N=function(Y){return String(g[Y])}),x&&(E=Math.min(E,b.length));for(var H=0;H<E;H++)if(R(H)){var F=N(H),$=C(w[H])?String(w[H]):"",M={i:H,id:F,pid:$,label:C(g[H])?String(g[H]):""};x&&(M.v=+b[H]),_.push(M),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 A=[],D;for(D in k)T[D]||A.push(D);if(A.length===1)D=A[0],_.unshift({hasImpliedRoot:!0,id:D,pid:"",label:D});else return a.warn(["Multiple implied roots, cannot build",d.type,"hierarchy of",d.name+".","These roots include:",A.join(", ")].join(" "))}var O;try{O=e.stratify().id(function(Y){return Y.id}).parentId(function(Y){return Y.pid})(_)}catch(Y){return a.warn(["Failed to build",d.type,"hierarchy of",d.name+".","Error:",Y.message].join(" "))}var B=e.hierarchy(O),G=!1;if(x)switch(d.branchvalues){case"remainder":B.sum(function(Y){return Y.data.v});break;case"total":B.each(function(Y){var te=Y.data.data,oe=te.v;if(Y.children){var _e=Y.children.reduce(function(de,X){return de+X.data.data.v},0);if((te.hasImpliedRoot||te.hasMultipleRoots)&&(oe=_e),oe<_e*s)return G=!0,a.warn(["Total value for node",Y.data.data.id,"of",d.name,"is smaller than the sum of its children.",`
5
- parent value =`,oe,`
6
- children sum =`,_e].join(" "))}Y.value=oe});break}else v(B,d,{branches:d.count.indexOf("branches")!==-1,leaves:d.count.indexOf("leaves")!==-1});if(!G){d.sort&&B.sort(function(Y,te){return te.value-Y.value});var j,q,V=d.marker.colors||[],K=!!V.length;return d._hasColorscale?(K||(V=x?d.values:d._values),l(h,d,{vals:V,containerStr:"marker",cLetter:"c"}),q=i(d.marker)):j=n(p["_"+d.type+"colormap"]),B.each(function(Y){var te=Y.data.data;te.color=d._hasColorscale?q(V[te.i]):j(V[te.i],te.id)}),_[0].hierarchy=B,_}},t._runCrossTraceCalc=function(h,d){var p=d._fullLayout,m=d.calcdata,y=p[h+"colorway"],g=p["_"+h+"colormap"];p["extend"+h+"colors"]&&(y=o(y,h==="icicle"?u:h==="treemap"?c:f));var w=0,b;function x(S){var C=S.data.data,L=C.id;C.color===!1&&(g[L]?C.color=g[L]:S.parent?S.parent.parent?C.color=S.parent.data.data.color:(g[L]=C.color=y[w%y.length],w++):C.color=b)}for(var _=0;_<m.length;_++){var k=m[_],T=k[0];T.trace.type===h&&T.hierarchy&&(b=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 g=y.length,w=0;w<g;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}})(vM);var dM=vM;Cc.calc=function(t,e){return dM.calc(t,e)};Cc.crossTraceCalc=function(t){return dM._runCrossTraceCalc("treemap",t)};var qi={};(function(t){var e=ge,r=pt,a=Ui,i=Rn;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}})(qi);var gj=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)},ho=$h,bj=gj,hM=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=ho.treemap().tile(xj(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)&&bj(v,r,{swapXY:o,flipX:i,flipY:n}),v};function xj(t,e){switch(t){case"squarify":return ho.treemapSquarify.ratio(e);case"binary":return ho.treemapBinary;case"dice":return ho.treemapDice;case"slice":return ho.treemapSlice;default:return ho.treemapSliceDice}}var _j=$t,wj=pt,pM=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),_j.pointStyle(e,a,i,r)}else wj.fill(e,s)},S1=gt,ao=pt,L1=ge,xd=qi,Tj=pi.resizeText,kj=pM;function Aj(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");Tj(t,e,"treemap"),e.each(function(r){var a=S1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){S1.select(this).call(mM,o,n,t,{hovered:!1})})})}function mM(t,e,r,a,i){var n=(i||{}).hovered,o=e.data.data,l=o.i,s,f,c=o.color,u=xd.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=L1.castOption(r,l,"marker.line.color")||ao.defaultLine,f=L1.castOption(r,l,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var h=r.marker.depthfade;if(h){var d=ao.combine(ao.addOpacity(r._backgroundColor,.75),c),p;if(h===!0){var m=xd.getMaxDepth(r);isFinite(m)?xd.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 g=.5*y/p;c=ao.combine(ao.addOpacity(d,g),c)}}}t.call(kj,e,r,a,c).style("stroke-width",f).call(ao.stroke,s).style("opacity",v)}var gm={style:Aj,styleOne:mM},io=gt,C1=lt,Mj=ka.appendArrayPointValue,Al=Na,D1=ge,Sj=hs,pr=qi,Lj=Rn,Cj=Lj.formatPieValue,bm=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,g=y.i,w=pr.isHierarchyRoot(d),b=pr.getParent(s,d),x=pr.getValue(d),_=function(O){return D1.castOption(m,g,O)},k=_("hovertemplate"),T=Al.castHoverinfo(m,p,g),S=p.separators,C;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(O){return N.indexOf(O)!==-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=Cj(R.value,S),F("value")&&H.push(R.valueLabel)),R.currentPath=d.currentPath=pr.getPath(d.data),F("current path")&&!w&&H.push(R.currentPath);var $,M=[],A=function(){M.indexOf($)===-1&&(H.push($),M.push($))};R.percentParent=d.percentParent=x/pr.getValue(b),R.parent=d.parentString=pr.getPtLabel(b),F("percent parent")&&($=pr.formatPercent(R.percentParent,S)+" of "+R.parent,A()),R.percentEntry=d.percentEntry=x/pr.getValue(r),R.entry=d.entry=pr.getPtLabel(r),F("percent entry")&&!w&&!d.onPathbar&&($=pr.formatPercent(R.percentEntry,S)+" of "+R.entry,A()),R.percentRoot=d.percentRoot=x/pr.getValue(s),R.root=d.root=pr.getPtLabel(s),F("percent root")&&!w&&($=pr.formatPercent(R.percentRoot,S)+" of "+R.root,A()),R.text=_("hovertext")||_("text"),F("text")&&($=R.text,D1.isValidTextValue($)&&H.push($)),C=[Ml(d,m,n.eventDataKeys)];var D={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:C};f&&(D.x0=L-d.rInscribed*d.rpx1,D.x1=L+d.rInscribed*d.rpx1,D.idealAlign=d.pxmid[0]<0?"left":"right"),c&&(D.x=L,D.idealAlign=L<0?"left":"right");var P=[];Al.loneHover(D,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:P}),C[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:C||[Ml(d,m,n.eventDataKeys)],event:io.event})}},v=function(d){var p=a._fullLayout,m=a._fullData[l.index],y=io.select(this).datum();if(l._hasHoverEvent&&(d.originalEvent=io.event,a.emit("plotly_unhover",{points:[Ml(y,m,n.eventDataKeys)],event:io.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(Al.loneUnhover(p._hoverlayer.node()),l._hasHoverLabel=!1),c){var g=e.select("path.surface");n.styleOne(g,y,m,a,{hovered:!1})}},h=function(d){var p=a._fullLayout,m=a._fullData[l.index],y=f&&(pr.isHierarchyRoot(d)||pr.isLeaf(d)),g=pr.getPtId(d),w=pr.isEntry(d)?pr.findEntryWithChild(s,g):pr.findEntryWithLevel(s,g),b=pr.getPtId(w),x={points:[Ml(d,m,n.eventDataKeys)],event:io.event};y||(x.nextLevel=b);var _=Sj.triggerHandler(a,"plotly_"+l.type+"click",x);if(_!==!1&&p.hovermode&&(a._hoverdata=[Ml(d,m,n.eventDataKeys)],Al.click(a,io.event)),!y&&_!==!1&&!a._dragging&&!a._transitioning){C1.call("_storeDirectGUIEdit",m,p._tracePreGUI[m.uid],{level:m.level});var k={data:[{level:b}],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()),C1.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&&!pr.isHierarchyRoot(t)&&(i.parent=t.parentString),Mj(i,e,a.i),i}var $1=gt,Mf=ge,P1=$t,Dj=_r,$j=hM,E1=gm.styleOne,_d=wu,no=qi,Pj=bm,wd=!0,Ej=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,g={},w=e._context.staticPlot,b=e._fullLayout,x=r[0],_=x.trace,k=x.hierarchy,T=l/_._entryDepth,S=no.listPath(a.data,"id"),C=$j(k.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();C=C.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)}),C.reverse(),i=i.data(C,no.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,wd,g,[l,s],u),i.order();var L=i;d&&(L=L.transition().each("end",function(){var E=$1.select(this);no.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=$1.select(this),N=Mf.ensureSingle(R,"path","surface",function(M){M.style("pointer-events",w?"none":"all")});d?N.transition().attrTween("d",function(M){var A=m(M,wd,g,[l,s]);return function(D){return u(A(D))}}):N.attr("d",u),R.call(Pj,a,e,r,{styleOne:E1,eventDataKeys:_d.eventDataKeys,transitionTime:_d.CLICK_TRANSITION_TIME,transitionEasing:_d.CLICK_TRANSITION_EASING}).call(no.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),N.call(E1,E,_,e,{hovered:!1}),E._text=(no.getPtLabel(E)||"").split("<br>").join(" ")||"";var H=Mf.ensureSingle(R,"g","slicetext"),F=Mf.ensureSingle(H,"text","",function(M){M.attr("data-notex",1)}),$=Mf.ensureUniformFontSize(e,no.determineTextFont(_,E,b.font,{onPathbar:!0}));F.text(E._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(P1.font,$).call(Dj.convertToTspans,e),E.textBB=P1.bBox(F.node()),E.transform=v(E,{fontSize:$.size,onPathbar:!0}),E.transform.fontSize=$.size,d?F.transition().attrTween("transform",function(M){var A=y(M,wd,g,[l,s]);return function(D){return h(A(D))}}):F.attr("transform",h(E))})},R1=gt,Td=Z1.interpolate,Li=qi,Sl=ge,z1=Ts.TEXTPAD,Rj=hm,zj=Rj.toMoveInsideBar,Ij=pi,kd=Ij.recordMinTextSize,Fj=wu,Nj=Ej;function on(t){return Li.isHierarchyRoot(t)?"":Li.getPtId(t)}var Hj=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=Li.findEntryWithLevel(u,s.level),h=R1.select(a),d=h.selectAll("g.pathbar"),p=h.selectAll("g.slice");if(!v){d.remove(),p.remove();return}var m=Li.isHierarchyRoot(v),y=!o.uniformtext.mode&&Li.hasTransition(i),g=Li.getMaxDepth(s),w=function(J){return J.data.depth-v.data.depth<g},b=o._size,x=s.domain,_=b.w*(x.x[1]-x.x[0]),k=b.h*(x.y[1]-x.y[0]),T=_,S=s.pathbar.thickness,C=s.marker.line.width+Fj.gapWithPathbar,L=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?k+C:-(S+C):0,E={x0:T,x1:T,y0:L,y1:L+S},R=function(J,xe,re){var ue=s.tiling.pad,pe=function(ke){return ke-ue<=xe.x0},De=function(ke){return ke+ue>=xe.x1},$e=function(ke){return ke-ue<=xe.y0},me=function(ke){return ke+ue>=xe.y1};return J.x0===xe.x0&&J.x1===xe.x1&&J.y0===xe.y0&&J.y1===xe.y1?{x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1}:{x0:pe(J.x0-ue)?0:De(J.x0-ue)?re[0]:J.x0,x1:pe(J.x1+ue)?0:De(J.x1+ue)?re[0]:J.x1,y0:$e(J.y0-ue)?0:me(J.y0-ue)?re[1]:J.y0,y1:$e(J.y1+ue)?0:me(J.y1+ue)?re[1]:J.y1}},N=null,H={},F={},$=null,M=function(J,xe){return xe?H[on(J)]:F[on(J)]},A=function(J,xe,re,ue){if(xe)return H[on(u)]||E;var pe=F[s.level]||re;return w(J)?R(J,pe,ue):{}};l.hasMultipleRoots&&m&&g++,s._maxDepth=g,s._backgroundColor=o.paper_bgcolor,s._entryDepth=v.data.depth,s._atRootLevel=m;var D=-_/2+b.l+b.w*(x.x[1]+x.x[0])/2,P=-k/2+b.t+b.h*(1-(x.y[1]+x.y[0])/2),I=function(J){return D+J},O=function(J){return P+J},B=O(0),G=I(0),j=function(J){return G+J},q=function(J){return B+J};function V(J,xe){return J+","+xe}var K=j(0),Y=function(J){J.x=Math.max(K,J.x)},te=s.pathbar.edgeshape,oe=function(J){var xe=j(Math.max(Math.min(J.x0,J.x0),0)),re=j(Math.min(Math.max(J.x1,J.x1),T)),ue=q(J.y0),pe=q(J.y1),De=S/2,$e={},me={};$e.x=xe,me.x=re,$e.y=me.y=(ue+pe)/2;var ke={x:xe,y:ue},Ve={x:re,y:ue},Ie={x:re,y:pe},Oe={x:xe,y:pe};return te===">"?(ke.x-=De,Ve.x-=De,Ie.x-=De,Oe.x-=De):te==="/"?(Ie.x-=De,Oe.x-=De,$e.x-=De/2,me.x-=De/2):te==="\\"?(ke.x-=De,Ve.x-=De,$e.x-=De/2,me.x-=De/2):te==="<"&&($e.x-=De,me.x-=De),Y(ke),Y(Oe),Y($e),Y(Ve),Y(Ie),Y(me),"M"+V(ke.x,ke.y)+"L"+V(Ve.x,Ve.y)+"L"+V(me.x,me.y)+"L"+V(Ie.x,Ie.y)+"L"+V(Oe.x,Oe.y)+"L"+V($e.x,$e.y)+"Z"},_e=s[c?"tiling":"marker"].pad,de=function(J){return s.textposition.indexOf(J)!==-1},X=de("top"),Q=de("left"),le=de("right"),se=de("bottom"),he=function(J){var xe=I(J.x0),re=I(J.x1),ue=O(J.y0),pe=O(J.y1),De=re-xe,$e=pe-ue;if(!De||!$e)return"";var me=s.marker.cornerradius||0,ke=Math.min(me,De/2,$e/2);ke&&J.data&&J.data.data&&J.data.data.label&&(X&&(ke=Math.min(ke,_e.t)),Q&&(ke=Math.min(ke,_e.l)),le&&(ke=Math.min(ke,_e.r)),se&&(ke=Math.min(ke,_e.b)));var Ve=function(Ie,Oe){return ke?"a"+V(ke,ke)+" 0 0 1 "+V(Ie,Oe):""};return"M"+V(xe,ue+ke)+Ve(ke,-ke)+"L"+V(re-ke,ue)+Ve(ke,ke)+"L"+V(re,pe-ke)+Ve(-ke,ke)+"L"+V(xe+ke,pe)+Ve(-ke,-ke)+"Z"},Te=function(J,xe){var re=J.x0,ue=J.x1,pe=J.y0,De=J.y1,$e=J.textBB,me=X||xe.isHeader&&!se,ke=me?"start":se?"end":"middle",Ve=de("right"),Ie=de("left")||xe.onPathbar,Oe=Ie?-1:Ve?1:0;if(xe.isHeader){if(re+=(c?_e:_e.l)-z1,ue-=(c?_e:_e.r)-z1,re>=ue){var Xe=(re+ue)/2;re=Xe,ue=Xe}var it;se?(it=De-(c?_e:_e.b),pe<it&&it<De&&(pe=it)):(it=pe+(c?_e:_e.t),pe<it&&it<De&&(De=it))}var be=zj(re,ue,pe,De,$e,{isHorizontal:!1,constrained:!0,angle:0,anchor:ke,leftToRight:Oe});return be.fontSize=xe.fontSize,be.targetX=I(be.targetX),be.targetY=O(be.targetY),isNaN(be.targetX)||isNaN(be.targetY)?{}:(re!==ue&&pe!==De&&kd(s.type,be,o),{scale:be.scale,rotate:be.rotate,textX:be.textX,textY:be.textY,anchorX:be.anchorX,anchorY:be.anchorY,targetX:be.targetX,targetY:be.targetY})},fe=function(J,xe){for(var re,ue=0,pe=J;!re&&ue<g;)ue++,pe=pe.parent,pe?re=M(pe,xe):ue=g;return re||{}},Ae=function(J,xe,re,ue){var pe=M(J,xe),De;if(xe)De=E;else{var $e=M(v,xe);$e?De=R(J,$e,ue):De={}}return Td(pe,De)},ce=function(J,xe,re,ue,pe){var De=M(J,xe),$e;if(De)$e=De;else if(xe)$e=E;else if(N)if(J.parent){var me=$||re;me&&!xe?$e=R(J,me,ue):($e={},Sl.extendFlat($e,fe(J,xe)))}else $e=Sl.extendFlat({},J),c&&(pe.orientation==="h"?pe.flipX?$e.x0=J.x1:$e.x1=0:pe.flipY?$e.y0=J.y1:$e.y1=0);else $e={};return Td($e,{x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1})},ye=function(J,xe,re,ue){var pe=M(J,xe),De={},$e=A(J,xe,re,ue);Sl.extendFlat(De,{transform:Te({x0:$e.x0,x1:$e.x1,y0:$e.y0,y1:$e.y1,textBB:J.textBB,_text:J._text},{isHeader:Li.isHeader(J,s)})}),pe?De=pe:J.parent&&Sl.extendFlat(De,fe(J,xe));var me=J.transform;return J.x0!==J.x1&&J.y0!==J.y1&&kd(s.type,me,o),Td(De,{transform:{scale:me.scale,rotate:me.rotate,textX:me.textX,textY:me.textY,anchorX:me.anchorX,anchorY:me.anchorY,targetX:me.targetX,targetY:me.targetY}})},Se=function(J,xe,re,ue,pe){var De=ue[0],$e=ue[1];y?J.exit().transition().each(function(){var me=R1.select(this),ke=me.select("path.surface");ke.transition().attrTween("d",function(Ie){var Oe=Ae(Ie,xe,re,[De,$e]);return function(Xe){return pe(Oe(Xe))}});var Ve=me.select("g.slicetext");Ve.attr("opacity",0)}).remove():J.exit().remove()},Me=function(J){var xe=J.transform;return J.x0!==J.x1&&J.y0!==J.y1&&kd(s.type,xe,o),Sl.getTextTransform({textX:xe.textX,textY:xe.textY,anchorX:xe.anchorX,anchorY:xe.anchorY,targetX:xe.targetX,targetY:xe.targetY,scale:xe.scale,rotate:xe.rotate})};y&&(d.each(function(J){H[on(J)]={x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1},J.transform&&(H[on(J)].transform={textX:J.transform.textX,textY:J.transform.textY,anchorX:J.transform.anchorX,anchorY:J.transform.anchorY,targetX:J.transform.targetX,targetY:J.transform.targetY,scale:J.transform.scale,rotate:J.transform.rotate})}),p.each(function(J){F[on(J)]={x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1},J.transform&&(F[on(J)].transform={textX:J.transform.textX,textY:J.transform.textY,anchorX:J.transform.anchorX,anchorY:J.transform.anchorY,targetX:J.transform.targetX,targetY:J.transform.targetY,scale:J.transform.scale,rotate:J.transform.rotate}),!N&&Li.isEntry(J)&&(N=J)})),$=n(e,r,v,p,{width:_,height:k,viewX:I,viewY:O,pathSlice:he,toMoveInsideSlice:Te,prevEntry:N,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ye,handleSlicesExit:Se,hasTransition:y,strTransform:Me}),s.pathbar.visible?Nj(e,r,v,d,{barDifY:L,width:T,height:S,viewX:j,viewY:q,pathSlice:oe,toMoveInsideSlice:Te,makeUpdateSliceInterpolator:ce,makeUpdateTextInterpolator:ye,handleSlicesExit:Se,hasTransition:y,strTransform:Me}):d.remove()},Oj=gt,jj=qi,Bj=pi,Gj=Bj.clearMinTextSize,Uj=Mn.resizeText,I1=Hj,Vj=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(Gj(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&&jj.hasTransition(a)){i&&(u=i());var h=Oj.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){I1(e,d,this,a,l)})})}else c.each(function(d){I1(e,d,this,a,l)}),s.uniformtext.mode&&Uj(e,f.selectAll(".trace"),o);v&&c.exit().remove()},yM={},F1=gt,N1=pt,H1=ge,Xj=pi.resizeText,Yj=pM;function Wj(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");Xj(t,e,"sunburst"),e.each(function(r){var a=F1.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){F1.select(this).call(gM,o,n,t)})})}function gM(t,e,r,a){var i=e.data.data,n=!e.children,o=i.i,l=H1.castOption(r,o,"marker.line.color")||N1.defaultLine,s=H1.castOption(r,o,"marker.line.width")||0;t.call(Yj,e,r,a).style("stroke-width",s).call(N1.stroke,l).style("opacity",n?r.leaf.opacity:null)}var qj={style:Wj,styleOne:gM};(function(t){var e=gt,r=$h,a=Z1.interpolate,i=$t,n=ge,o=_r,l=pi,s=l.recordMinTextSize,f=l.clearMinTextSize,c=jA,u=Rn.getRotationAngle,v=c.computeTransform,h=c.transformInsideText,d=qj.styleOne,p=Mn.resizeText,m=bm,y=sM,g=qi;t.plot=function(T,S,C,L){var E=T._fullLayout,R=E._sunburstlayer,N,H,F=!C,$=!E.uniformtext.mode&&g.hasTransition(C);if(f("sunburst",E),N=R.selectAll("g.trace.sunburst").data(S,function(A){return A[0].trace.uid}),N.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),N.order(),$){L&&(H=L());var M=e.transition().duration(C.duration).ease(C.easing).each("end",function(){H&&H()}).each("interrupt",function(){H&&H()});M.each(function(){R.selectAll("g.trace").each(function(A){w(T,A,this,C)})})}else N.each(function(A){w(T,A,this,C)}),E.uniformtext.mode&&p(T,E._sunburstlayer.selectAll(".trace"),"sunburst");F&&N.exit().remove()};function w(T,S,C,L){var E=T._context.staticPlot,R=T._fullLayout,N=!R.uniformtext.mode&&g.hasTransition(L),H=e.select(C),F=H.selectAll("g.slice"),$=S[0],M=$.trace,A=$.hierarchy,D=g.findEntryWithLevel(A,M.level),P=g.getMaxDepth(M),I=R._size,O=M.domain,B=I.w*(O.x[1]-O.x[0]),G=I.h*(O.y[1]-O.y[0]),j=.5*Math.min(B,G),q=$.cx=I.l+I.w*(O.x[1]+O.x[0])/2,V=$.cy=I.t+I.h*(1-O.y[0])-G/2;if(!D)return F.remove();var K=null,Y={};N&&F.each(function(re){Y[g.getPtId(re)]={rpx0:re.rpx0,rpx1:re.rpx1,x0:re.x0,x1:re.x1,transform:re.transform},!K&&g.isEntry(re)&&(K=re)});var te=b(D).descendants(),oe=D.height+1,_e=0,de=P;$.hasMultipleRoots&&g.isHierarchyRoot(D)&&(te=te.slice(1),oe-=1,_e=1,de+=1),te=te.filter(function(re){return re.y1<=de});var X=u(M.rotation);X&&te.forEach(function(re){re.x0+=X,re.x1+=X});var Q=Math.min(oe,P),le=function(re){return(re-_e)/Q*j},se=function(re,ue){return[re*Math.cos(ue),-re*Math.sin(ue)]},he=function(re){return n.pathAnnulus(re.rpx0,re.rpx1,re.x0,re.x1,q,V)},Te=function(re){return q+_(re)[0]*(re.transform.rCenter||0)+(re.transform.x||0)},fe=function(re){return V+_(re)[1]*(re.transform.rCenter||0)+(re.transform.y||0)};F=F.data(te,g.getPtId),F.enter().append("g").classed("slice",!0),N?F.exit().transition().each(function(){var re=e.select(this),ue=re.select("path.surface");ue.transition().attrTween("d",function(De){var $e=Se(De);return function(me){return he($e(me))}});var pe=re.select("g.slicetext");pe.attr("opacity",0)}).remove():F.exit().remove(),F.order();var Ae=null;if(N&&K){var ce=g.getPtId(K);F.each(function(re){Ae===null&&g.getPtId(re)===ce&&(Ae=re.x1)})}var ye=F;N&&(ye=ye.transition().each("end",function(){var re=e.select(this);g.setSliceCursor(re,T,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ye.each(function(re){var ue=e.select(this),pe=n.ensureSingle(ue,"path","surface",function(Ie){Ie.style("pointer-events",E?"none":"all")});re.rpx0=le(re.y0),re.rpx1=le(re.y1),re.xmid=(re.x0+re.x1)/2,re.pxmid=se(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?pe.transition().attrTween("d",function(Ie){var Oe=Me(Ie);return function(Xe){return he(Oe(Xe))}}):pe.attr("d",he),ue.call(m,D,T,S,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(g.setSliceCursor,T,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:T._transitioning}),pe.call(d,re,M,T);var De=n.ensureSingle(ue,"g","slicetext"),$e=n.ensureSingle(De,"text","",function(Ie){Ie.attr("data-notex",1)}),me=n.ensureUniformFontSize(T,g.determineTextFont(M,re,R.font));$e.text(t.formatSliceLabel(re,D,M,S,R)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,me).call(o.convertToTspans,T);var ke=i.bBox($e.node());re.transform=h(ke,re,$),re.transform.targetX=Te(re),re.transform.targetY=fe(re);var Ve=function(Ie,Oe){var Xe=Ie.transform;return v(Xe,Oe),Xe.fontSize=me.size,s(M.type,Xe,R),n.getTextTransform(Xe)};N?$e.transition().attrTween("transform",function(Ie){var Oe=J(Ie);return function(Xe){return Ve(Oe(Xe),ke)}}):$e.attr("transform",Ve(re,ke))});function Se(re){var ue=g.getPtId(re),pe=Y[ue],De=Y[g.getPtId(D)],$e;if(De){var me=(re.x1>De.x1?2*Math.PI:0)+X;$e=re.rpx1<De.rpx1?{x0:re.x0,x1:re.x1,rpx0:0,rpx1:0}:{x0:me,x1:me,rpx0:re.rpx0,rpx1:re.rpx1}}else{var ke,Ve=g.getPtId(re.parent);F.each(function(be){if(g.getPtId(be)===Ve)return ke=be});var Ie=ke.children,Oe;Ie.forEach(function(be,Ue){if(g.getPtId(be)===ue)return Oe=Ue});var Xe=Ie.length,it=a(ke.x0,ke.x1);$e={rpx0:j,rpx1:j,x0:it(Oe/Xe),x1:it((Oe+1)/Xe)}}return a(pe,$e)}function Me(re){var ue=Y[g.getPtId(re)],pe,De={x0:re.x0,x1:re.x1,rpx0:re.rpx0,rpx1:re.rpx1};if(ue)pe=ue;else if(K)if(re.parent)if(Ae){var $e=(re.x1>Ae?2*Math.PI:0)+X;pe={x0:$e,x1:$e}}else pe={rpx0:j,rpx1:j},n.extendFlat(pe,xe(re));else pe={rpx0:0,rpx1:0};else pe={x0:X,x1:X};return a(pe,De)}function J(re){var ue=Y[g.getPtId(re)],pe,De=re.transform;if(ue)pe=ue;else if(pe={rpx1:re.rpx1,transform:{textPosAngle:De.textPosAngle,scale:0,rotate:De.rotate,rCenter:De.rCenter,x:De.x,y:De.y}},K)if(re.parent)if(Ae){var $e=re.x1>Ae?2*Math.PI:0;pe.x0=pe.x1=$e}else n.extendFlat(pe,xe(re));else pe.x0=pe.x1=X;else pe.x0=pe.x1=X;var me=a(pe.transform.textPosAngle,re.transform.textPosAngle),ke=a(pe.rpx1,re.rpx1),Ve=a(pe.x0,re.x0),Ie=a(pe.x1,re.x1),Oe=a(pe.transform.scale,De.scale),Xe=a(pe.transform.rotate,De.rotate),it=De.rCenter===0?3:pe.transform.rCenter===0?1/3:1,be=a(pe.transform.rCenter,De.rCenter),Ue=function(Be){return be(Math.pow(Be,it))};return function(Be){var Ye=ke(Be),Ne=Ve(Be),We=Ie(Be),Qe=Ue(Be),z=se(Ye,(Ne+We)/2),W=me(Be),U={pxmid:z,rpx1:Ye,transform:{textPosAngle:W,rCenter:Qe,x:De.x,y:De.y}};return s(M.type,De,R),{transform:{targetX:Te(U),targetY:fe(U),scale:Oe(Be),rotate:Xe(Be),rCenter:Qe}}}}function xe(re){var ue=re.parent,pe=Y[g.getPtId(ue)],De={};if(pe){var $e=ue.children,me=$e.indexOf(re),ke=$e.length,Ve=a(pe.x0,pe.x1);De.x0=Ve(me/ke),De.x1=Ve(me/ke)}else De.x0=De.x1=0;return De}}function b(T){return r.partition().size([2*Math.PI,T.height+1])(T)}t.formatSliceLabel=function(T,S,C,L,E){var R=C.texttemplate,N=C.textinfo;if(!R&&(!N||N==="none"))return"";var H=E.separators,F=L[0],$=T.data.data,M=F.hierarchy,A=g.isHierarchyRoot(T),D=g.getParent(M,T),P=g.getValue(T);if(!R){var I=N.split("+"),O=function(_e){return I.indexOf(_e)!==-1},B=[],G;if(O("label")&&$.label&&B.push($.label),$.hasOwnProperty("v")&&O("value")&&B.push(g.formatValue($.v,H)),!A){O("current path")&&B.push(g.getPath(T.data));var j=0;O("percent parent")&&j++,O("percent entry")&&j++,O("percent root")&&j++;var q=j>1;if(j){var V,K=function(_e){G=g.formatPercent(V,H),q&&(G+=" of "+_e),B.push(G)};O("percent parent")&&!A&&(V=P/g.getValue(D),K("parent")),O("percent entry")&&(V=P/g.getValue(S),K("entry")),O("percent root")&&(V=P/g.getValue(M),K("root"))}}return O("text")&&(G=n.castOption(C,$.i,"text"),n.isValidTextValue(G)&&B.push(G)),B.join("<br>")}var Y=n.castOption(C,$.i,"texttemplate");if(!Y)return"";var te={};$.label&&(te.label=$.label),$.hasOwnProperty("v")&&(te.value=$.v,te.valueLabel=g.formatValue($.v,H)),te.currentPath=g.getPath(T.data),A||(te.percentParent=P/g.getValue(D),te.percentParentLabel=g.formatPercent(te.percentParent,H),te.parent=g.getPtLabel(D)),te.percentEntry=P/g.getValue(S),te.percentEntryLabel=g.formatPercent(te.percentEntry,H),te.entry=g.getPtLabel(S),te.percentRoot=P/g.getValue(M),te.percentRootLabel=g.formatPercent(te.percentRoot,H),te.root=g.getPtLabel(M),$.hasOwnProperty("color")&&(te.color=$.color);var oe=n.castOption(C,$.i,"text");return(n.isValidTextValue(oe)||oe==="")&&(te.text=oe),te.customdata=n.castOption(C,$.i,"customdata"),n.texttemplateString(Y,te,E._d3locale,te,C._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)]}})(yM);var O1=gt,Sf=ge,j1=$t,Zj=_r,Kj=hM,B1=gm.styleOne,Ad=wu,Ti=qi,Qj=bm,Jj=yM.formatSliceLabel,Md=!1,eB=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,g={},w=e._context.staticPlot,b=e._fullLayout,x=r[0],_=x.trace,k=_.textposition.indexOf("left")!==-1,T=_.textposition.indexOf("right")!==-1,S=_.textposition.indexOf("bottom")!==-1,C=!S&&!_.marker.pad.t||S&&!_.marker.pad.b,L=Kj(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(A){var D=A.depth;D>=_._maxDepth?(A.x0=A.x1=(A.x0+A.x1)/2,A.y0=A.y1=(A.y0+A.y1)/2):(R=Math.min(R,D),N=Math.max(N,D))}),i=i.data(E,Ti.getPtId),_._maxVisibleLayers=isFinite(N)?N-R+1:0,i.enter().append("g").classed("slice",!0),d(i,Md,g,[o,l],c),i.order();var H=null;if(h&&y){var F=Ti.getPtId(y);i.each(function(A){H===null&&Ti.getPtId(A)===F&&(H={x0:A.x0,x1:A.x1,y0:A.y0,y1:A.y1})})}var $=function(){return H||{x0:0,x1:o,y0:0,y1:l}},M=i;return h&&(M=M.transition().each("end",function(){var A=O1.select(this);Ti.setSliceCursor(A,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),M.each(function(A){var D=Ti.isHeader(A,_);A._x0=s(A.x0),A._x1=s(A.x1),A._y0=f(A.y0),A._y1=f(A.y1),A._hoverX=s(A.x1-_.marker.pad.r),A._hoverY=f(S?A.y1-_.marker.pad.b/2:A.y0+_.marker.pad.t/2);var P=O1.select(this),I=Sf.ensureSingle(P,"path","surface",function(j){j.style("pointer-events",w?"none":"all")});h?I.transition().attrTween("d",function(j){var q=p(j,Md,$(),[o,l]);return function(V){return c(q(V))}}):I.attr("d",c),P.call(Qj,a,e,r,{styleOne:B1,eventDataKeys:Ad.eventDataKeys,transitionTime:Ad.CLICK_TRANSITION_TIME,transitionEasing:Ad.CLICK_TRANSITION_EASING}).call(Ti.setSliceCursor,e,{isTransitioning:e._transitioning}),I.call(B1,A,_,e,{hovered:!1}),A.x0===A.x1||A.y0===A.y1?A._text="":D?A._text=C?"":Ti.getPtLabel(A)||"":A._text=Jj(A,a,_,r,b)||"";var O=Sf.ensureSingle(P,"g","slicetext"),B=Sf.ensureSingle(O,"text","",function(j){j.attr("data-notex",1)}),G=Sf.ensureUniformFontSize(e,Ti.determineTextFont(_,A,b.font));B.text(A._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":k||D?"start":"middle").call(j1.font,G).call(Zj.convertToTspans,e),A.textBB=j1.bBox(B.node()),A.transform=u(A,{fontSize:G.size,isHeader:D}),A.transform.fontSize=G.size,h?B.transition().attrTween("transform",function(j){var q=m(j,Md,$(),[o,l]);return function(V){return v(q(V))}}):B.attr("transform",v(A))}),H},tB=Vj,rB=eB,aB=function(e,r,a,i){return tB(e,r,a,i,{type:"treemap",drawDescendants:rB})},iB={moduleType:"trace",name:"treemap",basePlotModule:lM,categories:[],animatable:!0,attributes:fM,layoutAttributes:cM,supplyDefaults:hj,supplyLayoutDefaults:yj,calc:Cc.calc,crossTraceCalc:Cc.crossTraceCalc,plot:aB,style:gm.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(" ")}},nB=iB;const pB=Hi(nB);export{fB as P,cB as b,sB as c,uB as h,dB as o,vB as p,hB as s,pB as t};
7
- //# sourceMappingURL=plotly-DDD8Llll.js.map