d.length)&&(p=d.length),l(f)||(f=!1),c(d[0])){for(m=new Array(p),h=0;hu.length-1)return u[u.length-1];var d=f%1;return d*u[Math.ceil(f)]+(1-d)*u[Math.floor(f)]}},3883:function(o,a,n){var l=n(32396),c=n(91424),u=n(71828),f=null;o.exports=function(){if(f!==null)return f;f=!1;var d=u.isIE()||u.isSafari()||u.isIOS();if(window.navigator.userAgent&&!d){var p=Array.from(l.CSS_DECLARATIONS).reverse(),h=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof h=="function")f=p.some(function(v){return h.apply(null,v)});else{var m=c.tester.append("image").attr("style",l.STYLE),y=window.getComputedStyle(m.node()).imageRendering;f=p.some(function(v){var g=v[1];return y===g||y===g.toLowerCase()}),m.remove()}}return f}},63893:function(o,a,n){var l=n(39898),c=n(71828),u=c.strTranslate,f=n(77922),d=n(18783).LINE_SPACING,p=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;a.convertToTspans=function(F,E,W){var H=F.text(),L=!F.attr("data-notex")&&E&&E._context.typesetMath&&typeof MathJax<"u"&&H.match(p),q=l.select(F.node().parentNode);if(!q.empty()){var U=F.attr("class")?F.attr("class").split(" ")[0]:"text";return U+="-math",q.selectAll("svg."+U).remove(),q.selectAll("g."+U+"-group").remove(),F.style("display",null).attr({"data-unformatted":H,"data-math":"N"}),L?(E&&E._promises||[]).push(new Promise(function(te){F.style("display","none");var ee=parseInt(F.node().style.fontSize,10),K={fontSize:ee};(function(Q,G,X){var Y,re,ie,le,se=parseInt((MathJax.version||"").split(".")[0]);if(se===2||se===3){var he=function(){var Me="math-output-"+c.randstr({},64),Ce=(le=l.select("body").append("div").attr({id:Me}).style({visibility:"hidden",position:"absolute","font-size":G.fontSize+"px"}).text(Q.replace(h,"\\lt ").replace(m,"\\gt "))).node();return se===2?MathJax.Hub.Typeset(Ce):MathJax.typeset([Ce])},_e=function(){var Me=le.select(se===2?".MathJax_SVG":".MathJax"),Ce=!Me.empty()&&le.select("svg").node();if(Ce){var Se,ce=Ce.getBoundingClientRect();Se=se===2?l.select("body").select("#MathJax_SVG_glyphs"):Me.select("defs"),X(Me,Se,ce)}else c.log("There was an error in the tex syntax.",Q),X();le.remove()};se===2?MathJax.Hub.Queue(function(){return re=c.extendDeepAll({},MathJax.Hub.config),ie=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:y},displayAlign:"left"})},function(){if((Y=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},he,_e,function(){if(Y!=="SVG")return MathJax.Hub.setRenderer(Y)},function(){return ie!==void 0&&(MathJax.Hub.processSectionDelay=ie),MathJax.Hub.Config(re)}):se===3&&(re=c.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=y,(Y=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){he(),_e(),Y!=="svg"&&(MathJax.config.startup.output=Y),MathJax.config=re}))}else c.warn("No MathJax version:",MathJax.version)})(L[2],K,function(Q,G,X){q.selectAll("svg."+U).remove(),q.selectAll("g."+U+"-group").remove();var Y=Q&&Q.select("svg");if(!Y||!Y.node())return J(),void te();var re=q.append("g").classed(U+"-group",!0).attr({"pointer-events":"none","data-unformatted":H,"data-math":"Y"});re.node().appendChild(Y.node()),G&&G.node()&&Y.node().insertBefore(G.node().cloneNode(!0),Y.node().firstChild);var ie=X.width,le=X.height;Y.attr({class:U,height:le,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var se=F.node().style.fill||"black",he=Y.select("g");he.attr({fill:se,stroke:se});var _e=he.node().getBoundingClientRect(),Me=_e.width,Ce=_e.height;(Me>ie||Ce>le)&&(Y.style("overflow","hidden"),Me=(_e=Y.node().getBoundingClientRect()).width,Ce=_e.height);var Se=+F.attr("x"),ce=+F.attr("y"),ye=-(ee||F.node().getBoundingClientRect().height)/4;if(U[0]==="y")re.attr({transform:"rotate("+[-90,Se,ce]+")"+u(-Me/2,ye-Ce/2)});else if(U[0]==="l")ce=ye-Ce/2;else if(U[0]==="a"&&U.indexOf("atitle")!==0)Se=0,ce=ye;else{var V=F.attr("text-anchor");Se-=Me*(V==="middle"?.5:V==="end"?1:0),ce=ce+ye-Ce/2}Y.attr({x:Se,y:ce}),W&&W.call(F,re),te(re)})})):J(),F}function J(){q.empty()||(U=F.attr("class")+"-math",q.select("svg."+U).remove()),F.text("").style("white-space","pre");var te=function(ee,K){K=K.replace(x," ");var Q,G=!1,X=[],Y=-1;function re(){Y++;var ue=document.createElementNS(f.svg,"tspan");l.select(ue).attr({class:"line",dy:Y*d+"em"}),ee.appendChild(ue),Q=ue;var ge=X;if(X=[{node:ue}],ge.length>1)for(var be=1;be doesnt match end tag <"+ue+">. Pretending it did match.",K),Q=X[X.length-1].node}else c.log("Ignoring unexpected end tag "+ue+">.",K)}S.test(K)?re():(Q=ee,X=[{node:ee}]);for(var he=K.split(k),_e=0;_e|>|>)/g,y=[["$","$"],["\\(","\\)"]],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"},g={sub:"0.3em",sup:"-0.6em"},b={sub:"-0.21em",sup:"0.42em"},w="",_=["http:","https:","mailto:","",void 0,":"],x=a.NEWLINES=/(\r\n?|\n)/g,k=/(<[^<>]*>)/,T=/<(\/?)([^ >]*)(\s+(.*))?>/i,S=/
/i;a.BR_TAG_ALL=/
/gi;var M=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,C=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,D=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function O(F,E){if(!F)return null;var W=F.match(E),H=W&&(W[3]||W[4]);return H&&z(H)}var R=/(^|;)\s*color:/;a.plainText=function(F,E){for(var W=(E=E||{}).len!==void 0&&E.len!==-1?E.len:1/0,H=E.allowedTags!==void 0?E.allowedTags:["br"],L=F.split(k),q=[],U="",J=0,te=0;te3?q.push(ee.substr(0,X-3)+"..."):q.push(ee.substr(0,X));break}U=""}}return q.join("")};var $={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},P=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function z(F){return F.replace(P,function(E,W){return(W.charAt(0)==="#"?function(H){if(!(H>1114111)){var L=String.fromCodePoint;if(L)return L(H);var q=String.fromCharCode;return H<=65535?q(H):q(55232+(H>>10),H%1024+56320)}}(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):$[W])||E})}function B(F){var E=encodeURI(decodeURI(F)),W=document.createElement("a"),H=document.createElement("a");W.href=F,H.href=E;var L=W.protocol,q=H.protocol;return _.indexOf(L)!==-1&&_.indexOf(q)!==-1?E:""}function N(F,E,W){var H,L,q,U=W.horizontalAlign,J=W.verticalAlign||"top",te=F.node().getBoundingClientRect(),ee=E.node().getBoundingClientRect();return L=J==="bottom"?function(){return te.bottom-H.height}:J==="middle"?function(){return te.top+(te.height-H.height)/2}:function(){return te.top},q=U==="right"?function(){return te.right-H.width}:U==="center"?function(){return te.left+(te.width-H.width)/2}:function(){return te.left},function(){H=this.node().getBoundingClientRect();var K=q()-ee.left,Q=L()-ee.top,G=W.gd||{};if(W.gd){G._fullLayout._calcInverseTransform(G);var X=c.apply3DTransform(G._fullLayout._invTransform)(K,Q);K=X[0],Q=X[1]}return this.style({top:Q+"px",left:K+"px","z-index":1e3}),this}}a.convertEntities=z,a.sanitizeHTML=function(F){F=F.replace(x," ");for(var E=document.createElement("p"),W=E,H=[],L=F.split(k),q=0;qd.ts+u?m():d.timer=setTimeout(function(){m(),d.timer=null},u)},a.done=function(c){var u=n[c];return u&&u.timer?new Promise(function(f){var d=u.onDone;u.onDone=function(){d&&d(),f(),u.onDone=null}}):Promise.resolve()},a.clear=function(c){if(c)l(n[c]),delete n[c];else for(var u in n)a.clear(u)}},58163:function(o,a,n){var l=n(92770);o.exports=function(c,u){if(c>0)return Math.log(c)/Math.LN10;var f=Math.log(Math.min(u[0],u[1]))/Math.LN10;return l(f)||(f=Math.log(Math.max(u[0],u[1]))/Math.LN10-6),f}},37815:function(o){o.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(o){o.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},14458:function(o,a,n){var l=n(73972);o.exports=function(c){for(var u,f,d=l.layoutArrayContainers,p=l.layoutArrayRegexes,h=c.split("[")[0],m=0;m0&&f.log("Clearing previous rejected promises from queue."),C._promises=[]},a.cleanLayout=function(C){var A,D;C||(C={}),C.xaxis1&&(C.xaxis||(C.xaxis=C.xaxis1),delete C.xaxis1),C.yaxis1&&(C.yaxis||(C.yaxis=C.yaxis1),delete C.yaxis1),C.scene1&&(C.scene||(C.scene=C.scene1),delete C.scene1);var O=(d.subplotsRegistry.cartesian||{}).attrRegex,R=(d.subplotsRegistry.polar||{}).attrRegex,$=(d.subplotsRegistry.ternary||{}).attrRegex,P=(d.subplotsRegistry.gl3d||{}).attrRegex,z=Object.keys(C);for(A=0;A3?(X.x=1.02,X.xanchor="left"):X.x<-2&&(X.x=-.02,X.xanchor="right"),X.y>3?(X.y=1.02,X.yanchor="bottom"):X.y<-2&&(X.y=-.02,X.yanchor="top")),b(C),C.dragmode==="rotate"&&(C.dragmode="orbit"),h.clean(C),C.template&&C.template.layout&&a.cleanLayout(C.template.layout),C},a.cleanData=function(C){for(var A=0;A0)return C.substr(0,A)}a.hasParent=function(C,A){for(var D=S(A);D;){if(D in C)return!0;D=S(D)}return!1};var M=["x","y","z"];a.clearAxisTypes=function(C,A,D){for(var O=0;O1&&u.warn("Full array edits are incompatible with other edits",w);var C=v[""][""];if(h(C))y.set(null);else{if(!Array.isArray(C))return u.warn("Unrecognized full array edit value",w,C),!0;y.set(C)}return!T&&(_(S,M),x(m),!0)}var A,D,O,R,$,P,z,B,N=Object.keys(v).map(Number).sort(f),j=y.get(),F=j||[],E=b(M,w).get(),W=[],H=-1,L=F.length;for(A=0;AF.length-(z?0:1))u.warn("index out of range",w,O);else if(P!==void 0)$.length>1&&u.warn("Insertion & removal are incompatible with edits to the same index.",w,O),h(P)?W.push(O):z?(P==="add"&&(P={}),F.splice(O,0,P),E&&E.splice(O,0,{})):u.warn("Unrecognized full object edit value",w,O,P),H===-1&&(H=O);else for(D=0;D<$.length;D++)B=w+"["+O+"].",b(F[O],$[D],B).set(R[$[D]]);for(A=W.length-1;A>=0;A--)F.splice(W[A],1),E&&E.splice(W[A],1);if(F.length?j||y.set(F):y.set(null),T)return!1;if(_(S,M),k!==c){var q;if(H===-1)q=N;else{for(L=Math.max(F.length,L),q=[],A=0;A=H);A++)q.push(O);for(A=H;A=ue.data.length||ke<-ue.data.length)throw new Error(be+" must be valid indices for gd.data.");if(ge.indexOf(ke,we+1)>-1||ke>=0&&ge.indexOf(-ue.data.length+ke)>-1||ke<0&&ge.indexOf(ue.data.length+ke)>-1)throw new Error("each index in "+be+" must be unique.")}}function E(ue,ge,be){if(!Array.isArray(ue.data))throw new Error("gd.data must be an array.");if(ge===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ge)||(ge=[ge]),F(ue,ge,"currentIndices"),be===void 0||Array.isArray(be)||(be=[be]),be!==void 0&&F(ue,be,"newIndices"),be!==void 0&&ge.length!==be.length)throw new Error("current and new indices must be of equal length.")}function W(ue,ge,be,we,ke){(function(qe,Ye,at,st){var ft=f.isPlainObject(st);if(!Array.isArray(qe.data))throw new Error("gd.data must be an array");if(!f.isPlainObject(Ye))throw new Error("update must be a key:value object");if(at===void 0)throw new Error("indices must be an integer or array of integers");for(var yt in F(qe,at,"indices"),Ye){if(!Array.isArray(Ye[yt])||Ye[yt].length!==at.length)throw new Error("attribute "+yt+" must be an array of length equal to indices array length");if(ft&&(!(yt in st)||!Array.isArray(st[yt])||st[yt].length!==Ye[yt].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")}})(ue,ge,be,we);for(var Pe=function(qe,Ye,at,st){var ft,yt,ze,Ne,et,it=f.isPlainObject(st),St=[];for(var Ze in Array.isArray(at)||(at=[at]),at=j(at,qe.data.length-1),Ye)for(var ut=0;ut-1&&be.indexOf("grouptitlefont")===-1?De(be,be.replace("titlefont","title.font")):be.indexOf("titleposition")>-1?De(be,be.replace("titleposition","title.position")):be.indexOf("titleside")>-1?De(be,be.replace("titleside","title.side")):be.indexOf("titleoffset")>-1&&De(be,be.replace("titleoffset","title.offset")):De(be,be.replace("title","title.text"));function De(Le,Fe){ue[Fe]=ue[Le],delete ue[Le]}}function K(ue,ge,be){ue=f.getGraphDiv(ue),A.clearPromiseQueue(ue);var we={};if(typeof ge=="string")we[ge]=be;else{if(!f.isPlainObject(ge))return f.warn("Relayout fail.",ge,be),Promise.reject();we=f.extendFlat({},ge)}Object.keys(we).length&&(ue.changed=!0);var ke=ie(ue,we),Pe=ke.flags;Pe.calc&&(ue.calcdata=void 0);var Re=[v.previousPromises];Pe.layoutReplot?Re.push(D.layoutReplot):Object.keys(we).length&&(Q(ue,Pe,ke)||v.supplyDefaults(ue),Pe.legend&&Re.push(D.doLegend),Pe.layoutstyle&&Re.push(D.layoutStyles),Pe.axrange&&G(Re,ke.rangesAltered),Pe.ticks&&Re.push(D.doTicksRelayout),Pe.modebar&&Re.push(D.doModeBar),Pe.camera&&Re.push(D.doCamera),Pe.colorbars&&Re.push(D.doColorBars),Re.push(P)),Re.push(v.rehover,v.redrag,v.reselect),h.add(ue,K,[ue,ke.undoit],K,[ue,ke.redoit]);var De=f.syncOrAsync(Re,ue);return De&&De.then||(De=Promise.resolve(ue)),De.then(function(){return ue.emit("plotly_relayout",ke.eventData),ue})}function Q(ue,ge,be){var we,ke,Pe=ue._fullLayout;if(!ge.axrange)return!1;for(var Re in ge)if(Re!=="axrange"&&ge[Re])return!1;var De=function(Ye,at){return f.coerce(we,ke,w,Ye,at)},Le={};for(var Fe in be.rangesAltered){var Be=g.id2name(Fe);if(we=ue.layout[Be],ke=Pe[Be],b(we,ke,De,Le),ke._matchGroup){for(var Ue in ke._matchGroup)if(Ue!==Fe){var qe=Pe[g.id2name(Ue)];qe.autorange=ke.autorange,qe.range=ke.range.slice(),qe._input.range=ke.range.slice()}}}return!0}function G(ue,ge){var be=ge?function(we){var ke=[];for(var Pe in ge){var Re=g.getFromId(we,Pe);if(ke.push(Pe),(Re.ticklabelposition||"").indexOf("inside")!==-1&&Re._anchorAxis&&ke.push(Re._anchorAxis._id),Re._matchGroup)for(var De in Re._matchGroup)ge[De]||ke.push(De)}return g.draw(we,ke,{skipTitle:!0})}:function(we){return g.draw(we,"redraw")};ue.push(S,D.doAutoRangeAndConstraints,be,D.drawData,D.finalDraw)}var X=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,re=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ie(ue,ge){var be,we,ke,Pe=ue.layout,Re=ue._fullLayout,De=Re._guiEditing,Le=U(Re._preGUI,De),Fe=Object.keys(ge),Be=g.list(ue),Ue=f.extendDeepAll({},ge),qe={};for(ee(ge),Fe=Object.keys(ge),we=0;we0&&typeof ut.parts[Rt]!="string";)Rt--;var Mt=ut.parts[Rt],Bt=ut.parts[Rt-1]+"."+Mt,Tt=ut.parts.slice(0,Rt).join("."),ve=d(ue.layout,Tt).get(),Te=d(Re,Tt).get(),Ve=ut.get();if(gt!==void 0){yt[Ze]=gt,ze[Ze]=Mt==="reverse"?gt:q(Ve);var We=y.getLayoutValObject(Re,ut.parts);if(We&&We.impliedEdits&>!==null)for(var Je in We.impliedEdits)Ne(f.relativeAttr(Ze,Je),We.impliedEdits[Je]);if(["width","height"].indexOf(Ze)!==-1)if(gt){Ne("autosize",null);var Xe=Ze==="height"?"width":"height";Ne(Xe,Re[Xe])}else Re[Ze]=ue._initialAutoSize[Ze];else if(Ze==="autosize")Ne("width",gt?null:Re.width),Ne("height",gt?null:Re.height);else if(Bt.match(X))St(Bt),d(Re,Tt+"._inputRange").set(null);else if(Bt.match(Y)){St(Bt),d(Re,Tt+"._inputRange").set(null);var Ge=d(Re,Tt).get();Ge._inputDomain&&(Ge._input.domain=Ge._inputDomain.slice())}else Bt.match(re)&&d(Re,Tt+"._inputDomain").set(null);if(Mt==="type"){et=ve;var Qe=Te.type==="linear"&>==="log",ct=Te.type==="log"&>==="linear";if(Qe||ct){if(et&&et.range)if(Te.autorange)Qe&&(et.range=et.range[1]>et.range[0]?[1,2]:[2,1]);else{var bt=et.range[0],nt=et.range[1];Qe?(bt<=0&&nt<=0&&Ne(Tt+".autorange",!0),bt<=0?bt=nt/1e6:nt<=0&&(nt=bt/1e6),Ne(Tt+".range[0]",Math.log(bt)/Math.LN10),Ne(Tt+".range[1]",Math.log(nt)/Math.LN10)):(Ne(Tt+".range[0]",Math.pow(10,bt)),Ne(Tt+".range[1]",Math.pow(10,nt)))}else Ne(Tt+".autorange",!0);Array.isArray(Re._subplots.polar)&&Re._subplots.polar.length&&Re[ut.parts[0]]&&ut.parts[1]==="radialaxis"&&delete Re[ut.parts[0]]._subplot.viewInitial["radialaxis.range"],m.getComponentMethod("annotations","convertCoords")(ue,Te,gt,Ne),m.getComponentMethod("images","convertCoords")(ue,Te,gt,Ne)}else Ne(Tt+".autorange",!0),Ne(Tt+".range",null);d(Re,Tt+"._inputRange").set(null)}else if(Mt.match(R)){var It=d(Re,Ze).get(),Yt=(gt||{}).type;Yt&&Yt!=="-"||(Yt="linear"),m.getComponentMethod("annotations","convertCoords")(ue,It,Yt,Ne),m.getComponentMethod("images","convertCoords")(ue,It,Yt,Ne)}var Ct=C.containerArrayMatch(Ze);if(Ct){be=Ct.array,we=Ct.index;var jt=Ct.property,Et=We||{editType:"calc"};we!==""&&jt===""&&(C.isAddVal(gt)?ze[Ze]=null:C.isRemoveVal(gt)?ze[Ze]=(d(Pe,be).get()||[])[we]:f.warn("unrecognized full object value",ge)),O.update(ft,Et),qe[be]||(qe[be]={});var mt=qe[be][we];mt||(mt=qe[be][we]={}),mt[jt]=gt,delete ge[Ze]}else Mt==="reverse"?(ve.range?ve.range.reverse():(Ne(Tt+".autorange",!0),ve.range=[1,0]),Te.autorange?ft.calc=!0:ft.plot=!0):(Ze==="dragmode"&&(gt===!1&&Ve!==!1||gt!==!1&&Ve===!1)||Re._has("scatter-like")&&Re._has("regl")&&Ze==="dragmode"&&(gt==="lasso"||gt==="select")&&Ve!=="lasso"&&Ve!=="select"||Re._has("gl2d")?ft.plot=!0:We?O.update(ft,We):ft.calc=!0,ut.set(gt))}}for(be in qe)C.applyContainerArrayChanges(ue,Le(Pe,be),qe[be],ft,Le)||(ft.plot=!0);for(var vt in it){var wt=(et=g.getFromId(ue,vt))&&et._constraintGroup;if(wt)for(var qt in ft.calc=!0,wt)it[qt]||(g.getFromId(ue,qt)._constraintShrinkable=!0)}(le(ue)||ge.height||ge.width)&&(ft.plot=!0);var Lt=Re.shapes;for(we=0;we1;)if(we.pop(),(be=d(ge,we.join(".")+".uirevision").get())!==void 0)return be;return ge.uirevision}function ce(ue,ge){for(var be=0;be=ke.length?ke[0]:ke[Fe]:ke}function De(Fe){return Array.isArray(Pe)?Fe>=Pe.length?Pe[0]:Pe[Fe]:Pe}function Le(Fe,Be){var Ue=0;return function(){if(Fe&&++Ue===Be)return Fe()}}return we._frameWaitingCnt===void 0&&(we._frameWaitingCnt=0),new Promise(function(Fe,Be){function Ue(){ue.emit("plotly_animating"),we._lastFrameAt=-1/0,we._timeToNext=0,we._runningTransitions=0,we._currentFrame=null;var Ze=function(){we._animationRaf=window.requestAnimationFrame(Ze),Date.now()-we._lastFrameAt>we._timeToNext&&function(){we._currentFrame&&we._currentFrame.onComplete&&we._currentFrame.onComplete();var ut=we._currentFrame=we._frameQueue.shift();if(ut){var gt=ut.name?ut.name.toString():null;ue._fullLayout._currentFrame=gt,we._lastFrameAt=Date.now(),we._timeToNext=ut.frameOpts.duration,v.transition(ue,ut.frame.data,ut.frame.layout,A.coerceTraceIndices(ue,ut.frame.traces),ut.frameOpts,ut.transitionOpts).then(function(){ut.onComplete&&ut.onComplete()}),ue.emit("plotly_animatingframe",{name:gt,frame:ut.frame,animation:{frame:ut.frameOpts,transition:ut.transitionOpts}})}else ue.emit("plotly_animated"),window.cancelAnimationFrame(we._animationRaf),we._animationRaf=null}()};Ze()}var qe,Ye,at=0;function st(Ze){return Array.isArray(ke)?at>=ke.length?Ze.transitionOpts=ke[at]:Ze.transitionOpts=ke[0]:Ze.transitionOpts=ke,at++,Ze}var ft=[],yt=ge==null,ze=Array.isArray(ge);if(yt||ze||!f.isPlainObject(ge)){if(yt||["string","number"].indexOf(typeof ge)!==-1)for(qe=0;qe0&&itit)&&St.push(Ye);ft=St}}ft.length>0?function(Ze){if(Ze.length!==0){for(var ut=0;ut=0;we--)if(f.isPlainObject(ge[we])){var qe=ge[we].name,Ye=(Le[qe]||Ue[qe]||{}).name,at=ge[we].name,st=Le[Ye]||Ue[Ye];Ye&&at&&typeof at=="number"&&st&&$<5&&($++,f.warn('addFrames: overwriting frame "'+(Le[Ye]||Ue[Ye]).name+'" with a frame whose name of type "number" also equates to "'+Ye+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),$===5&&f.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.")),Ue[qe]={name:qe},Be.push({frame:v.supplyFrameDefaults(ge[we]),index:be&&be[we]!==void 0&&be[we]!==null?be[we]:Fe+we})}Be.sort(function(Ze,ut){return Ze.index>ut.index?-1:Ze.index=0;we--){if(typeof(ke=Be[we].frame).name=="number"&&f.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ke.name)for(;Le[ke.name="frame "+ue._transitionData._counter++];);if(Le[ke.name]){for(Pe=0;Pe=0;be--)we=ge[be],Pe.push({type:"delete",index:we}),Re.unshift({type:"insert",index:we,value:ke[we]});var De=v.modifyFrames,Le=v.modifyFrames,Fe=[ue,Re],Be=[ue,Pe];return h&&h.add(ue,De,Fe,Le,Be),v.modifyFrames(ue,Pe)},a.addTraces=function ue(ge,be,we){ge=f.getGraphDiv(ge);var ke,Pe,Re=[],De=a.deleteTraces,Le=ue,Fe=[ge,Re],Be=[ge,be];for(function(Ue,qe,Ye){var at,st;if(!Array.isArray(Ue.data))throw new Error("gd.data must be an array.");if(qe===void 0)throw new Error("traces must be defined.");for(Array.isArray(qe)||(qe=[qe]),at=0;at=0&&Be=0&&Be=N.length)return!1;if(R.dimensions===2){if(P++,$.length===P)return R;var j=$[P];if(!M(j))return!1;R=N[B][j]}else R=N[B]}else R=N}}return R}function M(R){return R===Math.round(R)&&R>=0}function C(){var R,$,P={};for(R in y(P,f),l.subplotsRegistry)if(($=l.subplotsRegistry[R]).layoutAttributes)if(Array.isArray($.attr))for(var z=0;z<$.attr.length;z++)D(P,$,$.attr[z]);else D(P,$,$.attr==="subplot"?$.name:$.attr);for(R in l.componentsRegistry){var B=($=l.componentsRegistry[R]).schema;if(B&&(B.subplots||B.layout)){var N=B.subplots;if(N&&N.xaxis&&!N.yaxis)for(var j in N.xaxis)delete P.yaxis[j];delete P.xaxis.shift,delete P.xaxis.autoshift}else $.name==="colorscale"?y(P,$.layoutAttributes):$.layoutAttributes&&O(P,$.layoutAttributes,$.name)}return{layoutAttributes:A(P)}}function A(R){return function($){a.crawl($,function(P,z,B){a.isValObject(P)?P.arrayOk!==!0&&P.valType!=="data_array"||(B[z+"src"]={valType:"string",editType:"none"}):v(P)&&(P.role="object")})}(R),function($){a.crawl($,function(P,z,B){if(P){var N=P[x];N&&(delete P[x],B[z]={items:{}},B[z].items[N]=P,B[z].role="object")}})}(R),function($){(function P(z){for(var B in z)if(v(z[B]))P(z[B]);else if(Array.isArray(z[B]))for(var N=0;N=j.length)return!1;z=(P=(l.transformsRegistry[j[F].type]||{}).attributes)&&P[$[2]],N=3}else{var E=R._module;if(E||(E=(l.modules[R.type||u.type.dflt]||{})._module),!E)return!1;if(!(z=(P=E.attributes)&&P[B])){var W=E.basePlotModule;W&&W.attributes&&(z=W.attributes[B])}z||(z=u[B])}return S(z,$,N)},a.getLayoutValObject=function(R,$){var P=function(z,B){var N,j,F,E,W=z._basePlotModules;if(W){var H;for(N=0;N=v&&(y._input||{})._templateitemname;b&&(g=v);var w,_=m+"["+g+"]";function x(){w={},b&&(w[_]={},w[_][u]=b)}function k(S,M){b?l.nestedProperty(w[_],S).set(M):w[_+"."+S]=M}function T(){var S=w;return x(),S}return x(),{modifyBase:function(S,M){w[S]=M},modifyItem:k,getUpdateObj:T,applyUpdate:function(S,M){S&&k(S,M);var C=T();for(var A in C)l.nestedProperty(h,A).set(C[A])}}}},61549:function(o,a,n){var l=n(39898),c=n(73972),u=n(74875),f=n(71828),d=n(63893),p=n(33306),h=n(7901),m=n(91424),y=n(92998),v=n(64168),g=n(89298),b=n(18783),w=n(99082),_=w.enforce,x=w.clean,k=n(71739).doAutoRange,T="start";function S(O,R,$){for(var P=0;P<$.length;P++){var z=$[P][0],B=$[P][1];if(!(z[0]>=O[1]||z[1]<=O[0])&&B[0]R[0])return!0}return!1}function M(O){var R,$,P,z,B,N,j=O._fullLayout,F=j._size,E=F.p,W=g.list(O,"",!0);if(j._paperdiv.style({width:O._context.responsive&&j.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":j.width+"px",height:O._context.responsive&&j.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":j.height+"px"}).selectAll(".main-svg").call(m.setSize,j.width,j.height),O._context.setBackground(O,j.paper_bgcolor),a.drawMainTitle(O),v.manage(O),!j._has("cartesian"))return u.previousPromises(O);function H(Fe,Be,Ue){var qe=Fe._lw/2;return Fe._id.charAt(0)==="x"?Be?Ue==="top"?Be._offset-E-qe:Be._offset+Be._length+E+qe:F.t+F.h*(1-(Fe.position||0))+qe%1:Be?Ue==="right"?Be._offset+Be._length+E+qe:Be._offset-E-qe:F.l+F.w*(Fe.position||0)+qe%1}for(R=0;R.5?"t":"b",ee=H._fullLayout.margin[te],K=0;return L.yref==="paper"?K=q+L.pad.t+L.pad.b:L.yref==="container"&&(K=function(Q,G,X,Y,re){var ie=0;return X==="middle"&&(ie+=re/2),Q==="t"?(X==="top"&&(ie+=re),ie+=Y-G*Y):(X==="bottom"&&(ie+=re),ie+=G*Y),ie}(te,U,J,H._fullLayout.height,q)+L.pad.t+L.pad.b),K>ee?K:0}(O,$,E);W>0&&(function(H,L,q,U){var J="title.automargin",te=H._fullLayout.title,ee=te.y>.5?"t":"b",K={x:te.x,y:te.y,t:0,b:0},Q={};te.yref==="paper"&&function(G,X,Y,re,ie){var le=X.yref==="paper"?G._fullLayout._size.h:G._fullLayout.height,se=f.isTopAnchor(X)?re:re-ie,he=Y==="b"?le-se:se;return!(f.isTopAnchor(X)&&Y==="t"||f.isBottomAnchor(X)&&Y==="b")&&heF?D.push({code:"unused",traceType:P,templateCount:j,dataCount:F}):F>j&&D.push({code:"reused",traceType:P,templateCount:j,dataCount:F})}}else D.push({code:"data"});if(function E(W,H){for(var L in W)if(L.charAt(0)!=="_"){var q=W[L],U=w(W,L,H);c(q)?(Array.isArray(W)&&q._template===!1&&q.templateitemname&&D.push({code:"missing",path:U,templateitemname:q.templateitemname}),E(q,U)):Array.isArray(q)&&_(q)&&E(q,U)}}({data:R,layout:O},""),D.length)return D.map(x)}},403:function(o,a,n){var l=n(92770),c=n(72391),u=n(74875),f=n(71828),d=n(25095),p=n(5900),h=n(70942),m=n(11506).version,y={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};o.exports=function(v,g){var b,w,_,x;function k(F){return!(F in g)||f.validate(g[F],y[F])}if(g=g||{},f.isPlainObject(v)?(b=v.data||[],w=v.layout||{},_=v.config||{},x={}):(v=f.getGraphDiv(v),b=f.extendDeep([],v.data),w=f.extendDeep({},v.layout),_=v._context,x=v._fullLayout||{}),!k("width")&&g.width!==null||!k("height")&&g.height!==null)throw new Error("Height and width should be pixel values.");if(!k("format"))throw new Error("Export format is not "+f.join2(y.format.values,", "," or ")+".");var T={};function S(F,E){return f.coerce(g,T,y,F,E)}var M=S("format"),C=S("width"),A=S("height"),D=S("scale"),O=S("setBackground"),R=S("imageDataOnly"),$=document.createElement("div");$.style.position="absolute",$.style.left="-5000px",document.body.appendChild($);var P=f.extendFlat({},w);C?P.width=C:g.width===null&&l(x.width)&&(P.width=x.width),A?P.height=A:g.height===null&&l(x.height)&&(P.height=x.height);var z=f.extendFlat({},_,{_exportedPlot:!0,staticPlot:!0,setBackground:O}),B=d.getRedrawFunc($);function N(){return new Promise(function(F){setTimeout(F,d.getDelay($._fullLayout))})}function j(){return new Promise(function(F,E){var W=p($,M,D),H=$._fullLayout.width,L=$._fullLayout.height;function q(){c.purge($),document.body.removeChild($)}if(M==="full-json"){var U=u.graphJson($,!1,"keepdata","object",!0,!0);return U.version=m,U=JSON.stringify(U),q(),F(R?U:d.encodeJSON(U))}if(q(),M==="svg")return F(R?W:d.encodeSVG(W));var J=document.createElement("canvas");J.id=f.randstr(),h({format:M,width:H,height:L,scale:D,canvas:J,svg:W,promise:!0}).then(F).catch(E)})}return new Promise(function(F,E){c.newPlot($,b,P,z).then(B).then(N).then(j).then(function(W){F(function(H){return R?H.replace(d.IMAGE_URL_PREFIX,""):H}(W))}).catch(function(W){E(W)})})}},84936:function(o,a,n){var l=n(71828),c=n(74875),u=n(86281),f=n(72075).dfltConfig,d=l.isPlainObject,p=Array.isArray,h=l.isArrayOrTypedArray;function m(k,T,S,M,C,A){A=A||[];for(var D=Object.keys(k),O=0;Oz.length&&M.push(g("unused",C,$.concat(z.length)));var W,H,L,q,U,J=z.length,te=Array.isArray(E);if(te&&(J=Math.min(J,E.length)),B.dimensions===2)for(H=0;Hz[H].length&&M.push(g("unused",C,$.concat(H,z[H].length)));var ee=z[H].length;for(W=0;W<(te?Math.min(ee,E[H].length):ee);W++)L=te?E[H][W]:E,q=P[H][W],U=z[H][W],l.validate(q,L)?U!==q&&U!==+q&&M.push(g("dynamic",C,$.concat(H,W),q,U)):M.push(g("value",C,$.concat(H,W),q))}else M.push(g("array",C,$.concat(H),P[H]));else for(H=0;H1&&A.push(g("object","layout"))),c.supplyDefaults(D);for(var O=D._fullData,R=S.length,$=0;$0&&Math.round(w)===w))return{vals:y};g=w}for(var _=h.calendar,x=v==="start",k=v==="end",T=p[m+"period0"],S=u(T,_)||0,M=[],C=[],A=[],D=y.length,O=0;Oz;)P=f(P,-g,_);for(;P<=z;)P=f(P,g,_);$=f(P,-g,_)}else{for(P=S+(R=Math.round((z-S)/b))*b;P>z;)P-=b;for(;P<=z;)P+=b;$=P-b}M[O]=x?$:k?P:($+P)/2,C[O]=$,A[O]=P}return{vals:M,starts:C,ends:A}}},89502:function(o){o.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(o,a,n){var l=n(39898),c=n(92770),u=n(71828),f=n(50606).FP_SAFE,d=n(73972),p=n(91424),h=n(41675),m=h.getFromId,y=h.isLinked;function v(O,R){var $,P,z=[],B=O._fullLayout,N=b(B,R,0),j=b(B,R,1),F=_(O,R),E=F.min,W=F.max;if(E.length===0||W.length===0)return u.simpleMap(R.range,R.r2l);var H=E[0].val,L=W[0].val;for($=1;$0&&((G=le-N(te)-j(ee))>se?X/G>he&&(K=te,Q=ee,he=X/G):X/le>he&&(K={val:te.val,nopad:1},Q={val:ee.val,nopad:1},he=X/le));if(H===L){var _e=H-1,Me=H+1;if(re)if(H===0)z=[0,1];else{var Ce=(H>0?W:E).reduce(function(ce,ye){return Math.max(ce,j(ye))},0),Se=H/(1-Math.min(.5,Ce/le));z=H>0?[0,Se]:[Se,0]}else z=ie?[Math.max(0,_e),Math.max(1,Me)]:[_e,Me]}else re?(K.val>=0&&(K={val:0,nopad:1}),Q.val<=0&&(Q={val:0,nopad:1})):ie&&(K.val-he*N(K)<0&&(K={val:0,nopad:1}),Q.val<=0&&(Q={val:1,nopad:1})),he=(Q.val-K.val-g(R,te.val,ee.val))/(le-N(K)-j(Q)),z=[K.val-he*N(K),Q.val+he*j(Q)];return z=D(z,R),R.limitRange&&R.limitRange(),U&&z.reverse(),u.simpleMap(z,R.l2r||Number)}function g(O,R,$){var P=0;if(O.rangebreaks)for(var z=O.locateBreaks(R,$),B=0;B0?$.ppadplus:$.ppadminus)||$.ppad||0),Y=G((O._m>0?$.ppadminus:$.ppadplus)||$.ppad||0),re=G($.vpadplus||$.vpad),ie=G($.vpadminus||$.vpad);if(!K){if(W=1/0,H=-1/0,ee)for(P=0;P0&&(W=z),z>H&&z-f&&(W=z),z>H&&z=he;P--)se(P);return{min:L,max:q,opts:$}},concatExtremes:_};var w=3;function _(O,R,$){var P,z,B,N=R._id,j=O._fullData,F=O._fullLayout,E=[],W=[];function H(te,ee){for(P=0;P=$&&(E.extrapad||!N)){j=!1;break}z(R,E.val)&&E.pad<=$&&(N||!E.extrapad)&&(O.splice(F,1),F--)}if(j){var W=B&&R===0;O.push({val:R,pad:W?0:$,extrapad:!W&&N})}}function S(O){return c(O)&&Math.abs(O)=R}function A(O,R,$){return R===void 0||$===void 0||(R=O.d2l(R))=F&&(B=F,$=F),N<=F&&(N=F,P=F)}}return $=function(E,W){var H=W.autorangeoptions;return H&&H.minallowed!==void 0&&A(W,H.minallowed,H.maxallowed)?H.minallowed:H&&H.clipmin!==void 0&&A(W,H.clipmin,H.clipmax)?Math.max(E,W.d2l(H.clipmin)):E}($,R),P=function(E,W){var H=W.autorangeoptions;return H&&H.maxallowed!==void 0&&A(W,H.minallowed,H.maxallowed)?H.maxallowed:H&&H.clipmax!==void 0&&A(W,H.clipmin,H.clipmax)?Math.min(E,W.d2l(H.clipmax)):E}(P,R),[$,P]}},23074:function(o){o.exports=function(a,n,l){var c,u;if(l){var f=n==="reversed"||n==="min reversed"||n==="max reversed";c=l[f?1:0],u=l[f?0:1]}var d=a("autorangeoptions.minallowed",u===null?c:void 0),p=a("autorangeoptions.maxallowed",c===null?u:void 0);d===void 0&&a("autorangeoptions.clipmin"),p===void 0&&a("autorangeoptions.clipmax"),a("autorangeoptions.include")}},89298:function(o,a,n){var l=n(39898),c=n(92770),u=n(74875),f=n(73972),d=n(71828),p=d.strTranslate,h=n(63893),m=n(92998),y=n(7901),v=n(91424),g=n(13838),b=n(66287),w=n(50606),_=w.ONEMAXYEAR,x=w.ONEAVGYEAR,k=w.ONEMINYEAR,T=w.ONEMAXQUARTER,S=w.ONEAVGQUARTER,M=w.ONEMINQUARTER,C=w.ONEMAXMONTH,A=w.ONEAVGMONTH,D=w.ONEMINMONTH,O=w.ONEWEEK,R=w.ONEDAY,$=R/2,P=w.ONEHOUR,z=w.ONEMIN,B=w.ONESEC,N=w.MINUS_SIGN,j=w.BADNUM,F={K:"zeroline"},E={K:"gridline",L:"path"},W={K:"minor-gridline",L:"path"},H={K:"tick",L:"path"},L={K:"tick",L:"text"},q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},U=n(18783),J=U.MID_SHIFT,te=U.CAP_SHIFT,ee=U.LINE_SPACING,K=U.OPPOSITE_SIDE,Q=o.exports={};Q.setConvert=n(21994);var G=n(4322),X=n(41675),Y=X.idSort,re=X.isLinked;Q.id2name=X.id2name,Q.name2id=X.name2id,Q.cleanId=X.cleanId,Q.list=X.list,Q.listIds=X.listIds,Q.getFromId=X.getFromId,Q.getFromTrace=X.getFromTrace;var ie=n(71739);Q.getAutoRange=ie.getAutoRange,Q.findExtremes=ie.findExtremes;var le=1e-4;function se(ve){var Te=(ve[1]-ve[0])*le;return[ve[0]-Te,ve[1]+Te]}Q.coerceRef=function(ve,Te,Ve,We,Je,Xe){var Ge=We.charAt(We.length-1),Qe=Ve._fullLayout._subplots[Ge+"axis"],ct=We+"ref",bt={};return Je||(Je=Qe[0]||(typeof Xe=="string"?Xe:Xe[0])),Xe||(Xe=Je),Qe=Qe.concat(Qe.map(function(nt){return nt+" domain"})),bt[ct]={valType:"enumerated",values:Qe.concat(Xe?typeof Xe=="string"?[Xe]:Xe:[]),dflt:Je},d.coerce(ve,Te,bt,ct)},Q.getRefType=function(ve){return ve===void 0?ve:ve==="paper"?"paper":ve==="pixel"?"pixel":/( domain)$/.test(ve)?"domain":"range"},Q.coercePosition=function(ve,Te,Ve,We,Je,Xe){var Ge,Qe;if(Q.getRefType(We)!=="range")Ge=d.ensureNumber,Qe=Ve(Je,Xe);else{var ct=Q.getFromId(Te,We);Qe=Ve(Je,Xe=ct.fraction2r(Xe)),Ge=ct.cleanPos}ve[Je]=Ge(Qe)},Q.cleanPosition=function(ve,Te,Ve){return(Ve==="paper"||Ve==="pixel"?d.ensureNumber:Q.getFromId(Te,Ve).cleanPos)(ve)},Q.redrawComponents=function(ve,Te){Te=Te||Q.listIds(ve);var Ve=ve._fullLayout;function We(Je,Xe,Ge,Qe){for(var ct=f.getComponentMethod(Je,Xe),bt={},nt=0;ntVe&&nt2e-6||((Ve-ve._forceTick0)/ve._minDtick%1+1.000001)%1>2e-6)&&(ve._minDtick=0)):ve._minDtick=0},Q.saveRangeInitial=function(ve,Te){for(var Ve=Q.list(ve,"",!0),We=!1,Je=0;Je.3*Nt||Ft(qt)||Ft(Lt))){var Vt=wt.dtick/2;mt+=mt+Vt.8){var ht=Number(wt.substr(1));Gt.exactYears>.8&&ht%12==0?mt=Q.tickIncrement(mt,"M6","reverse")+1.5*R:Gt.exactMonths>.8?mt=Q.tickIncrement(mt,"M1","reverse")+15.5*R:mt-=$;var Pt=Q.tickIncrement(mt,wt);if(Pt<=qt)return Pt}return mt}(Et,ve,jt,Qe,Je)),Ct=Et;Ct<=ct;)Ct=Q.tickIncrement(Ct,jt,!1,Je);return{start:Te.c2r(Et,0,Je),end:Te.c2r(Ct,0,Je),size:jt,_dataSpan:ct-Qe}},Q.prepMinorTicks=function(ve,Te,Ve){if(!Te.minor.dtick){delete ve.dtick;var We,Je=Te.dtick&&c(Te._tmin);if(Je){var Xe=Q.tickIncrement(Te._tmin,Te.dtick,!0);We=[Te._tmin,.99*Xe+.01*Te._tmin]}else{var Ge=d.simpleMap(Te.range,Te.r2l);We=[Ge[0],.8*Ge[0]+.2*Ge[1]]}if(ve.range=d.simpleMap(We,Te.l2r),ve._isMinor=!0,Q.prepTicks(ve,Ve),Je){var Qe=c(Te.dtick),ct=c(ve.dtick),bt=Qe?Te.dtick:+Te.dtick.substring(1),nt=ct?ve.dtick:+ve.dtick.substring(1);Qe&&ct?Ce(bt,nt)?bt===2*O&&nt===2*R&&(ve.dtick=O):bt===2*O&&nt===3*R?ve.dtick=O:bt!==O||(Te._input.minor||{}).nticks?Se(bt/nt,2.5)?ve.dtick=bt/2:ve.dtick=bt:ve.dtick=R:String(Te.dtick).charAt(0)==="M"?ct?ve.dtick="M1":Ce(bt,nt)?bt>=12&&nt===2&&(ve.dtick="M3"):ve.dtick=Te.dtick:String(ve.dtick).charAt(0)==="L"?String(Te.dtick).charAt(0)==="L"?Ce(bt,nt)||(ve.dtick=Se(bt/nt,2.5)?Te.dtick/2:Te.dtick):ve.dtick="D1":ve.dtick==="D2"&&+Te.dtick>1&&(ve.dtick=1)}ve.range=Te.range}Te.minor._tick0Init===void 0&&(ve.tick0=Te.tick0)},Q.prepTicks=function(ve,Te){var Ve=d.simpleMap(ve.range,ve.r2l,void 0,void 0,Te);if(ve.tickmode==="auto"||!ve.dtick){var We,Je=ve.nticks;Je||(ve.type==="category"||ve.type==="multicategory"?(We=ve.tickfont?d.bigFont(ve.tickfont.size||12):15,Je=ve._length/We):(We=ve._id.charAt(0)==="y"?40:80,Je=d.constrain(ve._length/We,4,9)+1),ve._name==="radialaxis"&&(Je*=2)),ve.minor&&ve.minor.tickmode!=="array"||ve.tickmode==="array"&&(Je*=100),ve._roughDTick=Math.abs(Ve[1]-Ve[0])/Je,Q.autoTicks(ve,ve._roughDTick),ve._minDtick>0&&ve.dtick<2*ve._minDtick&&(ve.dtick=ve._minDtick,ve.tick0=ve.l2r(ve._forceTick0))}ve.ticklabelmode==="period"&&function(Xe){var Ge;function Qe(){return!(c(Xe.dtick)||Xe.dtick.charAt(0)!=="M")}var ct=Qe(),bt=Q.getTickFormat(Xe);if(bt){var nt=Xe._dtickInit!==Xe.dtick;/%[fLQsSMX]/.test(bt)||(/%[HI]/.test(bt)?(Ge=P,nt&&!ct&&Xe.dtick=(vt?0:1);wt--){var qt=!wt;wt?(ve._dtickInit=ve.dtick,ve._tick0Init=ve.tick0):(ve.minor._dtickInit=ve.minor.dtick,ve.minor._tick0Init=ve.minor.tick0);var Lt=wt?ve:d.extendFlat({},ve,ve.minor);if(qt?Q.prepMinorTicks(Lt,ve,Te):Q.prepTicks(Lt,Te),Lt.tickmode!=="array")if(Lt.tickmode!=="sync"){var Gt=se(ct),ht=Gt[0],Pt=Gt[1],At=c(Lt.dtick),Ft=Je==="log"&&!(At||Lt.dtick.charAt(0)==="L"),$t=Q.tickFirst(Lt,Te);if(wt){if(ve._tmin=$t,$t=Pt:zt<=Pt;zt=Q.tickIncrement(zt,Wt,bt,Xe)){if(wt&&Nt++,Lt.rangebreaks&&!bt){if(zt=It)break}if(Et.length>Yt||zt===Xt)break;Xt=zt;var an={value:zt};wt?(Ft&&zt!==(0|zt)&&(an.simpleLabel=!0),Ge>1&&Nt%Ge&&(an.skipLabel=!0),Et.push(an)):(an.minor=!0,mt.push(an))}}else Et=[],Ct=V(ve);else wt?(Et=[],Ct=ne(ve)):(mt=[],jt=ne(ve))}if(vt&&!(ve.minor.ticks==="inside"&&ve.ticks==="outside"||ve.minor.ticks==="outside"&&ve.ticks==="inside")){for(var fn=Et.map(function(kr){return kr.value}),un=[],on=0;on0?(Dr=hr-1,An=hr):(Dr=hr,An=hr);var ln,Vn=kr[Dr].value,$r=kr[An].value,Fn=Math.abs($r-Vn),Yn=Ir||Fn,jn=0;Yn>=k?jn=Fn>=k&&Fn<=_?Fn:x:Ir===S&&Yn>=M?jn=Fn>=M&&Fn<=T?Fn:S:Yn>=D?jn=Fn>=D&&Fn<=C?Fn:A:Ir===O&&Yn>=O?jn=O:Yn>=R?jn=R:Ir===$&&Yn>=$?jn=$:Ir===P&&Yn>=P&&(jn=P),jn>=Fn&&(jn=Fn,ln=!0);var gr=ha+jn;if(pa.rangebreaks&&jn>0){for(var yr=0,Er=0;Er<84;Er++){var Rr=(Er+.5)/84;pa.maskBreaks(ha*(1-Rr)+Rr*gr)!==j&&yr++}(jn*=yr/84)||(kr[hr].drop=!0),ln&&Fn>O&&(jn=Fn)}(jn>0||hr===0)&&(kr[hr].periodX=ha+jn/2)}}(Et,ve,ve._definedDelta),ve.rangebreaks){var Kt=ve._id.charAt(0)==="y",Mn=1;ve.tickmode==="auto"&&(Mn=ve.tickfont?ve.tickfont.size:12);var Tn=NaN;for(Ve=Et.length-1;Ve>-1;Ve--)if(Et[Ve].drop)Et.splice(Ve,1);else{Et[Ve].value=Rt(Et[Ve].value,ve);var Bn=ve.c2p(Et[Ve].value);(Kt?Tn>Bn-Mn:TnIt||knIt&&(In.periodX=It),kn10||We.substr(5)!=="01-01"?ve._tickround="d":ve._tickround=+Te.substr(1)%12==0?"y":"m";else if(Te>=R&&Je<=10||Te>=15*R)ve._tickround="d";else if(Te>=z&&Je<=16||Te>=P)ve._tickround="M";else if(Te>=B&&Je<=19||Te>=z)ve._tickround="S";else{var Xe=ve.l2r(Ve+Te).replace(/^-/,"").length;ve._tickround=Math.max(Je,Xe)-20,ve._tickround<0&&(ve._tickround=4)}}else if(c(Te)||Te.charAt(0)==="L"){var Ge=ve.range.map(ve.r2d||Number);c(Te)||(Te=Number(Te.substr(1))),ve._tickround=2-Math.floor(Math.log(Te)/Math.LN10+.01);var Qe=Math.max(Math.abs(Ge[0]),Math.abs(Ge[1])),ct=Math.floor(Math.log(Qe)/Math.LN10+.01),bt=ve.minexponent===void 0?3:ve.minexponent;Math.abs(ct)>bt&&(Fe(ve.exponentformat)&&!Be(ct)?ve._tickexponent=3*Math.round((ct-1)/3):ve._tickexponent=ct)}else ve._tickround=null}function De(ve,Te,Ve){var We=ve.tickfont||{};return{x:Te,dx:0,dy:0,text:Ve||"",fontSize:We.size,font:We.family,fontColor:We.color}}Q.autoTicks=function(ve,Te,Ve){var We;function Je(It){return Math.pow(It,Math.floor(Math.log(Te)/Math.LN10))}if(ve.type==="date"){ve.tick0=d.dateTick0(ve.calendar,0);var Xe=2*Te;if(Xe>x)Te/=x,We=Je(10),ve.dtick="M"+12*Pe(Te,We,fe);else if(Xe>A)Te/=A,ve.dtick="M"+Pe(Te,1,xe);else if(Xe>R){if(ve.dtick=Pe(Te,R,ve._hasDayOfWeekBreaks?[1,2,7,14]:ge),!Ve){var Ge=Q.getTickFormat(ve),Qe=ve.ticklabelmode==="period";Qe&&(ve._rawTick0=ve.tick0),/%[uVW]/.test(Ge)?ve.tick0=d.dateTick0(ve.calendar,2):ve.tick0=d.dateTick0(ve.calendar,1),Qe&&(ve._dowTick0=ve.tick0)}}else Xe>P?ve.dtick=Pe(Te,P,xe):Xe>z?ve.dtick=Pe(Te,z,ue):Xe>B?ve.dtick=Pe(Te,B,ue):(We=Je(10),ve.dtick=Pe(Te,We,fe))}else if(ve.type==="log"){ve.tick0=0;var ct=d.simpleMap(ve.range,ve.r2l);if(ve._isMinor&&(Te*=1.5),Te>.7)ve.dtick=Math.ceil(Te);else if(Math.abs(ct[1]-ct[0])<1){var bt=1.5*Math.abs((ct[1]-ct[0])/Te);Te=Math.abs(Math.pow(10,ct[1])-Math.pow(10,ct[0]))/bt,We=Je(10),ve.dtick="L"+Pe(Te,We,fe)}else ve.dtick=Te>.3?"D2":"D1"}else ve.type==="category"||ve.type==="multicategory"?(ve.tick0=0,ve.dtick=Math.ceil(Math.max(Te,1))):gt(ve)?(ve.tick0=0,We=1,ve.dtick=Pe(Te,We,ke)):(ve.tick0=0,We=Je(10),ve.dtick=Pe(Te,We,fe));if(ve.dtick===0&&(ve.dtick=1),!c(ve.dtick)&&typeof ve.dtick!="string"){var nt=ve.dtick;throw ve.dtick=1,"ax.dtick error: "+String(nt)}},Q.tickIncrement=function(ve,Te,Ve,We){var Je=Ve?-1:1;if(c(Te))return d.increment(ve,Je*Te);var Xe=Te.charAt(0),Ge=Je*Number(Te.substr(1));if(Xe==="M")return d.incrementMonth(ve,Ge,We);if(Xe==="L")return Math.log(Math.pow(10,ve)+Ge)/Math.LN10;if(Xe==="D"){var Qe=Te==="D2"?we:be,ct=ve+.01*Je,bt=d.roundUp(d.mod(ct,1),Qe,Ve);return Math.floor(ct)+Math.log(l.round(Math.pow(10,bt),1))/Math.LN10}throw"unrecognized dtick "+String(Te)},Q.tickFirst=function(ve,Te){var Ve=ve.r2l||Number,We=d.simpleMap(ve.range,Ve,void 0,void 0,Te),Je=We[1] ")}else mt._prevDateHead=ht,Pt+="
"+ht;vt.text=Pt}(ve,Xe,Ve,Qe):ct==="log"?function(mt,vt,wt,qt,Lt){var Gt=mt.dtick,ht=vt.x,Pt=mt.tickformat,At=typeof Gt=="string"&&Gt.charAt(0);if(Lt==="never"&&(Lt=""),qt&&At!=="L"&&(Gt="L3",At="L"),Pt||At==="L")vt.text=Ue(Math.pow(10,ht),mt,Lt,qt);else if(c(Gt)||At==="D"&&d.mod(ht+.01,1)<.1){var Ft=Math.round(ht),$t=Math.abs(Ft),Nt=mt.exponentformat;Nt==="power"||Fe(Nt)&&Be(Ft)?(vt.text=Ft===0?1:Ft===1?"10":"10"+(Ft>1?"":N)+$t+"",vt.fontSize*=1.25):(Nt==="e"||Nt==="E")&&$t>2?vt.text="1"+Nt+(Ft>0?"+":N)+$t:(vt.text=Ue(Math.pow(10,ht),mt,"","fakehover"),Gt==="D1"&&mt._id.charAt(0)==="y"&&(vt.dy-=vt.fontSize/6))}else{if(At!=="D")throw"unrecognized dtick "+String(Gt);vt.text=String(Math.round(Math.pow(10,d.mod(ht,1)))),vt.fontSize*=.75}if(mt.dtick==="D1"){var Vt=String(vt.text).charAt(0);Vt!=="0"&&Vt!=="1"||(mt._id.charAt(0)==="y"?vt.dx-=vt.fontSize/4:(vt.dy+=vt.fontSize/2,vt.dx+=(mt.range[1]>mt.range[0]?1:-1)*vt.fontSize*(ht<0?.5:.25)))}}(ve,Xe,0,Qe,Ct):ct==="category"?function(mt,vt){var wt=mt._categories[Math.round(vt.x)];wt===void 0&&(wt=""),vt.text=String(wt)}(ve,Xe):ct==="multicategory"?function(mt,vt,wt){var qt=Math.round(vt.x),Lt=mt._categories[qt]||[],Gt=Lt[1]===void 0?"":String(Lt[1]),ht=Lt[0]===void 0?"":String(Lt[0]);wt?vt.text=ht+" - "+Gt:(vt.text=Gt,vt.text2=ht)}(ve,Xe,Ve):gt(ve)?function(mt,vt,wt,qt,Lt){if(mt.thetaunit!=="radians"||wt)vt.text=Ue(vt.x,mt,Lt,qt);else{var Gt=vt.x/180;if(Gt===0)vt.text="0";else{var ht=function(At){function Ft(Xt,zt){return Math.abs(Xt-zt)<=1e-6}var $t=function(Xt){for(var zt=1;!Ft(Math.round(Xt*zt)/zt,Xt);)zt*=10;return zt}(At),Nt=At*$t,Vt=Math.abs(function Xt(zt,Wt){return Ft(Wt,0)?zt:Xt(Wt,zt%Wt)}(Nt,$t));return[Math.round(Nt/Vt),Math.round($t/Vt)]}(Gt);if(ht[1]>=100)vt.text=Ue(d.deg2rad(vt.x),mt,Lt,qt);else{var Pt=vt.x<0;ht[1]===1?ht[0]===1?vt.text="π":vt.text=ht[0]+"π":vt.text=["",ht[0],"","⁄","",ht[1],"","π"].join(""),Pt&&(vt.text=N+vt.text)}}}}(ve,Xe,Ve,Qe,Ct):function(mt,vt,wt,qt,Lt){Lt==="never"?Lt="":mt.showexponent==="all"&&Math.abs(vt.x/mt.dtick)<1e-6&&(Lt="hide"),vt.text=Ue(vt.x,mt,Lt,qt)}(ve,Xe,0,Qe,Ct),We||(ve.tickprefix&&!Yt(ve.showtickprefix)&&(Xe.text=ve.tickprefix+Xe.text),ve.ticksuffix&&!Yt(ve.showticksuffix)&&(Xe.text+=ve.ticksuffix)),ve.labelalias&&ve.labelalias.hasOwnProperty(Xe.text)){var jt=ve.labelalias[Xe.text];typeof jt=="string"&&(Xe.text=jt)}if(ve.tickson==="boundaries"||ve.showdividers){var Et=function(mt){var vt=ve.l2p(mt);return vt>=0&&vt<=ve._length?mt:null};Xe.xbnd=[Et(Xe.x-.5),Et(Xe.x+ve.dtick-.5)]}return Xe},Q.hoverLabelText=function(ve,Te,Ve){Ve&&(ve=d.extendFlat({},ve,{hoverformat:Ve}));var We=Array.isArray(Te)?Te[0]:Te,Je=Array.isArray(Te)?Te[1]:void 0;if(Je!==void 0&&Je!==We)return Q.hoverLabelText(ve,We,Ve)+" - "+Q.hoverLabelText(ve,Je,Ve);var Xe=ve.type==="log"&&We<=0,Ge=Q.tickText(ve,ve.c2l(Xe?-We:We),"hover").text;return Xe?We===0?"0":N+Ge:Ge};var Le=["f","p","n","μ","m","","k","M","G","T"];function Fe(ve){return ve==="SI"||ve==="B"}function Be(ve){return ve>14||ve<-15}function Ue(ve,Te,Ve,We){var Je=ve<0,Xe=Te._tickround,Ge=Ve||Te.exponentformat||"B",Qe=Te._tickexponent,ct=Q.getTickFormat(Te),bt=Te.separatethousands;if(We){var nt={exponentformat:Ge,minexponent:Te.minexponent,dtick:Te.showexponent==="none"?Te.dtick:c(ve)&&Math.abs(ve)||1,range:Te.showexponent==="none"?Te.range.map(Te.r2d):[0,ve||1]};Re(nt),Xe=(Number(nt._tickround)||0)+4,Qe=nt._tickexponent,Te.hoverformat&&(ct=Te.hoverformat)}if(ct)return Te._numFormat(ct)(ve).replace(/-/g,N);var It,Yt=Math.pow(10,-Xe)/2;if(Ge==="none"&&(Qe=0),(ve=Math.abs(ve))"+It+"":Ge==="B"&&Qe===9?ve+="B":Fe(Ge)&&(ve+=Le[Qe/3+5])),Je?N+ve:ve}function qe(ve,Te){if(ve){var Ve=Object.keys(q).reduce(function(We,Je){return Te.indexOf(Je)!==-1&&q[Je].forEach(function(Xe){We[Xe]=1}),We},{});Object.keys(ve).forEach(function(We){Ve[We]||(We.length===1?ve[We]=0:delete ve[We])})}}function Ye(ve,Te){for(var Ve=[],We={},Je=0;Je1&&Ve=Je.min&&ve=0,vt=nt(Yt,Ct[1])<=0;return(jt||mt)&&(Et||vt)}if(ve.tickformatstops&&ve.tickformatstops.length>0)switch(ve.type){case"date":case"linear":for(Te=0;Te=Ge(Je)))){Ve=We;break}break;case"log":for(Te=0;Te=0&&Je.unshift(Je.splice(bt,1).shift())}});var Ge={false:{left:0,right:0}};return d.syncOrAsync(Je.map(function(Qe){return function(){if(Qe){var ct=Q.getFromId(ve,Qe);Ve||(Ve={}),Ve.axShifts=Ge,Ve.overlayingShiftedAx=Xe;var bt=Q.drawOne(ve,ct,Ve);return ct._shiftPusher&&Tt(ct,ct._fullDepth||0,Ge,!0),ct._r=ct.range.slice(),ct._rl=d.simpleMap(ct._r,ct.r2l),bt}}}))},Q.drawOne=function(ve,Te,Ve){var We,Je,Xe,Ge=(Ve=Ve||{}).axShifts||{},Qe=Ve.overlayingShiftedAx||[];Te.setScale();var ct=ve._fullLayout,bt=Te._id,nt=bt.charAt(0),It=Q.counterLetter(bt),Yt=ct._plots[Te._mainSubplot];if(Yt){if(Te._shiftPusher=Te.autoshift||Qe.indexOf(Te._id)!==-1||Qe.indexOf(Te.overlaying)!==-1,Te._shiftPusher&Te.anchor==="free"){var Ct=Te.linewidth/2||0;Te.ticks==="inside"&&(Ct+=Te.ticklen),Tt(Te,Ct,Ge,!0),Tt(Te,Te.shift||0,Ge,!1)}Ve.skipTitle===!0&&Te._shift!==void 0||(Te._shift=function(An,ln){return An.autoshift?ln[An.overlaying][An.side]:An.shift||0}(Te,Ge));var jt=Yt[nt+"axislayer"],Et=Te._mainLinePosition,mt=Et+=Te._shift,vt=Te._mainMirrorPosition,wt=Te._vals=Q.calcTicks(Te),qt=[Te.mirror,mt,vt].join("_");for(We=0;We0?An.bottom-jn:0,gr))));var yr=0,Er=0;if(Te._shiftPusher&&(yr=Math.max(gr,An.height>0?Fn==="l"?jn-An.left:An.right-jn:0),Te.title.text!==ct._dfltTitle[nt]&&(Er=(Te._titleStandoff||0)+(Te._titleScoot||0),Fn==="l"&&(Er+=ft(Te))),Te._fullDepth=Math.max(yr,Er)),Te.automargin){ln={x:0,y:0,r:0,l:0,t:0,b:0};var Rr=[0,1],_a=typeof Te._shift=="number"?Te._shift:0;if(nt==="x"){if(Fn==="b"?ln[Fn]=Te._depth:(ln[Fn]=Te._depth=Math.max(An.width>0?jn-An.top:0,gr),Rr.reverse()),An.width>0){var $a=An.right-(Te._offset+Te._length);$a>0&&(ln.xr=1,ln.r=$a);var ra=Te._offset-An.left;ra>0&&(ln.xl=0,ln.l=ra)}}else if(Fn==="l"?(Te._depth=Math.max(An.height>0?jn-An.left:0,gr),ln[Fn]=Te._depth-_a):(Te._depth=Math.max(An.height>0?An.right-jn:0,gr),ln[Fn]=Te._depth+_a,Rr.reverse()),An.height>0){var aa=An.bottom-(Te._offset+Te._length);aa>0&&(ln.yb=0,ln.b=aa);var En=Te._offset-An.top;En>0&&(ln.yt=1,ln.t=En)}ln[It]=Te.anchor==="free"?Te.position:Te._anchorAxis.domain[Rr[0]],Te.title.text!==ct._dfltTitle[nt]&&(ln[Fn]+=ft(Te)+(Te.title.standoff||0)),Te.mirror&&Te.anchor!=="free"&&((Vn={x:0,y:0,r:0,l:0,t:0,b:0})[Yn]=Te.linewidth,Te.mirror&&Te.mirror!==!0&&(Vn[Yn]+=gr),Te.mirror===!0||Te.mirror==="ticks"?Vn[It]=Te._anchorAxis.domain[Rr[1]]:Te.mirror!=="all"&&Te.mirror!=="allticks"||(Vn[It]=[Te._counterDomainMin,Te._counterDomainMax][Rr[1]]))}ha&&($r=f.getComponentMethod("rangeslider","autoMarginOpts")(ve,Te)),typeof Te.automargin=="string"&&(qe(ln,Te.automargin),qe(Vn,Te.automargin)),u.autoMargin(ve,Ne(Te),ln),u.autoMargin(ve,et(Te),Vn),u.autoMargin(ve,it(Te),$r)}),d.syncOrAsync(Ir)}}function Dr(An){var ln=bt+(An||"tick");return Lt[ln]||(Lt[ln]=function(Vn,$r){var Fn,Yn,jn,gr;return Vn._selections[$r].size()?(Fn=1/0,Yn=-1/0,jn=1/0,gr=-1/0,Vn._selections[$r].each(function(){var yr=ze(this),Er=v.bBox(yr.node().parentNode);Fn=Math.min(Fn,Er.top),Yn=Math.max(Yn,Er.bottom),jn=Math.min(jn,Er.left),gr=Math.max(gr,Er.right)})):(Fn=0,Yn=0,jn=0,gr=0),{top:Fn,bottom:Yn,left:jn,right:gr,height:Yn-Fn,width:gr-jn}}(Te,ln)),Lt[ln]}},Q.getTickSigns=function(ve,Te){var Ve=ve._id.charAt(0),We={x:"top",y:"right"}[Ve],Je=ve.side===We?1:-1,Xe=[-1,1,Je,-Je];return(Te?(ve.minor||{}).ticks:ve.ticks)!=="inside"==(Ve==="x")&&(Xe=Xe.map(function(Ge){return-Ge})),ve.side&&Xe.push({l:-1,t:-1,r:1,b:1}[ve.side.charAt(0)]),Xe},Q.makeTransTickFn=function(ve){return ve._id.charAt(0)==="x"?function(Te){return p(ve._offset+ve.l2p(Te.x),0)}:function(Te){return p(0,ve._offset+ve.l2p(Te.x))}},Q.makeTransTickLabelFn=function(ve){var Te=function(Je){var Xe=Je.ticklabelposition||"",Ge=function(vt){return Xe.indexOf(vt)!==-1},Qe=Ge("top"),ct=Ge("left"),bt=Ge("right"),nt=Ge("bottom"),It=Ge("inside"),Yt=nt||ct||Qe||bt;if(!Yt&&!It)return[0,0];var Ct=Je.side,jt=Yt?(Je.tickwidth||0)/2:0,Et=3,mt=Je.tickfont?Je.tickfont.size:12;return(nt||Qe)&&(jt+=mt*te,Et+=(Je.linewidth||0)/2),(ct||bt)&&(jt+=(Je.linewidth||0)/2,Et+=3),It&&Ct==="top"&&(Et-=mt*(1-te)),(ct||Qe)&&(jt=-jt),Ct!=="bottom"&&Ct!=="right"||(Et=-Et),[Yt?jt:0,It?Et:0]}(ve),Ve=Te[0],We=Te[1];return ve._id.charAt(0)==="x"?function(Je){return p(Ve+ve._offset+ve.l2p(at(Je)),We)}:function(Je){return p(We,Ve+ve._offset+ve.l2p(at(Je)))}},Q.makeTickPath=function(ve,Te,Ve,We){We||(We={});var Je=We.minor;if(Je&&!ve.minor)return"";var Xe=We.len!==void 0?We.len:Je?ve.minor.ticklen:ve.ticklen,Ge=ve._id.charAt(0),Qe=(ve.linewidth||1)/2;return Ge==="x"?"M0,"+(Te+Qe*Ve)+"v"+Xe*Ve:"M"+(Te+Qe*Ve)+",0h"+Xe*Ve},Q.makeLabelFns=function(ve,Te,Ve){var We=ve.ticklabelposition||"",Je=function(Nt){return We.indexOf(Nt)!==-1},Xe=Je("top"),Ge=Je("left"),Qe=Je("right"),ct=Je("bottom")||Ge||Xe||Qe,bt=Je("inside"),nt=We==="inside"&&ve.ticks==="inside"||!bt&&ve.ticks==="outside"&&ve.tickson!=="boundaries",It=0,Yt=0,Ct=nt?ve.ticklen:0;if(bt?Ct*=-1:ct&&(Ct=0),nt&&(It+=Ct,Ve)){var jt=d.deg2rad(Ve);It=Ct*Math.cos(jt)+1,Yt=Ct*Math.sin(jt)}ve.showticklabels&&(nt||ve.showline)&&(It+=.2*ve.tickfont.size);var Et,mt,vt,wt,qt,Lt={labelStandoff:It+=(ve.linewidth||1)/2*(bt?-1:1),labelShift:Yt},Gt=0,ht=ve.side,Pt=ve._id.charAt(0),At=ve.tickangle;if(Pt==="x")wt=(qt=!bt&&ht==="bottom"||bt&&ht==="top")?1:-1,bt&&(wt*=-1),Et=Yt*wt,mt=Te+It*wt,vt=qt?1:-.2,Math.abs(At)===90&&(bt?vt+=J:vt=At===-90&&ht==="bottom"?te:At===90&&ht==="top"?J:.5,Gt=J/2*(At/90)),Lt.xFn=function(Nt){return Nt.dx+Et+Gt*Nt.fontSize},Lt.yFn=function(Nt){return Nt.dy+mt+Nt.fontSize*vt},Lt.anchorFn=function(Nt,Vt){if(ct){if(Ge)return"end";if(Qe)return"start"}return c(Vt)&&Vt!==0&&Vt!==180?Vt*wt<0!==bt?"end":"start":"middle"},Lt.heightFn=function(Nt,Vt,Xt){return Vt<-60||Vt>60?-.5*Xt:ve.side==="top"!==bt?-Xt:0};else if(Pt==="y"){if(wt=(qt=!bt&&ht==="left"||bt&&ht==="right")?1:-1,bt&&(wt*=-1),Et=It,mt=Yt*wt,vt=0,bt||Math.abs(At)!==90||(vt=At===-90&&ht==="left"||At===90&&ht==="right"?te:.5),bt){var Ft=c(At)?+At:0;if(Ft!==0){var $t=d.deg2rad(Ft);Gt=Math.abs(Math.sin($t))*te*wt,vt=0}}Lt.xFn=function(Nt){return Nt.dx+Te-(Et+Nt.fontSize*vt)*wt+Gt*Nt.fontSize},Lt.yFn=function(Nt){return Nt.dy+mt+Nt.fontSize*J},Lt.anchorFn=function(Nt,Vt){return c(Vt)&&Math.abs(Vt)===90?"middle":qt?"end":"start"},Lt.heightFn=function(Nt,Vt,Xt){return ve.side==="right"&&(Vt*=-1),Vt<-30?-Xt:Vt<30?-.5*Xt:0}}return Lt},Q.drawTicks=function(ve,Te,Ve){Ve=Ve||{};var We=Te._id+"tick",Je=[].concat(Te.minor&&Te.minor.ticks?Ve.vals.filter(function(Ge){return Ge.minor&&!Ge.noTick}):[]).concat(Te.ticks?Ve.vals.filter(function(Ge){return!Ge.minor&&!Ge.noTick}):[]),Xe=Ve.layer.selectAll("path."+We).data(Je,st);Xe.exit().remove(),Xe.enter().append("path").classed(We,1).classed("ticks",1).classed("crisp",Ve.crisp!==!1).each(function(Ge){return y.stroke(l.select(this),Ge.minor?Te.minor.tickcolor:Te.tickcolor)}).style("stroke-width",function(Ge){return v.crispRound(ve,Ge.minor?Te.minor.tickwidth:Te.tickwidth,1)+"px"}).attr("d",Ve.path).style("display",null),Bt(Te,[H]),Xe.attr("transform",Ve.transFn)},Q.drawGrid=function(ve,Te,Ve){if(Ve=Ve||{},Te.tickmode!=="sync"){var We=Te._id+"grid",Je=Te.minor&&Te.minor.showgrid,Xe=Je?Ve.vals.filter(function(vt){return vt.minor}):[],Ge=Te.showgrid?Ve.vals.filter(function(vt){return!vt.minor}):[],Qe=Ve.counterAxis;if(Qe&&Q.shouldShowZeroLine(ve,Te,Qe))for(var ct=Te.tickmode==="array",bt=0;bt=0;jt--){var Et=jt?Yt:Ct;if(Et){var mt=Et.selectAll("path."+We).data(jt?Ge:Xe,st);mt.exit().remove(),mt.enter().append("path").classed(We,1).classed("crisp",Ve.crisp!==!1),mt.attr("transform",Ve.transFn).attr("d",Ve.path).each(function(vt){return y.stroke(l.select(this),vt.minor?Te.minor.gridcolor:Te.gridcolor||"#ddd")}).style("stroke-dasharray",function(vt){return v.dashStyle(vt.minor?Te.minor.griddash:Te.griddash,vt.minor?Te.minor.gridwidth:Te.gridwidth)}).style("stroke-width",function(vt){return(vt.minor?It:Te._gw)+"px"}).style("display",null),typeof Ve.path=="function"&&mt.attr("d",Ve.path)}}Bt(Te,[E,W])}},Q.drawZeroLine=function(ve,Te,Ve){Ve=Ve||Ve;var We=Te._id+"zl",Je=Q.shouldShowZeroLine(ve,Te,Ve.counterAxis),Xe=Ve.layer.selectAll("path."+We).data(Je?[{x:0,id:Te._id}]:[]);Xe.exit().remove(),Xe.enter().append("path").classed(We,1).classed("zl",1).classed("crisp",Ve.crisp!==!1).each(function(){Ve.layer.selectAll("path").sort(function(Ge,Qe){return Y(Ge.id,Qe.id)})}),Xe.attr("transform",Ve.transFn).attr("d",Ve.path).call(y.stroke,Te.zerolinecolor||y.defaultLine).style("stroke-width",v.crispRound(ve,Te.zerolinewidth,Te._gw||1)+"px").style("display",null),Bt(Te,[F])},Q.drawLabels=function(ve,Te,Ve){Ve=Ve||{};var We=ve._fullLayout,Je=Te._id,Xe=Je.charAt(0),Ge=Ve.cls||Je+"tick",Qe=Ve.vals.filter(function(wt){return wt.text}),ct=Ve.labelFns,bt=Ve.secondary?0:Te.tickangle,nt=(Te._prevTickAngles||{})[Ge],It=Ve.layer.selectAll("g."+Ge).data(Te.showticklabels?Qe:[],st),Yt=[];function Ct(wt,qt){wt.each(function(Lt){var Gt=l.select(this),ht=Gt.select(".text-math-group"),Pt=ct.anchorFn(Lt,qt),At=Ve.transFn.call(Gt.node(),Lt)+(c(qt)&&+qt!=0?" rotate("+qt+","+ct.xFn(Lt)+","+(ct.yFn(Lt)-Lt.fontSize/2)+")":""),Ft=h.lineCount(Gt),$t=ee*Lt.fontSize,Nt=ct.heightFn(Lt,c(qt)?+qt:0,(Ft-1)*$t);if(Nt&&(At+=p(0,Nt)),ht.empty()){var Vt=Gt.select("text");Vt.attr({transform:At,"text-anchor":Pt}),Vt.style("opacity",1),Te._adjustTickLabelsOverflow&&Te._adjustTickLabelsOverflow()}else{var Xt=v.bBox(ht.node()).width*{end:-.5,start:.5}[Pt];ht.attr("transform",At+p(Xt,0))}})}It.enter().append("g").classed(Ge,1).append("text").attr("text-anchor","middle").each(function(wt){var qt=l.select(this),Lt=ve._promises.length;qt.call(h.positionText,ct.xFn(wt),ct.yFn(wt)).call(v.font,wt.font,wt.fontSize,wt.fontColor).text(wt.text).call(h.convertToTspans,ve),ve._promises[Lt]?Yt.push(ve._promises.pop().then(function(){Ct(qt,bt)})):Ct(qt,bt)}),Bt(Te,[L]),It.exit().remove(),Ve.repositionOnUpdate&&It.each(function(wt){l.select(this).select("text").call(h.positionText,ct.xFn(wt),ct.yFn(wt))}),Te._adjustTickLabelsOverflow=function(){var wt=Te.ticklabeloverflow;if(wt&&wt!=="allow"){var qt=wt.indexOf("hide")!==-1,Lt=Te._id.charAt(0)==="x",Gt=0,ht=Lt?ve._fullLayout.width:ve._fullLayout.height;if(wt.indexOf("domain")!==-1){var Pt=d.simpleMap(Te.range,Te.r2l);Gt=Te.l2p(Pt[0])+Te._offset,ht=Te.l2p(Pt[1])+Te._offset}var At=Math.min(Gt,ht),Ft=Math.max(Gt,ht),$t=Te.side,Nt=1/0,Vt=-1/0;for(var Xt in It.each(function(an){var fn=l.select(this);if(fn.select(".text-math-group").empty()){var un=v.bBox(fn.node()),on=0;Lt?(un.right>Ft||un.leftFt||un.top+(Te.tickangle?0:an.fontSize/4)Te["_visibleLabelMin_"+Pt._id]?Wt.style("display","none"):Ft.K!=="tick"||At||Wt.style("display",null)})})})})},Ct(It,nt+1?nt:bt);var jt=null;Te._selections&&(Te._selections[Ge]=It);var Et=[function(){return Yt.length&&Promise.all(Yt)}];Te.automargin&&We._redrawFromAutoMarginCount&&nt===90?(jt=90,Et.push(function(){Ct(It,nt)})):Et.push(function(){if(Ct(It,bt),Qe.length&&Xe==="x"&&!c(bt)&&(Te.type!=="log"||String(Te.dtick).charAt(0)!=="D")){jt=0;var wt,qt=0,Lt=[];if(It.each(function(fn){qt=Math.max(qt,fn.fontSize);var un=Te.l2p(fn.x),on=ze(this),sn=v.bBox(on.node());Lt.push({top:0,bottom:10,height:10,left:un-sn.width/2,right:un+sn.width/2+2,width:sn.width+2})}),Te.tickson!=="boundaries"&&!Te.showdividers||Ve.secondary){var Gt=Qe.length,ht=Math.abs((Qe[Gt-1].x-Qe[0].x)*Te._m)/(Gt-1),Pt=Te.ticklabelposition||"",At=function(fn){return Pt.indexOf(fn)!==-1},Ft=At("top"),$t=At("left"),Nt=At("right"),Vt=At("bottom")||$t||Ft||Nt?(Te.tickwidth||0)+6:0,Xt=ht<2.5*qt||Te.type==="multicategory"||Te._name==="realaxis";for(wt=0;wt1)for(Qe=1;Qe2*R}(w,g))return"date";var S=b.autotypenumbers!=="strict";return function(M,C){for(var A=M.length,D=y(A),O=0,R=0,$={},P=0;P2*O}(w,S)?"category":function(M,C){for(var A=M.length,D=0;D=2){var $,P,z="";if(R.length===2){for($=0;$<2;$++)if(P=M(R[$])){z=x;break}}var B=O("pattern",z);if(B===x)for($=0;$<2;$++)(P=M(R[$]))&&(A.bounds[$]=R[$]=P-1);if(B)for($=0;$<2;$++)switch(P=R[$],B){case x:if(!l(P)||(P=+P)!==Math.floor(P)||P<0||P>=7)return void(A.enabled=!1);A.bounds[$]=R[$]=P;break;case k:if(!l(P)||(P=+P)<0||P>24)return void(A.enabled=!1);A.bounds[$]=R[$]=P}if(D.autorange===!1){var N=D.range;if(N[0]N[1])return void(A.enabled=!1)}else if(R[0]>N[0]&&R[1]h?1:-1:+(f.substr(1)||1)-+(d.substr(1)||1)},a.ref2id=function(f){return!!/^[xyz]/.test(f)&&f.split(" ")[0]},a.isLinked=function(f,d){return u(d,f._axisMatchGroups)||u(d,f._axisConstraintGroups)}},15258:function(o){o.exports=function(a,n,l,c){if(n.type==="category"){var u,f=a.categoryarray,d=Array.isArray(f)&&f.length>0;d&&(u="array");var p,h=l("categoryorder",u);h==="array"&&(p=l("categoryarray")),d||h!=="array"||(h=n.categoryorder="trace"),h==="trace"?n._initialCategories=[]:h==="array"?n._initialCategories=p.slice():(p=function(m,y){var v,g,b,w=y.dataAttr||m._id.charAt(0),_={};if(y.axData)v=y.axData;else for(v=[],g=0;gM?C.substr(M):A.substr(S))+D:C+A+k*T:D}function _(k,T){for(var S=T._size,M=S.h/S.w,C={},A=Object.keys(k),D=0;Dh*N)||W){for(S=0;SG&&ieK&&(K=ie);R/=(K-ee)/(2*Q),ee=A.l2r(ee),K=A.l2r(K),A.range=A._input.range=U=0?Math.min(ie,.9):1/(1/Math.max(ie,-.3)+3.222))}function U(ie,le,se,he,_e){return ie.append("path").attr("class","zoombox").style({fill:le>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",h(se,he)).attr("d",_e+"Z")}function J(ie,le,se){return ie.append("path").attr("class","zoombox-corners").style({fill:y.background,stroke:y.defaultLine,"stroke-width":1,opacity:0}).attr("transform",h(le,se)).attr("d","M0,0Z")}function te(ie,le,se,he,_e,Me){ie.attr("d",he+"M"+se.l+","+se.t+"v"+se.h+"h"+se.w+"v-"+se.h+"h-"+se.w+"Z"),ee(ie,le,_e,Me)}function ee(ie,le,se,he){se||(ie.transition().style("fill",he>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),le.transition().style("opacity",1).duration(200))}function K(ie){l.select(ie).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Q(ie){j&&ie.data&&ie._context.showTips&&(c.notifier(c._(ie,"Double-click to zoom back out"),"long"),j=!1)}function G(ie){var le=Math.floor(Math.min(ie.b-ie.t,ie.r-ie.l,N)/2);return"M"+(ie.l-3.5)+","+(ie.t-.5+le)+"h3v"+-le+"h"+le+"v-3h-"+(le+3)+"ZM"+(ie.r+3.5)+","+(ie.t-.5+le)+"h-3v"+-le+"h"+-le+"v-3h"+(le+3)+"ZM"+(ie.r+3.5)+","+(ie.b+.5-le)+"h-3v"+le+"h"+-le+"v3h"+(le+3)+"ZM"+(ie.l-3.5)+","+(ie.b+.5-le)+"h3v"+le+"h"+le+"v3h-"+(le+3)+"Z"}function X(ie,le,se,he,_e){for(var Me,Ce,Se,ce,ye=!1,V={},ne={},fe=(_e||{}).xaHash,xe=(_e||{}).yaHash,ue=0;ue=0)At._fullLayout._deactivateShape(At);else{var Ft=At._fullLayout.clickmode;if(K(At),ht!==2||Ne||mt(),ze)Ft.indexOf("select")>-1&&$(Pt,At,fe,xe,le.id,We),Ft.indexOf("event")>-1&&g.click(At,Pt,le.id);else if(ht===1&&Ne){var $t=Ce?ye:ce,Nt=Ce==="s"||Se==="w"?0:1,Vt=$t._name+".range["+Nt+"]",Xt=function(an,fn){var un,on=an.range[fn],sn=Math.abs(on-an.range[1-fn]);return an.type==="date"?on:an.type==="log"?(un=Math.ceil(Math.max(0,-Math.log(sn)/Math.LN10))+3,u("."+un+"g")(Math.pow(10,on))):(un=Math.floor(Math.log(Math.abs(on))/Math.LN10)-Math.floor(Math.log(sn)/Math.LN10)+4,u("."+String(un)+"g")(on))}($t,Nt),zt="left",Wt="middle";if($t.fixedrange)return;Ce?(Wt=Ce==="n"?"top":"bottom",$t.side==="right"&&(zt="right")):Se==="e"&&(zt="right"),At._context.showAxisRangeEntryBoxes&&l.select(St).call(m.makeEditable,{gd:At,immediate:!0,background:At._fullLayout.paper_bgcolor,text:String(Xt),fill:$t.tickfont?$t.tickfont.color:"#444",horizontalAlign:zt,verticalAlign:Wt}).on("edit",function(an){var fn=$t.d2r(an);fn!==void 0&&p.call("_guiRelayout",At,Vt,fn)})}}}function Ge(ht,Pt){if(ie._transitioningWithDuration)return!1;var At=Math.max(0,Math.min(be,st*ht+Ze)),Ft=Math.max(0,Math.min(we,ft*Pt+ut)),$t=Math.abs(At-Ze),Nt=Math.abs(Ft-ut);function Vt(){Tt="",gt.r=gt.l,gt.t=gt.b,Te.attr("d","M0,0Z")}if(gt.l=Math.min(Ze,At),gt.r=Math.max(Ze,At),gt.t=Math.min(ut,Ft),gt.b=Math.max(ut,Ft),ke.isSubplotConstrained)$t>N||Nt>N?(Tt="xy",$t/be>Nt/we?(Nt=$t*we/be,ut>Ft?gt.t=ut-Nt:gt.b=ut+Nt):($t=Nt*be/we,Ze>At?gt.l=Ze-$t:gt.r=Ze+$t),Te.attr("d",G(gt))):Vt();else if(Pe.isSubplotConstrained)if($t>N||Nt>N){Tt="xy";var Xt=Math.min(gt.l/be,(we-gt.b)/we),zt=Math.max(gt.r/be,(we-gt.t)/we);gt.l=Xt*be,gt.r=zt*be,gt.b=(1-Xt)*we,gt.t=(1-zt)*we,Te.attr("d",G(gt))}else Vt();else!De||Nt0){var Wt;if(Pe.isSubplotConstrained||!Re&&De.length===1){for(Wt=0;Wt1&&(Ft.maxallowed!==void 0&&Fe===(Ft.range[0]1&&($t.maxallowed!==void 0&&Be===($t.range[0]<$t.range[1]?"n":"s")||$t.minallowed!==void 0&&Be===($t.range[0]<$t.range[1]?"s":"n"))&&(on=1,Sn=0),un||on){un||(un=1),on||(on=1);var Kt=Ft._offset-sn/un,Mn=$t._offset-Sn/on;At.clipRect.call(v.setTranslate,sn,Sn).call(v.setScale,un,on),At.plot.call(v.setTranslate,Kt,Mn).call(v.setScale,1/un,1/on),un===At.xScaleFactor&&on===At.yScaleFactor||(v.setPointGroupScale(At.zoomScalePts,un,on),v.setTextPointsScale(At.zoomScaleTxt,un,on)),v.hideOutsideRangePoints(At.clipOnAxisFalseTraces,At),At.xScaleFactor=un,At.yScaleFactor=on}}}}function qt(ht,Pt,At){return ht.fixedrange?0:Fe&&ke.xaHash[ht._id]?Pt:Be&&(ke.isSubplotConstrained?ke.xaHash:ke.yaHash)[ht._id]?At:0}function Lt(ht,Pt){return Pt?(ht.range=ht._r.slice(),P(ht,Pt),Gt(ht,Pt)):0}function Gt(ht,Pt,At){return ht._length*(1-Pt)*S[At||ht.constraintoward||"middle"]}return Ce.length*Se.length!=1&&Y(St,function(ht){if(ie._context._scrollZoom.cartesian||ie._fullLayout._enablescrollzoom){if(Je(),ie._transitioningWithDuration)return ht.preventDefault(),void ht.stopPropagation();et(),clearTimeout(nt);var Pt=-ht.deltaY;if(isFinite(Pt)||(Pt=ht.wheelDelta/10),isFinite(Pt)){var At,Ft=Math.exp(-Math.min(Math.max(Pt,-20),20)/200),$t=Yt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Nt=(ht.clientX-$t.left)/$t.width,Vt=($t.bottom-ht.clientY)/$t.height;if(Fe){for(Se||(Nt=.5),At=0;AtA[1]-.000244140625&&(f.domain=m),c.noneOrAll(u.domain,f.domain,m),f.tickmode==="sync"&&(f.tickmode="auto")}return d("layer"),f}},89426:function(o,a,n){var l=n(59652);o.exports=function(c,u,f,d,p){p||(p={});var h=p.tickSuffixDflt,m=l(c);f("tickprefix")&&f("showtickprefix",m),f("ticksuffix",h)&&f("showticksuffix",m)}},23608:function(o,a,n){var l=n(23074);o.exports=function(c,u,f,d){var p=u._template||{},h=u.type||p.type||"-";f("minallowed"),f("maxallowed");var m,y=f("range"),v=u.getAutorangeDflt(y,d),g=f("autorange",v);!y||(y[0]!==null||y[1]!==null)&&(y[0]!==null&&y[1]!==null||g!=="reversed"&&g!==!0)&&(y[0]===null||g!=="min"&&g!=="max reversed")&&(y[1]===null||g!=="max"&&g!=="min reversed")||(y=void 0,delete u.range,u.autorange=!0,m=!0),m||(g=f("autorange",v=u.getAutorangeDflt(y,d))),g&&(l(f,g,y),h!=="linear"&&h!=="-"||f("rangemode")),u.cleanRange()}},42449:function(o,a,n){var l=n(18783).FROM_BL;o.exports=function(c,u,f){f===void 0&&(f=l[c.constraintoward||"center"]);var d=[c.r2l(c.range[0]),c.r2l(c.range[1])],p=d[0]+(d[1]-d[0])*f;c.range=c._input.range=[c.l2r(p+(d[0]-p)*u),c.l2r(p+(d[1]-p)*u)],c.setScale()}},21994:function(o,a,n){var l=n(39898),c=n(84096).g0,u=n(71828),f=u.numberFormat,d=n(92770),p=u.cleanNumber,h=u.ms2DateTime,m=u.dateTime2ms,y=u.ensureNumber,v=u.isArrayOrTypedArray,g=n(50606),b=g.FP_SAFE,w=g.BADNUM,_=g.LOG_CLIP,x=g.ONEWEEK,k=g.ONEDAY,T=g.ONEHOUR,S=g.ONEMIN,M=g.ONESEC,C=n(41675),A=n(85555),D=A.HOUR_PATTERN,O=A.WEEKDAY_PATTERN;function R(P){return Math.pow(10,P)}function $(P){return P!=null}o.exports=function(P,z){z=z||{};var B=P._id||"x",N=B.charAt(0);function j(X,Y){if(X>0)return Math.log(X)/Math.LN10;if(X<=0&&Y&&P.range&&P.range.length===2){var re=P.range[0],ie=P.range[1];return .5*(re+ie-2*_*Math.abs(re-ie))}return w}function F(X,Y,re,ie){if((ie||{}).msUTC&&d(X))return+X;var le=m(X,re||P.calendar);if(le===w){if(!d(X))return w;X=+X;var se=Math.floor(10*u.mod(X+.05,1)),he=Math.round(X-se/10);le=m(new Date(he))+se/10}return le}function E(X,Y,re){return h(X,Y,re||P.calendar)}function W(X){return P._categories[Math.round(X)]}function H(X){if($(X)){if(P._categoriesMap===void 0&&(P._categoriesMap={}),P._categoriesMap[X]!==void 0)return P._categoriesMap[X];P._categories.push(typeof X=="number"?String(X):X);var Y=P._categories.length-1;return P._categoriesMap[X]=Y,Y}return w}function L(X){if(P._categoriesMap)return P._categoriesMap[X]}function q(X){var Y=L(X);return Y!==void 0?Y:d(X)?+X:void 0}function U(X){return d(X)?+X:L(X)}function J(X,Y,re){return l.round(re+Y*X,2)}function te(X,Y,re){return(X-re)/Y}var ee=function(X){return d(X)?J(X,P._m,P._b):w},K=function(X){return te(X,P._m,P._b)};if(P.rangebreaks){var Q=N==="y";ee=function(X){if(!d(X))return w;var Y=P._rangebreaks.length;if(!Y)return J(X,P._m,P._b);var re=Q;P.range[0]>P.range[1]&&(re=!re);for(var ie=re?-1:1,le=ie*X,se=0,he=0;heMe)){se=le<(_e+Me)/2?he:he+1;break}se=he+1}var Ce=P._B[se]||0;return isFinite(Ce)?J(X,P._m2,Ce):0},K=function(X){var Y=P._rangebreaks.length;if(!Y)return te(X,P._m,P._b);for(var re=0,ie=0;ieP._rangebreaks[ie].pmax&&(re=ie+1);return te(X,P._m2,P._B[re])}}P.c2l=P.type==="log"?j:y,P.l2c=P.type==="log"?R:y,P.l2p=ee,P.p2l=K,P.c2p=P.type==="log"?function(X,Y){return ee(j(X,Y))}:ee,P.p2c=P.type==="log"?function(X){return R(K(X))}:K,["linear","-"].indexOf(P.type)!==-1?(P.d2r=P.r2d=P.d2c=P.r2c=P.d2l=P.r2l=p,P.c2d=P.c2r=P.l2d=P.l2r=y,P.d2p=P.r2p=function(X){return P.l2p(p(X))},P.p2d=P.p2r=K,P.cleanPos=y):P.type==="log"?(P.d2r=P.d2l=function(X,Y){return j(p(X),Y)},P.r2d=P.r2c=function(X){return R(p(X))},P.d2c=P.r2l=p,P.c2d=P.l2r=y,P.c2r=j,P.l2d=R,P.d2p=function(X,Y){return P.l2p(P.d2r(X,Y))},P.p2d=function(X){return R(K(X))},P.r2p=function(X){return P.l2p(p(X))},P.p2r=K,P.cleanPos=y):P.type==="date"?(P.d2r=P.r2d=u.identity,P.d2c=P.r2c=P.d2l=P.r2l=F,P.c2d=P.c2r=P.l2d=P.l2r=E,P.d2p=P.r2p=function(X,Y,re){return P.l2p(F(X,0,re))},P.p2d=P.p2r=function(X,Y,re){return E(K(X),Y,re)},P.cleanPos=function(X){return u.cleanDate(X,w,P.calendar)}):P.type==="category"?(P.d2c=P.d2l=H,P.r2d=P.c2d=P.l2d=W,P.d2r=P.d2l_noadd=q,P.r2c=function(X){var Y=U(X);return Y!==void 0?Y:P.fraction2r(.5)},P.l2r=P.c2r=y,P.r2l=U,P.d2p=function(X){return P.l2p(P.r2c(X))},P.p2d=function(X){return W(K(X))},P.r2p=P.d2p,P.p2r=K,P.cleanPos=function(X){return typeof X=="string"&&X!==""?X:y(X)}):P.type==="multicategory"&&(P.r2d=P.c2d=P.l2d=W,P.d2r=P.d2l_noadd=q,P.r2c=function(X){var Y=q(X);return Y!==void 0?Y:P.fraction2r(.5)},P.r2c_just_indices=L,P.l2r=P.c2r=y,P.r2l=q,P.d2p=function(X){return P.l2p(P.r2c(X))},P.p2d=function(X){return W(K(X))},P.r2p=P.d2p,P.p2r=K,P.cleanPos=function(X){return Array.isArray(X)||typeof X=="string"&&X!==""?X:y(X)},P.setupMultiCategory=function(X){var Y,re,ie=P._traceIndices,le=P._matchGroup;if(le&&P._categories.length===0){for(var se in le)if(se!==B){var he=z[C.id2name(se)];ie=ie.concat(he._traceIndices)}}var _e=[[0,{}],[0,{}]],Me=[];for(Y=0;Yhe[1]&&(ie[se?0:1]=re)}},P.cleanRange=function(X,Y){P._cleanRange(X,Y),P.limitRange(X)},P._cleanRange=function(X,Y){Y||(Y={}),X||(X="range");var re,ie,le=u.nestedProperty(P,X).get();if(ie=(ie=P.type==="date"?u.dfltRange(P.calendar):N==="y"?A.DFLTRANGEY:P._name==="realaxis"?[0,1]:Y.dfltRange||A.DFLTRANGEX).slice(),P.rangemode!=="tozero"&&P.rangemode!=="nonnegative"||(ie[0]=0),le&&le.length===2){var se=le[0]===null,he=le[1]===null;for(P.type!=="date"||P.autorange||(le[0]=u.cleanDate(le[0],w,P.calendar),le[1]=u.cleanDate(le[1],w,P.calendar)),re=0;re<2;re++)if(P.type==="date"){if(!u.isDateTime(le[re],P.calendar)){P[X]=ie;break}if(P.r2l(le[0])===P.r2l(le[1])){var _e=u.constrain(P.r2l(le[0]),u.MIN_MS+1e3,u.MAX_MS-1e3);le[0]=P.l2r(_e-1e3),le[1]=P.l2r(_e+1e3);break}}else{if(!d(le[re])){if(se||he||!d(le[1-re])){P[X]=ie;break}le[re]=le[1-re]*(re?10:.1)}if(le[re]<-b?le[re]=-b:le[re]>b&&(le[re]=b),le[0]===le[1]){var Me=Math.max(1,Math.abs(1e-6*le[0]));le[0]-=Me,le[1]+=Me}}}else u.nestedProperty(P,X).set(ie)},P.setScale=function(X){var Y=z._size;if(P.overlaying){var re=C.getFromId({_fullLayout:z},P.overlaying);P.domain=re.domain}var ie=X&&P._r?"_r":"range",le=P.calendar;P.cleanRange(ie);var se,he,_e=P.r2l(P[ie][0],le),Me=P.r2l(P[ie][1],le),Ce=N==="y";if(Ce?(P._offset=Y.t+(1-P.domain[1])*Y.h,P._length=Y.h*(P.domain[1]-P.domain[0]),P._m=P._length/(_e-Me),P._b=-P._m*Me):(P._offset=Y.l+P.domain[0]*Y.w,P._length=Y.w*(P.domain[1]-P.domain[0]),P._m=P._length/(Me-_e),P._b=-P._m*_e),P._rangebreaks=[],P._lBreaks=0,P._m2=0,P._B=[],P.rangebreaks&&(P._rangebreaks=P.locateBreaks(Math.min(_e,Me),Math.max(_e,Me)),P._rangebreaks.length)){for(se=0;seMe&&(Se=!Se),Se&&P._rangebreaks.reverse();var ce=Se?-1:1;for(P._m2=ce*P._length/(Math.abs(Me-_e)-P._lBreaks),P._B.push(-P._m2*(Ce?Me:_e)),se=0;seie&&(ie+=7,leie&&(ie+=24,le=re&&le=re&&X=Pe.min&&(gePe.max&&(Pe.max=be),we=!1)}we&&he.push({min:ge,max:be})}};for(re=0;re<_e.length;re++){var Ce=_e[re];if(Ce.enabled)if(Ce.bounds){var Se=X,ce=Y;Ce.pattern&&(Se=Math.floor(Se)),le=(ie=u.simpleMap(Ce.bounds,Ce.pattern?p:P.r2l))[0],se=ie[1];var ye,V,ne=new Date(Se);switch(Ce.pattern){case O:V=x,ye=(se-le+(sem.duration?(function(){for(var D={},O=0;O rect").call(f.setTranslate,0,0).call(f.setScale,1,1),S.plot.call(f.setTranslate,M._offset,C._offset).call(f.setScale,1,1);var A=S.plot.selectAll(".scatterlayer .trace");A.selectAll(".point").call(f.setPointGroupScale,1,1),A.selectAll(".textpoint").call(f.setTextPointsScale,1,1),A.call(f.hideOutsideRangePoints,S)}function T(S,M){var C=S.plotinfo,A=C.xaxis,D=C.yaxis,O=A._length,R=D._length,$=!!S.xr1,P=!!S.yr1,z=[];if($){var B=u.simpleMap(S.xr0,A.r2l),N=u.simpleMap(S.xr1,A.r2l),j=B[1]-B[0],F=N[1]-N[0];z[0]=(B[0]*(1-M)+M*N[0]-B[0])/(B[1]-B[0])*O,z[2]=O*(1-M+M*F/j),A.range[0]=A.l2r(B[0]*(1-M)+M*N[0]),A.range[1]=A.l2r(B[1]*(1-M)+M*N[1])}else z[0]=0,z[2]=O;if(P){var E=u.simpleMap(S.yr0,D.r2l),W=u.simpleMap(S.yr1,D.r2l),H=E[1]-E[0],L=W[1]-W[0];z[1]=(E[1]*(1-M)+M*W[1]-E[1])/(E[0]-E[1])*R,z[3]=R*(1-M+M*L/H),D.range[0]=A.l2r(E[0]*(1-M)+M*W[0]),D.range[1]=D.l2r(E[1]*(1-M)+M*W[1])}else z[1]=0,z[3]=R;d.drawOne(p,A,{skipTitle:!0}),d.drawOne(p,D,{skipTitle:!0}),d.redrawComponents(p,[A._id,D._id]);var q=$?O/z[2]:1,U=P?R/z[3]:1,J=$?z[0]:0,te=P?z[1]:0,ee=$?z[0]/z[2]*O:0,K=P?z[1]/z[3]*R:0,Q=A._offset-ee,G=D._offset-K;C.clipRect.call(f.setTranslate,J,te).call(f.setScale,1/q,1/U),C.plot.call(f.setTranslate,Q,G).call(f.setScale,q,U),f.setPointGroupScale(C.zoomScalePts,1/q,1/U),f.setTextPointsScale(C.zoomScaleTxt,1/q,1/U)}d.redrawComponents(p)}},951:function(o,a,n){var l=n(73972).traceIs,c=n(4322);function u(d){return{v:"x",h:"y"}[d.orientation||"v"]}function f(d,p){var h=u(d),m=l(d,"box-violin"),y=l(d._fullInput||{},"candlestick");return m&&!y&&p===h&&d[h]===void 0&&d[h+"0"]===void 0}o.exports=function(d,p,h,m){h("autotypenumbers",m.autotypenumbersDflt),h("type",(m.splomStash||{}).type)==="-"&&(function(y,v){if(y.type==="-"){var g,b=y._id,w=b.charAt(0);b.indexOf("scene")!==-1&&(b=w);var _=function(D,O,R){for(var $=0;$0&&(P["_"+R+"axes"]||{})[O]||(P[R+"axis"]||R)===O&&(f(P,R)||(P[R]||[]).length||P[R+"0"]))return P}}(v,b,w);if(_)if(_.type!=="histogram"||w!=={v:"y",h:"x"}[_.orientation||"v"]){var x=w+"calendar",k=_[x],T={noMultiCategory:!l(_,"cartesian")||l(_,"noMultiCategory")};if(_.type==="box"&&_._hasPreCompStats&&w==={h:"x",v:"y"}[_.orientation||"v"]&&(T.noMultiCategory=!0),T.autotypenumbers=y.autotypenumbers,f(_,w)){var S=u(_),M=[];for(g=0;g0?".":"")+g;c.isPlainObject(b)?p(b,m,w,v+1):m(w,g,b)}})}a.manageCommandObserver=function(h,m,y,v){var g={},b=!0;m&&m._commandObserver&&(g=m._commandObserver),g.cache||(g.cache={}),g.lookupTable={};var w=a.hasSimpleAPICommandBindings(h,y,g.lookupTable);if(m&&m._commandObserver){if(w)return g;if(m._commandObserver.remove)return m._commandObserver.remove(),m._commandObserver=null,g}if(w){u(h,w,g.cache),g.check=function(){if(b){var k=u(h,w,g.cache);return k.changed&&v&&g.lookupTable[k.value]!==void 0&&(g.disable(),Promise.resolve(v({value:k.value,type:w.type,prop:w.prop,traces:w.traces,index:g.lookupTable[k.value]})).then(g.enable,g.enable)),k.changed}};for(var _=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],x=0;x<_.length;x++)h._internalOn(_[x],g.check);g.remove=function(){for(var k=0;k<_.length;k++)h._removeInternalListener(_[k],g.check)}}else c.log("Unable to automatically bind plot updates to API command"),g.lookupTable={},g.remove=function(){};return g.disable=function(){b=!1},g.enable=function(){b=!0},m&&(m._commandObserver=g),g},a.hasSimpleAPICommandBindings=function(h,m,y){var v,g,b=m.length;for(v=0;v=q.width-20?(te["text-anchor"]="start",te.x=5):(te["text-anchor"]="end",te.x=q._paper.attr("width")-7),U.attr(te);var ee=U.select(".js-link-to-tool"),K=U.select(".js-link-spacer"),Q=U.select(".js-sourcelinks");L._context.showSources&&L._context.showSources(L),L._context.showLink&&function(G,X){X.text("");var Y=X.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(G._context.linkText+" "+String.fromCharCode(187));if(G._context.sendData)Y.on("click",function(){M.sendDataToCloud(G)});else{var re=window.location.pathname.split("/"),ie=window.location.search;Y.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+re[2].split(".")[0]+"/"+re[1]+ie})}}(L,ee),K.text(ee.text()&&Q.text()?" - ":"")}},M.sendDataToCloud=function(L){var q=(window.PLOTLYENV||{}).BASE_URL||L._context.plotlyServerURL;if(q){L.emit("plotly_beforeexport");var U=l.select(L).append("div").attr("id","hiddenform").style("display","none"),J=U.append("form").attr({action:q+"/external",method:"post",target:"_blank"});return J.append("input").attr({type:"text",name:"data"}).node().value=M.graphJson(L,!1,"keepdata"),J.node().submit(),U.remove(),L.emit("plotly_afterexport"),!1}};var D=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],O=["year","month","dayMonth","dayMonthYear"];function R(L,q){var U=L._context.locale;U||(U="en-US");var J=!1,te={};function ee(re){for(var ie=!0,le=0;le1&&V.length>1){for(d.getComponentMethod("grid","sizeDefaults")(K,ee),te=0;te15&&V.length>15&&ee.shapes.length===0&&ee.images.length===0,M.linkSubplots(G,ee,Q,J),M.cleanPlot(G,ee,Q,J);var ge=!(!J._has||!J._has("gl2d")),be=!(!ee._has||!ee._has("gl2d")),we=!(!J._has||!J._has("cartesian"))||ge,ke=!(!ee._has||!ee._has("cartesian"))||be;we&&!ke?J._bgLayer.remove():ke&&!we&&(ee._shouldCreateBgLayer=!0),J._zoomlayer&&!L._dragging&&b({_fullLayout:J}),function(Le,Fe){var Be,Ue=[];Fe.meta&&(Be=Fe._meta={meta:Fe.meta,layout:{meta:Fe.meta}});for(var qe=0;qe0){var X=1-2*K;J=Math.round(X*J),te=Math.round(X*te)}}var Y=M.layoutAttributes.width.min,re=M.layoutAttributes.height.min;J