package.dist.plotly-finance.min.js Maven / Gradle / Ivy
Show all versions of plotly.js Show documentation
/**
* plotly.js (finance - minified) v2.34.0
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
/*! For license information please see plotly-finance.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Plotly=t():e.Plotly=t()}(self,(function(){return function(){var e={9288:function(e,t,r){"use strict";var n=r(3400),a={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},6712:function(e,t,r){"use strict";e.exports=r(1843)},7240:function(e,t,r){"use strict";e.exports=r(1132)},6144:function(e,t,r){"use strict";e.exports=r(7776)},3219:function(e,t,r){"use strict";e.exports=r(1712)},2016:function(e,t,r){"use strict";e.exports=r(4884)},5556:function(e,t,r){"use strict";e.exports=r(6744)},9204:function(e,t,r){"use strict";e.exports=r(4704)},3996:function(e,t,r){"use strict";e.exports=r(2396)},6489:function(e,t,r){"use strict";e.exports=r(2028)},3992:function(e,t,r){"use strict";e.exports=r(2600)},7040:function(e,t,r){"use strict";var n=r(2016);n.register([r(7240),r(3992),r(9204),r(716),r(260),r(3996),r(3920),r(6152),r(3219),r(6712),r(5556),r(6489),r(7312),r(6144)]),e.exports=n},3920:function(e,t,r){"use strict";e.exports=r(3480)},6152:function(e,t,r){"use strict";e.exports=r(3075)},260:function(e,t,r){"use strict";e.exports=r(5792)},7312:function(e,t,r){"use strict";e.exports=r(6272)},716:function(e,t,r){"use strict";e.exports=r(5952)},2196:function(e){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},3916:function(e,t,r){"use strict";var n=r(2196),a=r(5376),i=r(3816),o=r(1780).templatedArray;r(6208),e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},272:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(6196).draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=a.getFromId(e,t.xref),n=a.getFromId(e,t.yref),i=a.getRefType(t.xref),o=a.getRefType(t.yref);t._extremes={},"range"===i&&l(t,r),"range"===o&&l(t,n)}))}function l(e,t){var r,n=t._id,i=n.charAt(0),o=e[i],l=e["a"+i],s=e[i+"ref"],c=e["a"+i+"ref"],u=e["_"+i+"padplus"],f=e["_"+i+"padminus"],d={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,p=h+d,v=h-d,y=3*e.startarrowsize*e.arrowwidth||0,g=y+d,m=y-d;if(c===s){var x=a.findExtremes(t,[t.r2c(o)],{ppadplus:p,ppadminus:v}),b=a.findExtremes(t,[t.r2c(l)],{ppadplus:Math.max(u,g),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else g=l?g+l:g,m=l?m-l:m,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,p,g),ppadminus:Math.max(f,v,m)});e._extremes[n]=r}e.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,o],e)}},2300:function(e,t,r){"use strict";var n=r(3400),a=r(4040),i=r(1780).arrayEditor;function o(e,t){var r,n,a,i,o,s,c,u=e._fullLayout.annotations,f=[],d=[],h=[],p=(t||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var r,l,s=o(e,t),c=s.on,u=s.off.concat(s.explicitOff),f={},d=e._fullLayout.annotations;if(c.length||u.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var Z=!1,W=["x","y"],X=0;X1)&&(ne===re?((he=ae.r2fraction(t["a"+te]))<0||he>1)&&(Z=!0):Z=!0),J=ae._offset+ae.r2p(t[te]),$=.5}else{var pe="domain"===de;"x"===te?(Q=t[te],J=pe?ae._offset+ae._length*Q:J=T.l+T.w*Q):(Q=1-t[te],J=pe?ae._offset+ae._length*Q:J=T.t+T.h*Q),$=t.showarrow?.5:Q}if(t.showarrow){fe.head=J;var ve=t["a"+te];if(ee=oe*U(.5,t.xanchor)-le*U(.5,t.yanchor),ne===re){var ye=s.getRefType(ne);"domain"===ye?("y"===te&&(ve=1-ve),fe.tail=ae._offset+ae._length*ve):"paper"===ye?"y"===te?(ve=1-ve,fe.tail=T.t+T.h*ve):fe.tail=T.l+T.w*ve:fe.tail=ae._offset+ae.r2p(ve),K=ee}else fe.tail=J+ve,K=ee+ve;fe.text=fe.tail+ee;var ge=w["x"===te?"width":"height"];if("paper"===re&&(fe.head=o.constrain(fe.head,1,ge-1)),"pixel"===ne){var me=-Math.max(fe.tail-3,fe.text),xe=Math.min(fe.tail+3,fe.text)-ge;me>0?(fe.tail+=me,fe.text+=me):xe>0&&(fe.tail-=xe,fe.text-=xe)}fe.tail+=ue,fe.head+=ue}else K=ee=se*U($,ce),fe.text=J+ee;fe.text+=ue,ee+=ue,K+=ue,t["_"+te+"padplus"]=se/2+K,t["_"+te+"padminus"]=se/2-K,t["_"+te+"size"]=se,t["_"+te+"shift"]=ee}if(Z)R.remove();else{var be=0,_e=0;if("left"!==t.align&&(be=(k-b)*("center"===t.align?.5:1)),"top"!==t.valign&&(_e=(N-_)*("middle"===t.valign?.5:1)),f)n.select("svg").attr({x:B+be-1,y:B+_e}).call(u.setClipUrl,j?O:null,e);else{var we=B+_e-v.top,Te=B+be-v.left;G.call(d.positionText,Te,we).call(u.setClipUrl,j?O:null,e)}Y.select("rect").call(u.setRect,B,B,k,N),H.call(u.setRect,F/2,F/2,E-F,V-F),R.call(u.setTranslate,Math.round(D.x.text-E/2),Math.round(D.y.text-V/2)),I.attr({transform:"rotate("+C+","+D.x.text+","+D.y.text+")"});var Me,ke=function(r,n){P.selectAll(".annotation-arrow-g").remove();var s=D.x.head,f=D.y.head,d=D.x.tail+r,h=D.y.tail+n,v=D.x.text+r,b=D.y.text+n,_=o.rotationXYMatrix(C,v,b),w=o.apply2DTransform(_),k=o.apply2DTransform2(_),O=+H.attr("width"),z=+H.attr("height"),N=v-.5*O,F=N+O,E=b-.5*z,B=E+z,j=[[N,E,N,B],[N,B,F,B],[F,B,F,E],[F,E,N,E]].map(k);if(!j.reduce((function(e,t){return e^!!o.segmentsIntersect(s,f,s+1e6,f+1e6,t[0],t[1],t[2],t[3])}),!1)){j.forEach((function(e){var t=o.segmentsIntersect(d,h,s,f,e[0],e[1],e[2],e[3]);t&&(d=t.x,h=t.y)}));var Y=t.arrowwidth,V=t.arrowcolor,U=t.arrowside,G=P.append("g").style({opacity:c.opacity(V)}).classed("annotation-arrow-g",!0),q=G.append("path").attr("d","M"+d+","+h+"L"+s+","+f).style("stroke-width",Y+"px").call(c.stroke,c.rgb(V));if(y(q,U,t),M.annotationPosition&&q.node().parentNode&&!i){var Z=s,W=f;if(t.standoff){var X=Math.sqrt(Math.pow(s-d,2)+Math.pow(f-h,2));Z+=t.standoff*(d-s)/X,W+=t.standoff*(h-f)/X}var J,K,Q=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(d-Z)+","+(h-W),transform:l(Z,W)}).style("stroke-width",Y+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");p.init({element:Q.node(),gd:e,prepFn:function(){var e=u.getTranslate(R);J=e.x,K=e.y,g&&g.autorange&&A(g._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var n=w(J,K),a=n[0]+e,i=n[1]+r;R.call(u.setTranslate,a,i),L("x",m(g,e,"x",T,t)),L("y",m(x,r,"y",T,t)),t.axref===t.xref&&L("ax",m(g,e,"ax",T,t)),t.ayref===t.yref&&L("ay",m(x,r,"ay",T,t)),G.attr("transform",l(e,r)),I.attr({transform:"rotate("+C+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&ke(0,0),z&&p.init({element:R.node(),gd:e,prepFn:function(){Me=I.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?L("ax",m(g,e,"ax",T,t)):L("ax",t.ax+e),t.ayref===t.yref?L("ay",m(x,r,"ay",T.w,t)):L("ay",t.ay+r),ke(e,r);else{if(i)return;var a,o;if(g)a=m(g,e,"x",T,t);else{var s=t._xsize/T.w,c=t.x+(t._xshift-t.xshift)/T.w-s/2;a=p.align(c+e/T.w,s,0,1,t.xanchor)}if(x)o=m(x,r,"y",T,t);else{var u=t._ysize/T.h,f=t.y-(t._yshift+t.yshift)/T.h-u/2;o=p.align(f-r/T.h,u,0,1,t.yanchor)}L("x",a),L("y",o),g&&x||(n=p.getCursor(g?.5:a,x?.5:o,t.xanchor,t.yanchor))}I.attr({transform:l(e,r)+Me}),h(R,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",q(n))},doneFn:function(){h(R),a.call("_guiRelayout",e,S());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}e.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*y+r.standoff,_=v.backoff*g+r.startstandoff;if("line"===h.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=o.x-u.x,T=o.y-u.y;if(d=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var M=b*Math.cos(f),k=b*Math.sin(f);u.x+=M,u.y+=k,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var A=_*Math.cos(f),L=_*Math.sin(f);o.x-=A,o.y-=L,e.attr({x1:o.x,y1:o.y})}}else if("path"===h.nodeName){var S=h.getTotalLength(),O="";if(S1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+l+'"]').remove():(s._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(s.x)*r[0],t.yaxis.r2l(s.y)*r[1],t.zaxis.r2l(s.z)*r[2]]),n(e.graphDiv,s,l,e.id,s._xa,s._ya))}}},6864:function(e,t,r){"use strict";var n=r(4040),a=r(3400);e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(5899)}}},layoutAttributes:r(5899),handleDefaults:r(2808),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(e),l=0;l=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var l=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+l+", "+n[3]+")":"rgb("+l+")"}o.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},o.rgb=function(e){return o.tinyRGB(n(e))},o.opacity=function(e){return e?n(e).getAlpha():0},o.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},o.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||c).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(e,t,r){var a=n(e).toRgb(),i=n(t).toRgb(),o={r:r*a.r+(1-r)*i.r,g:r*a.g+(1-r)*i.g,b:r*a.b+(1-r)*i.b};return n(o).toRgbString()},o.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(o.combine(e,c))),(a.isDark()?t?a.lighten(t):c:r?a.darken(r):s).toString()},o.stroke=function(e,t){var r=n(t);e.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(e,t){var r=n(t);e.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,l=Object.keys(e);for(t=0;t0?n>=s:n<=s));a++)n>u&&n0?n>=s:n<=s));a++)n>r[0]&&n1){var he=Math.pow(10,Math.floor(Math.log(de)/Math.LN10));ue*=he*c.roundUp(de/he,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(se.tick0=0)}se.dtick=ue}se.domain=o?[oe+P/E.h,oe+$-P/E.h]:[oe+C/E.w,oe+$-C/E.w],se.setScale(),e.attr("transform",u(Math.round(E.l),Math.round(E.t)));var pe,ve=e.select("."+k.cbtitleunshift).attr("transform",u(-Math.round(E.l),-Math.round(E.t))),ye=se.ticklabelposition,ge=se.title.font.size,me=e.select("."+k.cbaxis),xe=0,be=0;function _e(n,a){var i={propContainer:se,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+k.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){var e,t;(o&&ce||!o&&!ce)&&("top"===Y&&(e=C+E.l+ee*I,t=P+E.t+te*(1-oe-$)+3+.75*ge),"bottom"===Y&&(e=C+E.l+ee*I,t=P+E.t+te*(1-oe)-3-.25*ge),"right"===Y&&(t=P+E.t+te*z+3+.75*ge,e=C+E.l+ee*oe),_e(se._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ce||o&&ce){var i,s=e.select("."+k.cbtitle),f=s.select("text"),d=[-A/2,A/2],p=s.select(".h"+se._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),p?(i=h.bBox(p),be=i.width,(xe=i.height)>v&&(d[1]-=(xe-v)/2)):f.node()&&!f.classed(k.jsPlaceholder)&&(i=h.bBox(f.node()),be=i.width,xe=i.height),o){if(xe){if(xe+=5,"top"===Y)se.domain[1]-=xe/E.h,d[1]*=-1;else{se.domain[0]+=xe/E.h;var g=y.lineCount(f);d[1]+=(1-g)*v}s.attr("transform",u(d[0],d[1])),se.setScale()}}else be&&("right"===Y&&(se.domain[0]+=(be+ge/2)/E.w),s.attr("transform",u(d[0],d[1])),se.setScale())}e.selectAll("."+k.cbfills+",."+k.cblines).attr("transform",o?u(0,Math.round(E.h*(1-se.domain[1]))):u(Math.round(E.w*se.domain[0]),0)),me.attr("transform",o?u(0,Math.round(-E.t)):u(Math.round(-E.l),0));var m=e.select("."+k.cbfills).selectAll("rect."+k.cbfill).attr("style","").data(W);m.enter().append("rect").classed(k.cbfill,!0).attr("style",""),m.exit().remove();var x=V.map(se.c2p).map(Math.round).sort((function(e,t){return e-t}));m.each((function(e,i){var l=[0===i?V[0]:(W[i]+W[i-1])/2,i===W.length-1?V[1]:(W[i]+W[i+1])/2].map(se.c2p).map(Math.round);o&&(l[1]=c.constrain(l[1]+(l[1]>l[0])?1:-1,x[0],x[1]));var s=n.select(this).attr(o?"x":"y",re).attr(o?"y":"x",n.min(l)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(n.max(l)-n.min(l),2));if(t._fillgradient)h.gradient(s,r,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=G(e).replace("e-","");s.attr("fill",a(u).toHexString())}}));var b=e.select("."+k.cblines).selectAll("path."+k.cbline).data(H.color&&H.width?X:[]);b.enter().append("path").classed(k.cbline,!0),b.exit().remove(),b.each((function(e){var t=re,r=Math.round(se.c2p(e))+H.width/2%1;n.select(this).attr("d","M"+(o?t+","+r:r+","+t)+(o?"h":"v")+J).call(h.lineGroupStyle,H.width,U(e),H.dash)})),me.selectAll("g."+se._id+"tick,path").remove();var _=re+J+(A||0)/2-("outside"===t.ticks?1:0),T=l.calcTicks(se),M=l.getTickSigns(se)[2];return l.drawTicks(r,se,{vals:"inside"===se.ticks?l.clipEnds(se,T):T,layer:me,path:l.makeTickPath(se,_,M),transFn:l.makeTransTickFn(se)}),l.drawLabels(r,se,{vals:T,layer:me,transFn:l.makeTransTickLabelFn(se),labelFns:l.makeLabelFns(se,_)})},function(){if(o&&!ce||!o&&ce){var e,a,i=se.position||0,l=se._offset+se._length/2;if("right"===Y)a=l,e=E.l+ee*i+10+ge*(se.showticklabels?1:.5);else if(e=l,"bottom"===Y&&(a=E.t+te*i+10+(-1===ye.indexOf("inside")?se.tickfont.size:0)+("intside"!==se.ticks&&t.ticklen||0)),"top"===Y){var s=j.text.split("
").length;a=E.t+te*i+10-J-w*ge*s}_e((o?"h":"v")+se._id+"title",{avoid:{selection:n.select(r).selectAll("g."+se._id+"tick"),side:Y,offsetTop:o?0:E.t,offsetLeft:o?E.l:0,maxShift:o?F.width:F.height},attributes:{x:e,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var n,l=J+A/2;-1===ye.indexOf("inside")&&(n=h.bBox(me.node()),l+=o?n.width:n.height),pe=ve.select("text");var c=0,f=o&&"top"===Y,v=!o&&"right"===Y,y=0;if(pe.node()&&!pe.classed(k.jsPlaceholder)){var m,x=ve.select(".h"+se._id+"title-math-group").node();x&&(o&&ce||!o&&!ce)?(c=(n=h.bBox(x)).width,m=n.height):(c=(n=h.bBox(ve.node())).right-E.l-(o?re:le),m=n.bottom-E.t-(o?le:re),o||"top"!==Y||(l+=n.height,y=n.height)),v&&(pe.attr("transform",u(c/2+ge/2,0)),c*=2),l=Math.max(l,o?c:m)}var b=2*(o?C:P)+l+L+A/2,w=0;!o&&j.text&&"bottom"===D&&z<=0&&(b+=w=b/2,y+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=y;var B=L+A,H=(o?re:le)-B/2-(o?C:0),V=(o?le:re)-(o?Q:P+y-w);e.select("."+k.cbbg).attr("x",H).attr("y",V).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(Q+B,2)).call(p.fill,S).call(p.stroke,t.bordercolor).style("stroke-width",L);var U=v?Math.max(c-10,0):0;e.selectAll("."+k.cboutline).attr("x",(o?re:le+C)+U).attr("y",(o?le+P-Q:re)+(f?xe:0)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(Q-(o?2*P+xe:2*C+U),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":A});var G=o?ne*b:0,q=o?0:(1-ae)*b-y;if(G=R?E.l-G:-G,q=N?E.t-q:-q,e.attr("transform",u(G,q)),!o&&(L||a(S).getAlpha()&&!a.equals(F.paper_bgcolor,S))){var Z=me.selectAll("text"),W=Z[0].length,X=e.select("."+k.cbbg).node(),K=h.bBox(X),$=h.getTranslate(e);Z.each((function(e,t){var r=W-1;if(0===t||t===r){var n,a=h.bBox(this),i=h.getTranslate(this);if(t===r){var o=a.right+i.x;(n=K.right+$.x+le-L-2+I-o)>0&&(n=0)}else if(0===t){var l=a.left+i.x;(n=K.left+$.x+le+L+2-l)<0&&(n=0)}n&&(W<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var ee={},te=T[O],ie=M[O],oe=T[D],ue=M[D],fe=b-J;o?("pixels"===d?(ee.y=z,ee.t=Q*oe,ee.b=Q*ue):(ee.t=ee.b=0,ee.yt=z+s*oe,ee.yb=z-s*ue),"pixels"===_?(ee.x=I,ee.l=b*te,ee.r=b*ie):(ee.l=fe*te,ee.r=fe*ie,ee.xl=I-g*te,ee.xr=I+g*ie)):("pixels"===d?(ee.x=I,ee.l=Q*te,ee.r=Q*ie):(ee.l=ee.r=0,ee.xl=I+s*te,ee.xr=I-s*ie),"pixels"===_?(ee.y=1-z,ee.t=b*oe,ee.b=b*ue):(ee.t=fe*oe,ee.b=fe*ue,ee.yt=z-g*oe,ee.yb=z+g*ue));var de=t.y<.5?"b":"t",he=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var be={r:F.width-H-G,l:H+ee.r,b:F.height-V-q,t:V+ee.b};R&&N?i.autoMargin(r,t._id,ee):R?r._fullLayout._reservedMargin[t._id][de]=be[de]:N||o?r._fullLayout._reservedMargin[t._id][he]=be[he]:r._fullLayout._reservedMargin[t._id][de]=be[de]}],r)}(r,t,e);g&&g.then&&(e._promises||[]).push(g),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,l="v"===t.orientation,c=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,o){e.attr("transform",n+u(r,o)),a=s.align((l?t._uFrac:t._vFrac)+r/c.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),i=s.align((l?t._vFrac:1-t._uFrac)-o/c.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=s.getCursor(a,i,t.xanchor,t.yanchor);d(e,f)},doneFn:function(){if(d(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},553:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e){return n.isPlainObject(e.colorbar)}},5080:function(e,t,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:r(616),supplyDefaults:r(4013),draw:r(7848).draw,hasColorbar:r(553)}},9084:function(e,t,r){"use strict";var n=r(616),a=r(3756).counter,i=r(2996),o=r(8304).scales;function l(e){return"`"+e+"`"}i(o),e.exports=function(e,t){e=e||"";var r,i=(t=t||{}).cLetter||"c",s=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===i,u="string"==typeof t.colorscaleDflt?o[t.colorscaleDflt]:null,f=t.editTypeOverride||"",d=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):l(d+(r={z:"z",c:"color"}[i]));var h=i+"auto",p=i+"min",v=i+"max",y=i+"mid",g=(l(d+h),l(d+p),l(d+v),{});g[p]=g[v]=void 0;var m={};m[h]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},t.anim&&(x.color.anim=!0)),x[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},x[p]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},s||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),t.noColorAxis||(x.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),x}},7128:function(e,t,r){"use strict";var n=r(8248),a=r(3400),i=r(4288).extractOpts;e.exports=function(e,t,r){var o,l=e._fullLayout,s=r.vals,c=r.containerStr,u=c?a.nestedProperty(t,c).get():t,f=i(u),d=!1!==f.auto,h=f.min,p=f.max,v=f.mid,y=function(){return a.aggNums(Math.min,null,s)},g=function(){return a.aggNums(Math.max,null,s)};void 0===h?h=y():d&&(h=u._colorAx&&n(h)?Math.min(h,y()):y()),void 0===p?p=g():d&&(p=u._colorAx&&n(p)?Math.max(p,g()):g()),d&&void 0!==v&&(p-v>v-h?h=v-(p-v):p-v=0?l.colorscale.sequential:l.colorscale.sequentialminus,f._sync("colorscale",o))}},5504:function(e,t,r){"use strict";var n=r(3400),a=r(4288).hasColorscale,i=r(4288).extractOpts;e.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var l=i(o),s=l.auto;(s||void 0===l.min)&&r(o,a.min),(s||void 0===l.max)&&r(o,a.max),l.autocolorscale&&r(o,"colorscale")}}for(var l=0;l=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function p(e,t){t=t||{};for(var r=e.domain,o=e.range,s=o.length,c=new Array(s),u=0;u4/3-l?o:l}},7416:function(e,t,r){"use strict";var n=r(3400),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(e,t,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*t),0,2),a[t][e]}},2760:function(e,t){"use strict";t.selectMode=function(e){return"lasso"===e||"select"===e},t.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.openMode=function(e){return"drawline"===e||"drawopenpath"===e},t.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},t.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}},6476:function(e,t,r){"use strict";var n=r(9128),a=r(2264),i=r(9184),o=r(3400).removeElement,l=r(3816),s=e.exports={};s.align=r(8316),s.getCursor=r(7416);var c=r(2616);function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function f(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=c.wrapped,s.unhoverRaw=c.raw,s.init=function(e){var t,r,n,c,d,h,p,v,y=e.gd,g=1,m=y._context.doubleClickDelay,x=e.element;y._mouseDownTime||(y._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)m&&(g=Math.max(g-1,1)),y._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(g,h),!v){var r;try{r=new MouseEvent("click",t)}catch(e){var n=f(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}p.dispatchEvent(r)}y._dragging=!1,y._dragged=!1}else y._dragged=!1}},s.coverSlip=u},2616:function(e,t,r){"use strict";var n=r(5924),a=r(1200),i=r(2200).getGraphDiv,o=r(2456),l=e.exports={};l.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),l.raw(e,t,r)},l.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!e._dragged&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},8192:function(e,t){"use strict";t.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},t.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},3616:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=a.numberFormat,o=r(8248),l=r(9760),s=r(4040),c=r(6308),u=r(8932),f=a.strTranslate,d=r(2736),h=r(9616),p=r(4284).LINE_SPACING,v=r(3448).DESELECTDIM,y=r(3028),g=r(7152),m=r(624).appendArrayPointValue,x=e.exports={};function b(e){return"none"===e?void 0:e}x.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,l=t.family,s=t.shadow,u=t.lineposition,f=t.textcase;l&&e.style("font-family",l),o+1&&e.style("font-size",o+"px"),i&&e.call(c.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),f&&e.style("text-transform",b(function(e){return _[e]}(f))),s&&e.style("text-shadow","auto"===s?d.makeTextShadow(c.contrast(i)):b(s)),u&&e.style("text-decoration-line",b(function(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(u)))};var _={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=a&&x.getPatternAttr(a.shape,0,"");if(o){var l=x.getPatternAttr(a.bgcolor,0,null),s=x.getPatternAttr(a.fgcolor,0,null),u=a.fgopacity,f=x.getPatternAttr(a.size,0,8),d=x.getPatternAttr(a.solidity,0,.3),h=t.uid;x.pattern(e,"point",r,h,o,f,d,void 0,a.fillmode,l,s,u)}else if(i&&"none"!==i.type){var p,v,y=i.type,g="scatterfill-"+t.uid;n&&(g="legendfill-"+t.uid),n||void 0===i.start&&void 0===i.stop?("horizontal"===y&&(y+="reversed"),e.call(x.gradient,r,g,y,i.colorscale,"fill")):("horizontal"===y?(p={x:i.start,y:0},v={x:i.stop,y:0}):"vertical"===y&&(p={x:0,y:i.start},v={x:0,y:i.stop}),p.x=t._xA.c2p(void 0===p.x?t._extremes.x.min[0].val:p.x,!0),p.y=t._yA.c2p(void 0===p.y?t._extremes.y.min[0].val:p.y,!0),v.x=t._xA.c2p(void 0===v.x?t._extremes.x.max[0].val:v.x,!0),v.y=t._yA.c2p(void 0===v.y?t._extremes.y.max[0].val:v.y,!0),e.call(S,r,g,"linear",i.colorscale,"fill",p,v,!0,!1))}else t.fillcolor&&e.call(c.fill,t.fillcolor)}x.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},x.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},x.setRect=function(e,t,r,n,a){e.call(x.setPosition,t,r).call(x.setSize,n,a)},x.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);return!!(o(a)&&o(i)&&t.node())&&("text"===t.node().nodeName?t.attr("x",a).attr("y",i):t.attr("transform",f(a,i)),!0)},x.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);x.translatePoint(e,a,t,r)}))},x.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},x.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,o=i.xcalendar,l=i.ycalendar,c=s.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){x.hideOutsideRangePoint(e,n.select(this),r,a,o,l)}))}))}},x.crispRound=function(e,t,r){return t&&o(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},x.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";c.stroke(t,n||i.color),x.dashLine(t,l,o)},x.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(c.stroke,r||i.color).call(x.dashLine,l,o)}))},x.dashLine=function(e,t,r){r=+r||0,t=x.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},x.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},x.singleFillStyle=function(e,t){var r=n.select(e.node());w(e,((r.data()[0]||[])[0]||{}).trace||{},t,!1)},x.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each((function(e){var a=n.select(this);e[0].trace&&w(a,e[0].trace,t,r)}))};var T=r(1984);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(T).forEach((function(e){var t=T[e],r=t.n;x.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),x.symbolNames[r]=e,x.symbolFuncs[r]=t.f,x.symbolBackOffs[r]=t.backoff||0,t.needLine&&(x.symbolNeedLines[r]=!0),t.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(x.symbolNoFill[r]=!0)}));var M=x.symbolNames.length;function k(e,t,r,n){var a=e%100;return x.symbolFuncs[a](t,r,n)+(e>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(e){if(o(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=x.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=M||e>=400?0:Math.floor(Math.max(e,0))};var A=i("~f"),L={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function S(e,t,r,i,o,s,u,f,d,h){var p,v=o.length;"linear"===i?p={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:f.x,y2:f.y,gradientUnits:d?"userSpaceOnUse":"objectBoundingBox"},reversed:h}:"radial"===i&&(p={node:"radialGradient",reversed:h});for(var y=new Array(v),g=0;g=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?l.opacity:e.mo),n.ms2mrc){var u;u="various"===e.ms||"various"===l.size?3:n.ms2mrc(e.ms),e.mrc=u,n.selectedSizeFn&&(u=e.mrc=n.selectedSizeFn(e));var f=x.symbolNumber(e.mx||l.symbol)||0;e.om=f%200>=100;var d=ne(e,r),h=q(e,r);t.attr("d",k(f,u,d,h))}var p,v,y,g=!1;if(e.so)y=s.outlierwidth,v=s.outliercolor,p=l.outliercolor;else{var m=(s||{}).width;y=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,v="mlc"in e?e.mlcc=n.lineScale(e.mlc):a.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,a.isArrayOrTypedArray(l.color)&&(p=c.defaultLine,g=!0),p="mc"in e?e.mcc=n.markerScale(e.mc):l.color||l.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(e))}if(e.om)t.call(c.stroke,p).style({"stroke-width":(y||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:y)+"px");var b=l.gradient,_=e.mgt;_?g=!0:_=b&&b.type,a.isArrayOrTypedArray(_)&&(_=_[0],L[_]||(_=0));var w=l.pattern,T=w&&x.getPatternAttr(w.shape,e.i,"");if(_&&"none"!==_){var M=e.mgc;M?g=!0:M=b.color;var A=r.uid;g&&(A+="-"+e.i),x.gradient(t,i,A,_,[[0,M],[1,p]],"fill")}else if(T){var S=!1,O=w.fgcolor;!O&&o&&o.color&&(O=o.color,S=!0);var D=x.getPatternAttr(O,e.i,o&&o.color||null),C=x.getPatternAttr(w.bgcolor,e.i,null),P=w.fgopacity,I=x.getPatternAttr(w.size,e.i,8),z=x.getPatternAttr(w.solidity,e.i,.3);S=S||e.mcc||a.isArrayOrTypedArray(w.shape)||a.isArrayOrTypedArray(w.bgcolor)||a.isArrayOrTypedArray(w.fgcolor)||a.isArrayOrTypedArray(w.size)||a.isArrayOrTypedArray(w.solidity);var N=r.uid;S&&(N+="-"+e.i),x.pattern(t,"point",i,N,T,I,z,e.mcc,w.fillmode,C,D,P)}else a.isArrayOrTypedArray(p)?c.fill(t,p[e.i]):c.fill(t,p);y&&c.stroke(t,v)}},x.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=x.tryColorscale(r,""),t.lineScale=x.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=y.isBubble(e)?g(e):function(){return(r.size||6)/2}),e.selectedpoints&&a.extendFlat(t,x.makeSelectedPointStyleFns(e)),t},x.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},o=r.marker||{},l=n.marker||{},c=i.opacity,u=o.opacity,f=l.opacity,d=void 0!==u,h=void 0!==f;(a.isArrayOrTypedArray(c)||d||h)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?d?u:t:h?f:v*t});var p=i.color,y=o.color,g=l.color;(y||g)&&(t.selectedColorFn=function(e){var t=e.mcc||p;return e.selected?y||t:g||t});var m=i.size,x=o.size,b=l.size,_=void 0!==x,w=void 0!==b;return s.traceIs(e,"symbols")&&(_||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||m/2;return e.selected?_?x/2:t:w?b/2:t}),t},x.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,s=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?s||t:u||(s?t:c.addOpacity(t,v))},t},x.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){c.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,n){var i=n.mx||a.symbol||0,o=r.selectedSizeFn(n);e.attr("d",k(x.symbolNumber(i),o,ne(n,t),q(n,t))),n.mrc2=o})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r0?r:0}function z(e,t,r){return r&&(e=H(e)),t?R(e[1]):N(e[0])}function N(e){var t=n.round(e,2);return O=t,t}function R(e){var t=n.round(e,2);return D=t,t}function F(e,t,r,n){var a=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],l=r[1]-t[1],s=Math.pow(a*a+i*i,.25),c=Math.pow(o*o+l*l,.25),u=(c*c*a-s*s*o)*n,f=(c*c*i-s*s*l)*n,d=3*c*(s+c),h=3*s*(s+c);return[[N(t[0]+(d&&u/d)),R(t[1]+(d&&f/d))],[N(t[0]-(h&&u/h)),R(t[1]-(h&&f/h))]]}x.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var o=x.makeSelectedTextStyleFns(t);i=o.selectedTextColorFn}var l=t.texttemplate,s=r._fullLayout;e.each((function(e){var o=n.select(this),c=l?a.extractOption(e,t,"txt","texttemplate"):a.extractOption(e,t,"tx","text");if(c||0===c){if(l){var u=t._module.formatLabels,f=u?u(e,t,s):{},h={};m(h,t,e.i);var p=t._meta||{};c=a.texttemplateString(c,f,s._d3locale,h,e,p)}var v=e.tp||t.textposition,y=I(e,t),g=i?i(e):e.tc||t.textfont.color;o.call(x.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:y,color:g}).text(c).call(d.convertToTspans,r).call(P,v,y,e.mrc)}else o.remove()}))}},x.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=x.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=I(e,t);c.fill(a,i);var u=s.traceIs(t,"bar-like");P(a,o,l,e.mrc2||e.mrc,u)}))}},x.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r=c||w>=f&&w<=c)&&(T<=d&&T>=u||T>=d&&T<=u)&&(e=[w,T])}return e}x.steps=function(e){var t=E[e]||B;return function(e){for(var r="M"+N(e[0][0])+","+R(e[0][1]),n=e.length,a=1;a=1e4&&(x.savedBBoxes={},j=0),r&&(x.savedBBoxes[r]=y),j++,a.extendFlat({},y)},x.setClipUrl=function(e,t,r){e.attr("clip-path",V(t,r))},x.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},x.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=f(t,r)).trim(),e[a]("transform",i),i},x.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},x.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+="scale("+t+","+r+")").trim(),e[a]("transform",i),i};var U=/\s*sc.*/;x.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(U,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var G=/translate\([^)]*\)\s*$/;function q(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}x.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),l=parseFloat(i.attr("y")||0),s=(a.attr("transform")||"").match(G);e=1===t&&1===r?[]:[f(o,l),"scale("+t+","+r+")",f(-o,-l)],s&&e.push(s),a.attr("transform",e.join(""))}}))},x.getMarkerStandoff=q;var Z,W,X,J,K,Q,$=Math.atan2,ee=Math.cos,te=Math.sin;function re(e,t){var r=t[0],n=t[1];return[r*ee(e)-n*te(e),r*te(e)+n*ee(e)]}function ne(e,t){var r,n,i=e.ma;void 0===i&&((i=t.marker.angle)&&!a.isArrayOrTypedArray(i)||(i=0));var l=t.marker.angleref;if("previous"===l||"north"===l){if(t._geo){var s=t._geo.project(e.lonlat);r=s[0],n=s[1]}else{var c=t._xA,u=t._yA;if(!c||!u)return 90;r=c.c2p(e.x),n=u.c2p(e.y)}if(t._geo){var f,d=e.lonlat[0],h=e.lonlat[1],p=t._geo.project([d,h+1e-5]),v=t._geo.project([d+1e-5,h]),y=$(v[1]-n,v[0]-r),g=$(p[1]-n,p[0]-r);if("north"===l)f=i/180*Math.PI;else if("previous"===l){var m=d/180*Math.PI,x=h/180*Math.PI,b=Z/180*Math.PI,_=W/180*Math.PI,w=b-m,T=ee(_)*te(w),M=te(_)*ee(x)-ee(_)*te(x)*ee(w);f=-$(T,M)-Math.PI,Z=d,W=h}var k=re(y,[ee(f),0]),A=re(g,[te(f),0]);i=$(k[1]+A[1],k[0]+A[0])/Math.PI*180,"previous"!==l||Q===t.uid&&e.i===K+1||(i=null)}if("previous"===l&&!t._geo)if(Q===t.uid&&e.i===K+1&&o(r)&&o(n)){var L=r-X,S=n-J,O=t.line&&t.line.shape||"",D=O.slice(O.length-1);"h"===D&&(S=0),"v"===D&&(L=0),i+=$(S,L)/Math.PI*180+90}else i=null}return X=r,J=n,K=e.i,Q=t.uid,i}x.getMarkerAngle=ne},1984:function(e,t,r){"use strict";var n,a,i,o,l=r(9604),s=r(3428).round,c="M0,0Z",u=Math.sqrt(2),f=Math.sqrt(3),d=Math.PI,h=Math.cos,p=Math.sin;function v(e){return null===e}function y(e,t,r){if(!(e&&e%360!=0||t))return r;if(i===e&&o===t&&n===r)return a;function s(e,r){var n=h(e),a=p(e),i=r[0],o=r[1]+(t||0);return[i*n-o*a,i*a+o*n]}i=e,o=t,n=r;for(var c=e/180*d,u=0,f=0,v=l(r),y="",g=0;g0,f=e._context.staticPlot;t.each((function(t){var d,h=t[0].trace,p=h.error_x||{},v=h.error_y||{};h.ids&&(d=function(e){return e.id});var y=o.hasMarkers(h)&&h.marker.maxdisplayed>0;v.visible||p.visible||(t=[]);var g=n.select(this).selectAll("g.errorbar").data(t,d);if(g.exit().remove(),t.length){p.visible||g.selectAll("path.xerror").remove(),v.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var m=g.enter().append("g").classed("errorbar",!0);u&&m.style("opacity",0).transition().duration(l.duration).style("opacity",1),i.setClipUrl(g,r.layerClipId,e),g.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}(e,s,c);if(!y||e.vis){var i,o=t.select("path.yerror");if(v.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var d=v.width;i="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(i+="m-"+d+",0h"+2*d),o.size()?u&&(o=o.transition().duration(l.duration).ease(l.easing)):o=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var h=t.select("path.xerror");if(p.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var g=(p.copy_ystyle?v:p).width;i="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(i+="m0,-"+g+"v"+2*g),h.size()?u&&(h=h.transition().duration(l.duration).ease(l.easing)):h=t.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0),h.attr("d",i)}else h.remove()}}))}}))}},2036:function(e,t,r){"use strict";var n=r(3428),a=r(6308);e.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},5756:function(e,t,r){"use strict";var n=r(5376),a=r(5460).hoverlabel,i=r(2880).extendFlat;e.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},5056:function(e,t,r){"use strict";var n=r(3400),a=r(4040);function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}e.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var l=0;l=0&&r.indexJ[0]._length||_e<0||_e>K[0]._length)return v.unhoverRaw(e,t)}else be="xpx"in t?t.xpx:J[0]._length/2,_e="ypx"in t?t.ypx:K[0]._length/2;if(t.pointerX=be+J[0]._offset,t.pointerY=_e+K[0]._offset,ne="xval"in t?x.flat(b,t.xval):x.p2c(J,be),ae="yval"in t?x.flat(b,t.yval):x.p2c(K,_e),!a(ne[0])||!a(ae[0]))return o.warn("Fx.hover failed",t,e),v.unhoverRaw(e,t)}var ke=1/0;function Ae(r,n){for(oe=0;oeve&&(ye.splice(0,ve),ke=ye[0].distance),A&&0!==re&&0===ye.length){pe.distance=re,pe.index=!1;var u=se._module.hoverPoints(pe,de,he,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter((function(e){return e.spikeDistance<=re}))),u&&u.length){var f,d=u.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(d.length){var h=d[0];a(h.x0)&&a(h.y0)&&(f=Se(h),(!me.vLinePoint||me.vLinePoint.spikeDistance>f.spikeDistance)&&(me.vLinePoint=f))}var v=u.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(v.length){var y=v[0];a(y.x0)&&a(y.y0)&&(f=Se(y),(!me.hLinePoint||me.hLinePoint.spikeDistance>f.spikeDistance)&&(me.hLinePoint=f))}}}}}function Le(e,t,r){for(var n,a=null,i=1/0,o=0;o0&&Math.abs(e.distance)Be-1;He--)Ue(ye[He]);ye=je,Pe()}var Ge=e._hoverdata,qe=[],Ze=U(e),We=G(e);for(ie=0;ie1||ye.length>1)||"closest"===L&&xe&&ye.length>1,lt=p.combine(_.plot_bgcolor||p.background,_.paper_bgcolor),st=N(ye,{gd:e,hovermode:L,rotateLabels:ot,bgColor:lt,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),ct=st.hoverLabels;if(x.isUnifiedHover(L)||(function(e,t,r,n){var a,i,o,l,s,c,u,f=t?"xa":"ya",d=t?"ya":"xa",h=0,p=1,v=e.size(),y=new Array(v),g=0,m=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function M(e){var t=e[0],r=e[e.length-1];if(i=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,i>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=i;a=!1}if(!(o<.01)){if(i<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=o;a=!1}if(a){var n=0;for(l=0;lt.pmax&&n++;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos>t.pmax-1&&(c.del=!0,n--);for(l=0;l=0;s--)e[s].dp-=o;for(l=e.length-1;l>=0&&!(n<=0);l--)(c=e[l]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}for(e.each((function(e){var n=e[f],a=e[d],i="x"===n._id.charAt(0),o=n.range;0===g&&o&&o[0]>o[1]!==i&&(p=-1);var l=0,s=i?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,h=F(e,t),v=e.anchor,M="end"===v?-1:1;if("middle"===v)u=(c=e.crossPos+(i?T(h.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(i?T(e.by):w(e.bx));else if(i)u=(c=e.crossPos+T(S+h.y)-T(e.by/2-S))+T(e.by);else{var A=w(M*S+h.x),L=A+w(M*e.bx);c=e.crossPos+Math.min(A,L),u=e.crossPos+Math.max(A,L)}i?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===a.side?(l=a._mainLinePosition,s=r.width):s=a._mainLinePosition):void 0!==m&&void 0!==x&&Math.min(u,x)-Math.max(c,m)>1&&("top"===a.side?(l=a._mainLinePosition,s=r.height):s=a._mainLinePosition)}y[g++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(i?k:1)/2,pmin:l,pmax:s}]})),y.sort((function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)}));!a&&h<=v;){for(h++,a=!0,l=0;l.01){for(s=L.length-1;s>=0;s--)L[s].dp+=i;for(A.push.apply(A,L),y.splice(l+1,1),u=0,s=A.length-1;s>=0;s--)u+=A[s].dp;for(o=u/A.length,s=A.length-1;s>=0;s--)A[s].dp-=o;a=!1}else l++}y.forEach(M)}for(l=y.length-1;l>=0;l--){var C=y[l];for(s=C.length-1;s>=0;s--){var P=C[s],I=P.datum;I.offset=P.dp,I.del=P.del}}}(ct,ot,_,st.commonLabelBoundingBox),E(ct,ot,_._invScaleX,_._invScaleY)),s&&s.tagName){var ut=m.getComponentMethod("annotations","hasClickToShow")(e,qe);d(n.select(s),ut?"pointer":"")}s&&!i&&function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,Ge)&&(Ge&&e.emit("plotly_unhover",{event:t,points:Ge}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:J,yaxes:K,xvals:ne,yvals:ae}))}(e,t,r,i,s)}))},t.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=t.gd,i=U(a),o=G(a),l=N(e.map((function(e){var r=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,l=e._y0||e.y0||e.y||0,s=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),d=Math.min(l,s),h=Math.max(l,s),v=e.trace;if(m.traceIs(v,"gl3d")){var y=a._fullLayout[v.scene]._scene.container,g=y.offsetLeft,x=y.offsetTop;u+=g,f+=g,d+=x,h+=x}c.bbox={x0:u+o,x1:f+o,y0:d+i,y1:h+i},t.inOut_bbox&&t.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||p.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:a,hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||p.background,container:n.select(t.container),outerContainer:t.outerContainer||t.container}).hoverLabels,s=0,c=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function N(e,t){var r=t.gd,a=r._fullLayout,i=t.hovermode,l=t.rotateLabels,u=t.bgColor,d=t.container,v=t.outerContainer,y=t.commonLabelOpts||{};if(0===e.length)return[[]];var g=t.fontFamily||b.HOVERFONT,M=t.fontSize||b.HOVERFONTSIZE,k=t.fontWeight||a.font.weight,A=t.fontStyle||a.font.style,L=t.fontVariant||a.font.variant,D=t.fontTextcase||a.font.textcase,C=t.fontLineposition||a.font.lineposition,P=t.fontShadow||a.font.shadow,z=e[0],N=z.xa,F=z.ya,E=i.charAt(0),B=E+"Label",H=z[B];if(void 0===H&&"multicategory"===N.type)for(var j=0;ja.width-T&&(I=a.width-T),t.attr("d","M"+(x-I)+",0L"+(x-I+S)+","+w+S+"H"+T+"v"+w+(2*O+_.height)+"H"+-T+"V"+w+S+"H"+(x-I-S)+"Z"),x=I,$.minX=x-T,$.maxX=x+T,"top"===N.side?($.minY=b-(2*O+_.height),$.maxY=b-O):($.minY=b+O,$.maxY=b+(2*O+_.height))}else{var R,E,B;"right"===F.side?(R="start",E=1,B="",x=N._offset+N._length):(R="end",E=-1,B="-",x=N._offset),b=F._offset+(z.y0+z.y1)/2,l.attr("text-anchor",R),t.attr("d","M0,0L"+B+S+","+S+"V"+(O+_.height/2)+"h"+B+(2*O+_.width)+"V-"+(O+_.height/2)+"H"+B+S+"V-"+S+"Z"),$.minY=b-(O+_.height/2),$.maxY=b+(O+_.height/2),"right"===F.side?($.minX=x+S,$.maxX=x+S+(2*O+_.width)):($.minX=x-S-(2*O+_.width),$.maxX=x-S);var j,Y=_.height/2,U=V-_.top-Y,G="clip"+a._uid+"commonlabel"+F._id;if(x<_.width+2*O+S){j="M-"+(S+O)+"-"+Y+"h-"+(_.width-O)+"V"+Y+"h"+(_.width-O)+"Z";var Z=_.width-x+O;f.positionText(l,Z,U),"end"===R&&l.selectAll("tspan").each((function(){var e=n.select(this),t=h.tester.append("text").text(e.text()).call(h.font,m),a=q(r,t.node());Math.round(a.width)=0?pe:ve+me=0?ve:Ae+me=0?de:he+xe=0?he:Le+xe=0,"top"!==e.idealAlign&&K||!Q?K?(B+=Y/2,e.anchor="start"):e.anchor="middle":(B-=Y/2,e.anchor="end"),e.crossPos=B;else{if(e.pos=B,K=E+j/2+$<=U,Q=E-j/2-$>=0,"left"!==e.idealAlign&&K||!Q)if(K)E+=j/2,e.anchor="start";else{e.anchor="middle";var ee=$/2,te=E+ee-U,re=E-ee;te>0&&(E-=te),re<0&&(E+=-re)}else E-=j/2,e.anchor="end";e.crossPos=E}w.attr("text-anchor",e.anchor),z&&I.attr("text-anchor",e.anchor),t.attr("transform",s(E,B)+(l?c(T):""))})),{hoverLabels:Se,commonLabelBoundingBox:$}}function R(e,t,r,n,a,i){var l="",s="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),l=Y(e.name,e.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(s+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(s+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[c+"Label"]===a?s=e[u+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(s=e.yLabel):s=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(s+=(s?"
":"")+e.text),void 0!==e.extraText&&(s+=(s?"
":"")+e.extraText),i&&""===s&&!e.hovertemplate&&(""===l&&i.remove(),s=l);var f=e.hovertemplate||!1;if(f){var d=e.hovertemplateLabels||e;e[c+"Label"]!==a&&(d[c+"other"]=d[c+"Val"],d[c+"otherLabel"]=d[c+"Label"]),s=(s=o.hovertemplateString(f,d,n._d3locale,e.eventData[0]||{},e.trace._meta)).replace(z,(function(t,r){return l=Y(r,e.nameLength),""}))}return[s,l]}function F(e,t){var r=0,n=e.offset;return t&&(n*=-L,r=e.offset*A),{x:r,y:n}}function E(e,t,r,a){var i=function(e){return e*r},o=function(e){return e*a};e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a,l,s,c,u=r.select("text.nums"),d=e.anchor,p="end"===d?-1:1,v=(c=(s=(l={start:1,end:-1,middle:0}[(a=e).anchor])*(S+O))+l*(a.txwidth+O),"middle"===a.anchor&&(s-=a.tx2width/2,c+=a.txwidth/2+O),{alignShift:l,textShiftX:s,text2ShiftX:c}),y=F(e,t),g=y.x,m=y.y,x="middle"===d;r.select("path").attr("d",x?"M-"+i(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+i(e.bx)+"v"+o(e.by)+"h-"+i(e.bx)+"Z":"M0,0L"+i(p*S+g)+","+o(S+m)+"v"+o(e.by/2-S)+"h"+i(p*e.bx)+"v-"+o(e.by)+"H"+i(p*S+g)+"V"+o(m-S)+"Z");var b=g+v.textShiftX,_=m+e.ty0-e.by/2+O,w=e.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==d?(u.attr("text-anchor","start"),b=x?-e.bx/2-e.tx2width/2+O:-e.bx-O):"right"===w&&"end"!==d&&(u.attr("text-anchor","end"),b=x?e.bx/2-e.tx2width/2-O:e.bx+O)),u.call(f.positionText,i(b),o(_)),e.tx2width&&(r.select("text.name").call(f.positionText,i(v.text2ShiftX+v.alignShift*O+g),o(m+e.ty0-e.by/2+O)),r.select("rect").call(h.setRect,i(v.text2ShiftX+(v.alignShift-1)*e.tx2width/2+g),o(m-e.by/2-1),i(e.tx2width),o(e.by+2)))}))}function B(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],l=e.cd[r]||{};function s(e){return e||a(e)&&0===e}var c=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return s(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(l,n,e,t)};function u(t,r,n){var a=c(r,n);s(a)&&(e[t]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:y.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:y.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var f=y.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+f+" / -"+y.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+f,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var d=y.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+d+" / -"+y.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+d,"y"===t&&(e.distance+=1)}var h=e.hoverinfo||e.trace.hoverinfo;return h&&"all"!==h&&(-1===(h=Array.isArray(h)?h:h.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===h.indexOf("y")&&(e.yLabel=void 0),-1===h.indexOf("z")&&(e.zLabel=void 0),-1===h.indexOf("text")&&(e.text=void 0),-1===h.indexOf("name")&&(e.name=void 0)),e}function H(e,t,r){var n,a,o=r.container,l=r.fullLayout,s=l._size,c=r.event,u=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||u){var d=p.combine(l.plot_bgcolor,l.paper_bgcolor);if(u){var v,g,m=t.hLinePoint;n=m&&m.xa,"cursor"===(a=m&&m.ya).spikesnap?(v=c.pointerX,g=c.pointerY):(v=n._offset+m.x,g=a._offset+m.y);var x,b,_=i.readability(m.color,d)<1.5?p.contrast(d):m.color,w=a.spikemode,T=a.spikethickness,M=a.spikecolor||_,k=y.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=k,b=v),-1!==w.indexOf("across")){var A=a._counterDomainMin,L=a._counterDomainMax;"free"===a.anchor&&(A=Math.min(A,a.position),L=Math.max(L,a.position)),x=s.l+A*s.w,b=s.l+L*s.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":T,stroke:M,"stroke-dasharray":h.dashStyle(a.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:g,y2:g,"stroke-width":T+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:k+("right"!==a.side?T:-T),cy:g,r:T,fill:M}).classed("spikeline",!0)}if(f){var S,O,D=t.vLinePoint;n=D&&D.xa,a=D&&D.ya,"cursor"===n.spikesnap?(S=c.pointerX,O=c.pointerY):(S=n._offset+D.x,O=a._offset+D.y);var C,P,I=i.readability(D.color,d)<1.5?p.contrast(d):D.color,z=n.spikemode,N=n.spikethickness,R=n.spikecolor||I,F=y.getPxPosition(e,n);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(C=F,P=O),-1!==z.indexOf("across")){var E=n._counterDomainMin,B=n._counterDomainMax;"free"===n.anchor&&(E=Math.min(E,n.position),B=Math.max(B,n.position)),C=s.t+(1-B)*s.h,P=s.t+(1-E)*s.h}o.insert("line",":first-child").attr({x1:S,x2:S,y1:C,y2:P,"stroke-width":N,stroke:R,"stroke-dasharray":h.dashStyle(n.spikedash,N)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:S,x2:S,y1:C,y2:P,"stroke-width":N+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S,cy:F-("top"!==n.side?N:-N),r:N,fill:R}).classed("spikeline",!0)}}}function j(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Y(e,t){return f.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function V(e,t,r){var n=t[e+"a"],a=t[e+"Val"],i=t.cd[0];if("category"===n.type||"multicategory"===n.type)a=n._categoriesMap[a];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var l=t.cd[t.index],s=l[e+"Start"];void 0===s&&(s=l[e]);var c=l[e+"End"];void 0===c&&(c=l[e]);var u=c-s;"end"===o?a+=u:"middle"===o&&(a+=u/2)}a=n.d2c(a)}return i&&i.t&&i.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(a+=i.t.dPos)),a}function U(e){return e.offsetTop+e.clientTop}function G(e){return e.offsetLeft+e.clientLeft}function q(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,l=a+n.width,s=i+n.height,c=o.apply3DTransform(r._invTransform)(a,i),u=o.apply3DTransform(r._invTransform)(l,s),f=c[0],d=c[1],h=u[0],p=u[1];return{x:f,y:d,width:h-f,height:p-d,top:Math.min(d,p),left:Math.min(f,h),right:Math.max(f,h),bottom:Math.max(d,p)}}},6132:function(e,t,r){"use strict";var n=r(3400),a=r(6308),i=r(624).isUnifiedHover;e.exports=function(e,t,r,o){o=o||{};var l=t.legend;function s(e){o.font[e]||(o.font[e]=l?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),s("weight"),s("style"),s("variant"),l?(o.bgcolor||(o.bgcolor=a.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},1008:function(e,t,r){"use strict";var n=r(3400),a=r(5460);e.exports=function(e,t){function r(r,i){return void 0!==t[r]?t[r]:n.coerce(e,t,a,r,i)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},3024:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=r(6476),o=r(624),l=r(5460),s=r(3292);e.exports={moduleType:"component",name:"fx",constants:r(2456),schema:{layout:l},attributes:r(5756),layoutAttributes:l,supplyLayoutGlobalDefaults:r(1976),supplyDefaults:r(5448),supplyLayoutDefaults:r(8336),calc:r(5056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:s.hover,unhover:i.unhover,loneHover:s.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:r(2376)}},5460:function(e,t,r){"use strict";var n=r(2456),a=r(5376),i=a({editType:"none"});i.family.dflt=n.HOVERFONT,i.size.dflt=n.HOVERFONTSIZE,e.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:a({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},8336:function(e,t,r){"use strict";var n=r(3400),a=r(5460),i=r(1008),o=r(6132);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}i(e,t)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var l=t._has("mapbox"),s=t._has("geo"),c=t._basePlotModules.length;"zoom"===t.dragmode&&((l||s)&&1===c||l&&s&&2===c)&&(t.dragmode="pan"),o(e,t,r),n.coerceFont(r,"hoverlabel.grouptitlefont",t.hoverlabel.font)}},1976:function(e,t,r){"use strict";var n=r(3400),a=r(6132),i=r(5460);e.exports=function(e,t){a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}))}},2704:function(e,t,r){"use strict";var n=r(3400),a=r(3756).counter,i=r(6968).u,o=r(3816).idRegex,l=r(1780),s={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function u(e,t,r,n,a,i){var o=t(e+"gap",r),l=t("domain."+e);t(e+"side",n);for(var s=new Array(a),c=l[0],u=(l[1]-c)/(a-o),f=u*(1-o),d=0;d1){d||h||p||"independent"===M("pattern")&&(d=!0),y._hasSubplotGrid=d;var x,b,_="top to bottom"===M("roworder"),w=d?.2:.1,T=d?.3:.1;v&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),y._domains={x:u("x",M,w,x,m),y:u("y",M,T,b,g,_)}}else delete t.grid}function M(e,t){return n.coerce(r,y,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,l,s,u,d=e.grid||{},h=t._subplots,p=r._hasSubplotGrid,v=r.rows,y=r.columns,g="independent"===r.pattern,m=r._axisMap={};if(p){var x=d.subplots||[];s=r.subplots=new Array(v);var b=1;for(n=0;n("legend"===e?1:0));if(!1===A&&(r[e]=void 0),(!1!==A||f.uirevision)&&(h("uirevision",r.uirevision),!1!==A)){h("borderwidth");var L,S,O,D="h"===h("orientation"),C="paper"===h("yref"),P="paper"===h("xref"),I="left";if(D?(L=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?C?(S=1.1,O="bottom"):(S=1,O="top"):C?(S=-.1,O="top"):(S=0,O="bottom")):(S=1,O="auto",P?L=1.02:(L=1,I="right")),a.coerce(f,d,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:L}},"x"),a.coerce(f,d,{y:{valType:"number",editType:"legend",min:C?-2:0,max:C?3:1,dflt:S}},"y"),h("traceorder",_),c.isGrouped(r[e])&&h("tracegroupgap"),h("entrywidth"),h("entrywidthmode"),h("indentation"),h("itemsizing"),h("itemwidth"),h("itemclick"),h("itemdoubleclick"),h("groupclick"),h("xanchor",I),h("yanchor",O),h("valign"),a.noneOrAll(f,d,["x","y"]),h("title.text")){h("title.side",D?"left":"top");var z=a.extendFlat({},p,{size:a.bigFont(p.size)});a.coerceFont(h,"title.font",z)}}}}e.exports=function(e,t,r){var n,i=r.slice(),o=t.shapes;if(o)for(n=0;n1)}var E=p.hiddenlabels||[];if(!(T||p.showlegend&&L.length))return l.selectAll("."+w).remove(),p._topdefs.select("#"+r).remove(),i.autoMargin(e,w);var B=a.ensureSingle(l,"g",w,(function(e){T||e.attr("pointer-events","all")})),H=a.ensureSingleById(p._topdefs,"clipPath",r,(function(e){e.append("rect")})),j=a.ensureSingle(B,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));j.call(u.stroke,d.bordercolor).call(u.fill,d.bgcolor).style("stroke-width",d.borderwidth+"px");var Y,V=a.ensureSingle(B,"g","scrollbox"),U=d.title;d._titleWidth=0,d._titleHeight=0,U.text?((Y=a.ensureSingle(V,"text",w+"titletext")).attr("text-anchor","start").call(c.font,U.font).text(U.text),O(Y,V,e,d,_)):V.selectAll("."+w+"titletext").remove();var G=a.ensureSingle(B,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),q=V.selectAll("g.groups").data(L);q.enter().append("g").attr("class","groups"),q.exit().remove();var Z=q.selectAll("g.traces").data(a.identity);Z.enter().append("g").attr("class","traces"),Z.exit().remove(),Z.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==E.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(A,e,d)})).call(x,e,d).each((function(){T||n.select(this).call(S,e,w)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r,a){var i=e._fullLayout,o=P(a);a||(a=i[o]);var l=i._size,s=b.isVertical(a),u=b.isGrouped(a),f="fraction"===a.entrywidthmode,d=a.borderwidth,p=2*d,v=h.itemGap,y=a.indentation+a.itemwidth+2*v,g=2*(d+v),m=C(a),x=a.y<0||0===a.y&&"top"===m,_=a.y>1||1===a.y&&"bottom"===m,w=a.tracegroupgap,T={};a._maxHeight=Math.max(x||_?i.height/2:l.h,30);var k=0;a._width=0,a._height=0;var A=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(a);if(s)r.each((function(e){var t=e[0].height;c.setTranslate(this,d+A[0],d+A[1]+a._height+t/2+v),a._height+=t,a._width=Math.max(a._width,e[0].width)})),k=y+a._width,a._width+=v+y+p,a._height+=g,u&&(t.each((function(e,t){c.setTranslate(this,0,t*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var L=D(a),S=a.x<0||0===a.x&&"right"===L,O=a.x>1||1===a.x&&"left"===L,I=_||x,z=i.width/2;a._maxWidth=Math.max(S?I&&"left"===L?l.l+l.w:z:O?I&&"right"===L?l.r+l.w:z:l.w,2*y);var N=0,R=0;r.each((function(e){var t=M(e,a,y);N=Math.max(N,t),R+=t})),k=null;var F=0;if(u){var E=0,B=0,H=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=M(r,a,y),i=r[0].height;c.setTranslate(this,A[0],A[1]+d+v+i/2+t),t+=i,e=Math.max(e,n),T[r[0].trace.legendgroup]=e}));var r=e+v;B>0&&r+d+B>a._maxWidth?(F=Math.max(F,B),B=0,H+=E+w,E=t):E=Math.max(E,t),c.setTranslate(this,B,H),B+=r})),a._width=Math.max(F,B)+d,a._height=H+E+g}else{var j=r.size(),Y=R+p+(j-1)*v=a._maxWidth&&(F=Math.max(F,q),U=0,G+=V,a._height+=V,V=0),c.setTranslate(this,A[0]+d+U,A[1]+d+G+t/2+v),q=U+r+v,U+=n,V=Math.max(V,t)})),Y?(a._width=U+p,a._height=V+g):(a._width=Math.max(F,q)+p,a._height+=V+g)}}a._width=Math.ceil(Math.max(a._width+A[0],a._titleWidth+2*(d+h.titlePad))),a._height=Math.ceil(Math.max(a._height+A[1],a._titleHeight+2*(d+h.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var Z=e._context.edits,W=Z.legendText||Z.legendPosition;r.each((function(e){var t=n.select(this).select("."+o+"toggle"),r=e[0].height,i=e[0].trace.legendgroup,l=M(e,a,y);u&&""!==i&&(l=T[i]);var d=W?y:k||l;s||f||(d+=v/2),c.setRect(t,0,-r/2,d,r)}))}(e,q,Z,d)},function(){var t,u,m,x,b=p._size,_=d.borderwidth,M="paper"===d.xref,A="paper"===d.yref;if(U.text&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*v,a=0,i=e.node(),o=c.bBox(i).width;"top center"===t.title.side?a=.5*(t._width-2*r-2*h.titlePad-o):"top right"===t.title.side&&(a=t._width-2*r-2*h.titlePad-o),f.positionText(e,r+h.titlePad+a,r+n)}}(Y,d,_),!T){var L,S;L=M?b.l+b.w*d.x-y[D(d)]*d._width:p.width*d.x-y[D(d)]*d._width,S=A?b.t+b.h*(1-d.y)-y[C(d)]*d._effHeight:p.height*(1-d.y)-y[C(d)]*d._effHeight;var O=function(e,t,r,n){var a=e._fullLayout,o=a[t],l=D(o),s=C(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var f=o.y<.5?"b":"t",d=o.x<.5?"l":"r",h={r:a.width-r,l:r+o._width,b:a.height-n,t:n+o._effHeight};if(c&&u)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*y[l],r:o._width*g[l],b:o._effHeight*g[s],t:o._effHeight*y[s]});c?e._fullLayout._reservedMargin[t][f]=h[f]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=h[d]:e._fullLayout._reservedMargin[t][f]=h[f]}(e,w,L,S);if(O)return;if(p.margin.autoexpand){var P=L,I=S;L=M?a.constrain(L,0,p.width-d._width):P,S=A?a.constrain(S,0,p.height-d._effHeight):I,L!==P&&a.log("Constrain "+w+".x to make legend fit inside graph"),S!==I&&a.log("Constrain "+w+".y to make legend fit inside graph")}c.setTranslate(B,L,S)}if(G.on(".drag",null),B.on("wheel",null),T||d._height<=d._maxHeight||e._context.staticPlot){var z=d._effHeight;T&&(z=d._height),j.attr({width:d._width-_,height:z-_,x:_/2,y:_/2}),c.setTranslate(V,0,0),H.select("rect").attr({width:d._width-2*_,height:z-2*_,x:_,y:_}),c.setClipUrl(V,r,e),c.setRect(G,0,0,0,0),delete d._scrollY}else{var N,R,F,E=Math.max(h.scrollBarMinHeight,d._effHeight*d._effHeight/d._height),q=d._effHeight-E-2*h.scrollBarMargin,Z=d._height-d._effHeight,W=q/Z,X=Math.min(d._scrollY||0,Z);j.attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-_,x:_/2,y:_/2}),H.select("rect").attr({width:d._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:d._effHeight-2*_,x:_,y:_+X}),c.setClipUrl(V,r,e),Q(X,E,W),B.on("wheel",(function(){Q(X=a.constrain(d._scrollY+n.event.deltaY/q*Z,0,Z),E,W),0!==X&&X!==Z&&n.event.preventDefault()}));var J=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;N="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,F=X})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(R="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,X=function(e,t,r){var n=(r-t)/W+e;return a.constrain(n,0,Z)}(F,N,R),Q(X,E,W))}));G.call(J);var K=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(N=e.changedTouches[0].clientY,F=X)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(R=e.changedTouches[0].clientY,X=function(e,t,r){var n=(t-r)/W+e;return a.constrain(n,0,Z)}(F,N,R),Q(X,E,W))}));V.call(K)}function Q(t,r,n){d._scrollY=e._fullLayout[w]._scrollY=t,c.setTranslate(V,0,-t),c.setRect(G,d._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),H.select("rect").attr("y",_+t)}e._context.edits.legendPosition&&(B.classed("cursor-move",!0),s.init({element:B.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=c.getTranslate(B);m=t.x,x=t.y}},moveFn:function(e,r){if(void 0!==m&&void 0!==x){var n=m+e,a=x+r;c.setTranslate(B,n,a),t=s.align(n,d._width,b.l,b.l+b.w,d.xanchor),u=s.align(a+d._height,-d._height,b.t+b.h,b.t,d.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==u){var r={};r[w+".x"]=t,r[w+".y"]=u,o.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=l.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&k(e,B,n,t,r)}}))}],e)}}function M(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===i?t._maxWidth*o:r+(o||a)}function k(e,t,r,n,a){var i=r.data()[0][0].trace,s={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(s.group=i._group),o.traceIs(i,"pie-like")&&(s.label=r.datum()[0].label);var c=l.triggerHandler(e,"plotly_legendclick",s);if(1===n){if(!1===c)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&d(r,e,n)}),e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==l.triggerHandler(e,"plotly_legenddoubleclick",s)&&!1!==c&&d(r,e,n))}function A(e,t,r){var n,i,l=P(r),s=e.data()[0][0],u=s.trace,d=o.traceIs(u,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,v=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,i=s.groupTitle.font):(i=r.font,r.entries?n=s.text:(n=d?s.label:u.name,u._meta&&(n=a.templateString(n,u._meta))));var y=a.ensureSingle(e,"text",l+"text");y.attr("text-anchor","start").call(c.font,i).text(p?L(n,v):n);var g=r.indentation+r.itemwidth+2*h.itemGap;f.positionText(y,g,0),p?y.call(f.makeEditable,{gd:t,text:n}).call(O,e,t,r).on("edit",(function(n){this.text(L(n,v)).call(O,e,t,r);var i=s.trace._fullInput||{},l={};if(o.hasTransform(i,"groupby")){var c=o.getTransformIndices(i,"groupby"),f=c[c.length-1],d=a.keyedContainer(i,"transforms["+f+"].styles","target","value.name");d.set(s.trace._group,n),l=d.constructUpdate()}else l.name=n;return i._isShape?o.call("_guiRelayout",t,"shapes["+u.index+"].name",l.name):o.call("_guiRestyle",t,l,u.index)})):O(y,e,t,r)}function L(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function S(e,t,r){var i,o=t._context.doubleClickDelay,l=1,s=a.ensureSingle(e,"rect",r+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(u.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(s.on("mousedown",(function(){(i=(new Date).getTime())-t._legendMouseDownTimeo&&(l=Math.max(l-1,1)),k(t,a,e,l,n.event)}})))}function O(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),f.convertToTspans(e,r,(function(){!function(e,t,r,n){var a=e.data()[0][0];if(r._inHover||!a||a.trace.showlegend){var i=e.select("g[class*=math-group]"),o=i.node(),l=P(r);r||(r=t._fullLayout[l]);var s,u,d=r.borderwidth,p=(n===_?r.title.font:a.groupTitle?a.groupTitle.font:r.font).size*v;if(o){var y=c.bBox(o);s=y.height,u=y.width,n===_?c.setTranslate(i,d,d+.75*s):c.setTranslate(i,0,.25*s)}else{var g="."+l+(n===_?"title":"")+"text",m=e.select(g),x=f.lineCount(m),b=m.node();if(s=p*x,u=b?c.bBox(b).width:0,n===_)"left"===r.title.side&&(u+=2*h.itemGap),f.positionText(m,d+h.titlePad,d+p);else{var w=2*h.itemGap+r.indentation+r.itemwidth;a.groupTitle&&(w=h.itemGap,u-=r.indentation+r.itemwidth),f.positionText(m,w,-p*((x-1)/2-.3))}}n===_?(r._titleWidth=u,r._titleHeight=s):(a.lineHeight=p,a.height=Math.max(s,16)+3,a.width=u)}else e.remove()}(t,r,n,a)}))}function D(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function C(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}function P(e){return e._id||"legend"}e.exports=function(e,t){if(t)T(e,t);else{var r=e._fullLayout,a=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var e=n.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===a.indexOf(t)&&e.remove()}));for(var i=0;iL&&(A=L)}M[i][0]._groupMinRank=A,M[i][0]._preGroupSort=i}var S=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(M.forEach((function(e,t){e[0]._preGroupSort=t})),M.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),i=0;ir?r:e}e.exports=function(e,t,r){var g=t._fullLayout;r||(r=g.legend);var m="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*h.itemGap)/2,_=o(b,0),w=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return m?n:Math.min(a,r)};function T(e,i,o){var u=e[0].trace,f=u.marker||{},d=f.line||{},h=f.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",p=o?u.visible&&u.type===o:a.traceIs(u,"bar"),v=n.select(i).select("g.legendpoints").selectAll("path.legend"+o).data(p?[e]:[]);v.enter().append("path").classed("legend"+o,!0).attr("d",h).attr("transform",_),v.exit().remove(),v.each((function(e){var a=n.select(this),i=e[0],o=w(i.mlw,f.line,5,2);a.style("stroke-width",o+"px");var h=i.mcc;if(!r._inHover&&"mc"in i){var p=c(f),v=p.mid;void 0===v&&(v=(p.max+p.min)/2),h=l.tryColorscale(f,"")(v)}var g=h||i.mc||f.color,m=f.pattern,x=m&&l.getPatternAttr(m.shape,0,"");if(x){var b=l.getPatternAttr(m.bgcolor,0,null),_=l.getPatternAttr(m.fgcolor,0,null),T=m.fgopacity,M=y(m.size,8,10),k=y(m.solidity,.5,1),A="legend-"+u.uid;a.call(l.pattern,"legend",t,A,x,M,k,h,m.fillmode,b,_,T)}else a.call(s.fill,g);o&&s.stroke(a,i.mlc||d.color)}))}function M(e,r,o){var l=e[0],s=l.trace,c=o?s.visible&&s.type===o:a.traceIs(s,o),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(u.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),u.exit().remove(),u.size()){var h=s.marker||{},p=w(d(h.line.width,l.pts),h.line,5,2),v="pieLike",y=i.minExtend(s,{marker:{line:{width:p}}},v),g=i.minExtend(l,{trace:y},v);f(u,g,y,t)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var l=r.indentation,s=r.valign,c=e[0].lineHeight,u=e[0].height;if("middle"===s&&0===l||!c||!u)a.attr("transform",null);else{var f={top:1,bottom:-1}[s]*(.5*(c-u+3))||0,d=r.indentation;a.attr("transform",o(d,f))}a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=a.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var r,a=e[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,o){var u,f=n.select(this),d=c(a),h=d.colorscale,v=d.reversescale;if(h){if(!r){var y=h.length;u=0===o?h[v?y-1:0][1]:1===o?h[v?0:y-1][1]:h[Math.floor((y-1)/2)][1]}}else{var g=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(g)?g[o]||g[0]:g}f.attr("d",e[0]),u?f.call(s.fill,u):f.call((function(e){if(e.size()){var n="legendfill-"+a.uid;l.gradient(e,t,n,p(v,"radial"===r),h,"fill")}}))}))})).each((function(e){var t=e[0].trace,r="waterfall"===t.type;if(e[0]._distinct&&r){var a=e[0].trace[e[0].dir].marker;return e[0].mc=a.color,e[0].mlw=a.line.width,e[0].mlc=a.line.color,T(e,this,"waterfall")}var i=[];t.visible&&r&&(i=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(i);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var r=n.select(this),a=t[e[0]].marker,i=w(void 0,a.line,5,2);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){T(e,this,"funnel")})).each((function(e){T(e,this)})).each((function(e){var r=e[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[e]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=w(void 0,r.line,5,2);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var c=i.minExtend(r,{marker:{size:m?12:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(l.pointStyle,c,t)}}))})).each((function(e){M(e,this,"funnelarea")})).each((function(e){M(e,this,"pie")})).each((function(e){var r,a,o=v(e),s=o.showFill,f=o.showLine,d=o.showGradientLine,h=o.showGradientFill,y=o.anyFill,g=o.anyLine,m=e[0],b=m.trace,_=c(b),T=_.colorscale,M=_.reversescale,k=u.hasMarkers(b)||!y?"M5,0":g?"M5,-2":"M5,-3",A=n.select(this),L=A.select(".legendfill").selectAll("path").data(s||h?[e]:[]);if(L.enter().append("path").classed("js-fill",!0),L.exit().remove(),L.attr("d",k+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(s)l.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;l.gradient(e,t,r,p(M),T,"fill")}})),f||d){var S=w(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:S}}),r=[i.minExtend(m,{trace:a})]}var O=A.select(".legendlines").selectAll("path").data(f||d?[r]:[]);O.enter().append("path").classed("js-line",!0),O.exit().remove(),O.attr("d",k+(d?"l"+x+",0.0001":"h"+x)).call(f?l.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;l.lineGroupStyle(e),l.gradient(e,t,r,p(M),T,"stroke")}})})).each((function(e){var r,a,o=v(e),s=o.anyFill,c=o.anyLine,f=o.showLine,d=o.showMarker,h=e[0],p=h.trace,y=!d&&!c&&!s&&u.hasText(p);function g(e,t,r,n){var a=i.nestedProperty(p,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(m&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return h._distinct&&h.index&&e[h.index]?e[h.index]:e[0]}if(d||y||f){var b={},w={};if(d){b.mc=g("marker.color",x),b.mx=g("marker.symbol",x),b.mo=g("marker.opacity",i.mean,[.2,1]),b.mlc=g("marker.line.color",x),b.mlw=g("marker.line.width",i.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=g("marker.size",i.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:g("line.width",x,[0,10],5)}),y&&(b.tx="Aa",b.tp=g("textposition",x),b.ts=10,b.tc=g("textfont.color",x),b.tf=g("textfont.family",x),b.tw=g("textfont.weight",x),b.ty=g("textfont.style",x),b.tv=g("textfont.variant",x),b.tC=g("textfont.textcase",x),b.tE=g("textfont.lineposition",x),b.tS=g("textfont.shadow",x)),r=[i.minExtend(h,b)],(a=i.minExtend(p,w)).selectedpoints=null,a.texttemplate=null}var M=n.select(this).select("g.legendpoints"),k=M.selectAll("path.scatterpts").data(d?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),k.exit().remove(),k.call(l.pointStyle,a,t),d&&(r[0].mrc=3);var A=M.selectAll("g.pointtext").data(y?r:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),A.exit().remove(),A.selectAll("text").call(l.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=w(void 0,i.line,5,2);a.style("fill","none").call(l.dashLine,i.line.dash,o),o&&s.stroke(a,i.line.color)}))}))}},6540:function(e,t,r){"use strict";r(6052),e.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},1868:function(e,t,r){"use strict";var n=r(4040),a=r(7316),i=r(9811),o=r(9224),l=r(4016).eraseActiveShape,s=r(3400),c=s._,u=e.exports={};function f(e,t){var r,a,o=t.currentTarget,l=o.getAttribute("data-attr"),s=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},f=i.list(e,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===l){var h,p="in"===s?.5:2,v=(1+p)/2,y=(1-p)/2;for(a=0;a1?(P=["toggleHover"],I=["resetViews"]):g?(C=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):y?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(C=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],I=["resetViewMapbox"]):b?P=["hoverClosestGl2d"]:m?P=["hoverClosestPie"]:k?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"],v&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;t0)){var v=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i0?e.touches[0].clientX:0}function g(e,t,r,n){var a=o.ensureSingle(e,"rect",v.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),i=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,f=s.crispRound(t,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:l(u,u),"stroke-width":f}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function m(e,t,r,n){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(e,t,r,a){var l,c=t.calcdata,u=e.selectAll("g."+v.rangePlotClassName).data(r._subplotsWith,o.identity);u.enter().append("g").attr("class",(function(e){return v.rangePlotClassName+" "+e})).call(s.setClipUrl,a._clipId,t),u.order(),u.exit().remove(),u.each((function(e,o){var s=n.select(this),u=0===o,h=d.getFromId(t,e,"y"),p=h._name,v=a[p],y={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:a.range.slice(),calendar:r.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(y.layout.xaxis.rangebreaks=r.rangebreaks),y.layout[p]={type:h.type,domain:[0,1],range:"match"!==v.rangemode?v.range.slice():h.range.slice(),calendar:h.calendar},h.rangebreaks&&(y.layout[p].rangebreaks=h.rangebreaks),i.supplyDefaults(y);var g=y._fullLayout.xaxis,m=y._fullLayout[p];g.clearCalc(),g.setScale(),m.clearCalc(),m.setScale();var x={id:e,plotgroup:s,xaxis:g,yaxis:m,isRangePlot:!0};u?l=x:(x.mainplot="xy",x.mainplotinfo=l),f.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=E[r+1];else if(e=n.pmax)t=E[r+1];else if(er._length||m+_<0)return;u=g+_,h=m+_;break;case s:if(b="col-resize",g+_>r._length)return;u=g+_,h=m;break;case c:if(b="col-resize",m+_<0)return;u=g,h=m+_;break;default:b="ew-resize",u=v,h=v+_}if(h=0;M--){var k=r.append("path").attr(y).style("opacity",M?.1:g).call(o.stroke,x).call(o.fill,m).call(l.dashLine,M?"solid":_,M?4+b:b);if(p(k,e,i),w){var A=s(e.layout,"selections",i);k.style({cursor:"move"});var L={element:k.node(),plotinfo:h,gd:e,editHelpers:A,isActiveSelection:!0},S=n(c,e);a(S,k,L)}else k.style("pointer-events",M?"all":"none");T[M]=k}var O=T[0];T[1].node().addEventListener("click",(function(){return function(e,t){if(d(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void v(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=v,f(e)}}}(e,O)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;l.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function v(e){d(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,f(e))}e.exports={draw:f,drawOne:h,activateLastSelection:function(e){if(d(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=v,f(e)}}}},4200:function(e,t,r){"use strict";var n=r(8192).u,a=r(2880).extendFlat;e.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:a({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},1004:function(e){"use strict";e.exports=function(e,t,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(e,t,r){"use strict";var n=r(2760).selectMode,a=r(1936).clearOutline,i=r(9856),o=i.readPaths,l=i.writePaths,s=i.fixDatesForPaths;e.exports=function(e,t){if(e.length){var r=e[0][0];if(r){var i=r.getAttribute("d"),c=t.gd,u=c._fullLayout.newselection,f=t.plotinfo,d=f.xaxis,h=f.yaxis,p=t.isActiveSelection,v=t.dragmode,y=(c.layout||{}).selections||[];if(!n(v)&&void 0!==p){var g=c._fullLayout._activeSelectionIndex;if(g-1,b=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(g)){q(e,t,i);var _=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n0?function(e,t){var r,n,a,i=[];for(a=0;a0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a1)return!1;if((n+=t.selectedpoints.length)>1)return!1}return 1===n}(l)&&(d=K(_))){for(o&&o.remove(),y=0;y=0})(a)&&a._fullLayout._deactivateShape(a),function(e){return e._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,l=h(r),s=v(r);if(l||s){var c,u,f=o.selectAll(".select-outline-"+n.id);f&&a._fullLayout._outlining&&(l&&(c=T(f,e)),c&&i.call("_guiRelayout",a,{shapes:c}),s&&!j(e)&&(u=M(f,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:u}).then((function(){t&&k(a)}))),a._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var a,i,o,l=[],s=t.map(W),c=r.map(W);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function Q(e,t,r){var n,a;for(n=0;n-1&&t;if(!i&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,he=te[0].yref;if(ne&&he){var pe=ce(te);ue([D(e,ne,"x"),D(e,he,"y")])($,pe)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&fe(e,$),d._reselect=!1}if(!i&&d._deselect){var ve=d._deselect;(function(e,t,r){for(var n=0;n=0)M._fullLayout._deactivateShape(M);else if(!x){var r=k.clickmode;O.done(Ae).then((function(){if(O.clear(Ae),2===e){for(be.remove(),K=0;K-1&&Y(t,M,n.xaxes,n.yaxes,n.subplot,n,be),"event"===r&&fe(M,void 0);s.click(M,t,C.id)})).catch(A.error)}},n.doneFn=function(){Me.remove(),O.done(Ae).then((function(){O.clear(Ae),!L&&J&&n.selectionDefs&&(J.subtract=xe,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,W)),(L||x)&&Z(n,L),n.doneFnCompleted&&n.doneFnCompleted(Le),b&&fe(M,ie)})).catch(A.error)}},clearOutline:x,clearSelectionsCache:Z,selectOnClick:Y}},6056:function(e,t,r){"use strict";var n=r(3916),a=r(5376),i=r(2904).line,o=r(8192).u,l=r(2880).extendFlat,s=r(1780).templatedArray,c=(r(6208),r(5464)),u=r(1776).ye,f=r(7728);e.exports=s("shape",{visible:l({},c.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:l({},c.legend,{editType:"calc+arraydraw"}),legendgroup:l({},c.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:l({},c.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:a({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:l({},c.legendrank,{editType:"calc+arraydraw"}),legendwidth:l({},c.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:l({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:l({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:l({},i.color,{editType:"arraydraw"}),width:l({},i.width,{editType:"calc+arraydraw"}),dash:l({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:u({},{keys:Object.keys(f)}),font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),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"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},6084:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(3068),o=r(5152);function l(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function s(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,r,a,l,s){var c=e/2,u=s;if("pixel"===t){var f=l?o.extractPathCoords(l,s?i.paramIsY:i.paramIsX):[r,a],d=n.aggNums(Math.max,null,f),h=n.aggNums(Math.min,null,f),p=h<0?Math.abs(h)+c:c,v=d>0?d+c:c;return{ppad:c,ppadplus:u?p:v,ppadminus:u?v:p}}return{ppad:c}}function u(e,t,r){var n,a,l="x"===e._id.charAt(0)?"x":"y",s="category"===e.type||"multicategory"===e.type,c=0,u=0,f=s?e.r2c:e.d2c;if("scaled"===t[l+"sizemode"]?(n=t[l+"0"],a=t[l+"1"],s&&(c=t[l+"0shift"],u=t[l+"1shift"])):(n=t[l+"anchor"],a=t[l+"anchor"]),void 0!==n)return[f(n)+c,f(a)+u];if(t.path){var d,h,p,v,y=1/0,g=-1/0,m=t.path.match(i.segmentRE);for("date"===e.type&&(f=o.decodeDate(f)),d=0;dg&&(g=v)));return g>=y?[y,g]:void 0}}e.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o=e?t-n:n-t,-180/Math.PI*Math.atan2(a,i)}(x,_,b,w):0),k.call((function(t){return t.call(o.font,M).attr({}),i.convertToTspans(t,e),t}));var G=function(e,t,r,n,a,i,o){var l,s,c,u,d=a.label.textposition,h=a.label.textangle,p=a.label.padding,v=a.type,y=Math.PI/180*i,g=Math.sin(y),m=Math.cos(y),x=a.label.xanchor,b=a.label.yanchor;if("line"===v){"start"===d?(l=e,s=t):"end"===d?(l=r,s=n):(l=(e+r)/2,s=(t+n)/2),"auto"===x&&(x="start"===d?"auto"===h?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===D&&(e[0][0]="M"),t[O]=e,k(),A())}}()}}function Y(e,r){!function(e,r){if(t.length)for(var n=0;n_?(A=h,D="y0",L=_,C="y1"):(A=_,D="y1",L=h,C="y0"),ae(n),le(s,r),function(e,t,r){var n=t.xref,a=t.yref,i=o.getFromId(r,n),l=o.getFromId(r,a),s="";"paper"===n||i.autorange||(s+=n),"paper"===a||l.autorange||(s+=a),d.setClipUrl(e,s?"clip"+r._fullLayout._uid+s:null,r)}(t,r,e),ne.moveFn="move"===N?ie:oe,ne.altKey=n.altKey)},doneFn:function(){b(e)||(v(t),se(s),T(t,e,r),a.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){b(e)||se(s)}};function ae(r){if(b(e))N=null;else if(H)N="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=ne.element.getBoundingClientRect(),a=n.right-n.left,i=n.bottom-n.top,o=r.clientX-n.left,l=r.clientY-n.top,s=!j&&a>R&&i>F&&!r.shiftKey?p.getCursor(o/a,1-l/i):"move";v(t,s),N=s.split("-")[0]}}function ie(n,a){if("path"===r.type){var i=function(e){return e},o=i,u=i;E?Y("xanchor",r.xanchor=ee(w+n)):(o=function(e){return ee(Q(e)+n)},U&&"date"===U.type&&(o=g.encodeDate(o))),B?Y("yanchor",r.yanchor=te(k+a)):(u=function(e){return te($(e)+a)},q&&"date"===q.type&&(u=g.encodeDate(u))),Y("path",r.path=M(z,o,u))}else E?Y("xanchor",r.xanchor=ee(w+n)):(Y("x0",r.x0=ee(f+n)),Y("x1",r.x1=ee(x+n))),B?Y("yanchor",r.yanchor=te(k+a)):(Y("y0",r.y0=te(h+a)),Y("y1",r.y1=te(_+a)));t.attr("d",m(e,r)),le(s,r),c(e,l,r,V)}function oe(n,a){if(j){var i=function(e){return e},o=i,u=i;E?Y("xanchor",r.xanchor=ee(w+n)):(o=function(e){return ee(Q(e)+n)},U&&"date"===U.type&&(o=g.encodeDate(o))),B?Y("yanchor",r.yanchor=te(k+a)):(u=function(e){return te($(e)+a)},q&&"date"===q.type&&(u=g.encodeDate(u))),Y("path",r.path=M(z,o,u))}else if(H){if("resize-over-start-point"===N){var d=f+n,p=B?h-a:h+a;Y("x0",r.x0=E?d:ee(d)),Y("y0",r.y0=B?p:te(p))}else if("resize-over-end-point"===N){var v=x+n,y=B?_-a:_+a;Y("x1",r.x1=E?v:ee(v)),Y("y1",r.y1=B?y:te(y))}}else{var b=function(e){return-1!==N.indexOf(e)},T=b("n"),G=b("s"),Z=b("w"),W=b("e"),X=T?A+a:A,J=G?L+a:L,K=Z?S+n:S,re=W?O+n:O;B&&(T&&(X=A-a),G&&(J=L-a)),(!B&&J-X>F||B&&X-J>F)&&(Y(D,r[D]=B?X:te(X)),Y(C,r[C]=B?J:te(J))),re-K>R&&(Y(P,r[P]=E?K:ee(K)),Y(I,r[I]=E?re:ee(re)))}t.attr("d",m(e,r)),le(s,r),c(e,l,r,V)}function le(e,t){(E||B)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=Q(E?t.xanchor:i.midRange(r?[t.x0,t.x1]:g.extractPathCoords(t.path,y.paramIsX))),o=$(B?t.yanchor:i.midRange(r?[t.y0,t.y1]:g.extractPathCoords(t.path,y.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),E&&B){var l="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",l)}else if(E){var s="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",s)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function se(e){e.selectAll(".visual-cue").remove()}p.init(ne),re.node().onmousemove=ae}(e,F,u,t,r,N):!0===u.editable&&F.style("pointer-events",I||f.opacity(O)*S<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void k(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=k,x(e)}}}(e,F)}))}u._input&&!0===u.visible&&("above"===u.layer?A(e._fullLayout._shapeUpperLayer):"paper"===u.xref||"paper"===u.yref?A(e._fullLayout._shapeLowerLayer):"between"===u.layer?A(w.shapelayerBetween):w._hadPlotinfo?A((w.mainplotinfo||w).shapelayer):A(e._fullLayout._shapeLowerLayer))}function T(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function M(e,t,r){return e.replace(y.segmentRE,(function(e){var n=0,a=e.charAt(0),i=y.paramIsX[a],o=y.paramIsY[a],l=y.numParams[a];return a+e.substr(1).replace(y.paramRE,(function(e){return n>=l||(i[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function k(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(u(e),delete e._fullLayout._activeShapeIndex,x(e))}e.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){u(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t0&&sh&&(e="X"),e}));return i>h&&(p=p.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),u+p}))}(r,s,u);if("pixel"===r.xsizemode){var k=s(r.xanchor);f=k+r.x0+_,d=k+r.x1+w}else f=s(r.x0)+_,d=s(r.x1)+w;if("pixel"===r.ysizemode){var A=u(r.yanchor);h=A-r.y0+T,p=A-r.y1+M}else h=u(r.y0)+T,p=u(r.y1)+M;if("line"===v)return"M"+f+","+h+"L"+d+","+p;if("rect"===v)return"M"+f+","+h+"H"+d+"V"+p+"H"+f+"Z";var L=(f+d)/2,S=(h+p)/2,O=Math.abs(L-f),D=Math.abs(S-h),C="A"+O+","+D,P=L+O+","+S;return"M"+P+C+" 0 1,1 "+L+","+(S-D)+C+" 0 0,1 "+P+"Z"}},1592:function(e,t,r){"use strict";var n=r(4016);e.exports={moduleType:"component",name:"shapes",layoutAttributes:r(6056),supplyLayoutDefaults:r(3712),supplyDrawNewShapeDefaults:r(5144),includeBasePlot:r(6632)("shapes"),calcAutorange:r(6084),draw:n.draw,drawOne:n.drawOne}},7728:function(e){"use strict";function t(e,t){return t?t.d2l(e):e}function r(e,t){return t?t.l2d(e):e}function n(e){return e.x0shift||0}function a(e){return e.x1shift||0}function i(e){return e.y0shift||0}function o(e){return e.y1shift||0}function l(e,r){return t(e.x1,r)+a(e)-t(e.x0,r)-n(e)}function s(e,r,n){return t(e.y1,n)+o(e)-t(e.y0,n)-i(e)}e.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:s(e,0,r)/l(e,t)},dx:l,dy:s,width:function(e,t){return Math.abs(l(e,t))},height:function(e,t,r){return Math.abs(s(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(l(e,t),2)+Math.pow(s(e,0,r),2))},xcenter:function(e,i){return r((t(e.x1,i)+a(e)+t(e.x0,i)+n(e))/2,i)},ycenter:function(e,n,a){return r((t(e.y1,a)+o(e)+t(e.y0,a)+i(e))/2,a)}}},9861:function(e,t,r){"use strict";var n=r(5376),a=r(6741),i=r(2880).extendDeepAll,o=r(7824).overrideAll,l=r(5656),s=r(1780).templatedArray,c=r(876),u=s("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});e.exports=o(s("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(a({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:l.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},876:function(e){"use strict";e.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(e,t,r){"use strict";var n=r(3400),a=r(1272),i=r(9861),o=r(876).name,l=i.steps;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}for(var l=a(e,t,{name:"steps",handleItemDefaults:c}),s=0,u=0;u0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*f.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,t))}function O(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function D(e,t,r){var n=r._dims,a=l.ensureSingle(e,"rect",f.railTouchRectClass,(function(n){n.call(k,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function C(e,t){var r=t._dims,n=r.inputAreaLength-2*f.railInset,a=l.ensureSingle(e,"rect",f.railRectClass);a.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(e){var t=e._context.staticPlot,r=e._fullLayout,i=function(e,t){for(var r=e[f.name],n=[],a=0;a0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,y(t))}if(l.enter().append("g").classed(f.containerClassName,!0).style("cursor",t?null:"ew-resize"),l.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(s)})).remove(),0!==i.length){var c=l.selectAll("g."+f.groupClassName).data(i,g);c.enter().append("g").classed(f.groupClassName,!0),c.exit().each(s).remove();for(var u=0;u0||T<0){var S={left:[-M,0],right:[M,0],top:[0,-M],bottom:[0,M]}[_.side];i.attr("transform",s(S[0],S[1]))}}}function de(e,t){e.text(t).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))}if(ie.call(ce,oe),te&&(L?ie.on(".opacity",null):(de(ie,x),S=!0),ie.call(f.makeEditable,{gd:e}).on("edit",(function(t){void 0!==b?o.call("_guiRestyle",e,m,t,b):o.call("_guiRelayout",e,m,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(f.positionText,w.x,w.y)})),B)){if(B&&!L){var he=ie.node().getBBox(),pe=he.y+he.height+1.6*Z;oe.attr("y",pe)}Y?oe.on(".opacity",null):(de(oe,H),V=!0),oe.call(f.makeEditable,{gd:e}).on("edit",(function(t){o.call("_guiRelayout",e,"title.subtitle.text",t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(f.positionText,oe.attr("x"),oe.attr("y"))}))}return ie.classed("js-placeholder",S),oe&&oe.classed("js-placeholder",V),M},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}},8444:function(e,t,r){"use strict";var n=r(5376),a=r(2548),i=r(2880).extendFlat,o=r(7824).overrideAll,l=r(6741),s=r(1780).templatedArray,c=s("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(s("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(l({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},1331:function(e){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},1384:function(e,t,r){"use strict";var n=r(3400),a=r(1272),i=r(8444),o=r(1331).name,l=i.buttons;function s(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(e,t){function r(r,a){return n.coerce(e,t,l,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:s})}},4420:function(e,t,r){"use strict";var n=r(3428),a=r(7316),i=r(6308),o=r(3616),l=r(3400),s=r(2736),c=r(1780).arrayEditor,u=r(4284).LINE_SPACING,f=r(1331),d=r(7400);function h(e){return e._index}function p(e,t){return+e.attr(f.menuIndexAttrName)===t._index}function v(e,t,r,n,a,i,o,l){t.active=o,c(e.layout,f.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,n,null,null,t):"dropdown"===t.type&&(a.attr(f.menuIndexAttrName,"-1"),y(e,n,a,i,t),l||g(e,n,a,i,t))}function y(e,t,r,n,a){var i=l.ensureSingle(t,"g",f.headerClassName,(function(e){e.style("pointer-events","all")})),s=a._dims,c=a.active,u=a.buttons[c]||f.blankHeaderOpts,d={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:s.headerWidth,height:s.headerHeight};i.call(m,a,u,e).call(A,a,d,h),l.ensureSingle(t,"text",f.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(o.font,a.font).text(f.arrowSymbol[a.direction])})).attr({x:s.headerWidth-f.arrowOffsetX+a.pad.l,y:s.headerHeight/2+f.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(L,String(p(r,a)?-1:a._index)),g(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(T,a)})),o.setTranslate(t,s.lx,s.ly)}function g(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var s=function(e){return-1==+e.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(l.filterVisible(s)),d=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===o.type?(d.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var p=0,y=0,g=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?y=g.headerHeight+f.gapButtonHeader:p=g.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(y=-f.gapButtonHeader+f.gapButton-g.openHeight),"dropdown"===o.type&&"left"===o.direction&&(p=-f.gapButtonHeader+f.gapButton-g.openWidth);var b={x:g.lx+p+o.pad.l,y:g.ly+y+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},M={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(l,s){var c=n.select(this);c.call(m,o,l,e).call(A,o,b),c.on("click",(function(){n.event.defaultPrevented||(l.execute&&(l.args2&&o.active===s?(v(e,o,0,t,r,i,-1),a.executeAPICommand(e,l.method,l.args2)):(v(e,o,0,t,r,i,s),a.executeAPICommand(e,l.method,l.args))),e.emit("plotly_buttonclicked",{menu:o,button:l,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(M.w=Math.max(g.openWidth,g.headerWidth),M.h=b.y-M.t):(M.w=b.x-M.l,M.h=Math.max(g.openHeight,g.headerHeight)),M.direction=o.direction,i&&(u.size()?function(e,t,r,n,a,i){var o,l,s,c=a.direction,u="up"===c||"down"===c,d=a._dims,h=a.active;if(u)for(l=0,s=0;s0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(i)})).remove(),0!==r.length){var s=o.selectAll("g."+f.headerGroupClassName).data(r,h);s.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=l.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;uw,k=l.barLength+2*l.barPad,A=l.barWidth+2*l.barPad,L=p,S=y+g;S+A>c&&(S=c-A);var O=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,l.barColor),M?(this.hbar=O.attr({rx:l.barRadius,ry:l.barRadius,x:L,y:S,width:k,height:A}),this._hbarXMin=L+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var D=g>T,C=l.barWidth+2*l.barPad,P=l.barLength+2*l.barPad,I=p+v,z=y;I+C>s&&(I=s-C);var N=this.container.selectAll("rect.scrollbar-vertical").data(D?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,l.barColor),D?(this.vbar=N.attr({rx:l.barRadius,ry:l.barRadius,x:I,y:z,width:C,height:P}),this._vbarYMin=z+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,E=D?f+C+.5:f+.5,B=d-.5,H=M?h+A+.5:h+.5,j=o._topdefs.selectAll("#"+R).data(M||D?[0]:[]);if(j.exit().remove(),j.enter().append("clipPath").attr("id",R).append("rect"),M||D?(this._clipRect=j.select("rect").attr({x:Math.floor(F),y:Math.floor(B),width:Math.ceil(E)-Math.floor(F),height:Math.ceil(H)-Math.floor(B)}),this.container.call(i.setClipUrl,R,this.gd),this.bg.attr({x:p,y:y,width:v,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||D){var Y=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(V),D&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},l.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},l.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},l.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,l=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,l)-i)/(l-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},l.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var l=t/n;this.vbar.call(i.setTranslate,e,t+l*this._vbarTranslateMax)}}},4284:function(e){"use strict";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},6208:function(e){"use strict";e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}},8164:function(e){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},6880:function(e){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},9104:function(e){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},3448:function(e){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},9032:function(e){"use strict";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},9616:function(e,t){"use strict";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}},4884:function(e,t,r){"use strict";t.version=r(5788).version,r(8324),r(9288);for(var n=r(4040),a=t.register=n.register,i=r(2448),o=Object.keys(i),l=0;l",""," "," "," plotly-logomark "," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},8308:function(e,t){"use strict";t.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},t.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},t.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},t.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},t.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},t.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},1864:function(e,t,r){"use strict";var n=r(435),a=n.mod,i=n.modHalf,o=Math.PI,l=2*o;function s(e){return Math.abs(e[1]-e[0])>l-1e-14}function c(e,t){return i(t-e,l)}function u(e,t){if(s(t))return!0;var r,n;t[0](n=a(n,l))&&(n+=l);var i=a(e,l),o=i+l;return i>=r&&i<=n||o>=r&&o<=n}function f(e,t,r,n,a,i,c){a=a||0,i=i||0;var u,f,d,h,p,v=s([r,n]);function y(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}v?(u=0,f=o,d=l):r=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return f(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return f(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return f(e,t,r,n,a,i,1)}}},8116:function(e,t,r){"use strict";var n=r(3160).decode,a=r(3620),i=Array.isArray,o=ArrayBuffer,l=DataView;function s(e){return o.isView(e)&&!(e instanceof l)}function c(e){return i(e)||s(e)}t.isTypedArray=s,t.isArrayOrTypedArray=c,t.isArray1D=function(e){return!c(e[0])},t.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var u={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function f(e){return e.constructor===ArrayBuffer}function d(e,t,r){if(c(e)){if(c(e[0])){for(var n=r,a=0;aa.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){-1===(a.extras||[]).indexOf(e)?(p(e)&&(e=v(e)),e%1||!n(e)||void 0!==a.min&&ea.max?t.set(r):t.set(+e)):t.set(e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){p(e)&&(e=v(e)),a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(l.get(e,r))}},angle:{coerceFunction:function(e,t,r){p(e)&&(e=v(e)),"auto"===e?t.set("auto"):n(e)?t.set(d(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||f(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!f(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"==typeof e){for(var a=e.split("+"),i=0;i=n&&e<=a?e:u}if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var c=_(r),g=e.charAt(0);!c||"G"!==g&&"g"!==g||(e=e.substr(1),r="");var w=c&&"chinese"===r.substr(0,7),T=e.match(w?x:m);if(!T)return u;var M=T[1],k=T[3]||"1",A=Number(T[5]||1),L=Number(T[7]||0),S=Number(T[9]||0),O=Number(T[11]||0);if(c){if(2===M.length)return u;var D;M=Number(M);try{var C=y.getComponentMethod("calendars","getCal")(r);if(w){var P="i"===k.charAt(k.length-1);k=parseInt(k,10),D=C.newDate(M,C.toMonthIndex(M,k,P),A)}else D=C.newDate(M,Number(k),A)}catch(e){return u}return D?(D.toJD()-v)*f+L*d+S*h+O*p:u}M=2===M.length?(Number(M)+2e3-b)%100+b:Number(M),k-=1;var I=new Date(Date.UTC(2e3,k,A,L,S));return I.setUTCFullYear(M),I.getUTCMonth()!==k||I.getUTCDate()!==A?u:I.getTime()+O*p},n=t.MIN_MS=t.dateTime2ms("-9999"),a=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(e,r){return t.dateTime2ms(e,r)!==u};var T=90*f,M=3*d,k=5*h;function A(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}t.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return u;t||(t=0);var i,o,l,c,m,x,b=Math.floor(10*s(e+.05,1)),w=Math.round(e-b/10);if(_(r)){var L=Math.floor(w/f)+v,S=Math.floor(s(e,f));try{i=y.getComponentMethod("calendars","getCal")(r).fromJD(L).formatDate("yyyy-mm-dd")}catch(e){i=g("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t=n+f&&e<=a-f))return u;var t=Math.floor(10*s(e+.05,1)),r=new Date(Math.round(e-t/10));return A(i("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},t.cleanDate=function(e,r,n){if(e===u)return r;if(t.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(_(n))return l.error("JS Dates and milliseconds are incompatible with world calendars",e),r;if(!(e=t.ms2DateTimeLocal(+e))&&void 0!==r)return r}else if(!t.isDateTime(e,n))return l.error("unrecognized date",e),r;return e};var L=/%\d?f/g,S=/%h/g,O={1:"1",2:"1",3:"2",4:"2"};function D(e,t,r,n){e=e.replace(L,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(e=e.replace(S,(function(){return O[r("%q")(a)]})),_(n))try{e=y.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var C=[59,59.9,59.99,59.999,59.9999];t.formatDate=function(e,t,r,n,a,i){if(a=_(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=s(e+.05,f),n=w(Math.floor(r/d),2)+":"+w(s(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(s(e/p,60),C[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+D(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return D(t,e,n,a)};var P=3*f;t.incrementMonth=function(e,t,r){r=_(r)&&r;var n=s(e,f);if(e=Math.round(e-n),r)try{var a=Math.round(e/f)+v,i=y.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-v)*f+n}catch(t){l.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+P);return c.setUTCMonth(c.getUTCMonth()+t)+n-P},t.findExactDates=function(e,t){for(var r,n,a=0,i=0,l=0,s=0,c=_(t)&&y.getComponentMethod("calendars","getCal")(t),u=0;u1||v<0||v>1?null:{x:e+s*v,y:t+f*v}}function s(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,l=a-t;return o*o+l*l}var s=n*t-a*e;return s*s/r}t.segmentsIntersect=l,t.segmentDistance=function(e,t,r,n,a,i,o,c){if(l(e,t,r,n,a,i,o,c))return 0;var u=r-e,f=n-t,d=o-a,h=c-i,p=u*u+f*f,v=d*d+h*h,y=Math.min(s(u,f,p,a-e,i-t),s(u,f,p,o-e,c-t),s(d,h,v,e-a,t-i),s(d,h,v,r-a,n-i));return Math.sqrt(y)},t.getTextLocation=function(e,t,r,l){if(e===a&&l===i||(n={},a=e,i=l),n[r])return n[r];var s=e.getPointAtLength(o(r-l/2,t)),c=e.getPointAtLength(o(r+l/2,t)),u=Math.atan((c.y-s.y)/(c.x-s.x)),f=e.getPointAtLength(o(r,t)),d={x:(4*f.x+s.x+c.x)/6,y:(4*f.y+s.y+c.y)/6,theta:u};return n[r]=d,d},t.clearLocationCache=function(){a=null},t.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,l=t.top,s=t.bottom,c=0,u=e.getTotalLength(),f=u;function d(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(a=r);var c=r.xo?r.x-o:0,f=r.ys?r.y-s:0;return Math.sqrt(c*c+f*f)}for(var h=d(c);h;){if((c+=h+r)>f)return;h=d(c)}for(h=d(f);h;){if(c>(f-=h+r))return;h=d(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},t.findPointOnPath=function(e,t,r,n){for(var a,i,o,l=(n=n||{}).pathLength||e.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(l)[r]?-1:1,f=0,d=0,h=l;f0?h=a:d=a,f++}return i}},5536:function(e){"use strict";e.exports=function(e){return e}},1396:function(e){"use strict";e.exports=function(e,t){if(!t)return e;var r=1/Math.abs(t),n=r>1?(r*e+r*t)/r:e+t,a=String(n).length;if(a>16){var i=String(t).length;if(a>=String(e).length+i){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(e,t,r){"use strict";var n=r(3428),a=r(4336).E9,i=r(7624).E9,o=r(8248),l=r(9032),s=l.FP_SAFE,c=-s,u=l.BADNUM,f=e.exports={};f.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var d={};f.warnBadFormat=function(e){var t=String(e);d[t]||(d[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=i(f.adjustFormat(e))}catch(t){return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=r(2296),f.keyedContainer=r(7804),f.relativeAttr=r(3193),f.isPlainObject=r(3620),f.toLogRange=r(6896),f.relinkPrivateKeys=r(1528);var h=r(8116);f.isArrayBuffer=h.isArrayBuffer,f.isTypedArray=h.isTypedArray,f.isArrayOrTypedArray=h.isArrayOrTypedArray,f.isArray1D=h.isArray1D,f.ensureArray=h.ensureArray,f.concat=h.concat,f.maxRowLength=h.maxRowLength,f.minRowLength=h.minRowLength;var p=r(435);f.mod=p.mod,f.modHalf=p.modHalf;var v=r(3064);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var y=r(7555);f.dateTime2ms=y.dateTime2ms,f.isDateTime=y.isDateTime,f.ms2DateTime=y.ms2DateTime,f.ms2DateTimeLocal=y.ms2DateTimeLocal,f.cleanDate=y.cleanDate,f.isJSDate=y.isJSDate,f.formatDate=y.formatDate,f.incrementMonth=y.incrementMonth,f.dateTick0=y.dateTick0,f.dfltRange=y.dfltRange,f.findExactDates=y.findExactDates,f.MIN_MS=y.MIN_MS,f.MAX_MS=y.MAX_MS;var g=r(4952);f.findBin=g.findBin,f.sorterAsc=g.sorterAsc,f.sorterDes=g.sorterDes,f.distinctVals=g.distinctVals,f.roundUp=g.roundUp,f.sort=g.sort,f.findIndexOfMin=g.findIndexOfMin,f.sortObjectKeys=r(2996);var m=r(3084);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.geometricMean=m.geometricMean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(2248);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(1864);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(8308);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(2348);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=r(2880);f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var M=r(4248);f.log=M.log,f.warn=M.warn,f.error=M.error;var k=r(3756);f.counterRegex=k.counter;var A=r(1200);f.throttle=A.throttle,f.throttleDone=A.done,f.clearThrottle=A.clear;var L=r(2200);function S(e){var t={};for(var r in e)for(var n=e[r],a=0;as||e=t)&&o(e)&&e>=0&&e%1==0},f.noop=r(6628),f.identity=r(5536),f.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},f.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},f.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),l=0;l=Math.pow(2,r)?a>10?(f.warn("randstr failed uniqueness"),s):e(t,r,n,(a||0)+1):s},f.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,l=2*o,s=2*t-1,c=new Array(s),u=new Array(o);for(r=0;r=l&&(a-=l*Math.floor(a/l)),a<0?a=-1-a:a>=o&&(a=l-1-a),i+=e[a]*c[n];u[r]=i}return u},f.syncOrAsync=function(e,t,r){var n;function a(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},f.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n0?t:0}))},f.fillArray=function(e,t,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(e))for(var a=0;a1?a+o[1]:"";if(i&&(o.length>1||l.length>4||r))for(;n.test(l);)l=l.replace(n,"$1"+i+"$2");return l+s},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var N=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,n){var a;return N.test(n)?a=t[n]:(r[n]=r[n]||f.nestedProperty(t,n).get,a=r[n]()),f.isValidTextValue(a)?a:""}))};var R={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return j.apply(R,arguments)};var F={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return j.apply(F,arguments)};var E=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,B={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=function(){return j.apply(B,arguments)};var H=/^[:|\|]/;function j(e,t,r){var n=this,i=arguments;t||(t={});var o={};return e.replace(f.TEMPLATE_STRING_REGEX,(function(e,l,s){var c="_xother"===l||"_yother"===l,u="_xother_"===l||"_yother_"===l,d="xother_"===l||"yother_"===l,h="xother"===l||"yother"===l||c||d||u,p=l;(c||u)&&(p=p.substring(1)),(d||u)&&(p=p.substring(0,p.length-1));var v,y,g,m=null,x=null;if(n.parseMultDiv){var b=function(e){var t=e.match(E);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(p);p=b.key,m=b.op,x=b.number}if(h){if(void 0===(v=t[p]))return""}else for(g=3;g=48&&o<=57,c=l>=48&&l<=57;if(s&&(n=10*n+o-48),c&&(a=10*a+l-48),!s||!c){if(n!==a)return n-a;if(o!==l)return o-l}}return a-n};var Y=2e9;f.seedPseudoRandom=function(){Y=2e9},f.pseudoRandom=function(){var e=Y;return Y=(69069*Y+1)%4294967296,Math.abs(Y-e)<429496729?f.pseudoRandom():Y/4294967296},f.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(a))return n(a);var i=f.extractOption(e,t,"tx","text");return f.isValidTextValue(i)?n(i):void 0},f.isValidTextValue=function(e){return e||0===e},f.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,f.strTranslate(a-c*(r+o),i-c*(n+l))+f.strScale(c)+(s?"rotate("+s+(t?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},f.bigFont=function(e){return Math.round(1.2*e)};var V=f.getFirefoxVersion(),U=null!==V&&V<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},3620:function(e){"use strict";e.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},7804:function(e,t,r){"use strict";var n=r(2296),a=/^\w*$/;e.exports=function(e,t,r,i){var o,l,s;r=r||"name",i=i||"value";var c={};t&&t.length?(s=n(e,t),l=s.get()):l=e,t=t||"";var u={};if(l)for(o=0;o2)return c[t]=2|c[t],d.set(e,null);if(f){for(o=t;o1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(n.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(n.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}},988:function(e,t,r){"use strict";var n=r(3428);e.exports=function(e,t,r){var a=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=n.select(this)})),a}},2248:function(e,t,r){"use strict";var n=r(6524);t.init2dArray=function(e,t){for(var r=new Array(e),n=0;nt/2?e-Math.round(e/t)*t:e}}},2296:function(e,t,r){"use strict";var n=r(8248),a=r(8116).isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,l,s,c=e;for(l=0;l/g),s=0;si||c===a||cl||t&&s(e))}:function(e,t){var s=e[0],c=e[1];if(s===a||si||c===a||cl)return!1;var u,f,d,h,p,v=r.length,y=r[0][0],g=r[0][1],m=0;for(u=1;uMath.max(f,y)||c>Math.max(d,g)))if(cu||Math.abs(n(o,d))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var l=r.length,s=n;r.splice(a+1);for(var c=s+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}},4296:function(e,t,r){"use strict";var n=r(8248),a=r(5928);e.exports=function(e){var t;if("string"!=typeof(t=e&&e.hasOwnProperty("userAgent")?e.userAgent:function(){var e;return"undefined"!=typeof navigator&&(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),e}()))return!0;var r=a({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!r)for(var i=t.split(" "),o=1;o-1;l--){var s=i[l];if("Version/"===s.substr(0,8)){var c=s.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},2416:function(e){"use strict";e.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;na.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;rt}function f(e,t){return e>=t}t.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-l)-1:Math.floor((e-t.start)/t.size+l);var i,o,d=0,h=t.length,p=0,v=h>1?(t[h-1]-t[0])/(h-1):1;for(o=v>=0?r?s:c:r?f:u,e+=v*l*(r?-1:1)*(v>=0?1:-1);d90&&a.log("Long binary search..."),d-1},t.sorterAsc=function(e,t){return e-t},t.sorterDes=function(e,t){return t-e},t.distinctVals=function(e){var r,n=e.slice();for(n.sort(t.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var a,i=n[r]-n[0]||1,l=i/(r||1)/1e4,s=[],c=0;c<=r;c++){var u=n[c],f=u-a;void 0===a?(s.push(u),a=u):f>l&&(i=Math.min(i,f),s.push(u),a=u)}return{vals:s,minDiff:i}},t.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,l=r?0:1,s=r?1:0,c=r?Math.ceil:Math.floor;a0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},t.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ai.length)&&(o=i.length),n(r)||(r=!1),a(i[0])){for(s=new Array(o),l=0;le.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},2736:function(e,t,r){"use strict";var n=r(3428),a=r(3400),i=a.strTranslate,o=r(9616),l=r(4284).LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(e,r,y){var L=e.text(),S=!e.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&L.match(s),C=n.select(e.node().parentNode);if(!C.empty()){var P=e.attr("class")?e.attr("class").split(" ")[0]:"text";return P+="-math",C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove(),e.style("display",null).attr({"data-unformatted":L,"data-math":"N"}),S?(r&&r._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),o={fontSize:r};!function(e,t,r){var i,o,l,s,d=parseInt((MathJax.version||"").split(".")[0]);if(2===d||3===d){var h=function(){var r="math-output-"+a.randstr({},64),i=(s=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===d?MathJax.Hub.Typeset(i):MathJax.typeset([i])},p=function(){var t=s.select(2===d?".MathJax_SVG":".MathJax"),i=!t.empty()&&s.select("svg").node();if(i){var o,l=i.getBoundingClientRect();o=2===d?n.select("body").select("#MathJax_SVG_glyphs"):t.select("defs"),r(t,o,l)}else a.log("There was an error in the tex syntax.",e),r();s.remove()};2===d?MathJax.Hub.Queue((function(){return o=a.extendDeepAll({},MathJax.Hub.config),l=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),h,p,(function(){if("SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==l&&(MathJax.Hub.processSectionDelay=l),MathJax.Hub.Config(o)})):3===d&&(o=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f,"svg"!==(i=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){h(),p(),"svg"!==i&&(MathJax.config.startup.output=i),MathJax.config=o})))}else a.warn("No MathJax version:",MathJax.version)}(S[2],o,(function(n,a,o){C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove();var l=n&&n.select("svg");if(!l||!l.node())return I(),void t();var s=C.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":L,"data-math":"Y"});s.node().appendChild(l.node()),a&&a.node()&&l.node().insertBefore(a.node().cloneNode(!0),l.node().firstChild);var c=o.width,u=o.height;l.attr({class:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=e.node().style.fill||"black",d=l.select("g");d.attr({fill:f,stroke:f});var h=d.node().getBoundingClientRect(),p=h.width,v=h.height;(p>c||v>u)&&(l.style("overflow","hidden"),p=(h=l.node().getBoundingClientRect()).width,v=h.height);var g=+e.attr("x"),m=+e.attr("y"),x=-(r||e.node().getBoundingClientRect().height)/4;if("y"===P[0])s.attr({transform:"rotate("+[-90,g,m]+")"+i(-p/2,x-v/2)});else if("l"===P[0])m=x-v/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))g=0,m=x;else{var b=e.attr("text-anchor");g-=p*("middle"===b?.5:"end"===b?1:0),m=m+x-v/2}l.attr({x:g,y:m}),y&&y.call(e,s),t(s)}))}))):I(),e}function I(){C.empty()||(P=e.attr("class")+"-math",C.select("svg."+P).remove()),e.text("").style("white-space","pre");var r=function(e,t){t=t.replace(g," ");var r,i=!1,s=[],c=-1;function u(){c++;var t=document.createElementNS(o.svg,"tspan");n.select(t).attr({class:"line",dy:c*l+"em"}),e.appendChild(t),r=t;var a=s;if(s=[{node:t}],a.length>1)for(var i=1;i doesnt match end tag <"+e+">. Pretending it did match.",t),r=s[s.length-1].node}else a.log("Ignoring unexpected end tag "+e+">.",t)}b.test(t)?u():(r=e,s=[{node:e}]);for(var S=t.split(m),C=0;C|>|>)/g,f=[["$","$"],["\\(","\\)"]],d={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",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"},p={sub:"-0.21em",sup:"0.42em"},v="",y=["http:","https:","mailto:","",void 0,":"],g=t.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/
/i;t.BR_TAG_ALL=/
/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,M=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&O(n)}var A=/(^|;)\s*color:/;t.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a=e.split(m),i=[],o="",l=0,s=0;s3?i.push(c.substr(0,h-3)+"..."):i.push(c.substr(0,h));break}o=""}}return i.join("")};var L={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function O(e){return e.replace(S,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):L[t])||e}))}function D(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var a=r.protocol,i=n.protocol;return-1!==y.indexOf(a)&&-1!==y.indexOf(i)?t:""}function C(e,t,r){var n,i,o,l=r.horizontalAlign,s=r.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return i="bottom"===s?function(){return c.bottom-n.height}:"middle"===s?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===l?function(){return c.right-n.width}:"center"===l?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=i()-u.top,l=r.gd||{};if(r.gd){l._fullLayout._calcInverseTransform(l);var s=a.apply3DTransform(l._fullLayout._invTransform)(e,t);e=s[0],t=s[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}t.convertEntities=O,t.sanitizeHTML=function(e){e=e.replace(g," ");for(var t=document.createElement("p"),r=t,a=[],i=e.split(m),o=0;oi.ts+t?s():i.timer=setTimeout((function(){s(),i.timer=null}),t)},t.done=function(e){var t=r[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},t.clear=function(e){if(e)n(r[e]),delete r[e];else for(var a in r)t.clear(a)}},6896:function(e,t,r){"use strict";var n=r(8248);e.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},1680:function(e){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(e){"use strict";e.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"}}},9820:function(e,t,r){"use strict";var n=r(4040);e.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],l=0;l0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},t.cleanLayout=function(e){var r,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(l.subplotsRegistry.cartesian||{}).attrRegex,s=(l.subplotsRegistry.polar||{}).attrRegex,f=(l.subplotsRegistry.ternary||{}).attrRegex,d=(l.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(e);for(r=0;r3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),p(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&t.cleanLayout(e.template.layout),e},t.cleanData=function(e){for(var r=0;r0)return e.substr(0,t)}t.hasParent=function(e,t){for(var r=b(t);r;){if(r in e)return!0;r=b(r)}return!1};var _=["x","y","z"];t.clearAxisTypes=function(e,t,r){for(var n=0;n1&&i.warn("Full array edits are incompatible with other edits",f);var m=r[""][""];if(c(m))t.set(null);else{if(!Array.isArray(m))return i.warn("Unrecognized full array edit value",f,m),!0;t.set(m)}return!v&&(d(y,g),h(e),!0)}var x,b,_,w,T,M,k,A,L=Object.keys(r).map(Number).sort(o),S=t.get(),O=S||[],D=u(g,f).get(),C=[],P=-1,I=O.length;for(x=0;xO.length-(k?0:1))i.warn("index out of range",f,_);else if(void 0!==M)T.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(M)?C.push(_):k?("add"===M&&(M={}),O.splice(_,0,M),D&&D.splice(_,0,{})):i.warn("Unrecognized full object edit value",f,_,M),-1===P&&(P=_);else for(b=0;b=0;x--)O.splice(C[x],1),D&&D.splice(C[x],1);if(O.length?S||t.set(O):t.set(null),v)return!1;if(d(y,g),p!==a){var z;if(-1===P)z=L;else{for(I=Math.max(O.length,I),z=[],x=0;x=P);x++)z.push(_);for(x=P;x=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function z(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),I(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&I(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function N(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var i in I(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==t[i].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,r,n);for(var s=function(e,t,r,n){var i,s,c,u,f,d=o.isPlainObject(n),h=[];for(var p in Array.isArray(r)||(r=[r]),r=P(r,e.data.length-1),t)for(var v=0;v-1&&-1===r.indexOf("grouptitlefont")?s(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?s(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?s(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&s(r,r.replace("titleoffset","title.offset")):s(r,r.replace("title","title.text"));function s(t,r){e[r]=e[t],delete e[t]}}function V(e,t,r){e=o.getGraphDiv(e),T.clearPromiseQueue(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=X(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var l=[d.previousPromises];i.layoutReplot?l.push(M.layoutReplot):Object.keys(n).length&&(U(e,i,a)||d.supplyDefaults(e),i.legend&&l.push(M.doLegend),i.layoutstyle&&l.push(M.layoutStyles),i.axrange&&G(l,a.rangesAltered),i.ticks&&l.push(M.doTicksRelayout),i.modebar&&l.push(M.doModeBar),i.camera&&l.push(M.doCamera),i.colorbars&&l.push(M.doColorBars),l.push(S)),l.push(d.rehover,d.redrag,d.reselect),c.add(e,V,[e,a.undoit],V,[e,a.redoit]);var s=o.syncOrAsync(l,e);return s&&s.then||(s=Promise.resolve(e)),s.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function U(e,t,r){var n,a,i=e._fullLayout;if(!t.axrange)return!1;for(var l in t)if("axrange"!==l&&t[l])return!1;var s=function(e,t){return o.coerce(n,a,v,e,t)},c={};for(var u in r.rangesAltered){var f=h.id2name(u);if(n=e.layout[f],a=i[f],p(n,a,s,c),a._matchGroup)for(var d in a._matchGroup)if(d!==u){var y=i[h.id2name(d)];y.autorange=a.autorange,y.range=a.range.slice(),y._input.range=a.range.slice()}}return!0}function G(e,t){var r=t?function(e){var r=[];for(var n in t){var a=h.getFromId(e,n);if(r.push(n),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var i in a._matchGroup)t[i]||r.push(i)}return h.draw(e,r,{skipTitle:!0})}:function(e){return h.draw(e,"redraw")};e.push(b,M.doAutoRangeAndConstraints,r,M.drawData,M.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Z=/^[xyz]axis[0-9]*\.autorange$/,W=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(e,t){var r,n,a,i=e.layout,s=e._fullLayout,c=s._guiEditing,d=B(s._preGUI,c),p=Object.keys(t),v=h.list(e),y=o.extendDeepAll({},t),g={};for(Y(t),p=Object.keys(t),n=0;n0&&"string"!=typeof I.parts[N];)N--;var R=I.parts[N],F=I.parts[N-1]+"."+R,H=I.parts.slice(0,N).join("."),j=l(e.layout,H).get(),V=l(s,H).get(),U=I.get();if(void 0!==z){M[P]=z,L[P]="reverse"===R?z:E(U);var G=f.getLayoutValObject(s,I.parts);if(G&&G.impliedEdits&&null!==z)for(var X in G.impliedEdits)S(o.relativeAttr(P,X),G.impliedEdits[X]);if(-1!==["width","height"].indexOf(P))if(z){S("autosize",null);var K="height"===P?"width":"height";S(K,s[K])}else s[P]=e._initialAutoSize[P];else if("autosize"===P)S("width",z?null:s.width),S("height",z?null:s.height);else if(F.match(q))C(F),l(s,H+"._inputRange").set(null);else if(F.match(Z)){C(F),l(s,H+"._inputRange").set(null);var Q=l(s,H).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else F.match(W)&&l(s,H+"._inputDomain").set(null);if("type"===R){O=j;var $="linear"===V.type&&"log"===z,ee="log"===V.type&&"linear"===z;if($||ee){if(O&&O.range)if(V.autorange)$&&(O.range=O.range[1]>O.range[0]?[1,2]:[2,1]);else{var te=O.range[0],re=O.range[1];$?(te<=0&&re<=0&&S(H+".autorange",!0),te<=0?te=re/1e6:re<=0&&(re=te/1e6),S(H+".range[0]",Math.log(te)/Math.LN10),S(H+".range[1]",Math.log(re)/Math.LN10)):(S(H+".range[0]",Math.pow(10,te)),S(H+".range[1]",Math.pow(10,re)))}else S(H+".autorange",!0);Array.isArray(s._subplots.polar)&&s._subplots.polar.length&&s[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete s[I.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,V,z,S),u.getComponentMethod("images","convertCoords")(e,V,z,S)}else S(H+".autorange",!0),S(H+".range",null);l(s,H+"._inputRange").set(null)}else if(R.match(A)){var ne=l(s,P).get(),ae=(z||{}).type;ae&&"-"!==ae||(ae="linear"),u.getComponentMethod("annotations","convertCoords")(e,ne,ae,S),u.getComponentMethod("images","convertCoords")(e,ne,ae,S)}var ie=w.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var oe=ie.property,le=G||{editType:"calc"};""!==n&&""===oe&&(w.isAddVal(z)?L[P]=null:w.isRemoveVal(z)?L[P]=(l(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),k.update(_,le),g[r]||(g[r]={});var se=g[r][n];se||(se=g[r][n]={}),se[oe]=z,delete t[P]}else"reverse"===R?(j.range?j.range.reverse():(S(H+".autorange",!0),j.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):("dragmode"===P&&(!1===z&&!1!==U||!1!==z&&!1===U)||s._has("scatter-like")&&s._has("regl")&&"dragmode"===P&&("lasso"===z||"select"===z)&&"lasso"!==U&&"select"!==U||s._has("gl2d")?_.plot=!0:G?k.update(_,G):_.calc=!0,I.set(z))}}for(r in g)w.applyContainerArrayChanges(e,d(i,r),g[r],_,d)||(_.plot=!0);for(var ce in D){var ue=(O=h.getFromId(e,ce))&&O._constraintGroup;if(ue)for(var fe in _.calc=!0,ue)D[fe]||(h.getFromId(e,fe)._constraintShrinkable=!0)}(J(e)||t.height||t.width)&&(_.plot=!0);var de=s.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=l(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ne(e,t){for(var r=0;r=a.length?a[0]:a[e]:a}function s(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){function f(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,d.transition(e,t.frame.data,t.frame.layout,T.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};t()}var h,p,v=0;function y(e){return Array.isArray(a)?v>=a.length?e.transitionOpts=a[v]:e.transitionOpts=a[0]:e.transitionOpts=a,v++,e}var g=[],m=null==t,x=Array.isArray(t);if(m||x||!o.isPlainObject(t)){if(m||-1!==["string","number"].indexOf(typeof t))for(h=0;h0&&ww)&&M.push(p);g=M}}g.length>0?function(t){if(0!==t.length){for(var a=0;a=0;n--)if(o.isPlainObject(t[n])){var v=t[n].name,y=(u[v]||p[v]||{}).name,g=t[n].name,m=u[y]||p[y];y&&g&&"number"==typeof g&&m&&L<5&&(L++,o.warn('addFrames: overwriting frame "'+(u[y]||p[y]).name+'" with a frame whose name of type "number" also equates to "'+y+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===L&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[v]={name:v},h.push({frame:d.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"==typeof(a=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var s=d.modifyFrames,u=d.modifyFrames,f=[e,l],h=[e,i];return c&&c.add(e,s,f,u,h),d.modifyFrames(e,i)},t.addTraces=function e(r,n,a){r=o.getGraphDiv(r);var i,l,s=[],u=t.deleteTraces,f=e,d=[r,s],h=[r,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&r=0&&r=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!_(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function _(e){return e===Math.round(e)&&e>=0}function w(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry)if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a=s.length)return!1;a=(r=(n.transformsRegistry[s[c].type]||{}).attributes)&&r[t[2]],l=3}else{var u=e._module;if(u||(u=(n.modules[e.type||i.type.dflt]||{})._module),!u)return!1;if(!(a=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(a=f.attributes[o])}a||(a=i[o])}return b(a,t,l)},t.getLayoutValObject=function(e,t){var r=function(e,t){var r,a,i,l,s=e._basePlotModules;if(s){var c;for(r=0;r=a&&(r._input||{})._templateitemname;l&&(o=a);var s,c=t+"["+o+"]";function u(){s={},l&&(s[c]={},s[c][i]=l)}function f(e,t){l?n.nestedProperty(s[c],e).set(t):s[c+"."+e]=t}function d(){var e=s;return u(),e}return u(),{modifyBase:function(e,t){s[e]=t},modifyItem:f,getUpdateObj:d,applyUpdate:function(t,r){t&&f(t,r);var a=d();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},9172:function(e,t,r){"use strict";var n=r(3428),a=r(4040),i=r(7316),o=r(3400),l=r(2736),s=r(3696),c=r(6308),u=r(3616),f=r(1668),d=r(3080),h=r(4460),p=r(4284),v=r(1888),y=v.enforce,g=v.clean,m=r(9280).doAutoRange,x="start",b=r(3816).zindexSeparator;function _(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function w(e){var r,a,l,s,f,v,y=e._fullLayout,g=y._size,m=g.p,x=h.list(e,"",!0);if(y._paperdiv.style({width:e._context.responsive&&y.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":y.width+"px",height:e._context.responsive&&y.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":y.height+"px"}).selectAll(".main-svg").call(u.setSize,y.width,y.height),e._context.setBackground(e,y.paper_bgcolor),t.drawMainTitle(e),d.manage(e),!y._has("cartesian"))return i.previousPromises(e);function w(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-m-n:t._offset+t._length+m+n:g.t+g.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+m+n:t._offset-m-n:g.l+g.w*(e.position||0)+n%1}for(r=0;r.5?"t":"b",o=e._fullLayout.margin[i],l=0;return"paper"===t.yref?l=r+t.pad.t+t.pad.b:"container"===t.yref&&(l=function(e,t,r,n,a){var i=0;return"middle"===r&&(i+=a/2),"t"===e?("top"===r&&(i+=a),i+=n-t*n):("bottom"===r&&(i+=a),i+=t*n),i}(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),l>o?l:0}(e,t,v);if(y>0){!function(e,t,r,n){var a="title.automargin",l=e._fullLayout.title,s=l.y>.5?"t":"b",c={x:l.x,y:l.y,t:0,b:0},u={};"paper"===l.yref&&function(e,t,r,n,a){var i="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,l=o.isTopAnchor(t)?n:n-a,s="b"===r?i-l:l;return!(o.isTopAnchor(t)&&"t"===r||o.isBottomAnchor(t)&&"b"===r)&&sT?u.push({code:"unused",traceType:m,templateCount:w,dataCount:T}):T>w&&u.push({code:"reused",traceType:m,templateCount:w,dataCount:T})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=v(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&y(i)&&e(i,o)}}({data:h,layout:d},""),u.length)return u.map(g)}},7024:function(e,t,r){"use strict";var n=r(8248),a=r(6424),i=r(7316),o=r(3400),l=r(7030),s=r(7164),c=r(3268),u=r(5788).version,f={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(e,t){var r,d,h,p;function v(e){return!(e in t)||o.validate(t[e],f[e])}if(t=t||{},o.isPlainObject(e)?(r=e.data||[],d=e.layout||{},h=e.config||{},p={}):(e=o.getGraphDiv(e),r=o.extendDeep([],e.data),d=o.extendDeep({},e.layout),h=e._context,p=e._fullLayout||{}),!v("width")&&null!==t.width||!v("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!v("format"))throw new Error("Export format is not "+o.join2(f.format.values,", "," or ")+".");var y={};function g(e,r){return o.coerce(t,y,f,e,r)}var m=g("format"),x=g("width"),b=g("height"),_=g("scale"),w=g("setBackground"),T=g("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var k=o.extendFlat({},d);x?k.width=x:null===t.width&&n(p.width)&&(k.width=p.width),b?k.height=b:null===t.height&&n(p.height)&&(k.height=p.height);var A=o.extendFlat({},h,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),L=l.getRedrawFunc(M);function S(){return new Promise((function(e){setTimeout(e,l.getDelay(M._fullLayout))}))}function O(){return new Promise((function(e,t){var r=s(M,m,_),n=M._fullLayout.width,f=M._fullLayout.height;function d(){a.purge(M),document.body.removeChild(M)}if("full-json"===m){var h=i.graphJson(M,!1,"keepdata","object",!0,!0);return h.version=u,h=JSON.stringify(h),d(),e(T?h:l.encodeJSON(h))}if(d(),"svg"===m)return e(T?r:l.encodeSVG(r));var p=document.createElement("canvas");p.id=o.randstr(),c({format:m,width:n,height:f,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.newPlot(M,r,k,A).then(L).then(S).then(O).then((function(t){e(function(e){return T?e.replace(l.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},1480:function(e,t,r){"use strict";var n=r(3400),a=r(7316),i=r(3060),o=r(556).dfltConfig,l=n.isPlainObject,s=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,a,i,o){o=o||[];for(var f=Object.keys(e),d=0;dx.length&&a.push(h("unused",i,g.concat(x.length)));var k,A,L,S,O,D=x.length,C=Array.isArray(M);if(C&&(D=Math.min(D,M.length)),2===b.dimensions)for(A=0;Ax[A].length&&a.push(h("unused",i,g.concat(A,x[A].length)));var P=x[A].length;for(k=0;k<(C?Math.min(P,M[A].length):P);k++)L=C?M[A][k]:M,S=m[A][k],O=x[A][k],n.validate(S,L)?O!==S&&O!==+S&&a.push(h("dynamic",i,g.concat(A,k),S,O)):a.push(h("value",i,g.concat(A,k),S))}else a.push(h("array",i,g.concat(A),m[A]));else for(A=0;A1&&d.push(h("object","layout"))),a.supplyDefaults(p);for(var v=p._fullData,y=r.length,g=0;g0&&Math.round(f)===f))return{vals:a};c=f}for(var d=t.calendar,h="start"===s,p="end"===s,v=e[r+"period0"],y=i(v,d)||0,g=[],m=[],x=[],b=a.length,_=0;_k;)M=o(M,-c,d);for(;M<=k;)M=o(M,c,d);T=o(M,-c,d)}else{for(M=y+(w=Math.round((k-y)/u))*u;M>k;)M-=u;for(;M<=k;)M+=u;T=M-u}g[_]=h?T:p?M:(T+M)/2,m[_]=T,x[_]=M}return{vals:g,starts:m,ends:x}}},6720:function(e){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},9280:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(3400),o=r(9032).FP_SAFE,l=r(4040),s=r(3616),c=r(9811),u=c.getFromId,f=c.isLinked;function d(e,t){var r,n,a=[],o=e._fullLayout,l=p(o,t,0),s=p(o,t,1),c=y(e,t),u=c.min,f=c.max;if(0===u.length||0===f.length)return i.simpleMap(t.range,t.r2l);var d=u[0].val,v=f[0].val;for(r=1;r0&&((k=D-l(b)-s(_))>C?A/k>P&&(w=b,T=_,P=A/k):A/D>P&&(w={val:b.val,nopad:1},T={val:_.val,nopad:1},P=A/D));if(d===v){var I=d-1,z=d+1;if(S)if(0===d)a=[0,1];else{var N=(d>0?f:u).reduce((function(e,t){return Math.max(e,s(t))}),0),R=d/(1-Math.min(.5,N/D));a=d>0?[0,R]:[R,0]}else a=O?[Math.max(0,I),Math.max(1,z)]:[I,z]}else S?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):O&&(w.val-P*l(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),P=(T.val-w.val-h(t,b.val,_.val))/(D-l(w)-s(T)),a=[w.val-P*l(w),T.val+P*s(T)];return a=M(a,t),t.limitRange&&t.limitRange(),m&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function h(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),L=k((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=k(r.vpadplus||r.vpad),O=k(r.vpadminus||r.vpad);if(!T){if(d=1/0,h=-1/0,w)for(n=0;n0&&(d=i),i>h&&i-o&&(d=i),i>h&&i=P;n--)C(n);return{min:p,max:v,opts:r}},concatExtremes:y};var v=3;function y(e,t,r){var n,a,i,o=t._id,l=e._fullData,s=e._fullLayout,c=[],f=[];function d(e,t){for(n=0;n=r&&(c.extrapad||!o)){l=!1;break}a(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(s,1),s--)}if(l){var u=i&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function b(e){return a(e)&&Math.abs(e)=t}function T(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))=c&&(o=c,r=c),l<=c&&(l=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&T(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&T(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&T(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&T(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}},6808:function(e){"use strict";e.exports=function(e,t,r){var n,a;if(r){var i="reversed"===t||"min reversed"===t||"max reversed"===t;n=r[i?1:0],a=r[i?0:1]}var o=e("autorangeoptions.minallowed",null===a?n:void 0),l=e("autorangeoptions.maxallowed",null===n?a:void 0);void 0===o&&e("autorangeoptions.clipmin"),void 0===l&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},4460:function(e,t,r){"use strict";var n=r(3428),a=r(8248),i=r(7316),o=r(4040),l=r(3400),s=l.strTranslate,c=r(2736),u=r(1668),f=r(6308),d=r(3616),h=r(4724),p=r(8728),v=r(9032),y=v.ONEMAXYEAR,g=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,T=v.ONEAVGMONTH,M=v.ONEMINMONTH,k=v.ONEWEEK,A=v.ONEDAY,L=A/2,S=v.ONEHOUR,O=v.ONEMIN,D=v.ONESEC,C=v.ONEMILLI,P=v.ONEMICROSEC,I=v.MINUS_SIGN,z=v.BADNUM,N={K:"zeroline"},R={K:"gridline",L:"path"},F={K:"minor-gridline",L:"path"},E={K:"tick",L:"path"},B={K:"tick",L:"text"},H={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},j=r(4284),Y=j.MID_SHIFT,V=j.CAP_SHIFT,U=j.LINE_SPACING,G=j.OPPOSITE_SIDE,q=e.exports={};q.setConvert=r(8344);var Z=r(2976),W=r(9811),X=W.idSort,J=W.isLinked;q.id2name=W.id2name,q.name2id=W.name2id,q.cleanId=W.cleanId,q.list=W.list,q.listIds=W.listIds,q.getFromId=W.getFromId,q.getFromTrace=W.getFromTrace;var K=r(9280);q.getAutoRange=K.getAutoRange,q.findExtremes=K.findExtremes;var Q=1e-4;function $(e){var t=(e[1]-e[0])*Q;return[e[0]-t,e[1]+t]}q.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=s[0]||("string"==typeof i?i:i[0])),i||(i=a),s=s.concat(s.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:s.concat(i?"string"==typeof i?[i]:i:[]),dflt:a},l.coerce(e,t,u,c)},q.getRefType=function(e){return void 0===e?e:"paper"===e?"paper":"pixel"===e?"pixel":/( domain)$/.test(e)?"domain":"range"},q.coercePosition=function(e,t,r,n,a,i){var o,s;if("range"!==q.getRefType(n))o=l.ensureNumber,s=r(a,i);else{var c=q.getFromId(t,n);s=r(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(s)},q.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?l.ensureNumber:q.getFromId(t,r).cleanPos)(e)},q.redrawComponents=function(e,t){t=t||q.listIds(e);var r=e._fullLayout;function n(n,a,i,l){for(var s=o.getComponentMethod(n,a),c={},u=0;un&&d2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},q.saveRangeInitial=function(e,t){for(var r=q.list(e,"",!0),n=!1,a=0;a.3*d||u(n)||u(i))){var h=r.dtick/2;e+=e+h.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=q.tickIncrement(e,"M6","reverse")+1.5*A:i.exactMonths>.8?e=q.tickIncrement(e,"M1","reverse")+15.5*A:e-=L;var s=q.tickIncrement(e,r);if(s<=n)return s}return e}(m,e,g,c,i)),y=m;y<=u;)y=q.tickIncrement(y,g,!1,i);return{start:t.c2r(m,0,i),end:t.c2r(y,0,i),size:g,_dataSpan:u-c}},q.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n,i=t.dtick&&a(t._tmin);if(i){var o=q.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,.99*o+.01*t._tmin]}else{var s=l.simpleMap(t.range,t.r2l);n=[s[0],.8*s[0]+.2*s[1]]}if(e.range=l.simpleMap(n,t.l2r),e._isMinor=!0,q.prepTicks(e,r),i){var c=a(t.dtick),u=a(e.dtick),f=c?t.dtick:+t.dtick.substring(1),d=u?e.dtick:+e.dtick.substring(1);c&&u?ne(f,d)?f===2*k&&d===2*A&&(e.dtick=k):f===2*k&&d===3*A?e.dtick=k:f!==k||(t._input.minor||{}).nticks?ae(f/d,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=A:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":ne(f,d)?f>=12&&2===d&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ne(f,d)||(e.dtick=ae(f/d,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},q.prepTicks=function(e,t){var r=l.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,i=e.nticks;i||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?l.bigFont(e.tickfont.size||12):15,i=e._length/n):(n="y"===e._id.charAt(0)?40:80,i=l.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(i*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,q.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(a(e.dtick)||"M"!==e.dtick.charAt(0))}var n=r(),i=q.getTickFormat(e);if(i){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(t=S,o&&!n&&e.dticke.range[1],h=!e.ticklabelindex||l.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],p=l.simpleMap(e.range,e.r2l,void 0,void 0,t),v=p[1]=(Y?0:1);V--){var U=!V;V?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var G=V?e:l.extendFlat({},e,e.minor);if(U?q.prepMinorTicks(G,e,t):q.prepTicks(G,t),"array"!==G.tickmode)if("sync"!==G.tickmode){var Z=$(p),W=Z[0],X=Z[1],J=a(G.dtick),K="log"===s&&!(J||"L"===G.dtick.charAt(0)),Q=q.tickFirst(G,t);if(V){if(e._tmin=Q,Q=X:ne<=X;ne=q.tickIncrement(ne,ae,v,c)){if(V&&ee++,G.rangebreaks&&!v){if(ne=N)break}if(B.length>R||ne===re)break;re=ne;var ie={value:ne};V?(K&&ne!==(0|ne)&&(ie.simpleLabel=!0),u>1&&ee%u&&(ie.skipLabel=!0),B.push(ie)):(ie.minor=!0,H.push(ie))}}else B=[],F=le(e);else V?(B=[],F=se(e,!U)):(H=[],E=se(e,!U))}!H||H.length<2?h=!1:(r=(H[1].value-H[0].value)*(d?-1:1),n=e.tickformat,(/%f/.test(n)?r>=P:/%L/.test(n)?r>=C:/%[SX]/.test(n)?r>=D:/%M/.test(n)?r>=O:/%[HI]/.test(n)?r>=S:/%p/.test(n)?r>=L:/%[Aadejuwx]/.test(n)?r>=A:/%[UVW]/.test(n)?r>=k:/%[Bbm]/.test(n)?r>=M:/%[q]/.test(n)?r>=_:!/%[Yy]/.test(n)||r>=m)||(h=!1));if(h){var oe=B.concat(H);f&&B.length&&(oe=oe.slice(1)),(oe=oe.sort((function(e,t){return e.value-t.value})).filter((function(e,t,r){return 0===t||e.value!==r[t-1].value}))).map((function(e,t){return void 0!==e.minor||e.skipLabel?null:t})).filter((function(e){return null!==e})).forEach((function(e){h.map((function(t){var r=e+t;r>=0&&r0?(i=n-1,o=n):(i=n,o=n);var l,s=e[i].value,c=e[o].value,u=Math.abs(c-s),f=r||u,d=0;f>=m?d=u>=m&&u<=y?u:g:r===b&&f>=_?d=u>=_&&u<=x?u:b:f>=M?d=u>=M&&u<=w?u:T:r===k&&f>=k?d=k:f>=A?d=A:r===L&&f>=L?d=L:r===S&&f>=S&&(d=S),d>=u&&(d=u,l=!0);var h=a+d;if(t.rangebreaks&&d>0){for(var p=0,v=0;v<84;v++){var O=(v+.5)/84;t.maskBreaks(a*(1-O)+O*h)!==z&&p++}(d*=p/84)||(e[n].drop=!0),l&&u>k&&(d=u)}(d>0||0===n)&&(e[n].periodX=a+d/2)}}(j,e,e._definedDelta),e.rangebreaks){var ye="y"===e._id.charAt(0),ge=1;"auto"===e.tickmode&&(ge=e.tickfont?e.tickfont.size:12);var me=NaN;for(i=B.length-1;i>-1;i--)if(B[i].drop)B.splice(i,1);else{B[i].value=Fe(B[i].value,e);var xe=e.c2p(B[i].value);(ye?me>xe-ge:meN||nN&&(r.periodX=N),n10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=A&&i<=10||t>=15*A)e._tickround="d";else if(t>=O&&i<=16||t>=S)e._tickround="M";else if(t>=D&&i<=19||t>=O)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var l=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(l[0]),Math.abs(l[1])),c=Math.floor(Math.log(s)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(be(e.exponentformat)&&!_e(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function me(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}q.autoTicks=function(e,t,r){var n;function i(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=l.dateTick0(e.calendar,0);var o=2*t;if(o>g)t/=g,n=i(10),e.dtick="M"+12*ye(t,n,ce);else if(o>T)t/=T,e.dtick="M"+ye(t,1,ue);else if(o>A){if(e.dtick=ye(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:de),!r){var s=q.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(s)?e.tick0=l.dateTick0(e.calendar,2):e.tick0=l.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else o>S?e.dtick=ye(t,S,ue):o>O?e.dtick=ye(t,O,fe):o>D?e.dtick=ye(t,D,fe):(n=i(10),e.dtick=ye(t,n,ce))}else if("log"===e.type){e.tick0=0;var u=l.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var f=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/f,n=i(10),e.dtick="L"+ye(t,n,ce)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Re(e)?(e.tick0=0,n=1,e.dtick=ye(t,n,ve)):(e.tick0=0,n=i(10),e.dtick=ye(t,n,ce));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},q.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return l.increment(e,o*t);var s=t.charAt(0),c=o*Number(t.substr(1));if("M"===s)return l.incrementMonth(e,c,i);if("L"===s)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===s){var u="D2"===t?pe:he,f=e+.01*o,d=l.roundUp(l.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},q.tickFirst=function(e,t){var r=e.r2l||Number,i=l.simpleMap(e.range,r,void 0,void 0,t),o=i[1]=0&&r<=e._length?t:null};if(s&&l.isArrayOrTypedArray(e.ticktext)){var h=l.simpleMap(e.range,e.r2l),p=(Math.abs(h[1]-h[0])-(e._lBreaks||0))/1e4;for(i=0;i ")}else e._prevDateHead=s,c+="
"+s;t.text=c}(e,o,r,c):"log"===u?function(e,t,r,n,i){var o=e.dtick,s=t.x,c=e.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)t.text=we(Math.pow(10,s),e,i,n);else if(a(o)||"D"===u&&l.mod(s+.01,1)<.1){var f=Math.round(s),d=Math.abs(f),h=e.exponentformat;"power"===h||be(h)&&_e(f)?(t.text=0===f?1:1===f?"10":"10"+(f>1?"":I)+d+"",t.fontSize*=1.25):("e"===h||"E"===h)&&d>2?t.text="1"+h+(f>0?"+":I)+d:(t.text=we(Math.pow(10,s),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,l.mod(s,1)))),t.fontSize*=.75}if("D1"===e.dtick){var p=String(t.text).charAt(0);"0"!==p&&"1"!==p||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,o,0,c,y):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):Re(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=we(t.x,e,a,n);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=we(l.deg2rad(t.x),e,a,n);else{var s=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["",o[0],"","⁄","",o[1],"","π"].join(""),s&&(t.text=I+t.text)}}}}(e,o,r,c,y):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=we(t.x,e,a,n)}(e,o,0,c,y),n||(e.tickprefix&&!v(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!v(e.showticksuffix)&&(o.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(o.text)){var g=e.labelalias[o.text];"string"==typeof g&&(o.text=g)}return("boundaries"===e.tickson||e.showdividers)&&(o.xbnd=[d(o.x-.5),d(o.x+e.dtick-.5)]),o},q.hoverLabelText=function(e,t,r){r&&(e=l.extendFlat({},e,{hoverformat:r}));var n=l.isArrayOrTypedArray(t)?t[0]:t,a=l.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==a&&a!==n)return q.hoverLabelText(e,n,r)+" - "+q.hoverLabelText(e,a,r);var i="log"===e.type&&n<=0,o=q.tickText(e,e.c2l(i?-n:n),"hover").text;return i?0===n?"0":I+o:o};var xe=["f","p","n","μ","m","","k","M","G","T"];function be(e){return"SI"===e||"B"===e}function _e(e){return e>14||e<-15}function we(e,t,r,n){var i=e<0,o=t._tickround,s=r||t.exponentformat||"B",c=t._tickexponent,u=q.getTickFormat(t),f=t.separatethousands;if(n){var d={exponentformat:s,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ge(d),o=(Number(d._tickround)||0)+4,c=d._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,I);var h,p=Math.pow(10,-o)/2;if("none"===s&&(c=0),(e=Math.abs(e))"+h+"":"B"===s&&9===c?e+="B":be(s)&&(e+=xe[c/3+5])),i?I+e:e}function Te(e,t){if(e){var r=Object.keys(H).reduce((function(e,r){return-1!==t.indexOf(r)&&H[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function Me(e,t){for(var r=[],n={},a=0;a1&&r=a.min&&e=0,i=u(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=o(a)))){r=n;break}break;case"log":for(t=0;t=0&&a.unshift(a.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return l.syncOrAsync(a.map((function(t){return function(){if(t){var n=q.getFromId(e,t);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=i;var a=q.drawOne(e,n,r);return n._shiftPusher&&He(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=l.simpleMap(n._r,n.r2l),a}}})))},q.drawOne=function(e,t,r){var n,a,s,h=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var v=e._fullLayout,y=t._id,g=y.charAt(0),m=q.counterLetter(y),x=v._plots[t._mainSubplot];if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var b=t.linewidth/2||0;"inside"===t.ticks&&(b+=t.ticklen),He(t,b,h,!0),He(t,t.shift||0,h,!1)}!0===r.skipTitle&&void 0!==t._shift||(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,h));var _=x[g+"axislayer"],w=t._mainLinePosition,T=w+=t._shift,M=t._mainMirrorPosition,k=t._vals=q.calcTicks(t),A=[t.mirror,T,M].join("_");for(n=0;n0?r.bottom-u:0,f))));var d=0,h=0;if(t._shiftPusher&&(d=Math.max(f,r.height>0?"l"===s?u-r.left:r.right-u:0),t.title.text!==v._dfltTitle[g]&&(h=(t._titleStandoff||0)+(t._titleScoot||0),"l"===s&&(h+=Le(t))),t._fullDepth=Math.max(d,h)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],y="number"==typeof t._shift?t._shift:0;if("x"===g){if("b"===s?n[s]=t._depth:(n[s]=t._depth=Math.max(r.width>0?u-r.top:0,f),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===s?(t._depth=Math.max(r.height>0?u-r.left:0,f),n[s]=t._depth-y):(t._depth=Math.max(r.height>0?r.right-u:0,f),n[s]=t._depth+y,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[m]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==v._dfltTitle[g]&&(n[s]+=Le(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[c]+=f),!0===t.mirror||"ticks"===t.mirror?a[m]=t._anchorAxis.domain[p[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[m]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}fe&&(l=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(Te(n,t.automargin),Te(a,t.automargin)),i.autoMargin(e,De(t),n),i.autoMargin(e,Ce(t),a),i.autoMargin(e,Pe(t),l)})),l.syncOrAsync(ce)}}function de(e){var r=y+(e||"tick");return L[r]||(L[r]=function(e,t,r){var n,a,i,o;if(e._selections[t].size())n=1/0,a=-1/0,i=1/0,o=-1/0,e._selections[t].each((function(){var e=Oe(this),t=d.bBox(e.node().parentNode);n=Math.min(n,t.top),a=Math.max(a,t.bottom),i=Math.min(i,t.left),o=Math.max(o,t.right)}));else{var l=q.makeLabelFns(e,r);n=a=l.yFn({dx:0,dy:0,fontSize:0}),i=o=l.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:a,left:i,right:o,height:a-n,width:o-i}}(t,r,T)),L[r]}},q.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],a=e.side===n?1:-1,i=[-1,1,a,-a];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(i=i.map((function(e){return-e}))),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},q.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},q.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=function(e){return-1!==t.indexOf(e)},n=r("top"),a=r("left"),i=r("right"),o=r("bottom"),l=r("inside"),s=o||a||n||i;if(!s&&!l)return[0,0];var c=e.side,u=s?(e.tickwidth||0)/2:0,f=3,d=e.tickfont?e.tickfont.size:12;return(o||n)&&(u+=d*V,f+=(e.linewidth||0)/2),(a||i)&&(u+=(e.linewidth||0)/2,f+=3),l&&"top"===c&&(f-=d*(1-V)),(a||n)&&(u=-u),"bottom"!==c&&"right"!==c||(f=-f),[s?u:0,l?f:0]}(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,a=t[0],i=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside"),c=!l;if(r&&(r*=o?-1:1),n){var u=e.side;n*=l&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(a+e._offset+e.l2p(ke(t))+r,i+n)}:function(t){return s(i+n,a+e._offset+e.l2p(ke(t))+r)}},q.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=void 0!==n.len?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),l=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+l*r)+"v"+i*r:"M"+(t+l*r)+",0h"+i*r},q.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=function(e){return-1!==n.indexOf(e)},o=i("top"),s=i("left"),c=i("right"),u=i("bottom")||s||o||c,f=i("inside"),d="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==e.tickson,h=0,p=0,v=d?e.ticklen:0;if(f?v*=-1:u&&(v=0),d&&(h+=v,r)){var y=l.deg2rad(r);h=v*Math.cos(y)+1,p=v*Math.sin(y)}e.showticklabels&&(d||e.showline)&&(h+=.2*e.tickfont.size);var g,m,x,b,_,w={labelStandoff:h+=(e.linewidth||1)/2*(f?-1:1),labelShift:p},T=0,M=e.side,k=e._id.charAt(0),A=e.tickangle;if("x"===k)b=(_=!f&&"bottom"===M||f&&"top"===M)?1:-1,f&&(b*=-1),g=p*b,m=t+h*b,x=_?1:-.2,90===Math.abs(A)&&(f?x+=Y:x=-90===A&&"bottom"===M?V:90===A&&"top"===M?Y:.5,T=Y/2*(A/90)),w.xFn=function(e){return e.dx+g+T*e.fontSize},w.yFn=function(e){return e.dy+m+e.fontSize*x},w.anchorFn=function(e,t){if(u){if(s)return"end";if(c)return"start"}return a(t)&&0!==t&&180!==t?t*b<0!==f?"end":"start":"middle"},w.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==f?-n:0};else if("y"===k){if(b=(_=!f&&"left"===M||f&&"right"===M)?1:-1,f&&(b*=-1),g=h,m=p*b,x=0,f||90!==Math.abs(A)||(x=-90===A&&"left"===M||90===A&&"right"===M?V:.5),f){var L=a(A)?+A:0;if(0!==L){var S=l.deg2rad(L);T=Math.abs(Math.sin(S))*V*b,x=0}}w.xFn=function(e){return e.dx+t-(g+e.fontSize*x)*b+T*e.fontSize},w.yFn=function(e){return e.dy+m+e.fontSize*Y},w.anchorFn=function(e,t){return a(t)&&90===Math.abs(t)?"middle":_?"end":"start"},w.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},q.drawTicks=function(e,t,r){r=r||{};var a=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?r.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=r.layer.selectAll("path."+a).data(i,Ae);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return d.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Be(t,[E]),o.attr("transform",r.transFn)},q.drawGrid=function(e,t,r){if(r=r||{},"sync"!==t.tickmode){var a=t._id+"grid",i=t.minor&&t.minor.showgrid,o=i?r.vals.filter((function(e){return e.minor})):[],l=t.showgrid?r.vals.filter((function(e){return!e.minor})):[],s=r.counterAxis;if(s&&q.shouldShowZeroLine(e,t,s))for(var c="array"===t.tickmode,u=0;u=0;g--){var m=g?v:y;if(m){var x=m.selectAll("path."+a).data(g?l:o,Ae);x.exit().remove(),x.enter().append("path").classed(a,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(e){return f.stroke(n.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return d.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?p:t._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Be(t,[R,F])}},q.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=q.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return X(e.id,t.id)}))})),i.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,t.zerolinecolor||f.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Be(t,[N])},q.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,o=t._id,u=r.cls||o+"tick",f=r.vals.filter((function(e){return e.text})),h=r.labelFns,p=r.secondary?0:t.tickangle,v=(t._prevTickAngles||{})[u],y=r.layer.selectAll("g."+u).data(t.showticklabels?f:[],Ae),g=[];function m(e,i){e.each((function(e){var o=n.select(this),l=o.select(".text-math-group"),u=h.anchorFn(e,i),f=r.transFn.call(o.node(),e)+(a(i)&&0!=+i?" rotate("+i+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),p=c.lineCount(o),v=U*e.fontSize,y=h.heightFn(e,a(i)?+i:0,(p-1)*v);if(y&&(f+=s(0,y)),l.empty()){var g=o.select("text");g.attr({transform:f,"text-anchor":u}),g.style("opacity",1),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var m=d.bBox(l.node()).width*{end:-.5,start:.5}[u];l.attr("transform",f+s(m,0))}}))}y.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),a=e._promises.length;r.call(c.positionText,h.xFn(t),h.yFn(t)).call(d.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(c.convertToTspans,e),e._promises[a]?g.push(e._promises.pop().then((function(){m(r,p)}))):m(r,p)})),Be(t,[B]),y.exit().remove(),r.repositionOnUpdate&&y.each((function(e){n.select(this).select("text").call(c.positionText,h.xFn(e),h.yFn(e))})),t._adjustTickLabelsOverflow=function(){var r=t.ticklabeloverflow;if(r&&"allow"!==r){var a=-1!==r.indexOf("hide"),o="x"===t._id.charAt(0),s=0,c=o?e._fullLayout.width:e._fullLayout.height;if(-1!==r.indexOf("domain")){var u=l.simpleMap(t.range,t.r2l);s=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var f=Math.min(s,c),h=Math.max(s,c),p=t.side,v=1/0,g=-1/0;for(var m in y.each((function(e){var r=n.select(this);if(r.select(".text-math-group").empty()){var i=d.bBox(r.node()),l=0;o?(i.right>h||i.lefth||i.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+r._id]?s.style("display","none"):"tick"!==e.K||a||s.style("display",null)}))}))}))}))},m(y,v+1?v:p);var x=null;t._selections&&(t._selections[u]=y);var b=[function(){return g.length&&Promise.all(g)}];t.automargin&&i._redrawFromAutoMarginCount&&90===v?(x=v,b.push((function(){m(y,v)}))):b.push((function(){if(m(y,p),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){x=t.autotickangles[0];var e,n=0,a=[],i=1;y.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),o=Oe(this),l=d.bBox(o.node());i=Math.max(i,c.lineCount(o)),a.push({top:0,bottom:10,height:10,left:r-l.width/2,right:r+l.width/2+2,width:l.width+2})}));var o=("boundaries"===t.tickson||t.showdividers)&&!r.secondary,s=f.length,u=Math.abs((f[s-1].x-f[0].x)*t._m)/(s-1),h=o?u/2:u,v=o?t.ticklen:1.25*n*i,g=h/Math.sqrt(Math.pow(h,2)+Math.pow(v,2)),b=t.autotickangles.map((function(e){return e*Math.PI/180})),_=b.find((function(e){return Math.abs(Math.cos(e))<=g}));void 0===_&&(_=b.reduce((function(e,t){return Math.abs(Math.cos(e))H*z&&(C=z,S[L]=O[L]=P[L])}var j=Math.abs(C-D);j-M>0?M*=1+M/(j-=M):M=0,"y"!==t._id.charAt(0)&&(M=-M),S[A]=w.p2r(w.r2p(O[A])+k*M),"min"===w.autorange||"max reversed"===w.autorange?(S[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(S[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[w._name+".range"]=S}var Y=l.syncOrAsync(b);return Y&&Y.then&&e._promises.push(Y),Y},q.getPxPosition=function(e,t){var r,n=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===a?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===a&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===i||"left"===i?r._offset:"bottom"===i||"right"===i?r._offset+r._length:void 0},q.shouldShowZeroLine=function(e,t,r){var n=l.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===z)&&(Se(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(a){var i=e._fullLayout,o=t._id.charAt(0),l=q.counterLetter(t._id),s=t._offset+(Math.abs(n[0])1)for(n=1;n2*o}(a,t))return"date";var y="strict"!==r.autotypenumbers;return function(e,t){for(var r=e.length,n=f(r),a=0,o=0,l={},u=0;u2*a}(a,y)?"category":function(e,t){for(var r=e.length,n=0;n=2){var l,c,u="";if(2===o.length)for(l=0;l<2;l++)if(c=_(o[l])){u=g;break}var f=a("pattern",u);if(f===g)for(l=0;l<2;l++)(c=_(o[l]))&&(t.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case g:if(!n(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[l]=o[l]=c;break;case m:if(!n(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[l]=o[l]=c}if(!1===r.autorange){var d=r.range;if(d[0]d[1])return void(t.enabled=!1)}else if(o[0]>d[0]&&o[1]n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},t.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},t.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}},4796:function(e,t,r){"use strict";var n=r(8116).isTypedArraySpec;e.exports=function(e,t,r,a){if("category"===t.type){var i,o=e.categoryarray,l=Array.isArray(o)&&o.length>0||n(o);l&&(i="array");var s,c=r("categoryorder",i);"array"===c&&(s=r("categoryarray")),l||"array"!==c||(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=s.slice():(s=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;nn?a.substr(n):i.substr(r))+o:a+i+e*t:o}function y(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;oc*x)||T)for(r=0;rI&&FC&&(C=F);d/=(C-D)/(2*P),D=s.l2r(D),C=s.l2r(C),s.range=s._input.range=L=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function B(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",a+"Z")}function H(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(t,r)).attr("d","M0,0Z")}function j(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Y(e,t,a,i)}function Y(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function V(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function U(e){P&&e.data&&e._context.showTips&&(a.notifier(a._(e,"Double-click to zoom back out"),"long"),P=!1)}function G(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,C)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function q(e,t,r,n,i){for(var o,l,s,c,u=!1,f={},d={},h=(i||{}).xaHash,p=(i||{}).yaHash,v=0;v=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(V(a),2!==e||ge||Ue(),ye)o.indexOf("select")>-1&&L(r,a,J,K,t.id,Ce),o.indexOf("event")>-1&&h.click(a,r,t.id);else if(1===e&&ge){var l=v?I:P,c="s"===v||"w"===g?0:1,f=l._name+".range["+c+"]",d=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(l,c),p="left",y="middle";if(l.fixedrange)return;v?(y="n"===v?"top":"bottom","right"===l.side&&(p="right")):"e"===g&&(p="right"),a._context.showAxisRangeEntryBoxes&&n.select(be).call(u.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(d),fill:l.tickfont?l.tickfont.color:"#444",horizontalAlign:p,verticalAlign:y}).on("edit",(function(e){var t=l.d2r(e);void 0!==t&&s.call("_guiRelayout",a,f,t)}))}}}function ze(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,he*t+_e)),a=Math.max(0,Math.min(te,pe*r+we)),i=Math.abs(n-_e),o=Math.abs(a-we);function l(){Le="",Te.r=Te.l,Te.t=Te.b,Oe.attr("d","M0,0Z")}if(Te.l=Math.min(_e,n),Te.r=Math.max(_e,n),Te.t=Math.min(we,a),Te.b=Math.max(we,a),re.isSubplotConstrained)i>C||o>C?(Le="xy",i/ee>o/te?(o=i*te/ee,we>a?Te.t=we-o:Te.b=we+o):(i=o*ee/te,_e>n?Te.l=_e-i:Te.r=_e+i),Oe.attr("d",G(Te))):l();else if(ne.isSubplotConstrained)if(i>C||o>C){Le="xy";var s=Math.min(Te.l/ee,(te-Te.b)/te),c=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=s*ee,Te.r=c*ee,Te.b=(1-s)*te,Te.t=(1-c)*te,Oe.attr("d",G(Te))}else l();else!ie||o0){var u;if(ne.isSubplotConstrained||!ae&&1===ie.length){for(u=0;u1&&(void 0!==i.maxallowed&&le===(i.range[0]1&&(void 0!==o.maxallowed&&se===(o.range[0]0){var y=h.id;if(-1!==y.indexOf(p))continue;y+=p+(u+1),h=i.extendFlat({},h,{id:y,plot:o._cartesianlayer.selectAll(".subplot").select("."+y)})}for(var g,m=[],x=0;x1&&(w+=p+_),b.push(n+w),r=0;rb[1]-1/4096&&(t.domain=l),a.noneOrAll(e.domain,t.domain,l),"sync"===t.tickmode&&(t.tickmode="auto")}return r("layer"),t}},2568:function(e,t,r){"use strict";var n=r(5024);e.exports=function(e,t,r,a,i){i||(i={});var o=i.tickSuffixDflt,l=n(e);r("tickprefix")&&r("showtickprefix",l),r("ticksuffix",o)&&r("showticksuffix",l)}},6312:function(e,t,r){"use strict";var n=r(6808);e.exports=function(e,t,r,a){var i=t._template||{},o=t.type||i.type||"-";r("minallowed"),r("maxallowed");var l,s=r("range");s||a.noInsiderange||"log"===o||(!(l=r("insiderange"))||null!==l[0]&&null!==l[1]||(t.insiderange=!1,l=void 0),l&&(s=r("range",l)));var c,u=t.getAutorangeDflt(s,a),f=r("autorange",u);!s||(null!==s[0]||null!==s[1])&&(null!==s[0]&&null!==s[1]||"reversed"!==f&&!0!==f)&&(null===s[0]||"min"!==f&&"max reversed"!==f)&&(null===s[1]||"max"!==f&&"min reversed"!==f)||(s=void 0,delete t.range,t.autorange=!0,c=!0),c||(f=r("autorange",u=t.getAutorangeDflt(s,a))),f&&(n(r,f,s),"linear"!==o&&"-"!==o||r("rangemode")),t.cleanRange()}},1160:function(e,t,r){"use strict";var n=r(4284).FROM_BL;e.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)],e.setScale()}},8344:function(e,t,r){"use strict";var n=r(3428),a=r(4336).E9,i=r(3400),o=i.numberFormat,l=r(8248),s=i.cleanNumber,c=i.ms2DateTime,u=i.dateTime2ms,f=i.ensureNumber,d=i.isArrayOrTypedArray,h=r(9032),p=h.FP_SAFE,v=h.BADNUM,y=h.LOG_CLIP,g=h.ONEWEEK,m=h.ONEDAY,x=h.ONEHOUR,b=h.ONEMIN,_=h.ONESEC,w=r(9811),T=r(3816),M=T.HOUR_PATTERN,k=T.WEEKDAY_PATTERN;function A(e){return Math.pow(10,e)}function L(e){return null!=e}e.exports=function(e,t){t=t||{};var r=e._id||"x",h=r.charAt(0);function S(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*y*Math.abs(n-a))}return v}function O(t,r,n,a){if((a||{}).msUTC&&l(t))return+t;var o=u(t,n||e.calendar);if(o===v){if(!l(t))return v;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),c=Math.round(t-s/10);o=u(new Date(c))+s/10}return o}function D(t,r,n){return c(t,r,n||e.calendar)}function C(t){return e._categories[Math.round(t)]}function P(t){if(L(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return v}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function z(e){var t=I(e);return void 0!==t?t:l(e)?+e:void 0}function N(e){return l(e)?+e:I(e)}function R(e,t,r){return n.round(r+t*e,2)}function F(e,t,r){return(e-r)/t}var E=function(t){return l(t)?R(t,e._m,e._b):v},B=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var H="y"===h;E=function(t){if(!l(t))return v;var r=e._rangebreaks.length;if(!r)return R(t,e._m,e._b);var n=H;e.range[0]>e.range[1]&&(n=!n);for(var a=n?-1:1,i=a*t,o=0,s=0;su)){o=i<(c+u)/2?s:s+1;break}o=s+1}var f=e._B[o]||0;return isFinite(f)?R(t,e._m2,f):0},B=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,a=0;ae._rangebreaks[a].pmax&&(n=a+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?S:f,e.l2c="log"===e.type?A:f,e.l2p=E,e.p2l=B,e.c2p="log"===e.type?function(e,t){return E(S(e,t))}:E,e.p2c="log"===e.type?function(e){return A(B(e))}:B,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=f,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=B,e.cleanPos=f):"log"===e.type?(e.d2r=e.d2l=function(e,t){return S(s(e),t)},e.r2d=e.r2c=function(e){return A(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=f,e.c2r=S,e.l2d=A,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return A(B(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=B,e.cleanPos=f):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=O,e.c2d=e.c2r=e.l2d=e.l2r=D,e.d2p=e.r2p=function(t,r,n){return e.l2p(O(t,0,n))},e.p2d=e.p2r=function(e,t,r){return D(B(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,v,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=C,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=N(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=f,e.r2l=N,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return C(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:f(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=C,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=f,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return C(B(e))},e.r2p=e.d2p,e.p2r=B,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:f(e)},e.setupMultiCategory=function(n){var a,o,l=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var c in s)if(c!==r){var u=t[w.id2name(c)];l=l.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],p=[];for(a=0;as[1]&&(a[l?0:1]=n),a[0]===a[1]){var c=e.l2r(r),u=e.l2r(n);if(void 0!==r){var f=c+1;void 0!==n&&(f=Math.min(f,u)),a[l?1:0]=f}if(void 0!==n){var d=u+1;void 0!==r&&(d=Math.max(d,c)),a[l?0:1]=d}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,o=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===h?T.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(a[0]=0),o&&2===o.length){var s=null===o[0],c=null===o[1];for("date"!==e.type||e.autorange||(o[0]=i.cleanDate(o[0],v,e.calendar),o[1]=i.cleanDate(o[1],v,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(o[n],e.calendar)){e[t]=a;break}if(e.r2l(o[0])===e.r2l(o[1])){var u=i.constrain(e.r2l(o[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);o[0]=e.l2r(u-1e3),o[1]=e.l2r(u+1e3);break}}else{if(!l(o[n])){if(s||c||!l(o[1-n])){e[t]=a;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-p?o[n]=-p:o[n]>p&&(o[n]=p),o[0]===o[1]){var f=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=f,o[1]+=f}}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=w.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var l,s,c=e.r2l(e[i][0],o),u=e.r2l(e[i][1],o),f="y"===h;if(f?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(l=0;lu&&(d=!d),d&&e._rangebreaks.reverse();var p=d?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(f?u:c)),l=0;la&&(a+=7,oa&&(a+=24,o=n&&o=n&&t=l.min&&(el.max&&(l.max=n),a=!1)}a&&c.push({min:e,max:n})}};for(n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function y(t,r){var n=t.plotinfo,a=n.xaxis,s=n.yaxis,c=a._length,u=s._length,f=!!t.xr1,d=!!t.yr1,h=[];if(f){var p=i.simpleMap(t.xr0,a.r2l),v=i.simpleMap(t.xr1,a.r2l),y=p[1]-p[0],g=v[1]-v[0];h[0]=(p[0]*(1-r)+r*v[0]-p[0])/(p[1]-p[0])*c,h[2]=c*(1-r+r*g/y),a.range[0]=a.l2r(p[0]*(1-r)+r*v[0]),a.range[1]=a.l2r(p[1]*(1-r)+r*v[1])}else h[0]=0,h[2]=c;if(d){var m=i.simpleMap(t.yr0,s.r2l),x=i.simpleMap(t.yr1,s.r2l),b=m[1]-m[0],_=x[1]-x[0];h[1]=(m[1]*(1-r)+r*x[1]-m[1])/(m[0]-m[1])*u,h[3]=u*(1-r+r*_/b),s.range[0]=a.l2r(m[0]*(1-r)+r*x[0]),s.range[1]=s.l2r(m[1]*(1-r)+r*x[1])}else h[1]=0,h[3]=u;l.drawOne(e,a,{skipTitle:!0}),l.drawOne(e,s,{skipTitle:!0}),l.redrawComponents(e,[a._id,s._id]);var w=f?c/h[2]:1,T=d?u/h[3]:1,M=f?h[0]:0,k=d?h[1]:0,A=f?h[0]/h[2]*c:0,L=d?h[1]/h[3]*u:0,S=a._offset-A,O=s._offset-L;n.clipRect.call(o.setTranslate,M,k).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,S,O).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}l.redrawComponents(e)}},4944:function(e,t,r){"use strict";var n=r(4040).traceIs,a=r(2976);function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}e.exports=function(e,t,r,l){r("autotypenumbers",l.autotypenumbersDflt),"-"===r("type",(l.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r,l=e._id,s=l.charAt(0);-1!==l.indexOf("scene")&&(l=s);var c=function(e,t,r){for(var n=0;n0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,l,s);if(c)if("histogram"!==c.type||s!=={v:"y",h:"x"}[c.orientation||"v"]){var u=s+"calendar",f=c[u],d={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,o(c,s)){var h=i(c),p=[];for(r=0;r0?".":"")+i;a.isPlainObject(o)?s(o,t,l,n+1):t(l,i,o)}}))}t.manageCommandObserver=function(e,r,n,o){var l={},s=!0;r&&r._commandObserver&&(l=r._commandObserver),l.cache||(l.cache={}),l.lookupTable={};var c=t.hasSimpleAPICommandBindings(e,n,l.lookupTable);if(r&&r._commandObserver){if(c)return l;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,l}if(c){i(e,c,l.cache),l.check=function(){if(s){var t=i(e,c,l.cache);return t.changed&&o&&void 0!==l.lookupTable[t.value]&&(l.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:l.lookupTable[t.value]})).then(l.enable,l.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),l=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),l.text(o.text()&&s.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function L(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,a={};function i(e){for(var r=!0,i=0;i1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(d,l,u,n),w.cleanPlot(d,l,u,n);var B=!(!n._has||!n._has("gl2d")),H=!(!l._has||!l._has("gl2d")),j=!(!n._has||!n._has("cartesian"))||B,Y=!(!l._has||!l._has("cartesian"))||H;j&&!Y?n._bgLayer.remove():Y&&!j&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&v({_fullLayout:n}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a0){var u=1-2*l;n=Math.round(u*n),a=Math.round(u*a)}}var d=w.layoutAttributes.width.min,h=w.layoutAttributes.height.min;n1,v=!t.height&&Math.abs(r.height-a)>1;(v||p)&&(p&&(r.width=n),v&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var a,i,o,l=s.componentsRegistry,c=t._basePlotModules,u=s.subplotsRegistry.cartesian;for(a in l)(o=l[a]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in c.length||c.push(u),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(f.subplotSort);for(i=0;i1&&(r.l/=g,r.r/=g)}if(h){var m=(r.t+r.b)/h;m>1&&(r.t/=m,r.b/=m)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+y},r:{val:b,size:r.r+y},b:{val:T,size:r.b+y},t:{val:_,size:r.t+y}},v[t]=1}else delete p[t],delete v[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),P(t);var a=t._size,i=t.margin,l={t:0,b:0,l:0,r:0},c=f.extendFlat({},a),u=i.l,d=i.r,h=i.t,v=i.b,y=t._pushmargin,g=t._pushmarginIds,m=t.minreducedwidth,x=t.minreducedheight;if(!1!==i.autoexpand){for(var b in y)g[b]||delete y[b];var _=e._fullLayout._reservedMargin;for(var T in _)for(var M in _[T]){var k=_[T][M];l[M]=Math.max(l[M],k)}for(var A in y.base={l:{val:0,size:u},r:{val:1,size:d},t:{val:1,size:h},b:{val:0,size:v}},l){var L=0;for(var S in y)"base"!==S&&o(y[S][A].size)&&(L=y[S][A].size>L?y[S][A].size:L);var O=Math.max(0,i[A]-L);l[A]=Math.max(0,l[A]-O)}for(var D in y){var C=y[D].l||{},I=y[D].b||{},z=C.val,N=C.size,R=I.val,F=I.size,E=r-l.r-l.l,B=n-l.t-l.b;for(var H in y){if(o(N)&&y[H].r){var j=y[H].r.val,Y=y[H].r.size;if(j>z){var V=(N*j+(Y-E)*z)/(j-z),U=(Y*(1-z)+(N-E)*(1-j))/(j-z);V+U>u+d&&(u=V,d=U)}}if(o(F)&&y[H].t){var G=y[H].t.val,q=y[H].t.size;if(G>R){var Z=(F*G+(q-B)*R)/(G-R),W=(q*(1-R)+(F-B)*(1-G))/(G-R);Z+W>v+h&&(v=Z,h=W)}}}}}var X=f.constrain(r-i.l-i.r,2,m),J=f.constrain(n-i.t-i.b,2,x),K=Math.max(0,r-X),Q=Math.max(0,n-J);if(K){var $=(u+d)/K;$>1&&(u/=$,d/=$)}if(Q){var ee=(v+h)/Q;ee>1&&(v/=ee,h/=ee)}if(a.l=Math.round(u)+l.l,a.r=Math.round(d)+l.r,a.t=Math.round(h)+l.t,a.b=Math.round(v)+l.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(w.didMarginChange(c,a)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var i=0,o=0;function l(){return i++,function(){var t;o++,n||o!==i||(t=a,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(l),setTimeout(l())}))}],i=f.syncOrAsync(a,e);return i&&i.then||(i=Promise.resolve()),i.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,a,i){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=a?e._fullData:e.data,s=a?e._fullLayout:e.layout,c=(e._transitionData||{})._frames;function u(e,t){if("function"==typeof e)return t?"_function_":null;if(f.isPlainObject(e)){var n,a={};return Object.keys(e).sort().forEach((function(i){if(-1===["_","["].indexOf(i.charAt(0)))if("function"!=typeof e[i]){if("keepdata"===r){if("src"===i.substr(i.length-3))return}else if("keepstream"===r){if("string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0&&!f.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[i+"src"])&&n.indexOf(":")>0)return;a[i]=u(e[i],t)}else t&&(a[i]="_function")})),a}var i=Array.isArray(e),o=f.isTypedArray(e);if((i||o)&&e.dtype&&e.shape){var s=e.bdata;return u({dtype:e.dtype,shape:e.shape,bdata:f.isArrayBuffer(s)?l.encode(s):s},t)}return i?e.map((function(e){return u(e,t)})):o?f.simpleMap(e,f.identity):f.isJSDate(e)?f.ms2DateTimeLocal(+e):e}var d={data:(o||[]).map((function(e){var r=u(e);return t&&delete r.fit,r}))};if(!t&&(d.layout=u(s),a)){var h=s._size;d.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return c&&(d.frames=u(c)),i&&(d.config=u(e._context,!0)),"object"===n?d:JSON.stringify(d)},w.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;i--)if(s[i].enabled){r._indexToPoints=s[i]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[t]=o}}for(R(o,l,u),a=0;a0){for(var n=[],a=0;a-1&&(f[h[r]].title={text:""});for(r=0;r")?"":t.html(e).text()}));return t.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),a.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},4664:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;rf+c||!n(u))}for(var h=0;h=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&n(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,n,i,o){var l=!(!1===(o=o||{}).moduleHasSelected),s=!(!1===o.moduleHasUnselected),c=!(!1===o.moduleHasConstrain),u=!(!1===o.moduleHasCliponaxis),f=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),p=!!o.hasPathbar,v=Array.isArray(i)||"auto"===i,y=v||"inside"===i,g=v||"outside"===i;if(y||g){var m=d(n,"textfont",r.font),x=a.extendFlat({},m),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,d(n,"insidetextfont",x),p){var _=a.extendFlat({},m);b&&delete _.color,d(n,"pathbar.textfont",_)}g&&d(n,"outsidetextfont",m),l&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),c&&n("constraintext"),u&&n("cliponaxis"),f&&n("textangle"),n("texttemplate")}y&&h&&n("insidetextanchor")}e.exports={supplyDefaults:function(e,t,r,n){function u(r,n){return a.coerce(e,t,f,r,n)}if(l(e,t,n,u)){s(e,t,n,u),u("xhoverformat"),u("yhoverformat"),u("zorder"),u("orientation",t.x&&!t.y?"h":"v"),u("base"),u("offset"),u("width"),u("text"),u("hovertext"),u("hovertemplate");var d=u("textposition");p(e,0,n,u,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),c(e,t,u,r,n);var h=(t.marker.line||{}).color,v=o.getComponentMethod("errorbars","supplyDefaults");v(e,t,h||i.defaultLine,{axis:"y"}),v(e,t,h||i.defaultLine,{axis:"x",inherit:"y"}),a.coerceSelectionMarkerOpacity(t,u)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,n;function i(e,t){return a.coerce(n._input,n,f,e,t)}for(var o=0;oi))return t}return void 0!==r?r:e.dflt},t.coerceColor=function(e,t,r){return a(t).isValid()?t:void 0!==r?r:e.dflt},t.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},t.getValue=function(e,t){var r;return i(e)?t0?t+=r:u<0&&(t-=r)}return t}function z(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,_+(a-t)/(a-r)-1)}var N=e[f+"a"],R=e[d+"a"];v=Math.abs(N.r2c(N.range[1])-N.r2c(N.range[0]));var F=n.getDistanceFunction(a,h,p,(function(e){return(h(e)+p(e))/2}));if(n.getClosest(y,F,e),!1!==e.index&&y[e.index].p!==c){M||(O=function(e){return Math.min(k(e),e.p-m.bargroupwidth/2)},D=function(e){return Math.max(A(e),e.p+m.bargroupwidth/2)});var E=y[e.index],B=g.base?E.b+E.s:E.s;e[d+"0"]=e[d+"1"]=R.c2p(E[d],!0),e[d+"LabelVal"]=B;var H=m.extents[m.extents.round(E.p)];e[f+"0"]=N.c2p(x?O(E):H[0],!0),e[f+"1"]=N.c2p(x?D(E):H[1],!0);var j=void 0!==E.orig_p;return e[f+"LabelVal"]=j?E.orig_p:E.p,e.labelLabel=s(N,e[f+"LabelVal"],g[f+"hoverformat"]),e.valueLabel=s(R,e[d+"LabelVal"],g[d+"hoverformat"]),e.baseLabel=s(R,E.b,g[d+"hoverformat"]),e.spikeDistance=(function(e){var t=u,r=e.b,a=I(e);return n.inbox(r-t,a-t,w+(a-t)/(a-r)-1)}(E)+function(e){return C(k(e),A(e),w)}(E))/2,e[f+"Spike"]=N.c2p(E.p,!0),o(E,g,e),e.hovertemplate=g.hovertemplate,e}}function f(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=l(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}e.exports={hoverPoints:function(e,t,r,n,i){var o=u(e,t,r,n,i);if(o){var l=o.cd,s=l[0].trace,c=l[o.index];return o.color=f(s,c),a.getComponentMethod("errorbars","hoverInfo")(c,s,o),[o]}},hoverOnBars:u,getTraceColor:f}},1132:function(e,t,r){"use strict";e.exports={attributes:r(832),layoutAttributes:r(9324),supplyDefaults:r(1508).supplyDefaults,crossTraceDefaults:r(1508).crossTraceDefaults,supplyLayoutDefaults:r(7156),calc:r(9439),crossTraceCalc:r(6376).crossTraceCalc,colorbar:r(5528),arraysToCalcdata:r(4664),plot:r(8184).plot,style:r(100).style,styleOnSelect:r(100).styleOnSelect,hoverPoints:r(1020).hoverPoints,eventData:r(2160),selectPoints:r(5784),moduleType:"trace",name:"bar",basePlotModule:r(7952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},9324:function(e){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},7156:function(e,t,r){"use strict";var n=r(4040),a=r(4460),i=r(3400),o=r(9324),l=r(1508).validateCornerradius;e.exports=function(e,t,r){function s(r,n){return i.coerce(e,t,o,r,n)}for(var c=!1,u=!1,f=!1,d={},h=s("barmode"),p=0;p0)-(e<0)}function k(e,t){return e0}function S(e,t,r,n,a){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(a?e>=r*(t/n):t>=n*(e/r)))}function O(e){return"auto"===e?0:e}function D(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function C(e,t,r,n,a,i){var o=!!i.isHorizontal,l=!!i.constrained,s=i.angle||0,c=i.anchor,u="end"===c,f="start"===c,d=((i.leftToRight||0)+1)/2,h=1-d,p=i.hasB,v=i.r,y=i.overhead,g=a.width,m=a.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var T=O(s);"auto"!==s||g<=x&&m<=b||!(g>x||m>b)||(g>b||m>x)&&g_){var S=function(e,t,r,n,a,i,o,l,s){var c,u,f,d,h=Math.max(0,Math.abs(t-e)-2*_),p=Math.max(0,Math.abs(n-r)-2*_),v=i-_,y=o?v-Math.sqrt(v*v-(v-o)*(v-o)):v,g=s?2*v:l?v-o:2*y,m=s?2*v:l?2*y:v-o;return a.y/a.x>=p/(h-g)?d=p/a.y:a.y/a.x<=(p-m)/h?d=h/a.x:!s&&l?(c=a.x*a.x+a.y*a.y/4,f=(h-v)*(h-v)+(p/2-v)*(p/2-v)-v*v,d=(-(u=-2*a.x*(h-v)-a.y*(p/2-v))+Math.sqrt(u*u-4*c*f))/(2*c)):s?(c=(a.x*a.x+a.y*a.y)/4,f=(h/2-v)*(h/2-v)+(p/2-v)*(p/2-v)-v*v,d=(-(u=-a.x*(h/2-v)-a.y*(p/2-v))+Math.sqrt(u*u-4*c*f))/(2*c)):(c=a.x*a.x/4+a.y*a.y,f=(h/2-v)*(h/2-v)+(p-v)*(p-v)-v*v,d=(-(u=-a.x*(h/2-v)-2*a.y*(p-v))+Math.sqrt(u*u-4*c*f))/(2*c)),{scale:d=Math.min(1,d),pad:l?Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(p-a.y*d)/2)*(v-(p-a.y*d)/2)))-o):Math.max(0,v-Math.sqrt(Math.max(0,v*v-(v-(h-a.x*d)/2)*(v-(h-a.x*d)/2)))-o)}}(e,t,r,n,L,v,y,o,p);M=S.scale,A=S.pad}else M=1,l&&(M=Math.min(1,x/L.x,b/L.y)),A=0;var C=a.left*h+a.right*d,P=(a.top+a.bottom)/2,I=(e+_)*h+(t-_)*d,z=(r+n)/2,N=0,R=0;if(f||u){var F=(o?L.x:L.y)/2;v&&(u||p)&&(w+=A);var E=o?k(e,t):k(r,n);o?f?(I=e+E*w,N=-E*F):(I=t-E*w,N=E*F):f?(z=r+E*w,R=-E*F):(z=n-E*w,R=E*F)}return{textX:C,textY:P,targetX:I,targetY:z,anchorX:N,anchorY:R,scale:M,rotate:T}}e.exports={plot:function(e,t,r,f,y,g){var w=t.xaxis,P=t.yaxis,I=e._fullLayout,z=e._context.staticPlot;y||(y={mode:I.barmode,norm:I.barmode,gap:I.bargap,groupgap:I.bargroupgap},h("bar",I));var N=i.makeTraceGroups(f,r,"trace bars").each((function(r){var c=n.select(this),f=r[0].trace,h=r[0].t,N="waterfall"===f.type,R="funnel"===f.type,F="histogram"===f.type,E="bar"===f.type,B=E||R,H=0;N&&f.connector.visible&&"between"===f.connector.mode&&(H=f.connector.line.width/2);var j="h"===f.orientation,Y=L(y),V=i.ensureSingle(c,"g","points"),U=T(f),G=V.selectAll("g.point").data(i.identity,U);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(c,T){var L,N,R=n.select(this),V=function(e,t,r,n){var a=[],i=[],o=n?t:r,l=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=l.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=l.c2p(e.p1,!0),n?[a,i]:[i,a]}(c,w,P,j),U=V[0][0],G=V[0][1],q=V[1][0],Z=V[1][1],W=0==(j?G-U:Z-q);if(W&&B&&v.getLineWidth(f,c)&&(W=!1),W||(W=!(a(U)&&a(G)&&a(q)&&a(Z))),c.isBlank=W,W&&(j?G=U:Z=q),H&&!W&&(j?(U-=k(U,G)*H,G+=k(U,G)*H):(q-=k(q,Z)*H,Z+=k(q,Z)*H)),"waterfall"===f.type){if(!W){var X=f[c.dir].marker;L=X.line.width,N=X.color}}else L=v.getLineWidth(f,c),N=c.mc||f.marker.color;function J(e){var t=n.round(L/2%1,2);return 0===y.gap&&0===y.groupgap?n.round(Math.round(e)-t,2):e}var K=l.opacity(N)<1||L>.01?J:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?J(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(U=K(U,G,j),G=K(G,U,j),q=K(q,Z,!j),Z=K(Z,q,!j));var Q,$=j?w.c2p:P.c2p;Q=c.s0>0?c._sMax:c.s0<0?c._sMin:c.s1>0?c._sMax:c._sMin;var ee,te,re=E||F?function(e,t){if(!e)return 0;var r,n=j?Math.abs(Z-q):Math.abs(G-U),a=j?Math.abs(G-U):Math.abs(Z-q),i=K(Math.abs($(Q,!0)-$(0,!0))),o=c.hasB?Math.min(n/2,a/2):Math.min(n/2,i);return r="%"===t?n*(Math.min(50,e)/100):e,K(Math.max(Math.min(r,o),0))}(h.cornerradiusvalue,h.cornerradiusform):0,ne="M"+U+","+q+"V"+Z+"H"+G+"V"+q+"Z",ae=0;if(re&&c.s){var ie=0===M(c.s0)||M(c.s)===M(c.s0)?c.s1:c.s0;if((ae=K(c.hasB?0:Math.abs($(Q,!0)-$(ie,!0))))0?Math.sqrt(ae*(2*re-ae)):0,fe=oe>0?Math.max:Math.min;ee="M"+U+","+q+"V"+(Z-ce*le)+"H"+fe(G-(re-ae)*oe,U)+"A "+re+","+re+" 0 0 "+se+" "+G+","+(Z-re*le-ue)+"V"+(q+re*le+ue)+"A "+re+","+re+" 0 0 "+se+" "+fe(G-(re-ae)*oe,U)+","+(q+ce*le)+"Z"}else if(c.hasB)ee="M"+(U+re*oe)+","+q+"A "+re+","+re+" 0 0 "+se+" "+U+","+(q+re*le)+"V"+(Z-re*le)+"A "+re+","+re+" 0 0 "+se+" "+(U+re*oe)+","+Z+"H"+(G-re*oe)+"A "+re+","+re+" 0 0 "+se+" "+G+","+(Z-re*le)+"V"+(q+re*le)+"A "+re+","+re+" 0 0 "+se+" "+(G-re*oe)+","+q+"Z";else{var de=(te=Math.abs(Z-q)+ae)0?Math.sqrt(ae*(2*re-ae)):0,pe=le>0?Math.max:Math.min;ee="M"+(U+de*oe)+","+q+"V"+pe(Z-(re-ae)*le,q)+"A "+re+","+re+" 0 0 "+se+" "+(U+re*oe-he)+","+Z+"H"+(G-re*oe+he)+"A "+re+","+re+" 0 0 "+se+" "+(G-de*oe)+","+pe(Z-(re-ae)*le,q)+"V"+q+"Z"}}else ee=ne}else ee=ne;var ve=A(i.ensureSingle(R,"path"),I,y,g);if(ve.style("vector-effect",z?"none":"non-scaling-stroke").attr("d",isNaN((G-U)*(Z-q))||W&&e._context.staticPlot?"M0,0Z":ee).call(s.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&Y){var ye=s.makePointStyleFns(f);s.singlePointStyle(c,ve,f,ye,e)}!function(e,t,r,n,a,l,c,f,h,y,g,w,T){var M,L=t.xaxis,P=t.yaxis,I=e._fullLayout;function z(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+M,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(o.convertToTspans,e)}var N=n[0].trace,R="h"===N.orientation,F=function(e,t,r,n,a){var o,l=t[0].trace;return o=l.texttemplate?function(e,t,r,n,a){var o=t[0].trace,l=i.castOption(o,r,"texttemplate");if(!l)return"";var s,c,f,d,h="histogram"===o.type,p="waterfall"===o.type,v="funnel"===o.type,y="h"===o.orientation;function g(e){return u(d,d.c2l(e),!0).text}y?(s="y",c=a,f="x",d=n):(s="x",c=n,f="y",d=a);var m,x=t[r],_={};_.label=x.p,_.labelLabel=_[s+"Label"]=(m=x.p,u(c,c.c2l(m),!0).text);var w=i.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+"Label"]=g(x.s);var T={};b(T,o,x.i),(h||void 0===T.x)&&(T.x=y?_.value:_.label),(h||void 0===T.y)&&(T.y=y?_.label:_.value),(h||void 0===T.xLabel)&&(T.xLabel=y?_.valueLabel:_.labelLabel),(h||void 0===T.yLabel)&&(T.yLabel=y?_.labelLabel:_.valueLabel),p&&(_.delta=+x.rawS||x.s,_.deltaLabel=g(_.delta),_.final=x.v,_.finalLabel=g(_.final),_.initial=_.final-_.delta,_.initialLabel=g(_.initial)),v&&(_.value=x.s,_.valueLabel=g(_.value),_.percentInitial=x.begR,_.percentInitialLabel=i.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=i.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=i.formatPercent(x.sumR));var M=i.castOption(o,x.i,"customdata");return M&&(_.customdata=M),i.texttemplateString(l,_,e._d3locale,T,_,o._meta||{})}(e,t,r,n,a):l.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,l="waterfall"===a.type,s="funnel"===a.type;function c(e){return u(o?r:n,+e,!0).text}var f,d,h=a.textinfo,p=e[t],v=h.split("+"),y=[],g=function(e){return-1!==v.indexOf(e)};if(g("label")&&y.push((d=e[t].p,u(o?n:r,d,!0).text)),g("text")&&(0===(f=i.castOption(a,p.i,"text"))||f)&&y.push(f),l){var m=+p.rawS||p.s,x=p.v,b=x-m;g("initial")&&y.push(c(b)),g("delta")&&y.push(c(m)),g("final")&&y.push(c(x))}if(s){g("value")&&y.push(c(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var w=_>1;g("percent initial")&&(f=i.formatPercent(p.begR),w&&(f+=" of initial"),y.push(f)),g("percent previous")&&(f=i.formatPercent(p.difR),w&&(f+=" of previous"),y.push(f)),g("percent total")&&(f=i.formatPercent(p.sumR),w&&(f+=" of total"),y.push(f))}return y.join("
")}(t,r,n,a):v.getValue(l.text,r),v.coerceString(m,o)}(I,n,a,L,P);M=function(e,t){var r=v.getValue(e.textposition,t);return v.coerceEnumerated(x,r)}(N,a);var E="stack"===w.mode||"relative"===w.mode,B=n[a],H=!E||B._outmost,j=B.hasB,Y=y&&y-g>_;if(F&&"none"!==M&&(!B.isBlank&&l!==c&&f!==h||"auto"!==M&&"inside"!==M)){var V=I.font,U=p.getBarColor(n[a],N),G=p.getInsideTextFont(N,a,V,U),q=p.getOutsideTextFont(N,a,V),Z=N.insidetextanchor||"end",W=r.datum();R?"log"===L.type&&W.s0<=0&&(l=L.range[0]0&&Q>0;ae=Y?j?S(re-2*y,ne,K,Q,R)||S(re,ne-2*y,K,Q,R):R?S(re-(y-g),ne,K,Q,R)||S(re,ne-2*(y-g),K,Q,R):S(re,ne-(y-g),K,Q,R)||S(re-2*(y-g),ne,K,Q,R):S(re,ne,K,Q,R),ie&&ae?M="inside":(M="outside",X.remove(),X=null)}else M="inside";if(!X){var oe=(X=z(r,F,$=i.ensureUniformFontSize(e,"outside"===M?q:G))).attr("transform");if(X.attr("transform",""),K=(J=s.bBox(X.node())).width,Q=J.height,X.attr("transform",oe),K<=0||Q<=0)return void X.remove()}var le,se=N.textangle;le="outside"===M?function(e,t,r,n,a,i){var o,l=!!i.isHorizontal,s=!!i.constrained,c=i.angle||0,u=a.width,f=a.height,d=Math.abs(t-e),h=Math.abs(n-r);o=l?h>2*_?_:0:d>2*_?_:0;var p=1;s&&(p=l?Math.min(1,h/f):Math.min(1,d/u));var v=O(c),y=D(a,v),g=(l?y.x:y.y)/2,m=(a.left+a.right)/2,x=(a.top+a.bottom)/2,b=(e+t)/2,w=(r+n)/2,T=0,M=0,A=l?k(t,e):k(r,n);return l?(b=t-A*o,T=A*g):(w=n+A*o,M=-A*g),{textX:m,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:M,scale:p,rotate:v}}(l,c,f,h,J,{isHorizontal:R,constrained:"both"===N.constraintext||"outside"===N.constraintext,angle:se}):C(l,c,f,h,J,{isHorizontal:R,constrained:"both"===N.constraintext||"inside"===N.constraintext,angle:se,anchor:Z,hasB:j,r:y,overhead:g}),le.fontSize=$.size,d("histogram"===N.type?"bar":N.type,le,I),B.transform=le;var ce=A(X,I,w,T);i.setTransormAndDisplay(ce,le)}else r.select("text").remove()}(e,t,R,r,T,U,G,q,Z,re,ae,y,g),t.layerClipId&&s.hideOutsideRangePoint(c,R.select("text"),w,P,f.xcalendar,f.ycalendar)}));var q=!1===f.cliponaxis;s.setClipUrl(c,q?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,N,t,y)},toMoveInsideBar:C}},5784:function(e){"use strict";function t(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),l=r.c2p(n?e.p0:e.s0,!0),s=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(l+s)/2]:n?[o,(l+s)/2]:[(i+o)/2,s]}e.exports=function(e,r){var n,a=e.cd,i=e.xaxis,o=e.yaxis,l=a[0].trace,s="funnel"===l.type,c="h"===l.orientation,u=[];if(!1===r)for(n=0;n1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(n.select(this),t[0].trace,e)})),l.getComponentMethod("errorbars","style")(t)},styleTextPoints:v,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?function(e,t,r){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var a,l=n.select(this);if(e.selected){a=o.ensureUniformFontSize(r,y(l,e,t,r));var s=t.selected.textfont&&t.selected.textfont.color;s&&(a.color=s),i.font(l,a)}else i.selectedTextStyle(l,t)}))}(e.selectAll("text"),t,r)}(r,a,e):(p(r,a,e),l.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:x,getBarColor:_,resizeText:s}},5592:function(e,t,r){"use strict";var n=r(6308),a=r(4288).hasColorscale,i=r(7260),o=r(3400).coercePattern;e.exports=function(e,t,r,l,s){var c=r("marker.color",l),u=a(e,"marker");u&&i(e,t,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(e,"marker.line")&&i(e,t,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",c,u),r("selected.marker.color"),r("unselected.marker.color")}},2744:function(e,t,r){"use strict";var n=r(3428),a=r(3400);function i(e){return"_"+e+"Text_minsize"}e.exports={recordMinTextSize:function(e,t,r){if(r.uniformtext.mode){var n=i(e),a=r.uniformtext.minsize,o=t.scale*t.fontSize;t.hide=o g.point"}t.selectAll(l).each((function(e){var t=e.transform;if(t){t.scale=s&&t.hide?0:o/t.fontSize;var r=n.select(this).select("text");a.setTransormAndDisplay(r,t)}}))}}}},3188:function(e,t,r){"use strict";var n=r(3544),a=r(2904),i=r(832),o=r(2548),l=r(9736).axisHoverFormat,s=r(1776).Ks,c=r(2880).extendFlat,u=a.marker,f=u.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:l("x"),yhoverformat:l("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:c({},u.symbol,{arrayOk:!1,editType:"plot"}),opacity:c({},u.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:c({},u.angle,{arrayOk:!1,editType:"calc"}),size:c({},u.size,{arrayOk:!1,editType:"calc"}),color:c({},u.color,{arrayOk:!1,editType:"style"}),line:{color:c({},f.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:c({},f.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:a.selected.marker,editType:"style"},unselected:{marker:a.unselected.marker,editType:"style"},text:c({},a.text,{}),hovertext:c({},a.hovertext,{}),hovertemplate:s({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:a.zorder}},6404:function(e,t,r){"use strict";var n=r(4460),a=r(3400),i=r(1888).getAxisGroup,o=["v","h"];function l(e,t,r,o){var l,s,c,u=t.calcdata,f=t._fullLayout,d=o._id,h=d.charAt(0),p=[],v=0;for(l=0;l1,b=1-f[e+"gap"],_=1-f[e+"groupgap"];for(l=0;l0){var U=S.pointpos,G=S.jitter,q=S.marker.size/2,Z=0;U+G>=0&&((Z=Y*(U+G))>A?(V=!0,H=q,E=Z):Z>R&&(H=q,E=A)),Z<=A&&(E=A);var W=0;U-G<=0&&((W=-Y*(U-G))>L?(V=!0,j=q,B=W):W>F&&(j=q,B=L)),W<=L&&(B=L)}else E=A,B=L;var X=new Array(c.length);for(s=0;se.lo&&(x.so=!0)}return i}));d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(i.translatePoints,o,l)}function s(e,t,r,i){var o,l,s=t.val,c=t.pos,u=!!c.rangebreaks,f=i.bPos,d=i.bPosPxOffset||0,h=r.boxmean||(r.meanline||{}).visible;Array.isArray(i.bdPos)?(o=i.bdPos[0],l=i.bdPos[1]):(o=i.bdPos,l=i.bdPos);var p=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?a.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each((function(e){var t=c.c2l(e.pos+f,!0),a=c.l2p(t-o)+d,i=c.l2p(t+l)+d,p=u?(a+i)/2:c.l2p(t)+d,v=s.c2p(e.mean,!0),y=s.c2p(e.mean-e.sd,!0),g=s.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+v+","+a+"V"+i+("sd"===h?"m0,0L"+y+","+p+"L"+v+","+a+"L"+g+","+p+"Z":"")):n.select(this).attr("d","M"+a+","+v+"H"+i+("sd"===h?"m0,0L"+p+","+y+"L"+a+","+v+"L"+p+","+g+"Z":""))}))}e.exports={plot:function(e,t,r,i){var c=e._context.staticPlot,u=t.xaxis,f=t.yaxis;a.makeTraceGroups(i,r,"trace boxes").each((function(e){var t,r,a=n.select(this),i=e[0],d=i.t,h=i.trace;d.wdPos=d.bdPos*h.whiskerwidth,!0!==h.visible||d.empty?a.remove():("h"===h.orientation?(t=f,r=u):(t=u,r=f),o(a,{pos:t,val:r},h,d,c),l(a,{x:u,y:f},h,d),s(a,{pos:t,val:r},h,d))}))},plotBoxAndWhiskers:o,plotPoints:l,plotBoxMean:s}},3395:function(e,t,r){"use strict";var n=r(3428),a=r(6308),i=r(3616);e.exports={style:function(e,t,r){var o=r||n.select(e).selectAll("g.trace.boxes");o.style("opacity",(function(e){return e[0].trace.opacity})),o.each((function(t){var r=n.select(this),o=t[0].trace,l=o.line.width;function s(e,t,r,n){e.style("stroke-width",t+"px").call(a.stroke,r).call(a.fill,n)}var c=r.selectAll("path.box");if("candlestick"===o.type)c.each((function(e){if(!e.empty){var t=n.select(this),r=o[e.dir];s(t,r.line.width,r.line.color,r.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}}));else{s(c,l,o.line.color,o.fillcolor),r.selectAll("path.mean").style({"stroke-width":l,"stroke-dasharray":2*l+"px,"+l+"px"}).call(a.stroke,o.line.color);var u=r.selectAll("path.point");i.pointStyle(u,o,e)}}))},styleOnSelect:function(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?i.selectedPointStyle(a,n):i.pointStyle(a,n,e)}}},4216:function(e,t,r){"use strict";var n=r(3400).extendFlat,a=r(9736).axisHoverFormat,i=r(279),o=r(3188);function l(e){return{line:{color:n({},o.line.color,{dflt:e}),width:o.line.width,editType:"style"},fillcolor:o.fillcolor,editType:"style"}}e.exports={xperiod:i.xperiod,xperiod0:i.xperiod0,xperiodalignment:i.xperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),x:i.x,open:i.open,high:i.high,low:i.low,close:i.close,line:{width:n({},o.line.width,{}),editType:"style"},increasing:l(i.increasing.line.color.dflt),decreasing:l(i.decreasing.line.color.dflt),text:i.text,hovertext:i.hovertext,whiskerwidth:n({},o.whiskerwidth,{dflt:0}),hoverlabel:i.hoverlabel,zorder:o.zorder}},6283:function(e,t,r){"use strict";var n=r(3400),a=r(4460),i=r(1220),o=r(2812).calcCommon;function l(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}e.exports=function(e,t){var r=e._fullLayout,s=a.getFromId(e,t.xaxis),c=a.getFromId(e,t.yaxis),u=s.makeCalcdata(t,"x"),f=i(t,s,"x",u).vals,d=o(e,t,u,f,c,l);return d.length?(n.extendFlat(d[0].t,{num:r._numBoxes,dPos:n.distinctVals(f).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,d):[{t:{empty:!0}}]}},4588:function(e,t,r){"use strict";var n=r(3400),a=r(6308),i=r(364),o=r(1147),l=r(4216);function s(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",a.addOpacity(i,.5))}e.exports=function(e,t,r,a){function c(r,a){return n.coerce(e,t,l,r,a)}i(e,t,c,a)?(o(e,t,a,c,{x:!0}),c("xhoverformat"),c("yhoverformat"),c("line.width"),s(0,t,c,"increasing"),s(0,t,c,"decreasing"),c("text"),c("hovertext"),c("whiskerwidth"),a._requestRangeslider[t.xaxis]=!0,c("zorder")):t.visible=!1}},1712:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"candlestick",basePlotModule:r(7952),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:r(4216),layoutAttributes:r(6560),supplyLayoutDefaults:r(8832).supplyLayoutDefaults,crossTraceCalc:r(6404).crossTraceCalc,supplyDefaults:r(4588),calc:r(6283),plot:r(6348).plot,layerName:"boxlayer",style:r(3395).style,hoverPoints:r(8720).hoverPoints,selectPoints:r(7384)}},1867:function(e,t,r){"use strict";var n=r(3400);e.exports=function(e,t){for(var r=0;r"),s.color=function(e,t){var r=e.marker,a=t.mc||r.color,i=t.mlc||r.line.color,o=t.mlw||r.line.width;return n(a)?a:n(i)&&o?i:void 0}(u,d),[s]}}},4704:function(e,t,r){"use strict";e.exports={attributes:r(88),layoutAttributes:r(7076),supplyDefaults:r(5432).supplyDefaults,crossTraceDefaults:r(5432).crossTraceDefaults,supplyLayoutDefaults:r(1631),calc:r(3096),crossTraceCalc:r(4804),plot:r(7440),style:r(4544).style,hoverPoints:r(1488),eventData:r(4580),selectPoints:r(5784),moduleType:"trace",name:"funnel",basePlotModule:r(7952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(e){"use strict";e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},1631:function(e,t,r){"use strict";var n=r(3400),a=r(7076);e.exports=function(e,t,r){var i=!1;function o(r,i){return n.coerce(e,t,a,r,i)}for(var l=0;l path").each((function(e){if(!e.isBlank){var t=l.marker;n.select(this).call(i.fill,e.mc||t.color).call(i.stroke,e.mlc||t.line.color).call(a.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",l.selectedpoints&&!e.selected?o:1)}})),c(r,l,e),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(i.fill,l.connector.fillcolor)})),r.selectAll(".lines").each((function(){var e=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},9952:function(e,t,r){"use strict";var n=r(4996),a=r(5464),i=r(6968).u,o=r(1776).Ks,l=r(1776).Gw,s=r(2880).extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:s({},n.marker.line.color,{dflt:null}),width:s({},n.marker.line.width,{dflt:1}),editType:"calc"},pattern:n.marker.pattern,editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:s({},n.scalegroup,{}),textinfo:s({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:s({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:s({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:s({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},1248:function(e,t,r){"use strict";var n=r(7316);t.name="funnelarea",t.plot=function(e,r,a,i){n.plotBasePlot(t.name,e,r,a,i)},t.clean=function(e,r,a,i){n.cleanBasePlot(t.name,e,r,a,i)}},4e3:function(e,t,r){"use strict";var n=r(5768);e.exports={calc:function(e,t){return n.calc(e,t)},crossTraceCalc:function(e){n.crossTraceCalc(e,{type:"funnelarea"})}}},2688:function(e,t,r){"use strict";var n=r(3400),a=r(9952),i=r(6968).Q,o=r(1508).handleText,l=r(4174).handleLabelsAndValues,s=r(4174).handleMarkerDefaults;e.exports=function(e,t,r,c){function u(r,i){return n.coerce(e,t,a,r,i)}var f=u("labels"),d=u("values"),h=l(f,d),p=h.len;if(t._hasLabels=h.hasLabels,t._hasValues=h.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),p){t._length=p,s(e,t,c,u),u("scalegroup");var v,y=u("text"),g=u("texttemplate");if(g||(v=u("textinfo",Array.isArray(y)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),g||v&&"none"!==v){var m=u("textposition");o(e,t,c,u,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===v&&u("textposition","none");i(t,c,u),u("title.text")&&(u("title.position"),n.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}else t.visible=!1}},2396:function(e,t,r){"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:r(1248),categories:["pie-like","funnelarea","showLegend"],attributes:r(9952),layoutAttributes:r(1280),supplyDefaults:r(2688),supplyLayoutDefaults:r(5384),calc:r(4e3).calc,crossTraceCalc:r(4e3).crossTraceCalc,plot:r(9472),style:r(2096),styleOne:r(528),meta:{}}},1280:function(e,t,r){"use strict";var n=r(5204).hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},5384:function(e,t,r){"use strict";var n=r(3400),a=r(1280);e.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}},9472:function(e,t,r){"use strict";var n=r(3428),a=r(3616),i=r(3400),o=i.strScale,l=i.strTranslate,s=r(2736),c=r(8184).toMoveInsideBar,u=r(2744),f=u.recordMinTextSize,d=u.clearMinTextSize,h=r(9656),p=r(7820),v=p.attachFxHandlers,y=p.determineInsideTextFont,g=p.layoutAreas,m=p.prerenderTitles,x=p.positionTitleOutside,b=p.formatSliceLabel;function _(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}e.exports=function(e,t){var r=e._context.staticPlot,u=e._fullLayout;d("funnelarea",u),m(t,e),g(t,u._size),i.makeTraceGroups(u._funnelarealayer,t,"trace").each((function(t){var d=n.select(this),p=t[0],g=p.trace;!function(e){if(e.length){var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i,o,l,s=Math.pow(a,2),c=t.vTotal,u=c,f=c*s/(1-s)/c,d=[];for(d.push(S()),o=e.length-1;o>-1;o--)if(!(l=e[o]).hidden){var h=l.v/u;f+=h,d.push(S())}var p=1/0,v=-1/0;for(o=0;o-1;o--)if(!(l=e[o]).hidden){var A=d[k+=1][0],L=d[k][1];l.TL=[-A,L],l.TR=[A,L],l.BL=T,l.BR=M,l.pxmid=(_=l.TR,w=l.BR,[.5*(_[0]+w[0]),.5*(_[1]+w[1])]),T=l.TL,M=l.TR}}function S(){var e,t={x:e=Math.sqrt(f),y:-e};return[t.x,t.y]}}(t),d.each((function(){var d=n.select(this).selectAll("g.slice").data(t);d.enter().append("g").classed("slice",!0),d.exit().remove(),d.each((function(o,l){if(o.hidden)n.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=g.index;var d=p.cx,m=p.cy,x=n.select(this),w=x.selectAll("path.surface").data([o]);w.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),x.call(v,e,t);var T="M"+(d+o.TR[0])+","+(m+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+"Z";w.attr("d",T),b(e,o,p);var M=h.castOption(g.textposition,o.pts),k=x.selectAll("g.slicetext").data(o.text&&"none"!==M?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each((function(){var r=i.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),h=i.ensureUniformFontSize(e,y(g,o,u.font));r.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,h).call(s.convertToTspans,e);var p,v,x,b=a.bBox(r.node()),_=Math.min(o.BL[1],o.BR[1])+m,w=Math.max(o.TL[1],o.TR[1])+m;v=Math.max(o.TL[0],o.BL[0])+d,x=Math.min(o.TR[0],o.BR[0])+d,(p=c(v,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=h.size,f(g.type,p,u),t[l].transform=p,i.setTransormAndDisplay(r,p)}))}}));var m=n.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);m.enter().append("g").classed("titletext",!0),m.exit().remove(),m.each((function(){var t=i.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),r=g.title.text;g._meta&&(r=i.templateString(r,g._meta)),t.text(r).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,g.title.font).call(s.convertToTspans,e);var c=x(p,u._size);t.attr("transform",l(c.x,c.y)+o(Math.min(1,c.scale))+l(c.tx,c.ty))}))}))}))}},2096:function(e,t,r){"use strict";var n=r(3428),a=r(528),i=r(2744).resizeText;e.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");i(e,t,"funnelarea"),t.each((function(t){var r=t[0].trace,i=n.select(this);i.style({opacity:r.opacity}),i.selectAll("path.surface").each((function(t){n.select(this).call(a,t,r,e)}))}))}},196:function(e,t,r){"use strict";var n=r(832),a=r(9736).axisHoverFormat,i=r(1776).Ks,o=r(1776).Gw,l=r(5376),s=r(1120),c=r(3316),u=r(2880).extendFlat;e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:a("x"),yhoverformat:a("y"),text:u({},n.text,{}),hovertext:u({},n.hovertext,{}),orientation:n.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:s("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:s("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:i({},{keys:c.eventDataKeys}),texttemplate:o({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:u({},n.textposition,{arrayOk:!1}),textfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:l({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:n.insidetextanchor,textangle:n.textangle,cliponaxis:n.cliponaxis,constraintext:n.constraintext,marker:n.marker,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,_deprecated:{bardir:n._deprecated.bardir},zorder:n.zorder}},2e3:function(e){"use strict";e.exports=function(e,t){for(var r=e.length,n=0,a=0;ai){var o=i-r[e];return r[e]=i,o}}return 0},max:function(e,t,r,a){var i=a[t];if(n(i)){if(i=Number(i),!n(r[e]))return r[e]=i,i;if(r[e]c?e>o?e>1.1*a?a:e>1.1*i?i:o:e>l?l:e>s?s:c:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function h(e,t,r,n,i,l){if(n&&e>o){var s=p(t,i,l),c=p(r,i,l),u=e===a?0:1;return s[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function p(e,t,r){var n=t.c2d(e,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(e,t,r,n,i){var l,s,c=-1.1*t,d=-.1*t,h=e-d,p=r[0],v=r[1],y=Math.min(f(p+d,p+h,n,i),f(v+d,v+h,n,i)),g=Math.min(f(p+c,p+d,n,i),f(v+c,v+d,n,i));if(y>g&&go){var m=l===a?1:6,x=l===a?"M12":"M1";return function(t,r){var o=n.c2d(t,a,i),l=o.indexOf("-",m);l>0&&(o=o.substr(0,l));var c=n.d2c(o,0,i);if(cr.r2l(E)&&(H=o.tickIncrement(H,b.size,!0,h)),z.start=r.l2r(H),F||a.nestedProperty(t,g+".start").set(z.start)}var j=b.end,Y=r.r2l(I.end),V=void 0!==Y;if((b.endFound||V)&&Y!==r.r2l(j)){var U=V?Y:a.aggNums(Math.max,null,p);z.end=r.l2r(U),V||a.nestedProperty(t,g+".start").set(z.end)}var G="autobin"+l;return!1===t._input[G]&&(t._input[g]=a.extendFlat({},t[g]||{}),delete t._input[G],delete t[G]),[z,p]}e.exports={calc:function(e,t){var r,i,h,p,v=[],y=[],g="h"===t.orientation,m=o.getFromId(e,g?t.yaxis:t.xaxis),x=g?"y":"x",b={x:"y",y:"x"}[x],_=t[x+"calendar"],w=t.cumulative,T=d(e,t,m,x),M=T[0],k=T[1],A="string"==typeof M.size,L=[],S=A?L:M,O=[],D=[],C=[],P=0,I=t.histnorm,z=t.histfunc,N=-1!==I.indexOf("density");w.enabled&&N&&(I=I.replace(/ ?density$/,""),N=!1);var R,F="max"===z||"min"===z?null:0,E=s.count,B=c[I],H=!1,j=function(e){return m.r2c(e,0,_)};for(a.isArrayOrTypedArray(t[b])&&"count"!==z&&(R=t[b],H="avg"===z,E=s[z]),r=j(M.start),h=j(M.end)+(r-o.tickIncrement(r,M.size,!1,_))/1e6;r=0&&p=0;n--)l(n);else if("increasing"===t){for(n=1;n