Skip to content

Instantly share code, notes, and snippets.

@tddschn
Created November 3, 2024 14:38
Show Gist options
  • Save tddschn/eb93439f3e50674b2cfdf5f094f3ec28 to your computer and use it in GitHub Desktop.
Save tddschn/eb93439f3e50674b2cfdf5f094f3ec28 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
<html>
<head><meta charset="utf-8" /></head>
<body>
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script type="text/javascript">/**
* plotly.js v2.35.2
* Copyright 2012-2024, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
/*! For license information please see plotly.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Plotly=e():t.Plotly=e()}(self,(function(){return function(){var t={6713:function(t,e,r){"use strict";var n=r(34809),i={"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 a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},14187:function(t,e,r){"use strict";t.exports=r(47908)},20273:function(t,e,r){"use strict";t.exports=r(58218)},6457:function(t,e,r){"use strict";t.exports=r(89362)},15849:function(t,e,r){"use strict";t.exports=r(53794)},38847:function(t,e,r){"use strict";t.exports=r(29698)},7659:function(t,e,r){"use strict";t.exports=r(51252)},60089:function(t,e,r){"use strict";t.exports=r(48050)},22084:function(t,e,r){"use strict";t.exports=r(58075)},35892:function(t,e,r){"use strict";t.exports=r(9419)},81204:function(t,e,r){"use strict";t.exports=r(28128)},55857:function(t,e,r){"use strict";t.exports=r(47050)},12862:function(t,e,r){"use strict";t.exports=r(91405)},97629:function(t,e,r){"use strict";t.exports=r(34406)},67549:function(t,e,r){"use strict";t.exports=r(17430)},2660:function(t,e,r){"use strict";t.exports=r(91995)},86071:function(t,e,r){"use strict";t.exports=r(81264)},66200:function(t,e,r){"use strict";t.exports=r(42849)},53446:function(t,e,r){"use strict";t.exports=r(52213)},86899:function(t,e,r){"use strict";t.exports=r(91132)},13430:function(t,e,r){"use strict";t.exports=r(50453)},21548:function(t,e,r){"use strict";t.exports=r(29251)},53939:function(t,e,r){"use strict";t.exports=r(72892)},1902:function(t,e,r){"use strict";t.exports=r(74461)},29096:function(t,e,r){"use strict";t.exports=r(66143)},23820:function(t,e,r){"use strict";t.exports=r(81955)},82017:function(t,e,r){"use strict";t.exports=r(36858)},113:function(t,e,r){"use strict";t.exports=r(92106)},20260:function(t,e,r){"use strict";var n=r(67549);n.register([r(20273),r(15849),r(21548),r(1902),r(29096),r(23820),r(12862),r(1639),r(10067),r(53446),r(31014),r(113),r(78170),r(8202),r(92382),r(82017),r(86899),r(54357),r(66903),r(90594),r(71680),r(7412),r(55857),r(784),r(74221),r(22084),r(44001),r(97281),r(12345),r(53939),r(29117),r(5410),r(5057),r(81204),r(86071),r(14226),r(35892),r(2660),r(96599),r(28573),r(76832),r(60089),r(51469),r(97629),r(27700),r(7659),r(11780),r(27195),r(6457),r(84639),r(14187),r(66200),r(13430),r(90590),r(38847)]),t.exports=n},28573:function(t,e,r){"use strict";t.exports=r(25638)},90594:function(t,e,r){"use strict";t.exports=r(75297)},7412:function(t,e,r){"use strict";t.exports=r(58859)},27700:function(t,e,r){"use strict";t.exports=r(12683)},5410:function(t,e,r){"use strict";t.exports=r(6305)},29117:function(t,e,r){"use strict";t.exports=r(83910)},78170:function(t,e,r){"use strict";t.exports=r(49913)},12345:function(t,e,r){"use strict";t.exports=r(15186)},96599:function(t,e,r){"use strict";t.exports=r(71760)},54357:function(t,e,r){"use strict";t.exports=r(17822)},51469:function(t,e,r){"use strict";t.exports=r(56534)},74221:function(t,e,r){"use strict";t.exports=r(18070)},44001:function(t,e,r){"use strict";t.exports=r(52378)},14226:function(t,e,r){"use strict";t.exports=r(30929)},5057:function(t,e,r){"use strict";t.exports=r(83866)},11780:function(t,e,r){"use strict";t.exports=r(66939)},27195:function(t,e,r){"use strict";t.exports=r(23748)},84639:function(t,e,r){"use strict";t.exports=r(73304)},1639:function(t,e,r){"use strict";t.exports=r(12864)},90590:function(t,e,r){"use strict";t.exports=r(99855)},97281:function(t,e,r){"use strict";t.exports=r(91450)},784:function(t,e,r){"use strict";t.exports=r(51943)},8202:function(t,e,r){"use strict";t.exports=r(80809)},66903:function(t,e,r){"use strict";t.exports=r(95984)},76832:function(t,e,r){"use strict";t.exports=r(51671)},92382:function(t,e,r){"use strict";t.exports=r(47181)},10067:function(t,e,r){"use strict";t.exports=r(37276)},71680:function(t,e,r){"use strict";t.exports=r(75703)},31014:function(t,e,r){"use strict";t.exports=r(38261)},11645:function(t){"use strict";t.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}]},50222:function(t,e,r){"use strict";var n=r(11645),i=r(80337),a=r(54826),o=r(78032).templatedArray;r(35081),t.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:i({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",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.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",a.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:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},60317:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(3377).draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},"range"===a&&s(e,r),"range"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],c=t["a"+a+"ref"],u=t["_"+a+"padplus"],h=t["_"+a+"padminus"],f={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+f,m=p-f,g=3*t.startarrowsize*t.arrowwidth||0,y=g+f,v=g-f;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:m}),_=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,y),ppadminus:Math.max(h,v)});r={min:[x.min[0],_.min[0]],max:[x.max[0],_.max[0]]}}else y=s?y+s:y,v=s?v-s:v,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,y),ppadminus:Math.max(h,m,v)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},6035:function(t,e,r){"use strict";var n=r(34809),i=r(33626),a=r(78032).arrayEditor;function o(t,e){var r,n,i,a,o,l,c,u=t._fullLayout.annotations,h=[],f=[],p=[],d=(e||[]).length;for(r=0;r<u.length;r++)if(a=(i=u[r]).clicktoshow){for(n=0;n<d;n++)if(l=(o=e[n]).xaxis,c=o.yaxis,l._id===i.xref&&c._id===i.yref&&l.d2r(o.x)===s(i._xclick,l)&&c.d2r(o.y)===s(i._yclick,c)){(i.visible?"onout"===a?f:p:h).push(r);break}n===d&&i.visible&&"onout"===a&&f.push(r)}return{on:h,off:f,explicitOff:p}}function s(t,e){return"log"===e.type?e.l2r(t):e.d2r(t)}t.exports={hasClickToShow:function(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),h={},f=t._fullLayout.annotations;if(c.length||u.length){for(r=0;r<c.length;r++)(s=a(t.layout,"annotations",f[c[r]])).modifyItem("visible",!0),n.extendFlat(h,s.getUpdateObj());for(r=0;r<u.length;r++)(s=a(t.layout,"annotations",f[u[r]])).modifyItem("visible",!1),n.extendFlat(h,s.getUpdateObj());return i.call("update",t,{},h)}}}},53271:function(t,e,r){"use strict";var n=r(34809),i=r(78766);t.exports=function(t,e,r,a){a("opacity");var o=a("bgcolor"),s=a("bordercolor"),l=i.opacity(s);a("borderpad");var c=a("borderwidth"),u=a("showarrow");if(a("text",u?" ":r._dfltTitle.annotation),a("textangle"),n.coerceFont(a,"font",r.font),a("width"),a("align"),a("height")&&a("valign"),u){var h,f,p=a("arrowside");-1!==p.indexOf("end")&&(h=a("arrowhead"),f=a("arrowsize")),-1!==p.indexOf("start")&&(a("startarrowhead",h),a("startarrowsize",f)),a("arrowcolor",l?e.bordercolor:i.defaultLine),a("arrowwidth",2*(l&&c||1)),a("standoff"),a("startstandoff")}var d=a("hovertext"),m=r.hoverlabel||{};if(d){var g=a("hoverlabel.bgcolor",m.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),y=a("hoverlabel.bordercolor",m.bordercolor||i.contrast(g)),v=n.extendFlat({},m.font);v.color||(v.color=y),n.coerceFont(a,"hoverlabel.font",v)}a("captureevents",!!d)}},59741:function(t,e,r){"use strict";var n=r(10721),i=r(8083);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,c,u=t._fullLayout.annotations,h=e._id.charAt(0),f=0;f<u.length;f++)l=u[f],c="annotations["+f+"].",l[h+"ref"]===e._id&&p(h),l["a"+h+"ref"]===e._id&&p("a"+h);function p(t){var r=l[t],s=null;s=o?i(r,e.range):Math.pow(10,r),n(s)||(s=null),a(c+t,s)}}},63737:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(59008),o=r(53271),s=r(50222);function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a("visible"),c=a("clicktoshow");if(l||c){o(t,e,r,a);for(var u=e.showarrow,h=["x","y"],f=[-10,-30],p={_fullLayout:r},d=0;d<2;d++){var m=h[d],g=i.coerceRef(t,e,p,m,"","paper");if("paper"!==g&&i.getFromId(p,g)._annIndices.push(e._index),i.coercePosition(e,p,a,g,m,.5),u){var y="a"+m,v=i.coerceRef(t,e,p,y,"pixel",["pixel","paper"]);"pixel"!==v&&v!==g&&(v=e[y]="pixel");var x="pixel"===v?f[d]:.4;i.coercePosition(e,p,a,v,y,x)}a(m+"anchor"),a(m+"shift")}if(n.noneOrAll(t,e,["x","y"]),u&&n.noneOrAll(t,e,["ax","ay"]),c){var _=a("xclick"),b=a("yclick");e._xclick=void 0===_?e.x:i.cleanPosition(_,p,e.xref),e._yclick=void 0===b?e.y:i.cleanPosition(b,p,e.yref)}}}t.exports=function(t,e){a(t,e,{name:"annotations",handleItemDefaults:l})}},3377:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(44122),o=r(34809),s=o.strTranslate,l=r(29714),c=r(78766),u=r(62203),h=r(32141),f=r(30635),p=r(27983),d=r(14751),m=r(78032).arrayEditor,g=r(23768);function y(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),x(t,r,e,!1,n,i)}function v(t,e,r,n,i){var a=i[r],o=i[r+"ref"],s=-1!==r.indexOf("y"),c="domain"===l.getRefType(o),u=s?n.h:n.w;return t?c?a+(s?-e:e)/t._length:t.p2r(t.r2p(a)+e):a+(s?-e:e)/u}function x(t,e,r,a,y,x){var _,b,w=t._fullLayout,T=t._fullLayout._size,k=t._context.edits;a?(_="annotation-"+a,b=a+".annotations"):(_="annotation",b="annotations");var A=m(t.layout,b,e),M=A.modifyBase,S=A.modifyItem,E=A.getUpdateObj;w._infolayer.selectAll("."+_+'[data-index="'+r+'"]').remove();var C="clip"+w._uid+"_ann"+r;if(e._input&&!1!==e.visible){var L={x:{},y:{}},I=+e.textangle||0,P=w._infolayer.append("g").classed(_,!0).attr("data-index",String(r)).style("opacity",e.opacity),z=P.append("g").classed("annotation-text-g",!0),O=k[e.showarrow?"annotationTail":"annotationPosition"],D=e.captureevents||k.annotationText||O,R=z.append("g").style("pointer-events",D?"all":null).call(p,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",Z(n.event))}));e.hovertext&&R.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();h.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontShadow:n.fontShadow,fontLineposition:n.fontLineposition,fontTextcase:n.fontTextcase},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:t})})).on("mouseout",(function(){h.loneUnhover(w._hoverlayer.node())}));var F=e.borderwidth,B=e.borderpad,N=F+B,j=R.append("rect").attr("class","bg").style("stroke-width",F+"px").call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor),U=e.width||e.height,V=w._topclips.selectAll("#"+C).data(U?[0]:[]);V.enter().append("clipPath").classed("annclip",!0).attr("id",C).append("rect"),V.exit().remove();var q=e.font,H=w._meta?o.templateString(e.text,w._meta):e.text,G=R.append("text").classed("annotation-text",!0).text(H);k.annotationText?G.call(f.makeEditable,{delegate:R,gd:t}).call(W).on("edit",(function(r){e.text=r,this.call(W),S("text",r),y&&y.autorange&&M(y._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),i.call("_guiRelayout",t,E())})):G.call(W)}else n.selectAll("#"+C).remove();function Z(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return a&&(n.subplotId=a),n}function W(r){return r.call(u.font,q).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),f.convertToTspans(r,t,Y),r}function Y(){var r=G.selectAll("a");1===r.size()&&r.text()===G.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(j.node());var n=R.select(".annotation-text-math-group"),h=!n.empty(),m=u.bBox((h?n:G).node()),_=m.width,b=m.height,A=e.width||_,D=e.height||b,B=Math.round(A+2*N),q=Math.round(D+2*N);function H(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,Y=["x","y"],X=0;X<Y.length;X++){var $,J,K,Q,tt,et=Y[X],rt=e[et+"ref"]||et,nt=e["a"+et+"ref"],it={x:y,y:x}[et],at=(I+("x"===et?0:-90))*Math.PI/180,ot=B*Math.cos(at),st=q*Math.sin(at),lt=Math.abs(ot)+Math.abs(st),ct=e[et+"anchor"],ut=e[et+"shift"]*("x"===et?1:-1),ht=L[et],ft=l.getRefType(rt);if(it&&"domain"!==ft){var pt=it.r2fraction(e[et]);(pt<0||pt>1)&&(nt===rt?((pt=it.r2fraction(e["a"+et]))<0||pt>1)&&(W=!0):W=!0),$=it._offset+it.r2p(e[et]),Q=.5}else{var dt="domain"===ft;"x"===et?(K=e[et],$=dt?it._offset+it._length*K:$=T.l+T.w*K):(K=1-e[et],$=dt?it._offset+it._length*K:$=T.t+T.h*K),Q=e.showarrow?.5:K}if(e.showarrow){ht.head=$;var mt=e["a"+et];if(tt=ot*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(mt=1-mt),ht.tail=it._offset+it._length*mt):"paper"===gt?"y"===et?(mt=1-mt,ht.tail=T.t+T.h*mt):ht.tail=T.l+T.w*mt:ht.tail=it._offset+it.r2p(mt),J=tt}else ht.tail=$+mt,J=tt+mt;ht.text=ht.tail+tt;var yt=w["x"===et?"width":"height"];if("paper"===rt&&(ht.head=o.constrain(ht.head,1,yt-1)),"pixel"===nt){var vt=-Math.max(ht.tail-3,ht.text),xt=Math.min(ht.tail+3,ht.text)-yt;vt>0?(ht.tail+=vt,ht.text+=vt):xt>0&&(ht.tail-=xt,ht.text-=xt)}ht.tail+=ut,ht.head+=ut}else J=tt=lt*H(Q,ct),ht.text=$+tt;ht.text+=ut,tt+=ut,J+=ut,e["_"+et+"padplus"]=lt/2+J,e["_"+et+"padminus"]=lt/2-J,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(W)R.remove();else{var _t=0,bt=0;if("left"!==e.align&&(_t=(A-_)*("center"===e.align?.5:1)),"top"!==e.valign&&(bt=(D-b)*("middle"===e.valign?.5:1)),h)n.select("svg").attr({x:N+_t-1,y:N+bt}).call(u.setClipUrl,U?C:null,t);else{var wt=N+bt-m.top,Tt=N+_t-m.left;G.call(f.positionText,Tt,wt).call(u.setClipUrl,U?C:null,t)}V.select("rect").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,q-F),R.call(u.setTranslate,Math.round(L.x.text-B/2),Math.round(L.y.text-q/2)),z.attr({transform:"rotate("+I+","+L.x.text+","+L.y.text+")"});var kt,At=function(r,n){P.selectAll(".annotation-arrow-g").remove();var l=L.x.head,h=L.y.head,f=L.x.tail+r,p=L.y.tail+n,m=L.x.text+r,_=L.y.text+n,b=o.rotationXYMatrix(I,m,_),w=o.apply2DTransform(b),A=o.apply2DTransform2(b),C=+j.attr("width"),O=+j.attr("height"),D=m-.5*C,F=D+C,B=_-.5*O,N=B+O,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,h,l+1e6,h+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(f,p,l,h,t[0],t[1],t[2],t[3]);e&&(f=e.x,p=e.y)}));var V=e.arrowwidth,q=e.arrowcolor,H=e.arrowside,G=P.append("g").style({opacity:c.opacity(q)}).classed("annotation-arrow-g",!0),Z=G.append("path").attr("d","M"+f+","+p+"L"+l+","+h).style("stroke-width",V+"px").call(c.stroke,c.rgb(q));if(g(Z,H,e),k.annotationPosition&&Z.node().parentNode&&!a){var W=l,Y=h;if(e.standoff){var X=Math.sqrt(Math.pow(l-f,2)+Math.pow(h-p,2));W+=e.standoff*(f-l)/X,Y+=e.standoff*(p-h)/X}var $,J,K=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(f-W)+","+(p-Y),transform:s(W,Y)}).style("stroke-width",V+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");d.init({element:K.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);$=t.x,J=t.y,y&&y.autorange&&M(y._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(t,r){var n=w($,J),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S("x",v(y,t,"x",T,e)),S("y",v(x,r,"y",T,e)),e.axref===e.xref&&S("ax",v(y,t,"ax",T,e)),e.ayref===e.yref&&S("ay",v(x,r,"ay",T,e)),G.attr("transform",s(t,r)),z.attr({transform:"rotate("+I+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&At(0,0),O&&d.init({element:R.node(),gd:t,prepFn:function(){kt=z.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",v(y,t,"ax",T,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",v(x,r,"ay",T.w,e)):S("ay",e.ay+r),At(t,r);else{if(a)return;var i,o;if(y)i=v(y,t,"x",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=v(x,r,"y",T,e);else{var u=e._ysize/T.h,h=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(h-r/T.h,u,0,1,e.yanchor)}S("x",i),S("y",o),y&&x||(n=d.getCursor(y?.5:i,x?.5:o,e.xanchor,e.yanchor))}z.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",Z(n))},doneFn:function(){p(R),i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&y(t,r);return a.previousPromises(t)},drawOne:y,drawRaw:x}},23768:function(t,e,r){"use strict";var n=r(45568),i=r(78766),a=r(11645),o=r(34809),s=o.strScale,l=o.strRotate,c=o.strTranslate;t.exports=function(t,e,r){var o,u,h,f,p=t.node(),d=a[r.arrowhead||0],m=a[r.startarrowhead||0],g=(r.arrowwidth||1)*(r.arrowsize||1),y=(r.arrowwidth||1)*(r.startarrowsize||1),v=e.indexOf("start")>=0,x=e.indexOf("end")>=0,_=d.backoff*g+r.standoff,b=m.backoff*y+r.startstandoff;if("line"===p.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},u={x:+t.attr("x2"),y:+t.attr("y2")};var w=o.x-u.x,T=o.y-u.y;if(f=(h=Math.atan2(T,w))+Math.PI,_&&b&&_+b>Math.sqrt(w*w+T*T))return void O();if(_){if(_*_>w*w+T*T)return void O();var k=_*Math.cos(h),A=_*Math.sin(h);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(b){if(b*b>w*w+T*T)return void O();var M=b*Math.cos(h),S=b*Math.sin(h);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),C="";if(E<_+b)return void O();var L=p.getPointAtLength(0),I=p.getPointAtLength(.1);h=Math.atan2(L.y-I.y,L.x-I.x),o=p.getPointAtLength(Math.min(b,E)),C="0px,"+b+"px,";var P=p.getPointAtLength(E),z=p.getPointAtLength(E-.1);f=Math.atan2(P.y-z.y,P.x-z.x),u=p.getPointAtLength(Math.max(0,E-_)),C+=E-(C?b+_:_)+"px,"+E+"px",t.style("stroke-dasharray",C)}function O(){t.style("stroke-dasharray","0px,100px")}function D(e,a,o,u){e.path&&(e.noRotate&&(o=0),n.select(p.parentNode).append("path").attr({class:t.attr("class"),d:e.path,transform:c(a.x,a.y)+l(180*o/Math.PI)+s(u)}).style({fill:i.rgb(r.arrowcolor),"stroke-width":0}))}v&&D(m,o,h,y),x&&D(d,u,f,g)}},3599:function(t,e,r){"use strict";var n=r(3377),i=r(6035);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(50222),supplyLayoutDefaults:r(63737),includeBasePlot:r(20706)("annotations"),calcAutorange:r(60317),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(59741)}},38239:function(t,e,r){"use strict";var n=r(50222),i=r(13582).overrideAll,a=r(78032).templatedArray;t.exports=i(a("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},47979:function(t,e,r){"use strict";var n=r(34809),i=r(29714);function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()}},34232:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(59008),o=r(53271),s=r(38239);function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function c(t){var n=t+"axis",a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l("visible")&&(o(t,e,a.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){a(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},9756:function(t,e,r){"use strict";var n=r(3377).drawRaw,i=r(25802),a=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],c=!1,u=0;u<3;u++){var h=a[u],f=l[h],p=e[h+"axis"].r2fraction(f);if(p<0||p>1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},83348:function(t,e,r){"use strict";var n=r(33626),i=r(34809);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(38239)}}},layoutAttributes:r(38239),handleDefaults:r(34232),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:r(47979),draw:r(9756)}},37177:function(t,e,r){"use strict";t.exports=r(24453),r(23428),r(1401),r(72210),r(28569),r(81133),r(78295),r(25512),r(42645),r(62324),r(91662),r(66445),r(50506),r(84756),r(41858),r(57985)},29698:function(t,e,r){"use strict";var n=r(37177),i=r(34809),a=r(63821),o=a.EPOCHJD,s=a.ONEDAY,l={valType:"enumerated",values:i.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},c=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},u="##",h={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},f={};function p(t){var e=f[t];return e||(f[t]=n.instance(t))}function d(t){return i.extendFlat({},l,{description:t})}function m(t){return"Sets the calendar system to use with `"+t+"` date data."}var g={xcalendar:d(m("x"))},y=i.extendFlat({},g,{ycalendar:d(m("y"))}),v=i.extendFlat({},y,{zcalendar:d(m("z"))}),x=d(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:y,bar:y,box:y,heatmap:y,contour:y,histogram:y,histogram2d:y,histogram2dcontour:y,scatter3d:v,surface:v,mesh3d:v,scattergl:y,ohlc:g,candlestick:g},layout:{calendar:d(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:x},yaxis:{calendar:x},scene:{xaxis:{calendar:x},yaxis:{calendar:x},zaxis:{calendar:x}},polar:{radialaxis:{calendar:x}}},transforms:{filter:{valuecalendar:d(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:d(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:l,handleDefaults:c,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)c(t,e,r[i]+"calendar",n.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:p,worldCalFmt:function(t,e,r){for(var n,i,a,l,c,f=Math.floor((e+.05)/s)+o,d=p(r).fromJD(f),m=0;-1!==(m=t.indexOf("%",m));)"0"===(n=t.charAt(m+1))||"-"===n||"_"===n?(a=3,i=t.charAt(m+2),"_"===n&&(n="-")):(i=n,n="0",a=2),(l=h[i])?(c=l===u?u:d.formatDate(l[n]),t=t.substr(0,m)+c+t.substr(m+a),m+=c.length):m+=a;return t}}},10229:function(t,e){"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},78766:function(t,e,r){"use strict";var n=r(65657),i=r(10721),a=r(87800).isTypedArray,o=t.exports={},s=r(10229);o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var c=o.background=s.background;function u(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),a="a"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(t,e,r){var i=n(t).toRgb(),a=n(e).toRgb(),o={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e<s.length;e++)if(i=t[n=s[e]],"color"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=u(i[r]);else t[n]=u(i);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=u(i[r][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&"object"==typeof l)for(r=0;r<i.length;r++)o.clean(i[r])}else i&&"object"==typeof i&&!a(i)&&o.clean(i)}}},25158:function(t,e,r){"use strict";var n=r(25829),i=r(80337),a=r(93049).extendFlat,o=r(13582).overrideAll;t.exports=o({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:""}),ticklabeloverflow:a({},n.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string"},font:i({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:i({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},34554:function(t){"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},42097:function(t,e,r){"use strict";var n=r(34809),i=r(78032),a=r(22777),o=r(87433),s=r(12036),l=r(54616),c=r(25158);t.exports=function(t,e,r){var u=i.newContainer(e,"colorbar"),h=t.colorbar||{};function f(t,e){return n.coerce(h,u,c,t,e)}var p=r.margin||{t:0,b:0,l:0,r:0},d=r.width-p.l-p.r,m=r.height-p.t-p.b,g="v"===f("orientation"),y=f("thicknessmode");f("thickness","fraction"===y?30/(g?d:m):30);var v=f("lenmode");f("len","fraction"===v?1:g?m:d);var x,_,b,w="paper"===f("yref"),T="paper"===f("xref"),k="left";g?(b="middle",k=T?"left":"right",x=T?1.02:1,_=.5):(b=w?"bottom":"top",k="center",x=.5,_=w?1.02:1),n.coerce(h,u,{x:{valType:"number",min:T?-2:0,max:T?3:1,dflt:x}},"x"),n.coerce(h,u,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:_}},"y"),f("xanchor",k),f("xpad"),f("yanchor",b),f("ypad"),n.noneOrAll(h,u,["x","y"]),f("outlinecolor"),f("outlinewidth"),f("bordercolor"),f("borderwidth"),f("bgcolor");var A=n.coerce(h,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:g?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");f("ticklabeloverflow",-1!==A.indexOf("inside")?"hide past domain":"hide past div"),a(h,u,f,"linear");var M=r.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:M};-1!==A.indexOf("inside")&&(S.bgColor="black"),l(h,u,f,"linear",S),s(h,u,f,"linear",S),o(h,u,f,"linear",S),f("title.text",r._dfltTitle.colorbar);var E=u.showticklabels?u.tickfont:M,C=n.extendFlat({},M,{family:E.family,size:n.bigFont(E.size)});n.coerceFont(f,"title.font",C),f("title.side",g?"top":"right")}},5881:function(t,e,r){"use strict";var n=r(45568),i=r(65657),a=r(44122),o=r(33626),s=r(29714),l=r(14751),c=r(34809),u=c.strTranslate,h=r(93049).extendFlat,f=r(27983),p=r(62203),d=r(78766),m=r(17240),g=r(30635),y=r(65477).flipScale,v=r(97655),x=r(40957),_=r(25829),b=r(4530),w=b.LINE_SPACING,T=b.FROM_TL,k=b.FROM_BR,A=r(34554).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+A.colorbar).data(function(t){var e,r,n,i,a=t._fullLayout,o=t.calcdata,s=[];function l(t){return h(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?y(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var u=0;u<o.length;u++){var f=o[u];if((n=f[0].trace)._module){var p=n._module.colorbar;if(!0===n.visible&&p)for(var d=Array.isArray(p),m=d?p:[p],g=0;g<m.length;g++){var v=(i=m[g]).container;(r=v?n[v]:n)&&r.showscale&&((e=l(r.colorbar))._id="cb"+n.uid+(d&&v?"-"+v:""),e._traceIndex=n.index,e._propPrefix=(v?v+".":"")+"colorbar.",e._meta=n._meta,c(),s.push(e))}}}for(var x in a._colorAxes)if((r=a[x]).showscale){var _=a._colorAxes[x];(e=l(r.colorbar))._id="cb"+x,e._propPrefix=x+".colorbar.",e._meta=a._meta,i={min:"cmin",max:"cmax"},"heatmap"!==_[0]&&(n=_[1],i.calc=n._module.colorbar.calc),c(),s.push(e)}return s}(t),(function(t){return t._id}));e.enter().append("g").attr("class",(function(t){return t._id})).classed(A.colorbar,!0),e.each((function(e){var r=n.select(this);c.ensureSingle(r,"rect",A.cbbg),c.ensureSingle(r,"g",A.cbfills),c.ensureSingle(r,"g",A.cblines),c.ensureSingle(r,"g",A.cbaxis,(function(t){t.classed(A.crisp,!0)})),c.ensureSingle(r,"g",A.cbtitleunshift,(function(t){t.append("g").classed(A.cbtitle,!0)})),c.ensureSingle(r,"rect",A.cboutline);var y=function(t,e,r){var o="v"===e.orientation,l=e.len,f=e.lenmode,y=e.thickness,b=e.thicknessmode,M=e.outlinewidth,S=e.borderwidth,E=e.bgcolor,C=e.xanchor,L=e.yanchor,I=e.xpad,P=e.ypad,z=e.x,O=o?e.y:1-e.y,D="paper"===e.yref,R="paper"===e.xref,F=r._fullLayout,B=F._size,N=e._fillcolor,j=e._line,U=e.title,V=U.side,q=e._zrange||n.extent(("function"==typeof N?N:j.color).domain()),H="function"==typeof j.color?j.color:function(){return j.color},G="function"==typeof N?N:function(){return N},Z=e._levels,W=function(t,e,r){var n,i,a=e._levels,o=[],s=[],l=a.end+a.size/100,c=a.size,u=1.001*r[0]-.001*r[1],h=1.001*r[1]-.001*r[0];for(i=0;i<1e5&&(n=a.start+i*c,!(c>0?n>=l:n<=l));i++)n>u&&n<h&&o.push(n);if(e._fillgradient)s=[0];else if("function"==typeof e._fillcolor){var f=e._filllevels;if(f)for(l=f.end+f.size/100,c=f.size,i=0;i<1e5&&(n=f.start+i*c,!(c>0?n>=l:n<=l));i++)n>r[0]&&n<r[1]&&s.push(n);else(s=o.map((function(t){return t-a.size/2}))).push(s[s.length-1]+a.size)}else e._fillcolor&&"string"==typeof e._fillcolor&&(s=[0]);return a.size<0&&(o.reverse(),s.reverse()),{line:o,fill:s}}(0,e,q),Y=W.fill,X=W.line,$=Math.round(y*("fraction"===b?o?B.w:B.h:1)),J=$/(o?B.w:B.h),K=Math.round(l*("fraction"===f?o?B.h:B.w:1)),Q=K/(o?B.h:B.w),tt=R?B.w:r._fullLayout.width,et=D?B.h:r._fullLayout.height,rt=Math.round(o?z*tt+I:O*et+P),nt={center:.5,right:1}[C]||0,it={top:1,middle:.5}[L]||0,at=o?z-nt*J:O-it*J,ot=o?O-it*Q:z-nt*Q,st=Math.round(o?et*(1-ot):tt*ot);e._lenFrac=Q,e._thickFrac=J,e._uFrac=at,e._vFrac=ot;var lt=e._axis=function(t,e,r){var n=t._fullLayout,i="v"===e.orientation,a={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,labelalias:e.labelalias,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",s={type:"linear",_id:o+e._id},l={letter:o,font:n.font,noAutotickangles:"y"===o,noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function u(t,e){return c.coerce(a,s,_,t,e)}return v(a,s,u,l,n),x(a,s,u,l),s}(r,e,q);lt.position=J+(o?z+I/B.w:O+P/B.h);var ct=-1!==["top","bottom"].indexOf(V);if(o&&ct&&(lt.title.side=V,lt.titlex=z+I/B.w,lt.titley=ot+("top"===U.side?Q-P/B.h:P/B.h)),o||ct||(lt.title.side=V,lt.titley=O+P/B.h,lt.titlex=ot+I/B.w),j.color&&"auto"===e.tickmode){lt.tickmode="linear",lt.tick0=Z.start;var ut=Z.size,ht=c.constrain(K/50,4,15)+1,ft=(q[1]-q[0])/((e.nticks||ht)*ut);if(ft>1){var pt=Math.pow(10,Math.floor(Math.log(ft)/Math.LN10));ut*=pt*c.roundUp(ft/pt,[2,5,10]),(Math.abs(Z.start)/Z.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=ut}lt.domain=o?[ot+P/B.h,ot+Q-P/B.h]:[ot+I/B.w,ot+Q-I/B.w],lt.setScale(),t.attr("transform",u(Math.round(B.l),Math.round(B.t)));var dt,mt=t.select("."+A.cbtitleunshift).attr("transform",u(-Math.round(B.l),-Math.round(B.t))),gt=lt.ticklabelposition,yt=lt.title.font.size,vt=t.select("."+A.cbaxis),xt=0,_t=0;function bt(n,i){var a={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:F._dfltTitle.colorbar,containerGroup:t.select("."+A.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(r,n,h(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&ct||!o&&!ct)&&("top"===V&&(t=I+B.l+tt*z,e=P+B.t+et*(1-ot-Q)+3+.75*yt),"bottom"===V&&(t=I+B.l+tt*z,e=P+B.t+et*(1-ot)-3-.25*yt),"right"===V&&(e=P+B.t+et*O+3+.75*yt,t=I+B.l+tt*ot),bt(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ct||o&&ct){var a,l=t.select("."+A.cbtitle),h=l.select("text"),f=[-M/2,M/2],d=l.select(".h"+lt._id+"title-math-group").node(),m=15.6;if(h.node()&&(m=parseInt(h.node().style.fontSize,10)*w),d?(a=p.bBox(d),_t=a.width,(xt=a.height)>m&&(f[1]-=(xt-m)/2)):h.node()&&!h.classed(A.jsPlaceholder)&&(a=p.bBox(h.node()),_t=a.width,xt=a.height),o){if(xt){if(xt+=5,"top"===V)lt.domain[1]-=xt/B.h,f[1]*=-1;else{lt.domain[0]+=xt/B.h;var y=g.lineCount(h);f[1]+=(1-y)*m}l.attr("transform",u(f[0],f[1])),lt.setScale()}}else _t&&("right"===V&&(lt.domain[0]+=(_t+yt/2)/B.w),l.attr("transform",u(f[0],f[1])),lt.setScale())}t.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",o?u(0,Math.round(B.h*(1-lt.domain[1]))):u(Math.round(B.w*lt.domain[0]),0)),vt.attr("transform",o?u(0,Math.round(-B.t)):u(Math.round(-B.l),0));var v=t.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Y);v.enter().append("rect").classed(A.cbfill,!0).attr("style",""),v.exit().remove();var x=q.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));v.each((function(t,a){var s=[0===a?q[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?q[1]:(Y[a]+Y[a+1])/2].map(lt.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",rt).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max($,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var u=G(t).replace("e-","");l.attr("fill",i(u).toHexString())}}));var _=t.select("."+A.cblines).selectAll("path."+A.cbline).data(j.color&&j.width?X:[]);_.enter().append("path").classed(A.cbline,!0),_.exit().remove(),_.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+j.width/2%1;n.select(this).attr("d","M"+(o?e+","+r:r+","+e)+(o?"h":"v")+$).call(p.lineGroupStyle,j.width,H(t),j.dash)})),vt.selectAll("g."+lt._id+"tick,path").remove();var b=rt+$+(M||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(lt),k=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,T):T,layer:vt,path:s.makeTickPath(lt,b,k),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:T,layer:vt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,b)})},function(){if(o&&!ct||!o&&ct){var t,i,a=lt.position||0,s=lt._offset+lt._length/2;if("right"===V)i=s,t=B.l+tt*a+10+yt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===V&&(i=B.t+et*a+10+(-1===gt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===V){var l=U.text.split("<br>").length;i=B.t+et*a+10-$-w*yt*l}bt((o?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:V,offsetTop:o?0:B.t,offsetLeft:o?B.l:0,maxShift:o?F.width:F.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=$+M/2;-1===gt.indexOf("inside")&&(n=p.bBox(vt.node()),s+=o?n.width:n.height),dt=mt.select("text");var c=0,h=o&&"top"===V,m=!o&&"right"===V,g=0;if(dt.node()&&!dt.classed(A.jsPlaceholder)){var v,x=mt.select(".h"+lt._id+"title-math-group").node();x&&(o&&ct||!o&&!ct)?(c=(n=p.bBox(x)).width,v=n.height):(c=(n=p.bBox(mt.node())).right-B.l-(o?rt:st),v=n.bottom-B.t-(o?st:rt),o||"top"!==V||(s+=n.height,g=n.height)),m&&(dt.attr("transform",u(c/2+yt/2,0)),c*=2),s=Math.max(s,o?c:v)}var _=2*(o?I:P)+s+S+M/2,w=0;!o&&U.text&&"bottom"===L&&O<=0&&(_+=w=_/2,g+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=g;var N=S+M,j=(o?rt:st)-N/2-(o?I:0),q=(o?st:rt)-(o?K:P+g-w);t.select("."+A.cbbg).attr("x",j).attr("y",q).attr(o?"width":"height",Math.max(_-w,2)).attr(o?"height":"width",Math.max(K+N,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style("stroke-width",S);var H=m?Math.max(c-10,0):0;t.selectAll("."+A.cboutline).attr("x",(o?rt:st+I)+H).attr("y",(o?st+P-K:rt)+(h?xt:0)).attr(o?"width":"height",Math.max($,2)).attr(o?"height":"width",Math.max(K-(o?2*P+xt:2*I+H),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":M});var G=o?nt*_:0,Z=o?0:(1-it)*_-g;if(G=R?B.l-G:-G,Z=D?B.t-Z:-Z,t.attr("transform",u(G,Z)),!o&&(S||i(E).getAlpha()&&!i.equals(F.paper_bgcolor,E))){var W=vt.selectAll("text"),Y=W[0].length,X=t.select("."+A.cbbg).node(),J=p.bBox(X),Q=p.getTranslate(t);W.each((function(t,e){var r=Y-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=J.right+Q.x+st-S-2+z-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=J.left+Q.x+st+S+2-s)<0&&(n=0)}n&&(Y<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=T[C],at=k[C],ot=T[L],ut=k[L],ht=_-$;o?("pixels"===f?(tt.y=O,tt.t=K*ot,tt.b=K*ut):(tt.t=tt.b=0,tt.yt=O+l*ot,tt.yb=O-l*ut),"pixels"===b?(tt.x=z,tt.l=_*et,tt.r=_*at):(tt.l=ht*et,tt.r=ht*at,tt.xl=z-y*et,tt.xr=z+y*at)):("pixels"===f?(tt.x=z,tt.l=K*et,tt.r=K*at):(tt.l=tt.r=0,tt.xl=z+l*et,tt.xr=z-l*at),"pixels"===b?(tt.y=1-O,tt.t=_*ot,tt.b=_*ut):(tt.t=ht*ot,tt.b=ht*ut,tt.yt=O-y*ot,tt.yb=O+y*ut));var ft=e.y<.5?"b":"t",pt=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var _t={r:F.width-j-G,l:j+tt.r,b:F.height-q-Z,t:q+tt.b};R&&D?a.autoMargin(r,e._id,tt):R?r._fullLayout._reservedMargin[e._id][ft]=_t[ft]:D||o?r._fullLayout._reservedMargin[e._id][pt]=_t[pt]:r._fullLayout._reservedMargin[e._id][ft]=_t[ft]}],r)}(r,e,t);y&&y.then&&(t._promises||[]).push(y),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),f(t)},moveFn:function(r,o){t.attr("transform",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var h=l.getCursor(i,a,e.xanchor,e.yanchor);f(t,h)},doneFn:function(){if(f(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},91362:function(t,e,r){"use strict";var n=r(34809);t.exports=function(t){return n.isPlainObject(t.colorbar)}},96919:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(25158),supplyDefaults:r(42097),draw:r(5881).draw,hasColorbar:r(91362)}},87163:function(t,e,r){"use strict";var n=r(25158),i=r(90694).counter,a=r(62994),o=r(19017).scales;function s(t){return"`"+t+"`"}a(o),t.exports=function(t,e){t=t||"";var r,a=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),c="showScaleDflt"in e?e.showScaleDflt:"z"===a,u="string"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,h=e.editTypeOverride||"",f=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(f+(r={z:"z",c:"color"}[a]));var p=a+"auto",d=a+"min",m=a+"max",g=a+"mid",y=(s(f+p),s(f+d),s(f+m),{});y[d]=y[m]=void 0;var v={};v[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:h||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:y},x[d]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:v},x[m]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:v},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},28379:function(t,e,r){"use strict";var n=r(10721),i=r(34809),a=r(65477).extractOpts;t.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,h=a(u),f=!1!==h.auto,p=h.min,d=h.max,m=h.mid,g=function(){return i.aggNums(Math.min,null,l)},y=function(){return i.aggNums(Math.max,null,l)};void 0===p?p=g():f&&(p=u._colorAx&&n(p)?Math.min(p,g()):g()),void 0===d?d=y():f&&(d=u._colorAx&&n(d)?Math.max(d,y()):y()),f&&void 0!==m&&(d-m>m-p?p=m-(d-m):d-m<m-p&&(d=m+(m-p))),p===d&&(p-=.5,d+=.5),h._sync("min",p),h._sync("max",d),h.autocolorscale&&(o=p*d<0?s.colorscale.diverging:p>=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}},67623:function(t,e,r){"use strict";var n=r(34809),i=r(65477).hasColorscale,a=r(65477).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s<t.length;s++){var l=t[s],c=l._module.colorbar;if(c)if(Array.isArray(c))for(var u=0;u<c.length;u++)o(l,c[u]);else o(l,c);i(l,"marker.line")&&o(l,{container:"marker.line",min:"cmin",max:"cmax"})}for(var h in e._colorAxes)o(e[h],{min:"cmin",max:"cmax"})}},39356:function(t,e,r){"use strict";var n=r(10721),i=r(34809),a=r(91362),o=r(42097),s=r(19017).isValid,l=r(33626).traceIs;function c(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,u,h,f){var p=f.prefix,d=f.cLetter,m="_module"in r,g=c(e,p),y=c(r,p),v=c(r._template||{},p)||{},x=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,u,h,f)};if(m){var _=u._colorAxes||{},b=h(p+"coloraxis");if(b){var w=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",T=_[b];return void(T?(T[2].push(x),T[0]!==w&&(T[0]=!1,i.warn(["Ignoring coloraxis:",b,"setting","as it is linked to incompatible colorscales."].join(" ")))):_[b]=[w,r,[x]])}}var k=g[d+"min"],A=g[d+"max"],M=n(k)&&n(A)&&k<A;h(p+d+"auto",!M)?h(p+d+"mid"):(h(p+d+"min"),h(p+d+"max"));var S,E,C=g.colorscale,L=v.colorscale;void 0!==C&&(S=!s(C)),void 0!==L&&(S=!s(L)),h(p+"autocolorscale",S),h(p+"colorscale"),h(p+"reversescale"),"marker.line."!==p&&(p&&m&&(E=a(g)),h(p+"showscale",E)&&(p&&v&&(y._template=v),o(g,y,u)))}},65477:function(t,e,r){"use strict";var n=r(45568),i=r(65657),a=r(10721),o=r(34809),s=r(78766),l=r(19017).isValid,c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function h(t){var e,r,n,i=t._colorAx,a=i||t,o={};for(r=0;r<c.length;r++)o[n=c[r]]=a[n];if(i)for(e="c",r=0;r<u.length;r++)o[n=u[r]]=a["c"+n];else{var s;for(r=0;r<u.length;r++)((s="c"+(n=u[r]))in a||(s="z"+n)in a)&&(o[n]=a[s]);e=s.charAt(0)}return o._sync=function(t,r){var n=-1!==u.indexOf(t)?e+t:t;a[n]=a["_"+n]=r},o}function f(t){for(var e=h(t),r=e.min,n=e.max,i=e.reversescale?p(e.colorscale):e.colorscale,a=i.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var c=i[l];o[l]=r+c[0]*(n-r),s[l]=c[1]}return{domain:o,range:s}}function p(t){for(var e=t.length,r=new Array(e),n=e-1,i=0;n>=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u<l;u++){var h=i(o[u]).toRgb();c[u]=[h.r,h.g,h.b,h.a]}var f,p=n.scale.linear().domain(r).range(c).clamp(!0),d=e.noNumericCheck,g=e.returnArray;return(f=d&&g?p:d?function(t){return m(p(t))}:g?function(t){return a(t)?p(t):i(t).isValid()?t:s.defaultLine}:function(t){return a(t)?m(p(t)):i(t).isValid()?t:s.defaultLine}).domain=p.domain,f.range=function(){return o},f}function m(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}t.exports={hasColorscale:function(t,e,r){var n=e?o.nestedProperty(t,e).get()||{}:t,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var s=!1;if(o.isArrayOrTypedArray(i))for(var c=0;c<i.length;c++)if(a(i[c])){s=!0;break}return o.isPlainObject(n)&&(s||!0===n.showscale||a(n.cmin)&&a(n.cmax)||l(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:h,extractScale:f,flipScale:p,makeColorScaleFunc:d,makeColorScaleFuncFromTrace:function(t,e){return d(f(t),e)}}},88856:function(t,e,r){"use strict";var n=r(19017),i=r(65477);t.exports={moduleType:"component",name:"colorscale",attributes:r(87163),layoutAttributes:r(56978),supplyLayoutDefaults:r(64613),handleDefaults:r(39356),crossTraceDefaults:r(67623),calc:r(28379),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},56978:function(t,e,r){"use strict";var n=r(93049).extendFlat,i=r(87163),a=r(19017).scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:a.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:a.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:a.RdBu,editType:"calc"}},coloraxis:n({_isSubplotObj:!0,editType:"calc"},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},64613:function(t,e,r){"use strict";var n=r(34809),i=r(78032),a=r(56978),o=r(39356);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=e._colorAxes;function u(t,e){return n.coerce(s,l,a.coloraxis,t,e)}for(var h in c){var f=c[h];if(f[0])s=t[h]||{},(l=i.newContainer(e,h,"coloraxis"))._name=h,o(s,l,e,u,{prefix:"",cLetter:"c"});else{for(var p=0;p<f[2].length;p++)f[2][p]();delete e._colorAxes[h]}}}},19017:function(t,e,r){"use strict";var n=r(65657),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},a=i.RdBu;function o(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}t.exports={scales:i,defaultScale:a,get:function(t,e){if(e||(e=a),!t)return e;function r(){try{t=i[t]||JSON.parse(t)}catch(r){t=e}}return"string"==typeof t&&(r(),"string"==typeof t&&r()),o(t)?t:e},isValid:function(t){return void 0!==i[t]||o(t)}}},53770:function(t){"use strict";t.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return"left"===i||"bottom"===i?a:"center"===i||"middle"===i?s:"right"===i||"top"===i?o:a<2/3-s?a:o>4/3-s?o:s}},4001:function(t,e,r){"use strict";var n=r(34809),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},70414:function(t,e){"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},14751:function(t,e,r){"use strict";var n=r(44039),i=r(39784),a=r(74043),o=r(34809).removeElement,s=r(54826),l=t.exports={};l.align=r(53770),l.getCursor=r(4001);var c=r(60148);function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function h(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,f,p,d,m,g=t.gd,y=1,v=g._context.doubleClickDelay,x=t.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=b,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=b,x.addEventListener("touchstart",b,{passive:!1})):x.ontouchstart=b;var _=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]};function b(a){g._dragged=!1,g._dragging=!0;var o=h(a);e=o[0],r=o[1],d=a.target,p=a,m=2===a.buttons||a.ctrlKey,void 0===a.clientX&&void 0===a.clientY&&(a.clientX=e,a.clientY=r),(n=(new Date).getTime())-g._mouseDownTime<v?y+=1:(y=1,g._mouseDownTime=n),t.prepFn&&t.prepFn(a,e,r),i&&!m?(f=u()).style.cursor=window.getComputedStyle(x).cursor:i||(f=document,c=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(x).cursor),document.addEventListener("mouseup",T),document.addEventListener("touchend",T),!1!==t.dragmode&&(a.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(n){n.preventDefault();var i=h(n),a=t.minDrag||s.MINDRAG,o=_(i[0]-e,i[1]-r,a),c=o[0],u=o[1];(c||u)&&(g._dragged=!0,l.unhover(g,n)),g._dragged&&t.moveFn&&!m&&(g._dragdata={element:x,dx:c,dy:u},t.moveFn(c,u))}function T(e){if(delete g._dragdata,!1!==t.dragmode&&(e.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T),i?o(f):c&&(f.documentElement.style.cursor=c,c=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>v&&(y=Math.max(y-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(y,p),!m){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},60148:function(t,e,r){"use strict";var n=r(68596),i=r(64025),a=r(95425).getGraphDiv,o=r(85988),s=t.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},94850:function(t,e){"use strict";e.T={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.k={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"}},62203:function(t,e,r){"use strict";var n=r(45568),i=r(34809),a=i.numberFormat,o=r(10721),s=r(65657),l=r(33626),c=r(78766),u=r(88856),h=i.strTranslate,f=r(30635),p=r(62972),d=r(4530).LINE_SPACING,m=r(20438).DESELECTDIM,g=r(64726),y=r(92527),v=r(36040).appendArrayPointValue,x=t.exports={};function _(t){return"none"===t?void 0:t}x.font=function(t,e){var r=e.variant,n=e.style,i=e.weight,a=e.color,o=e.size,s=e.family,l=e.shadow,u=e.lineposition,h=e.textcase;s&&t.style("font-family",s),o+1&&t.style("font-size",o+"px"),a&&t.call(c.fill,a),i&&t.style("font-weight",i),n&&t.style("font-style",n),r&&t.style("font-variant",r),h&&t.style("text-transform",_(function(t){return b[t]}(h))),l&&t.style("text-shadow","auto"===l?f.makeTextShadow(c.contrast(a)):_(l)),u&&t.style("text-decoration-line",_(function(t){return t.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(u)))};var b={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function w(t,e,r,n){var i=e.fillpattern,a=e.fillgradient,o=i&&x.getPatternAttr(i.shape,0,"");if(o){var s=x.getPatternAttr(i.bgcolor,0,null),l=x.getPatternAttr(i.fgcolor,0,null),u=i.fgopacity,h=x.getPatternAttr(i.size,0,8),f=x.getPatternAttr(i.solidity,0,.3),p=e.uid;x.pattern(t,"point",r,p,o,h,f,void 0,i.fillmode,s,l,u)}else if(a&&"none"!==a.type){var d,m,g=a.type,y="scatterfill-"+e.uid;n&&(y="legendfill-"+e.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===g&&(g+="reversed"),t.call(x.gradient,r,y,g,a.colorscale,"fill")):("horizontal"===g?(d={x:a.start,y:0},m={x:a.stop,y:0}):"vertical"===g&&(d={x:0,y:a.start},m={x:0,y:a.stop}),d.x=e._xA.c2p(void 0===d.x?e._extremes.x.min[0].val:d.x,!0),d.y=e._yA.c2p(void 0===d.y?e._extremes.y.min[0].val:d.y,!0),m.x=e._xA.c2p(void 0===m.x?e._extremes.x.max[0].val:m.x,!0),m.y=e._yA.c2p(void 0===m.y?e._extremes.y.max[0].val:m.y,!0),t.call(E,r,y,"linear",a.colorscale,"fill",d,m,!0,!1))}else e.fillcolor&&t.call(c.fill,e.fillcolor)}x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",h(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},x.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,c=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());w(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},x.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&w(i,t[0].trace,e,r)}))};var T=r(38882);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(T).forEach((function(t){var e=T[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,x.symbolBackOffs[r]=e.backoff||0,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(x.symbolNoFill[r]=!0)}));var k=x.symbolNames.length;function A(t,e,r,n){var i=t%100;return x.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=k||t>=400?0:Math.floor(Math.max(t,0))};var M=a("~f"),S={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 E(t,e,r,a,o,l,u,h,f,p){var d,m=o.length;"linear"===a?d={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:h.x,y2:h.y,gradientUnits:f?"userSpaceOnUse":"objectBoundingBox"},reversed:p}:"radial"===a&&(d={node:"radialGradient",reversed:p});for(var g=new Array(m),y=0;y<m;y++)d.reversed?g[m-1-y]=[M(100*(1-o[y][0])),o[y][1]]:g[y]=[M(100*o[y][0]),o[y][1]];var v=e._fullLayout,x="g"+v._uid+"-"+r,_=v._defs.select(".gradients").selectAll("#"+x).data([a+g.join(";")],i.identity);_.exit().remove(),_.enter().append(d.node).each((function(){var t=n.select(this);d.attrs&&t.attr(d.attrs),t.attr("id",x);var e=t.selectAll("stop").data(g);e.exit().remove(),e.enter().append("stop"),e.each((function(t){var e=s(t[1]);n.select(this).attr({offset:t[0]+"%","stop-color":c.tinyRGB(e),"stop-opacity":e.getAlpha()})}))})),t.style(l,q(x,e)).style(l+"-opacity",null),t.classed("gradient_filled",!0)}x.gradient=function(t,e,r,n,i,a){var o=S[n];return E(t,e,r,o.type,i,a,o.start,o.stop,!1,o.reversed)},x.pattern=function(t,e,r,a,o,l,u,h,f,p,d,m){var g="legend"===e;h&&("overlay"===f?(p=h,d=c.contrast(p)):(p=void 0,d=h));var y,v,x,_,b,w,T,k,A,M=r._fullLayout,S="p"+M._uid+"-"+a,E={},C=s(d),L=c.tinyRGB(C),I=m*C.getAlpha();switch(o){case"/":y=l*Math.sqrt(2),v=l*Math.sqrt(2),w="path",E={d:x="M-"+y/4+","+v/4+"l"+y/2+",-"+v/2+"M0,"+v+"L"+y+",0M"+y/4*3+","+v/4*5+"l"+y/2+",-"+v/2,opacity:I,stroke:L,"stroke-width":(_=u*l)+"px"};break;case"\\":y=l*Math.sqrt(2),v=l*Math.sqrt(2),w="path",E={d:x="M"+y/4*3+",-"+v/4+"l"+y/2+","+v/2+"M0,0L"+y+","+v+"M-"+y/4+","+v/4*3+"l"+y/2+","+v/2,opacity:I,stroke:L,"stroke-width":(_=u*l)+"px"};break;case"x":y=l*Math.sqrt(2),v=l*Math.sqrt(2),x="M-"+y/4+","+v/4+"l"+y/2+",-"+v/2+"M0,"+v+"L"+y+",0M"+y/4*3+","+v/4*5+"l"+y/2+",-"+v/2+"M"+y/4*3+",-"+v/4+"l"+y/2+","+v/2+"M0,0L"+y+","+v+"M-"+y/4+","+v/4*3+"l"+y/2+","+v/2,_=l-l*Math.sqrt(1-u),w="path",E={d:x,opacity:I,stroke:L,"stroke-width":_+"px"};break;case"|":w="path",w="path",E={d:x="M"+(y=l)/2+",0L"+y/2+","+(v=l),opacity:I,stroke:L,"stroke-width":(_=u*l)+"px"};break;case"-":w="path",w="path",E={d:x="M0,"+(v=l)/2+"L"+(y=l)+","+v/2,opacity:I,stroke:L,"stroke-width":(_=u*l)+"px"};break;case"+":w="path",x="M"+(y=l)/2+",0L"+y/2+","+(v=l)+"M0,"+v/2+"L"+y+","+v/2,_=l-l*Math.sqrt(1-u),w="path",E={d:x,opacity:I,stroke:L,"stroke-width":_+"px"};break;case".":y=l,v=l,u<Math.PI/4?b=Math.sqrt(u*l*l/Math.PI):(T=u,k=Math.PI/4,1,b=(A=l/2)+(l/Math.sqrt(2)-A)*(T-k)/(1-k)),w="circle",E={cx:y/2,cy:v/2,r:b,opacity:I,fill:L}}var P=[o||"noSh",p||"noBg",d||"noFg",l,u].join(";"),z=M._defs.select(".patterns").selectAll("#"+S).data([P],i.identity);z.exit().remove(),z.enter().append("pattern").each((function(){var t=n.select(this);if(t.attr({id:S,width:y+"px",height:v+"px",patternUnits:"userSpaceOnUse",patternTransform:g?"scale(0.8)":""}),p){var e=s(p),r=c.tinyRGB(e),i=e.getAlpha(),a=t.selectAll("rect").data([0]);a.exit().remove(),a.enter().append("rect").attr({width:y+"px",height:v+"px",fill:r,"fill-opacity":i})}var o=t.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(E)})),t.style("fill",q(S,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)},x.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),n.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)},x.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","patterns").selectAll("pattern").remove(),n.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)},x.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t},x.pointStyle=function(t,e,r,i){if(t.size()){var a=x.makePointStyleFns(e);t.each((function(t){x.singlePointStyle(t,n.select(this),e,a,r,i)}))}},x.singlePointStyle=function(t,e,r,n,a,o){var s=r.marker,l=s.line;if(o&&o.i>=0&&void 0===t.i&&(t.i=o.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var u;u="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=u,n.selectedSizeFn&&(u=t.mrc=n.selectedSizeFn(t));var h=x.symbolNumber(t.mx||s.symbol)||0;t.om=h%200>=100;var f=nt(t,r),p=Z(t,r);e.attr("d",A(h,u,f,p))}var d,m,g,y=!1;if(t.so)g=l.outlierwidth,m=l.outliercolor,d=s.outliercolor;else{var v=(l||{}).width;g=(t.mlw+1||v+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?c.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(d=c.defaultLine,y=!0),d="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:g)+"px");var _=s.gradient,b=t.mgt;b?y=!0:b=_&&_.type,i.isArrayOrTypedArray(b)&&(b=b[0],S[b]||(b=0));var w=s.pattern,T=w&&x.getPatternAttr(w.shape,t.i,"");if(b&&"none"!==b){var k=t.mgc;k?y=!0:k=_.color;var M=r.uid;y&&(M+="-"+t.i),x.gradient(e,a,M,b,[[0,k],[1,d]],"fill")}else if(T){var E=!1,C=w.fgcolor;!C&&o&&o.color&&(C=o.color,E=!0);var L=x.getPatternAttr(C,t.i,o&&o.color||null),I=x.getPatternAttr(w.bgcolor,t.i,null),P=w.fgopacity,z=x.getPatternAttr(w.size,t.i,8),O=x.getPatternAttr(w.solidity,t.i,.3);E=E||t.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var D=r.uid;E&&(D+="-"+t.i),x.pattern(e,"point",a,D,T,z,O,t.mcc,w.fillmode,I,L,P)}else i.isArrayOrTypedArray(d)?c.fill(e,d[t.i]):c.fill(e,d);g&&c.stroke(e,m)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,""),e.lineScale=x.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?y(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,h=s.opacity,f=void 0!==u,p=void 0!==h;(i.isArrayOrTypedArray(c)||f||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?f?u:e:p?h:m*e});var d=a.color,g=o.color,y=s.color;(g||y)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?g||e:y||e});var v=a.size,x=o.size,_=s.size,b=void 0!==x,w=void 0!==_;return l.traceIs(t,"symbols")&&(b||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||v/2;return t.selected?b?x/2:e:w?_/2:e}),e},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,m))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){c.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr("d",A(x.symbolNumber(a),o,nt(n,e),Z(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r<a.length;r++)a[r](e,t)}))}},x.tryColorscale=function(t,e){var r=e?i.nestedProperty(t,e).get():t;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&i.isArrayOrTypedArray(n))return u.makeColorScaleFuncFromTrace(r)}return i.identity};var C,L,I={start:1,end:-1,middle:0,bottom:1,top:-1};function P(t,e,r,i,a){var o=n.select(t.node().parentNode),s=-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle",l=-1!==e.indexOf("left")?"end":-1!==e.indexOf("right")?"start":"middle",c=i?i/.8+1:0,u=(f.lineCount(t)-1)*d+1,p=I[l]*c,m=.75*r+I[s]*c+(I[s]-1)*u*r/2;t.attr("text-anchor",l),a||o.attr("transform",h(p,m))}function z(t,e){var r=t.ts||e.textfont.size;return o(r)&&r>0?r:0}function O(t,e,r){return r&&(t=j(t)),e?R(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return C=e,e}function R(t){var e=n.round(t,2);return L=e,e}function F(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,h=(c*c*a-l*l*s)*n,f=3*c*(l+c),p=3*l*(l+c);return[[D(e[0]+(f&&u/f)),R(e[1]+(f&&h/f))],[D(e[0]-(p&&u/p)),R(e[1]-(p&&h/p))]]}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(c||0===c){if(s){var u=e._module.formatLabels,h=u?u(t,e,l):{},p={};v(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,h,l._d3locale,p,t,d)}var m=t.tp||e.textposition,g=z(t,e),y=a?a(t):t.tc||e.textfont.color;o.call(x.font,{family:t.tf||e.textfont.family,weight:t.tw||e.textfont.weight,style:t.ty||e.textfont.style,variant:t.tv||e.textfont.variant,textcase:t.tC||e.textfont.textcase,lineposition:t.tE||e.textfont.lineposition,shadow:t.tS||e.textfont.shadow,size:g,color:y}).text(c).call(f.convertToTspans,r).call(P,m,g,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=z(t,e);c.fill(i,a);var u=l.traceIs(e,"bar-like");P(i,o,s,t.mrc2||t.mrc,u)}))}},x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(F(t[r-1],t[r],t[r+1],e));for(n+="Q"+i[0][0]+" "+t[1],r=2;r<t.length-1;r++)n+="C"+i[r-2][1]+" "+i[r-1][0]+" "+t[r];return n+"Q"+i[t.length-3][1]+" "+t[t.length-1]},x.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r,n="M"+t[0],i=t.length-1,a=[F(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(F(t[r-1],t[r],t[r+1],e));for(a.push(F(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+="C"+a[r-1][1]+" "+a[r][0]+" "+t[r];return n+"C"+a[i][1]+" "+a[0][0]+" "+t[0]+"Z"};var B={hv:function(t,e,r){return"H"+D(e[0])+"V"+O(e,1,r)},vh:function(t,e,r){return"V"+R(e[1])+"H"+O(e,0,r)},hvh:function(t,e,r){return"H"+D((t[0]+e[0])/2)+"V"+R(e[1])+"H"+O(e,0,r)},vhv:function(t,e,r){return"V"+R((t[1]+e[1])/2)+"H"+D(e[0])+"V"+O(e,1,r)}},N=function(t,e,r){return"L"+O(e,0,r)+","+O(e,1,r)};function j(t,e){var r=t.backoff,n=t.trace,a=t.d,o=t.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&"spline"!==n.line.shape){var s=i.isArrayOrTypedArray(r),l=t,c=e?e[0]:C||0,u=e?e[1]:L||0,h=l[0],f=l[1],p=h-c,d=f-u,m=Math.atan2(d,p),g=s?r[o]:r;if("auto"===g){var y=l.i;"scatter"===n.type&&y--;var v=l.marker,_=v.symbol;i.isArrayOrTypedArray(_)&&(_=_[y]);var b=v.size;i.isArrayOrTypedArray(b)&&(b=b[y]),g=v?x.symbolBackOffs[x.symbolNumber(_)]*b:0,g+=x.getMarkerStandoff(a[y],n)||0}var w=h-g*Math.cos(m),T=f-g*Math.sin(m);(w<=h&&w>=c||w>=h&&w<=c)&&(T<=f&&T>=u||T>=f&&T<=u)&&(t=[w,T])}return t}x.steps=function(t){var e=B[t]||N;return function(t){for(var r="M"+D(t[0][0])+","+R(t[0][1]),n=t.length,i=1;i<n;i++)r+=e(t[i-1],t[i],i===n-1);return r}},x.applyBackoff=j,x.makeTester=function(){var t=i.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(t){t.attr(p.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),e=i.ensureSingle(t,"path","js-reference-point",(function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));x.tester=t,x.testref=e},x.savedBBoxes={};var U=0;function V(t){var e=t.getAttribute("data-unformatted");if(null!==e)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}function q(t,e){if(!t)return null;var r=e._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+t+"')":"url(#"+t+")"}x.bBox=function(t,e,r){var a,o,s;if(r||(r=V(t)),r){if(a=x.savedBBoxes[r])return i.extendFlat({},a)}else if(1===t.childNodes.length){var l=t.childNodes[0];if(r=V(l)){var c=+l.getAttribute("x")||0,u=+l.getAttribute("y")||0,h=l.getAttribute("transform");if(!h){var p=x.bBox(l,!1,r);return c&&(p.left+=c,p.right+=c),u&&(p.top+=u,p.bottom+=u),p}if(r+="~"+c+"~"+u+"~"+h,a=x.savedBBoxes[r])return i.extendFlat({},a)}}e?o=t:(s=x.tester.node(),o=t.cloneNode(!0),s.appendChild(o)),n.select(o).attr("transform",null).call(f.positionText,0,0);var d=o.getBoundingClientRect(),m=x.testref.node().getBoundingClientRect();e||s.removeChild(o);var g={height:d.height,width:d.width,left:d.left-m.left,top:d.top-m.top,right:d.right-m.left,bottom:d.bottom-m.top};return U>=1e4&&(x.savedBBoxes={},U=0),r&&(x.savedBBoxes[r]=g),U++,i.extendFlat({},g)},x.setClipUrl=function(t,e,r){t.attr("clip-path",q(e,r))},x.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=h(e,r)).trim(),t[i]("transform",a),a},x.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},x.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var H=/\s*sc.*/;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var G=/translate\([^)]*\)\s*$/;function Z(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}x.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(G);t=1===e&&1===r?[]:[h(o,s),"scale("+e+","+r+")",h(-o,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},x.getMarkerStandoff=Z;var W,Y,X,$,J,K,Q=Math.atan2,tt=Math.cos,et=Math.sin;function rt(t,e){var r=e[0],n=e[1];return[r*tt(t)-n*et(t),r*et(t)+n*tt(t)]}function nt(t,e){var r,n,a=t.ma;void 0===a&&((a=e.marker.angle)&&!i.isArrayOrTypedArray(a)||(a=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var c=e._xA,u=e._yA;if(!c||!u)return 90;r=c.c2p(t.x),n=u.c2p(t.y)}if(e._geo){var h,f=t.lonlat[0],p=t.lonlat[1],d=e._geo.project([f,p+1e-5]),m=e._geo.project([f+1e-5,p]),g=Q(m[1]-n,m[0]-r),y=Q(d[1]-n,d[0]-r);if("north"===s)h=a/180*Math.PI;else if("previous"===s){var v=f/180*Math.PI,x=p/180*Math.PI,_=W/180*Math.PI,b=Y/180*Math.PI,w=_-v,T=tt(b)*et(w),k=et(b)*tt(x)-tt(b)*et(x)*tt(w);h=-Q(T,k)-Math.PI,W=f,Y=p}var A=rt(g,[tt(h),0]),M=rt(y,[et(h),0]);a=Q(A[1]+M[1],A[0]+M[0])/Math.PI*180,"previous"!==s||K===e.uid&&t.i===J+1||(a=null)}if("previous"===s&&!e._geo)if(K===e.uid&&t.i===J+1&&o(r)&&o(n)){var S=r-X,E=n-$,C=e.line&&e.line.shape||"",L=C.slice(C.length-1);"h"===L&&(E=0),"v"===L&&(S=0),a+=Q(E,S)/Math.PI*180+90}else a=null}return X=r,$=n,J=t.i,K=e.uid,a}x.getMarkerAngle=nt},38882:function(t,e,r){"use strict";var n,i,a,o,s=r(26953),l=r(45568).round,c="M0,0Z",u=Math.sqrt(2),h=Math.sqrt(3),f=Math.PI,p=Math.cos,d=Math.sin;function m(t){return null===t}function g(t,e,r){if(!(t&&t%360!=0||e))return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=p(t),i=d(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var c=t/180*f,u=0,h=0,m=s(r),g="",y=0;y<m.length;y++){var v=m[y],x=v[0],_=u,b=h;if("M"===x||"L"===x)u=+v[1],h=+v[2];else if("m"===x||"l"===x)u+=+v[1],h+=+v[2];else if("H"===x)u=+v[1];else if("h"===x)u+=+v[1];else if("V"===x)h=+v[1];else if("v"===x)h+=+v[1];else if("A"===x){u=+v[1],h=+v[2];var w=l(c,[+v[6],+v[7]]);v[6]=w[0],v[7]=w[1],v[3]=+v[3]+t}"H"!==x&&"V"!==x||(x="L"),"h"!==x&&"v"!==x||(x="l"),"m"!==x&&"l"!==x||(u-=_,h-=b);var T=l(c,[u,h]);"H"!==x&&"V"!==x||(x="L"),"M"!==x&&"L"!==x&&"m"!==x&&"l"!==x||(v[1]=T[0],v[2]=T[1]),v[0]=x,g+=v[0]+v.slice(1).join(",")}return i=g,g}t.exports={circle:{n:0,f:function(t,e,r){if(m(e))return c;var n=l(t,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?g(e,r,i):i}},square:{n:1,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(t,e,r){if(m(e))return c;var n=l(1.3*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(t,e,r){if(m(e))return c;var n=l(.4*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(t,e,r){if(m(e))return c;var n=l(.8*t/u,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return g(e,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(t,e,r){if(m(e))return c;var n=l(2*t/h,2);return g(e,r,"M-"+n+","+l(t/2,2)+"H"+n+"L0,-"+l(t,2)+"Z")}},"triangle-down":{n:6,f:function(t,e,r){if(m(e))return c;var n=l(2*t/h,2);return g(e,r,"M-"+n+",-"+l(t/2,2)+"H"+n+"L0,"+l(t,2)+"Z")}},"triangle-left":{n:7,f:function(t,e,r){if(m(e))return c;var n=l(2*t/h,2);return g(e,r,"M"+l(t/2,2)+",-"+n+"V"+n+"L-"+l(t,2)+",0Z")}},"triangle-right":{n:8,f:function(t,e,r){if(m(e))return c;var n=l(2*t/h,2);return g(e,r,"M-"+l(t/2,2)+",-"+n+"V"+n+"L"+l(t,2)+",0Z")}},"triangle-ne":{n:9,f:function(t,e,r){if(m(e))return c;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(t,e,r){if(m(e))return c;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(t,e,r){if(m(e))return c;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(t,e,r){if(m(e))return c;var n=l(.6*t,2),i=l(1.2*t,2);return g(e,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(t,e,r){if(m(e))return c;var n=l(.951*t,2),i=l(.588*t,2),a=l(-t,2),o=l(-.309*t,2);return g(e,r,"M"+n+","+o+"L"+i+","+l(.809*t,2)+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(t,e,r){if(m(e))return c;var n=l(t,2),i=l(t/2,2),a=l(t*h/2,2);return g(e,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(t,e,r){if(m(e))return c;var n=l(t,2),i=l(t/2,2),a=l(t*h/2,2);return g(e,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(t,e,r){if(m(e))return c;var n=l(.924*t,2),i=l(.383*t,2);return g(e,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(t,e,r){if(m(e))return c;var n=1.4*t,i=l(.225*n,2),a=l(.951*n,2),o=l(.363*n,2),s=l(.588*n,2),u=l(-n,2),h=l(-.309*n,2),f=l(.118*n,2),p=l(.809*n,2);return g(e,r,"M"+i+","+h+"H"+a+"L"+o+","+f+"L"+s+","+p+"L0,"+l(.382*n,2)+"L-"+s+","+p+"L-"+o+","+f+"L-"+a+","+h+"H-"+i+"L0,"+u+"Z")}},hexagram:{n:18,f:function(t,e,r){if(m(e))return c;var n=l(.66*t,2),i=l(.38*t,2),a=l(.76*t,2);return g(e,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(t,e,r){if(m(e))return c;var n=l(t*h*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return g(e,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(t,e,r){if(m(e))return c;var n=l(t*h*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return g(e,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(t,e,r){if(m(e))return c;var n=l(1.1*t,2),i=l(2*t,2),a="A "+i+","+i+" 0 0 1 ";return g(e,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(t,e,r){if(m(e))return c;var n=l(1.4*t,2),i=l(1.9*t,2),a="A "+i+","+i+" 0 0 1 ";return g(e,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(t,e,r){if(m(e))return c;var n=l(.7*t,2),i=l(1.4*t,2);return g(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(t,e,r){if(m(e))return c;var n=l(1.4*t,2),i=l(.7*t,2);return g(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t,e,r){if(m(e))return c;var n=l(t,2),i=l(t/u,2);return g(e,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t,e,r){if(m(e))return c;var n=l(1.3*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t,e,r){if(m(e))return c;var n=l(1.3*t,2),i=l(.65*t,2);return g(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t,e,r){if(m(e))return c;var n=l(1.4*t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t,e,r){if(m(e))return c;var n=l(1.2*t,2),i=l(.85*t,2);return g(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t,e,r){if(m(e))return c;var n=l(t/2,2),i=l(t,2);return g(e,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t,e,r){if(m(e))return c;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t,e,r){if(m(e))return c;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t,e,r){if(m(e))return c;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t,e,r){if(m(e))return c;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return g(e,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t,e,r){if(m(e))return c;var n=l(1.4*t,2);return g(e,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t,e,r){if(m(e))return c;var n=l(1.4*t,2);return g(e,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(t,e,r){if(m(e))return c;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(t,e,r){if(m(e))return c;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(t,e,r){if(m(e))return c;var n=l(t,2);return g(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(t,e,r){if(m(e))return c;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(t,e,r){if(m(e))return c;var n=l(2*t,2),i=l(t,2);return g(e,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(t,e,r){if(m(e))return c;var n=f/2.5,i=2*t*p(n),a=2*t*d(n);return g(e,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(t,e,r){if(m(e))return c;var n=f/4,i=2*t*p(n),a=2*t*d(n);return g(e,r,"M0,0L"+-i+","+a+"A "+2*t+","+2*t+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}}},75568:function(t){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},352:function(t,e,r){"use strict";var n=r(10721),i=r(33626),a=r(29714),o=r(34809),s=r(25589);function l(t,e,r,i){var l=e["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),h=0;h<t.length;h++){var f=t[h],p=f.i;if(void 0===p)p=h;else if(null===p)continue;var d=f[i];if(n(r.c2l(d))){var m=u(d,p);if(n(m[0])&&n(m[1])){var g=f[i+"s"]=d-m[0],y=f[i+"h"]=d+m[1];c.push(g,y)}}}var v=r._id,x=e._extremes[v],_=a.findExtremes(r,c,o.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(_.min),x.max=x.max.concat(_.max)}}t.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&&i.traceIs(o,"errorBarsOK")){var s=a.getFromId(t,o.xaxis),c=a.getFromId(t,o.yaxis);l(n,o,s,"x"),l(n,o,c,"y")}}}},25589:function(t){"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},5543:function(t,e,r){"use strict";var n=r(10721),i=r(33626),a=r(34809),o=r(78032),s=r(75568);t.exports=function(t,e,r,l){var c="error_"+l.axis,u=o.newContainer(e,c),h=t[c]||{};function f(t,e){return a.coerce(h,u,s,t,e)}if(!1!==f("visible",void 0!==h.array||void 0!==h.value||"sqrt"===h.type)){var p=f("type","array"in h?"data":"percent"),d=!0;"sqrt"!==p&&(d=f("symmetric",!(("data"===p?"arrayminus":"valueminus")in h))),"data"===p?(f("array"),f("traceref"),d||(f("arrayminus"),f("tracerefminus"))):"percent"!==p&&"constant"!==p||(f("value"),d||f("valueminus"));var m="copy_"+l.inherit+"style";l.inherit&&(e["error_"+l.inherit]||{}).visible&&f(m,!(h.color||n(h.thickness)||n(h.width))),l.inherit&&u[m]||(f("color",r),f("thickness"),f("width",i.traceIs(e,"gl3d")?0:4))}}},77901:function(t,e,r){"use strict";var n=r(34809),i=r(13582).overrideAll,a=r(75568),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,"calc","nested"),scattergl:i(o,"calc","nested")}},supplyDefaults:r(5543),calc:r(352),makeComputeError:r(25589),plot:r(42130),style:r(22800),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},42130:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=r(62203),o=r(64726);t.exports=function(t,e,r,s){var l=r.xaxis,c=r.yaxis,u=s&&s.duration>0,h=t._context.staticPlot;e.each((function(e){var f,p=e[0].trace,d=p.error_x||{},m=p.error_y||{};p.ids&&(f=function(t){return t.id});var g=o.hasMarkers(p)&&p.marker.maxdisplayed>0;m.visible||d.visible||(e=[]);var y=n.select(this).selectAll("g.errorbar").data(e,f);if(y.exit().remove(),e.length){d.visible||y.selectAll("path.xerror").remove(),m.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var v=y.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(y,r.layerClipId,t),y.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,c);if(!g||t.vis){var a,o=e.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=m.width;a="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(a+="m-"+f+",0h"+2*f),o.size()?u&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var p=e.select("path.xerror");if(d.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var y=(d.copy_ystyle?m:d).width;a="M"+r.xh+","+(r.y-y)+"v"+2*y+"m0,-"+y+"H"+r.xs,r.noXS||(a+="m0,-"+y+"v"+2*y),p.size()?u&&(p=p.transition().duration(s.duration).ease(s.easing)):p=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),p.attr("d",a)}else p.remove()}}))}}))}},22800:function(t,e,r){"use strict";var n=r(45568),i=r(78766);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},70192:function(t,e,r){"use strict";var n=r(80337),i=r(6811).hoverlabel,a=r(93049).extendFlat;t.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},83552:function(t,e,r){"use strict";var n=r(34809),i=r(33626);function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s<e.length;s++){var l=e[s],c=l[0].trace;if(!i.traceIs(c,"pie-like")){var u=i.traceIs(c,"2dMap")?a:n.fillArray;u(c.hoverinfo,l,"hi",o(c)),c.hovertemplate&&u(c.hovertemplate,l,"ht"),c.hoverlabel&&(u(c.hoverlabel.bgcolor,l,"hbg"),u(c.hoverlabel.bordercolor,l,"hbc"),u(c.hoverlabel.font.size,l,"hts"),u(c.hoverlabel.font.color,l,"htc"),u(c.hoverlabel.font.family,l,"htf"),u(c.hoverlabel.font.weight,l,"htw"),u(c.hoverlabel.font.style,l,"hty"),u(c.hoverlabel.font.variant,l,"htv"),u(c.hoverlabel.namelength,l,"hnl"),u(c.hoverlabel.align,l,"hta"))}}}},94225:function(t,e,r){"use strict";var n=r(33626),i=r(38103).hover;t.exports=function(t,e,r){var a=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function o(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(a&&a.then?a.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},85988:function(t){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},3239:function(t,e,r){"use strict";var n=r(34809),i=r(70192),a=r(26430);t.exports=function(t,e,r,o){var s=n.extendFlat({},o.hoverlabel);e.hovertemplate&&(s.namelength=-1),a(t,e,(function(r,a){return n.coerce(t,e,i,r,a)}),s)}},36040:function(t,e,r){"use strict";var n=r(34809);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==r.indexOf(n[a]+i[o]))return!0;return!1}return-1!==r.indexOf(e.getSubplot(t))},e.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},e.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},e.getDistanceFunction=function(t,r,n,i){return"closest"===t?i||e.quadrature(r,n):"x"===t.charAt(0)?r:n},e.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},e.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},e.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},e.makeEventData=function(t,r,n){var i="index"in t?t.index:t.pointNumber,a={data:r._input,fullData:r,curveNumber:r.index,pointNumber:i};if(r._indexToPoints){var o=r._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return r._module.eventData?a=r._module.eventData(a,t,r,n,i):("xVal"in t?a.x=t.xVal:"x"in t&&(a.x=t.x),"yVal"in t?a.y=t.yVal:"y"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),e.appendArrayPointValue(a,r,i),a},e.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){var u=o(n.nestedProperty(e,l).get(),r);void 0!==u&&(t[c]=u)}}},e.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],c=a(l);if(void 0===t[c]){for(var u=n.nestedProperty(e,l).get(),h=new Array(r.length),f=0;f<r.length;f++)h[f]=o(u,r[f]);t[c]=h}}};var i={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var s={x:!0,y:!0},l={"x unified":!0,"y unified":!0};e.isUnifiedHover=function(t){return"string"==typeof t&&!!l[t]},e.isXYhover=function(t){return"string"==typeof t&&!!s[t]}},38103:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=r(65657),o=r(34809),s=o.pushUnique,l=o.strTranslate,c=o.strRotate,u=r(68596),h=r(30635),f=r(93134),p=r(62203),d=r(78766),m=r(14751),g=r(29714),y=r(54826).zindexSeparator,v=r(33626),x=r(36040),_=r(85988),b=r(73970),w=r(6134),T=_.YANGLE,k=Math.PI*T/180,A=1/Math.sin(k),M=Math.cos(k),S=Math.sin(k),E=_.HOVERARROWSIZE,C=_.HOVERTEXTPAD,L={box:!0,ohlc:!0,violin:!0,candlestick:!0},I={scatter:!0,scattergl:!0,splom:!0};function P(t,e){return t.distance-e.distance}function z(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,a){t=o.getGraphDiv(t);var l=e.target;o.throttle(t._fullLayout._uid+_.HOVERID,_.HOVERMINTIME,(function(){!function(t,e,r,a,l){r||(r="xy"),"string"==typeof r&&(r=r.split(y)[0]);var c,h,p,_=Array.isArray(r)?r:[r],b=t._fullLayout,w=b.hoversubplots,T=b._plots||[],k=T[r],M=b._has("cartesian"),S=e.hovermode||b.hovermode,C="x"===(S||"").charAt(0),O="y"===(S||"").charAt(0);if(M&&(C||O)&&"axis"===w)for(var R=_.length,V=0;V<R;V++)if(T[c=_[V]]){h=g.getFromId(t,c,"x"),p=g.getFromId(t,c,"y");var Z=(C?h:p)._subplotsWith;if(Z&&Z.length)for(var W=0;W<Z.length;W++)s(_,Z[W])}if(k&&"single"!==w){var Y=k.overlays.map((function(t){return t.id}));_=_.concat(Y)}for(var X=_.length,$=new Array(X),J=new Array(X),K=!1,Q=0;Q<X;Q++)if(T[c=_[Q]])K=!0,$[Q]=T[c].xaxis,J[Q]=T[c].yaxis;else{if(!b[c]||!b[c]._subplot)return void o.warn("Unrecognized subplot: "+c);var tt=b[c]._subplot;$[Q]=tt.xaxis,J[Q]=tt.yaxis}if(S&&!K&&(S="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(S)||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return m.unhoverRaw(t,e);var et=b.hoverdistance;-1===et&&(et=1/0);var rt=b.spikedistance;-1===rt&&(rt=1/0);var nt,it,at,ot,st,lt,ct,ut,ht,ft,pt,dt,mt,gt=[],yt=[],vt={hLinePoint:null,vLinePoint:null},xt=!1;if(Array.isArray(e))for(S="array",at=0;at<e.length;at++)(st=t.calcdata[e[at].curveNumber||0])&&(lt=st[0].trace,"skip"!==st[0].trace.hoverinfo&&(yt.push(st),"h"===lt.orientation&&(xt=!0)));else{var _t,bt,wt=t.calcdata.slice();for(wt.sort((function(t,e){return(t[0].trace.zorder||0)-(e[0].trace.zorder||0)})),ot=0;ot<wt.length;ot++)st=wt[ot],"skip"!==(lt=st[0].trace).hoverinfo&&x.isTraceInSubplots(lt,_)&&(yt.push(st),"h"===lt.orientation&&(xt=!0));if(l){if(!1===u.triggerHandler(t,"plotly_beforehover",e))return;var Tt=l.getBoundingClientRect();_t=e.clientX-Tt.left,bt=e.clientY-Tt.top,b._calcInverseTransform(t);var kt=o.apply3DTransform(b._invTransform)(_t,bt);if(_t=kt[0],bt=kt[1],_t<0||_t>$[0]._length||bt<0||bt>J[0]._length)return m.unhoverRaw(t,e)}else _t="xpx"in e?e.xpx:$[0]._length/2,bt="ypx"in e?e.ypx:J[0]._length/2;if(e.pointerX=_t+$[0]._offset,e.pointerY=bt+J[0]._offset,nt="xval"in e?x.flat(_,e.xval):x.p2c($,_t),it="yval"in e?x.flat(_,e.yval):x.p2c(J,bt),!i(nt[0])||!i(it[0]))return o.warn("Fx.hover failed",e,t),m.unhoverRaw(t,e)}var At=1/0;function Mt(r,n){for(ot=0;ot<yt.length;ot++)if((st=yt[ot])&&st[0]&&st[0].trace&&!0===(lt=st[0].trace).visible&&0!==lt._length&&-1===["carpet","contourcarpet"].indexOf(lt._module.name)){if(ht=S,x.isUnifiedHover(ht)&&(ht=ht.charAt(0)),"splom"===lt.type?ct=_[ut=0]:(ct=x.getSubplot(lt),ut=_.indexOf(ct)),dt={cd:st,trace:lt,xa:$[ut],ya:J[ut],maxHoverDistance:et,maxSpikeDistance:rt,index:!1,distance:Math.min(At,et),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:d.defaultLine,name:lt.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},b[ct]&&(dt.subplot=b[ct]._subplot),b._splomScenes&&b._splomScenes[lt.uid]&&(dt.scene=b._splomScenes[lt.uid]),"array"===ht){var a=e[ot];"pointNumber"in a?(dt.index=a.pointNumber,ht="closest"):(ht="","xval"in a&&(ft=a.xval,ht="x"),"yval"in a&&(pt=a.yval,ht=ht?"closest":"y"))}else void 0!==r&&void 0!==n?(ft=r,pt=n):(ft=nt[ut],pt=it[ut]);if(mt=gt.length,0!==et)if(lt._module&&lt._module.hoverPoints){var s=lt._module.hoverPoints(dt,ft,pt,ht,{finiteRange:!0,hoverLayer:b._hoverlayer,hoversubplots:w,gd:t});if(s)for(var l,c=0;c<s.length;c++)l=s[c],i(l.x0)&&i(l.y0)&&gt.push(N(l,S))}else o.log("Unrecognized trace type in hover:",lt);if("closest"===S&&gt.length>mt&&(gt.splice(0,mt),At=gt[0].distance),M&&0!==rt&&0===gt.length){dt.distance=rt,dt.index=!1;var u=lt._module.hoverPoints(dt,ft,pt,"closest",{hoverLayer:b._hoverlayer});if(u&&(u=u.filter((function(t){return t.spikeDistance<=rt}))),u&&u.length){var h,f=u.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(f.length){var p=f[0];i(p.x0)&&i(p.y0)&&(h=Et(p),(!vt.vLinePoint||vt.vLinePoint.spikeDistance>h.spikeDistance)&&(vt.vLinePoint=h))}var m=u.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(m.length){var g=m[0];i(g.x0)&&i(g.y0)&&(h=Et(g),(!vt.hLinePoint||vt.hLinePoint.spikeDistance>h.spikeDistance)&&(vt.hLinePoint=h))}}}}}function St(t,e,r){for(var n,i=null,a=1/0,o=0;o<t.length;o++)h&&h._id!==t[o].xa._id||p&&p._id!==t[o].ya._id||(n=t[o].spikeDistance,r&&0===o&&(n=-1/0),n<=a&&n<=e&&(i=t[o],a=n));return i}function Et(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}Mt();var Ct={fullLayout:b,container:b._hoverlayer,event:e},Lt=t._spikepoints,It={vLinePoint:vt.vLinePoint,hLinePoint:vt.hLinePoint};t._spikepoints=It;var Pt=function(){var t=gt.filter((function(t){return h&&h._id===t.xa._id&&p&&p._id===t.ya._id})),e=gt.filter((function(t){return!(h&&h._id===t.xa._id&&p&&p._id===t.ya._id)}));t.sort(P),e.sort(P),gt=function(t,e){for(var r=e.charAt(0),n=[],i=[],a=[],o=0;o<t.length;o++){var s=t[o];v.traceIs(s.trace,"bar-like")||v.traceIs(s.trace,"box-violin")?a.push(s):s.trace[r+"period"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}(gt=t.concat(e),S)};Pt();var zt=S.charAt(0),Ot=("x"===zt||"y"===zt)&&gt[0]&&I[gt[0].trace.type];if(M&&0!==rt&&0!==gt.length){var Dt=St(gt.filter((function(t){return t.ya.showspikes})),rt,Ot);vt.hLinePoint=Et(Dt);var Rt=St(gt.filter((function(t){return t.xa.showspikes})),rt,Ot);vt.vLinePoint=Et(Rt)}if(0===gt.length){var Ft=m.unhoverRaw(t,e);return!M||null===vt.hLinePoint&&null===vt.vLinePoint||U(Lt)&&j(t,vt,Ct),Ft}if(M&&U(Lt)&&j(t,vt,Ct),x.isXYhover(ht)&&0!==gt[0].length&&"splom"!==gt[0].trace.type){var Bt=gt[0],Nt=(gt=L[Bt.trace.type]?gt.filter((function(t){return t.trace.index===Bt.trace.index})):[Bt]).length;Mt(q("x",Bt,b),q("y",Bt,b));var jt,Ut=[],Vt={},qt=0,Ht=function(t){var e=L[t.trace.type]?z(t):t.trace.index;if(Vt[e]){var r=Vt[e]-1,n=Ut[r];r>0&&Math.abs(t.distance)<Math.abs(n.distance)&&(Ut[r]=t)}else qt++,Vt[e]=qt,Ut.push(t)};for(jt=0;jt<Nt;jt++)Ht(gt[jt]);for(jt=gt.length-1;jt>Nt-1;jt--)Ht(gt[jt]);gt=Ut,Pt()}var Gt=t._hoverdata,Zt=[],Wt=H(t),Yt=G(t);for(at=0;at<gt.length;at++){var Xt=gt[at],$t=x.makeEventData(Xt,Xt.trace,Xt.cd);if(!1!==Xt.hovertemplate){var Jt=!1;Xt.cd[Xt.index]&&Xt.cd[Xt.index].ht&&(Jt=Xt.cd[Xt.index].ht),Xt.hovertemplate=Jt||Xt.trace.hovertemplate||!1}if(Xt.xa&&Xt.ya){var Kt=Xt.x0+Xt.xa._offset,Qt=Xt.x1+Xt.xa._offset,te=Xt.y0+Xt.ya._offset,ee=Xt.y1+Xt.ya._offset,re=Math.min(Kt,Qt),ne=Math.max(Kt,Qt),ie=Math.min(te,ee),ae=Math.max(te,ee);$t.bbox={x0:re+Yt,x1:ne+Yt,y0:ie+Wt,y1:ae+Wt}}Xt.eventData=[$t],Zt.push($t)}t._hoverdata=Zt;var oe="y"===S&&(yt.length>1||gt.length>1)||"closest"===S&&xt&&gt.length>1,se=d.combine(b.plot_bgcolor||d.background,b.paper_bgcolor),le=D(gt,{gd:t,hovermode:S,rotateLabels:oe,bgColor:se,container:b._hoverlayer,outerContainer:b._paper.node(),commonLabelOpts:b.hoverlabel,hoverdistance:b.hoverdistance}),ce=le.hoverLabels;if(x.isUnifiedHover(S)||(function(t,e,r,n){var i,a,o,s,l,c,u,h=e?"xa":"ya",f=e?"ya":"xa",p=0,d=1,m=t.size(),g=new Array(m),y=0,v=n.minX,x=n.maxX,_=n.minY,b=n.maxY,w=function(t){return t*r._invScaleX},T=function(t){return t*r._invScaleY};function k(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;i=!1}if(i){var n=0;for(s=0;s<t.length;s++)(c=t[s]).pos+c.dp+c.size>e.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos>e.pmax-1&&(c.del=!0,n--);for(s=0;s<t.length&&!(n<=0);s++)if((c=t[s]).pos<e.pmin+1)for(c.del=!0,n--,o=2*c.size,l=t.length-1;l>=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(c=t[s]).pos+c.dp+c.size>e.pmax&&(c.del=!0,n--)}}}for(t.each((function(t){var n=t[h],i=t[f],a="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==a&&(d=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,p=F(t,e),m=t.anchor,k="end"===m?-1:1;if("middle"===m)u=(c=t.crossPos+(a?T(p.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(a?T(t.by):w(t.bx));else if(a)u=(c=t.crossPos+T(E+p.y)-T(t.by/2-E))+T(t.by);else{var M=w(k*E+p.x),S=M+w(k*t.bx);c=t.crossPos+Math.min(M,S),u=t.crossPos+Math.max(M,S)}a?void 0!==_&&void 0!==b&&Math.min(u,b)-Math.max(c,_)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==v&&void 0!==x&&Math.min(u,x)-Math.max(c,v)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[y++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?A:1)/2,pmin:s,pmax:l}]})),g.sort((function(t,e){return t[0].posref-e[0].posref||d*(e[0].traceIndex-t[0].traceIndex)}));!i&&p<=m;){for(p++,i=!0,s=0;s<g.length-1;){var M=g[s],S=g[s+1],C=M[M.length-1],L=S[0];if((a=C.pos+C.dp+C.size-L.pos-L.dp+L.size)>.01){for(l=S.length-1;l>=0;l--)S[l].dp+=a;for(M.push.apply(M,S),g.splice(s+1,1),u=0,l=M.length-1;l>=0;l--)u+=M[l].dp;for(o=u/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}g.forEach(k)}for(s=g.length-1;s>=0;s--){var I=g[s];for(l=I.length-1;l>=0;l--){var P=I[l],z=P.datum;z.offset=P.dp,z.del=P.del}}}(ce,oe,b,le.commonLabelBoundingBox),B(ce,oe,b._invScaleX,b._invScaleY)),l&&l.tagName){var ue=v.getComponentMethod("annotations","hasClickToShow")(t,Zt);f(n.select(l),ue?"pointer":"")}l&&!a&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Gt)&&(Gt&&t.emit("plotly_unhover",{event:e,points:Gt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:$,yaxes:J,xvals:nt,yvals:it}))}(t,e,r,a,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=H(i),o=G(i),s=D(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),h=Math.max(r,n),f=Math.min(s,l),p=Math.max(s,l),m=t.trace;if(v.traceIs(m,"gl3d")){var g=i._fullLayout[m.scene]._scene.container,y=g.offsetLeft,x=g.offsetTop;u+=y,h+=y,f+=x,p+=x}c.bbox={x0:u+o,x1:h+o,y0:f+a,y1:p+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||d.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontVariant:t.fontVariant,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||d.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5<l?l-n+5:0,l=n+t.by+t.offset,r===e.anchorIndex&&(c=t.offset)})).each((function(t){t.offset-=c})),B(s,!1,i._fullLayout._invScaleX,i._fullLayout._invScaleY),r?s:s.node()};var O=/<extra>([\s\S]*)<\/extra>/;function D(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,u=e.bgColor,f=e.container,m=e.outerContainer,g=e.commonLabelOpts||{};if(0===t.length)return[[]];var y=e.fontFamily||_.HOVERFONT,k=e.fontSize||_.HOVERFONTSIZE,A=e.fontWeight||i.font.weight,M=e.fontStyle||i.font.style,S=e.fontVariant||i.font.variant,L=e.fontTextcase||i.font.textcase,I=e.fontLineposition||i.font.lineposition,P=e.fontShadow||i.font.shadow,O=t[0],D=O.xa,F=O.ya,B=a.charAt(0),N=B+"Label",j=O[N];if(void 0===j&&"multicategory"===D.type)for(var U=0;U<t.length&&void 0===(j=t[U][N]);U++);var V=Z(r,m),q=V.top,H=V.width,G=V.height,W=void 0!==j&&O.distance<=e.hoverdistance&&("x"===a||"y"===a);if(W){var Y,X,$=!0;for(Y=0;Y<t.length;Y++)if($&&void 0===t[Y].zLabel&&($=!1),X=t[Y].hoverinfo||t[Y].trace.hoverinfo){var J=Array.isArray(X)?X:X.split("+");if(-1===J.indexOf("all")&&-1===J.indexOf(a)){W=!1;break}}$&&(W=!1)}var K=f.selectAll("g.axistext").data(W?[0]:[]);K.enter().append("g").classed("axistext",!0),K.exit().remove();var Q={minX:0,maxX:0,minY:0,maxY:0};if(K.each((function(){var t=n.select(this),e=o.ensureSingle(t,"path","",(function(t){t.style({"stroke-width":"1px"})})),s=o.ensureSingle(t,"text","",(function(t){t.attr("data-notex",1)})),c=g.bgcolor||d.defaultLine,u=g.bordercolor||d.contrast(c),f=d.contrast(c),m=g.font,v={weight:m.weight||A,style:m.style||M,variant:m.variant||S,textcase:m.textcase||L,lineposition:m.lineposition||I,shadow:m.shadow||P,family:m.family||y,size:m.size||k,color:m.color||f};e.style({fill:c,stroke:u}),s.text(j).call(p.font,v).call(h.positionText,0,0).call(h.convertToTspans,r),t.attr("transform","");var x,_,b=Z(r,s.node());if("x"===a){var w="top"===D.side?"-":"";s.attr("text-anchor","middle").call(h.positionText,0,"top"===D.side?q-b.bottom-E-C:q-b.top+E+C),x=D._offset+(O.x0+O.x1)/2,_=F._offset+("top"===D.side?0:F._length);var T=b.width/2+C,z=x;x<T?z=T:x>i.width-T&&(z=i.width-T),e.attr("d","M"+(x-z)+",0L"+(x-z+E)+","+w+E+"H"+T+"v"+w+(2*C+b.height)+"H"+-T+"V"+w+E+"H"+(x-z-E)+"Z"),x=z,Q.minX=x-T,Q.maxX=x+T,"top"===D.side?(Q.minY=_-(2*C+b.height),Q.maxY=_-C):(Q.minY=_+C,Q.maxY=_+(2*C+b.height))}else{var R,B,N;"right"===F.side?(R="start",B=1,N="",x=D._offset+D._length):(R="end",B=-1,N="-",x=D._offset),_=F._offset+(O.y0+O.y1)/2,s.attr("text-anchor",R),e.attr("d","M0,0L"+N+E+","+E+"V"+(C+b.height/2)+"h"+N+(2*C+b.width)+"V-"+(C+b.height/2)+"H"+N+E+"V-"+E+"Z"),Q.minY=_-(C+b.height/2),Q.maxY=_+(C+b.height/2),"right"===F.side?(Q.minX=x+E,Q.maxX=x+E+(2*C+b.width)):(Q.minX=x-E-(2*C+b.width),Q.maxX=x-E);var U,V=b.height/2,H=q-b.top-V,G="clip"+i._uid+"commonlabel"+F._id;if(x<b.width+2*C+E){U="M-"+(E+C)+"-"+V+"h-"+(b.width-C)+"V"+V+"h"+(b.width-C)+"Z";var W=b.width-x+C;h.positionText(s,W,H),"end"===R&&s.selectAll("tspan").each((function(){var t=n.select(this),e=p.tester.append("text").text(t.text()).call(p.font,v),i=Z(r,e.node());Math.round(i.width)<Math.round(b.width)&&t.attr("x",W-i.width),e.remove()}))}else h.positionText(s,B*(C+E),H),U=null;var Y=i._topclips.selectAll("#"+G).data(U?[0]:[]);Y.enter().append("clipPath").attr("id",G).append("path"),Y.exit().remove(),Y.select("path").attr("d",U),p.setClipUrl(s,U?G:null,r)}t.attr("transform",l(x,_))})),x.isUnifiedHover(a)){f.selectAll("g.hovertext").remove();var tt=t.filter((function(t){return"none"!==t.hoverinfo}));if(0===tt.length)return[];var et=i.hoverlabel,rt=et.font,nt={showlegend:!0,legend:{title:{text:j,font:rt},font:rt,bgcolor:et.bgcolor,bordercolor:et.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},it={font:rt};b(nt,it,r._fullData);var at=it.legend;at.entries=[];for(var ot=0;ot<tt.length;ot++){var st=tt[ot];if("none"!==st.hoverinfo){var lt=R(st,!0,a,i,j),ct=lt[0],ut=lt[1];st.name=ut,st.text=""!==ut?ut+" : "+ct:ct;var ht=st.cd[st.index];ht&&(ht.mc&&(st.mc=ht.mc),ht.mcc&&(st.mc=ht.mcc),ht.mlc&&(st.mlc=ht.mlc),ht.mlcc&&(st.mlc=ht.mlcc),ht.mlw&&(st.mlw=ht.mlw),ht.mrc&&(st.mrc=ht.mrc),ht.dir&&(st.dir=ht.dir)),st._distinct=!0,at.entries.push([st])}}at.entries.sort((function(t,e){return t[0].trace.index-e[0].trace.index})),at.layer=f,at._inHover=!0,at._groupTitleFont=et.grouptitlefont,w(r,at);var ft,pt,dt,mt,gt=f.select("g.legend"),yt=Z(r,gt.node()),vt=yt.width+2*C,xt=yt.height+2*C,_t=tt[0],bt=(_t.x0+_t.x1)/2,wt=(_t.y0+_t.y1)/2,Tt=!(v.traceIs(_t.trace,"bar-like")||v.traceIs(_t.trace,"box-violin"));"y"===B?Tt?(pt=wt-C,ft=wt+C):(pt=Math.min.apply(null,tt.map((function(t){return Math.min(t.y0,t.y1)}))),ft=Math.max.apply(null,tt.map((function(t){return Math.max(t.y0,t.y1)})))):pt=ft=o.mean(tt.map((function(t){return(t.y0+t.y1)/2})))-xt/2,"x"===B?Tt?(dt=bt+C,mt=bt-C):(dt=Math.max.apply(null,tt.map((function(t){return Math.max(t.x0,t.x1)}))),mt=Math.min.apply(null,tt.map((function(t){return Math.min(t.x0,t.x1)})))):dt=mt=o.mean(tt.map((function(t){return(t.x0+t.x1)/2})))-vt/2;var kt,At,Mt=D._offset,St=F._offset;return mt+=Mt-vt,pt+=St-xt,kt=(dt+=Mt)+vt<H&&dt>=0?dt:mt+vt<H&&mt>=0?mt:Mt+vt<H?Mt:dt-bt<bt-mt+vt?H-vt:0,kt+=C,At=(ft+=St)+xt<G&&ft>=0?ft:pt+xt<G&&pt>=0?pt:St+xt<G?St:ft-wt<wt-pt+xt?G-xt:0,At+=C,gt.attr("transform",l(kt-1,At-1)),gt}var Et=f.selectAll("g.hovertext").data(t,(function(t){return z(t)}));return Et.enter().append("g").classed("hovertext",!0).each((function(){var t=n.select(this);t.append("rect").call(d.fill,d.addOpacity(u,.8)),t.append("text").classed("name",!0),t.append("path").style("stroke-width","1px"),t.append("text").classed("nums",!0).call(p.font,{weight:A,style:M,variant:S,textcase:L,lineposition:I,shadow:P,family:y,size:k})})),Et.exit().remove(),Et.each((function(t){var e=n.select(this).attr("transform",""),o=t.color;Array.isArray(o)&&(o=o[t.eventData[0].pointNumber]);var f=t.bgcolor||o,m=d.combine(d.opacity(f)?f:d.defaultLine,u),g=d.combine(d.opacity(o)?o:d.defaultLine,u),v=t.borderColor||d.contrast(m),x=R(t,W,a,i,j,e),_=x[0],b=x[1],w=e.select("text.nums").call(p.font,{family:t.fontFamily||y,size:t.fontSize||k,color:t.fontColor||v,weight:t.fontWeight||A,style:t.fontStyle||M,variant:t.fontVariant||S,textcase:t.fontTextcase||L,lineposition:t.fontLineposition||I,shadow:t.fontShadow||P}).text(_).attr("data-notex",1).call(h.positionText,0,0).call(h.convertToTspans,r),z=e.select("text.name"),O=0,D=0;if(b&&b!==_){z.call(p.font,{family:t.fontFamily||y,size:t.fontSize||k,color:g,weight:t.fontWeight||A,style:t.fontStyle||M,variant:t.fontVariant||S,textcase:t.fontTextcase||L,lineposition:t.fontLineposition||I,shadow:t.fontShadow||P}).text(b).attr("data-notex",1).call(h.positionText,0,0).call(h.convertToTspans,r);var F=Z(r,z.node());O=F.width+2*C,D=F.height+2*C}else z.remove(),e.select("rect").remove();e.select("path").style({fill:m,stroke:v});var B=t.xa._offset+(t.x0+t.x1)/2,N=t.ya._offset+(t.y0+t.y1)/2,U=Math.abs(t.x1-t.x0),V=Math.abs(t.y1-t.y0),Y=Z(r,w.node()),X=Y.width/i._invScaleX,$=Y.height/i._invScaleY;t.ty0=(q-Y.top)/i._invScaleY,t.bx=X+2*C,t.by=Math.max($+2*C,D),t.anchor="start",t.txwidth=X,t.tx2width=O,t.offset=0;var J,K,Q=(X+E+C+O)*i._invScaleX;if(s)t.pos=B,J=N+V/2+Q<=G,K=N-V/2-Q>=0,"top"!==t.idealAlign&&J||!K?J?(N+=V/2,t.anchor="start"):t.anchor="middle":(N-=V/2,t.anchor="end"),t.crossPos=N;else{if(t.pos=N,J=B+U/2+Q<=H,K=B-U/2-Q>=0,"left"!==t.idealAlign&&J||!K)if(J)B+=U/2,t.anchor="start";else{t.anchor="middle";var tt=Q/2,et=B+tt-H,rt=B-tt;et>0&&(B-=et),rt<0&&(B+=-rt)}else B-=U/2,t.anchor="end";t.crossPos=B}w.attr("text-anchor",t.anchor),O&&z.attr("text-anchor",t.anchor),e.attr("transform",l(B,N)+(s?c(T):""))})),{hoverLabels:Et,commonLabelBoundingBox:Q}}function R(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=V(t.name,t.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"<br>"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"<br>"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&"choroplethmap"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[c+"Label"]===i?l=t[u+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"<br>":"")+t.text),void 0!==t.extraText&&(l+=(l?"<br>":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var h=t.hovertemplate||!1;if(h){var f=t.hovertemplateLabels||t;t[c+"Label"]!==i&&(f[c+"other"]=f[c+"Val"],f[c+"otherLabel"]=f[c+"Label"]),l=(l=o.hovertemplateString(h,f,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(O,(function(e,r){return s=V(r,t.nameLength),""}))}return[l,s]}function F(t,e){var r=0,n=t.offset;return e&&(n*=-S,r=t.offset*M),{x:r,y:n}}function B(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,c,u=r.select("text.nums"),f=t.anchor,d="end"===f?-1:1,m=(c=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(E+C))+s*(i.txwidth+C),"middle"===i.anchor&&(l-=i.tx2width/2,c+=i.txwidth/2+C),{alignShift:s,textShiftX:l,text2ShiftX:c}),g=F(t,e),y=g.x,v=g.y,x="middle"===f;r.select("path").attr("d",x?"M-"+a(t.bx/2+t.tx2width/2)+","+o(v-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(d*E+y)+","+o(E+v)+"v"+o(t.by/2-E)+"h"+a(d*t.bx)+"v-"+o(t.by)+"H"+a(d*E+y)+"V"+o(v-E)+"Z");var _=y+m.textShiftX,b=v+t.ty0-t.by/2+C,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==f?(u.attr("text-anchor","start"),_=x?-t.bx/2-t.tx2width/2+C:-t.bx-C):"right"===w&&"end"!==f&&(u.attr("text-anchor","end"),_=x?t.bx/2-t.tx2width/2-C:t.bx+C)),u.call(h.positionText,a(_),o(b)),t.tx2width&&(r.select("text.name").call(h.positionText,a(m.text2ShiftX+m.alignShift*C+y),o(v+t.ty0-t.by/2+C)),r.select("rect").call(p.setRect,a(m.text2ShiftX+(m.alignShift-1)*t.tx2width/2+y),o(v-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function N(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}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"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var f=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+f+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+f,"y"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===p.indexOf("y")&&(t.yLabel=void 0),-1===p.indexOf("z")&&(t.zLabel=void 0),-1===p.indexOf("text")&&(t.text=void 0),-1===p.indexOf("name")&&(t.name=void 0)),t}function j(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,h=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),h||u){var f=d.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,y,v=e.hLinePoint;n=v&&v.xa,"cursor"===(i=v&&v.ya).spikesnap?(m=c.pointerX,y=c.pointerY):(m=n._offset+v.x,y=i._offset+v.y);var x,_,b=a.readability(v.color,f)<1.5?d.contrast(f):v.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||b,A=g.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,_=m),-1!==w.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,_=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:_,y1:y,y2:y,"stroke-width":T,stroke:k,"stroke-dasharray":p.dashStyle(i.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:_,y1:y,y2:y,"stroke-width":T+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==i.side?T:-T),cy:y,r:T,fill:k}).classed("spikeline",!0)}if(h){var E,C,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(E=c.pointerX,C=c.pointerY):(E=n._offset+L.x,C=i._offset+L.y);var I,P,z=a.readability(L.color,f)<1.5?d.contrast(f):L.color,O=n.spikemode,D=n.spikethickness,R=n.spikecolor||z,F=g.getPxPosition(t,n);if(-1!==O.indexOf("toaxis")||-1!==O.indexOf("across")){if(-1!==O.indexOf("toaxis")&&(I=F,P=C),-1!==O.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),I=l.t+(1-N)*l.h,P=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:I,y2:P,"stroke-width":D,stroke:R,"stroke-dasharray":p.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:I,y2:P,"stroke-width":D+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}-1!==O.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?D:-D),r:D,fill:R}).classed("spikeline",!0)}}}function U(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function V(t,e){return h.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function q(t,e,r){var n=e[t+"a"],i=e[t+"Val"],a=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=e.trace[t+"periodalignment"];if(o){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var c=s[t+"End"];void 0===c&&(c=s[t]);var u=c-l;"end"===o?i+=u:"middle"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function H(t){return t.offsetTop+t.clientTop}function G(t){return t.offsetLeft+t.clientLeft}function Z(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.left,a=n.top,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),h=c[0],f=c[1],p=u[0],d=u[1];return{x:h,y:f,width:p-h,height:d-f,top:Math.min(f,d),left:Math.min(h,p),right:Math.max(h,p),bottom:Math.max(f,d)}}},26430:function(t,e,r){"use strict";var n=r(34809),i=r(78766),a=r(36040).isUnifiedHover;t.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.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)}},45265:function(t,e,r){"use strict";var n=r(34809),i=r(6811);t.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},32141:function(t,e,r){"use strict";var n=r(45568),i=r(34809),a=r(14751),o=r(36040),s=r(6811),l=r(38103);t.exports={moduleType:"component",name:"fx",constants:r(85988),schema:{layout:s},attributes:r(70192),layoutAttributes:s,supplyLayoutGlobalDefaults:r(5358),supplyDefaults:r(3239),supplyLayoutDefaults:r(8412),calc:r(83552),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(94225)}},6811:function(t,e,r){"use strict";var n=r(85988),i=r(80337),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.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:a,grouptitlefont:i({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"}}},8412:function(t,e,r){"use strict";var n=r(34809),i=r(6811),a=r(45265),o=r(26430);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("map"),c=e._has("geo"),u=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l||c)&&1===u||(s||l)&&c&&2===u)&&(e.dragmode="pan"),o(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},5358:function(t,e,r){"use strict";var n=r(34809),i=r(26430),a=r(6811);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},83595:function(t,e,r){"use strict";var n=r(34809),i=r(90694).counter,a=r(13792).u,o=r(54826).idRegex,s=r(78032),l={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:[i("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:a({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(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,a){var o=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-o),h=u*(1-o),f=0;f<i;f++){var p=c+u*f;l[a?i-1-f:f]=[p,p+h]}return l}function h(t,e,r,n,i){var a,o=new Array(r);function s(t,r){-1!==e.indexOf(r)&&void 0===n[r]?(o[t]=r,n[r]=t):o[t]=""}if(Array.isArray(t))for(a=0;a<r;a++)s(a,t[a]);else for(s(0,i),a=1;a<r;a++)s(a,i+(a+1));return o}t.exports={moduleType:"component",name:"grid",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(t,e){var r=t.grid||{},i=c(e,r,"x"),a=c(e,r,"y");if(t.grid||i||a){var o,h,f=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),p=Array.isArray(i),d=Array.isArray(a),m=p&&i!==r.xaxes&&d&&a!==r.yaxes;f?(o=r.subplots.length,h=r.subplots[0].length):(d&&(o=a.length),p&&(h=i.length));var g=s.newContainer(e,"grid"),y=k("rows",o),v=k("columns",h);if(y*v>1){f||p||d||"independent"===k("pattern")&&(f=!0),g._hasSubplotGrid=f;var x,_,b="top to bottom"===k("roworder"),w=f?.2:.1,T=f?.3:.1;m&&e._splomGridDflt&&(x=e._splomGridDflt.xside,_=e._splomGridDflt.yside),g._domains={x:u("x",k,w,x,v),y:u("y",k,T,_,y,b)}}else delete e.grid}function k(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,f=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(d){var x=f.subplots||[];l=r.subplots=new Array(m);var _=1;for(n=0;n<m;n++){var b=l[n]=new Array(g),w=x[n]||[];for(i=0;i<g;i++)if(y?(s=1===_?"xy":"x"+_+"y"+_,_++):s=w[i],b[i]="",-1!==p.cartesian.indexOf(s)){if(u=s.indexOf("y"),a=s.slice(0,u),o=s.slice(u),void 0!==v[a]&&v[a]!==i||void 0!==v[o]&&v[o]!==n)continue;b[i]=s,v[a]=i,v[o]=n}}}else{var T=c(e,f,"x"),k=c(e,f,"y");r.xaxes=h(T,p.xaxis,g,v,"x"),r.yaxes=h(k,p.yaxis,m,v,"y")}var A=r._anchors={},M="top to bottom"===r.roworder;for(var S in v){var E,C,L,I=S.charAt(0),P=r[I+"side"];if(P.length<8)A[S]="free";else if("x"===I){if("t"===P.charAt(0)===M?(E=0,C=1,L=m):(E=m-1,C=-1,L=-1),d){var z=v[S];for(n=E;n!==L;n+=C)if((s=l[n][z])&&(u=s.indexOf("y"),s.slice(0,u)===S)){A[S]=s.slice(u);break}}else for(n=E;n!==L;n+=C)if(o=r.yaxes[n],-1!==p.cartesian.indexOf(S+o)){A[S]=o;break}}else if("l"===P.charAt(0)?(E=0,C=1,L=g):(E=g-1,C=-1,L=-1),d){var O=v[S];for(n=E;n!==L;n+=C)if((s=l[O][n])&&(u=s.indexOf("y"),s.slice(u)===S)){A[S]=s.slice(0,u);break}}else for(n=E;n!==L;n+=C)if(a=r.xaxes[n],-1!==p.cartesian.indexOf(a+S)){A[S]=a;break}}}}}},37260:function(t,e,r){"use strict";var n=r(54826),i=r(78032).templatedArray;r(35081),t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},89443:function(t,e,r){"use strict";var n=r(10721),i=r(8083);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,c,u=t._fullLayout.images,h=e._id.charAt(0),f=0;f<u.length;f++)if(c="images["+f+"].",(l=u[f])[h+"ref"]===e._id){var p=l[h],d=l["size"+h],m=null,g=null;if(o){m=i(p,e.range);var y=d/Math.pow(10,m)/2;g=2*Math.log(y+Math.sqrt(1+y*y))/Math.LN10}else g=(m=Math.pow(10,p))*(Math.pow(10,d/2)-Math.pow(10,-d/2));n(m)?n(g)||(g=null):(m=null,g=null),a(c+h,m),a(c+"size"+h,g)}}},507:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(59008),o=r(37260);function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a("source");if(!a("visible",!!s))return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var h=c[u],f=i.coerceRef(t,e,l,h,"paper",void 0);"paper"!==f&&i.getFromId(l,f)._imgIndices.push(e._index),i.coercePosition(e,l,a,f,h,0)}return e}t.exports=function(t,e){a(t,e,{name:"images",handleItemDefaults:s})}},32211:function(t,e,r){"use strict";var n=r(45568),i=r(62203),a=r(29714),o=r(5975),s=r(62972);t.exports=function(t){var e,r,l=t._fullLayout,c=[],u={},h=[];for(r=0;r<l.images.length;r++){var f=l.images[r];if(f.visible)if("below"===f.layer&&"paper"!==f.xref&&"paper"!==f.yref){e=o.ref2id(f.xref)+o.ref2id(f.yref);var p=l._plots[e];if(!p){h.push(f);continue}p.mainplot&&(e=p.mainplot.id),u[e]||(u[e]=[]),u[e].push(f)}else"above"===f.layer?c.push(f):h.push(f)}var d={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},m={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function g(e){var r=n.select(this);if(this._imgSrc!==e.source)if(r.attr("xmlns",s.svg),e.source&&"data:"===e.source.slice(0,5))r.attr("xlink:href",e.source),this._imgSrc=e.source;else{var i=new Promise(function(t){var n=new Image;function i(){r.remove(),t()}this.img=n,n.setAttribute("crossOrigin","anonymous"),n.onerror=i,n.onload=function(){var e=document.createElement("canvas");e.width=this.width,e.height=this.height,e.getContext("2d",{willReadFrequently:!0}).drawImage(this,0,0);var n=e.toDataURL("image/png");r.attr("xlink:href",n),t()},r.on("error",i),n.src=e.source,this._imgSrc=e.source}.bind(this));t._promises.push(i)}}function y(e){var r,o,s=n.select(this),c=a.getFromId(t,e.xref),u=a.getFromId(t,e.yref),h="domain"===a.getRefType(e.xref),f="domain"===a.getRefType(e.yref),p=l._size;r=void 0!==c?"string"==typeof e.xref&&h?c._length*e.sizex:Math.abs(c.l2p(e.sizex)-c.l2p(0)):e.sizex*p.w,o=void 0!==u?"string"==typeof e.yref&&f?u._length*e.sizey:Math.abs(u.l2p(e.sizey)-u.l2p(0)):e.sizey*p.h;var g,y,v=r*d[e.xanchor].offset,x=o*m[e.yanchor].offset,_=d[e.xanchor].sizing+m[e.yanchor].sizing;switch(g=void 0!==c?"string"==typeof e.xref&&h?c._length*e.x+c._offset:c.r2p(e.x)+c._offset:e.x*p.w+p.l,g+=v,y=void 0!==u?"string"==typeof e.yref&&f?u._length*(1-e.y)+u._offset:u.r2p(e.y)+u._offset:p.h-e.y*p.h+p.t,y+=x,e.sizing){case"fill":_+=" slice";break;case"stretch":_="none"}s.attr({x:g,y:y,width:r,height:o,preserveAspectRatio:_,opacity:e.opacity});var b=(c&&"domain"!==a.getRefType(e.xref)?c._id:"")+(u&&"domain"!==a.getRefType(e.yref)?u._id:"");i.setClipUrl(s,b?"clip"+l._uid+b:null,t)}var v=l._imageLowerLayer.selectAll("image").data(h),x=l._imageUpperLayer.selectAll("image").data(c);v.enter().append("image"),x.enter().append("image"),v.exit().remove(),x.exit().remove(),v.each((function(t){g.bind(this)(t),y.bind(this)(t)})),x.each((function(t){g.bind(this)(t),y.bind(this)(t)}));var _=Object.keys(l._plots);for(r=0;r<_.length;r++){e=_[r];var b=l._plots[e];if(b.imagelayer){var w=b.imagelayer.selectAll("image").data(u[e]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(t){g.bind(this)(t),y.bind(this)(t)}))}}}},15553:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(37260),supplyLayoutDefaults:r(507),includeBasePlot:r(20706)("images"),draw:r(32211),convertCoords:r(89443)}},86405:function(t,e,r){"use strict";var n=r(80337),i=r(10229);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),grouptitlefont:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},72783:function(t){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},73970:function(t,e,r){"use strict";var n=r(33626),i=r(34809),a=r(78032),o=r(9829),s=r(86405),l=r(6704),c=r(57599);function u(t,e,r,u){var h=e[t]||{},f=a.newContainer(r,t);function p(t,e){return i.coerce(h,f,s,t,e)}var d=i.coerceFont(p,"font",r.font);if(p("bgcolor",r.paper_bgcolor),p("bordercolor"),p("visible")){for(var m,g=function(t,e){var r=m._input,n=m;return i.coerce(r,n,o,t,e)},y=r.font||{},v=i.coerceFont(p,"grouptitlefont",y,{overrideDflt:{size:Math.round(1.1*y.size)}}),x=0,_=!1,b="normal",w=(r.shapes||[]).filter((function(t){return t.showlegend})),T=u.concat(w).filter((function(e){return t===(e.legend||"legend")})),k=0;k<T.length;k++)if((m=T[k]).visible){var A=m._isShape;(m.showlegend||m._dfltShowLegend&&!(m._module&&m._module.attributes&&m._module.attributes.showlegend&&!1===m._module.attributes.showlegend.dflt))&&(x++,m.showlegend&&(_=!0,(!A&&n.traceIs(m,"pie-like")||!0===m._input.showlegend)&&x++),i.coerceFont(g,"legendgrouptitle.font",v)),(!A&&n.traceIs(m,"bar")&&"stack"===r.barmode||-1!==["tonextx","tonexty"].indexOf(m.fill))&&(b=c.isGrouped({traceorder:b})?"grouped+reversed":"reversed"),void 0!==m.legendgroup&&""!==m.legendgroup&&(b=c.isReversed({traceorder:b})?"reversed+grouped":"grouped")}var M=i.coerce(e,r,l,"showlegend",_&&x>("legend"===t?1:0));if(!1===M&&(r[t]=void 0),(!1!==M||h.uirevision)&&(p("uirevision",r.uirevision),!1!==M)){p("borderwidth");var S,E,C,L="h"===p("orientation"),I="paper"===p("yref"),P="paper"===p("xref"),z="left";if(L?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?I?(E=1.1,C="bottom"):(E=1,C="top"):I?(E=-.1,C="top"):(E=0,C="bottom")):(E=1,C="auto",P?S=1.02:(S=1,z="right")),i.coerce(h,f,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:S}},"x"),i.coerce(h,f,{y:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:E}},"y"),p("traceorder",b),c.isGrouped(r[t])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",z),p("yanchor",C),p("valign"),i.noneOrAll(h,f,["x","y"]),p("title.text")){p("title.side",L?"left":"top");var O=i.extendFlat({},d,{size:i.bigFont(d.size)});i.coerceFont(p,"title.font",O)}}}}t.exports=function(t,e,r){var n,a=r.slice(),o=e.shapes;if(o)for(n=0;n<o.length;n++){var s=o[n];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var c=["legend"];for(n=0;n<a.length;n++)i.pushUnique(c,a[n].legend);for(e._legends=[],n=0;n<c.length;n++){var h=c[n];u(h,t,e,a),e[h]&&e[h].visible&&(e[h]._id=h),e._legends.push(h)}}},6134:function(t,e,r){"use strict";var n=r(45568),i=r(34809),a=r(44122),o=r(33626),s=r(68596),l=r(14751),c=r(62203),u=r(78766),h=r(30635),f=r(22165),p=r(72783),d=r(4530),m=d.LINE_SPACING,g=d.FROM_TL,y=d.FROM_BR,v=r(851),x=r(14375),_=r(57599),b=1,w=/^legend[0-9]*$/;function T(t,e){var r,s,f=e||{},d=t._fullLayout,w=P(f),T=f._inHover;if(T?(s=f.layer,r="hover"):(s=d._infolayer,r=w),s){var S;if(r+=d._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),T){if(!f.entries)return;S=v(f.entries,f)}else{for(var z=(t.calcdata||[]).slice(),O=d.shapes,D=0;D<O.length;D++){var R=O[D];if(R.showlegend){var F={_isShape:!0,_fullInput:R,index:R._index,name:R.name||R.label.text||"shape "+R._index,legend:R.legend,legendgroup:R.legendgroup,legendgrouptitle:R.legendgrouptitle,legendrank:R.legendrank,legendwidth:R.legendwidth,showlegend:R.showlegend,visible:R.visible,opacity:R.opacity,mode:"line"===R.type?"lines":"markers",line:R.line,marker:{line:R.line,color:R.fillcolor,size:12,symbol:"rect"===R.type?"square":"circle"===R.type?"circle":"hexagon2"}};z.push([{trace:F}])}}S=d.showlegend&&v(z,f,d._legends.length>1)}var B=d.hiddenlabels||[];if(!(T||d.showlegend&&S.length))return s.selectAll("."+w).remove(),d._topdefs.select("#"+r).remove(),a.autoMargin(t,w);var N=i.ensureSingle(s,"g",w,(function(t){T||t.attr("pointer-events","all")})),j=i.ensureSingleById(d._topdefs,"clipPath",r,(function(t){t.append("rect")})),U=i.ensureSingle(N,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));U.call(u.stroke,f.bordercolor).call(u.fill,f.bgcolor).style("stroke-width",f.borderwidth+"px");var V,q=i.ensureSingle(N,"g","scrollbox"),H=f.title;f._titleWidth=0,f._titleHeight=0,H.text?((V=i.ensureSingle(q,"text",w+"titletext")).attr("text-anchor","start").call(c.font,H.font).text(H.text),C(V,q,t,f,b)):q.selectAll("."+w+"titletext").remove();var G=i.ensureSingle(N,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),Z=q.selectAll("g.groups").data(S);Z.enter().append("g").attr("class","groups"),Z.exit().remove();var W=Z.selectAll("g.traces").data(i.identity);W.enter().append("g").attr("class","traces"),W.exit().remove(),W.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(M,t,f)})).call(x,t,f).each((function(){T||n.select(this).call(E,t,w)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout,o=P(i);i||(i=a[o]);var s=a._size,l=_.isVertical(i),u=_.isGrouped(i),h="fraction"===i.entrywidthmode,f=i.borderwidth,d=2*f,m=p.itemGap,g=i.indentation+i.itemwidth+2*m,y=2*(f+m),v=I(i),x=i.y<0||0===i.y&&"top"===v,b=i.y>1||1===i.y&&"bottom"===v,w=i.tracegroupgap,T={};i._maxHeight=Math.max(x||b?a.height/2:s.h,30);var A=0;i._width=0,i._height=0;var M=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;c.setTranslate(this,f+M[0],f+M[1]+i._height+e/2+m),i._height+=e,i._width=Math.max(i._width,t[0].width)})),A=g+i._width,i._width+=m+g+d,i._height+=y,u&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=L(i),E=i.x<0||0===i.x&&"right"===S,C=i.x>1||1===i.x&&"left"===S,z=b||x,O=a.width/2;i._maxWidth=Math.max(E?z&&"left"===S?s.l+s.w:O:C?z&&"right"===S?s.r+s.w:O:s.w,2*g);var D=0,R=0;r.each((function(t){var e=k(t,i,g);D=Math.max(D,e),R+=e})),A=null;var F=0;if(u){var B=0,N=0,j=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=k(r,i,g),a=r[0].height;c.setTranslate(this,M[0],M[1]+f+m+a/2+e),e+=a,t=Math.max(t,n),T[r[0].trace.legendgroup]=t}));var r=t+m;N>0&&r+f+N>i._maxWidth?(F=Math.max(F,N),N=0,j+=B+w,B=e):B=Math.max(B,e),c.setTranslate(this,N,j),N+=r})),i._width=Math.max(F,N)+f,i._height=j+B+y}else{var U=r.size(),V=R+d+(U-1)*m<i._maxWidth,q=0,H=0,G=0,Z=0;r.each((function(t){var e=t[0].height,r=k(t,i,g),n=V?r:D;h||(n+=m),n+f+H-m>=i._maxWidth&&(F=Math.max(F,Z),H=0,G+=q,i._height+=q,q=0),c.setTranslate(this,M[0]+f+H,M[1]+f+G+e/2+m),Z=H+r+m,H+=n,q=Math.max(q,e)})),V?(i._width=H+d,i._height=q+y):(i._width=Math.max(F,Z)+d,i._height+=q+y)}}i._width=Math.ceil(Math.max(i._width+M[0],i._titleWidth+2*(f+p.titlePad))),i._height=Math.ceil(Math.max(i._height+M[1],i._titleHeight+2*(f+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var W=t._context.edits,Y=W.legendText||W.legendPosition;r.each((function(t){var e=n.select(this).select("."+o+"toggle"),r=t[0].height,a=t[0].trace.legendgroup,s=k(t,i,g);u&&""!==a&&(s=T[a]);var f=Y?g:A||s;l||h||(f+=m/2),c.setRect(e,0,-r/2,f,r)}))}(t,Z,W,f)},function(){var e,u,v,x,_=d._size,b=f.borderwidth,k="paper"===f.xref,M="paper"===f.yref;if(H.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*m,i=0,a=t.node(),o=c.bBox(a).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*p.titlePad-o):"top right"===e.title.side&&(i=e._width-2*r-2*p.titlePad-o),h.positionText(t,r+p.titlePad+i,r+n)}}(V,f,b),!T){var S,E;S=k?_.l+_.w*f.x-g[L(f)]*f._width:d.width*f.x-g[L(f)]*f._width,E=M?_.t+_.h*(1-f.y)-g[I(f)]*f._effHeight:d.height*(1-f.y)-g[I(f)]*f._effHeight;var C=function(t,e,r,n){var i=t._fullLayout,o=i[e],s=L(o),l=I(o),c="paper"===o.xref,u="paper"===o.yref;t._fullLayout._reservedMargin[e]={};var h=o.y<.5?"b":"t",f=o.x<.5?"l":"r",p={r:i.width-r,l:r+o._width,b:i.height-n,t:n+o._effHeight};if(c&&u)return a.autoMargin(t,e,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});c?t._fullLayout._reservedMargin[e][h]=p[h]:u||"v"===o.orientation?t._fullLayout._reservedMargin[e][f]=p[f]:t._fullLayout._reservedMargin[e][h]=p[h]}(t,w,S,E);if(C)return;if(d.margin.autoexpand){var P=S,z=E;S=k?i.constrain(S,0,d.width-f._width):P,E=M?i.constrain(E,0,d.height-f._effHeight):z,S!==P&&i.log("Constrain "+w+".x to make legend fit inside graph"),E!==z&&i.log("Constrain "+w+".y to make legend fit inside graph")}c.setTranslate(N,S,E)}if(G.on(".drag",null),N.on("wheel",null),T||f._height<=f._maxHeight||t._context.staticPlot){var O=f._effHeight;T&&(O=f._height),U.attr({width:f._width-b,height:O-b,x:b/2,y:b/2}),c.setTranslate(q,0,0),j.select("rect").attr({width:f._width-2*b,height:O-2*b,x:b,y:b}),c.setClipUrl(q,r,t),c.setRect(G,0,0,0,0),delete f._scrollY}else{var D,R,F,B=Math.max(p.scrollBarMinHeight,f._effHeight*f._effHeight/f._height),Z=f._effHeight-B-2*p.scrollBarMargin,W=f._height-f._effHeight,Y=Z/W,X=Math.min(f._scrollY||0,W);U.attr({width:f._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:f._effHeight-b,x:b/2,y:b/2}),j.select("rect").attr({width:f._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:f._effHeight-2*b,x:b,y:b+X}),c.setClipUrl(q,r,t),K(X,B,Y),N.on("wheel",(function(){K(X=i.constrain(f._scrollY+n.event.deltaY/Z*W,0,W),B,Y),0!==X&&X!==W&&n.event.preventDefault()}));var $=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;D="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,F=X})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,X=function(t,e,r){var n=(r-e)/Y+t;return i.constrain(n,0,W)}(F,D,R),K(X,B,Y))}));G.call($);var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(D=t.changedTouches[0].clientY,F=X)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,X=function(t,e,r){var n=(e-r)/Y+t;return i.constrain(n,0,W)}(F,D,R),K(X,B,Y))}));q.call(J)}function K(e,r,n){f._scrollY=t._fullLayout[w]._scrollY=e,c.setTranslate(q,0,-e),c.setRect(G,f._width,p.scrollBarMargin+e*n,p.scrollBarWidth,r),j.select("rect").attr("y",b+e)}t._context.edits.legendPosition&&(N.classed("cursor-move",!0),l.init({element:N.node(),gd:t,prepFn:function(t){if(t.target!==G.node()){var e=c.getTranslate(N);v=e.x,x=e.y}},moveFn:function(t,r){if(void 0!==v&&void 0!==x){var n=v+t,i=x+r;c.setTranslate(N,n,i),e=l.align(n,f._width,_.l,_.l+_.w,f.xanchor),u=l.align(i+f._height,-f._height,_.t+_.h,_.t,f.yanchor)}},doneFn:function(){if(void 0!==e&&void 0!==u){var r={};r[w+".x"]=e,r[w+".y"]=u,o.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&A(t,N,n,e,r)}}))}],t)}}function k(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return"fraction"===a?e._maxWidth*o:r+(o||i)}function A(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label);var c=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===c)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&f(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==c&&f(r,t,n))}function M(t,e,r){var n,a,s=P(r),l=t.data()[0][0],u=l.trace,f=o.traceIs(u,"pie-like"),d=!r._inHover&&e._context.edits.legendText&&!f,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,a=l.groupTitle.font):(a=r.font,r.entries?n=l.text:(n=f?l.label:u.name,u._meta&&(n=i.templateString(n,u._meta))));var g=i.ensureSingle(t,"text",s+"text");g.attr("text-anchor","start").call(c.font,a).text(d?S(n,m):n);var y=r.indentation+r.itemwidth+2*p.itemGap;h.positionText(g,y,0),d?g.call(h.makeEditable,{gd:e,text:n}).call(C,t,e,r).on("edit",(function(n){this.text(S(n,m)).call(C,t,e,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var c=o.getTransformIndices(a,"groupby"),h=c[c.length-1],f=i.keyedContainer(a,"transforms["+h+"].styles","target","value.name");f.set(l.trace._group,n),s=f.constructUpdate()}else s.name=n;return a._isShape?o.call("_guiRelayout",e,"shapes["+u.index+"].name",s.name):o.call("_guiRestyle",e,s,u.index)})):C(g,t,e,r)}function S(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function E(t,e,r){var a,o=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(u.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-e._legendMouseDownTime<o?s+=1:(s=1,e._legendMouseDownTime=a)})),l.on("mouseup",(function(){if(!e._dragged&&!e._editing){var i=e._fullLayout[r];(new Date).getTime()-e._legendMouseDownTime>o&&(s=Math.max(s-1,1)),A(e,i,t,s,n.event)}})))}function C(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),h.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=t.select("g[class*=math-group]"),o=a.node(),s=P(r);r||(r=e._fullLayout[s]);var l,u,f=r.borderwidth,d=(n===b?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(o){var g=c.bBox(o);l=g.height,u=g.width,n===b?c.setTranslate(a,f,f+.75*l):c.setTranslate(a,0,.25*l)}else{var y="."+s+(n===b?"title":"")+"text",v=t.select(y),x=h.lineCount(v),_=v.node();if(l=d*x,u=_?c.bBox(_).width:0,n===b)"left"===r.title.side&&(u+=2*p.itemGap),h.positionText(v,f+p.titlePad,f+d);else{var w=2*p.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=p.itemGap,u-=r.indentation+r.itemwidth),h.positionText(v,w,-d*((x-1)/2-.3))}}n===b?(r._titleWidth=u,r._titleHeight=l):(i.lineHeight=d,i.height=Math.max(l,16)+3,i.width=u)}else t.remove()}(e,r,n,i)}))}function L(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function I(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function P(t){return t._id||"legend"}t.exports=function(t,e){if(e)T(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(w)&&-1===i.indexOf(e)&&t.remove()}));for(var a=0;a<i.length;a++){var o=i[a];T(t,t._fullLayout[o])}}}},851:function(t,e,r){"use strict";var n=r(33626),i=r(57599);t.exports=function(t,e,r){var a,o,s=e._inHover,l=i.isGrouped(e),c=i.isReversed(e),u={},h=[],f=!1,p={},d=0,m=0;function g(t,n,a){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===h.indexOf(n)?(h.push(n),f=!0,u[n]=[a]):u[n].push(a);else{var o="~~i"+d;h.push(o),u[o]=[a],d++}}for(a=0;a<t.length;a++){var y=t[a],v=y[0],x=v.trace,_=x.legend,b=x.legendgroup;if(s||x.visible&&x.showlegend)if(n.traceIs(x,"pie-like"))for(p[b]||(p[b]={}),o=0;o<y.length;o++){var w=y[o].label;p[b][w]||(g(_,b,{label:w,color:y[o].color,i:y[o].i,trace:x,pts:y[o].pts}),p[b][w]=!0,m=Math.max(m,(w||"").length))}else g(_,b,v),m=Math.max(m,(x.name||"").length)}if(!h.length)return[];var T=!f||!l,k=[];for(a=0;a<h.length;a++){var A=u[h[a]];T?k.push(A[0]):k.push(A)}for(T&&(k=[k]),a=0;a<k.length;a++){var M=1/0;for(o=0;o<k[a].length;o++){var S=k[a][o].trace.legendrank;M>S&&(M=S)}k[a][0]._groupMinRank=M,k[a][0]._preGroupSort=a}var E=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(k.forEach((function(t,e){t[0]._preGroupSort=e})),k.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),a=0;a<k.length;a++){k[a].forEach((function(t,e){t._preSort=e})),k[a].sort(E);var C=k[a][0].trace,L=null;for(o=0;o<k[a].length;o++){var I=k[a][o].trace.legendgrouptitle;if(I&&I.text){L=I,s&&(I.font=e._groupTitleFont);break}}if(c&&k[a].reverse(),L){var P=!1;for(o=0;o<k[a].length;o++)if(n.traceIs(k[a][o].trace,"pie-like")){P=!0;break}k[a].unshift({i:-1,groupTitle:L,noClick:P,trace:{showlegend:C.showlegend,legendgroup:C.legendgroup,visible:"toggleitem"===e.groupclick||C.visible}})}for(o=0;o<k[a].length;o++)k[a][o]=[k[a][o]]}return e._lgroupsLength=k.length,e._maxNameLength=m,k}},22165:function(t,e,r){"use strict";var n=r(33626),i=r(34809),a=i.pushUnique,o=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,c=s.legend.itemclick,u=s.legend.itemdoubleclick,h=s.legend.groupclick;if(1===r&&"toggle"===c&&"toggleothers"===u&&o&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===r?l=c:2===r&&(l=u),l){var f="togglegroup"===h,p=s.hiddenlabels?s.hiddenlabels.slice():[],d=t.data()[0][0];if(!d.groupTitle||!d.noClick){var m=e._fullData,g=(s.shapes||[]).filter((function(t){return t.showlegend})),y=m.concat(g),v=d.trace;v._isShape&&(v=v._fullInput);var x,_,b,w,T,k=v.legendgroup,A={},M=[],S=[],E=[],C=(s.shapes||[]).map((function(t){return t._input})),L=!1,I=v.legend,P=v._fullInput;if(P&&P._isShape||!n.traceIs(v,"pie-like")){var z,O=k&&k.length,D=[];if(O)for(x=0;x<y.length;x++)(z=y[x]).visible&&z.legendgroup===k&&D.push(x);if("toggle"===l){var R;switch(v.visible){case!0:R="legendonly";break;case!1:R=!1;break;case"legendonly":R=!0}if(O)if(f)for(x=0;x<y.length;x++){var F=y[x];!1!==F.visible&&F.legendgroup===k&&tt(F,R)}else tt(v,R);else tt(v,R)}else if("toggleothers"===l){var B,N,j,U,V=!0;for(x=0;x<y.length;x++)if(B=(U=y[x])===v,N=!0!==U.showlegend,!(B||N||O&&U.legendgroup===k||U.legend!==I||!0!==U.visible||n.traceIs(U,"notLegendIsolatable"))){V=!1;break}for(x=0;x<y.length;x++)if(!1!==(U=y[x]).visible&&U.legend===I&&!n.traceIs(U,"notLegendIsolatable"))switch(v.visible){case"legendonly":tt(U,!0);break;case!0:j=!!V||"legendonly",B=U===v,N=!0!==U.showlegend&&!U.legendgroup,tt(U,!!(B||O&&U.legendgroup===k||N)||j)}}for(x=0;x<S.length;x++)if(b=S[x]){var q=b.constructUpdate(),H=Object.keys(q);for(_=0;_<H.length;_++)w=H[_],(A[w]=A[w]||[])[E[x]]=q[w]}for(T=Object.keys(A),x=0;x<T.length;x++)for(w=T[x],_=0;_<M.length;_++)A[w].hasOwnProperty(_)||(A[w][_]=void 0);L?n.call("_guiUpdate",e,A,{shapes:C},M):n.call("_guiRestyle",e,A,M)}else{var G=d.label,Z=p.indexOf(G);if("toggle"===l)-1===Z?p.push(G):p.splice(Z,1);else if("toggleothers"===l){var W=-1!==Z,Y=[];for(x=0;x<e.calcdata.length;x++){var X=e.calcdata[x];for(_=0;_<X.length;_++){var $=X[_].label;I===X[0].trace.legend&&G!==$&&(-1===p.indexOf($)&&(W=!0),a(p,$),Y.push($))}}if(!W)for(var J=0;J<Y.length;J++){var K=p.indexOf(Y[J]);-1!==K&&p.splice(K,1)}}n.call("_guiRelayout",e,"hiddenlabels",p)}}}}function Q(t,e){var r=M.indexOf(t),n=A.visible;return n||(n=A.visible=[]),-1===M.indexOf(t)&&(M.push(t),r=M.length-1),n[r]=e,r}function tt(t,e){if(!d.groupTitle||f){var r,a=t._fullInput||t,o=a._isShape,s=a.index;if(void 0===s&&(s=a._index),n.hasTransform(a,"groupby")){var l=S[s];if(!l){var c=n.getTransformIndices(a,"groupby"),u=c[c.length-1];l=i.keyedContainer(a,"transforms["+u+"].styles","target","value.visible"),S[s]=l}var h=l.get(t._group);void 0===h&&(h=!0),!1!==h&&l.set(t._group,e),E[s]=Q(s,!1!==a.visible)}else{var p=!1!==a.visible&&e;o?(r=p,C[s].visible=r,L=!0):Q(s,p)}}}}},57599:function(t,e){"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},82494:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(86405),supplyLayoutDefaults:r(73970),draw:r(6134),style:r(14375)}},14375:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(34809),o=a.strTranslate,s=r(62203),l=r(78766),c=r(65477).extractOpts,u=r(64726),h=r(32891),f=r(37252).castOption,p=r(72783);function d(t,e){return(e?"radial":"horizontal")+(t?"":"reversed")}function m(t){var e=t[0].trace,r=e.contours,n=u.hasLines(e),i=u.hasMarkers(e),a=e.visible&&e.fill&&"none"!==e.fill,o=!1,s=!1;if(r){var l=r.coloring;"lines"===l?o=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?a="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function g(t,e,r){return t&&a.isArrayOrTypedArray(t)?e:t>r?r:t}t.exports=function(t,e,r){var y=e._fullLayout;r||(r=y.legend);var v="constant"===r.itemsizing,x=r.itemwidth,_=(x+2*p.itemGap)/2,b=o(_,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return v?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,h=u.marker||{},f=h.line||{},p=h.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",d=o?u.visible&&u.type===o:i.traceIs(u,"bar"),m=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(d?[t]:[]);m.enter().append("path").classed("legend"+o,!0).attr("d",p).attr("transform",b),m.exit().remove(),m.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,h.line,5,2);i.style("stroke-width",o+"px");var p=a.mcc;if(!r._inHover&&"mc"in a){var d=c(h),m=d.mid;void 0===m&&(m=(d.max+d.min)/2),p=s.tryColorscale(h,"")(m)}var y=p||a.mc||h.color,v=h.pattern,x=v&&s.getPatternAttr(v.shape,0,"");if(x){var _=s.getPatternAttr(v.bgcolor,0,null),b=s.getPatternAttr(v.fgcolor,0,null),T=v.fgopacity,k=g(v.size,8,10),A=g(v.solidity,.5,1),M="legend-"+u.uid;i.call(s.pattern,"legend",e,M,x,k,A,p,v.fillmode,_,b,T)}else i.call(l.fill,y);o&&l.stroke(i,a.mlc||f.color)}))}function k(t,r,o){var s=t[0],l=s.trace,c=o?l.visible&&l.type===o:i.traceIs(l,o),u=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(c?[t]:[]);if(u.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),u.exit().remove(),u.size()){var p=l.marker||{},d=w(f(p.line.width,s.pts),p.line,5,2),m="pieLike",g=a.minExtend(l,{marker:{line:{width:d}}},m),y=a.minExtend(s,{trace:g},m);h(u,y,g,e)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,c=t[0].lineHeight,u=t[0].height;if("middle"===l&&0===s||!c||!u)i.attr("transform",null);else{var h={top:1,bottom:-1}[l]*(.5*(c-u+3))||0,f=r.indentation;i.attr("transform",o(f,h))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var p=i.selectAll("g.legendsymbols").data([t]);p.enter().append("g").classed("legendsymbols",!0),p.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":case"densitymap":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",b).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,o){var u,h=n.select(this),f=c(i),p=f.colorscale,m=f.reversescale;if(p){if(!r){var g=p.length;u=0===o?p[m?g-1:0][1]:1===o?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(y)?y[o]||y[0]:y}h.attr("d",t[0]),u?h.call(l.fill,u):h.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(m,"radial"===r),p,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,"waterfall")}var a=[];e.visible&&r&&(a=t[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(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,"funnel")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:v?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,"funnelarea")})).each((function(t){k(t,this,"pie")})).each((function(t){var r,i,o=m(t),l=o.showFill,h=o.showLine,f=o.showGradientLine,p=o.showGradientFill,g=o.anyFill,y=o.anyLine,v=t[0],_=v.trace,b=c(_),T=b.colorscale,k=b.reversescale,A=u.hasMarkers(_)||!g?"M5,0":y?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||p?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+_.uid;s.gradient(t,e,r,d(k),T,"fill")}})),h||f){var E=w(void 0,_.line,10,5);i=a.minExtend(_,{line:{width:E}}),r=[a.minExtend(v,{trace:i})]}var C=M.select(".legendlines").selectAll("path").data(h||f?[r]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(f?"l"+x+",0.0001":"h"+x)).call(h?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+_.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,"stroke")}})})).each((function(t){var r,i,o=m(t),l=o.anyFill,c=o.anyLine,h=o.showLine,f=o.showMarker,p=t[0],d=p.trace,g=!f&&!c&&!l&&u.hasText(d);function y(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(v&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(f||g||h){var _={},w={};if(f){_.mc=y("marker.color",x),_.mx=y("marker.symbol",x),_.mo=y("marker.opacity",a.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",a.mean,[2,16],12);_.ms=T,w.marker.size=T}h&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x),_.tC=y("textfont.textcase",x),_.tE=y("textfont.lineposition",x),_.tS=y("textfont.shadow",x)),r=[a.minExtend(p,_)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select("g.legendpoints"),A=k.selectAll("path.scatterpts").data(f?r:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),A.exit().remove(),A.call(s.pointStyle,i,e),f&&(r[0].mrc=3);var M=k.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",b).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",b).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},50308:function(t,e,r){"use strict";r(87632),t.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"}}},5832:function(t,e,r){"use strict";var n=r(33626),i=r(44122),a=r(5975),o=r(35188),s=r(28231).eraseActiveShape,l=r(34809),c=l._,u=t.exports={};function h(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},h=a.list(t,null,!0),f=c._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,m=(1+d)/2,g=(1-d)/2;for(i=0;i<h.length;i++)if(!(r=h[i]).fixedrange)if(p=r._name,"auto"===l)u[p+".autorange"]=!0;else if("reset"===l)void 0===r._rangeInitial0&&void 0===r._rangeInitial1?u[p+".autorange"]=!0:void 0===r._rangeInitial0?(u[p+".autorange"]=r._autorangeInitial,u[p+".range"]=[null,r._rangeInitial1]):void 0===r._rangeInitial1?(u[p+".range"]=[r._rangeInitial0,null],u[p+".autorange"]=r._autorangeInitial):u[p+".range"]=[r._rangeInitial0,r._rangeInitial1],void 0!==r._showSpikeInitial&&(u[p+".showspikes"]=r._showSpikeInitial,"on"!==f||r._showSpikeInitial||(f="off"));else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],v=[m*y[0]+g*y[1],m*y[1]+g*y[0]];u[p+".range[0]"]=r.l2r(v[0]),u[p+".range[1]"]=r.l2r(v[1])}}else"hovermode"!==s||"x"!==l&&"y"!==l||(l=c._isHoriz?"y":"x",o.setAttribute("data-val",l)),u[s]=l;c._cartesianSpikesEnabled=f,n.call("_guiRelayout",t,u)}function f(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout._subplots.gl3d||[],s={},l=i.split("."),c=0;c<o.length;c++)s[o[c]+"."+l[1]]=a;var u="pan"===a?a:"zoom";s.dragmode=u,n.call("_guiRelayout",t,s)}function p(t,e){for(var r=e.currentTarget.getAttribute("data-attr"),i="resetLastSave"===r,a="resetDefault"===r,o=t._fullLayout,s=o._subplots.gl3d||[],l={},c=0;c<s.length;c++){var u,h=s[c],f=h+".camera",p=h+".aspectratio",d=h+".aspectmode",m=o[h]._scene;i?(l[f+".up"]=m.viewInitial.up,l[f+".eye"]=m.viewInitial.eye,l[f+".center"]=m.viewInitial.center,u=!0):a&&(l[f+".up"]=null,l[f+".eye"]=null,l[f+".center"]=null,u=!0),u&&(l[p+".x"]=m.viewInitial.aspectratio.x,l[p+".y"]=m.viewInitial.aspectratio.y,l[p+".z"]=m.viewInitial.aspectratio.z,l[d]=m.viewInitial.aspectmode)}n.call("_guiRelayout",t,l)}function d(t,e){var r=e.currentTarget,n=r._previousVal,i=t._fullLayout,a=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var c=0;c<a.length;c++){var u=a[c],h=i[u],f=u+".hovermode";s[f]=h.hovermode,l[f]=!1;for(var p=0;p<3;p++){var d=o[p],m=u+"."+d+".showspikes";l[m]=!1,s[m]=h[d].showspikes}}r._previousVal=s}return l}function m(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout,s=o._subplots.geo||[],l=0;l<s.length;l++){var c=s[l],u=o[c];if("zoom"===i){var h=u.projection.scale,f="in"===a?2*h:.5*h;n.call("_guiRelayout",t,c+".projection.scale",f)}}"reset"===i&&b(t,"geo")}function g(t){var e=t._fullLayout;return!e.hovermode&&(e._has("cartesian")?e._isHoriz?"y":"x":"closest")}function y(t){var e=g(t);n.call("_guiRelayout",t,"hovermode",e)}function v(t,e){_(t,e,"mapbox")}function x(t,e){_(t,e,"map")}function _(t,e,r){for(var i=e.currentTarget.getAttribute("data-val"),a=t._fullLayout,o=a._subplots[r]||[],s={},l=0;l<o.length;l++){var c=o[l],u=a[c].zoom,h="in"===i?1.05*u:u/1.05;s[c+".zoom"]=h}n.call("_guiRelayout",t,s)}function b(t,e){for(var r=t._fullLayout,i=r._subplots[e]||[],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,c=Object.keys(l),u=0;u<c.length;u++){var h=c[u];a[s+"."+h]=l[h]}n.call("_guiRelayout",t,a)}u.toImage={name:"toImage",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||"png";return c(t,"png"===e?"Download plot as a png":"Download plot")},icon:o.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};l.notifier(c(t,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&l.isIE()&&(l.notifier(c(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(t){t in e&&(r[t]=e[t])})),n.call("downloadImage",t,r).then((function(e){l.notifier(c(t,"Snapshot succeeded")+" - "+e,"long")})).catch((function(){l.notifier(c(t,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},u.sendDataToCloud={name:"sendDataToCloud",title:function(t){return c(t,"Edit in Chart Studio")},icon:o.disk,click:function(t){i.sendDataToCloud(t)}},u.editInChartStudio={name:"editInChartStudio",title:function(t){return c(t,"Edit in Chart Studio")},icon:o.pencil,click:function(t){i.sendDataToCloud(t)}},u.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return c(t,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:h},u.pan2d={name:"pan2d",_cat:"pan",title:function(t){return c(t,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:h},u.select2d={name:"select2d",_cat:"select",title:function(t){return c(t,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:h},u.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return c(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:h},u.drawclosedpath={name:"drawclosedpath",title:function(t){return c(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:h},u.drawopenpath={name:"drawopenpath",title:function(t){return c(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:h},u.drawline={name:"drawline",title:function(t){return c(t,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:h},u.drawrect={name:"drawrect",title:function(t){return c(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:h},u.drawcircle={name:"drawcircle",title:function(t){return c(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:h},u.eraseshape={name:"eraseshape",title:function(t){return c(t,"Erase active shape")},icon:o.eraseshape,click:s},u.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return c(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:h},u.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return c(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:h},u.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return c(t,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:h},u.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return c(t,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:h},u.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return c(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:h},u.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return c(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:h},u.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return c(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:f},u.pan3d={name:"pan3d",_cat:"pan",title:function(t){return c(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:f},u.orbitRotation={name:"orbitRotation",title:function(t){return c(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:f},u.tableRotation={name:"tableRotation",title:function(t){return c(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:f},u.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return c(t,"Reset camera to default")},attr:"resetDefault",icon:o.home,click:p},u.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return c(t,"Reset camera to last save")},attr:"resetLastSave",icon:o.movie,click:p},u.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return c(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=d(t,e);n.call("_guiRelayout",t,r)}},u.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return c(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:m},u.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return c(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:m},u.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return c(t,"Reset")},attr:"reset",val:null,icon:o.autoscale,click:m},u.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return c(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:y},u.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return c(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:y},u.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return c(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:y},u.resetViewSankey={name:"resetSankeyGroup",title:function(t){return c(t,"Reset view")},icon:o.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var i=t._fullData[r]._viewInitial;e["node.groups"].push(i.node.groups.slice()),e["node.x"].push(i.node.x.slice()),e["node.y"].push(i.node.y.slice())}n.call("restyle",t,e)}},u.toggleHover={name:"toggleHover",title:function(t){return c(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=d(t,e);r.hovermode=g(t),n.call("_guiRelayout",t,r)}},u.resetViews={name:"resetViews",title:function(t){return c(t,"Reset views")},icon:o.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),h(t,e),r.setAttribute("data-attr","resetLastSave"),p(t,e),b(t,"geo"),b(t,"mapbox"),b(t,"map")}},u.toggleSpikelines={name:"toggleSpikelines",title:function(t){return c(t,"Toggle Spike Lines")},icon:o.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled="on"===r?"off":"on",n.call("_guiRelayout",t,function(t){for(var e="on"===t._fullLayout._cartesianSpikesEnabled,r=a.list(t,null,!0),n={},i=0;i<r.length;i++){var o=r[i];n[o._name+".showspikes"]=!!e||o._showSpikeInitial}return n}(t))}},u.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return c(t,"Reset view")},attr:"reset",icon:o.home,click:function(t){b(t,"mapbox")}},u.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(t){return c(t,"Reset view")},attr:"reset",icon:o.home,click:function(t){b(t,"map")}},u.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return c(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:v},u.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(t){return c(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:x},u.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return c(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:v},u.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(t){return c(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:x}},87632:function(t,e,r){"use strict";var n=r(5832),i=Object.keys(n),a=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],o=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(a),s=[];i.forEach((function(t){!function(t){if(-1===o.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:a,backButtons:o,foreButtons:s}},17683:function(t,e,r){"use strict";var n=r(34809),i=r(78766),a=r(78032),o=r(50308);t.exports=function(t,e){var r=t.modebar||{},s=a.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,o,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var c=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},95433:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(50308),supplyLayoutDefaults:r(17683),manage:r(75442)}},75442:function(t,e,r){"use strict";var n=r(5975),i=r(64726),a=r(33626),o=r(36040).isUnifiedHover,s=r(85393),l=r(5832),c=r(87632).DRAW_MODES,u=r(34809).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,h=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var f,p=r.modeBarButtons;f=Array.isArray(p)&&p.length?function(t){for(var e=u([],t),r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if("string"==typeof a){if(void 0===l[a])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));e[r][i]=l[a]}}return e}(p):!r.displayModeBar&&r.watermark?[]:function(t){var e=t._fullLayout,r=t._fullData,s=t._context;function u(t,e){if("string"==typeof e){if(e.toLowerCase()===t.toLowerCase())return!0}else{var r=e.name,n=e._cat||e.name;if(r===t||n===t.toLowerCase())return!0}return!1}var h=e.modebar.add;"string"==typeof h&&(h=[h]);var f=e.modebar.remove;"string"==typeof f&&(f=[f]);var p=s.modeBarButtonsToAdd.concat(h.filter((function(t){for(var e=0;e<s.modeBarButtonsToRemove.length;e++)if(u(t,s.modeBarButtonsToRemove[e]))return!1;return!0}))),d=s.modeBarButtonsToRemove.concat(f.filter((function(t){for(var e=0;e<s.modeBarButtonsToAdd.length;e++)if(u(t,s.modeBarButtonsToAdd[e]))return!1;return!0}))),m=e._has("cartesian"),g=e._has("gl3d"),y=e._has("geo"),v=e._has("pie"),x=e._has("funnelarea"),_=e._has("gl2d"),b=e._has("ternary"),w=e._has("mapbox"),T=e._has("map"),k=e._has("polar"),A=e._has("smith"),M=e._has("sankey"),S=function(t){for(var e=n.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(e),E=o(e.hovermode),C=[];function L(t){if(t.length){for(var e=[],r=0;r<t.length;r++){for(var n=t[r],i=l[n],a=i.name.toLowerCase(),o=(i._cat||i.name).toLowerCase(),s=!1,c=0;c<d.length;c++){var u=d[c].toLowerCase();if(u===a||u===o){s=!0;break}}s||e.push(l[n])}C.push(e)}}var I=["toImage"];s.showEditInChartStudio?I.push("editInChartStudio"):s.showSendToCloud&&I.push("sendDataToCloud"),L(I);var P=[],z=[],O=[],D=[];(m||_||v||x||b)+y+g+w+T+k+A>1?(z=["toggleHover"],O=["resetViews"]):y?(P=["zoomInGeo","zoomOutGeo"],z=["hoverClosestGeo"],O=["resetGeo"]):g?(z=["hoverClosest3d"],O=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(P=["zoomInMapbox","zoomOutMapbox"],z=["toggleHover"],O=["resetViewMapbox"]):T?(P=["zoomInMap","zoomOutMap"],z=["toggleHover"],O=["resetViewMap"]):_?z=["hoverClosestGl2d"]:v?z=["hoverClosestPie"]:M?(z=["hoverClosestCartesian","hoverCompareCartesian"],O=["resetViewSankey"]):z=["toggleHover"],m&&z.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(t){for(var e=0;e<t.length;e++)if(!a.traceIs(t[e],"noHover"))return!1;return!0}(r)||E)&&(z=[]),!m&&!_||S||(P=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==O[0]&&(O=["resetScale2d"])),g?D=["zoom3d","pan3d","orbitRotation","tableRotation"]:(m||_)&&!S||b?D=["zoom2d","pan2d"]:w||T||y?D=["pan2d"]:k&&(D=["zoom2d"]),function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(a.traceIs(n,"scatter-like")?(i.hasMarkers(n)||i.hasText(n))&&(e=!0):a.traceIs(n,"box-violin")&&"all"!==n.boxpoints&&"all"!==n.points||(e=!0))}return e}(r)&&D.push("select2d","lasso2d");var R=[],F=function(t){-1===R.indexOf(t)&&-1!==z.indexOf(t)&&R.push(t)};if(Array.isArray(p)){for(var B=[],N=0;N<p.length;N++){var j=p[N];"string"==typeof j?(j=j.toLowerCase(),-1!==c.indexOf(j)?(e._has("mapbox")||e._has("map")||e._has("cartesian"))&&D.push(j):"togglespikelines"===j?F("toggleSpikelines"):"togglehover"===j?F("toggleHover"):"hovercompare"===j?F("hoverCompareCartesian"):"hoverclosest"===j?(F("hoverClosestCartesian"),F("hoverClosestGeo"),F("hoverClosest3d"),F("hoverClosestGl2d"),F("hoverClosestPie")):"v1hovermode"===j&&(F("hoverClosestCartesian"),F("hoverCompareCartesian"),F("hoverClosestGeo"),F("hoverClosest3d"),F("hoverClosestGl2d"),F("hoverClosestPie"))):B.push(j)}p=B}return L(D),L(P.concat(O)),L(R),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}(C,p)}(t),h?h.update(t,f):e._modeBar=s(t,f)}else h&&(h.destroy(),delete e._modeBar)}},85393:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=r(34809),o=r(35188),s=r(29697).version,l=new DOMParser;function c(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var u=c.prototype;u.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var o=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+o.bgcolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+o.color),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+o.activecolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+o.activecolor);var l=!this.hasButtons(e),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(l||c||u)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var h=this.getLogo();r.watermark&&(h.className=h.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(h,this.element.childNodes[0]):this.element.appendChild(h),this.hasLogo=!0}this.updateActiveButton()},u.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},u.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},u.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var a=t.val;if(void 0!==a&&("function"==typeof a&&(a=a(this.graphInfo)),r.setAttribute("data-val",a)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},u.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",t.path),t.transform?a.setAttribute("transform",t.transform):void 0!==t.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(a)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},u.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,o=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)o===r&&l.classed("active",!l.classed("active"));else{var c=null===o?o:a.nestedProperty(e,o).get();l.classed("active",c===i)}}))},u.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},u.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",a._(this.graphInfo,"Produced with Plotly.js")+" (v"+s+")"),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(o.newplotlylogo)),t.appendChild(e),t},u.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},u.destroy=function(){a.removeElement(this.container.querySelector(".modebar")),a.deleteRelatedStyleRule(this._uid)},t.exports=function(t,e){var r=t._fullLayout,i=new c({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&n.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}},91032:function(t,e,r){"use strict";var n=r(80337),i=r(10229),a=(0,r(78032).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:a,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:n({editType:"plot"}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},68508:function(t){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},86255:function(t,e,r){"use strict";var n=r(34809),i=r(78766),a=r(78032),o=r(59008),s=r(91032),l=r(68508);function c(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o("visible")){var l=o("step");"all"!==l&&(!a||"gregorian"===a||"month"!==l&&"year"!==l?o("stepmode"):e.stepmode="backward",o("count")),o("label")}}t.exports=function(t,e,r,u,h){var f=t.rangeselector||{},p=a.newContainer(e,"rangeselector");function d(t,e){return n.coerce(f,p,s,t,e)}if(d("visible",o(f,p,{name:"buttons",handleItemDefaults:c,calendar:h}).length>0)){var m=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+l.yPad]}(e,r,u);d("x",m[0]),d("y",m[1]),n.noneOrAll(t,e,["x","y"]),d("xanchor"),d("yanchor"),n.coerceFont(d,"font",r.font);var g=d("bgcolor");d("activecolor",i.contrast(g,l.lightAmount,l.darkAmount)),d("bordercolor"),d("borderwidth")}}},45431:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(44122),o=r(78766),s=r(62203),l=r(34809),c=l.strTranslate,u=r(30635),h=r(5975),f=r(4530),p=f.LINE_SPACING,d=f.FROM_TL,m=f.FROM_BR,g=r(68508),y=r(16383);function v(t){return t._id}function x(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:g.rx,ry:g.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function _(t,e,r,n){var i,a;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,a=n._fullLayout._meta,i.label?a?l.templateString(i.label,a):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){u.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=h.list(t,"x",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),v);e.enter().append("g").classed("rangeselector",!0),e.exit().remove(),e.style({cursor:"pointer","pointer-events":"all"}),e.each((function(e){var r=n.select(this),o=e,h=o.rangeselector,f=r.selectAll("g.button").data(l.filterVisible(h.buttons));f.enter().append("g").classed("button",!0),f.exit().remove(),f.each((function(e){var r=n.select(this),a=y(o,e);e._isActive=function(t,e,r){if("all"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(x,h,e),r.call(_,h,e,t),r.on("click",(function(){t._dragged||i.call("_guiRelayout",t,a)})),r.on("mouseover",(function(){e._isHovered=!0,r.call(x,h,e)})),r.on("mouseout",(function(){e._isHovered=!1,r.call(x,h,e)}))})),function(t,e,r,i,o){var h=0,f=0,y=r.borderwidth;e.each((function(){var t=n.select(this).select(".selector-text"),e=r.font.size*p,i=Math.max(e*u.lineCount(t),16)+3;f=Math.max(f,i)})),e.each((function(){var t=n.select(this),e=t.select(".selector-rect"),i=t.select(".selector-text"),a=i.node()&&s.bBox(i.node()).width,o=r.font.size*p,l=u.lineCount(i),d=Math.max(a+10,g.minButtonWidth);t.attr("transform",c(y+h,y)),e.attr({x:0,y:0,width:d,height:f}),u.positionText(i,d/2,f/2-(l-1)*o/2+3),h+=d+5}));var v=t._fullLayout._size,x=v.l+v.w*r.x,_=v.t+v.h*(1-r.y),b="left";l.isRightAnchor(r)&&(x-=h,b="right"),l.isCenterAnchor(r)&&(x-=h/2,b="center");var w="top";l.isBottomAnchor(r)&&(_-=f,w="bottom"),l.isMiddleAnchor(r)&&(_-=f/2,w="middle"),h=Math.ceil(h),f=Math.ceil(f),x=Math.round(x),_=Math.round(_),a.autoMargin(t,i+"-range-selector",{x:r.x,y:r.y,l:h*d[b],r:h*m[b],b:f*m[w],t:f*d[w]}),o.attr("transform",c(x,_))}(t,f,h,o._name,r)}))}},16383:function(t,e,r){"use strict";var n=r(50936),i=r(34809).titleCase;t.exports=function(t,e){var r=t._name,a={};if("all"===e.step)a[r+".autorange"]=!0;else{var o=function(t,e){var r,a=t.range,o=new Date(t.r2l(a[1])),s=e.step,l=n["utc"+i(s)],c=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(o,-c));break;case"todate":var u=l.offset(o,-c);r=t.l2r(+l.ceil(u))}return[r,a[1]]}(t,e);a[r+".range[0]"]=o[0],a[r+".range[1]"]=o[1]}return a}},44453:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(91032)}}},layoutAttributes:r(91032),handleDefaults:r(86255),draw:r(45431)}},63608:function(t,e,r){"use strict";var n=r(10229);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},46223:function(t,e,r){"use strict";var n=r(5975).list,i=r(32919).getAutoRange,a=r(20604);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r<e.length;r++){var o=e[r],s=o[a.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},20604:function(t){"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},41295:function(t,e,r){"use strict";var n=r(34809),i=r(78032),a=r(5975),o=r(63608),s=r(66249);t.exports=function(t,e,r){var l=t[r],c=e[r];if(l.rangeslider||e._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,h,f=l.rangeslider,p=i.newContainer(c,"rangeslider");if(b("visible")){b("bgcolor",e.plot_bgcolor),b("bordercolor"),b("borderwidth"),b("thickness"),b("autorange",!c.isValidRange(f.range)),b("range");var d=e._subplots;if(d)for(var m=d.cartesian.filter((function(t){return t.substr(0,t.indexOf("y"))===a.name2id(r)})).map((function(t){return t.substr(t.indexOf("y"),t.length)})),g=n.simpleMap(m,a.id2name),y=0;y<g.length;y++){var v=g[y];u=f[v]||{},h=i.newContainer(p,v,"yaxis");var x,_=e[v];u.range&&_.isValidRange(u.range)&&(x="fixed"),"match"!==w("rangemode",x)&&w("range",_.range.slice())}p._input=f}}function b(t,e){return n.coerce(f,p,o,t,e)}function w(t,e){return n.coerce(u,h,s,t,e)}}},88887:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(44122),o=r(34809),s=o.strTranslate,l=r(62203),c=r(78766),u=r(17240),h=r(37703),f=r(5975),p=r(14751),d=r(27983),m=r(20604);function g(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function y(t,e,r,n){var i=o.ensureSingle(t,"rect",m.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,h=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(u,u),"stroke-width":h}).call(c.stroke,n.bordercolor).call(c.fill,n.bgcolor)}function v(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function x(t,e,r,i){var s,c=e.calcdata,u=t.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,o.identity);u.enter().append("g").attr("class",(function(t){return m.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),u.order(),u.exit().remove(),u.each((function(t,o){var l=n.select(this),u=0===o,p=f.getFromId(e,t,"y"),d=p._name,m=i[d],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(g.layout.xaxis.rangebreaks=r.rangebreaks),g.layout[d]={type:p.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(g.layout[d].rangebreaks=p.rangebreaks),a.supplyDefaults(g);var y=g._fullLayout.xaxis,v=g._fullLayout[d];y.clearCalc(),y.setScale(),v.clearCalc(),v.setScale();var x={id:t,plotgroup:l,xaxis:y,yaxis:v,isRangePlot:!0};u?s=x:(x.mainplot="xy",x.mainplotinfo=s),h.rangePlot(e,x,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(c,t))}))}function _(t,e,r,n,i){o.ensureSingle(t,"rect",m.maskMinClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(c.fill,m.maskColor),o.ensureSingle(t,"rect",m.maskMaxClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(c.fill,m.maskColor),"match"!==i.rangemode&&(o.ensureSingle(t,"rect",m.maskMinOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(c.fill,m.maskOppAxisColor),o.ensureSingle(t,"rect",m.maskMaxOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",m.maskOppBorder).call(c.fill,m.maskOppAxisColor))}function b(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,"rect",m.slideBoxClassName,(function(t){t.attr({y:0,cursor:m.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:m.slideBoxFill})}function w(t,e,r,n){var i=o.ensureSingle(t,"g",m.grabberMinClassName),a=o.ensureSingle(t,"g",m.grabberMaxClassName),s={x:0,width:m.handleWidth,rx:m.handleRadius,fill:c.background,stroke:c.defaultLine,"stroke-width":m.handleStrokeWidth,"shape-rendering":"crispEdges"},l={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(i,"rect",m.handleMinClassName,(function(t){t.attr(s)})).attr(l),o.ensureSingle(a,"rect",m.handleMaxClassName,(function(t){t.attr(s)})).attr(l);var u={width:m.grabAreaWidth,x:0,y:0,fill:m.grabAreaFill,cursor:e._context.staticPlot?void 0:m.grabAreaCursor};o.ensureSingle(i,"rect",m.grabAreaMinClassName,(function(t){t.attr(u)})).attr("height",n._height),o.ensureSingle(a,"rect",m.grabAreaMaxClassName,(function(t){t.attr(u)})).attr("height",n._height)}t.exports=function(t){for(var e=t._fullLayout,r=e._rangeSliderData,a=0;a<r.length;a++){var l=r[a][m.name];l._clipId=l._id+"-"+e._uid}var c=e._infolayer.selectAll("g."+m.containerClassName).data(r,(function(t){return t._name}));c.exit().each((function(t){var r=t[m.name];e._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(c.enter().append("g").classed(m.containerClassName,!0).attr("pointer-events","all"),c.each((function(r){var a=n.select(this),l=r[m.name],c=e[f.id2name(r.anchor)],h=l[f.id2name(r.anchor)];if(l.range){var T,k=o.simpleMap(l.range,r.r2l),A=o.simpleMap(r.range,r.r2l);T=A[0]<A[1]?[Math.min(k[0],A[0]),Math.max(k[1],A[1])]:[Math.max(k[0],A[0]),Math.min(k[1],A[1])],l.range=l._input.range=o.simpleMap(T,r.l2r)}r.cleanRange("rangeslider.range");var M=e._size,S=r.domain;l._width=M.w*(S[1]-S[0]);var E=Math.round(M.l+M.w*S[0]),C=Math.round(M.t+M.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+l._offsetShift+m.extraPad);a.attr("transform",s(E,C)),l._rl=o.simpleMap(l.range,r.r2l);var L=l._rl[0],I=l._rl[1],P=I-L;if(l.p2d=function(t){return t/l._width*P+L},l.d2p=function(t){return(t-L)/P*l._width},r.rangebreaks){var z=r.locateBreaks(L,I);if(z.length){var O,D,R=0;for(O=0;O<z.length;O++)R+=(D=z[O]).max-D.min;var F=l._width/(I-L-R),B=[-F*L];for(O=0;O<z.length;O++)D=z[O],B.push(B[B.length-1]-F*(D.max-D.min));for(l.d2p=function(t){for(var e=B[0],r=0;r<z.length;r++){var n=z[r];if(t>=n.max)e=B[r+1];else if(t<n.min)break}return e+F*t},O=0;O<z.length;O++)(D=z[O]).pmin=l.d2p(D.min),D.pmax=l.d2p(D.max);l.p2d=function(t){for(var e=B[0],r=0;r<z.length;r++){var n=z[r];if(t>=n.pmax)e=B[r+1];else if(t<n.pmin)break}return(t-e)/F}}}if("match"!==h.rangemode){var N=c.r2l(h.range[0]),j=c.r2l(h.range[1])-N;l.d2pOppAxis=function(t){return(t-N)/j*l._height}}a.call(y,t,r,l).call(v,t,r,l).call(x,t,r,l).call(_,t,r,l,h).call(b,t,r,l).call(w,t,r,l),function(t,e,r,a){if(!e._context.staticPlot){var s=t.select("rect."+m.slideBoxClassName).node(),l=t.select("rect."+m.grabAreaMinClassName).node(),c=t.select("rect."+m.grabAreaMaxClassName).node();t.on("mousedown",u),t.on("touchstart",u)}function u(){var u=n.event,h=u.target,f=g(u),m=f-t.node().getBoundingClientRect().left,y=a.d2p(r._rl[0]),v=a.d2p(r._rl[1]),x=p.coverSlip();function _(t){var u,p,_,b=+g(t)-f;switch(h){case s:if(_="ew-resize",y+b>r._length||v+b<0)return;u=y+b,p=v+b;break;case l:if(_="col-resize",y+b>r._length)return;u=y+b,p=v;break;case c:if(_="col-resize",v+b<0)return;u=y,p=v+b;break;default:_="ew-resize",u=m,p=m+b}if(p<u){var w=p;p=u,u=w}a._pixelMin=u,a._pixelMax=p,d(n.select(x),_),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){i.call("_guiRelayout",e,r._name+".range",[s,l])}))}(0,e,r,a)}function b(){x.removeEventListener("mousemove",_),x.removeEventListener("mouseup",b),this.removeEventListener("touchmove",_),this.removeEventListener("touchend",b),o.removeElement(x)}this.addEventListener("touchmove",_),this.addEventListener("touchend",b),x.addEventListener("mousemove",_),x.addEventListener("mouseup",b)}}(a,t,r,l),function(t,e,r,n,i,a){var l=m.handleWidth/2;function c(t){return o.constrain(t,0,n._width)}function u(t){return o.constrain(t,0,n._height)}function h(t){return o.constrain(t,-l,n._width+l)}var f=c(n.d2p(r._rl[0])),p=c(n.d2p(r._rl[1]));if(t.select("rect."+m.slideBoxClassName).attr("x",f).attr("width",p-f),t.select("rect."+m.maskMinClassName).attr("width",f),t.select("rect."+m.maskMaxClassName).attr("x",p).attr("width",n._width-p),"match"!==a.rangemode){var d=n._height-u(n.d2pOppAxis(i._rl[1])),g=n._height-u(n.d2pOppAxis(i._rl[0]));t.select("rect."+m.maskMinOppAxisClassName).attr("x",f).attr("height",d).attr("width",p-f),t.select("rect."+m.maskMaxOppAxisClassName).attr("x",f).attr("y",g).attr("height",n._height-g).attr("width",p-f),t.select("rect."+m.slideBoxClassName).attr("y",d).attr("height",g-d)}var y=.5,v=Math.round(h(f-l))-y,x=Math.round(h(p-l))+y;t.select("g."+m.grabberMinClassName).attr("transform",s(v,y)),t.select("g."+m.grabberMaxClassName).attr("transform",s(x,y))}(a,0,r,l,c,h),"bottom"===r.side&&u.draw(t,r._id+"title",{propContainer:r,propName:r._name+".title",placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:C+l._height+l._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})})))}},80400:function(t,e,r){"use strict";var n=r(5975),i=r(30635),a=r(20604),o=r(4530).LINE_SPACING,s=a.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var a=0;a<e.length;a++){var o=e[a];if(l(o)){i.push(o);var c=o[s];c._id=s+o._id,c._height=(t.height-r.b-r.t)*c.thickness,c._offsetShift=Math.floor(c.borderwidth/2)}}t._rangeSliderData=i},e.autoMarginOpts=function(t,e){var r=t._fullLayout,n=e[s],l=e._id.charAt(0),c=0,u=0;return"bottom"===e.side&&(c=e._depth,e.title.text!==r._dfltTitle[l]&&(u=1.5*e.title.font.size+10+n._offsetShift,u+=(e.title.text.match(i.BR_TAG_ALL)||[]).length*e.title.font.size*o)),{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:n._height+c+Math.max(r.margin.b,u),pad:a.extraPad+2*n._offsetShift}}},55429:function(t,e,r){"use strict";var n=r(34809),i=r(63608),a=r(66249),o=r(80400);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:r(63608),handleDefaults:r(41295),calcAutorange:r(46223),draw:r(88887),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},66249:function(t){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},4327:function(t,e,r){"use strict";var n=r(50222),i=r(36640).line,a=r(94850).T,o=r(93049).extendFlat,s=r(13582).overrideAll,l=r(78032).templatedArray;r(35081),t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o({},n.xref,{}),yref:o({},n.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:i.color,width:o({},i.width,{min:1,dflt:1}),dash:o({},a,{dflt:"dot"})}}),"arraydraw","from-root")},78865:function(t){"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},2272:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(59008),o=r(4327),s=r(49728);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var l=a("path"),c="path"!==a("type",l?"path":"rect");c&&delete e.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var u=["x","y"],h=0;h<2;h++){var f,p,d,m=u[h],g={_fullLayout:r},y=i.coerceRef(t,e,g,m);if((f=i.getFromId(g,y))._selectionIndices.push(e._index),d=s.rangeToShapePosition(f),p=s.shapePositionToRange(f),c){var v=m+"0",x=m+"1",_=t[v],b=t[x];t[v]=p(t[v],!0),t[x]=p(t[x],!0),i.coercePosition(e,g,a,y,v),i.coercePosition(e,g,a,y,x);var w=e[v],T=e[x];void 0!==w&&void 0!==T&&(e[v]=d(w),e[x]=d(T),t[v]=_,t[x]=b)}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){a(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n<r.length;n++){var i=r[n];i&&void 0===i.path&&(void 0!==i.x0&&void 0!==i.x1&&void 0!==i.y0&&void 0!==i.y1||(e.selections[n]=null))}}},7028:function(t,e,r){"use strict";var n=r(81055).readPaths,i=r(561),a=r(78534).clearOutlineControllers,o=r(78766),s=r(62203),l=r(78032).arrayEditor,c=r(49728),u=c.getPathString;function h(t){var e=t._fullLayout;for(var r in a(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i<e.selections.length;i++)p(t,i)}function f(t){return t._context.editSelection}function p(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=c.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,p=r.plotinfo;a._input&&function(r){var c=u(t,a),g={"data-index":e,"fill-rule":"evenodd",d:c},y=a.opacity,v="rgba(0,0,0,0)",x=a.line.color||o.contrast(t._fullLayout.plot_bgcolor),_=a.line.width,b=a.line.dash;_||(_=5,b="solid");var w=f(t)&&t._fullLayout._activeSelectionIndex===e;w&&(v=t._fullLayout.activeselection.fillcolor,y=t._fullLayout.activeselection.opacity);for(var T=[],k=1;k>=0;k--){var A=r.append("path").attr(g).style("opacity",k?.1:y).call(o.stroke,x).call(o.fill,v).call(s.dashLine,k?"solid":b,k?4+_:_);if(d(A,t,a),w){var M=l(t.layout,"selections",a);A.style({cursor:"move"});var S={element:A.node(),plotinfo:p,gd:t,editHelpers:M,isActiveSelection:!0},E=n(c,t);i(E,A,S)}else A.style("pointer-events",k?"all":"none");T[k]=A}var C=T[0];T[1].node().addEventListener("click",(function(){return function(t,e){if(f(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void m(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=m,h(t)}}}(t,C)}))}(t._fullLayout._selectionLayer)}function d(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function m(t){f(t)&&t._fullLayout._activeSelectionIndex>=0&&(a(t),delete t._fullLayout._activeSelectionIndex,h(t))}t.exports={draw:h,drawOne:p,activateLastSelection:function(t){if(f(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=m,h(t)}}}},52307:function(t,e,r){"use strict";var n=r(94850).T,i=r(93049).extendFlat;t.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:i({},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"}}},43028:function(t){"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},51817:function(t,e,r){"use strict";var n=r(70414).selectMode,i=r(78534).clearOutline,a=r(81055),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute("d"),c=e.gd,u=c._fullLayout.newselection,h=e.plotinfo,f=h.xaxis,p=h.yaxis,d=e.isActiveSelection,m=e.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==d){var y=c._fullLayout._activeSelectionIndex;if(y<g.length)switch(c._fullLayout.selections[y].type){case"rect":m="select";break;case"path":m="lasso"}}var v,x=o(a,c,h,d),_={xref:f._id,yref:p._id,opacity:u.opacity,line:{color:u.line.color,width:u.line.width,dash:u.line.dash}};1===x.length&&(v=x[0]),v&&5===v.length&&"select"===m?(_.type="rect",_.x0=v[0][1],_.y0=v[0][2],_.x1=v[2][1],_.y1=v[2][2]):(_.type="path",f&&p&&l(x,f,p),_.path=s(x),v=null),i(c);for(var b=e.editHelpers,w=(b||{}).modifyItem,T=[],k=0;k<g.length;k++){var A=c._fullLayout.selections[k];if(A){if(T[k]=A._input,void 0!==d&&k===c._fullLayout._activeSelectionIndex){var M=_;switch(A.type){case"rect":w("x0",M.x0),w("x1",M.x1),w("y0",M.y0),w("y1",M.y1);break;case"path":w("path",M.path)}}}else T[k]=A}return void 0===d?(T.push(_),T):b?b.getUpdateObj():{}}}}},49801:function(t,e,r){"use strict";var n=r(34809).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},44844:function(t,e,r){"use strict";var n=r(7028),i=r(88666);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(4327),supplyLayoutDefaults:r(2272),supplyDrawNewSelectionDefaults:r(43028),includeBasePlot:r(20706)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},88666:function(t,e,r){"use strict";var n=r(11516),i=r(52773),a=r(33626),o=r(62203).dashStyle,s=r(78766),l=r(32141),c=r(36040).makeEventData,u=r(70414),h=u.freeMode,f=u.rectMode,p=u.drawMode,d=u.openMode,m=u.selectMode,g=r(49728),y=r(2956),v=r(561),x=r(78534).clearOutline,_=r(81055),b=_.handleEllipse,w=_.readPaths,T=r(87562).newShapes,k=r(51817),A=r(7028).activateLastSelection,M=r(34809),S=M.sorterAsc,E=r(80899),C=r(64025),L=r(5975).getFromId,I=r(34823),P=r(71817).redrawReglTraces,z=r(78865),O=z.MINSELECT,D=E.filter,R=E.tester,F=r(49801),B=F.p2r,N=F.axValue,j=F.getTransform;function U(t){return void 0!==t.subplot}function V(t,e,r,n,i,a,o){var s,l,c,u,h,f,p,m,g,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf("event")>-1,_=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){Z(t,e,a);var b=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(y,s=X(e,r,n,i));if(b.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,b):function(t){var e,r,n=0;for(r=0;r<t.length;r++)if((e=t[r].cd[0].trace).selectedpoints){if(e.selectedpoints.length>1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(f=J(b))){for(o&&o.remove(),g=0;g<s.length;g++)(l=s[g])._module.selectPoints(l,!1);K(e,s),W(a),x&&ft(e)}else{for(p=t.shiftKey&&(void 0!==f?f:J(b)),c=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}(b.pointNumber,b.searchInfo,p),u=G(a.selectionDefs.concat([c])),g=0;g<s.length;g++)if(h=tt(s[g]._module.selectPoints(s[g],u),s[g]),_.length)for(var w=0;w<h.length;w++)_.push(h[w]);else _=h;if(K(e,s,m={points:_}),c&&a&&a.selectionDefs.push(c),o){var T=a.mergedPolygons,k=d(a.dragmode);v(et(T,k),o,a)}x&&ht(e,m)}}}function q(t){return"pointNumber"in t&&"searchInfo"in t}function H(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&&n===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function G(t){if(t.length){for(var e=[],r=q(t[0])?0:t[0][0][0],n=r,i=q(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(q(t[o]))e.push(H(t[o]));else{var s=R(t[o]);s.subtract=!!t[o].subtract,e.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!e[o].subtract);return a},isRect:!1,degenerate:!1}}}function Z(t,e,r){var n=e._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(t.shiftKey||t.altKey)&&!(p(a)&&d(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):s&&i.selection||W(r),o||(x(e),n._lastSelectedSubplot=i.id)}function W(t,e){var r=t.dragmode,n=t.plotinfo,i=t.gd;(function(t){return t._fullLayout._activeShapeIndex>=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=p(r),l=m(r);if(s||l){var c,u,h=o.selectAll(".select-outline-"+n.id);h&&i._fullLayout._outlining&&(s&&(c=T(h,t)),c&&a.call("_guiRelayout",i,{shapes:c}),l&&!U(t)&&(u=k(h,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:u}).then((function(){e&&A(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function Y(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(Y),c=r.map(Y);for(o=0;o<t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&&a._module&&a._module.selectPoints)if(!U({subplot:n})||a.subplot!==n&&a.geo!==n)if("splom"===a.type){if(a._xaxes[l[0]]&&a._yaxes[c[0]]){var u=$(a._module,i,e[0],r[0]);u.scene=t._fullLayout._splomScenes[a.uid],s.push(u)}}else if("sankey"===a.type){var h=$(a._module,i,e[0],r[0]);s.push(h)}else{if(!(-1!==l.indexOf(a.xaxis)||a._xA&&a._xA.overlaying))continue;if(!(-1!==c.indexOf(a.yaxis)||a._yA&&a._yA.overlaying))continue;s.push($(a._module,i,L(t,a.xaxis),L(t,a.yaxis)))}else s.push($(a._module,i,e[0],r[0]));return s}function $(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}function J(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function K(t,e,r){var n,i;for(n=0;n<e.length;n++){var o=e[n].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[o.uid]||{};void 0===s.selectedpoints&&(s.selectedpoints=o._input.selectedpoints||null)}if(r){var l=r.points||[];for(n=0;n<e.length;n++)(i=e[n].cd[0].trace)._input.selectedpoints=i._fullInput.selectedpoints=[],i._fullInput!==i&&(i.selectedpoints=[]);for(var c=0;c<l.length;c++){var u=l[c],h=u.data,f=u.fullData,p=u.pointIndex,d=u.pointIndices;d?([].push.apply(h.selectedpoints,d),i._fullInput!==i&&[].push.apply(f.selectedpoints,d)):(h.selectedpoints.push(p),i._fullInput!==i&&f.selectedpoints.push(p))}}else for(n=0;n<e.length;n++)delete(i=e[n].cd[0].trace).selectedpoints,delete i._input.selectedpoints,i._fullInput!==i&&delete i._fullInput.selectedpoints;!function(t,e){for(var r=!1,n=0;n<e.length;n++){var i=e[n],o=i.cd;a.traceIs(o[0].trace,"regl")&&(r=!0);var s=i._module,l=s.styleOnSelect||s.style;l&&(l(t,o,o[0].node3),o[0].nodeRangePlot3&&l(t,o,o[0].nodeRangePlot3))}r&&(I(t),P(t))}(t,e)}function Q(t,e,r){for(var i=(r?n.difference:n.union)({regions:t},{regions:[e]}).regions.reverse(),a=0;a<i.length;a++){var o=i[a];o.subtract=st(o,i.slice(0,a))}return i}function tt(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=c(t[i],n,r);return t}function et(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<t[n].length;i++){r[n][i]=[],r[n][i][0]=i?"L":"M";for(var a=0;a<t[n][i].length;a++)r[n][i].push(t[n][i][a])}e||r[n].push(["Z",r[n][0][1],r[n][0][2]])}return r}function rt(t,e){for(var r,n,i=[],a=[],o=0;o<e.length;o++){var s=e[o];n=s._module.selectPoints(s,t),a.push(n),r=tt(n,s),i=i.concat(r)}return i}function nt(t,e,r,n,i){var a,o,s,l=!!n;i&&(a=i.plotinfo,o=i.xaxes[0]._id,s=i.yaxes[0]._id);var c=[],u=[],h=ot(t),f=t._fullLayout;if(a){var d=f._zoomlayer,g=f.dragmode,y=p(g),v=m(g);if(y||v){var x=L(t,o,"x"),_=L(t,s,"y");if(x&&_){var b=d.selectAll(".select-outline-"+a.id);if(b&&t._fullLayout._outlining&&b.length){for(var T=b[0][0].getAttribute("d"),k=w(T,t,a),A=[],M=0;M<k.length;M++){for(var S=k[M],E=[],C=0;C<S.length;C++)E.push([lt(x,S[C][1]),lt(_,S[C][2])]);E.xref=o,E.yref=s,E.subtract=st(E,A),A.push(E)}h=h.concat(A)}}}}var I=o&&s?[o+s]:f._subplots.cartesian;!function(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var n=e[r][0].trace,i=t._fullLayout._splomScenes;if(i){var a=i[n.uid];a&&(a.selectBatch=[])}}}(t);for(var P={},z=0;z<I.length;z++){var O=I[z],D=O.indexOf("y"),R=O.slice(0,D),F=O.slice(D),B=o&&s?r:void 0;if(B=at(h,R,F,B)){var N=n;if(!l){var j=L(t,R,"x"),U=L(t,F,"y");N=X(t,[j],[U],O);for(var V=0;V<N.length;V++){var q=N[V],H=q.cd[0],G=H.trace;if("scattergl"===q._module.name&&!H.t.xpx){var Z=G.x,W=G.y,Y=G._length;H.t.xpx=[],H.t.ypx=[];for(var $=0;$<Y;$++)H.t.xpx[$]=j.c2p(Z[$]),H.t.ypx[$]=U.c2p(W[$])}"splom"===q._module.name&&(P[G.uid]||(P[G.uid]=!0))}}var J=rt(B,N);c=c.concat(J),u=u.concat(N)}}var Q={points:c};K(t,u,Q);var tt=f.clickmode.indexOf("event")>-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,pt=et[0].yref;if(nt&&pt){var dt=ct(et);ut([L(t,nt,"x"),L(t,pt,"y")])(Q,dt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ht(t,Q),f._reselect=!1}if(!a&&f._deselect){var mt=f._deselect;(function(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];if(i.xaxis&&i.xaxis._id===t&&i.yaxis&&i.yaxis._id===e)return!0}return!1})(o=mt.xref,s=mt.yref,u)||it(t,o,s,n),tt&&(Q.points.length?ht(t,Q):ft(t)),f._deselect=!1}return{eventData:Q,selectionTesters:r}}function it(t,e,r,n){n=X(t,[L(t,e,"x")],[L(t,r,"y")],e+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}K(t,n)}function at(t,e,r,n){for(var i,a=0;a<t.length;a++){var o=t[a];e===o.xref&&r===o.yref&&(i?n=G(i=Q(i,o,!!o.subtract)):(i=[o],n=R(o)))}return n}function ot(t,e){for(var r=[],n=t._fullLayout,i=n.selections,a=i.length,o=0;o<a;o++)if(!e||o===n._activeSelectionIndex){var s=i[o];if(s){var l,c,u,h,f,p=s.xref,d=s.yref,m=L(t,p,"x"),v=L(t,d,"y");if("rect"===s.type){f=[];var x=lt(m,s.x0),_=lt(m,s.x1),b=lt(v,s.y0),w=lt(v,s.y1);f=[[x,b],[x,w],[_,w],[_,b]],l=Math.min(x,_),c=Math.max(x,_),u=Math.min(b,w),h=Math.max(b,w),f.xmin=l,f.xmax=c,f.ymin=u,f.ymax=h,f.xref=p,f.yref=d,f.subtract=!1,f.isRect=!0,r.push(f)}else if("path"===s.type)for(var T=s.path.split("Z"),k=[],A=0;A<T.length;A++){var M=T[A];if(M){M+="Z";var S=g.extractPathCoords(M,y.paramIsX,"raw"),E=g.extractPathCoords(M,y.paramIsY,"raw");l=1/0,c=-1/0,u=1/0,h=-1/0,f=[];for(var C=0;C<S.length;C++){var I=lt(m,S[C]),P=lt(v,E[C]);f.push([I,P]),l=Math.min(I,l),c=Math.max(I,c),u=Math.min(P,u),h=Math.max(P,h)}f.xmin=l,f.xmax=c,f.ymin=u,f.ymax=h,f.xref=p,f.yref=d,f.subtract=st(f,k),k.push(f),r.push(f)}}}}return r}function st(t,e){for(var r=!1,n=0;n<e.length;n++)for(var a=e[n],o=0;o<t.length;o++)if(i(t[o],a)){r=!r;break}return r}function lt(t,e){return"date"===t.type&&(e=e.replace("_"," ")),"log"===t.type?t.c2p(e):t.r2p(e,null,t.calendar)}function ct(t){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];r=(r=r.concat(i)).concat([i[0]])}return(a=r).isRect=5===a.length&&a[0][0]===a[4][0]&&a[0][1]===a[4][1]&&a[0][0]===a[1][0]&&a[2][0]===a[3][0]&&a[0][1]===a[3][1]&&a[1][1]===a[2][1]||a[0][1]===a[1][1]&&a[2][1]===a[3][1]&&a[0][0]===a[3][0]&&a[1][0]===a[2][0],a.isRect&&(a.xmin=Math.min(a[0][0],a[2][0]),a.xmax=Math.max(a[0][0],a[2][0]),a.ymin=Math.min(a[0][1],a[2][1]),a.ymax=Math.max(a[0][1],a[2][1])),a;var a}function ut(t){return function(e,r){for(var n,i,a=0;a<t.length;a++){var o=t[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var c=r[l+"min"],u=r[l+"max"];void 0!==c&&void 0!==u&&(n[s]=[B(o,c),B(o,u)].sort(S))}else i||(i={}),i[s]=r.map(N(o))}n&&(e.range=n),i&&(e.lassoPoints=i)}}function ht(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function ft(t){t.emit("plotly_deselect",null)}t.exports={reselect:nt,prepSelect:function(t,e,r,n,i){var c=!U(n),u=h(i),g=f(i),y=d(i),x=p(i),_=m(i),w="drawcircle"===i,T="drawline"===i||w,k=n.gd,A=k._fullLayout,S=_&&"immediate"===A.newselection.mode&&c,E=A._zoomlayer,L=n.element.getBoundingClientRect(),I=n.plotinfo,P=j(I),F=e-L.left,B=r-L.top;A._calcInverseTransform(k);var N=M.apply3DTransform(A._invTransform)(F,B);F=N[0],B=N[1];var q,H,Y,$,J,tt,at,ot=A._invScaleX,st=A._invScaleY,lt=F,pt=B,dt="M"+F+","+B,mt=n.xaxes[0],gt=n.yaxes[0],yt=mt._length,vt=gt._length,xt=t.altKey&&!(p(i)&&y);Z(t,k,n),u&&(q=D([[F,B]],z.BENDPX));var _t=E.selectAll("path.select-outline-"+I.id).data([1]),bt=x?A.newshape:A.newselection;x&&(n.hasText=bt.label.text||bt.label.texttemplate);var wt=x&&!y?bt.fillcolor:"rgba(0,0,0,0)",Tt=bt.line.color||(c?s.contrast(k._fullLayout.plot_bgcolor):"#7f7f7f");_t.enter().append("path").attr("class","select-outline select-outline-"+I.id).style({opacity:x?bt.opacity/2:1,"stroke-dasharray":o(bt.line.dash,bt.line.width),"stroke-width":bt.line.width+"px","shape-rendering":"crispEdges"}).call(s.stroke,Tt).call(s.fill,wt).attr("fill-rule","evenodd").classed("cursor-move",!!x).attr("transform",P).attr("d",dt+"Z");var kt=E.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1}).attr("transform",P).attr("d","M0,0Z");if(x&&n.hasText){var At=E.select(".label-temp");At.empty()&&(At=E.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Mt=A._uid+z.SELECTID,St=[],Et=X(k,n.xaxes,n.yaxes,n.subplot);S&&!t.shiftKey&&(n._clearSubplotSelections=function(){if(c){var t=mt._id,e=gt._id;it(k,t,e,Et);for(var r=(k.layout||{}).selections||[],n=[],i=!1,o=0;o<r.length;o++){var s=A.selections[o];s.xref!==t||s.yref!==e?n.push(r[o]):i=!0}i&&(k._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",k,{selections:n}))}});var Ct=function(t){return t.plotinfo.fillRangeItems||ut(t.xaxes.concat(t.yaxes))}(n);n.moveFn=function(t,e){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),lt=Math.max(0,Math.min(yt,ot*t+F)),pt=Math.max(0,Math.min(vt,st*e+B));var r=Math.abs(lt-F),i=Math.abs(pt-B);if(g){var a,o,s;if(_){var l=A.selectdirection;switch(a="any"===l?i<Math.min(.6*r,O)?"h":r<Math.min(.6*i,O)?"v":"d":l){case"h":o=w?vt/2:0,s=vt;break;case"v":o=w?yt/2:0,s=yt}}if(x)switch(A.newshape.drawdirection){case"vertical":a="h",o=w?vt/2:0,s=vt;break;case"horizontal":a="v",o=w?yt/2:0,s=yt;break;case"ortho":r<i?(a="h",o=B,s=pt):(a="v",o=F,s=lt);break;default:a="d"}"h"===a?(($=T?b(w,[lt,o],[lt,s]):[[F,o],[F,s],[lt,s],[lt,o]]).xmin=T?lt:Math.min(F,lt),$.xmax=T?lt:Math.max(F,lt),$.ymin=Math.min(o,s),$.ymax=Math.max(o,s),kt.attr("d","M"+$.xmin+","+(B-O)+"h-4v"+2*O+"h4ZM"+($.xmax-1)+","+(B-O)+"h4v"+2*O+"h-4Z")):"v"===a?(($=T?b(w,[o,pt],[s,pt]):[[o,B],[o,pt],[s,pt],[s,B]]).xmin=Math.min(o,s),$.xmax=Math.max(o,s),$.ymin=T?pt:Math.min(B,pt),$.ymax=T?pt:Math.max(B,pt),kt.attr("d","M"+(F-O)+","+$.ymin+"v-4h"+2*O+"v4ZM"+(F-O)+","+($.ymax-1)+"v4h"+2*O+"v-4Z")):"d"===a&&(($=T?b(w,[F,B],[lt,pt]):[[F,B],[F,pt],[lt,pt],[lt,B]]).xmin=Math.min(F,lt),$.xmax=Math.max(F,lt),$.ymin=Math.min(B,pt),$.ymax=Math.max(B,pt),kt.attr("d","M0,0Z"))}else u&&(q.addPt([lt,pt]),$=q.filtered);if(n.selectionDefs&&n.selectionDefs.length?(Y=Q(n.mergedPolygons,$,xt),$.subtract=xt,H=G(n.selectionDefs.concat([$]))):(Y=[$],H=R($)),v(et(Y,y),_t,n),_){var c,h=nt(k,!1),f=h.eventData?h.eventData.points.slice():[];h=nt(k,!1,H,Et,n),H=h.selectionTesters,at=h.eventData,c=q?q.filtered:ct(Y),C.throttle(Mt,z.SELECTDELAY,(function(){for(var t=(St=rt(H,Et)).slice(),e=0;e<f.length;e++){for(var r=f[e],n=!1,i=0;i<t.length;i++)if(t[i].curveNumber===r.curveNumber&&t[i].pointNumber===r.pointNumber){n=!0;break}n||t.push(r)}t.length&&(at||(at={}),at.points=t),Ct(at,c),function(t,e){t.emit("plotly_selecting",e)}(k,at)}))}},n.clickFn=function(t,e){if(kt.remove(),k._fullLayout._activeShapeIndex>=0)k._fullLayout._deactivateShape(k);else if(!x){var r=A.clickmode;C.done(Mt).then((function(){if(C.clear(Mt),2===t){for(_t.remove(),J=0;J<Et.length;J++)(tt=Et[J])._module.selectPoints(tt,!1);if(K(k,Et),W(n),ft(k),Et.length){var i=Et[0].xaxis,o=Et[0].yaxis;if(i&&o){for(var s=[],c=k._fullLayout.selections,u=0;u<c.length;u++){var h=c[u];h&&(h.xref===i._id&&h.yref===o._id||s.push(h))}s.length<c.length&&(k._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",k,{selections:s}))}}}else r.indexOf("select")>-1&&V(e,k,n.xaxes,n.yaxes,n.subplot,n,_t),"event"===r&&ht(k,void 0);l.click(k,e,I.id)})).catch(M.error)}},n.doneFn=function(){kt.remove(),C.done(Mt).then((function(){C.clear(Mt),!S&&$&&n.selectionDefs&&($.subtract=xt,n.selectionDefs.push($),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Y)),(S||x)&&W(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),_&&ht(k,at)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:W,selectOnClick:V}},43144:function(t,e,r){"use strict";var n=r(50222),i=r(80337),a=r(36640).line,o=r(94850).T,s=r(93049).extendFlat,l=r(78032).templatedArray,c=(r(35081),r(9829)),u=r(3208).LF,h=r(41235);t.exports=l("shape",{visible:s({},c.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:s({},c.legend,{editType:"calc+arraydraw"}),legendgroup:s({},c.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:s({},c.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:s({},c.legendrank,{editType:"calc+arraydraw"}),legendwidth:s({},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:s({},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:s({},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:s({},a.color,{editType:"arraydraw"}),width:s({},a.width,{editType:"calc+arraydraw"}),dash:s({},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(h)}),font:i({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"})},44959:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(2956),o=r(49728);function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if("pixel"===e){var h=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],f=n.aggNums(Math.max,null,h),p=n.aggNums(Math.min,null,h),d=p<0?Math.abs(p)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?d:m,ppadminus:u?m:d}}return{ppad:c}}function u(t,e,r){var n,i,s="x"===t._id.charAt(0)?"x":"y",l="category"===t.type||"multicategory"===t.type,c=0,u=0,h=l?t.r2c:t.d2c;if("scaled"===e[s+"sizemode"]?(n=e[s+"0"],i=e[s+"1"],l&&(c=e[s+"0shift"],u=e[s+"1shift"])):(n=e[s+"anchor"],i=e[s+"anchor"]),void 0!==n)return[h(n)+c,h(i)+u];if(e.path){var f,p,d,m,g=1/0,y=-1/0,v=e.path.match(a.segmentRE);for("date"===t.type&&(h=o.decodeDate(h)),f=0;f<v.length;f++)void 0!==(p=r[v[f].charAt(0)].drawn)&&(!(d=v[f].substr(1).match(a.paramRE))||d.length<p||((m=h(d[p]))<g&&(g=m),m>y&&(y=m)));return y>=g?[g,y]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o<r.length;o++){var c,h,f=r[o];f._extremes={};var p=i.getRefType(f.xref),d=i.getRefType(f.yref);"paper"!==f.xref&&"domain"!==p&&(h=u(c=i.getFromId(t,f.xref),f,a.paramIsX))&&(f._extremes[c._id]=i.findExtremes(c,h,s(f))),"paper"!==f.yref&&"domain"!==d&&(h=u(c=i.getFromId(t,f.yref),f,a.paramIsY))&&(f._extremes[c._id]=i.findExtremes(c,h,l(f)))}}},2956:function(t){"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},74367:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(59008),o=r(43144),s=r(49728);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(e._isShape=!0,a("visible")){a("showlegend")&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),n.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),c=a("type",l?"path":"rect"),u="path"!==c;u&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule"),a("line.width")&&(a("line.color"),a("line.dash"));for(var h=a("xsizemode"),f=a("ysizemode"),p=["x","y"],d=0;d<2;d++){var m,g,y,v=p[d],x=v+"anchor",_="x"===v?h:f,b={_fullLayout:r},w=i.coerceRef(t,e,b,v,void 0,"paper");if("range"===i.getRefType(w)?((m=i.getFromId(b,w))._shapeIndices.push(e._index),y=s.rangeToShapePosition(m),g=s.shapePositionToRange(m),"category"!==m.type&&"multicategory"!==m.type||(a(v+"0shift"),a(v+"1shift"))):g=y=n.identity,u){var T=v+"0",k=v+"1",A=t[T],M=t[k];t[T]=g(t[T],!0),t[k]=g(t[k],!0),"pixel"===_?(a(T,0),a(k,10)):(i.coercePosition(e,b,a,w,T,.25),i.coercePosition(e,b,a,w,k,.75)),e[T]=y(e[T]),e[k]=y(e[k]),t[T]=A,t[k]=M}if("pixel"===_){var S=t[x];t[x]=g(t[x],!0),i.coercePosition(e,b,a,w,x,.25),e[x]=y(e[x]),t[x]=S}}u&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var E,C,L="line"===c;if(u&&(E=a("label.texttemplate")),E||(C=a("label.text")),C||E){a("label.textangle");var I=a("label.textposition",L?"middle":"middle center");a("label.xanchor"),a("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(L,I)),a("label.padding"),n.coerceFont(a,"label.font",r.font)}}}t.exports=function(t,e){a(t,e,{name:"shapes",handleItemDefaults:l})}},44433:function(t,e,r){"use strict";var n=r(34809),i=r(29714),a=r(30635),o=r(62203),s=r(81055).readPaths,l=r(49728),c=l.getPathString,u=r(41235),h=r(4530).FROM_TL;t.exports=function(t,e,r,f){if(f.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var p;if(r.label.texttemplate){var d={};if("path"!==r.type){var m=i.getFromId(t,r.xref),g=i.getFromId(t,r.yref);for(var y in u){var v=u[y](r,m,g);void 0!==v&&(d[y]=v)}}p=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,d)}else p=r.label.text;var x,_,b,w,T={"data-index":e},k=r.label.font,A=f.append("g").attr(T).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(p);if(r.path){var M=c(t,r),S=s(M,t);x=1/0,b=1/0,_=-1/0,w=-1/0;for(var E=0;E<S.length;E++)for(var C=0;C<S[E].length;C++)for(var L=S[E][C],I=1;I<L.length;I+=2){var P=L[I],z=L[I+1];x=Math.min(x,P),_=Math.max(_,P),b=Math.min(b,z),w=Math.max(w,z)}}else{var O=i.getFromId(t,r.xref),D=r.x0shift,R=r.x1shift,F=i.getRefType(r.xref),B=i.getFromId(t,r.yref),N=r.y0shift,j=r.y1shift,U=i.getRefType(r.yref),V=function(e,r){return l.getDataToPixel(t,O,r,!1,F)(e)},q=function(e,r){return l.getDataToPixel(t,B,r,!0,U)(e)};x=V(r.x0,D),_=V(r.x1,R),b=q(r.y0,N),w=q(r.y1,j)}var H=r.label.textangle;"auto"===H&&(H="line"===r.type?function(t,e,r,n){var i,a;return a=Math.abs(r-t),i=r>=t?e-n:n-e,-180/Math.PI*Math.atan2(i,a)}(x,b,_,w):0),A.call((function(e){return e.call(o.font,k).attr({}),a.convertToTspans(e,t),e}));var G=function(t,e,r,n,i,a,o){var s,l,c,u,f=i.label.textposition,p=i.label.textangle,d=i.label.padding,m=i.type,g=Math.PI/180*a,y=Math.sin(g),v=Math.cos(g),x=i.label.xanchor,_=i.label.yanchor;if("line"===m){"start"===f?(s=t,l=e):"end"===f?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===x&&(x="start"===f?"auto"===p?r>t?"left":r<t?"right":"center":r>t?"right":r<t?"left":"center":"end"===f?"auto"===p?r>t?"right":r<t?"left":"center":r>t?"left":r<t?"right":"center":"center");var b={bottom:-1,middle:0,top:1};if("auto"===p){var w=b[_];c=-d*y*w,u=d*v*w}else c=d*{left:1,center:0,right:-1}[x],u=d*b[_];s+=c,l+=u}else c=d+3,-1!==f.indexOf("right")?(s=Math.max(t,r)-c,"auto"===x&&(x="right")):-1!==f.indexOf("left")?(s=Math.min(t,r)+c,"auto"===x&&(x="left")):(s=(t+r)/2,"auto"===x&&(x="center")),l=-1!==f.indexOf("top")?Math.min(e,n):-1!==f.indexOf("bottom")?Math.max(e,n):(e+n)/2,u=d,"bottom"===_?l-=u:"top"===_&&(l+=u);var T=h[_],k=i.label.font.size,A=o.height;return{textx:s+(A*T-k)*y,texty:l+-(A*T-k)*v,xanchor:x}}(x,b,_,w,r,H,o.bBox(A.node())),Z=G.textx,W=G.texty,Y=G.xanchor;A.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[Y],y:W,x:Z,transform:"rotate("+H+","+Z+","+W+")"}).call(a.positionText,Z,W)}}},561:function(t,e,r){"use strict";var n=r(34809).strTranslate,i=r(14751),a=r(70414),o=a.drawMode,s=a.selectMode,l=r(33626),c=r(78766),u=r(93391),h=u.i000,f=u.i090,p=u.i180,d=u.i270,m=r(78534).clearOutlineControllers,g=r(81055),y=g.pointsOnRectangle,v=g.pointsOnEllipse,x=g.writePaths,_=r(87562).newShapes,b=r(87562).createShapeObj,w=r(51817),T=r(44433);function k(t,e){var r,n,i,a=t[e][1],o=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===a&&i===o&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,a,u){u||(u=0);var g=a.gd;function A(){t(e,r,a,u++),(v(e[0])||a.hasText)&&M({redrawing:!0})}function M(t){var e={};void 0!==a.isActiveShape&&(a.isActiveShape=!1,e=_(r,a)),void 0!==a.isActiveSelection&&(a.isActiveSelection=!1,e=w(r,a),g._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",g,e)}var S,E,C,L,I,P=g._fullLayout._zoomlayer,z=a.dragmode,O=o(z),D=s(z);if((O||D)&&(g._fullLayout._outlining=!0),m(g),r.attr("d",x(e)),u||!a.isActiveShape&&!a.isActiveSelection||(I=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t[r]=[];for(var i=0;i<n.length;i++){t[r][i]=[];for(var a=0;a<n[i].length;a++)t[r][i][a]=n[i][a]}}return t}([],e),function(t){S=[];for(var r=0;r<e.length;r++){var o=e[r],s=y(o),l=!s&&v(o);S[r]=[];for(var u=o.length,m=0;m<u;m++)if("Z"!==o[m][0]&&(!l||m===h||m===f||m===p||m===d)){var x,_=s&&a.isActiveSelection;_&&(x=k(o,m));var b=o[m][1],w=o[m][2],T=t.append(_?"rect":"circle").attr("data-i",r).attr("data-j",m).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(_){var A=x[1]-b,M=x[2]-w,E=M?5:Math.max(Math.min(25,Math.abs(A)-5),5),C=A?5:Math.max(Math.min(25,Math.abs(M)-5),5);T.classed(M?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",E).attr("height",C).attr("x",b-E/2).attr("y",w-C/2).attr("transform",n(A/2,M/2))}else T.classed("cursor-grab",!0).attr("r",5).attr("cx",b).attr("cy",w);S[r][m]={element:T.node(),gd:g,prepFn:B,doneFn:j,clickFn:U},i.init(S[r][m])}}}(P.append("g").attr("class","outline-controllers")),function(){if(E=[],e.length){E[0]={element:r[0][0],gd:g,prepFn:q,doneFn:H,clickFn:G},i.init(E[0])}}()),O&&a.hasText){var R=P.select(".label-temp"),F=b(r,a,a.dragmode);T(g,"label-temp",F,R)}function B(t){C=+t.srcElement.getAttribute("data-i"),L=+t.srcElement.getAttribute("data-j"),S[C][L].moveFn=N}function N(t,r){if(e.length){var n=I[C][L][1],i=I[C][L][2],o=e[C],s=o.length;if(y(o)){var l=t,c=r;a.isActiveSelection&&(k(o,L)[1]===o[L][1]?c=0:l=0);for(var u=0;u<s;u++)if(u!==L){var h=o[u];h[1]===o[L][1]&&(h[1]=n+l),h[2]===o[L][2]&&(h[2]=i+c)}if(o[L][1]=n+l,o[L][2]=i+c,!y(o))for(var f=0;f<s;f++)for(var p=0;p<o[f].length;p++)o[f][p]=I[C][f][p]}else o[L][1]=n+t,o[L][2]=i+r;A()}}function j(){M()}function U(t,r){if(2===t){C=+r.srcElement.getAttribute("data-i"),L=+r.srcElement.getAttribute("data-j");var n=e[C];y(n)||v(n)||function(){if(e.length&&e[C]&&e[C].length){for(var t=[],r=0;r<e[C].length;r++)r!==L&&t.push(e[C][r]);t.length>1&&(2!==t.length||"Z"!==t[1][0])&&(0===L&&(t[0][0]="M"),e[C]=t,A(),M())}}()}}function V(t,r){!function(t,r){if(e.length)for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)for(var a=0;a+2<e[n][i].length;a+=2)e[n][i][a+1]=I[n][i][a+1]+t,e[n][i][a+2]=I[n][i][a+2]+r}(t,r),A()}function q(t){(C=+t.srcElement.getAttribute("data-i"))||(C=0),E[C].moveFn=V}function H(){M()}function G(t){2===t&&function(t){if(s(t._fullLayout.dragmode)){m(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var n=[],i=0;i<r.length;i++)i!==e&&n.push(r[i]);delete t._fullLayout._activeSelectionIndex;var a=t._fullLayout.selections[e];t._fullLayout._deselect={xref:a.xref,yref:a.yref},l.call("_guiRelayout",t,{selections:n})}}}(g)}}},28231:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(34809),o=r(29714),s=r(81055).readPaths,l=r(561),c=r(44433),u=r(78534).clearOutlineControllers,h=r(78766),f=r(62203),p=r(78032).arrayEditor,d=r(14751),m=r(27983),g=r(2956),y=r(49728),v=y.getPathString;function x(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i<e.shapes.length;i++)!0===e.shapes[i].visible&&w(t,i)}function _(t){return!!t._fullLayout._outlining}function b(t){return!t._context.edits.shapePosition}function w(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=y.makeShapesOptionsAndPlotinfo(t,e),u=r.options,w=r.plotinfo;function M(r){var M=v(t,u),S={"data-index":e,"fill-rule":u.fillrule,d:M},E=u.opacity,C=u.fillcolor,L=u.line.width?u.line.color:"rgba(0,0,0,0)",I=u.line.width,P=u.line.dash;I||!0!==u.editable||(I=5,P="solid");var z="Z"!==M[M.length-1],O=b(t)&&u.editable&&t._fullLayout._activeShapeIndex===e;O&&(C=z?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,E=t._fullLayout.activeshape.opacity);var D,R=r.append("g").classed("shape-group",!0).attr({"data-index":e}),F=R.append("path").attr(S).style("opacity",E).call(h.stroke,L).call(h.fill,C).call(f.dashLine,P,I);if(T(R,t,u),c(t,e,u,R),(O||t._context.edits.shapePosition)&&(D=p(t.layout,"shapes",u)),O){F.style({cursor:"move"});var B={element:F.node(),plotinfo:w,gd:t,editHelpers:D,hasText:u.label.text||u.label.texttemplate,isActiveShape:!0},N=s(M,t);l(N,F,B)}else t._context.edits.shapePosition?function(t,e,r,s,l,u){var h,p,x,b,w,A,M,S,E,C,L,I,P,z,O,D,R=10,F=10,B="pixel"===r.xsizemode,N="pixel"===r.ysizemode,j="line"===r.type,U="path"===r.type,V=u.modifyItem,q=n.select(e.node().parentNode),H=o.getFromId(t,r.xref),G=o.getRefType(r.xref),Z=o.getFromId(t,r.yref),W=o.getRefType(r.yref),Y=r.x0shift,X=r.x1shift,$=r.y0shift,J=r.y1shift,K=function(e,r){return y.getDataToPixel(t,H,r,!1,G)(e)},Q=function(e,r){return y.getDataToPixel(t,Z,r,!0,W)(e)},tt=y.getPixelToData(t,H,!1,G),et=y.getPixelToData(t,Z,!0,W),rt=j?function(){var t=10,n=Math.max(r.line.width,t),i=l.append("g").attr("data-index",s).attr("drag-helper",!0);i.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":n,"stroke-opacity":"0"});var a={"fill-opacity":"0"},o=Math.max(n/2,t);return i.append("circle").attr({"data-line-point":"start-point",cx:B?K(r.xanchor)+r.x0:K(r.x0,Y),cy:N?Q(r.yanchor)-r.y0:Q(r.y0,$),r:o}).style(a).classed("cursor-grab",!0),i.append("circle").attr({"data-line-point":"end-point",cx:B?K(r.xanchor)+r.x1:K(r.x1,X),cy:N?Q(r.yanchor)-r.y1:Q(r.y1,J),r:o}).style(a).classed("cursor-grab",!0),i}():e,nt={element:rt.node(),gd:t,prepFn:function(n){_(t)||(B&&(w=K(r.xanchor)),N&&(A=Q(r.yanchor)),"path"===r.type?O=r.path:(h=B?r.x0:K(r.x0),p=N?r.y0:Q(r.y0),x=B?r.x1:K(r.x1),b=N?r.y1:Q(r.y1)),h<x?(E=h,P="x0",C=x,z="x1"):(E=x,P="x1",C=h,z="x0"),!N&&p<b||N&&p>b?(M=p,L="y0",S=b,I="y1"):(M=b,L="y1",S=p,I="y0"),it(n),st(l,r),function(t,e,r){var n=e.xref,i=e.yref,a=o.getFromId(r,n),s=o.getFromId(r,i),l="";"paper"===n||a.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),f.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),nt.moveFn="move"===D?at:ot,nt.altKey=n.altKey)},doneFn:function(){_(t)||(m(e),lt(l),T(e,t,r),i.call("_guiRelayout",t,u.getUpdateObj()))},clickFn:function(){_(t)||lt(l)}};function it(r){if(_(t))D=null;else if(j)D="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=nt.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!U&&i>R&&a>F&&!r.shiftKey?d.getCursor(o/i,1-s/a):"move";m(e,l),D=l.split("-")[0]}}function at(n,i){if("path"===r.type){var a=function(t){return t},o=a,u=a;B?V("xanchor",r.xanchor=tt(w+n)):(o=function(t){return tt(K(t)+n)},H&&"date"===H.type&&(o=y.encodeDate(o))),N?V("yanchor",r.yanchor=et(A+i)):(u=function(t){return et(Q(t)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),V("path",r.path=k(O,o,u))}else B?V("xanchor",r.xanchor=tt(w+n)):(V("x0",r.x0=tt(h+n)),V("x1",r.x1=tt(x+n))),N?V("yanchor",r.yanchor=et(A+i)):(V("y0",r.y0=et(p+i)),V("y1",r.y1=et(b+i)));e.attr("d",v(t,r)),st(l,r),c(t,s,r,q)}function ot(n,i){if(U){var a=function(t){return t},o=a,u=a;B?V("xanchor",r.xanchor=tt(w+n)):(o=function(t){return tt(K(t)+n)},H&&"date"===H.type&&(o=y.encodeDate(o))),N?V("yanchor",r.yanchor=et(A+i)):(u=function(t){return et(Q(t)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),V("path",r.path=k(O,o,u))}else if(j){if("resize-over-start-point"===D){var f=h+n,d=N?p-i:p+i;V("x0",r.x0=B?f:tt(f)),V("y0",r.y0=N?d:et(d))}else if("resize-over-end-point"===D){var m=x+n,g=N?b-i:b+i;V("x1",r.x1=B?m:tt(m)),V("y1",r.y1=N?g:et(g))}}else{var _=function(t){return-1!==D.indexOf(t)},T=_("n"),G=_("s"),W=_("w"),Y=_("e"),X=T?M+i:M,$=G?S+i:S,J=W?E+n:E,rt=Y?C+n:C;N&&(T&&(X=M-i),G&&($=S-i)),(!N&&$-X>F||N&&X-$>F)&&(V(L,r[L]=N?X:et(X)),V(I,r[I]=N?$:et($))),rt-J>R&&(V(P,r[P]=B?J:tt(J)),V(z,r[z]=B?rt:tt(rt)))}e.attr("d",v(t,r)),st(l,r),c(t,s,r,q)}function st(t,e){(B||N)&&function(){var r="path"!==e.type,n=t.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 i=K(B?e.xanchor:a.midRange(r?[e.x0,e.x1]:y.extractPathCoords(e.path,g.paramIsX))),o=Q(N?e.yanchor:a.midRange(r?[e.y0,e.y1]:y.extractPathCoords(e.path,g.paramIsY)));if(i=y.roundPositionForSharpStrokeRendering(i,1),o=y.roundPositionForSharpStrokeRendering(o,1),B&&N){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(B){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function lt(t){t.selectAll(".visual-cue").remove()}d.init(nt),rt.node().onmousemove=it}(t,F,u,e,r,D):!0===u.editable&&F.style("pointer-events",z||h.opacity(C)*E<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(t,e){if(b(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void A(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=A,x(t)}}}(t,F)}))}u._input&&!0===u.visible&&("above"===u.layer?M(t._fullLayout._shapeUpperLayer):"paper"===u.xref||"paper"===u.yref?M(t._fullLayout._shapeLowerLayer):"between"===u.layer?M(w.shapelayerBetween):w._hadPlotinfo?M((w.mainplotinfo||w).shapelayer):M(t._fullLayout._shapeLowerLayer))}function T(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");f.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function k(t,e,r){return t.replace(g.segmentRE,(function(t){var n=0,i=t.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+t.substr(1).replace(g.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function A(t){b(t)&&t._fullLayout._activeShapeIndex>=0&&(u(t),delete t._fullLayout._activeShapeIndex,x(t))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(t){if(b(t)){u(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var n=[],a=0;a<r.length;a++)a!==e&&n.push(r[a]);return delete t._fullLayout._activeShapeIndex,i.call("_guiRelayout",t,{shapes:n})}}},drawLabel:c}},64101:function(t,e,r){"use strict";var n=r(13582).overrideAll,i=r(9829),a=r(80337),o=r(94850).T,s=r(93049).extendFlat,l=r(3208).LF,c=r(41235);t.exports=n({newshape:{visible:s({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:s({},i.legend,{}),legendgroup:s({},i.legendgroup,{}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:a({})},legendrank:s({},i.legendrank,{}),legendwidth:s({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:s({},o,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:s({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(c)}),font:a({}),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"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},93391:function(t){"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},85522:function(t,e,r){"use strict";var n=r(78766),i=r(34809);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var a=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(a)),r("newshape.line.dash")}var o="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var c=r("newshape.label.textposition",o?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(o,c)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},81055:function(t,e,r){"use strict";var n=r(26953),i=r(93391),a=i.CIRCLE_SIDES,o=i.SQRT2,s=r(49801),l=s.p2r,c=s.r2p,u=[0,3,4,5,6,1,2],h=[0,3,4,1,2];function f(t,e){return Math.abs(t-e)<=1e-6}function p(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n<e;n++)for(var i=t[n].length,a=0;a<i;a++){var o=t[n][a][0];if("Z"===o)r+="Z";else for(var s=t[n][a].length,l=0;l<s;l++){var c=l;"Q"===o||"S"===o?c=h[l]:"C"===o&&(c=u[l]),r+=t[n][a][c],l>0&&l<s-1&&(r+=",")}}return r},e.readPaths=function(t,e,r,i){var o,s,u,h=n(t),f=[],p=-1,d=0,m=0,g=function(){s=d,u=m};g();for(var y=0;y<h.length;y++){var v,x,_,b,w=[],T=h[y][0],k=T;switch(T){case"M":f[++p]=[],d=+h[y][1],m=+h[y][2],w.push([k,d,m]),g();break;case"Q":case"S":v=+h[y][1],_=+h[y][2],d=+h[y][3],m=+h[y][4],w.push([k,d,m,v,_]);break;case"C":v=+h[y][1],_=+h[y][2],x=+h[y][3],b=+h[y][4],d=+h[y][5],m=+h[y][6],w.push([k,d,m,v,_,x,b]);break;case"T":case"L":d=+h[y][1],m=+h[y][2],w.push([k,d,m]);break;case"H":k="L",d=+h[y][1],w.push([k,d,m]);break;case"V":k="L",m=+h[y][1],w.push([k,d,m]);break;case"A":k="L";var A=+h[y][1],M=+h[y][2];+h[y][4]||(A=-A,M=-M);var S=d-A,E=m;for(o=1;o<=a/2;o++){var C=2*Math.PI*o/a;w.push([k,S+A*Math.cos(C),E+M*Math.sin(C)])}break;case"Z":d===s&&m===u||(d=s,m=u,w.push([k,d,m]))}for(var L=(r||{}).domain,I=e._fullLayout._size,P=r&&"pixel"===r.xsizemode,z=r&&"pixel"===r.ysizemode,O=!1===i,D=0;D<w.length;D++){for(o=0;o+2<7;o+=2){var R=w[D][o+1],F=w[D][o+2];void 0!==R&&void 0!==F&&(d=R,m=F,r&&(r.xaxis&&r.xaxis.p2r?(O&&(R-=r.xaxis._offset),R=P?c(r.xaxis,r.xanchor)+R:l(r.xaxis,R)):(O&&(R-=I.l),L?R=L.x[0]+R/I.w:R/=I.w),r.yaxis&&r.yaxis.p2r?(O&&(F-=r.yaxis._offset),F=z?c(r.yaxis,r.yanchor)-F:l(r.yaxis,F)):(O&&(F-=I.t),F=L?L.y[1]-F/I.h:1-F/I.h)),w[D][o+1]=R,w[D][o+2]=F)}f[p].push(w[D].slice())}}return f},e.pointsOnRectangle=function(t){if(5!==t.length)return!1;for(var e=1;e<3;e++){if(!f(t[0][e]-t[1][e],t[3][e]-t[2][e]))return!1;if(!f(t[0][e]-t[3][e],t[1][e]-t[2][e]))return!1}return!(!f(t[0][1],t[1][1])&&!f(t[0][1],t[3][1])||!(p(t[0],t[1])*p(t[0],t[3])))},e.pointsOnEllipse=function(t){var e=t.length;if(e!==a+1)return!1;e=a;for(var r=0;r<e;r++){var n=(2*e-r)%e,i=(e/2+n)%e,o=(e/2+r)%e;if(!f(p(t[r],t[o]),p(t[n],t[i])))return!1}return!0},e.handleEllipse=function(t,r,n){if(!t)return[r,n];var i=e.ellipseOver({x0:r[0],y0:r[1],x1:n[0],y1:n[1]}),s=(i.x1+i.x0)/2,l=(i.y1+i.y0)/2,c=(i.x1-i.x0)/2,u=(i.y1-i.y0)/2;c||(c=u/=o),u||(u=c/=o);for(var h=[],f=0;f<a;f++){var p=2*f*Math.PI/a;h.push([s+c*Math.cos(p),l+u*Math.sin(p)])}return h},e.ellipseOver=function(t){var e=t.x0,r=t.y0,n=t.x1,i=t.y1,a=n-e,s=i-r,l=((e-=a)+n)/2,c=((r-=s)+i)/2;return{x0:l-(a*=o),y0:c-(s*=o),x1:l+a,y1:c+s}},e.fixDatesForPaths=function(t,e,r){var n="date"===e.type,i="date"===r.type;if(!n&&!i)return t;for(var a=0;a<t.length;a++)for(var o=0;o<t[a].length;o++)for(var s=0;s+2<t[a][o].length;s+=2)n&&(t[a][o][s+1]=t[a][o][s+1].replace(" ","_")),i&&(t[a][o][s+2]=t[a][o][s+2].replace(" ","_"));return t}},87562:function(t,e,r){"use strict";var n=r(70414),i=n.drawMode,a=n.openMode,o=r(93391),s=o.i000,l=o.i090,c=o.i180,u=o.i270,h=o.cos45,f=o.sin45,p=r(49801),d=p.p2r,m=p.r2p,g=r(78534).clearOutline,y=r(81055),v=y.readPaths,x=y.writePaths,_=y.ellipseOver,b=y.fixDatesForPaths;function w(t,e,r){var n,i=t[0][0],o=e.gd,p=i.getAttribute("d"),g=o._fullLayout.newshape,y=e.plotinfo,w=e.isActiveShape,T=y.xaxis,k=y.yaxis,A=!!y.domain||!y.xaxis,M=!!y.domain||!y.yaxis,S=a(r),E=v(p,o,y,w),C={editable:!0,visible:g.visible,name:g.name,showlegend:g.showlegend,legend:g.legend,legendwidth:g.legendwidth,legendgroup:g.legendgroup,legendgrouptitle:{text:g.legendgrouptitle.text,font:g.legendgrouptitle.font},legendrank:g.legendrank,label:g.label,xref:A?"paper":T._id,yref:M?"paper":k._id,layer:g.layer,opacity:g.opacity,line:{color:g.line.color,width:g.line.width,dash:g.line.dash}};if(S||(C.fillcolor=g.fillcolor,C.fillrule=g.fillrule),1===E.length&&(n=E[0]),n&&5===n.length&&"drawrect"===r)C.type="rect",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[2][1],C.y1=n[2][2];else if(n&&"drawline"===r)C.type="line",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[1][1],C.y1=n[1][2];else if(n&&"drawcircle"===r){C.type="circle";var L=n[s][1],I=n[l][1],P=n[c][1],z=n[u][1],O=n[s][2],D=n[l][2],R=n[c][2],F=n[u][2],B=y.xaxis&&("date"===y.xaxis.type||"log"===y.xaxis.type),N=y.yaxis&&("date"===y.yaxis.type||"log"===y.yaxis.type);B&&(L=m(y.xaxis,L),I=m(y.xaxis,I),P=m(y.xaxis,P),z=m(y.xaxis,z)),N&&(O=m(y.yaxis,O),D=m(y.yaxis,D),R=m(y.yaxis,R),F=m(y.yaxis,F));var j=(I+z)/2,U=(O+R)/2,V=_({x0:j,y0:U,x1:j+(z-I+P-L)/2*h,y1:U+(F-D+R-O)/2*f});B&&(V.x0=d(y.xaxis,V.x0),V.x1=d(y.xaxis,V.x1)),N&&(V.y0=d(y.yaxis,V.y0),V.y1=d(y.yaxis,V.y1)),C.x0=V.x0,C.y0=V.y0,C.x1=V.x1,C.y1=V.y1}else C.type="path",T&&k&&b(E,T,k),C.path=x(E),n=null;return C}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,a=e.dragmode,o=(r.layout||{}).shapes||[];if(!i(a)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s<o.length)switch(r._fullLayout.shapes[s].type){case"rect":a="drawrect";break;case"circle":a="drawcircle";break;case"line":a="drawline";break;case"path":var l=o[s].path||"";a="Z"===l[l.length-1]?"drawclosedpath":"drawopenpath"}}var c=w(t,e,a);g(r);for(var u=e.editHelpers,h=(u||{}).modifyItem,f=[],p=0;p<o.length;p++){var d=r._fullLayout.shapes[p];if(f[p]=d._input,void 0!==n&&p===r._fullLayout._activeShapeIndex){var m=c;switch(d.type){case"line":case"rect":case"circle":h("x0",m.x0-(d.x0shift||0)),h("x1",m.x1-(d.x1shift||0)),h("y0",m.y0-(d.y0shift||0)),h("y1",m.y1-(d.y1shift||0));break;case"path":h("path",m.path)}}}return void 0===n?(f.push(c),f):u?u.getUpdateObj():{}}},createShapeObj:w}},78534:function(t){"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},49728:function(t,e,r){"use strict";var n=r(2956),i=r(34809),a=r(29714);function o(t,e){var r=0;return(e=e||0)&&t&&("category"===t.type||"multicategory"===t.type)&&(r=(t.r2p(1)-t.r2p(0))*e),r}e.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},e.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},e.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},e.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},e.extractPathCoords=function(t,e,r){var a=[];return t.match(n.segmentRE).forEach((function(t){var o=e[t.charAt(0)].drawn;if(void 0!==o){var s=t.substr(1).match(n.paramRE);if(s&&!(s.length<o)){var l=s[o],c=r?l:i.cleanNumber(l);a.push(c)}}})),a},e.getDataToPixel=function(t,r,n,i,a){var s,l=t._fullLayout._size;if(r)if("domain"===a)s=function(t){return r._length*(i?1-t:t)+r._offset};else{var c=e.shapePositionToRange(r);s=function(t){var e=o(r,n);return r._offset+r.r2p(c(t,!0))+e},"date"===r.type&&(s=e.decodeDate(s))}else s=i?function(t){return l.t+l.h*(1-t)}:function(t){return l.l+l.w*t};return s},e.getPixelToData=function(t,r,n,i){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(t){var e=(t-r._offset)/r._length;return n?1-e:e};else{var s=e.rangeToShapePosition(r);a=function(t){return s(r.p2r(t-r._offset))}}else a=n?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(t,e){var r=1===Math.round(e%2),n=Math.round(t);return r?n+.5:n},e.makeShapesOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.shapes[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=t._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=t._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},e.makeSelectionsOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.selections[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=t._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=t._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},e.getPathString=function(t,r){var s,l,c,u,h,f,p,d,m=r.type,g=a.getRefType(r.xref),y=a.getRefType(r.yref),v=a.getFromId(t,r.xref),x=a.getFromId(t,r.yref),_=t._fullLayout._size,b=o(v,r.x0shift),w=o(v,r.x1shift),T=o(x,r.y0shift),k=o(x,r.y1shift);if(v?"domain"===g?l=function(t){return v._offset+v._length*t}:(s=e.shapePositionToRange(v),l=function(t){return v._offset+v.r2p(s(t,!0))}):l=function(t){return _.l+_.w*t},x?"domain"===y?u=function(t){return x._offset+x._length*(1-t)}:(c=e.shapePositionToRange(x),u=function(t){return x._offset+x.r2p(c(t,!0))}):u=function(t){return _.t+_.h*(1-t)},"path"===m)return v&&"date"===v.type&&(l=e.decodeDate(l)),x&&"date"===x.type&&(u=e.decodeDate(u)),function(t,e,r){var a=t.path,o=t.xsizemode,s=t.ysizemode,l=t.xanchor,c=t.yanchor;return a.replace(n.segmentRE,(function(t){var a=0,u=t.charAt(0),h=n.paramIsX[u],f=n.paramIsY[u],p=n.numParams[u],d=t.substr(1).replace(n.paramRE,(function(t){return h[a]?t="pixel"===o?e(l)+Number(t):e(t):f[a]&&(t="pixel"===s?r(c)-Number(t):r(t)),++a>p&&(t="X"),t}));return a>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),u+d}))}(r,l,u);if("pixel"===r.xsizemode){var A=l(r.xanchor);h=A+r.x0+b,f=A+r.x1+w}else h=l(r.x0)+b,f=l(r.x1)+w;if("pixel"===r.ysizemode){var M=u(r.yanchor);p=M-r.y0+T,d=M-r.y1+k}else p=u(r.y0)+T,d=u(r.y1)+k;if("line"===m)return"M"+h+","+p+"L"+f+","+d;if("rect"===m)return"M"+h+","+p+"H"+f+"V"+d+"H"+h+"Z";var S=(h+f)/2,E=(p+d)/2,C=Math.abs(S-h),L=Math.abs(E-p),I="A"+C+","+L,P=S+C+","+E;return"M"+P+I+" 0 1,1 "+S+","+(E-L)+I+" 0 0,1 "+P+"Z"}},43701:function(t,e,r){"use strict";var n=r(28231);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(43144),supplyLayoutDefaults:r(74367),supplyDrawNewShapeDefaults:r(85522),includeBasePlot:r(20706)("shapes"),calcAutorange:r(44959),draw:n.draw,drawOne:n.drawOne}},41235:function(t){"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t){return t.x0shift||0}function i(t){return t.x1shift||0}function a(t){return t.y0shift||0}function o(t){return t.y1shift||0}function s(t,r){return e(t.x1,r)+i(t)-e(t.x0,r)-n(t)}function l(t,r,n){return e(t.y1,n)+o(t)-e(t.y0,n)-a(t)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:l(t,0,r)/s(t,e)},dx:s,dy:l,width:function(t,e){return Math.abs(s(t,e))},height:function(t,e,r){return Math.abs(l(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(s(t,e),2)+Math.pow(l(t,0,r),2))},xcenter:function(t,a){return r((e(t.x1,a)+i(t)+e(t.x0,a)+n(t))/2,a)},ycenter:function(t,n,i){return r((e(t.y1,i)+o(t)+e(t.y0,i)+a(t))/2,i)}}},8606:function(t,e,r){"use strict";var n=r(80337),i=r(57891),a=r(93049).extendDeepAll,o=r(13582).overrideAll,s=r(49722),l=r(78032).templatedArray,c=r(64194),u=l("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}});t.exports=o(l("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:a(i({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:s.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")},64194:function(t){"use strict";t.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}},74537:function(t,e,r){"use strict";var n=r(34809),i=r(59008),a=r(8606),o=r(64194).name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:c}),l=0,u=0;u<s.length;u++)s[u].visible&&l++;if(l<2?e.visible=!1:o("visible")){e._stepCount=l;var h=e._visibleSteps=n.filterVisible(s);(s[o("active")]||{}).visible||(e.active=h[0]._index),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("len"),o("lenmode"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("currentvalue.visible")&&(o("currentvalue.xanchor"),o("currentvalue.prefix"),o("currentvalue.suffix"),o("currentvalue.offset"),n.coerceFont(o,"currentvalue.font",e.font)),o("transition.duration"),o("transition.easing"),o("bgcolor"),o("activebgcolor"),o("bordercolor"),o("borderwidth"),o("ticklen"),o("tickwidth"),o("tickcolor"),o("minorticklen")}}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if("skip"===t.method||Array.isArray(t.args)?r("visible"):e.visible=!1){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},44097:function(t,e,r){"use strict";var n=r(45568),i=r(44122),a=r(78766),o=r(62203),s=r(34809),l=s.strTranslate,c=r(30635),u=r(78032).arrayEditor,h=r(64194),f=r(4530),p=f.LINE_SPACING,d=f.FROM_TL,m=f.FROM_BR;function g(t){return h.autoMarginIdRoot+t._index}function y(t){return t._index}function v(t,e){var r=o.tester.selectAll("g."+h.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(h.labelGroupClass,!0);var a=0,l=0;r.each((function(t){var r=b(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);l=Math.max(l,i.height),a=Math.max(a,i.width)}})),r.remove();var u=e._dims={};u.inputAreaWidth=Math.max(h.railWidth,h.gripHeight);var f=t._fullLayout._size;u.lx=f.l+f.w*e.x,u.ly=f.t+f.h*(1-e.y),"fraction"===e.lenmode?u.outerLength=Math.round(f.w*e.len):u.outerLength=e.len,u.inputAreaStart=0,u.inputAreaLength=Math.round(u.outerLength-e.pad.l-e.pad.r);var p=(u.inputAreaLength-2*h.stepInset)/(e._stepCount-1),y=a+h.labelPadding;if(u.labelStride=Math.max(1,Math.ceil(y/p)),u.labelHeight=l,u.currentValueMaxWidth=0,u.currentValueHeight=0,u.currentValueTotalHeight=0,u.currentValueMaxLines=1,e.currentvalue.visible){var v=o.tester.append("g");r.each((function(t){var r=x(v,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=c.lineCount(r);u.currentValueMaxWidth=Math.max(u.currentValueMaxWidth,Math.ceil(n.width)),u.currentValueHeight=Math.max(u.currentValueHeight,Math.ceil(n.height)),u.currentValueMaxLines=Math.max(u.currentValueMaxLines,i)})),u.currentValueTotalHeight=u.currentValueHeight+e.currentvalue.offset,v.remove()}u.height=u.currentValueTotalHeight+h.tickOffset+e.ticklen+h.labelOffset+u.labelHeight+e.pad.t+e.pad.b;var _="left";s.isRightAnchor(e)&&(u.lx-=u.outerLength,_="right"),s.isCenterAnchor(e)&&(u.lx-=u.outerLength/2,_="center");var w="top";s.isBottomAnchor(e)&&(u.ly-=u.height,w="bottom"),s.isMiddleAnchor(e)&&(u.ly-=u.height/2,w="middle"),u.outerLength=Math.ceil(u.outerLength),u.height=Math.ceil(u.height),u.lx=Math.round(u.lx),u.ly=Math.round(u.ly);var T={y:e.y,b:u.height*m[w],t:u.height*d[w]};"fraction"===e.lenmode?(T.l=0,T.xl=e.x-e.len*d[_],T.r=0,T.xr=e.x+e.len*m[_]):(T.x=e.x,T.l=u.outerLength*d[_],T.r=u.outerLength*m[_]),i.autoMargin(t,g(e),T)}function x(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case"right":n=a.inputAreaLength-h.currentValueInset-a.currentValueMaxWidth,i="left";break;case"center":n=.5*a.inputAreaLength,i="middle";break;default:n=h.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),u=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)u+=r;else{var f=e.steps[e.active].label,d=e._gd._fullLayout._meta;d&&(f=s.templateString(f,d)),u+=f}e.currentvalue.suffix&&(u+=e.currentvalue.suffix),l.call(o.font,e.currentvalue.font).text(u).call(c.convertToTspans,e._gd);var m=c.lineCount(l),g=(a.currentValueMaxLines+1-m)*e.currentvalue.font.size*p;return c.positionText(l,n,g),l}}function _(t,e,r){s.ensureSingle(t,"rect",h.gripRectClass,(function(n){n.call(A,e,t,r).style("pointer-events","all")})).attr({width:h.gripWidth,height:h.gripHeight,rx:h.gripRadius,ry:h.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function b(t,e,r){var n=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,a=r._gd._fullLayout._meta;return a&&(i=s.templateString(i,a)),n.call(o.font,r.font).text(i).call(c.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,"g",h.labelsClass),i=e._dims,a=r.selectAll("g."+h.labelGroupClass).data(i.labelSteps);a.enter().append("g").classed(h.labelGroupClass,!0),a.exit().remove(),a.each((function(t){var r=n.select(this);r.call(b,t,e),o.setTranslate(r,E(e,t.fraction),h.tickOffset+e.ticklen+e.font.size*p+h.labelOffset+i.currentValueTotalHeight)}))}function T(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&k(t,e,r,o,!0,i)}function k(t,e,r,n,a,o){var s=r.active;r.active=n,u(t.layout,h.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,o),e.call(x,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function A(t,e,r){if(!e._context.staticPlot){var i=r.node(),o=n.select(e);t.on("mousedown",l),t.on("touchstart",l)}function s(){return r.data()[0]}function l(){var t=s();e.emit("plotly_sliderstart",{slider:t});var l=r.select("."+h.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(a.fill,t.activebgcolor);var c=C(t,n.mouse(i)[0]);function u(){var t=s(),a=C(t,n.mouse(i)[0]);T(e,r,t,a,!1)}function f(){var t=s();t._dragging=!1,l.call(a.fill,t.bgcolor),o.on("mouseup",null),o.on("mousemove",null),o.on("touchend",null),o.on("touchmove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})}T(e,r,t,c,!0),t._dragging=!0,o.on("mousemove",u),o.on("touchmove",u),o.on("mouseup",f),o.on("touchend",f)}}function M(t,e){var r=t.selectAll("rect."+h.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append("rect").classed(h.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(a.fill,e.tickcolor),o.setTranslate(l,E(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?h.tickOffset:h.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+h.gripRectClass),i=0,a=0;a<e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=E(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*h.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+h.stepInset+(r.inputAreaLength-2*h.stepInset)*Math.min(1,Math.max(0,e))}function C(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-h.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*h.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",h.railTouchRectClass,(function(n){n.call(A,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,h.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function I(t,e){var r=e._dims,n=r.inputAreaLength-2*h.railInset,i=s.ensureSingle(t,"rect",h.railRectClass);i.attr({width:n,height:h.railWidth,rx:h.railRadius,ry:h.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,h.railInset,.5*(r.inputAreaWidth-h.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,a=function(t,e){for(var r=t[h.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(r,t),s=r._infolayer.selectAll("g."+h.containerClassName).data(a.length>0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(h.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+h.groupClassName).each(l)})).remove(),0!==a.length){var c=s.selectAll("g."+h.groupClassName).data(a,y);c.enter().append("g").classed(h.groupClassName,!0),c.exit().each(l).remove();for(var u=0;u<a.length;u++){var f=a[u];v(t,f)}c.each((function(e){var r=n.select(this);!function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n<r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})}(e),i.manageCommandObserver(t,e,e._visibleSteps,(function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||k(t,r,n,e.index,!1,!0))})),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(x,r).call(I,r).call(w,r).call(M,r).call(L,t,r).call(_,t,r);var n=r._dims;o.setTranslate(e,n.lx+r.pad.l,n.ly+r.pad.t),e.call(S,r,!1),e.call(x,r)}(t,n.select(this),e)}))}}},15359:function(t,e,r){"use strict";var n=r(64194);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(8606),supplyLayoutDefaults:r(74537),draw:r(44097)}},17240:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=r(44122),o=r(33626),s=r(34809),l=s.strTranslate,c=r(62203),u=r(78766),h=r(30635),f=r(20438),p=r(4530).OPPOSITE_SIDE,d=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var m,g=t._fullLayout,y=r.propContainer,v=r.propName,x=r.placeholder,_=r.traceIndex,b=r.avoid||{},w=r.attributes,T=r.transform,k=r.containerGroup,A=1,M=y.title,S=(M&&M.text?M.text:"").trim(),E=!1,C=M&&M.font?M.font:{},L=C.family,I=C.size,P=C.color,z=C.weight,O=C.style,D=C.variant,R=C.textcase,F=C.lineposition,B=C.shadow,N=!!r.subtitlePropName,j=r.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=U.text.trim(),q=!1,H=1,G=U.font,Z=G.family,W=G.size,Y=G.color,X=G.weight,$=G.style,J=G.variant,K=G.textcase,Q=G.lineposition,tt=G.shadow;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":v.indexOf(!0)&&(m="colorbarTitleText");var et=t._context.edits[m];function rt(t,e){return void 0!==t&&void 0!==e&&t.replace(d," % ")===e.replace(d," % ")}""===S?A=0:rt(S,x)&&(et||(S=""),A=.2,E=!0),N&&(""===V?H=0:rt(V,j)&&(et||(V=""),H=.2,q=!0)),r._meta?S=s.templateString(S,r._meta):g._meta&&(S=s.templateString(S,g._meta));var nt,it=S||V||et;k||(k=s.ensureSingle(g._infolayer,"g","g-"+e),nt=g._hColorbarMoveTitle);var at=k.selectAll("text."+e).data(it?[0]:[]);at.enter().append("text"),at.text(S).attr("class",e),at.exit().remove();var ot=null,st=e+"-subtitle",lt=V||et;if(N&&lt&&((ot=k.selectAll("text."+st).data(lt?[0]:[])).enter().append("text"),ot.text(V).attr("class",st),ot.exit().remove()),!it)return k;function ct(t,e){s.syncOrAsync([ut,ht],{title:t,subtitle:e})}function ut(r){var i,o=r.title,f=r.subtitle;if(!T&&nt&&(T={}),T?(i="",T.rotate&&(i+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||nt)&&(i+=l(0,(T.offset||0)-(nt||0)))):i=null,o.attr("transform",i),o.style("opacity",A*u.opacity(P)).call(c.font,{color:u.rgb(P),size:n.round(I,2),family:L,weight:z,style:O,variant:D,textcase:R,shadow:B,lineposition:F}).attr(w).call(h.convertToTspans,t,(function(t){if(t){var e=n.select(t.node().parentNode).select("."+st);if(!e.empty()){var r=t.node().getBBox();if(r.height){var i=r.y+r.height+1.6*W;e.attr("y",i)}}}})),f){var p=k.select("."+e+"-math-group"),d=o.node().getBBox(),m=p.node()?p.node().getBBox():void 0,g=m?m.y+m.height+1.6*W:d.y+d.height+1.6*W,y=s.extendFlat({},w,{y:g});f.attr("transform",i),f.style("opacity",H*u.opacity(Y)).call(c.font,{color:u.rgb(Y),size:n.round(W,2),family:Z,weight:X,style:$,variant:J,textcase:K,shadow:tt,lineposition:Q}).attr(y).call(h.convertToTspans,t)}return a.previousPromises(t)}function ht(e){var r=e.title,a=n.select(r.node().parentNode);if(b&&b.selection&&b.side&&S){a.attr("transform",null);var o=p[b.side],u="left"===b.side||"top"===b.side?-1:1,h=i(b.pad)?b.pad:2,f=c.bBox(a.node()),d={t:0,b:0,l:0,r:0},m=t._fullLayout._reservedMargin;for(var v in m)for(var x in m[v]){var _=m[v][x];d[x]=Math.max(d[x],_)}var w={left:d.l,top:d.t,right:g.width-d.r,bottom:g.height-d.b},T=b.maxShift||u*(w[b.side]-f[b.side]),k=0;if(T<0)k=T;else{var A=b.offsetLeft||0,M=b.offsetTop||0;f.left-=A,f.right-=A,f.top-=M,f.bottom-=M,b.selection.each((function(){var t=c.bBox(this);s.bBoxIntersect(f,t,h)&&(k=Math.max(k,u*(t[b.side]-f[o])+h))})),k=Math.min(T,k),y._titleScoot=Math.abs(k)}if(k>0||T<0){var E={left:[-k,0],right:[k,0],top:[0,-k],bottom:[0,k]}[b.side];a.attr("transform",l(E[0],E[1]))}}}function ft(t,e){t.text(e).on("mouseover.opacity",(function(){n.select(this).transition().duration(f.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(f.HIDE_PLACEHOLDER).style("opacity",0)}))}if(at.call(ct,ot),et&&(S?at.on(".opacity",null):(ft(at,x),E=!0),at.call(h.makeEditable,{gd:t}).on("edit",(function(e){void 0!==_?o.call("_guiRestyle",t,v,e,_):o.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(h.positionText,w.x,w.y)})),N)){if(N&&!S){var pt=at.node().getBBox(),dt=pt.y+pt.height+1.6*W;ot.attr("y",dt)}V?ot.on(".opacity",null):(ft(ot,j),q=!0),ot.call(h.makeEditable,{gd:t}).on("edit",(function(e){o.call("_guiRelayout",t,"title.subtitle.text",e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ct)})).on("input",(function(t){this.text(t||" ").call(h.positionText,ot.attr("x"),ot.attr("y"))}))}return at.classed("js-placeholder",E),ot&&ot.classed("js-placeholder",q),k},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}},85389:function(t,e,r){"use strict";var n=r(80337),i=r(10229),a=r(93049).extendFlat,o=r(13582).overrideAll,s=r(57891),l=r(78032).templatedArray,c=l("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}});t.exports=o(l("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:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},71559:function(t){"use strict";t.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:"▼"}}},42746:function(t,e,r){"use strict";var n=r(34809),i=r(59008),a=r(85389),o=r(71559).name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["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(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},40974:function(t,e,r){"use strict";var n=r(45568),i=r(44122),a=r(78766),o=r(62203),s=r(34809),l=r(30635),c=r(78032).arrayEditor,u=r(4530).LINE_SPACING,h=r(71559),f=r(21736);function p(t){return t._index}function d(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function m(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,h.name,e).applyUpdate("active",o),"buttons"===e.type?y(t,n,null,null,e):"dropdown"===e.type&&(i.attr(h.menuIndexAttrName,"-1"),g(t,n,i,a,e),s||y(t,n,i,a,e))}function g(t,e,r,n,i){var a=s.ensureSingle(e,"g",h.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||h.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(v,i,u,t).call(M,i,f,p),s.ensureSingle(e,"text",h.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(o.font,i.font).text(h.arrowSymbol[i.direction])})).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),a.on("click",(function(){r.call(S,String(d(r,i)?-1:i._index)),y(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?h.dropdownButtonClassName:h.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),f=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,g=0,y=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=y.headerHeight+h.gapButtonHeader:d=y.headerWidth+h.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-h.gapButtonHeader+h.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-y.openWidth);var _={x:y.lx+d+o.pad.l,y:y.ly+g+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},k={l:_.x+o.borderwidth,t:_.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(v,o,s,t).call(M,o,_),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(m(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(m(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,o),u.call(b,o)}))})),u.call(b,o),x?(k.w=Math.max(y.openWidth,y.headerWidth),k.h=_.y-k.t):(k.w=_.x-k.l,k.h=Math.max(y.openHeight,y.headerHeight)),k.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u="up"===c||"down"===c,f=i._dims,p=i.active;if(u)for(s=0,l=0;l<p;l++)s+=f.heights[l]+h.gapButton;else for(o=0,l=0;l<p;l++)o+=f.widths[l]+h.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,a,o,k):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",(function(){e=!1,r||t.disable()})),r&&t.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,e||t.disable()}))}(a))}function v(t,e,r,n){t.call(x,e).call(_,e,r,n)}function x(t,e){s.ensureSingle(t,"rect",h.itemRectClassName,(function(t){t.attr({rx:h.rx,ry:h.ry,"shape-rendering":"crispEdges"})})).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function _(t,e,r,n){var i=s.ensureSingle(t,"text",h.itemTextClassName,(function(t){t.attr({"text-anchor":"start","data-notex":1})})),a=r.label,c=n._fullLayout._meta;c&&(a=s.templateString(a,c)),i.call(o.font,e.font).text(a).call(l.convertToTspans,n)}function b(t,e){var r=e.active;t.each((function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select("rect."+h.itemRectClassName).call(a.fill,h.activeColor)}))}function w(t){t.select("rect."+h.itemRectClassName).call(a.fill,h.hoverColor)}function T(t,e){t.select("rect."+h.itemRectClassName).call(a.fill,e.bgcolor)}function k(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll("g."+h.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append("g").classed(h.dropdownButtonClassName,!0);var c=-1!==["up","down"].indexOf(e.direction);a.each((function(i,a){var s=n.select(this);s.call(v,e,i,t);var f=s.select("."+h.itemTextClassName),p=f.node()&&o.bBox(f.node()).width,d=Math.max(p+h.textPadX,h.minWidth),m=e.font.size*u,g=l.lineCount(f),y=Math.max(m*g,h.minHeight)+h.textOffsetY;y=Math.ceil(y),d=Math.ceil(d),r.widths[a]=d,r.heights[a]=y,r.height1=Math.max(r.height1,y),r.width1=Math.max(r.width1,d),c?(r.totalWidth=Math.max(r.totalWidth,d),r.openWidth=r.totalWidth,r.totalHeight+=y+h.gapButton,r.openHeight+=y+h.gapButton):(r.totalWidth+=d+h.gapButton,r.openWidth+=d+h.gapButton,r.totalHeight=Math.max(r.totalHeight,y),r.openHeight=r.totalHeight)})),c?r.totalHeight-=h.gapButton:r.totalWidth-=h.gapButton,r.headerWidth=r.width1+h.arrowPadX,r.headerHeight=r.height1,"dropdown"===e.type&&(c?(r.width1+=h.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=h.arrowPadX),a.remove();var f=r.totalWidth+e.pad.l+e.pad.r,p=r.totalHeight+e.pad.t+e.pad.b,d=t._fullLayout._size;r.lx=d.l+d.w*e.x,r.ly=d.t+d.h*(1-e.y);var m="left";s.isRightAnchor(e)&&(r.lx-=f,m="right"),s.isCenterAnchor(e)&&(r.lx-=f/2,m="center");var g="top";s.isBottomAnchor(e)&&(r.ly-=p,g="bottom"),s.isMiddleAnchor(e)&&(r.ly-=p/2,g="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),i.autoMargin(t,A(e),{x:e.x,y:e.y,l:f*({right:1,center:.5}[m]||0),r:f*({left:1,center:.5}[m]||0),b:p*({top:1,middle:.5}[g]||0),t:p*({bottom:1,middle:.5}[g]||0)})}function A(t){return h.autoMarginIdRoot+t._index}function M(t,e,r,n){n=n||{};var i=t.select("."+h.itemRectClassName),a=t.select("."+h.itemTextClassName),s=e.borderwidth,c=r.index,f=e._dims;o.setTranslate(t,s+r.x,s+r.y);var p=-1!==["up","down"].indexOf(e.direction),d=n.height||(p?f.heights[c]:f.height1);i.attr({x:0,y:0,width:n.width||(p?f.width1:f.widths[c]),height:d});var m=e.font.size*u,g=(l.lineCount(a)-1)*m/2;l.positionText(a,h.textOffsetX,d/2-g+h.textOffsetY),p?r.y+=f.heights[c]+r.yPad:r.x+=f.widths[c]+r.xPad,r.index++}function S(t,e){t.attr(h.menuIndexAttrName,e||"-1").selectAll("g."+h.dropdownButtonClassName).remove()}t.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[h.name]);function a(e){i.autoMargin(t,A(e))}var o=e._menulayer.selectAll("g."+h.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+h.headerGroupClassName).data(r,p);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",h.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;u<r.length;u++){var v=r[u];k(t,v)}var x="updatemenus"+e._uid,_=new f(t,c,x);l.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(S)),l.exit().each((function(t){c.call(S),a(t)})).remove(),l.each((function(e){var r=n.select(this),a="dropdown"===e.type?c:null;i.manageCommandObserver(t,e,e.buttons,(function(n){m(t,e,e.buttons[n.index],r,a,_,n.index,!0)})),"dropdown"===e.type?(g(t,r,c,_,e),d(c,e)&&y(t,r,c,_,e)):y(t,r,null,null,e)}))}}},46230:function(t,e,r){"use strict";var n=r(71559);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(85389),supplyLayoutDefaults:r(42746),draw:r(40974)}},21736:function(t,e,r){"use strict";t.exports=s;var n=r(45568),i=r(78766),a=r(62203),o=r(34809);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,c=o.height;this.position=t;var u,h,f,p,d=this.position.l,m=this.position.w,g=this.position.t,y=this.position.h,v=this.position.direction,x="down"===v,_="left"===v,b="up"===v,w=m,T=y;x||_||"right"===v||b||(this.position.direction="down",x=!0),x||b?(h=(u=d)+w,x?(f=g,T=(p=Math.min(f+T,c))-f):T=(p=g+T)-(f=Math.max(p-T,0))):(p=(f=g)+T,_?w=(h=d+w)-(u=Math.max(h-w,0)):(u=d,w=(h=Math.min(u+w,l))-u)),this._box={l:u,t:f,w:w,h:T};var k=m>w,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=g+y;E+M>c&&(E=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=y>T,I=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,z=d+m,O=g;z+I>l&&(z=l-I);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:z,y:O,width:I,height:P}),this._vbarYMin=O+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?h+I+.5:h+.5,N=f-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(k||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),k||L?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||L){var V=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(V);var q=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.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)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},4530:function(t){"use strict";t.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"}}},35081:function(t){"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},20909:function(t){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},87296:function(t){"use strict";t.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"}},20726:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},84770:function(t){"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},49467:function(t){"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},20438:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},63821:function(t){"use strict";t.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:"−"}},1837:function(t,e){"use strict";e.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],e.STYLE=e.CSS_DECLARATIONS.map((function(t){return t.join(": ")+"; "})).join("")},62972:function(t,e){"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},17430:function(t,e,r){"use strict";e.version=r(29697).version,r(71116),r(6713);for(var n=r(33626),i=e.register=n.register,a=r(90742),o=Object.keys(a),s=0;s<o.length;s++){var l=o[s];"_"!==l.charAt(0)&&(e[l]=a[l]),i({moduleType:"apiMethod",name:l,fn:a[l]})}i(r(69693)),i([r(3599),r(83348),r(44844),r(43701),r(15553),r(46230),r(15359),r(55429),r(44453),r(83595),r(77901),r(88856),r(96919),r(82494),r(32141),r(95433)]),i([r(30227),r(44611)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),e.Icons=r(35188);var c=r(32141),u=r(44122);e.Plots={resize:u.resize,graphJson:u.graphJson,sendDataToCloud:u.sendDataToCloud},e.Fx={hover:c.hover,unhover:c.unhover,loneHover:c.loneHover,loneUnhover:c.loneUnhover},e.Snapshot=r(6170),e.PlotSchema=r(57297)},35188:function(t){"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},32546:function(t,e){"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},44313:function(t,e,r){"use strict";var n=r(98953),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function h(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,h,f,p,d,m=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}m?(u=0,h=o,f=s):r<n?(u=r,f=n):(u=n,f=r),t<e?(p=t,d=e):(p=e,d=t);var y,v=Math.abs(f-u)<=o?0:1;function x(t,e,r){return"A"+[t,t]+" "+[0,v,r]+" "+g(t,e)}return m?y=null===p?"M"+g(d,u)+x(d,h,0)+x(d,f,0)+"Z":"M"+g(p,u)+x(p,h,0)+x(p,f,0)+"ZM"+g(d,u)+x(d,h,1)+x(d,f,1)+"Z":null===p?(y="M"+g(d,u)+x(d,f,0),c&&(y+="L0,0Z")):y="M"+g(p,u)+"L"+g(d,u)+x(d,f,0)+"L"+g(p,f)+x(p,u,1)+"Z",y}t.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:c,angleDist:function(t,e){return Math.abs(c(t,e))},isFullCircle:l,isAngleInsideSector:u,isPtInsideSector:function(t,e,r,n){return!!u(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return h(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return h(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return h(t,e,r,n,i,a,1)}}},87800:function(t,e,r){"use strict";var n=r(93229).decode,i=r(56174),a=Array.isArray,o=ArrayBuffer,s=DataView;function l(t){return o.isView(t)&&!(t instanceof s)}function c(t){return a(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=c,e.isArray1D=function(t){return!c(t[0])},e.ensureArray=function(t,e){return a(t)||(t=[]),t.length=e,t};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 h(t){return t.constructor===ArrayBuffer}function f(t,e,r){if(c(t)){if(c(t[0])){for(var n=r,i=0;i<t.length;i++)n=e(n,t[i].length);return n}return t.length}return 0}u.uint8c=u.u1c,u.uint8=u.u1,u.int8=u.i1,u.uint16=u.u2,u.int16=u.i2,u.uint32=u.u4,u.int32=u.i4,u.float32=u.f4,u.float64=u.f8,e.isArrayBuffer=h,e.decodeTypedArraySpec=function(t){var e=[],r=function(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}(t),i=r.dtype,a=u[i];if(!a)throw new Error('Error in dtype: "'+i+'"');var o=a.BYTES_PER_ELEMENT,s=r.bdata;h(s)||(s=n(s));var l=void 0===r.shape?[s.byteLength/o]:(""+r.shape).split(",");l.reverse();var c,f,p=l.length,d=+l[0],m=o*d,g=0;if(1===p)e=new a(s);else if(2===p)for(c=+l[1],f=0;f<c;f++)e[f]=new a(s,g,d),g+=m;else{if(3!==p)throw new Error("ndim: "+p+'is not supported with the shape:"'+r.shape+'"');c=+l[1];for(var y=+l[2],v=0;v<y;v++)for(e[v]=[],f=0;f<c;f++)e[v][f]=new a(s,g,d),g+=m}return e.bdata=r.bdata,e.dtype=r.dtype,e.shape=l.reverse().join(","),t._inputArray=e,e},e.isTypedArraySpec=function(t){return i(t)&&t.hasOwnProperty("dtype")&&"string"==typeof t.dtype&&t.hasOwnProperty("bdata")&&("string"==typeof t.bdata||h(t.bdata))&&(void 0===t.shape||t.hasOwnProperty("shape")&&("string"==typeof t.shape||"number"==typeof t.shape))},e.concat=function(){var t,e,r,n,i,o,s,l,c=[],u=!0,h=0;for(r=0;r<arguments.length;r++)(o=(n=arguments[r]).length)&&(e?c.push(n):(e=n,i=o),a(n)?t=!1:(u=!1,h?t!==n.constructor&&(t=!1):t=n.constructor),h+=o);if(!h)return[];if(!c.length)return e;if(u)return e.concat.apply(e,c);if(t){for((s=new t(h)).set(e),r=0;r<c.length;r++)n=c[r],s.set(n,i),i+=n.length;return s}for(s=new Array(h),l=0;l<e.length;l++)s[l]=e[l];for(r=0;r<c.length;r++){for(n=c[r],l=0;l<n.length;l++)s[i+l]=n[l];i+=l}return s},e.maxRowLength=function(t){return f(t,Math.max,0)},e.minRowLength=function(t){return f(t,Math.min,1/0)}},44498:function(t,e,r){"use strict";var n=r(10721),i=r(63821).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(a,"")),n(t)?Number(t):i}},34823:function(t){"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},23493:function(t){"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},34220:function(t,e,r){"use strict";var n=r(10721),i=r(65657),a=r(93049).extendFlat,o=r(9829),s=r(19017),l=r(78766),c=r(20438).DESELECTDIM,u=r(35632),h=r(90694).counter,f=r(98953).modHalf,p=r(87800).isArrayOrTypedArray,d=r(87800).isTypedArraySpec,m=r(87800).decodeTypedArraySpec;function g(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&p(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,r),a!==i}e.valObjectMeta={data_array:{coerceFunction:function(t,e,r){e.set(p(t)?t:d(t)?m(t):r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if("/"===i.charAt(0)&&"/"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){d(t)&&(t=m(t)),!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){-1===(i.extras||[]).indexOf(t)?(d(t)&&(t=m(t)),t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)):e.set(t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){d(t)&&(t=m(t)),i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(s.get(t,r))}},angle:{coerceFunction:function(t,e,r){d(t)&&(t=m(t)),"auto"===t?e.set("auto"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||h(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!h(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join("+")):e.set(r)}else e.set(r);else e.set(t)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(d(t)?m(t):t)}},info_array:{coerceFunction:function(t,r,n,i){function a(t,r,n){var i,a={set:function(t){i=t}};return void 0===n&&(n=r.dflt),e.valObjectMeta[r.valType].coerceFunction(t,a,n,r),i}if(d(t)&&(t=m(t)),p(t)){var o,s,l,c,u,h,f=2===i.dimensions||"1-2"===i.dimensions&&Array.isArray(t)&&p(t[0]),g=i.items,y=[],v=Array.isArray(g),x=v&&f&&p(g[0]),_=f&&v&&!x,b=v&&!_?g.length:t.length;if(n=Array.isArray(n)?n:[],f)for(o=0;o<b;o++)for(y[o]=[],l=p(t[o])?t[o]:[],u=_?g.length:v?g[o].length:l.length,s=0;s<u;s++)c=_?g[s]:v?g[o][s]:g,void 0!==(h=a(l[s],c,(n[o]||[])[s]))&&(y[o][s]=h);else for(o=0;o<b;o++)void 0!==(h=a(t[o],v?g[o]:g,n[o]))&&(y[o]=h);r.set(y)}else r.set(n)},validateFunction:function(t,e){if(!p(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&&t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(i){if(!p(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!g(t[a][o],n?r[a][o]:r))return!1}else if(!g(t[a],n?r[a]:r))return!1;return!0}}},e.coerce=function(t,r,n,i,a){var o=u(n,i).get(),s=u(t,i),l=u(r,i),c=s.get(),h=r._template;if(void 0===c&&h&&(c=u(h,i).get(),h=0),void 0===a&&(a=o.dflt),o.arrayOk){if(p(c))return l.set(c),c;if(d(c))return c=m(c),l.set(c),c}var f=e.valObjectMeta[o.valType].coerceFunction;f(c,l,a,o);var y=l.get();return h&&y===a&&!g(c,o)&&(f(c=u(h,i).get(),l,a,o),y=l.get()),y},e.coerce2=function(t,r,n,i,a){var o=u(t,i),s=e.coerce(t,r,n,i,a);return null!=o.get()&&s},e.coerceFont=function(t,e,r,n){n||(n={}),r=a({},r);var i={family:t(e+".family",(r=a(r,n.overrideDflt||{})).family),size:t(e+".size",r.size),color:t(e+".color",r.color),weight:t(e+".weight",r.weight),style:t(e+".style",r.style)};if(n.noFontVariant||(i.variant=t(e+".variant",r.variant)),n.noFontLineposition||(i.lineposition=t(e+".lineposition",r.lineposition)),n.noFontTextcase||(i.textcase=t(e+".textcase",r.textcase)),!n.noFontShadow){var o=r.shadow;"none"===o&&n.autoShadowDflt&&(o="auto"),i.shadow=t(e+".shadow",o)}return i},e.coercePattern=function(t,e,r,n){if(t(e+".shape")){t(e+".solidity"),t(e+".size");var i="overlay"===t(e+".fillmode");if(!n){var a=t(e+".bgcolor",i?r:void 0);t(e+".fgcolor",i?l.contrast(a):r)}t(e+".fgopacity",i?.5:1)}},e.coerceHoverinfo=function(t,r,n){var i,a=r._module.attributes,s=a.hoverinfo?a:o,l=s.hoverinfo;if(1===n._dataLength){var c="all"===l.dflt?l.flags.slice():l.dflt.split("+");c.splice(c.indexOf("name"),1),i=c.join("+")}return e.coerce(t,r,s,"hoverinfo",i)},e.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;void 0!==i&&(p(i)||t.selected||t.unselected||(r=i,n=c*i),e("selected.marker.opacity",r),e("unselected.marker.opacity",n))}},e.validate=g},92596:function(t,e,r){"use strict";var n,i,a=r(42696).DC,o=r(10721),s=r(48636),l=r(98953).mod,c=r(63821),u=c.BADNUM,h=c.ONEDAY,f=c.ONEHOUR,p=c.ONEMIN,d=c.ONESEC,m=c.EPOCHJD,g=r(33626),y=r(42696).aL,v=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,x=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,_=(new Date).getFullYear()-70;function b(t){return t&&g.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return b(t)?e?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:g.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=h*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return b(t)?g.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var a=t.getTimezoneOffset()*p,o=(t.getUTCMinutes()-t.getMinutes())*p+(t.getUTCSeconds()-t.getSeconds())*d+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*p;a=a-s/2+l(o-a+s/2,s)}return(t=Number(t)-a)>=n&&t<=i?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=b(r),y=t.charAt(0);!c||"G"!==y&&"g"!==y||(t=t.substr(1),r="");var w=c&&"chinese"===r.substr(0,7),T=t.match(w?x:v);if(!T)return u;var k=T[1],A=T[3]||"1",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(c){if(2===k.length)return u;var L;k=Number(k);try{var I=g.getComponentMethod("calendars","getCal")(r);if(w){var P="i"===A.charAt(A.length-1);A=parseInt(A,10),L=I.newDate(k,I.toMonthIndex(k,A,P),M)}else L=I.newDate(k,Number(A),M)}catch(t){return u}return L?(L.toJD()-m)*h+S*f+E*p+C*d:u}k=2===k.length?(Number(k)+2e3-_)%100+_:Number(k),A-=1;var z=new Date(Date.UTC(2e3,A,M,S,E));return z.setUTCFullYear(k),z.getUTCMonth()!==A||z.getUTCDate()!==M?u:z.getTime()+C*d},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==u};var T=90*h,k=3*f,A=5*p;function M(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+="."+w(i,a)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var a,o,s,c,v,x,_=Math.floor(10*l(t+.05,1)),w=Math.round(t-_/10);if(b(r)){var S=Math.floor(w/h)+m,E=Math.floor(l(t,h));try{a=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=y("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e<T?Math.floor(E/f):0,s=e<T?Math.floor(E%f/p):0,c=e<k?Math.floor(E%p/d):0,v=e<A?E%d*10+_:0}else x=new Date(w),a=y("%Y-%m-%d")(x),o=e<T?x.getUTCHours():0,s=e<T?x.getUTCMinutes():0,c=e<k?x.getUTCSeconds():0,v=e<A?10*x.getUTCMilliseconds()+_:0;return M(a,o,s,c,v)},e.ms2DateTimeLocal=function(t){if(!(t>=n+h&&t<=i-h))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===u)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(b(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,E=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function L(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(E,(function(){return C[r("%q")(i)]})),b(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var I=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,a){if(i=b(i)&&i,!e)if("y"===r)e=a.year;else if("m"===r)e=a.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,h),n=w(Math.floor(r/f),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),I[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+L(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return L(e,t,n,i)};var P=3*h;e.incrementMonth=function(t,e,r){r=b(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var i=Math.round(t/h)+m,a=g.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-m)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+P);return c.setUTCMonth(c.getUTCMonth()+e)+n-P},e.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=b(e)&&g.getComponentMethod("calendars","getCal")(e),u=0;u<t.length;u++)if(n=t[u],o(n)){if(!(n%h))if(c)try{1===(r=c.fromJD(n/h+m)).day()?1===r.month()?i++:a++:s++}catch(t){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?i++:a++:s++}else l++;s+=a+=i;var f=t.length-l;return{exactYears:i/f,exactMonths:a/f,exactDays:s/f}}},95425:function(t,e,r){"use strict";var n=r(45568),i=r(48636),a=r(15236),o=r(11191);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,a=document.getElementById(n);a||((a=document.createElement("style")).setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o.insertRule?o.insertRule(e+"{"+r+"}",0):o.addRule?o.addRule(e,r,0):i.warn("addStyleRule failed")}function c(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function u(t){for(var e=[];h(t);)e.push(t),t=t.parentNode,"function"==typeof ShadowRoot&&t instanceof ShadowRoot&&(t=t.host);return e}function h(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=u(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=c(t);if(e){var n=a.convertCssMatrix(e);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},68596:function(t,e,r){"use strict";var n=r(7683).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};t.exports=i},93049:function(t,e,r){"use strict";var n=r(56174),i=Array.isArray;function a(t,e,r,o){var s,l,c,u,h,f,p,d=t[0],m=t.length;if(2===m&&i(d)&&i(t[1])&&0===d.length){if(p=function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&"object"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],d),p)return d;d.splice(0,d.length)}for(var g=1;g<m;g++)for(l in s=t[g])c=d[l],u=s[l],o&&i(u)?d[l]=u:e&&u&&(n(u)||(h=i(u)))?(h?(h=!1,f=c&&i(c)?c:[]):f=c&&n(c)?c:{},d[l]=a([f,u],e,r,o)):(void 0!==u||r)&&(d[l]=u);return d}e.extendFlat=function(){return a(arguments,!1,!1,!1)},e.extendDeep=function(){return a(arguments,!0,!1,!1)},e.extendDeepAll=function(){return a(arguments,!0,!0,!1)},e.extendDeepNoArrays=function(){return a(arguments,!0,!1,!0)}},48965:function(t){"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},78926:function(t){"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),a=[],o=0;o<t.length;o++){var s=t[o];i(s)&&a.push(s)}return a}},3994:function(t,e,r){"use strict";var n=r(45568),i=r(78171),{area:a}=r(61990),{centroid:o}=r(30035),{bbox:s}=r(25368),l=r(29527),c=r(48636),u=r(56174),h=r(35632),f=r(80899),p=Object.keys(i),d={"ISO-3":l,"USA-states":l,"country names":function(t){for(var e=0;e<p.length;e++){var r=p[e];if(new RegExp(i[r]).test(t.trim().toLowerCase()))return r}return c.log("Unrecognized country name: "+t+"."),!1}};function m(t){var e=t.geojson,r=window.PlotlyGeoAssets||{},n="string"==typeof e?r[e]:e;return u(n)?n:(c.error("Oops ... something went wrong when fetching "+e),!1)}t.exports={locationToFeature:function(t,e,r){if(!e||"string"!=typeof e)return!1;var n,i,a,o=d[t](e);if(o){if("USA-states"===t)for(n=[],a=0;a<r.length;a++)(i=r[a]).properties&&i.properties.gu&&"USA"===i.properties.gu&&n.push(i);else n=r;for(a=0;a<n.length;a++)if((i=n[a]).id===o)return i;c.log(["Location with id",o,"does not have a matching topojson feature at this resolution."].join(" "))}return!1},feature2polygons:function(t){var e,r,n,i,a=t.geometry,o=a.coordinates,s=t.id,l=[];function c(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;i<t.length;i++)e[i]=[t[i][0]<0?t[i][0]+360:t[i][0],t[i][1]];l.push(f.tester(e))}:"ATA"===s?function(t){var e=c(t);if(null===e)return l.push(f.tester(t));var r=new Array(t.length+1),n=0;for(i=0;i<t.length;i++)i>e?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=f.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(f.tester(t))},a.type){case"MultiPolygon":for(r=0;r<o.length;r++)for(n=0;n<o[r].length;n++)e(o[r][n]);break;case"Polygon":for(r=0;r<o.length;r++)e(o[r])}return l},getTraceGeojson:m,extractTraceFeature:function(t){var e=t[0].trace,r=m(e);if(!r)return!1;var n,i={},s=[];for(n=0;n<e._length;n++){var l=t[n];(l.loc||0===l.loc)&&(i[l.loc]=l)}function u(t){var r=h(t,e.featureidkey||"id").get(),n=i[r];if(n){var l=t.geometry;if("Polygon"===l.type||"MultiPolygon"===l.type){var u={type:"Feature",id:r,geometry:l,properties:{}};u.geometry.coordinates.length>0?u.properties.ct=function(t){var e,r=t.geometry;if("MultiPolygon"===r.type)for(var n=r.coordinates,i=0,s=0;s<n.length;s++){var l={type:"Polygon",coordinates:n[s]},c=a(l);c>i&&(i=c,e=l)}else e=r;return o(e).geometry.coordinates}(u):u.properties.ct=[NaN,NaN],n.fIn=t,n.fOut=u,s.push(u)}else c.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var f=r.features;for(n=0;n<f.length;n++)u(f[n]);break;case"Feature":u(r);break;default:return c.warn(["Invalid GeoJSON type",(r.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var p in i)c.log(["Location *"+p+"*","does not have a matching feature with id-key","*"+e.featureidkey+"*."].join(" "));return s},fetchTraceGeoData:function(t){var e=window.PlotlyGeoAssets||{},r=[];function i(t){return new Promise((function(r,i){n.json(t,(function(n,a){if(n){delete e[t];var o=404===n.status?'GeoJSON at URL "'+t+'" does not exist.':"Unexpected error while fetching from "+t;return i(new Error(o))}return e[t]=a,r(a)}))}))}function a(t){return new Promise((function(r,n){var i=0,a=setInterval((function(){return e[t]&&"pending"!==e[t]?(clearInterval(a),r(e[t])):i>100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++}),50)}))}for(var o=0;o<t.length;o++){var s=t[o][0].trace.geojson;"string"==typeof s&&(e[s]?"pending"===e[s]&&r.push(a(s)):(e[s]="pending",r.push(i(s))))}return r},computeBbox:function(t){return s(t)}}},39532:function(t,e,r){"use strict";var n=r(63821).BADNUM;e.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},e.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},e.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=[t[r]];return{type:"MultiPolygon",coordinates:e}},e.makeBlank=function(){return{type:"Point",coordinates:[]}}},3447:function(t,e,r){"use strict";var n,i,a,o=r(98953).mod;function s(t,e,r,n,i,a,o,s){var l=r-t,c=i-t,u=o-i,h=n-e,f=a-e,p=s-a,d=l*p-u*h;if(0===d)return null;var m=(c*p-u*f)/d,g=(c*h-l*f)/d;return g<0||g>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,h=n-e,f=o-i,p=c-a,d=u*u+h*h,m=f*f+p*p,g=Math.min(l(u,h,d,i-t,a-e),l(u,h,d,o-t,c-e),l(f,p,m,t-i,e-a),l(f,p,m,r-i,n-a));return Math.sqrt(g)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=t.getPointAtLength(o(r,e)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return n[r]=f,f},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),h=u;function f(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.x<a?a-r.x:r.x>o?r.x-o:0,h=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var p=f(c);p;){if((c+=p+r)>h)return;p=f(c)}for(p=f(h);p;){if(c>(h-=p+r))return;p=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,h=0,f=0,p=s;h<c;){if(i=(f+p)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)<l)return a;u*o>0?p=i:f=i,h++}return a}},46998:function(t,e,r){"use strict";var n=r(10721),i=r(65657),a=r(162),o=r(88856),s=r(10229).defaultLine,l=r(87800).isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function h(t){if(n(t))return c;var e=a(t);return e.length?e:c}function f(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n=t.color;n&&n._inputArray&&(n=n._inputArray);var i,s,p,d,m,g=l(n),y=l(e),v=o.extractOpts(t),x=[];if(i=void 0!==v.colorscale?o.makeColorScaleFuncFromTrace(t):h,s=g?function(t,e){return void 0===t[e]?c:a(i(t[e]))}:h,p=y?function(t,e){return void 0===t[e]?1:f(t[e])}:f,g||y)for(var _=0;_<r;_++)d=s(n,_),m=p(e,_),x[_]=u(d,m);else x=u(a(n),e);return x},parseColorScale:function(t){var e=o.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=o.flipScale(e.colorscale)),r.map((function(t){var e=t[0],r=i(t[1]).toRgb();return{index:e,rgb:[r.r,r.g,r.b,r.a]}}))}}},71293:function(t,e,r){"use strict";var n=r(29527);function i(t){return[t]}t.exports={keyFun:function(t){return t.key},repeat:i,descend:n,wrap:i,unwrap:function(t){return t[0]}}},29527:function(t){"use strict";t.exports=function(t){return t}},10688:function(t){"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},34809:function(t,e,r){"use strict";var n=r(45568),i=r(42696).aL,a=r(36464).GP,o=r(10721),s=r(63821),l=s.FP_SAFE,c=-l,u=s.BADNUM,h=t.exports={};h.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var f={};h.warnBadFormat=function(t){var e=String(t);f[e]||(f[e]=1,h.warn('encountered bad format: "'+e+'"'))},h.noFormat=function(t){return String(t)},h.numberFormat=function(t){var e;try{e=a(h.adjustFormat(t))}catch(e){return h.warnBadFormat(t),h.noFormat}return e},h.nestedProperty=r(35632),h.keyedContainer=r(34967),h.relativeAttr=r(82047),h.isPlainObject=r(56174),h.toLogRange=r(8083),h.relinkPrivateKeys=r(80428);var p=r(87800);h.isArrayBuffer=p.isArrayBuffer,h.isTypedArray=p.isTypedArray,h.isArrayOrTypedArray=p.isArrayOrTypedArray,h.isArray1D=p.isArray1D,h.ensureArray=p.ensureArray,h.concat=p.concat,h.maxRowLength=p.maxRowLength,h.minRowLength=p.minRowLength;var d=r(98953);h.mod=d.mod,h.modHalf=d.modHalf;var m=r(34220);h.valObjectMeta=m.valObjectMeta,h.coerce=m.coerce,h.coerce2=m.coerce2,h.coerceFont=m.coerceFont,h.coercePattern=m.coercePattern,h.coerceHoverinfo=m.coerceHoverinfo,h.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,h.validate=m.validate;var g=r(92596);h.dateTime2ms=g.dateTime2ms,h.isDateTime=g.isDateTime,h.ms2DateTime=g.ms2DateTime,h.ms2DateTimeLocal=g.ms2DateTimeLocal,h.cleanDate=g.cleanDate,h.isJSDate=g.isJSDate,h.formatDate=g.formatDate,h.incrementMonth=g.incrementMonth,h.dateTick0=g.dateTick0,h.dfltRange=g.dfltRange,h.findExactDates=g.findExactDates,h.MIN_MS=g.MIN_MS,h.MAX_MS=g.MAX_MS;var y=r(98813);h.findBin=y.findBin,h.sorterAsc=y.sorterAsc,h.sorterDes=y.sorterDes,h.distinctVals=y.distinctVals,h.roundUp=y.roundUp,h.sort=y.sort,h.findIndexOfMin=y.findIndexOfMin,h.sortObjectKeys=r(62994);var v=r(89258);h.aggNums=v.aggNums,h.len=v.len,h.mean=v.mean,h.geometricMean=v.geometricMean,h.median=v.median,h.midRange=v.midRange,h.variance=v.variance,h.stdev=v.stdev,h.interp=v.interp;var x=r(15236);h.init2dArray=x.init2dArray,h.transposeRagged=x.transposeRagged,h.dot=x.dot,h.translationMatrix=x.translationMatrix,h.rotationMatrix=x.rotationMatrix,h.rotationXYMatrix=x.rotationXYMatrix,h.apply3DTransform=x.apply3DTransform,h.apply2DTransform=x.apply2DTransform,h.apply2DTransform2=x.apply2DTransform2,h.convertCssMatrix=x.convertCssMatrix,h.inverseTransformMatrix=x.inverseTransformMatrix;var _=r(44313);h.deg2rad=_.deg2rad,h.rad2deg=_.rad2deg,h.angleDelta=_.angleDelta,h.angleDist=_.angleDist,h.isFullCircle=_.isFullCircle,h.isAngleInsideSector=_.isAngleInsideSector,h.isPtInsideSector=_.isPtInsideSector,h.pathArc=_.pathArc,h.pathSector=_.pathSector,h.pathAnnulus=_.pathAnnulus;var b=r(32546);h.isLeftAnchor=b.isLeftAnchor,h.isCenterAnchor=b.isCenterAnchor,h.isRightAnchor=b.isRightAnchor,h.isTopAnchor=b.isTopAnchor,h.isMiddleAnchor=b.isMiddleAnchor,h.isBottomAnchor=b.isBottomAnchor;var w=r(3447);h.segmentsIntersect=w.segmentsIntersect,h.segmentDistance=w.segmentDistance,h.getTextLocation=w.getTextLocation,h.clearLocationCache=w.clearLocationCache,h.getVisibleSegment=w.getVisibleSegment,h.findPointOnPath=w.findPointOnPath;var T=r(93049);h.extendFlat=T.extendFlat,h.extendDeep=T.extendDeep,h.extendDeepAll=T.extendDeepAll,h.extendDeepNoArrays=T.extendDeepNoArrays;var k=r(48636);h.log=k.log,h.warn=k.warn,h.error=k.error;var A=r(90694);h.counterRegex=A.counter;var M=r(64025);h.throttle=M.throttle,h.throttleDone=M.done,h.clearThrottle=M.clear;var S=r(95425);function E(t){var e={};for(var r in t)for(var n=t[r],i=0;i<n.length;i++)e[n[i]]=+r;return e}h.getGraphDiv=S.getGraphDiv,h.isPlotDiv=S.isPlotDiv,h.removeElement=S.removeElement,h.addStyleRule=S.addStyleRule,h.addRelatedStyleRule=S.addRelatedStyleRule,h.deleteRelatedStyleRule=S.deleteRelatedStyleRule,h.getFullTransformMatrix=S.getFullTransformMatrix,h.getElementTransformMatrix=S.getElementTransformMatrix,h.getElementAndAncestors=S.getElementAndAncestors,h.equalDomRects=S.equalDomRects,h.clearResponsive=r(23493),h.preserveDrawingBuffer=r(32521),h.makeTraceGroups=r(75944),h._=r(38514),h.notifier=r(87355),h.filterUnique=r(48965),h.filterVisible=r(78926),h.pushUnique=r(36539),h.increment=r(10688),h.cleanNumber=r(44498),h.ensureNumber=function(t){return o(t)?(t=Number(t))>l||t<c?u:t:u},h.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&o(t)&&t>=0&&t%1==0},h.noop=r(4969),h.identity=r(29527),h.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},h.swapAttrs=function(t,e,r,n){r||(r="x"),n||(n="y");for(var i=0;i<e.length;i++){var a=e[i],o=h.nestedProperty(t,a.replace("?",r)),s=h.nestedProperty(t,a.replace("?",n)),l=o.get();o.set(s.get()),s.set(l)}},h.raiseToTop=function(t){t.parentNode.appendChild(t)},h.cancelTransition=function(t){return t.transition().duration(0)},h.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},h.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},h.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s<a;s++)o[s]=e(t[s],r,n,i);return o},h.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),l="";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var c=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)l=Math.floor(Math.random()*n).toString(n)+l;c&&(o=Math.pow(n,c),l=Math.floor(Math.random()*o).toString(n)+l);var u=parseInt(l,n);return e&&e[l]||u!==1/0&&u>=Math.pow(2,r)?i>10?(h.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},h.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},h.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r<l;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},h.syncOrAsync=function(t,e,r){var n;function i(){return h.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},h.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},h.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},h.mergeArray=function(t,e,r,n){var i="function"==typeof n;if(h.isArrayOrTypedArray(t))for(var a=Math.min(t.length,e.length),o=0;o<a;o++){var s=t[o];e[o][r]=i?n(s):s}},h.mergeArrayCastPositive=function(t,e,r){return h.mergeArray(t,e,r,(function(t){var e=+t;return isFinite(e)&&e>0?e:0}))},h.fillArray=function(t,e,r,n){if(n=n||h.identity,h.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},h.castOption=function(t,e,r,n){n=n||h.identity;var i=h.nestedProperty(t,r).get();return h.isArrayOrTypedArray(i)?Array.isArray(e)&&h.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},h.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=h.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},h.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=E(o));for(var s=0;s<a.length;s++){var l=a[s];if(h.isIndex(l)||h.isArrayOrTypedArray(l)&&h.isIndex(l[0])&&h.isIndex(l[1])){var c=n?n[l]:l,u=r?r[c]:c;void 0!==(i=u)&&i<t.length&&(t[u].selected=1)}}},h.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=E(r),i=[],a=0;a<e.length;a++){var o=e[a];if(h.isIndex(o)){var s=n[o];h.isIndex(s)&&i.push(s)}}return i}return e},h.getTargetArray=function(t,e){var r=e.target;if("string"==typeof r&&r){var n=h.nestedProperty(t,r).get();return!!h.isArrayOrTypedArray(n)&&n}return!!h.isArrayOrTypedArray(r)&&r},h.minExtend=function t(e,r,n){var i={};"object"!=typeof r&&(r={});var a,o,s,l="pieLike"===n?-1:3,c=Object.keys(e);for(a=0;a<c.length;a++)s=e[o=c[a]],"_"!==o.charAt(0)&&"function"!=typeof s&&("module"===o?i[o]=s:Array.isArray(s)?i[o]="colorscale"===o||-1===l?s.slice():s.slice(0,l):h.isTypedArray(s)?i[o]=-1===l?s.subarray():s.subarray(0,l):i[o]=s&&"object"==typeof s?t(e[o],r[o],n):s);for(c=Object.keys(r),a=0;a<c.length;a++)"object"==typeof(s=r[o=c[a]])&&o in i&&"object"==typeof i[o]||(i[o]=s);return i},h.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},h.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},h.isIE=function(){return void 0!==window.navigator.msSaveBlob};var C=/Version\/[\d\.]+.*Safari/;h.isSafari=function(){return C.test(window.navigator.userAgent)};var L=/iPad|iPhone|iPod/;h.isIOS=function(){return L.test(window.navigator.userAgent)};var I=/Firefox\/(\d+)\.\d+/;h.getFirefoxVersion=function(){var t=I.exec(window.navigator.userAgent);if(t&&2===t.length){var e=parseInt(t[1]);if(!isNaN(e))return e}return null},h.isD3Selection=function(t){return t instanceof n.selection},h.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},h.ensureSingleById=function(t,e,r,n){var i=t.select(e+"#"+r);if(i.size())return i;var a=t.append(e).attr("id",r);return n&&a.call(n),a},h.objectFromPath=function(t,e){for(var r,n=t.split("."),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var P=/^([^\[\.]+)\.(.+)?/,z=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function O(t){return"__"===t.slice(0,2)}h.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if("object"==typeof t&&!Array.isArray(t))for(r in t)if(t.hasOwnProperty(r))if(e=r.match(P)){if(i=t[r],O(n=e[1]))continue;delete t[r],t[n]=h.extendDeepNoArrays(t[n]||{},h.objectFromPath(r,h.expandObjectPaths(i))[n])}else if(e=r.match(z)){if(i=t[r],O(n=e[1]))continue;if(a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],"."===e[3])s=e[4],o=t[n][a]=t[n][a]||{},h.extendDeepNoArrays(o,h.objectFromPath(s,h.expandObjectPaths(i)));else{if(O(n))continue;t[n][a]=h.expandObjectPaths(i)}}else{if(O(r))continue;t[r]=h.expandObjectPaths(t[r])}return t},h.numSeparate=function(t,e,r){if(r||(r=!1),"string"!=typeof e||0===e.length)throw new Error("Separator string required for formatting!");"number"==typeof t&&(t=String(t));var n=/(\d+)(\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split("."),s=o[0],l=o.length>1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var D=/^\w*$/;h.templateString=function(t,e){var r={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,n){var i;return D.test(n)?i=e[n]:(r[n]=r[n]||h.nestedProperty(e,n).get,i=r[n]()),h.isValidTextValue(i)?i:""}))};var R={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=function(){return U.apply(R,arguments)};var F={max:10,count:0,name:"texttemplate"};h.texttemplateString=function(){return U.apply(F,arguments)};var B=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,N={max:10,count:0,name:"texttemplate",parseMultDiv:!0};h.texttemplateStringForShapes=function(){return U.apply(N,arguments)};var j=/^[:|\|]/;function U(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,s,l){var c="_xother"===s||"_yother"===s,u="_xother_"===s||"_yother_"===s,f="xother_"===s||"yother_"===s,p="xother"===s||"yother"===s||c||f||u,d=s;(c||u)&&(d=d.substring(1)),(f||u)&&(d=d.substring(0,d.length-1));var m,g,y,v=null,x=null;if(n.parseMultDiv){var _=function(t){var e=t.match(B);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(d);d=_.key,v=_.op,x=_.number}if(p){if(void 0===(m=e[d]))return""}else for(y=3;y<a.length;y++)if(g=a[y]){if(g.hasOwnProperty(d)){m=g[d];break}if(D.test(d)||(m=h.nestedProperty(g,d).get(),(m=o[d]||h.nestedProperty(g,d).get())&&(o[d]=m)),void 0!==m)break}if(void 0!==m&&("*"===v&&(m*=x),"/"===v&&(m/=x)),void 0===m&&n)return n.count<n.max&&(h.warn("Variable '"+d+"' in "+n.name+" could not be found!"),m=t),n.count===n.max&&h.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,t;if(l){var b;if(":"===l[0]&&(b=r?r.numberFormat:h.numberFormat,""!==m&&(m=b(l.replace(j,""))(m))),"|"===l[0]){b=r?r.timeFormat:i;var w=h.dateTime2ms(m);m=h.formatDate(w,l.replace(j,""),!1,b)}}else{var T=d+"Label";e.hasOwnProperty(T)&&(m=e[T])}return p&&(m="("+m+")",(c||u)&&(m=" "+m),(f||u)&&(m+=" ")),m}))}h.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var V=2e9;h.seedPseudoRandom=function(){V=2e9},h.pseudoRandom=function(){var t=V;return V=(69069*V+1)%4294967296,Math.abs(V-t)<429496729?h.pseudoRandom():V/4294967296},h.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=h.extractOption(t,e,"htx","hovertext");if(h.isValidTextValue(i))return n(i);var a=h.extractOption(t,e,"tx","text");return h.isValidTextValue(a)?n(a):void 0},h.isValidTextValue=function(t){return t||0===t},h.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n<e;n++)-1!==r.indexOf(".")&&(r=(r=r.replace("0%","%")).replace(".%","%"));return r},h.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||"none"===e},h.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""},h.strRotate=function(t){return t?"rotate("+t+")":""},h.strScale=function(t){return 1!==t?"scale("+t+")":""},h.getTextTransform=function(t){var e=t.noCenter,r=t.textX,n=t.textY,i=t.targetX,a=t.targetY,o=t.anchorX||0,s=t.anchorY||0,l=t.rotate,c=t.scale;return c?c>1&&(c=1):c=0,h.strTranslate(i-c*(r+o),a-c*(n+s))+h.strScale(c)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},h.setTransormAndDisplay=function(t,e){t.attr("transform",h.getTextTransform(e)),t.style("display",e.scale?null:"none")},h.ensureUniformFontSize=function(t,e){var r=h.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},h.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},h.bigFont=function(t){return Math.round(1.2*t)};var q=h.getFirefoxVersion(),H=null!==q&&q<86;h.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},56174:function(t){"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},34967:function(t,e,r){"use strict";var n=r(35632),i=/^\w*$/;t.exports=function(t,e,r,a){var o,s,l;r=r||"name",a=a||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(o=0;o<s.length;o++)u[s[o][r]]=o;var h=i.test(a),f={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=u[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,u[t]=o}else e!==(h?s[o][a]:n(s[o],a).get())&&(i|=2);var p=s[o]=s[o]||{};return p[r]=t,h?p[a]=e:n(p,a).set(e),null!==e&&(i&=-5),c[o]=c[o]|i,f},get:function(t){if(s){var e=u[t];return void 0===e?void 0:h?s[e][a]:n(s[e],a).get()}},rename:function(t,e){var n=u[t];return void 0===n||(c[n]=1|c[n],u[e]=n,delete u[t],s[n][r]=e),f},remove:function(t){var e=u[t];if(void 0===e)return f;var i=s[e];if(Object.keys(i).length>2)return c[e]=2|c[e],f.set(t,null);if(h){for(o=e;o<s.length;o++)c[o]=3|c[o];for(o=e;o<s.length;o++)u[s[o][r]]--;s.splice(e,1),delete u[t]}else n(i,a).set(null),c[e]=6|c[e];return f},constructUpdate:function(){for(var t,i,o={},l=Object.keys(c),u=0;u<l.length;u++)i=l[u],t=e+"["+i+"]",s[i]?(1&c[i]&&(o[t+"."+r]=s[i][r]),2&c[i]&&(o[t+"."+a]=h?4&c[i]?null:s[i][a]:4&c[i]?null:n(s[i],a).get())):o[t]=null;return o}};return f}},38514:function(t,e,r){"use strict";var n=r(33626);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return e}},48636:function(t,e,r){"use strict";var n=r(24452).dfltConfig,i=r(87355),a=t.exports={};a.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}}},75944:function(t,e,r){"use strict";var n=r(45568);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][a]=n.select(this)})),i}},15236:function(t,e,r){"use strict";var n=r(11191);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},e.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},e.dot=function(t,r){if(!t.length||!r.length||t.length!==r.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=e.dot(t[i],r);else if(r[0].length){var o=e.transposeRagged(r);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=e.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*r[i];return n},e.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},e.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},e.rotationXYMatrix=function(t,r,n){return e.dot(e.dot(e.translationMatrix(r,n),e.rotationMatrix(t)),e.translationMatrix(-r,-n))},e.apply3DTransform=function(t){return function(){var r=arguments,n=1===arguments.length?r[0]:[r[0],r[1],r[2]||0];return e.dot(t,[n[0],n[1],n[2],1]).slice(0,3)}},e.apply2DTransform=function(t){return function(){var r=arguments;3===r.length&&(r=r[0]);var n=1===arguments.length?r[0]:[r[0],r[1]];return e.dot(t,[n[0],n[1],1]).slice(0,2)}},e.apply2DTransform2=function(t){var r=e.apply2DTransform(t);return function(t){return r(t.slice(0,2)).concat(r(t.slice(2,4)))}},e.convertCssMatrix=function(t){if(t){var e=t.length;if(16===e)return t;if(6===e)return[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},e.inverseTransformMatrix=function(t){var e=[];return n.invert(e,t),[[e[0],e[1],e[2],e[3]],[e[4],e[5],e[6],e[7]],[e[8],e[9],e[10],e[11]],[e[12],e[13],e[14],e[15]]]}},98953:function(t){"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},35632:function(t,e,r){"use strict";var n=r(10721),i=r(87800).isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s<e.length-1;s++){if(-1===(r=e[s])){for(n=!0,o=[],l=0;l<c.length;l++)o[l]=a(c[l],e.slice(s+1))(),o[l]!==o[0]&&(n=!1);return n?o[0]:o}if("number"==typeof r&&!i(c))return;if("object"!=typeof(c=c[r])||null===c)return}if("object"==typeof c&&null!==c&&null!==(o=c[e[s]]))return o}}t.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";var r,i,o,s,c=e.split(".");for(s=0;s<c.length;s++)if("__"===String(c[s]).slice(0,2))throw"bad property string";for(s=0;s<c.length;){if(r=String(c[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])c[s]=r[1];else{if(0!==s)throw"bad property string";c.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split("]["),o=0;o<i.length;o++)s++,c.splice(s,0,Number(i[o]))}s++}return"object"!=typeof t?function(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}(t,e,c):{set:l(t,c,e),get:a(t,c),astr:e,parts:c,obj:t}};var o=/(^|\.)args\[/;function s(t,e){return void 0===t||null===t&&!e.match(o)}function l(t,e,r){return function(n){var a,o,l=t,f="",p=[[t,f]],d=s(n,r);for(o=0;o<e.length-1;o++){if("number"==typeof(a=e[o])&&!i(l))throw"array index but container is not an array";if(-1===a){if(d=!u(l,e.slice(o+1),n,r))break;return}if(!h(l,a,e[o+1],d))break;if("object"!=typeof(l=l[a])||null===l)throw"container is not an object";f=c(f,a),p.push([l,f])}if(d){if(o===e.length-1&&(delete l[e[o]],Array.isArray(l)&&+e[o]==l.length-1))for(;l.length&&void 0===l[l.length-1];)l.pop()}else l[e[o]]=n}}function c(t,e){var r=e;return n(e)?r="["+e+"]":t&&(r="."+e),t+r}function u(t,e,r,n){var a,o=i(r),c=!0,u=r,f=n.replace("-1",0),p=!o&&s(r,f),d=e[0];for(a=0;a<t.length;a++)f=n.replace("-1",a),o&&(p=s(u=r[a%r.length],f)),p&&(c=!1),h(t,a,d,p)&&l(t[a],e,n.replace("-1",a))(u);return c}function h(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]="number"==typeof r?[]:{}}return!0}},4969:function(t){"use strict";t.exports=function(){}},87355:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=[];t.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(a).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("&times;").on("click",(function(){i.transition().call(s)}));for(var a=i.append("p"),o=t.split(/<br\s*\/?>/g),l=0;l<o.length;l++)l&&a.append("br"),a.append("span").text(o[l]);"stick"===e?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(r).call(s)}))}function s(t){t.duration(700).style("opacity",0).each("end",(function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()}))}}},93134:function(t,e,r){"use strict";var n=r(27983),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr("class")||"").split(" "),o=0;o<a.length;o++){var s=a[o];0===s.indexOf("cursor-")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,"!!")}n(t,e)}else r&&(t.attr(i,null),"!!"===r?n(t):n(t,r))}},80899:function(t,e,r){"use strict";var n=r(15236).dot,i=r(63821).BADNUM,a=t.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,c=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(c=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(c=!0,l=function(t){return t[1]===r[0][1]}));var u=!0,h=r[0];for(e=1;e<r.length;e++)if(h[0]!==r[e][0]||h[1]!==r[e][1]){u=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:c?function(t,e){var r=t[0],c=t[1];return!(r===i||r<n||r>a||c===i||c<o||c>s||e&&l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||l<n||l>a||c===i||c<o||c>s)return!1;var u,h,f,p,d,m=r.length,g=r[0][0],y=r[0][1],v=0;for(u=1;u<m;u++)if(h=g,f=y,g=r[u][0],y=r[u][1],!(l<(p=Math.min(h,g))||l>Math.max(h,g)||c>Math.max(f,y)))if(c<Math.min(f,y))l!==p&&v++;else{if(c===(d=g===h?c:f+(l-h)*(y-f)/(g-h)))return 1!==u||!e;c<=d&&l!==p&&v++}return v%2==1},isRect:c,degenerate:u}},a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],c=[t[r][0]-l[0],t[r][1]-l[1]],u=n(c,c),h=Math.sqrt(u),f=[-c[1]/h,c[0]/h];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,c))<0||s>u||Math.abs(n(o,f))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c<t.length;c++)(c===t.length-1||a.isSegmentBent(t,l,c+1,e))&&(r.push(t[c]),r.length<s-2&&(n=c,i=r.length-1),l=c)}return t.length>1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},22459:function(t,e,r){"use strict";var n=r(97464),i=r(81330);t.exports=function(t,e,a){var o=t._fullLayout,s=!0;return o._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(a);else if(!n.pick||o._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:a||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:o._glcontainer.node()}),s}},32521:function(t,e,r){"use strict";var n=r(10721),i=r(13087);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(" "),o=1;o<a.length;o++)if(-1!==a[o].indexOf("Safari"))for(var s=o-1;s>-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}return r}},36539:function(t){"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n<t.length;n++)if(t[n]instanceof RegExp&&t[n].toString()===r)return t;t.push(e)}else!e&&0!==e||-1!==t.indexOf(e)||t.push(e);return t}},40486:function(t,e,r){"use strict";var n=r(34809),i=r(24452).dfltConfig,a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},plotDo:function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:"object"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)}};t.exports=a},90694:function(t,e){"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),a=!1===n?"":"^";return"xy"===t?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+t+"([2-9]|[1-9][0-9]+)?"+i)}},82047:function(t){"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},80428:function(t,e,r){"use strict";var n=r(87800).isArrayOrTypedArray,i=r(56174);t.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&&n(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),c=0;c<l;c++)s[c]!==o[c]&&i(o[c])&&i(s[c])&&t(s[c],o[c])}else i(o)&&i(s)&&(t(s,o),Object.keys(s).length||delete e[a])}}},98813:function(t,e,r){"use strict";var n=r(10721),i=r(48636),a=r(29527),o=r(63821).BADNUM,s=1e-9;function l(t,e){return t<e}function c(t,e){return t<=e}function u(t,e){return t>e}function h(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var a,o,f=0,p=e.length,d=0,m=p>1?(e[p-1]-e[0])/(p-1):1;for(o=m>=0?r?l:c:r?h:u,t+=m*s*(r?-1:1)*(m>=0?1:-1);f<p&&d++<100;)o(e[a=Math.floor((f+p)/2)],t)?f=a+1:p=a;return d>90&&i.log("Long binary search..."),f-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var i,a=n[r]-n[0]||1,s=a/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],h=u-i;void 0===i?(l.push(u),i=u):h>s&&(a=Math.min(a,h),l.push(u),i=u)}return{vals:l,minDiff:a}},e.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=c((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]},e.sort=function(t,e){for(var r=0,n=0,i=1;i<t.length;i++){var a=e(t[i],t[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;i<t.length;i++){var o=e(t[i]);o<n&&(n=o,r=i)}return r}},27983:function(t){"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},97464:function(t,e,r){"use strict";var n=r(78766),i=function(){};t.exports=function(t){for(var e in t)"function"==typeof t[e]&&(t[e]=i);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",r.appendChild(a),t.container.appendChild(r),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}},62994:function(t){"use strict";t.exports=function(t){return Object.keys(t).sort()}},89258:function(t,e,r){"use strict";var n=r(10721),i=r(87800).isArrayOrTypedArray;e.aggNums=function(t,r,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=e.aggNums(t,r,a[s]);a=l}for(s=0;s<o;s++)n(r)?n(a[s])&&(r=t(+r,+a[s])):r=a[s];return r},e.len=function(t){return e.aggNums((function(t){return t+1}),0,t)},e.mean=function(t,r){return r||(r=e.len(t)),e.aggNums((function(t,e){return t+e}),0,t)/r},e.geometricMean=function(t,r){return r||(r=e.len(t)),Math.pow(e.aggNums((function(t,e){return t*e}),1,t),1/r)},e.midRange=function(t){if(void 0!==t&&0!==t.length)return(e.aggNums(Math.max,null,t)+e.aggNums(Math.min,null,t))/2},e.variance=function(t,r,i){return r||(r=e.len(t)),n(i)||(i=e.mean(t,r)),e.aggNums((function(t,e){return t+Math.pow(e-i,2)}),0,t)/r},e.stdev=function(t,r,n){return Math.sqrt(e.variance(t,r,n))},e.median=function(t){var r=t.slice().sort();return e.interp(r,.5)},e.interp=function(t,e){if(!n(e))throw"n should be a finite number";if((e=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},55010:function(t,e,r){"use strict";var n=r(162);t.exports=function(t){return t?n(t):[0,0,0,1]}},95544:function(t,e,r){"use strict";var n=r(1837),i=r(62203),a=r(34809),o=null;t.exports=function(){if(null!==o)return o;o=!1;var t=a.isIE()||a.isSafari()||a.isIOS();if(window.navigator.userAgent&&!t){var e=Array.from(n.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if("function"==typeof r)o=e.some((function(t){return r.apply(null,t)}));else{var s=i.tester.append("image").attr("style",n.STYLE),l=window.getComputedStyle(s.node()).imageRendering;o=e.some((function(t){var e=t[1];return l===e||l===e.toLowerCase()})),s.remove()}}return o}},30635:function(t,e,r){"use strict";var n=r(45568),i=r(34809),a=i.strTranslate,o=r(62972),s=r(4530).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var S=t.text(),E=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),I=n.select(t.node().parentNode);if(!I.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",I.selectAll("svg."+P).remove(),I.selectAll("g."+P+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l,f=parseInt((MathJax.version||"").split(".")[0]);if(2===f||3===f){var p=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===f?MathJax.Hub.Typeset(a):MathJax.typeset([a])},d=function(){var e=l.select(2===f?".MathJax_SVG":".MathJax"),a=!e.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===f?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,o,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===f?MathJax.Hub.Queue((function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:h},displayAlign:"left"})}),(function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),p,d,(function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})):3===f&&(o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=h,"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){p(),d(),"svg"!==a&&(MathJax.config.startup.output=a),MathJax.config=o})))}else i.warn("No MathJax version:",MathJax.version)}(E[2],o,(function(n,i,o){I.selectAll("svg."+P).remove(),I.selectAll("g."+P+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return z(),void e();var l=I.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var h=t.node().style.fill||"black",f=s.select("g");f.attr({fill:h,stroke:h});var p=f.node().getBoundingClientRect(),d=p.width,m=p.height;(d>c||m>u)&&(s.style("overflow","hidden"),d=(p=s.node().getBoundingClientRect()).width,m=p.height);var y=+t.attr("x"),v=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===P[0])l.attr({transform:"rotate("+[-90,y,v]+")"+a(-d/2,x-m/2)});else if("l"===P[0])v=x-m/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))y=0,v=x;else{var _=t.attr("text-anchor");y-=d*("middle"===_?.5:"end"===_?1:0),v=v+x-m/2}s.attr({x:y,y:v}),g&&g.call(t,l),e(l)}))}))):z(),t}function z(){I.empty()||(P=t.attr("class")+"-math",I.select("svg."+P).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(y," ");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a<i.length;a++)h(i[a])}function h(t){var e,i=t.type,a={};if("a"===i){e="a";var s=t.target,c=t.href,u=t.popup;c&&(a={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":c},u&&(a.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+u+'");return false;'))}else e="tspan";t.style&&(a.style=t.style);var h=document.createElementNS(o.svg,e);if("sup"===i||"sub"===i){g(r,m),r.appendChild(h);var f=document.createElementNS(o.svg,"tspan");g(f,m),n.select(f).attr("dy",d[i]),a.dy=p[i],r.appendChild(h),r.appendChild(f)}else r.appendChild(h);n.select(h).attr(a),r=t.node=h,l.push(t)}function g(t,e){t.appendChild(document.createTextNode(e))}function S(t){if(1!==l.length){var n=l.pop();t!==n.type&&i.log("Start tag <"+n.type+"> doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag </"+t+">.",e)}_.test(e)?u():(r=t,l=[{node:t}]);for(var E=e.split(v),I=0;I<E.length;I++){var P=E[I],z=P.match(x),O=z&&z[2].toLowerCase(),D=f[O];if("br"===O)u();else if(void 0===D)g(r,C(P));else if(z[1])S(O);else{var R=z[4],F={type:O},B=A(R,b);if(B?(B=B.replace(M,"$1 fill:"),D&&(B+=";"+D)):D&&(B=D),B&&(F.style=B),"a"===O){a=!0;var N=A(R,w);if(N){var j=L(N);j&&(F.href=j,F.target=A(R,T)||"_blank",F.popup=A(R,k))}}h(F)}}return a}(t.node(),S);r&&t.style("pointer-events","all"),e.positionText(t),g&&g.call(t)}};var c=/(<|&lt;|&#60;)/g,u=/(>|&gt;|&#62;)/g,h=[["$","$"],["\\(","\\)"]],f={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"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},m="​",g=["http:","https:","mailto:","",void 0,":"],y=e.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=/<br(\s+.*)?>/i;e.BR_TAG_ALL=/<br(\s+.*)?>/gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&C(n)}var M=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(v),a=[],o="",s=0,l=0;l<i.length;l++){var c=i[l],u=c.match(x),h=u&&u[2].toLowerCase();if(h)-1!==n.indexOf(h)&&(a.push(c),o=h);else{var f=c.length;if(s+f<r)a.push(c),s+=f;else if(s<r){var p=r-s;o&&("br"!==o||p<=3||f<=3)&&a.pop(),r>3?a.push(c.substr(0,p-3)+"..."):a.push(c.substr(0,p));break}o=""}}return a.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(t){return t.replace(E,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(a)?e:""}function I(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=C,e.sanitizeHTML=function(t){t=t.replace(y," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(v),o=0;o<a.length;o++){var s=a[o],l=s.match(x),c=l&&l[2].toLowerCase();if(c in f)if(l[1])i.length&&(r=i.pop());else{var u=l[4],h=A(u,b),p=h?{style:h}:{};if("a"===c){var d=A(u,w);if(d){var m=L(d);if(m){p.href=m;var g=A(u,T);g&&(p.target=g)}}}var _=document.createElement(c);r.appendChild(_),n.select(_).attr(p),r=_,i.push(_)}else r.appendChild(document.createTextNode(C(s)))}return e.innerHTML},e.lineCount=function(t){return t.selectAll("tspan.line").size()||1},e.positionText=function(t,e,r){return t.each((function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i("x",e),o=i("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:a,y:o})}))};var P="1px ";e.makeTextShadow=function(t){return P+P+P+t+", -"+P+"-"+P+P+t+", "+P+"-"+P+P+t+", -"+P+P+P+t},e.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch("edit","input","cancel"),o=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");function s(){var i,s,c,u,h;i=n.select(r).select(".svg-container"),s=i.append("div"),c=t.node().style,u=parseFloat(c.fontSize||12),void 0===(h=e.text)&&(h=t.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":c.fontFamily||"Arial","font-size":u,color:e.fill||c.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-u/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(h).call(I(t,i,e)).on("blur",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr("class");(e=i?"."+i.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),a.edit.call(t,o)})).on("focus",(function(){var t=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(I(t,i,e)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var f,p=o.attr("class");(f=p?"."+p.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(f).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,a,"on")}},64025:function(t,e){"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var a=r[t],o=Date.now();if(!a){for(var s in r)r[s].ts<o-6e4&&delete r[s];a=r[t]={ts:0,timer:null}}function l(){i(),a.ts=Date.now(),a.onDone&&(a.onDone(),a.onDone=null)}n(a),o>a.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},8083:function(t,e,r){"use strict";var n=r(10721);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},11577:function(t,e,r){"use strict";var n=t.exports={},i=r(74285).locationmodeToLayer,a=r(48640).N4;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},44611:function(t){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},30227:function(t){"use strict";t.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"}}},56037:function(t,e,r){"use strict";var n=r(33626);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||""}:{array:e,index:"",property:""}}},13582:function(t,e,r){"use strict";var n=r(93049).extendFlat,i=r(56174),a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},o={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},s=a.flags.slice().concat(["fullReplot"]),l=o.flags.slice().concat("layoutReplot");function c(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function u(t,e,r){var a=n({},t);for(var o in a){var s=a[o];i(s)&&(a[o]=h(s,e,0,o))}return"from-root"===r&&(a.editType=e),a}function h(t,e,r,i){if(t.valType){var a=n({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=h(t.items[o],e)}return a}return u(t,e,"_"===i.charAt(0)?"nested":"from-root")}t.exports={traces:a,layout:o,traceFlags:function(){return c(s)},layoutFlags:function(){return c(l)},update:function(t,e){var r=e.editType;if(r&&"none"!==r)for(var n=r.split("+"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:u}},10887:function(t,e,r){"use strict";var n=r(10721),i=r(36472),a=r(33626),o=r(34809),s=r(44122),l=r(5975),c=r(78766),u=l.cleanId,h=l.getFromTrace,f=a.traceIs;function p(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=u(r,n,!0))}function d(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&("string"!=typeof t.title&&"number"!=typeof t.title||(t.title={text:t.title}),e("titlefont","font"),e("titleposition","position"),e("titleside","side"),e("titleoffset","offset"))}function m(t){if(!o.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,("string"==typeof e||"number"==typeof e)&&String(e)}function g(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,a=Math.min(t.length,e.length);for(i=0;i<a&&t.charAt(i)===e.charAt(i);i++);return t.substr(0,i).trim()}function y(t){var e="middle",r="center";return"string"==typeof t&&(-1!==t.indexOf("top")?e="top":-1!==t.indexOf("bottom")&&(e="bottom"),-1!==t.indexOf("left")?r="left":-1!==t.indexOf("right")&&(r="right")),e+" "+r}function v(t,e){return e in t&&"object"==typeof t[e]&&0===Object.keys(t[e]).length}e.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,h=(s.subplotsRegistry.ternary||{}).attrRegex,f=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(t);for(r=0;r<m.length;r++){var g=m[r];if(a&&a.test(g)){var y=t[g];y.anchor&&"free"!==y.anchor&&(y.anchor=u(y.anchor)),y.overlaying&&(y.overlaying=u(y.overlaying)),y.type||(y.isdate?y.type="date":y.islog?y.type="log":!1===y.isdate&&!1===y.islog&&(y.type="linear")),"withzero"!==y.autorange&&"tozero"!==y.autorange||(y.autorange=!0,y.rangemode="tozero"),y.insiderange&&delete y.range,delete y.islog,delete y.isdate,delete y.categories,v(y,"domain")&&delete y.domain,void 0!==y.autotick&&(void 0===y.tickmode&&(y.tickmode=y.autotick?"auto":"linear"),delete y.autotick),d(y)}else if(l&&l.test(g))d(t[g].radialaxis);else if(h&&h.test(g)){var x=t[g];d(x.aaxis),d(x.baxis),d(x.caxis)}else if(f&&f.test(g)){var _=t[g],b=_.cameraposition;if(Array.isArray(b)&&4===b[0].length){var w=b[0],T=b[1],k=b[2],A=i([],w),M=[];for(n=0;n<3;++n)M[n]=T[n]+k*A[2+4*n];_.camera={eye:{x:M[0],y:M[1],z:M[2]},center:{x:T[0],y:T[1],z:T[2]},up:{x:0,y:0,z:1}},delete _.cameraposition}d(_.xaxis),d(_.yaxis),d(_.zaxis)}}var S=Array.isArray(t.annotations)?t.annotations.length:0;for(r=0;r<S;r++){var E=t.annotations[r];o.isPlainObject(E)&&(E.ref&&("paper"===E.ref?(E.xref="paper",E.yref="paper"):"data"===E.ref&&(E.xref="x",E.yref="y"),delete E.ref),p(E,"xref"),p(E,"yref"))}var C=Array.isArray(t.shapes)?t.shapes.length:0;for(r=0;r<C;r++){var L=t.shapes[r];o.isPlainObject(L)&&(p(L,"xref"),p(L,"yref"))}var I=Array.isArray(t.images)?t.images.length:0;for(r=0;r<I;r++){var P=t.images[r];o.isPlainObject(P)&&(p(P,"xref"),p(P,"yref"))}var z=t.legend;return z&&(z.x>3?(z.x=1.02,z.xanchor="left"):z.x<-2&&(z.x=-.02,z.xanchor="right"),z.y>3?(z.y=1.02,z.yanchor="bottom"):z.y<-2&&(z.y=-.02,z.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r<t.length;r++){var n,i=t[r];if("histogramy"===i.type&&"xbins"in i&&!("ybins"in i)&&(i.ybins=i.xbins,delete i.xbins),i.error_y&&"opacity"in i.error_y){var l=c.defaults,h=i.error_y.color||(f(i,"bar")?c.defaultLine:l[r%l.length]);i.error_y.color=c.addOpacity(c.rgb(h),c.opacity(h)*i.error_y.opacity),delete i.error_y.opacity}if("bardir"in i&&("h"!==i.bardir||!f(i,"bar")&&"histogram"!==i.type.substr(0,9)||(i.orientation="h",e.swapXYData(i)),delete i.bardir),"histogramy"===i.type&&e.swapXYData(i),"histogramx"!==i.type&&"histogramy"!==i.type||(i.type="histogram"),"scl"in i&&!("colorscale"in i)&&(i.colorscale=i.scl,delete i.scl),"reversescl"in i&&!("reversescale"in i)&&(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&&(i.xaxis=u(i.xaxis,"x")),i.yaxis&&(i.yaxis=u(i.yaxis,"y")),f(i,"gl3d")&&i.scene&&(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!f(i,"pie-like")&&!f(i,"bar-like"))if(Array.isArray(i.textposition))for(n=0;n<i.textposition.length;n++)i.textposition[n]=y(i.textposition[n]);else i.textposition&&(i.textposition=y(i.textposition));var p=a.getModule(i);if(p&&p.colorbar){var x=p.colorbar.container,_=x?i[x]:i;_&&_.colorscale&&("YIGnBu"===_.colorscale&&(_.colorscale="YlGnBu"),"YIOrRd"===_.colorscale&&(_.colorscale="YlOrRd"))}if("surface"===i.type&&o.isPlainObject(i.contours)){var b=["x","y","z"];for(n=0;n<b.length;n++){var w=i.contours[b[n]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===i.type||"ohlc"===i.type){var T=!1!==(i.increasing||{}).showlegend,k=!1!==(i.decreasing||{}).showlegend,A=m(i.increasing),M=m(i.decreasing);if(!1!==A&&!1!==M){var S=g(A,M,T,k);S&&(i.name=S)}else!A&&!M||i.name||(i.name=A||M)}if(Array.isArray(i.transforms)){var E=i.transforms;for(n=0;n<E.length;n++){var C=E[n];if(o.isPlainObject(C))switch(C.type){case"filter":C.filtersrc&&(C.target=C.filtersrc,delete C.filtersrc),C.calendar&&(C.valuecalendar||(C.valuecalendar=C.calendar),delete C.calendar);break;case"groupby":if(C.styles=C.styles||C.style,C.styles&&!Array.isArray(C.styles)){var L=C.styles,I=Object.keys(L);C.styles=[];for(var P=0;P<I.length;P++)C.styles.push({target:I[P],value:L[I[P]]})}}}}v(i,"line")&&delete i.line,"marker"in i&&(v(i.marker,"line")&&delete i.marker.line,v(i,"marker")&&delete i.marker),c.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins),d(i),i.colorbar&&d(i.colorbar),i.marker&&i.marker.colorbar&&d(i.marker.colorbar),i.line&&i.line.colorbar&&d(i.line.colorbar),i.aaxis&&d(i.aaxis),i.baxis&&d(i.baxis)}},e.swapXYData=function(t){var e;if(o.swapAttrs(t,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(t,["error_?.copy_ystyle"]),n&&o.swapAttrs(t,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof t.hoverinfo){var i=t.hoverinfo.split("+");for(e=0;e<i.length;e++)"x"===i[e]?i[e]="y":"y"===i[e]&&(i[e]="x");t.hoverinfo=i.join("+")}},e.coerceTraceIndices=function(t,e){if(n(e))return[e];if(!Array.isArray(e)||!e.length)return t.data.map((function(t,e){return e}));if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)o.isIndex(e[i],t.data.length)?r.push(e[i]):o.warn("trace index (",e[i],") is not a number or is out of bounds");return r}return e},e.manageArrayContainers=function(t,e,r){var i=t.obj,a=t.parts,s=a.length,l=a[s-1],c=n(l);if(c&&null===e){var u=a.slice(0,s-1).join(".");o.nestedProperty(i,u).get().splice(l,1)}else c&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var x=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function _(t){var e=t.search(x);if(e>0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=_(e);r;){if(r in t)return!0;r=_(r)}return!1};var b=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var s=h(t,i,b[a]);if(s&&"log"!==s.type){var l=s._name,c=s._id.substr(1);if("scene"===c.substr(0,5)){if(void 0!==r[c])continue;l=c+"."+l}var u=l+".type";void 0===r[l]&&void 0===r[u]&&o.nestedProperty(t.layout,u).set(null)}}}},90742:function(t,e,r){"use strict";var n=r(31420);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(95425).getGraphDiv,a=r(28231).eraseActiveShape;e.deleteActiveShape=function(t){return a(i(t))},e.toImage=r(80491),e.validate=r(2466),e.downloadImage=r(26452);var o=r(53853);e.makeTemplate=o.makeTemplate,e.validateTemplate=o.validateTemplate},85844:function(t,e,r){"use strict";var n=r(56174),i=r(4969),a=r(48636),o=r(98813).sorterAsc,s=r(33626);e.containerArrayMatch=r(56037);var l=e.isAddVal=function(t){return"add"===t||n(t)},c=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,u){var h=e.astr,f=s.getComponentMethod(h,"supplyLayoutDefaults"),p=s.getComponentMethod(h,"draw"),d=s.getComponentMethod(h,"drawOne"),m=n.replot||n.recalc||f===i||p===i,g=t.layout,y=t._fullLayout;if(r[""]){Object.keys(r).length>1&&a.warn("Full array edits are incompatible with other edits",h);var v=r[""][""];if(c(v))e.set(null);else{if(!Array.isArray(v))return a.warn("Unrecognized full array edit value",h,v),!0;e.set(v)}return!m&&(f(g,y),p(t),!0)}var x,_,b,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=u(y,h).get(),I=[],P=-1,z=C.length;for(x=0;x<S.length;x++)if(w=r[b=S[x]],T=Object.keys(w),k=w[""],A=l(k),b<0||b>C.length-(A?0:1))a.warn("index out of range",h,b);else if(void 0!==k)T.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",h,b),c(k)?I.push(b):A?("add"===k&&(k={}),C.splice(b,0,k),L&&L.splice(b,0,{})):a.warn("Unrecognized full object edit value",h,b,k),-1===P&&(P=b);else for(_=0;_<T.length;_++)M=h+"["+b+"].",u(C[b],T[_],M).set(w[T[_]]);for(x=I.length-1;x>=0;x--)C.splice(I[x],1),L&&L.splice(I[x],1);if(C.length?E||e.set(C):e.set(null),m)return!1;if(f(g,y),d!==i){var O;if(-1===P)O=S;else{for(z=Math.max(C.length,z),O=[],x=0;x<S.length&&!((b=S[x])>=P);x++)O.push(b);for(x=P;x<z;x++)O.push(x)}for(x=0;x<O.length;x++)d(t,O[x])}else p(t);return!0}},31420:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=r(39784),o=r(34809),s=o.nestedProperty,l=r(68596),c=r(40486),u=r(33626),h=r(57297),f=r(44122),p=r(29714),d=r(90259),m=r(25829),g=r(62203),y=r(78766),v=r(95284).initInteractions,x=r(62972),_=r(44844).clearOutline,b=r(24452).dfltConfig,w=r(85844),T=r(10887),k=r(71817),A=r(13582),M=r(54826).AX_NAME_PATTERN,S=0;function E(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function C(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){o.error(t)}}function L(t,e){C(t,y.combine(e,"white"))}function I(t,e){if(!t._context){t._context=o.extendDeep({},b);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,c=t._context;if(e){for(s=Object.keys(e),i=0;i<s.length;i++)"editable"!==(l=s[i])&&"edits"!==l&&l in c&&("setBackground"===l&&"opaque"===e[l]?c[l]=L:c[l]=e[l]);e.plot3dPixelRatio&&!c.plotGlPixelRatio&&(c.plotGlPixelRatio=c.plot3dPixelRatio);var u=e.editable;if(void 0!==u)for(c.editable=u,s=Object.keys(c.edits),i=0;i<s.length;i++)c.edits[s[i]]=u;if(e.edits)for(s=Object.keys(e.edits),i=0;i<s.length;i++)(l=s[i])in c.edits&&(c.edits[l]=e.edits[l]);c._exportedPlot=e._exportedPlot}c.staticPlot&&(c.editable=!1,c.edits={},c.autosizable=!1,c.scrollZoom=!1,c.doubleClick=!1,c.showTips=!1,c.showLink=!1,c.displayModeBar=!1),"hover"!==c.displayModeBar||a||(c.displayModeBar=!0),"transparent"!==c.setBackground&&"function"==typeof c.setBackground||(c.setBackground=C),c._hasZeroHeight=c._hasZeroHeight||0===t.clientHeight,c._hasZeroWidth=c._hasZeroWidth||0===t.clientWidth;var h=c.scrollZoom,f=c._scrollZoom={};if(!0===h)f.cartesian=1,f.gl3d=1,f.geo=1,f.mapbox=1,f.map=1;else if("string"==typeof h){var p=h.split("+");for(i=0;i<p.length;i++)f[p[i]]=1}else!1!==h&&(f.gl3d=1,f.geo=1,f.mapbox=1,f.map=1)}function P(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function z(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error("all values in "+r+" must be integers");if(i>=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function O(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),z(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&z(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function D(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))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 a in z(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].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")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,h,f=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=P(r,t.data.length-1),e)for(var m=0;m<r.length;m++){if(a=t.data[r[m]],l=(c=s(a,d)).get(),u=e[d][m],!o.isArrayOrTypedArray(u))throw new Error("attribute: "+d+" index: "+m+" must be an array");if(!o.isArrayOrTypedArray(l))throw new Error("cannot extend missing or non-array attribute: "+d);if(l.constructor!==u.constructor)throw new Error("cannot extend array with an array of a different type: "+d);h=f?n[d][m]:n,i(h)||(h=-1),p.push({prop:c,target:l,insert:u,maxp:Math.floor(h)})}return p}(t,e,r,n),c={},u={},h=0;h<l.length;h++){var f=l[h].prop,p=l[h].maxp,d=a(l[h].target,l[h].insert,p);f.set(d[0]),Array.isArray(c[f.astr])||(c[f.astr]=[]),c[f.astr].push(d[1]),Array.isArray(u[f.astr])||(u[f.astr]=[]),u[f.astr].push(l[h].target.length)}return{update:c,maxPoints:u}}function R(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function F(t,r,n,i){t=o.getGraphDiv(t),T.clearPromiseQueue(t);var a={};if("string"==typeof r)a[r]=n;else{if(!o.isPlainObject(r))return o.warn("Restyle fail.",r,n,i),Promise.reject();a=o.extendFlat({},r),void 0===i&&(i=n)}Object.keys(a).length&&(t.changed=!0);var s=T.coerceTraceIndices(t,i),l=U(t,a,s),u=l.flags;u.calc&&(t.calcdata=void 0),u.clearAxisTypes&&T.clearAxisTypes(t,s,{});var h=[];u.fullReplot?h.push(e._doPlot):(h.push(f.previousPromises),f.supplyDefaults(t),u.markerSize&&(f.doCalcdata(t),G(h)),u.style&&h.push(k.doTraceStyle),u.colorbars&&h.push(k.doColorBars),h.push(E)),h.push(f.rehover,f.redrag,f.reselect),c.add(t,F,[t,l.undoit,l.traces],F,[t,l.redoit,l.traces]);var p=o.syncOrAsync(h,t);return p&&p.then||(p=Promise.resolve()),p.then((function(){return t.emit("plotly_restyle",l.eventData),t}))}function B(t){return void 0===t?null:t}function N(t,e){return e?function(e,r,n){var i=s(e,r),a=i.set;return i.set=function(e){j((n||"")+r,i.get(),e,t),a(e)},i}:s}function j(t,e,r,n){if(Array.isArray(e)||Array.isArray(r))for(var i=Array.isArray(e)?e:[],a=Array.isArray(r)?r:[],s=Math.max(i.length,a.length),l=0;l<s;l++)j(t+"["+l+"]",i[l],a[l],n);else if(o.isPlainObject(e)||o.isPlainObject(r)){var c=o.isPlainObject(e)?e:{},u=o.isPlainObject(r)?r:{},h=o.extendFlat({},c,u);for(var f in h)j(t+"."+f,c[f],u[f],n)}else void 0===n[t]&&(n[t]=B(e))}function U(t,e,r){var n,i=t._fullLayout,a=t._fullData,l=t.data,c=i._guiEditing,d=N(i._preGUI,c),m=o.extendDeepAll({},e);V(e);var g,y=A.traceFlags(),v={},x={};function _(){return r.map((function(){}))}function b(t){var e=p.id2name(t);-1===g.indexOf(e)&&g.push(e)}function w(t){return"LAYOUT"+t+".autorange"}function k(t){return"LAYOUT"+t+".range"}function M(t){for(var e=t;e<a.length;e++)if(a[e]._input===l[t])return a[e]}function S(n,a,o){if(Array.isArray(n))n.forEach((function(t){S(t,a,o)}));else if(!(n in e)&&!T.hasParent(e,n)){var s;if("LAYOUT"===n.substr(0,6))s=d(t.layout,n.replace("LAYOUT",""));else{var u=r[o];s=N(i._tracePreGUI[M(u)._fullInput.uid],c)(l[u],n)}n in x||(x[n]=_()),void 0===x[n][o]&&(x[n][o]=B(s.get())),void 0!==a&&s.set(a)}}function E(t){return function(e){return a[e][t]}}function C(t){return function(e,n){return!1===e?a[r[n]][t]:null}}for(var L in e){if(T.hasParent(e,L))throw new Error("cannot set "+L+" and a parent attribute simultaneously");var I,P,z,O,D,R,F=e[L];if("autobinx"!==L&&"autobiny"!==L||(L=L.charAt(L.length-1)+"bins",F=Array.isArray(F)?F.map(C(L)):!1===F?r.map(E(L)):null),v[L]=F,"LAYOUT"!==L.substr(0,6)){for(x[L]=_(),n=0;n<r.length;n++)if(I=l[r[n]],P=M(r[n]),O=(z=N(i._tracePreGUI[P._fullInput.uid],c)(I,L)).get(),void 0!==(D=Array.isArray(F)?F[n%F.length]:F)){var j=z.parts[z.parts.length-1],U=L.substr(0,L.length-j.length-1),q=U?U+".":"",H=U?s(P,U).get():P;if((R=h.getTraceValObject(P,z.parts))&&R.impliedEdits&&null!==D)for(var G in R.impliedEdits)S(o.relativeAttr(L,G),R.impliedEdits[G],n);else if("thicknessmode"!==j&&"lenmode"!==j||O===D||"fraction"!==D&&"pixels"!==D||!H){if("type"===L&&("pie"===D!=("pie"===O)||"funnelarea"===D!=("funnelarea"===O))){var Z="x",W="y";"bar"!==D&&"bar"!==O||"h"!==I.orientation||(Z="y",W="x"),o.swapAttrs(I,["?","?src"],"labels",Z),o.swapAttrs(I,["d?","?0"],"label",Z),o.swapAttrs(I,["?","?src"],"values",W),"pie"===O||"funnelarea"===O?(s(I,"marker.color").set(s(I,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):u.traceIs(I,"cartesian")&&s(I,"marker.colors").set(s(I,"marker.color").get())}}else{var Y=i._size,X=H.orient,$="top"===X||"bottom"===X;if("thicknessmode"===j){var J=$?Y.h:Y.w;S(q+"thickness",H.thickness*("fraction"===D?1/J:J),n)}else{var K=$?Y.w:Y.h;S(q+"len",H.len*("fraction"===D?1/K:K),n)}}if(x[L][n]=B(O),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(L)){if("orientation"===L){z.set(D);var Q=I.x&&!I.y?"h":"v";if((z.get()||Q)===P.orientation)continue}else"orientationaxes"===L&&(I.orientation={v:"h",h:"v"}[P.orientation]);T.swapXYData(I),y.calc=y.clearAxisTypes=!0}else-1!==f.dataArrayContainers.indexOf(z.parts[0])?(T.manageArrayContainers(z,D,x),y.calc=!0):(R?R.arrayOk&&!u.traceIs(P,"regl")&&(o.isArrayOrTypedArray(D)||o.isArrayOrTypedArray(O))?y.calc=!0:A.update(y,R):y.calc=!0,z.set(D))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(L)&&p.swap(t,r),"orientationaxes"===L){var tt=s(t.layout,"hovermode"),et=tt.get();"x"===et?tt.set("y"):"y"===et?tt.set("x"):"x unified"===et?tt.set("y unified"):"y unified"===et&&tt.set("x unified")}if(-1!==["orientation","type"].indexOf(L)){for(g=[],n=0;n<r.length;n++){var rt=l[r[n]];u.traceIs(rt,"cartesian")&&(b(rt.xaxis||"x"),b(rt.yaxis||"y"))}S(g.map(w),!0,0),S(g.map(k),[0,1],0)}}else z=d(t.layout,L.replace("LAYOUT","")),x[L]=[B(z.get())],z.set(Array.isArray(F)?F[0]:F),y.calc=!0}return(y.calc||y.plot)&&(y.fullReplot=!0),{flags:y,undoit:x,redoit:v,traces:r,eventData:o.extendDeepNoArrays([],[m,r])}}function V(t){var e,r,n,i=o.counterRegex("axis",".title",!1,!1),a=/colorbar\.title$/,s=Object.keys(t);for(e=0;e<s.length;e++)r=s[e],n=t[r],"title"!==r&&!i.test(r)&&!a.test(r)||"string"!=typeof n&&"number"!=typeof n?r.indexOf("titlefont")>-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function q(t,e,r){t=o.getGraphDiv(t),T.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=X(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[f.previousPromises];a.layoutReplot?s.push(k.layoutReplot):Object.keys(n).length&&(H(t,a,i)||f.supplyDefaults(t),a.legend&&s.push(k.doLegend),a.layoutstyle&&s.push(k.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(k.doTicksRelayout),a.modebar&&s.push(k.doModeBar),a.camera&&s.push(k.doCamera),a.colorbars&&s.push(k.doColorBars),s.push(E)),s.push(f.rehover,f.redrag,f.reselect),c.add(t,q,[t,i.undoit],q,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function H(t,e,r){var n,i,a=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return o.coerce(n,i,m,t,e)},c={};for(var u in r.rangesAltered){var h=p.id2name(u);if(n=t.layout[h],i=a[h],d(n,i,l,c),i._matchGroup)for(var f in i._matchGroup)if(f!==u){var g=a[p.id2name(f)];g.autorange=i.autorange,g.range=i.range.slice(),g._input.range=i.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)e[a]||r.push(a)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,"redraw")};t.push(_,k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}var Z=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,W=/^[xyz]axis[0-9]*\.autorange$/,Y=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,f=N(l._preGUI,c),d=Object.keys(e),m=p.list(t),g=o.extendDeepAll({},e),y={};for(V(e),d=Object.keys(e),n=0;n<d.length;n++)if(0===d[n].indexOf("allaxes")){for(i=0;i<m.length;i++){var v=m[i]._id.substr(1),x=-1!==v.indexOf("scene")?v+".":"",_=d[n].replace("allaxes",x+m[i]._name);e[_]||(e[_]=e[d[n]])}delete e[d[n]]}var b=A.layoutFlags(),k={},S={};function E(t,r){if(Array.isArray(t))t.forEach((function(t){E(t,r)}));else if(!(t in e)&&!T.hasParent(e,t)){var n=f(a,t);t in S||(S[t]=B(n.get())),void 0!==r&&n.set(r)}}var C,L={};function I(t){var e=p.name2id(t.split(".")[0]);return L[e]=1,e}for(var P in e){if(T.hasParent(e,P))throw new Error("cannot set "+P+" and a parent attribute simultaneously");for(var z=f(a,P),O=e[P],D=z.parts.length-1;D>0&&"string"!=typeof z.parts[D];)D--;var R=z.parts[D],F=z.parts[D-1]+"."+R,j=z.parts.slice(0,D).join("."),U=s(t.layout,j).get(),q=s(l,j).get(),H=z.get();if(void 0!==O){k[P]=O,S[P]="reverse"===R?O:B(H);var G=h.getLayoutValObject(l,z.parts);if(G&&G.impliedEdits&&null!==O)for(var X in G.impliedEdits)E(o.relativeAttr(P,X),G.impliedEdits[X]);if(-1!==["width","height"].indexOf(P))if(O){E("autosize",null);var J="height"===P?"width":"height";E(J,l[J])}else l[P]=t._initialAutoSize[P];else if("autosize"===P)E("width",O?null:l.width),E("height",O?null:l.height);else if(F.match(Z))I(F),s(l,j+"._inputRange").set(null);else if(F.match(W)){I(F),s(l,j+"._inputRange").set(null);var K=s(l,j).get();K._inputDomain&&(K._input.domain=K._inputDomain.slice())}else F.match(Y)&&s(l,j+"._inputDomain").set(null);if("type"===R){C=U;var Q="linear"===q.type&&"log"===O,tt="log"===q.type&&"linear"===O;if(Q||tt){if(C&&C.range)if(q.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],rt=C.range[1];Q?(et<=0&&rt<=0&&E(j+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(j+".range[0]",Math.log(et)/Math.LN10),E(j+".range[1]",Math.log(rt)/Math.LN10)):(E(j+".range[0]",Math.pow(10,et)),E(j+".range[1]",Math.pow(10,rt)))}else E(j+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete l[z.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,q,O,E),u.getComponentMethod("images","convertCoords")(t,q,O,E)}else E(j+".autorange",!0),E(j+".range",null);s(l,j+"._inputRange").set(null)}else if(R.match(M)){var nt=s(l,P).get(),it=(O||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,nt,it,E),u.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=w.containerArrayMatch(P);if(at){r=at.array,n=at.index;var ot=at.property,st=G||{editType:"calc"};""!==n&&""===ot&&(w.isAddVal(O)?S[P]=null:w.isRemoveVal(O)?S[P]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),A.update(b,st),y[r]||(y[r]={});var lt=y[r][n];lt||(lt=y[r][n]={}),lt[ot]=O,delete e[P]}else"reverse"===R?(U.range?U.range.reverse():(E(j+".autorange",!0),U.range=[1,0]),q.autorange?b.calc=!0:b.plot=!0):("dragmode"===P&&(!1===O&&!1!==H||!1!==O&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===O||"select"===O)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?b.plot=!0:G?A.update(b,G):b.calc=!0,z.set(O))}}for(r in y)w.applyContainerArrayChanges(t,f(a,r),y[r],b,f)||(b.plot=!0);for(var ct in L){var ut=(C=p.getFromId(t,ct))&&C._constraintGroup;if(ut)for(var ht in b.calc=!0,ut)L[ht]||(p.getFromId(t,ht)._constraintShrinkable=!0)}($(t)||e.height||e.width)&&(b.plot=!0);var ft=l.shapes;for(n=0;n<ft.length;n++)if(ft[n].showlegend){b.calc=!0;break}return(b.plot||b.calc)&&(b.layoutReplot=!0),{flags:b,rangesAltered:L,undoit:S,redoit:k,eventData:g}}function $(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&f.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function J(t,r,n,i){t=o.getGraphDiv(t),T.clearPromiseQueue(t),o.isPlainObject(r)||(r={}),o.isPlainObject(n)||(n={}),Object.keys(r).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=T.coerceTraceIndices(t,i),s=U(t,o.extendFlat({},r),a),l=s.flags,u=X(t,o.extendFlat({},n)),h=u.flags;(l.calc||h.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&T.clearAxisTypes(t,a,n);var p=[];h.layoutReplot?p.push(k.layoutReplot):l.fullReplot?p.push(e._doPlot):(p.push(f.previousPromises),H(t,h,u)||f.supplyDefaults(t),l.style&&p.push(k.doTraceStyle),(l.colorbars||h.colorbars)&&p.push(k.doColorBars),h.legend&&p.push(k.doLegend),h.layoutstyle&&p.push(k.layoutStyles),h.axrange&&G(p,u.rangesAltered),h.ticks&&p.push(k.doTicksRelayout),h.modebar&&p.push(k.doModeBar),h.camera&&p.push(k.doCamera),p.push(E)),p.push(f.rehover,f.redrag,f.reselect),c.add(t,J,[t,s.undoit,u.undoit,s.traces],J,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit("plotly_update",{data:s.eventData,layout:u.eventData}),t}))}function K(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var Q=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],tt=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function et(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t.match(n.pattern);if(i){var a=i[1]||"";return{head:a,tail:t.substr(a.length+1),attr:n.attr}}}}function rt(t,e){var r=s(e,t).get();if(void 0!==r)return r;var n=t.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r<e.length;r++)if(e[r]._fullInput.uid===t)return r;return-1}function it(t,e,r){for(var n=0;n<e.length;n++)if(e[n].uid===t)return n;return!e[r]||e[r].uid?-1:r}function at(t,e){var r=o.isPlainObject(t),n=Array.isArray(t);return r||n?(r&&o.isPlainObject(e)||n&&Array.isArray(e))&&JSON.stringify(t)===JSON.stringify(e):t===e}function ot(t,e,r,n){var i,a,l,c=n.getValObject,u=n.flags,h=n.immutable,f=n.inArray,p=n.arrayIndex;function d(){var t=i.editType;f&&-1!==t.indexOf("arraydraw")?o.pushUnique(u.arrays[f],p):(A.update(u,i),"none"!==t&&u.nChanges++,n.transition&&i.anim&&u.nChangesAnim++,(Z.test(l)||W.test(l))&&(u.rangesAltered[r[0]]=1),Y.test(l)&&s(e,"_inputDomain").set(null),"datarevision"===a&&(u.newDataRevision=1))}function m(t){return"data_array"===t.valType||t.arrayOk}for(a in t){if(u.calc&&!n.transition)return;var g=t[a],y=e[a],v=r.concat(a);if(l=v.join("."),"_"!==a.charAt(0)&&"function"!=typeof g&&g!==y){if(("tick0"===a||"dtick"===a)&&"geo"!==r[0]){var x=e.tickmode;if("auto"===x||"array"===x||!x)continue}if(("range"!==a||!e.autorange)&&("zmin"!==a&&"zmax"!==a||"contourcarpet"!==e.type)&&(i=c(v))&&(!i._compareAsJSON||JSON.stringify(g)!==JSON.stringify(y))){var _,b=i.valType,w=m(i),T=Array.isArray(g),k=Array.isArray(y);if(T&&k){var M="_input_"+a,S=t[M],E=e[M];if(Array.isArray(S)&&S===E)continue}if(void 0===y)w&&T?u.calc=!0:d();else if(i._isLinkedToArray){var C=[],L=!1;f||(u.arrays[a]=C);var I=Math.min(g.length,y.length),P=Math.max(g.length,y.length);if(I!==P){if("arraydraw"!==i.editType){d();continue}L=!0}for(_=0;_<I;_++)ot(g[_],y[_],v.concat(_),o.extendFlat({inArray:a,arrayIndex:_},n));if(L)for(_=I;_<P;_++)C.push(_)}else!b&&o.isPlainObject(g)?ot(g,y,v,n):w?T&&k?(h&&(u.calc=!0),(h||n.newDataRevision)&&d()):T!==k?u.calc=!0:d():T&&k&&g.length===y.length&&String(g)===String(y)||d()}}}for(a in e)if(!(a in t)&&"_"!==a.charAt(0)&&"function"!=typeof e[a]){if(m(i=c(r.concat(a)))&&Array.isArray(e[a]))return void(u.calc=!0);d()}}function st(t,e){var r;for(r in t)if("_"!==r.charAt(0)){var n=t[r],i=e[r];if(n!==i)if(o.isPlainObject(n)&&o.isPlainObject(i)){if(st(n,i))return!0}else{if(!Array.isArray(n)||!Array.isArray(i))return!0;if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a]){if(!o.isPlainObject(n[a])||!o.isPlainObject(i[a]))return!0;if(st(n[a],i[a]))return!0}}}}function lt(t){var e=t._fullLayout,r=t.getBoundingClientRect();if(!o.equalDomRects(r,e._lastBBox)){var n=e._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(t));e._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),e._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),e._lastBBox=r}}e.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=f.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,u){function h(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,f.transition(t,e.frame.data,e.frame.layout,T.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var p,d,m=0;function g(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],v=null==e,x=Array.isArray(e);if(v||x||!o.isPlainObject(e)){if(v||-1!==["string","number"].indexOf(typeof e))for(p=0;p<n._frames.length;p++)(d=n._frames[p])&&(v||String(d.group)===String(e))&&y.push({type:"byname",name:String(d.name),data:g({name:d.name})});else if(x)for(p=0;p<e.length;p++){var _=e[p];-1!==["number","string"].indexOf(typeof _)?(_=String(_),y.push({type:"byname",name:_,data:g({name:_})})):o.isPlainObject(_)&&y.push({type:"object",data:g(o.extendFlat({},_))})}}else y.push({type:"object",data:g(o.extendFlat({},e))});for(p=0;p<y.length;p++)if("byname"===(d=y[p]).type&&!n._frameHash[d.data.name])return o.warn('animate failure: frame not found: "'+d.data.name+'"'),void u();-1!==["next","immediate"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var e=n._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit("plotly_animationinterrupted",[])}}(),"reverse"===r.direction&&y.reverse();var b=t._fullLayout._currentFrame;if(b&&r.fromcurrent){var w=-1;for(p=0;p<y.length;p++)if("byname"===(d=y[p]).type&&d.name===b){w=p;break}if(w>0&&w<y.length-1){var k=[];for(p=0;p<y.length;p++)d=y[p],("byname"!==y[p].type||p>w)&&k.push(d);y=k}}y.length>0?function(e){if(0!==e.length){for(var i=0;i<e.length;i++){var o;o="byname"===e[i].type?f.computeFrame(t,e[i].name):e[i].data;var p=l(i),d=s(i);d.duration=Math.min(d.duration,p.duration);var m={frame:o,name:e[i].name,frameOpts:p,transitionOpts:d};i===e.length-1&&(m.onComplete=c(a,2),m.onInterrupt=u),n._frameQueue.push(m)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||h()}}(y):(t.emit("plotly_animated"),a())}))},e.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,s,l=t._transitionData._frames,u=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+e);var h=l.length+2*e.length,p=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var m=e[n].name,g=(u[m]||d[m]||{}).name,y=e[n].name,v=u[g]||d[g];g&&y&&"number"==typeof y&&v&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(u[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&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.")),d[m]={name:m},p.push({frame:f.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:h+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index<e.index?1:0}));var x=[],_=[],b=l.length;for(n=p.length-1;n>=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+t._transitionData._counter++];);if(u[i.name]){for(a=0;a<l.length&&(l[a]||{}).name!==i.name;a++);x.push({type:"replace",index:a,value:i}),_.unshift({type:"replace",index:a,value:l[a]})}else s=Math.max(0,Math.min(p[n].index,b)),x.push({type:"insert",index:s,value:i}),_.unshift({type:"delete",index:s}),b++}var w=f.modifyFrames,T=f.modifyFrames,k=[t,_],A=[t,x];return c&&c.add(t,w,k,T,A),f.modifyFrames(t,x)},e.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice()).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=f.modifyFrames,u=f.modifyFrames,h=[t,s],p=[t,a];return c&&c.add(t,l,h,u,p),f.modifyFrames(t,a)},e.addTraces=function t(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],u=e.deleteTraces,h=t,f=[r,l],p=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n<e.length;n++)if("object"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error("all values in traces array must be non-array objects");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==e.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(r,n,i),Array.isArray(n)||(n=[n]),n=n.map((function(t){return o.extendFlat({},t)})),T.cleanData(n),a=0;a<n.length;a++)r.data.push(n[a]);for(a=0;a<n.length;a++)l.push(-n.length+a);if(void 0===i)return s=e.redraw(r),c.add(r,u,f,h,p),s;Array.isArray(i)||(i=[i]);try{O(r,l,i)}catch(t){throw r.data.splice(r.data.length-n.length,n.length),t}return c.startSequence(r),c.add(r,u,f,h,p),s=e.moveTraces(r,l,i),c.stopSequence(r),s},e.deleteTraces=function t(r,n){r=o.getGraphDiv(r);var i,a,s=[],l=e.addTraces,u=t,h=[r,s,n],f=[r,n];if(void 0===n)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),z(r,n,"indices"),(n=P(n,r.data.length-1)).sort(o.sorterDes),i=0;i<n.length;i+=1)a=r.data.splice(n[i],1)[0],s.push(a);var p=e.redraw(r);return c.add(r,l,h,u,f),p},e.extendTraces=function t(r,n,i,a){var s=D(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=R(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var c=r-e.length,u=t.length-c;n.set(t.subarray(u)),n.set(e,c),i.set(t.subarray(0,u))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]})),l=e.redraw(r),u=[r,s.update,i,s.maxPoints];return c.add(r,e.prependTraces,u,t,arguments),l},e.moveTraces=function t(r,n,i){var a,s=[],l=[],u=t,h=t,f=[r=o.getGraphDiv(r),i,n],p=[r,n,i];if(O(r,n,i),n=Array.isArray(n)?n:[n],void 0===i)for(i=[],a=0;a<n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=P(n,r.data.length-1),i=P(i,r.data.length-1),a=0;a<r.data.length;a++)-1===n.indexOf(a)&&s.push(r.data[a]);for(a=0;a<n.length;a++)l.push({newIndex:i[a],trace:r.data[n[a]]});for(l.sort((function(t,e){return t.newIndex-e.newIndex})),a=0;a<l.length;a+=1)s.splice(l[a].newIndex,0,l[a].trace);r.data=s;var d=e.redraw(r);return c.add(r,u,f,h,p),d},e.prependTraces=function t(r,n,i,a){var s=D(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=R(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var c=r-e.length;n.set(e),n.set(t.subarray(0,c),e.length),i.set(t.subarray(c))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]})),l=e.redraw(r),u=[r,s.update,i,s.maxPoints];return c.add(r,e.extendTraces,u,t,arguments),l},e.newPlot=function(t,r,n,i){return t=o.getGraphDiv(t),f.cleanPlot([],{},t._fullData||[],t._fullLayout||{}),f.purge(t),e._doPlot(t,r,n,i)},e._doPlot=function(t,r,i,a){var s;if(t=o.getGraphDiv(t),l.init(t),o.isPlainObject(r)){var c=r;r=c.data,i=c.layout,a=c.config,s=c.frames}if(!1===l.triggerHandler(t,"plotly_beforeplot",[r,i,a]))return Promise.reject();r||i||o.isPlotDiv(t)||o.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",t),I(t,a),i||(i={}),n.select(t).classed("js-plotly-plot",!0),g.makeTester(),Array.isArray(t._promises)||(t._promises=[]);var h=0===(t.data||[]).length&&Array.isArray(r);Array.isArray(r)&&(T.cleanData(r),h?t.data=r:t.data.push.apply(t.data,r),t.empty=!1),t.layout&&!h||(t.layout=T.cleanLayout(i)),f.supplyDefaults(t);var d=t._fullLayout,m=d._has("cartesian");d._replotting=!0,(h||d._shouldCreateBgLayer)&&(function(t){var e=n.select(t),r=t._fullLayout;if(r._calcInverseTransform=lt,r._calcInverseTransform(t),r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};n.selectAll("defs").each((function(){this.id&&(i[this.id.split("-")[1]]=1)})),r._uid=o.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(x.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var s=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=s.append("g").classed("imagelayer",!0),r._shapeUpperLayer=s.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),t.emit("plotly_framework")}(t),d._shouldCreateBgLayer&&delete d._shouldCreateBgLayer),g.initGradients(t),g.initPatterns(t),h&&p.saveShowSpikeInitial(t);var y=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;y&&f.doCalcdata(t);for(var _=0;_<t.calcdata.length;_++)t.calcdata[_][0].trace=t._fullData[_];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){o.isHidden(t)||f.resize(t)},window.addEventListener("resize",t._responsiveChartHandler)):o.clearResponsive(t);var b=o.extendFlat({},d._size),w=0;function A(){if(f.clearAutoMarginIds(t),k.drawMarginPushers(t),p.allowAutoMargin(t),t._fullLayout.title.text&&t._fullLayout.title.automargin&&f.allowAutoMargin(t,"title.automargin"),d._has("pie"))for(var e=t._fullData,r=0;r<e.length;r++){var n=e[r];"pie"===n.type&&n.automargin&&f.allowAutoMargin(t,"pie."+n.uid+".automargin")}return f.doAutoMargin(t),f.previousPromises(t)}function M(){t._transitioning||(k.doAutoRangeAndConstraints(t),h&&p.saveRangeInitial(t),u.getComponentMethod("rangeslider","calcAutorange")(t))}var S=[f.previousPromises,function(){if(s)return e.addFrames(t,s)},function e(){for(var r=d._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);!d._glcanvas&&d._has("gl")&&(d._glcanvas=d._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],(function(t){return t.key})),d._glcanvas.enter().append("canvas").attr("class",(function(t){return"gl-canvas gl-canvas-"+t.key.replace("Layer","")})).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var i=t._context.plotGlPixelRatio;if(d._glcanvas){d._glcanvas.attr("width",d.width*i).attr("height",d.height*i).style("width",d.width+"px").style("height",d.height+"px");var a=d._glcanvas.data()[0].regl;if(a&&(Math.floor(d.width*i)!==a._gl.drawingBufferWidth||Math.floor(d.height*i)!==a._gl.drawingBufferHeight)){var s="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!w)return o.log(s+" Clearing graph and plotting again."),f.cleanPlot([],{},t._fullData,d),f.supplyDefaults(t),d=t._fullLayout,f.doCalcdata(t),w++,e();o.error(s)}}return"h"===d.modebar.orientation?d._modebardiv.style("height",null).style("width","100%"):d._modebardiv.style("width",null).style("height",d.height+"px"),f.previousPromises(t)},A,function(){if(f.didMarginChange(b,d._size))return o.syncOrAsync([A,k.layoutStyles],t)}];m&&S.push((function(){if(y)return o.syncOrAsync([u.getComponentMethod("shapes","calcAutorange"),u.getComponentMethod("annotations","calcAutorange"),M],t);M()})),S.push(k.layoutStyles),m&&S.push((function(){return p.draw(t,h?"":"redraw")}),(function(t){var e=t._fullLayout._insideTickLabelsUpdaterange;if(e)return t._fullLayout._insideTickLabelsUpdaterange=void 0,q(t,e).then((function(){p.saveRangeInitial(t,!0)}))})),S.push(k.drawData,k.finalDraw,v,f.addLinks,f.rehover,f.redrag,f.reselect,f.doAutoMargin,f.previousPromises);var C=o.syncOrAsync(S,t);return C&&C.then||(C=Promise.resolve()),C.then((function(){return E(t),t}))},e.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return f.cleanPlot([],{},r,e),f.purge(t),l.purge(t),e._container&&e._container.remove(),delete t._context,t},e.react=function(t,r,n,i){var a,l;t=o.getGraphDiv(t),T.clearPromiseQueue(t);var c=t._fullData,p=t._fullLayout;if(o.isPlotDiv(t)&&c&&p){if(o.isPlainObject(r)){var d=r;r=d.data,n=d.layout,i=d.config,a=d.frames}var m=!1;if(i){var g=o.extendDeep({},t._context);t._context=void 0,I(t,i),m=st(g,t._context)}t.data=r||[],T.cleanData(t.data),t.layout=n||{},T.cleanLayout(t.layout),function(t,e,r,n){var i,a,l,c,u,h,f,p,d,m,g=n._preGUI,y=[],v={},x={};for(i in g){if(u=et(i,Q)){if(d=u.head,m=u.tail,a=u.attr||d+".uirevision",(c=(l=s(n,a).get())&&rt(a,e))&&c===l){if(null===(h=g[i])&&(h=void 0),at(p=(f=s(e,i)).get(),h)){void 0===p&&"autorange"===m&&y.push(d),f.set(B(s(n,i).get()));continue}if("autorange"===m||"range["===m.substr(0,6)){var _=g[d+".range[0]"],b=g[d+".range[1]"],w=g[d+".autorange"];if(w||null===w&&null===_&&null===b){if(!(d in v)){var T=s(e,d).get();v[d]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(v[d]){f.set(B(s(n,i).get()));continue}}}}}else o.warn("unrecognized GUI edit: "+i);delete g[i],u&&"range["===u.tail.substr(0,6)&&(x[u.head]=1)}for(var k=0;k<y.length;k++){var A=y[k];if(x[A]){var M=s(e,A).get();M&&delete M.autorange}}var S=n._tracePreGUI;for(var E in S){var C,L=S[E],I=null;for(i in L){if(!I){var P=nt(E,r);if(P<0){delete S[E];break}var z=it(E,t,(C=r[P]._fullInput).index);if(z<0){delete S[E];break}I=t[z]}if(u=et(i,tt)){if(u.attr?c=(l=s(n,u.attr).get())&&rt(u.attr,e):(l=C.uirevision,void 0===(c=I.uirevision)&&(c=e.uirevision)),c&&c===l&&(null===(h=L[i])&&(h=void 0),at(p=(f=s(I,i)).get(),h))){f.set(B(s(C,i).get()));continue}}else o.warn("unrecognized GUI edit: "+i+" in trace uid "+E);delete L[i]}}}(t.data,t.layout,c,p),f.supplyDefaults(t,{skipUpdateCalc:!0});var y=t._fullData,v=t._fullLayout,x=void 0===v.datarevision,_=v.transition,b=function(t,e,r,n,i){var a=A.layoutFlags();return a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0,ot(e,r,[],{getValObject:function(t){return h.getLayoutValObject(r,t)},flags:a,immutable:n,transition:i,gd:t}),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?"all":"some"),a}(t,p,v,x,_),w=b.newDataRevision,M=function(t,e,r,n,i,a){var o=e.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s,l,c=A.traceFlags();c.arrays={},c.nChanges=0,c.nChangesAnim=0;var u={getValObject:function(t){var e=h.getTraceValObject(l,t);return!l._module.animatable&&e.anim&&(e.anim=!1),e},flags:c,immutable:n,transition:i,newDataRevision:a,gd:t},p={};for(s=0;s<e.length;s++)if(r[s]){if(l=r[s]._fullInput,f.hasMakesDataTransform(l)&&(l=r[s]),p[l.uid])continue;p[l.uid]=1,ot(e[s]._fullInput,l,[],u)}return(c.calc||c.plot)&&(c.fullReplot=!0),i&&c.nChanges&&c.nChangesAnim&&(c.anim=c.nChanges===c.nChangesAnim&&o?"all":"some"),c}(t,c,y,x,_,w);if($(t)&&(b.layoutReplot=!0),M.calc||b.calc){t.calcdata=void 0;for(var S=Object.getOwnPropertyNames(v),C=0;C<S.length;C++){var L=S[C],P=L.substring(0,5);if("xaxis"===P||"yaxis"===P){var z=v[L]._emptyCategories;z&&z()}}}else f.supplyDefaultsUpdateCalc(t.calcdata,y);var O=[];if(a&&(t._transitionData={},f.createTransitionData(t),O.push((function(){return e.addFrames(t,a)}))),v.transition&&!m&&(M.anim||b.anim))b.ticks&&O.push(k.doTicksRelayout),f.doCalcdata(t),k.doAutoRangeAndConstraints(t),O.push((function(){return f.transitionFromReact(t,M,b,p)}));else if(M.fullReplot||b.layoutReplot||m)t._fullLayout._skipDefaults=!0,O.push(e._doPlot);else{for(var D in b.arrays){var R=b.arrays[D];if(R.length){var F=u.getComponentMethod(D,"drawOne");if(F!==o.noop)for(var N=0;N<R.length;N++)F(t,R[N]);else{var j=u.getComponentMethod(D,"draw");if(j===o.noop)throw new Error("cannot draw components: "+D);j(t)}}}O.push(f.previousPromises),M.style&&O.push(k.doTraceStyle),(M.colorbars||b.colorbars)&&O.push(k.doColorBars),b.legend&&O.push(k.doLegend),b.layoutstyle&&O.push(k.layoutStyles),b.axrange&&G(O),b.ticks&&O.push(k.doTicksRelayout),b.modebar&&O.push(k.doModeBar),b.camera&&O.push(k.doCamera),O.push(E)}O.push(f.rehover,f.redrag,f.reselect),(l=o.syncOrAsync(O,t))&&l.then||(l=Promise.resolve(t))}else l=e.newPlot(t,r,n,i);return l.then((function(){return t.emit("plotly_react",{data:r,layout:n}),t}))},e.redraw=function(t){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);return T.cleanData(t.data),T.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then((function(){return t.emit("plotly_redraw"),t}))},e.relayout=q,e.restyle=F,e.setPlotConfig=function(t){return o.extendFlat(b,t)},e.update=J,e._guiRelayout=K(q),e._guiRestyle=K(F),e._guiUpdate=K(J),e._storeDirectGUIEdit=function(t,e,r){for(var n in r)j(n,s(t,n).get(),r[n],e)}},24452:function(t){"use strict";var e={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},57297:function(t,e,r){"use strict";var n=r(33626),i=r(34809),a=r(9829),o=r(6704),s=r(58935),l=r(49722),c=r(24452).configAttributes,u=r(13582),h=i.extendDeepAll,f=i.isPlainObject,p=i.isArrayOrTypedArray,d=i.nestedProperty,m=i.valObjectMeta,g="_isSubplotObj",y="_isLinkedToArray",v="_deprecated",x=[g,y,"_arrayAttrRegexps",v];function _(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(b(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!f(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!b(e[++r]))return!1}else if("info_array"===t.valType){var i=e[++r];if(!b(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!b(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function b(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in h(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)k(r,e,e.attr[i]);else k(r,e,"subplot"===e.attr?e.name:e.attr);for(t in n.componentsRegistry){var a=(e=n.componentsRegistry[t]).schema;if(a&&(a.subplots||a.layout)){var s=a.subplots;if(s&&s.xaxis&&!s.yaxis)for(var l in s.xaxis)delete r.yaxis[l];delete r.xaxis.shift,delete r.xaxis.autoshift}else"colorscale"===e.name?h(r,e.layoutAttributes):e.layoutAttributes&&A(r,e.layoutAttributes,e.name)}return{layoutAttributes:T(r)}}function T(t){return function(t){e.crawl(t,(function(t,r,n){e.isValObject(t)?!0!==t.arrayOk&&"data_array"!==t.valType||(n[r+"src"]={valType:"string",editType:"none"}):f(t)&&(t.role="object")}))}(t),function(t){e.crawl(t,(function(t,e,r){if(t){var n=t[y];n&&(delete t[y],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}))}(t),function(t){!function t(e){for(var r in e)if(f(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n<e[r].length;n++)t(e[r][n]);else e[r]instanceof RegExp&&(e[r]=e[r].toString())}(t)}(t),t}function k(t,e,r){var n=d(t,r),i=h({},e.layoutAttributes);i[g]=!0,n.set(i)}function A(t,e,r){var n=d(t,r);n.set(h(n.get()||{},e))}e.IS_SUBPLOT_OBJ=g,e.IS_LINKED_TO_ARRAY=y,e.DEPRECATED=v,e.UNDERSCORE_ATTRS=x,e.get=function(){var t={};n.allTypes.forEach((function(r){t[r]=function(t){var r,i;i=(r=n.modules[t]._module).basePlotModule;var o={type:null},s=h({},a),l=h({},r.attributes);e.crawl(l,(function(t,e,r,n,i){d(s,i).set(void 0),void 0===t&&d(l,i).set(void 0)})),h(o,s),n.traceIs(t,"noOpacity")&&delete o.opacity,n.traceIs(t,"showLegend")||(delete o.showlegend,delete o.legendgroup),n.traceIs(t,"noHover")&&(delete o.hoverinfo,delete o.hoverlabel),r.selectPoints||delete o.selectedpoints,h(o,l),i.attributes&&h(o,i.attributes),o.type=t;var c={meta:r.meta||{},categories:r.categories||{},animatable:Boolean(r.animatable),type:t,attributes:T(o)};if(r.layoutAttributes){var u={};h(u,r.layoutAttributes),c.layoutAttributes=T(u)}return r.animatable||e.crawl(c,(function(t){e.isValObject(t)&&"anim"in t&&delete t.anim})),c}(r)}));var r,i={};return Object.keys(n.transformsRegistry).forEach((function(t){i[t]=function(t){var e=n.transformsRegistry[t],r=h({},e.attributes);return Object.keys(n.componentsRegistry).forEach((function(e){var i=n.componentsRegistry[e];i.schema&&i.schema.transforms&&i.schema.transforms[t]&&Object.keys(i.schema.transforms[t]).forEach((function(e){A(r,i.schema.transforms[t][e],e)}))})),{attributes:T(r)}}(t)})),{defs:{valObjects:m,metaKeys:x.concat(["description","role","editType","impliedEdits"]),editType:{traces:u.traces,layout:u.layout},impliedEdits:{}},traces:t,layout:w(),transforms:i,frames:(r={frames:h({},s)},T(r),r.frames),animation:T(l),config:T(c)}},e.crawl=function(t,r,n,i){var a=n||0;i=i||"",Object.keys(t).forEach((function(n){var o=t[n];if(-1===x.indexOf(n)){var s=(i?i+".":"")+n;r(o,n,t,a,s),e.isValObject(o)||f(o)&&"impliedEdits"!==n&&e.crawl(o,r,a+1,s)}}))},e.isValObject=function(t){return t&&void 0!==t.valType},e.findArrayAttributes=function(t){var r,n,i=[],o=[],s=[];function l(t,e,n,i){o=o.slice(0,i).concat([e]),s=s.slice(0,i).concat([t&&t._isLinkedToArray]),t&&("data_array"===t.valType||!0===t.arrayOk)&&("colorbar"!==o[i-1]||"ticktext"!==e&&"tickvals"!==e)&&c(r,0,"")}function c(t,e,r){var a=t[o[e]],l=r+o[e];if(e===o.length-1)p(a)&&i.push(n+l);else if(s[e]){if(Array.isArray(a))for(var u=0;u<a.length;u++)f(a[u])&&c(a[u],e+1,l+"["+u+"].")}else f(a)&&c(a,e+1,l+".")}r=t,n="",e.crawl(a,l),t._module&&t._module.attributes&&e.crawl(t._module.attributes,l);var u=t.transforms;if(u)for(var h=0;h<u.length;h++){var d=u[h],m=d._module;m&&(n="transforms["+h+"].",r=d,e.crawl(m.attributes,l))}return i},e.getTraceValObject=function(t,e){var r,i,o=e[0],s=1;if("transforms"===o){if(1===e.length)return a.transforms;var l=t.transforms;if(!Array.isArray(l)||!l.length)return!1;var c=e[1];if(!b(c)||c>=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var h=u.basePlotModule;h&&h.attributes&&(i=h.attributes[o])}i||(i=a[o])}return _(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r<l.length;r++){if((a=l[r]).attrRegex&&a.attrRegex.test(e)){if(a.layoutAttrOverrides)return a.layoutAttrOverrides;!c&&a.layoutAttributes&&(c=a.layoutAttributes)}var u=a.baseLayoutAttrOverrides;if(u&&e in u)return u[e]}if(c)return c}var h=t._modules;if(h)for(r=0;r<h.length;r++)if((s=h[r].layoutAttributes)&&e in s)return s[e];for(i in n.componentsRegistry){if("colorscale"===(a=n.componentsRegistry[i]).name&&0===e.indexOf("coloraxis"))return a.layoutAttributes[e];if(!a.schema&&e===a.name)return a.layoutAttributes}return e in o&&o[e]}(t,e[0]);return _(r,e,1)}},78032:function(t,e,r){"use strict";var n=r(34809),i=r(9829),a="templateitemname",o={name:{valType:"string",editType:"none"}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}o[a]={valType:"string",editType:"calc"},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},e.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,"type"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],o=n&&n[e];Array.isArray(o)&&o.length||(o=[]);var c={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l<o.length;l++){var u=o[l];if(u.name===n)return c[n]=1,e._template=u,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<o.length;e++){var r=o[e],n=r.name;if(s(n)&&!c[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),c[n]=1}}return t}}},e.arrayDefaultKey=l,e.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o>=i&&(r._input||{})._templateitemname;s&&(o=i);var l,c=e+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][a]=s)}function h(t,e){s?n.nestedProperty(l[c],t).set(e):l[c+"."+t]=e}function f(){var t=l;return u(),t}return u(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:f,applyUpdate:function(e,r){e&&h(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},71817:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(44122),o=r(34809),s=r(30635),l=r(34823),c=r(78766),u=r(62203),h=r(17240),f=r(95433),p=r(29714),d=r(4530),m=r(84391),g=m.enforce,y=m.clean,v=r(32919).doAutoRange,x="start",_=r(54826).zindexSeparator;function b(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&a[0]<e[1]&&a[1]>e[0])return!0}return!1}function w(t){var r,i,s,l,h,m,g=t._fullLayout,y=g._size,v=y.p,x=p.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),f.manage(t),!g._has("cartesian"))return a.previousPromises(t);function w(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-v-n:e._offset+e._length+v+n:y.t+y.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+v+n:e._offset-v-n:y.l+y.w*(t.position||0)+n%1}for(r=0;r<x.length;r++){var k=(l=x[r])._anchorAxis;l._linepositions={},l._lw=u.crispRound(t,l.linewidth,1),l._mainLinePosition=w(l,k,l.side),l._mainMirrorPosition=l.mirror&&k?w(l,k,d.OPPOSITE_SIDE[l.side]):null}var M=[],S=[],E=[],C=1===c.opacity(g.paper_bgcolor)&&1===c.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(i in g._plots)if((s=g._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,I=s.yaxis.domain,P=s.plotgroup;if(b(L,I,E)&&-1===i.indexOf(_)){var z=P.node(),O=s.bg=o.ensureSingle(P,"rect","bg");z.insertBefore(O.node(),z.childNodes[0]),S.push(i)}else P.select("rect.bg").remove(),E.push([L,I]),C||(M.push(i),S.push(i))}var D,R,F,B,N,j,U,V,q,H,G,Z,W,Y=g._bgLayer.selectAll(".bg").data(M);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each((function(t){g._plots[t].bg=n.select(this)})),r=0;r<S.length;r++)s=g._plots[S[r]],h=s.xaxis,m=s.yaxis,s.bg&&void 0!==h._offset&&void 0!==m._offset&&s.bg.call(u.setRect,h._offset-v,m._offset-v,h._length+2*v,m._length+2*v).call(c.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(i in g._plots){s=g._plots[i],h=s.xaxis,m=s.yaxis;var X,$,J=s.clipId="clip"+g._uid+i+"plot",K=o.ensureSingleById(g._clips,"clipPath",J,(function(t){t.classed("plotclip",!0).append("rect")}));s.clipRect=K.select("rect").attr({width:h._length,height:m._length}),u.setTranslate(s.plot,h._offset,m._offset),s._hasClipOnAxisFalse?(X=null,$=J):(X=J,$=null),u.setClipUrl(s.plot,X,t),s.layerClipId=$}function Q(t){return"M"+D+","+t+"H"+R}function tt(t){return"M"+h._offset+","+t+"h"+h._length}function et(t){return"M"+t+","+V+"V"+U}function rt(t){return void 0!==m._shift&&(t+=m._shift),"M"+t+","+m._offset+"v"+m._length}function nt(t,e,r){if(!t.showline||i!==t._mainSubplot)return"";if(!t._anchorAxis)return r(t._mainLinePosition);var n=e(t._mainLinePosition);return t.mirror&&(n+=e(t._mainMirrorPosition)),n}for(i in g._plots){s=g._plots[i],h=s.xaxis,m=s.yaxis;var it="M0,0";T(h,i)&&(N=A(h,"left",m,x),D=h._offset-(N?v+N:0),j=A(h,"right",m,x),R=h._offset+h._length+(j?v+j:0),F=w(h,m,"bottom"),B=w(h,m,"top"),!(W=!h._anchorAxis||i!==h._mainSubplot)||"allticks"!==h.mirror&&"all"!==h.mirror||(h._linepositions[i]=[F,B]),it=nt(h,Q,tt),W&&h.showline&&("all"===h.mirror||"allticks"===h.mirror)&&(it+=Q(F)+Q(B)),s.xlines.style("stroke-width",h._lw+"px").call(c.stroke,h.showline?h.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",it);var at="M0,0";T(m,i)&&(G=A(m,"bottom",h,x),U=m._offset+m._length+(G?v:0),Z=A(m,"top",h,x),V=m._offset-(Z?v:0),q=w(m,h,"left"),H=w(m,h,"right"),!(W=!m._anchorAxis||i!==m._mainSubplot)||"allticks"!==m.mirror&&"all"!==m.mirror||(m._linepositions[i]=[q,H]),at=nt(m,et,rt),W&&m.showline&&("all"===m.mirror||"allticks"===m.mirror)&&(at+=et(q)+et(H)),s.ylines.style("stroke-width",m._lw+"px").call(c.stroke,m.showline?m.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",at)}return p.makeClipPaths(t),a.previousPromises(t)}function T(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||"all"===t.mirror||"allticks"===t.mirror)}function k(t,e,r){if(!r.showline||!r._lw)return!1;if("all"===r.mirror||"allticks"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=d.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function A(t,e,r,n){if(k(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&k(t,e,a))return a._lw}return 0}function M(t){return"top"===t?d.CAP_SHIFT+.3+"em":"bottom"===t?"-0.3em":d.MID_SHIFT+"em"}e.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,w],t)},e.drawMainTitle=function(t){var e=t._fullLayout.title,r=t._fullLayout,i=function(t){var e=t.title,r="middle";return o.isRightAnchor(e)?r="end":o.isLeftAnchor(e)&&(r=x),r}(r),l=function(t){var e=t.title,r="0em";return o.isTopAnchor(e)?r=d.CAP_SHIFT+"em":o.isMiddleAnchor(e)&&(r=d.MID_SHIFT+"em"),r}(r),c=function(t,e){var r=t.title,n=t._size,i=0;return"0em"!==e&&e?e===d.CAP_SHIFT+"em"&&(i=r.pad.t):i=-r.pad.b,"auto"===r.y?n.t/2:"paper"===r.yref?n.t+n.h-n.h*r.y+i:t.height-t.height*r.y+i}(r,l),f=function(t,e){var r=t.title,n=t._size,i=0;return e===x?i=r.pad.l:"end"===e&&(i=-r.pad.r),"paper"===r.xref?n.l+n.w*r.x+i:t.width*r.x+i}(r,i);if(h.draw(t,"gtitle",{propContainer:r,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:r._dfltTitle.plot,subtitlePlaceholder:r._dfltTitle.subtitle,attributes:{x:f,y:c,"text-anchor":i,dy:l}}),e.text&&e.automargin){var p=n.selectAll(".gtitle"),m=u.bBox(n.selectAll(".g-gtitle").node()).height,g=function(t,e,r){var n=e.y,i=e.yanchor,a=n>.5?"t":"b",o=t._fullLayout.margin[a],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var a=0;return"middle"===r&&(a+=i/2),"t"===t?("top"===r&&(a+=i),a+=n-e*n):("bottom"===r&&(a+=i),a+=e*n),a}(a,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>o?s:0}(t,e,m);if(g>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(t,e,r,n,i){var a="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=o.isTopAnchor(e)?n:n-i,l="b"===r?a-s:s;return!(o.isTopAnchor(e)&&"t"===r||o.isBottomAnchor(e)&&"b"===r)&&l<i}(t,s,l,e,n)?c[l]=r:"container"===s.yref&&(u[l]=r,t._fullLayout._reservedMargin[i]=u),a.allowAutoMargin(t,i),a.autoMargin(t,i,c)}(t,c,g,m),p.attr({x:f,y:c,"text-anchor":i,dy:M(e.yanchor)}).call(s.positionText,f,c);var y=(e.text.match(s.BR_TAG_ALL)||[]).length;if(y){var v=d.LINE_SPACING*y+d.MID_SHIFT;0===e.y&&(v=-v),p.selectAll(".line").each((function(){var t=+this.getAttribute("dy").slice(0,-2)-v+"em";this.setAttribute("dy",t)}))}var _=n.selectAll(".gtitle-subtitle");if(_.node()){var b=p.node().getBBox(),w=b.y+b.height+h.SUBTITLE_PADDING_EM*e.subtitle.font.size;_.attr({x:f,y:w,"text-anchor":i,dy:M(e.yanchor)}).call(s.positionText,f,w)}}}},e.doTraceStyle=function(t){var r,n=t.calcdata,o=[];for(r=0;r<n.length;r++){var s=n[r],c=s[0]||{},u=c.trace||{},h=u._module||{},f=h.arraysToCalcdata;f&&f(s,u);var p=h.editStyle;p&&o.push({fn:p,cd0:c})}if(o.length){for(r=0;r<o.length;r++){var d=o[r];d.fn(t,d.cd0)}l(t),e.redrawReglTraces(t)}return a.style(t),i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doColorBars=function(t){return i.getComponentMethod("colorbar","draw")(t),a.previousPromises(t)},e.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call("_doPlot",t,"",e)},e.doLegend=function(t){return i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doTicksRelayout=function(t){return p.draw(t,"redraw"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),l(t),e.redrawReglTraces(t)),e.drawMainTitle(t),a.previousPromises(t)},e.doModeBar=function(t){var e=t._fullLayout;f.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},e.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setViewport(i)}},e.drawData=function(t){var r=t._fullLayout;l(t);for(var n=r._basePlotModules,o=0;o<n.length;o++)n[o].plot(t);return e.redrawReglTraces(t),a.style(t),i.getComponentMethod("selections","draw")(t),i.getComponentMethod("shapes","draw")(t),i.getComponentMethod("annotations","draw")(t),i.getComponentMethod("images","draw")(t),r._replotting=!1,a.previousPromises(t)},e.redrawReglTraces=function(t){var e=t._fullLayout;if(e._has("regl")){var r,n,i=t._fullData,a=[],s=[];for(e._hasOnlyLargeSploms&&e._splomGrid.draw(),r=0;r<i.length;r++){var l=i[r];!0===l.visible&&0!==l._length&&("splom"===l.type?e._splomScenes[l.uid].draw():"scattergl"===l.type?o.pushUnique(a,l.xaxis+l.yaxis):"scatterpolargl"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<a.length;r++)(n=e._plots[a[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=e[s[r]]._subplot)._scene&&n._scene.draw()}},e.doAutoRangeAndConstraints=function(t){for(var e,r=p.list(t,"",!0),n={},i=0;i<r.length;i++)if(!n[(e=r[i])._id]){n[e._id]=1,y(t,e),v(t,e);var a=e._matchGroup;if(a)for(var o in a){var s=p.getFromId(t,o);v(t,s,e.range),n[o]=1}}g(t)},e.finalDraw=function(t){i.getComponentMethod("rangeslider","draw")(t),i.getComponentMethod("rangeselector","draw")(t)},e.drawMarginPushers=function(t){i.getComponentMethod("legend","draw")(t),i.getComponentMethod("rangeselector","draw")(t),i.getComponentMethod("sliders","draw")(t),i.getComponentMethod("updatemenus","draw")(t),i.getComponentMethod("colorbar","draw")(t)}},53853:function(t,e,r){"use strict";var n=r(34809),i=n.isPlainObject,a=r(57297),o=r(44122),s=r(9829),l=r(78032),c=r(24452).dfltConfig;function u(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))u(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a<r.length;a++){var s=r[a],c=o.newItem(s)._template;c&&u(c,s)}var h=o.defaultItems();for(a=0;a<h.length;a++)r.push(h[a]._template);for(a=0;a<r.length;a++)delete r[a].templateitemname}}for(r=0;r<o.length;r++){var c=o[r],f=t[c];if(c in e?s(f,e[c],c):e[c]=f,h(c)===c)for(var p in e){var d=h(p);p===d||d!==c||p in t||s(f,e[p],c)}}}function h(t){return t.replace(/[0-9]+$/,"")}function f(t,e,r,a,o){var s=o&&r(o);for(var c in t){var u=t[c],p=m(t,c,a),d=m(t,c,o),g=r(d);if(!g){var y=h(c);y!==c&&(g=r(d=m(t,y,o)))}if(!(s&&s===g||!g||g._noTemplating||"data_array"===g.valType||g.arrayOk&&Array.isArray(u)))if(!g.valType&&i(u))f(u,e,r,p,d);else if(g._isLinkedToArray&&Array.isArray(u))for(var v=!1,x=0,_={},b=0;b<u.length;b++){var w=u[b];if(i(w)){var T=w.name;if(T)_[T]||(f(w,e,r,m(u,x,p),m(u,x,d)),x++,_[T]=1);else if(!v){var k=m(t,l.arrayDefaultKey(c),a),A=m(u,x,p);f(w,e,r,A,m(u,x,d));var M=n.nestedProperty(e,A);n.nestedProperty(e,k).set(M.get()),M.set(null),v=!0}}}else n.nestedProperty(e,p).set(u)}}function p(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}function d(t,e){return a.getTraceValObject(t,n.nestedProperty({},e).parts)}function m(t,e,r){return r?Array.isArray(t)?r+"["+e+"]":r+"."+e:e}function g(t){for(var e=0;e<t.length;e++)if(i(t[e]))return!0}function y(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":e=t.path?"There are no templates for item "+t.path+" with name "+t.templateitemname:"There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":e=t.path?"The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?"Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":"The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type."}return t.msg=e,t}e.makeTemplate=function(t){t=n.isPlainObject(t)?t:n.getGraphDiv(t),t=n.extendDeep({_context:c},{data:t.data,layout:t.layout}),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach((function(t){var e={};f(t,e,d.bind(null,t));var r=n.coerce(t,{},s,"type"),i=a.data[r];i||(i=a.data[r]=[]),i.push(e)})),f(r,a.layout,p.bind(null,r)),delete a.layout.template;var l=r.template;if(i(l)){var h,m,g,y,v,x,_=l.layout;i(_)&&u(_,a.layout);var b=l.data;if(i(b)){for(m in a.data)if(g=b[m],Array.isArray(g)){for(x=(v=a.data[m]).length,y=g.length,h=0;h<x;h++)u(g[h%y],v[h]);for(h=x;h<y;h++)v.push(n.extendDeep({},g[h]))}for(m in b)m in a.data||(a.data[m]=n.extendDeep([],b[m]))}}return a},e.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:c,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,u=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var f=r._fullLayout,p=r._fullData,d={};if(i(s)?(function t(e,r){for(var n in e)if("_"!==n.charAt(0)&&i(e[n])){var a,o=h(n),s=[];for(a=0;a<r.length;a++)s.push(m(e,n,r[a])),o!==n&&s.push(m(e,o,r[a]));for(a=0;a<s.length;a++)d[s[a]]=1;t(e[n],s)}}(f,["layout"]),function t(e,r){for(var n in e)if(-1===n.indexOf("defaults")&&i(e[n])){var a=m(e,n,r);d[a]?t(e[n],a):u.push({code:"unused",path:a})}}(s,"layout")):u.push({code:"layout"}),i(l)){for(var v,x={},_=0;_<p.length;_++){var b=p[_];x[v=b.type]=(x[v]||0)+1,b._fullInput._template||u.push({code:"missing",index:b._fullInput.index,traceType:v})}for(v in l){var w=l[v].length,T=x[v]||0;w>T?u.push({code:"unused",traceType:v,templateCount:w,dataCount:T}):T>w&&u.push({code:"reused",traceType:v,templateCount:w,dataCount:T})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=m(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&g(a)&&t(a,o)}}({data:p,layout:f},""),u.length)return u.map(y)}},80491:function(t,e,r){"use strict";var n=r(10721),i=r(31420),a=r(44122),o=r(34809),s=r(84619),l=r(6243),c=r(72914),u=r(29697).version,h={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}};t.exports=function(t,e){var r,f,p,d;function m(t){return!(t in e)||o.validate(e[t],h[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],f=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),f=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!m("width")&&null!==e.width||!m("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+o.join2(h.format.values,", "," or ")+".");var g={};function y(t,r){return o.coerce(e,g,h,t,r)}var v=y("format"),x=y("width"),_=y("height"),b=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var A=o.extendFlat({},f);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),_?A.height=_:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function C(){return new Promise((function(t,e){var r=l(k,v,b),n=k._fullLayout.width,h=k._fullLayout.height;function f(){i.purge(k),document.body.removeChild(k)}if("full-json"===v){var p=a.graphJson(k,!1,"keepdata","object",!0,!0);return p.version=u,p=JSON.stringify(p),f(),t(T?p:s.encodeJSON(p))}if(f(),"svg"===v)return t(T?r:s.encodeSVG(r));var d=document.createElement("canvas");d.id=o.randstr(),c({format:v,width:n,height:h,scale:b,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(C).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},2466:function(t,e,r){"use strict";var n=r(34809),i=r(44122),a=r(57297),o=r(24452).dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var h=Object.keys(t),f=0;f<h.length;f++){var g=h[f];if("transforms"!==g){var y=o.slice();y.push(g);var v=t[g],x=e[g],_=m(r,g),b=(_||{}).valType,w="info_array"===b,T="colorscale"===b,k=(_||{}).items;if(d(r,g))if(s(v)&&s(x)&&"any"!==b)u(v,x,_,i,a,y);else if(w&&l(v)){v.length>x.length&&i.push(p("unused",a,y.concat(x.length)));var A,M,S,E,C,L=x.length,I=Array.isArray(k);if(I&&(L=Math.min(L,k.length)),2===_.dimensions)for(M=0;M<L;M++)if(l(v[M])){v[M].length>x[M].length&&i.push(p("unused",a,y.concat(M,x[M].length)));var P=x[M].length;for(A=0;A<(I?Math.min(P,k[M].length):P);A++)S=I?k[M][A]:k,E=v[M][A],C=x[M][A],n.validate(E,S)?C!==E&&C!==+E&&i.push(p("dynamic",a,y.concat(M,A),E,C)):i.push(p("value",a,y.concat(M,A),E))}else i.push(p("array",a,y.concat(M),v[M]));else for(M=0;M<L;M++)S=I?k[M]:k,E=v[M],C=x[M],n.validate(E,S)?C!==E&&C!==+E&&i.push(p("dynamic",a,y.concat(M),E,C)):i.push(p("value",a,y.concat(M),E))}else if(_.items&&!w&&l(v)){var z,O,D=k[Object.keys(k)[0]],R=[];for(z=0;z<x.length;z++){var F=x[z]._index||z;if((O=y.slice()).push(F),s(v[F])&&s(x[z])){R.push(F);var B=v[F],N=x[z];s(B)&&!1!==B.visible&&!1===N.visible?i.push(p("invisible",a,O)):u(B,N,D,i,a,O)}}for(z=0;z<v.length;z++)(O=y.slice()).push(z),s(v[z])?-1===R.indexOf(z)&&i.push(p("unused",a,O)):i.push(p("object",a,O,v[z]))}else!s(v)&&s(x)?i.push(p("object",a,y,v)):c(v)||!c(x)||w||T?g in e?n.validate(v,_)?"enumerated"===_.valType&&(_.coerceNumber&&v!==+x||v!==x)&&i.push(p("dynamic",a,y,v,x)):i.push(p("value",a,y,v)):i.push(p("unused",a,y,v)):i.push(p("array",a,y,v));else i.push(p("schema",a,y))}}return i}t.exports=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var r,c,h=a.get(),f=[],d={_context:n.extendFlat({},o)};l(t)?(d.data=n.extendDeep([],t),r=t):(d.data=[],r=[],f.push(p("array","data"))),s(e)?(d.layout=n.extendDeep({},e),c=e):(d.layout={},c={},arguments.length>1&&f.push(p("object","layout"))),i.supplyDefaults(d);for(var m=d._fullData,g=r.length,y=0;y<g;y++){var v=r[y],x=["data",y];if(s(v)){var _=m[y],b=_.type,w=h.traces[b].attributes;w.type={valType:"enumerated",values:[b]},!1===_.visible&&!1!==v.visible&&f.push(p("invisible",x)),u(v,_,w,f,x);var T=v.transforms,k=_.transforms;if(T){l(T)||f.push(p("array",x,["transforms"])),x.push("transforms");for(var A=0;A<T.length;A++){var M=["transforms",A],S=T[A].type;if(s(T[A])){var E=h.transforms[S]?h.transforms[S].attributes:{};E.type={valType:"enumerated",values:Object.keys(h.transforms)},u(T[A],k[A],E,f,x,M)}else f.push(p("object",x,M))}}}else f.push(p("object",x))}var C=d._fullLayout,L=function(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}(h,m);return u(c,C,L,f,"layout"),0===f.length?void 0:f};var h={object:function(t,e){return("layout"===t&&""===e?"The layout argument":"data"===t[0]&&""===e?"Trace "+t[1]+" in the data argument":f(t)+"key "+e)+" must be linked to an object container"},array:function(t,e){return("data"===t?"The data argument":f(t)+"key "+e)+" must be linked to an array container"},schema:function(t,e){return f(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var n=s(r)?"container":"key";return f(t)+n+" "+e+" did not get coerced"},dynamic:function(t,e,r,n){return[f(t)+"key",e,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?f(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[f(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function f(t){return l(t)?"In data trace "+t[1]+", ":"In "+t+", "}function p(t,e,r,i,a){var o,s;r=r||"",l(e)?(o=e[0],s=e[1]):(o=e,s=null);var c=function(t){if(!l(t))return String(t);for(var e="",r=0;r<t.length;r++){var n=t[r];"number"==typeof n?e=e.substr(0,e.length-1)+"["+n+"]":e+=n,r<t.length-1&&(e+=".")}return e}(r),u=h[t](e,c,i,a);return n.log(u),{code:t,container:o,trace:s,path:r,astr:c,msg:u}}function d(t,e){var r=y(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function m(t,e){return e in t?t[e]:t[y(e).keyMinusId]}var g=n.counterRegex("([a-z]+)");function y(t){var e=t.match(g);return{keyMinusId:e&&e[1],id:e&&e[2]}}},49722:function(t){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},59008:function(t,e,r){"use strict";var n=r(34809),i=r(78032);t.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||"visible",c=e[s],u=n.isArrayOrTypedArray(t[s])?t[s]:[],h=e[s]=[],f=i.arrayTemplater(e,s,l);for(a=0;a<u.length;a++){var p=u[a];n.isPlainObject(p)?o=f.newItem(p):(o=f.newItem({}))[l]=!1,o._index=a,!1!==o[l]&&r.handleItemDefaults(p,o,e,r),h.push(o)}var d=f.defaultItems();for(a=0;a<d.length;a++)(o=d[a])._index=h.length,r.handleItemDefaults({},o,e,r,{}),h.push(o);if(n.isArrayOrTypedArray(c)){var m=Math.min(c.length,h.length);for(a=0;a<m;a++)n.relinkPrivateKeys(h[a],c[a])}return h}},9829:function(t,e,r){"use strict";var n=r(80337),i=r(70192);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:n({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},40528:function(t,e,r){"use strict";var n=r(10721),i=r(34809),a=i.dateTime2ms,o=i.incrementMonth,s=r(63821).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var c,u=t[r+"period"];if(n(u)){if((u=+u)<=0)return{vals:i}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0&&Math.round(h)===h))return{vals:i};c=h}for(var f=e.calendar,p="start"===l,d="end"===l,m=t[r+"period0"],g=a(m,f)||0,y=[],v=[],x=[],_=i.length,b=0;b<_;b++){var w,T,k,A=i[b];if(c){for(w=Math.round((A-g)/(c*s)),k=o(g,c*w,f);k>A;)k=o(k,-c,f);for(;k<=A;)k=o(k,c,f);T=o(k,-c,f)}else{for(k=g+(w=Math.round((A-g)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}y[b]=p?T:d?k:(T+k)/2,v[b]=T,x[b]=k}return{vals:y,starts:v,ends:x}}},55126:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},32919:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=r(34809),o=r(63821).FP_SAFE,s=r(33626),l=r(62203),c=r(5975),u=c.getFromId,h=c.isLinked;function f(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=g(t,e),u=c.min,h=c.max;if(0===u.length||0===h.length)return a.simpleMap(e.range,e.r2l);var f=u[0].val,m=h[0].val;for(r=1;r<u.length&&f===m;r++)f=Math.min(f,u[r].val);for(r=1;r<h.length&&f===m;r++)m=Math.max(m,h[r].val);var y=e.autorange,v="reversed"===y||"min reversed"===y||"max reversed"===y;if(!v&&e.range){var x=a.simpleMap(e.range,e.r2l);v=x[1]<x[0]}"reversed"===e.autorange&&(e.autorange=!0);var _,b,w,T,A,M,S=e.rangemode,E="tozero"===S,C="nonnegative"===S,L=e._length,I=L/10,P=0;for(r=0;r<u.length;r++)for(_=u[r],n=0;n<h.length;n++)(M=(b=h[n]).val-_.val-p(e,_.val,b.val))>0&&((A=L-s(_)-l(b))>I?M/A>P&&(w=_,T=b,P=M/A):M/L>P&&(w={val:_.val,nopad:1},T={val:b.val,nopad:1},P=M/L));if(f===m){var z=f-1,O=f+1;if(E)if(0===f)i=[0,1];else{var D=(f>0?h:u).reduce((function(t,e){return Math.max(t,l(e))}),0),R=f/(1-Math.min(.5,D/L));i=f>0?[0,R]:[R,0]}else i=C?[Math.max(0,z),Math.max(1,O)]:[z,O]}else E?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):C&&(w.val-P*s(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),P=(T.val-w.val-p(e,_.val,b.val))/(L-s(w)-l(T)),i=[w.val-P*s(w),T.val+P*l(T)];return i=k(i,e),e.limitRange&&e.limitRange(),v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a<i.length;a++){var o=i[a];n+=o.max-o.min}return n}function d(t,e,r){var i=.05*e._length,o=e._anchorAxis||{};if(-1!==(e.ticklabelposition||"").indexOf("inside")||-1!==(o.ticklabelposition||"").indexOf("inside")){var s=e.isReversed();if(!s){var c=a.simpleMap(e.range,e.r2l);s=c[1]<c[0]}s&&(r=!r)}var u=0;return h(t,e._id)||(u=function(t,e,r){var i=0,o="x"===e._id.charAt(0);for(var s in t._plots){var c=t._plots[s];if(e._id===c.xaxis._id||e._id===c.yaxis._id){var u=(o?c.yaxis:c.xaxis)||{};if(-1!==(u.ticklabelposition||"").indexOf("inside")&&(!r&&("left"===u.side||"bottom"===u.side)||r&&("top"===u.side||"right"===u.side))){if(u._vals){var h=a.deg2rad(u._tickAngles[u._id+"tick"]||0),f=Math.abs(Math.cos(h)),p=Math.abs(Math.sin(h));if(!u._vals[0].bb){var d=u._id+"tick";u._selections[d].each((function(t){var e=n.select(this);e.select(".text-math-group").empty()&&(t.bb=l.bBox(e.node()))}))}for(var g=0;g<u._vals.length;g++){var y=u._vals[g].bb;if(y){var v=2*m+y.width,x=2*m+y.height;i=Math.max(i,o?Math.max(v*f,x*p):Math.max(x*f,v*p))}}}"inside"===u.ticks&&"inside"===u.ticklabelposition&&(i+=u.ticklen||0)}}}return i}(t,e,r)),i=Math.max(u,i),"domain"===e.constrain&&e._inputDomain&&(i*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(t){return t.nopad?0:t.pad+(t.extrapad?i:u)}}t.exports={applyAutorangeOptions:k,getAutoRange:f,makePadFn:d,doAutoRange:function(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():f(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var n=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,s.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),n.range=e.range.slice(),n.autorange=e.autorange}var o=e._anchorAxis;if(o&&o.rangeslider){var l=o.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=f(t,e)),o._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t._m||t.setScale();var n,a,s,l,c,u,h,f,p,d=[],m=[],g=e.length,x=r.padded||!1,b=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,T=!1,k=r.vpadLinearized||!1;function A(t){if(Array.isArray(t))return T=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var M=A((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),C=A(r.vpadminus||r.vpad);if(!T){if(f=1/0,p=-1/0,w)for(n=0;n<g;n++)(a=e[n])<f&&a>0&&(f=a),a>p&&a<o&&(p=a);else for(n=0;n<g;n++)(a=e[n])<f&&a>-o&&(f=a),a>p&&a<o&&(p=a);e=[f,p],g=2}var L={tozero:b,extrapad:x};function I(r){s=e[r],i(s)&&(u=M(r),h=S(r),k?(l=t.c2l(s)-C(r),c=t.c2l(s)+E(r)):(f=s-C(r),p=s+E(r),w&&f<p/10&&(f=p/10),l=t.c2l(f),c=t.c2l(p)),b&&(l=Math.min(0,l),c=Math.max(0,c)),_(l)&&y(d,l,h,L),_(c)&&v(m,c,u,L))}var P=Math.min(6,g);for(n=0;n<P;n++)I(n);for(n=g-1;n>=P;n--)I(n);return{min:d,max:m,opts:r}},concatExtremes:g};var m=3;function g(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],h=[];function f(t,e){for(n=0;n<e.length;n++){var r=t[e[n]],s=(r._extremes||{})[o];if(!0===r.visible&&s){for(i=0;i<s.min.length;i++)a=s.min[i],y(c,a.val,a.pad,{extrapad:a.extrapad});for(i=0;i<s.max.length;i++)a=s.max[i],v(h,a.val,a.pad,{extrapad:a.extrapad})}}}if(f(s,e._traceIndices),f(l.annotations||[],e._annIndices||[]),f(l.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r)for(var p in e._matchGroup)if(p!==e._id){var d=u(t,p),m=g(t,d,!0),x=e._length/d._length;for(i=0;i<m.min.length;i++)a=m.min[i],y(c,a.val,a.pad*x,{extrapad:a.extrapad});for(i=0;i<m.max.length;i++)a=m.max[i],v(h,a.val,a.pad*x,{extrapad:a.extrapad})}return{min:c,max:h}}function y(t,e,r,n){x(t,e,r,n,b)}function v(t,e,r,n){x(t,e,r,n,w)}function x(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var c=t[l];if(i(c.val,e)&&c.pad>=r&&(c.extrapad||!o)){s=!1;break}i(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=a&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function _(t){return i(t)&&Math.abs(t)<o}function b(t,e){return t<=e}function w(t,e){return t>=e}function T(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))<t.d2l(r)}function k(t,e){if(!e||!e.autorangeoptions)return t;var r=t[0],n=t[1],i=e.autorangeoptions.include;if(void 0!==i){var o=e.d2l(r),s=e.d2l(n);a.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l<i.length;l++){var c=e.d2l(i[l]);o>=c&&(o=c,r=c),s<=c&&(s=c,n=c)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&T(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&T(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&T(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&T(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},75511:function(t){"use strict";t.exports=function(t,e,r){var n,i;if(r){var a="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[a?1:0],i=r[a?0:1]}var o=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},29714:function(t,e,r){"use strict";var n=r(45568),i=r(10721),a=r(44122),o=r(33626),s=r(34809),l=s.strTranslate,c=r(30635),u=r(17240),h=r(78766),f=r(62203),p=r(25829),d=r(68599),m=r(63821),g=m.ONEMAXYEAR,y=m.ONEAVGYEAR,v=m.ONEMINYEAR,x=m.ONEMAXQUARTER,_=m.ONEAVGQUARTER,b=m.ONEMINQUARTER,w=m.ONEMAXMONTH,T=m.ONEAVGMONTH,k=m.ONEMINMONTH,A=m.ONEWEEK,M=m.ONEDAY,S=M/2,E=m.ONEHOUR,C=m.ONEMIN,L=m.ONESEC,I=m.ONEMILLI,P=m.ONEMICROSEC,z=m.MINUS_SIGN,O=m.BADNUM,D={K:"zeroline"},R={K:"gridline",L:"path"},F={K:"minor-gridline",L:"path"},B={K:"tick",L:"path"},N={K:"tick",L:"text"},j={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},U=r(4530),V=U.MID_SHIFT,q=U.CAP_SHIFT,H=U.LINE_SPACING,G=U.OPPOSITE_SIDE,Z=t.exports={};Z.setConvert=r(19091);var W=r(9666),Y=r(5975),X=Y.idSort,$=Y.isLinked;Z.id2name=Y.id2name,Z.name2id=Y.name2id,Z.cleanId=Y.cleanId,Z.list=Y.list,Z.listIds=Y.listIds,Z.getFromId=Y.getFromId,Z.getFromTrace=Y.getFromTrace;var J=r(32919);Z.getAutoRange=J.getAutoRange,Z.findExtremes=J.findExtremes;var K=1e-4;function Q(t){var e=(t[1]-t[0])*K;return[t[0]-e,t[1]+e]}Z.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},Z.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},Z.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==Z.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=Z.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},Z.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:Z.getFromId(e,r).cleanPos)(t)},Z.redrawComponents=function(t,e){e=e||Z.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u<e.length;u++)for(var h=r[Z.id2name(e[u])][a],f=0;f<h.length;f++){var p=h[f];if(!c[p]&&(l(t,p),c[p]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var tt=Z.getDataConversions=function(t,e,r,n){var i,a="x"===r||"y"===r||"z"===r?r:n;if(s.isArrayOrTypedArray(a)){if(i={type:W(n,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Z.setConvert(i),"category"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=Z.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:"ids"===a?{d2c:rt,c2d:rt}:{d2c:et,c2d:et}};function et(t){return+t}function rt(t){return String(t)}function nt(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function it(t,e){return Math.abs(t/e-1)<.001}function at(t){return+t.substring(1)}function ot(t,e){return t.rangebreaks&&(e=e.filter((function(e){return t.maskBreaks(e.x)!==O}))),e}function st(t){var e=t._mainAxis,r=[];if(e._vals)for(var n=0;n<e._vals.length;n++)if(!e._vals[n].noTick){var i=e.l2p(e._vals[n].x),a=t.p2l(i),o=Z.tickText(t,a);e._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}return ot(t,r)}function lt(t,e){var r=Q(s.simpleMap(t.range,t.r2l)),n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var o=[],l=0;l<=1;l++)if((void 0===e||!(e&&l||!1===e&&!l))&&(!l||t.minor)){var c=l?t.minor.tickvals:t.tickvals,u=l?[]:t.ticktext;if(c){s.isArrayOrTypedArray(u)||(u=[]);for(var h=0;h<c.length;h++){var f=a(c[h]);if(f>n&&f<i){var p=Z.tickText(t,f,!1,String(u[h]));l&&(p.minor=!0,p.text=""),o.push(p)}}}}return ot(t,o)}Z.getDataToCoordFunc=function(t,e,r,n){return tt(t,e,r,n).d2c},Z.counterLetter=function(t){var e=t.charAt(0);return"x"===e?"y":"y"===e?"x":void 0},Z.minDtick=function(t,e,r,n){-1===["log","category","multicategory"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},Z.saveRangeInitial=function(t,e){for(var r=Z.list(t,"",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial0&&void 0===a._rangeInitial1,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&!0!==l||e&&s)&&(a._rangeInitial0="min"===l||"max reversed"===l?void 0:a.range[0],a._rangeInitial1="max"===l||"min reversed"===l?void 0:a.range[1],a._autorangeInitial=l,n=!0)}return n},Z.saveShowSpikeInitial=function(t,e){for(var r=Z.list(t,"",!0),n=!1,i="on",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),"on"!==i||o.showspikes||(i="off")}return t._fullLayout._cartesianSpikesEnabled=i,n},Z.autoBin=function(t,e,r,n,a,o){var l,c=s.aggNums(Math.min,null,t),u=s.aggNums(Math.max,null,t);if("category"===e.type||"multicategory"===e.type)return{start:c-.5,end:u+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:u-c};if(a||(a=e.calendar),l="log"===e.type?{type:"linear",range:[c,u]}:{type:e.type,range:s.simpleMap([c,u],e.c2r,0,a),calendar:a},Z.setConvert(l),o=o&&d.dtick(o,l.type))l.dtick=o,l.tick0=d.tick0(void 0,l.type,a);else{var h;if(r)h=(u-c)/r;else{var f=s.distinctVals(t),p=Math.pow(10,Math.floor(Math.log(f.minDiff)/Math.LN10)),m=p*s.roundUp(f.minDiff/p,[.9,1.9,4.9,9.9],!0);h=Math.max(m,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(h)||(h=1)}Z.autoTicks(l,h)}var g,y=l.dtick,v=Z.tickIncrement(Z.tickFirst(l),y,"reverse",a);if("number"==typeof y)v=function(t,e,r,n,a){var o=0,s=0,l=0,c=0;function u(e){return(1+100*(e-t)/r.dtick)%100<2}for(var h=0;h<e.length;h++)e[h]%1==0?l++:i(e[h])||c++,u(e[h])&&o++,u(e[h]+r.dtick/2)&&s++;var f=e.length-c;if(l===f&&"date"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*f&&(o>.3*f||u(n)||u(a))){var p=r.dtick/2;t+=t+p<n?p:-p}return t}(v,t,l,c,u),g=v+(1+Math.floor((u-v)/y))*y;else for("M"===l.dtick.charAt(0)&&(v=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=Z.tickIncrement(t,"M6","reverse")+1.5*M:a.exactMonths>.8?t=Z.tickIncrement(t,"M1","reverse")+15.5*M:t-=S;var l=Z.tickIncrement(t,r);if(l<=n)return l}return t}(v,t,y,c,a)),g=v;g<=u;)g=Z.tickIncrement(g,y,!1,a);return{start:e.c2r(v,0,a),end:e.c2r(g,0,a),size:y,_dataSpan:u-c}},Z.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=Z.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*o+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,Z.prepTicks(t,r),a){var c=i(e.dtick),u=i(t.dtick),h=c?e.dtick:+e.dtick.substring(1),f=u?t.dtick:+t.dtick.substring(1);c&&u?nt(h,f)?h===2*A&&f===2*M&&(t.dtick=A):h===2*A&&f===3*M?t.dtick=A:h!==A||(e._input.minor||{}).nticks?it(h/f,2.5)?t.dtick=h/2:t.dtick=h:t.dtick=M:"M"===String(e.dtick).charAt(0)?u?t.dtick="M1":nt(h,f)?h>=12&&2===f&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?nt(h,f)||(t.dtick=it(h/f,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},Z.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,a=t.nticks;a||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n="y"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(a*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,Z.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=Z.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dtick<E&&(t.dtick=E)):/%p/.test(a)?(e=S,o&&!n&&t.dtick<S&&(t.dtick=S)):/%[Aadejuwx]/.test(a)?(e=M,o&&!n&&t.dtick<M&&(t.dtick=M)):/%[UVW]/.test(a)?(e=A,o&&!n&&t.dtick<A&&(t.dtick=A)):/%[Bbm]/.test(a)?(e=T,o&&(n?at(t.dtick)<1:t.dtick<k)&&(t.dtick="M1")):/%[q]/.test(a)?(e=_,o&&(n?at(t.dtick)<3:t.dtick<b)&&(t.dtick="M3")):/%[Yy]/.test(a)&&(e=y,o&&(n?at(t.dtick)<12:t.dtick<v)&&(t.dtick="M12")))}(n=r())&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}(t),t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),yt(t)},Z.calcTicks=function(t,e){for(var r,n,a,o,l=t.type,c=t.calendar,u=t.ticklabelstep,h="period"===t.ticklabelmode,f=t.range[0]>t.range[1],p=!t.ticklabelindex||s.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],d=s.simpleMap(t.range,t.r2l,void 0,void 0,e),m=d[1]<d[0],z=Math.min(d[0],d[1]),D=Math.max(d[0],d[1]),R=Math.max(1e3,t._length||0),F=[],B=[],N=[],j=[],U=[],V=t.minor&&(t.minor.ticks||t.minor.showgrid),q=1;q>=(V?0:1);q--){var H=!q;q?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var G=q?t:s.extendFlat({},t,t.minor);if(H?Z.prepMinorTicks(G,t,e):Z.prepTicks(G,e),"array"!==G.tickmode)if("sync"!==G.tickmode){var W=Q(d),Y=W[0],X=W[1],$=i(G.dtick),J="log"===l&&!($||"L"===G.dtick.charAt(0)),K=Z.tickFirst(G,e);if(q){if(t._tmin=K,K<Y!==m)break;"category"!==l&&"multicategory"!==l||(X=m?Math.max(-.5,X):Math.min(t._categories.length-.5,X))}var tt,et,rt=null,nt=K;q&&($?et=t.dtick:"date"===l?"string"==typeof t.dtick&&"M"===t.dtick.charAt(0)&&(et=T*t.dtick.substring(1)):et=t._roughDTick,tt=Math.round((t.r2l(nt)-t.r2l(t.tick0))/et)-1);var it=G.dtick;for(G.rangebreaks&&G._tick0Init!==G.tick0&&(nt=Ft(nt,t),m||(nt=Z.tickIncrement(nt,it,!m,c))),q&&h&&(nt=Z.tickIncrement(nt,it,!m,c),tt--);m?nt>=X:nt<=X;nt=Z.tickIncrement(nt,it,m,c)){if(q&&tt++,G.rangebreaks&&!m){if(nt<Y)continue;if(G.maskBreaks(nt)===O&&Ft(nt,G)>=D)break}if(N.length>R||nt===rt)break;rt=nt;var at={value:nt};q?(J&&nt!==(0|nt)&&(at.simpleLabel=!0),u>1&&tt%u&&(at.skipLabel=!0),N.push(at)):(at.minor=!0,j.push(at))}}else N=[],F=st(t);else q?(N=[],F=lt(t,!H)):(j=[],B=lt(t,!H))}!j||j.length<2?p=!1:(r=(j[1].value-j[0].value)*(f?-1:1),n=t.tickformat,(/%f/.test(n)?r>=P:/%L/.test(n)?r>=I:/%[SX]/.test(n)?r>=L:/%M/.test(n)?r>=C:/%[HI]/.test(n)?r>=E:/%p/.test(n)?r>=S:/%[Aadejuwx]/.test(n)?r>=M:/%[UVW]/.test(n)?r>=A:/%[Bbm]/.test(n)?r>=k:/%[q]/.test(n)?r>=b:!/%[Yy]/.test(n)||r>=v)||(p=!1));if(p){var ot=N.concat(j);h&&N.length&&(ot=ot.slice(1)),(ot=ot.sort((function(t,e){return t.value-e.value})).filter((function(t,e,r){return 0===e||t.value!==r[e-1].value}))).map((function(t,e){return void 0!==t.minor||t.skipLabel?null:e})).filter((function(t){return null!==t})).forEach((function(t){p.map((function(e){var r=t+e;r>=0&&r<ot.length&&s.pushUnique(U,ot[r])}))}))}else U=N;if(V&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var ct=N.map((function(t){return t.value})),ut=[],ht=0;ht<j.length;ht++){var ft=j[ht],pt=ft.value;if(-1===ct.indexOf(pt)){for(var dt=!1,mt=0;!dt&&mt<N.length;mt++)1e7+N[mt].value===1e7+pt&&(dt=!0);dt||ut.push(ft)}}j=ut}if(h&&function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n].value,a=n,o=n+1;n<t.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),h=r||u,f=0;h>=v?f=u>=v&&u<=g?u:y:r===_&&h>=b?f=u>=b&&u<=x?u:_:h>=k?f=u>=k&&u<=w?u:T:r===A&&h>=A?f=A:h>=M?f=M:r===S&&h>=S?f=S:r===E&&h>=E&&(f=E),f>=u&&(f=u,s=!0);var p=i+f;if(e.rangebreaks&&f>0){for(var d=0,m=0;m<84;m++){var C=(m+.5)/84;e.maskBreaks(i*(1-C)+C*p)!==O&&d++}(f*=d/84)||(t[n].drop=!0),s&&u>A&&(f=u)}(f>0||0===n)&&(t[n].periodX=i+f/2)}}(U,t,t._definedDelta),t.rangebreaks){var gt="y"===t._id.charAt(0),yt=1;"auto"===t.tickmode&&(yt=t.tickfont?t.tickfont.size:12);var vt=NaN;for(a=N.length-1;a>-1;a--)if(N[a].drop)N.splice(a,1);else{N[a].value=Ft(N[a].value,t);var xt=t.c2p(N[a].value);(gt?vt>xt-yt:vt<xt+yt)?N.splice(m?a+1:a,1):vt=xt}}Rt(t)&&360===Math.abs(d[1]-d[0])&&N.pop(),t._tmax=(N[N.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;var _t,bt=function(e){e.text="",t._prevDateHead=o};function wt(t,e){var r=Z.tickText(t,e.value,!1,e.simpleLabel),n=e.periodX;return void 0!==n&&(r.periodX=n,(n>D||n<z)&&(n>D&&(r.periodX=D),n<z&&(r.periodX=z),bt(r))),r}for(N=N.concat(j),a=0;a<N.length;a++){var Tt=N[a].minor,kt=N[a].value;Tt?((_t=p&&-1!==U.indexOf(N[a])?wt(t,N[a]):{x:kt}).minor=!0,B.push(_t)):(o=t._prevDateHead,_t=wt(t,N[a]),(N[a].skipLabel||p&&-1===U.indexOf(N[a]))&&bt(_t),F.push(_t))}return F=F.concat(B),t._inCalcTicks=!1,h&&F.length&&(F[0].noTick=!0),F};var ct=[2,5,10],ut=[1,2,3,6,12],ht=[1,2,5,10,15,30],ft=[1,2,3,7,14],pt=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],dt=[-.301,0,.301,.699,1],mt=[15,30,45,90,180];function gt(t,e,r){return e*s.roundUp(t/e,r)}function yt(t){var e=t.dtick;if(t._tickexponent=0,i(e)||"string"==typeof e||(e=1),"category"!==t.type&&"multicategory"!==t.type||(t._tickround=null),"date"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,""),a=n.length;if("M"===String(e).charAt(0))a>10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&a<=10||e>=15*M)t._tickround="d";else if(e>=C&&a<=16||e>=E)t._tickround="M";else if(e>=L&&a<=19||e>=C)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(_t(t.exponentformat)&&!bt(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function vt(t,e,r){var n=t.tickfont||{};return{x:e,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}}Z.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>y)e/=y,n=a(10),t.dtick="M"+12*gt(e,n,ct);else if(o>T)e/=T,t.dtick="M"+gt(e,1,ut);else if(o>M){if(t.dtick=gt(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:ft),!r){var l=Z.getTickFormat(t),c="period"===t.ticklabelmode;c&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),c&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=gt(e,E,ut):o>C?t.dtick=gt(e,C,ht):o>L?t.dtick=gt(e,L,ht):(n=a(10),t.dtick=gt(e,n,ct))}else if("log"===t.type){t.tick0=0;var u=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(u[1]-u[0])<1){var h=1.5*Math.abs((u[1]-u[0])/e);e=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,n=a(10),t.dtick="L"+gt(e,n,ct)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Rt(t)?(t.tick0=0,n=1,t.dtick=gt(e,n,mt)):(t.tick0=0,n=a(10),t.dtick=gt(e,n,ct));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(f)}},Z.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,a);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?dt:pt,h=t+.01*o,f=s.roundUp(s.mod(h,1),u,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)},Z.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1]<a[0],l=o?Math.floor:Math.ceil,c=Q(a)[0],u=t.dtick,h=r(t.tick0);if(i(u)){var f=l((c-h)/u)*u+h;return"category"!==t.type&&"multicategory"!==t.type||(f=s.constrain(f,0,t._categories.length-1)),f}var p=u.charAt(0),d=Number(u.substr(1));if("M"===p){for(var m,g,y,v=0,x=h;v<10;){if(((m=Z.tickIncrement(x,u,o,t.calendar))-c)*(x-c)<=0)return o?Math.min(x,m):Math.max(x,m);g=(c-(x+m)/2)/(m-x),y=p+(Math.abs(Math.round(g))||1)*d,x=Z.tickIncrement(x,y,g<0?!o:o,t.calendar),v++}return s.error("tickFirst did not converge",t),x}if("L"===p)return Math.log(l((Math.pow(10,c)-h)/d)*d+h)/Math.LN10;if("D"===p){var _="D2"===u?dt:pt,b=s.roundUp(s.mod(c,1),_,o);return Math.floor(c)+Math.log(n.round(Math.pow(10,b),1))/Math.LN10}throw"unrecognized dtick "+String(u)},Z.tickText=function(t,e,r,n){var a,o=vt(t,e),l="array"===t.tickmode,c=r||l,u=t.type,h="category"===u?t.d2l_noadd:t.d2l,f=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var p=s.simpleMap(t.range,t.r2l),d=(Math.abs(p[1]-p[0])-(t._lBreaks||0))/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-h(t.tickvals[a]))<d);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o.xbnd=[f(o.x-.5),f(o.x+t.dtick-.5)],o}function m(n){if(void 0===n)return!0;if(r)return"none"===n;var i={first:t._tmin,last:t._tmax}[n];return"all"!==n&&e!==i}var g=r?"never":"none"!==t.exponentformat&&m(t.showexponent)?"hide":"";if("date"===u?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||Z.getTickFormat(t);(n=!o&&n)&&(a=i(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var l,c=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),u=c.indexOf("\n");if(-1!==u&&(l=c.substr(u+1),c=c.substr(0,u)),n&&(void 0===l||"00:00:00"!==c&&"00:00"!==c?8===c.length&&(c=c.replace(/:00$/,"")):(c=l,l="")),l)if(r)"d"===a?c+=", "+l:c=l+(c?", "+c:"");else if(t._inCalcTicks&&t._prevDateHead===l){var h=Bt(t),f=t._trueSide||t.side;(!h&&"top"===f||h&&"bottom"===f)&&(c+="<br> ")}else t._prevDateHead=l,c+="<br>"+l;e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)e.text=wt(Math.pow(10,l),t,a,n);else if(i(o)||"D"===u&&s.mod(l+.01,1)<.1){var h=Math.round(l),f=Math.abs(h),p=t.exponentformat;"power"===p||_t(p)&&bt(h)?(e.text=0===h?1:1===h?"10":"10<sup>"+(h>1?"":z)+f+"</sup>",e.fontSize*=1.25):("e"===p||"E"===p)&&f>2?e.text="1"+p+(h>0?"+":z)+f:(e.text=wt(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,g):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):Rt(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=wt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=wt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["<sup>",o[0],"</sup>","⁄","<sub>",o[1],"</sub>","π"].join(""),l&&(e.text=z+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=wt(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!m(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!m(t.showticksuffix)&&(o.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(o.text)){var y=t.labelalias[o.text];"string"==typeof y&&(o.text=y)}return("boundaries"===t.tickson||t.showdividers)&&(o.xbnd=[f(o.x-.5),f(o.x+t.dtick-.5)]),o},Z.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return Z.hoverLabelText(t,n,r)+" - "+Z.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=Z.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":z+o:o};var xt=["f","p","n","μ","m","","k","M","G","T"];function _t(t){return"SI"===t||"B"===t}function bt(t){return t>14||t<-15}function wt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=Z.getTickFormat(e),h=e.separatethousands;if(n){var f={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};yt(f),o=(Number(f._tickround)||0)+4,c=f._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,z);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))<d)t="0",a=!1;else{if(t+=d,c&&(t*=Math.pow(10,-c),o+=c),0===o)t=String(Math.floor(t));else if(o<0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var m=o;m<0;m++)t+="0"}else{var g=(t=String(t)).indexOf(".")+1;g&&(t=t.substr(0,g+o).replace(/\.?0+$/,""))}t=s.numSeparate(t,e._separators,h)}return c&&"hide"!==l&&(_t(l)&&bt(c)&&(l="power"),p=c<0?z+-c:"power"!==l?"+"+c:String(c),"e"===l||"E"===l?t+=l+p:"power"===l?t+="×10<sup>"+p+"</sup>":"B"===l&&9===c?t+="B":_t(l)&&(t+=xt[c/3+5])),a?z+t:t}function Tt(t,e){if(t){var r=Object.keys(j).reduce((function(t,r){return-1!==e.indexOf(r)&&j[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function kt(t,e){for(var r=[],n={},i=0;i<e.length;i++){var a=e[i];n[a.text2]?n[a.text2].push(a.x):n[a.text2]=[a.x]}for(var o in n)r.push(vt(t,s.interp(n[o],.5),o));return r}function At(t){return void 0!==t.periodX?t.periodX:t.x}function Mt(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function St(t){var e=t.title.font.size,r=(t.title.text.match(c.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?e*(q+r*H):r?e*(r+1)*H:e}function Et(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function Ct(t){var e=n.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}function Lt(t){return t._id+".automargin"}function It(t){return Lt(t)+".mirror"}function Pt(t){return t._id+".rangeslider"}function zt(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function Ot(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(Z.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(Z.getFromId(t,r[n]));var c=Object.keys(p),u=["anchor","domain","overlaying","position","side","tickangle","editType"],h=["linear","log"];for(n=0;n<c.length;n++){var f=c[n],d=a[0][f],m=o[0][f],g=!0,y=!1,v=!1;if("_"!==f.charAt(0)&&"function"!=typeof d&&-1===u.indexOf(f)){for(i=1;i<a.length&&g;i++){var x=a[i][f];"type"===f&&-1!==h.indexOf(d)&&-1!==h.indexOf(x)&&d!==x?y=!0:x!==d&&(g=!1)}for(i=1;i<o.length&&g;i++){var _=o[i][f];"type"===f&&-1!==h.indexOf(m)&&-1!==h.indexOf(_)&&m!==_?v=!0:o[i][f]!==m&&(g=!1)}g&&(y&&(l[a[0]._name].type="linear"),v&&(l[o[0]._name].type="linear"),Dt(l,f,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var b=t._fullLayout.annotations[n];-1!==e.indexOf(b.xref)&&-1!==r.indexOf(b.yref)&&s.swapAttrs(l.annotations[n],["?"])}}function Dt(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),c=o(t[n[0]._name],e).get();for("title"===e&&(l&&l.text===i.x&&(l.text=i.y),c&&c.text===i.y&&(c.text=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+"."+e).set(c);for(a=0;a<n.length;a++)o(t,n[a]._name+"."+e).set(l)}function Rt(t){return"angularaxis"===t._id}function Ft(t,e){for(var r=e._rangebreaks.length,n=0;n<r;n++){var i=e._rangebreaks[n];if(t>=i.min&&t<i.max)return i.max}return t}function Bt(t){return-1!==(t.ticklabelposition||"").indexOf("inside")}function Nt(t,e){Bt(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function jt(t,e,r,n){var i,a="free"===t.anchor||void 0!==t.overlaying&&!1!==t.overlaying?t.overlaying:t._id;i=n?"right"===t.side?e:-e:e,a in r||(r[a]={}),t.side in r[a]||(r[a][t.side]=0),r[a][t.side]+=i}Z.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function c(t){return"string"!=typeof t?t:Number(t.replace("M",""))*T}function u(t,e){var r=["L","D"];if(typeof t==typeof e){if("number"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,""))-Number(e.replace(/(L|D)/g,"")):n-i}return"number"==typeof t?1:-1}function h(t,e){var r=null===e[0],n=null===e[1],i=u(t,e[0])>=0,a=u(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&(i=t.dtick,a=n.dtickrange,o=void 0,s=void 0,l=void 0,o=c||function(t){return t},s=a[0],l=a[1],(!s&&"number"!=typeof s||o(s)<=o(i))&&(!l&&"number"!=typeof l||o(l)>=o(i)))){r=n;break}break;case"log":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&h(t.dtick,n.dtickrange)){r=n;break}}return r?r.value:t.tickformat},Z.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?Z.findSubplotsWithAxis(n,e):n;return i.sort((function(t,e){var r=t.substr(1).split("y"),n=e.substr(1).split("y");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),i},Z.findSubplotsWithAxis=function(t,e){for(var r=new RegExp("x"===e._id.charAt(0)?"^"+e._id+"y":e._id+"$"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},Z.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:""},o={_offset:0,_length:e.height,_id:""},s=Z.list(t,"x",!0),l=Z.list(t,"y",!0),c=[];for(r=0;r<s.length;r++)for(c.push({x:s[r],y:o}),i=0;i<l.length;i++)0===r&&c.push({x:a,y:l[i]}),c.push({x:s[r],y:l[i]});var u=e._clips.selectAll(".axesclip").data(c,(function(t){return t.x._id+t.y._id}));u.enter().append("clipPath").classed("axesclip",!0).attr("id",(function(t){return"clip"+e._uid+t.x._id+t.y._id})).append("rect"),u.exit().remove(),u.each((function(t){n.select(this).select("rect").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})}))}},Z.draw=function(t,e,r){var n=t._fullLayout;"redraw"===e&&n._paper.selectAll("g.subplot").each((function(t){var e=t[0],r=n._plots[e];if(r){var i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll("."+i._id+"tick").remove(),r.yaxislayer.selectAll("."+a._id+"tick").remove(),r.xaxislayer.selectAll("."+i._id+"tick2").remove(),r.yaxislayer.selectAll("."+a._id+"tick2").remove(),r.xaxislayer.selectAll("."+i._id+"divider").remove(),r.yaxislayer.selectAll("."+a._id+"divider").remove(),r.minorGridlayer&&r.minorGridlayer.selectAll("path").remove(),r.gridlayer&&r.gridlayer.selectAll("path").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+i._id+"title").remove(),n._infolayer.select(".g-"+a._id+"title").remove()}}));var i=e&&"redraw"!==e?e:Z.listIds(t),a=Z.list(t).filter((function(t){return t.autoshift})).map((function(t){return t.overlaying}));i.map((function(e){var r=Z.getFromId(t,e);if("sync"===r.tickmode&&r.overlaying){var n=i.findIndex((function(t){return t===r.overlaying}));n>=0&&i.unshift(i.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=Z.getFromId(t,e);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=Z.drawOne(t,n,r);return n._shiftPusher&&jt(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},Z.drawOne=function(t,e,r){var n,i,l,p=(r=r||{}).axShifts||{},d=r.overlayingShiftedAx||[];e.setScale();var m=t._fullLayout,g=e._id,y=g.charAt(0),v=Z.counterLetter(g),x=m._plots[e._mainSubplot];if(x){if(e._shiftPusher=e.autoshift||-1!==d.indexOf(e._id)||-1!==d.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var _=e.linewidth/2||0;"inside"===e.ticks&&(_+=e.ticklen),jt(e,_,p,!0),jt(e,e.shift||0,p,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,p));var b=x[y+"axislayer"],w=e._mainLinePosition,T=w+=e._shift,k=e._mainMirrorPosition,A=e._vals=Z.calcTicks(e),M=[e.mirror,T,k].join("_");for(n=0;n<A.length;n++)A[n].axInfo=M;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var S={};if(e.visible){var E,C,L=Z.makeTransTickFn(e),I=Z.makeTransTickLabelFn(e),P="inside"===e.ticks,z="outside"===e.ticks;if("boundaries"===e.tickson){var O=function(t,e){var r,n=[],i=function(t,e){var r=t.xbnd[e];null!==r&&n.push(s.extendFlat({},t,{x:r}))};if(e.length){for(r=0;r<e.length;r++)i(e[r],0);i(e[r-1],1)}return n}(0,A);C=Z.clipEnds(e,O),E=P?C:O}else C=Z.clipEnds(e,A),E=P&&"period"!==e.ticklabelmode?C:A;var D,R=e._gridVals=C,F=function(t,e){var r,n,i=[],a=e.length&&e[e.length-1].x<e[0].x,o=function(t,e){var r=t.xbnd[e];null!==r&&i.push(s.extendFlat({},t,{x:r}))};if(t.showdividers&&e.length){for(r=0;r<e.length;r++){var l=e[r];l.text2!==n&&o(l,a?1:0),n=l.text2}o(e[r-1],a?0:1)}return i}(e,A);if(!m._hasOnlyLargeSploms){var B=e._subplotsWith,N={};for(n=0;n<B.length;n++){i=B[n];var j=(l=m._plots[i])[v+"axis"],U=j._mainAxis._id;if(!N[U]){N[U]=1;var W="x"===y?"M0,"+j._offset+"v"+j._length:"M"+j._offset+",0h"+j._length;Z.drawGrid(t,e,{vals:R,counterAxis:j,layer:l.gridlayer.select("."+g),minorLayer:l.minorGridlayer.select("."+g),path:W,transFn:L}),Z.drawZeroLine(t,e,{counterAxis:j,layer:l.zerolinelayer,path:W,transFn:L})}}}var Y=Z.getTickSigns(e),X=Z.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var $,J,K,Q,tt=Z.makeTickPath(e,T,Y[2]),et=Z.makeTickPath(e,T,X[2],{minor:!0});if(e._anchorAxis&&e.mirror&&!0!==e.mirror?($=Z.makeTickPath(e,k,Y[3]),J=Z.makeTickPath(e,k,X[3],{minor:!0}),K=tt+$,Q=et+J):($="",J="",K=tt,Q=et),e.showdividers&&z&&"boundaries"===e.tickson){var rt={};for(n=0;n<F.length;n++)rt[F[n].x]=1;D=function(t){return rt[t.x]?$:K}}else D=function(t){return t.minor?Q:K}}if(Z.drawTicks(t,e,{vals:E,layer:b,path:D,transFn:L}),"allticks"===e.mirror){var nt=Object.keys(e._linepositions||{});for(n=0;n<nt.length;n++){i=nt[n],l=m._plots[i];var it=e._linepositions[i]||[],at=it[0],ot=it[1],st=it[2],lt=Z.makeTickPath(e,at,st?Y[0]:X[0],{minor:st})+Z.makeTickPath(e,ot,st?Y[1]:X[1],{minor:st});Z.drawTicks(t,e,{vals:E,layer:l[y+"axislayer"],path:lt,transFn:L})}}var ct=[];if(ct.push((function(){return Z.drawLabels(t,e,{vals:A,layer:b,plotinfo:l,transFn:I,labelFns:Z.makeLabelFns(e,T)})})),"multicategory"===e.type){var ut={x:2,y:10}[y];ct.push((function(){var r={x:"height",y:"width"}[y],n=ft()[r]+ut+(e._tickAngles[g+"tick"]?e.tickfont.size*H:0);return Z.drawLabels(t,e,{vals:kt(e,A),layer:b,cls:g+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:L,labelFns:Z.makeLabelFns(e,T+n*Y[4])})})),ct.push((function(){return e._depth=Y[4]*(ft("tick2")[e.side]-T),function(t,e,r){var n=e._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,Mt);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(h.stroke,e.dividercolor).style("stroke-width",f.crispRound(t,e.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}(t,e,{vals:F,layer:b,path:Z.makeTickPath(e,T,Y[4],{len:e._depth}),transFn:L})}))}else e.title.hasOwnProperty("standoff")&&ct.push((function(){e._depth=Y[4]*(ft()[e.side]-T)}));var ht=o.getComponentMethod("rangeslider","isVisible")(e);return r.skipTitle||ht&&"bottom"===e.side||ct.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size,s=(e.title.text.match(c.BR_TAG_ALL)||[]).length;if(e.title.hasOwnProperty("standoff"))"bottom"===e.side||"right"===e.side?r=e._depth+e.title.standoff+o*q:"top"!==e.side&&"left"!==e.side||(r=e._depth+e.title.standoff+o*(V+s*H));else{var l=Bt(e);if("multicategory"===e.type)r=e._depth;else{var h=1.5*o;l&&(h=.5*o,"outside"===e.ticks&&(h+=e.ticklen)),r=10+h+(e.linewidth?e.linewidth-1:0)}l||(r+="x"===a?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var p,d,m,g,y=Z.getPxPosition(t,e);if("x"===a?(d=e._offset+e._length/2,m="top"===e.side?y-r:y+r):(m=e._offset+e._length/2,d="right"===e.side?y+r:y-r,p={rotate:"-90",offset:0}),"multicategory"!==e.type){var v=e._selections[e._id+"tick"];if(g={selection:v,side:e.side},v&&v.node()&&v.node().parentNode){var x=f.getTranslate(v.node().parentNode);g.offsetLeft=x.x,g.offsetTop=x.y}e.title.hasOwnProperty("standoff")&&(g.pad=0)}return e._titleStandoff=r,u.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:g,transform:p,attributes:{x:d,y:m,"text-anchor":"middle"}})}(t,e)})),ct.push((function(){var r,n,i,s,l=e.side.charAt(0),c=G[e.side].charAt(0),u=Z.getPxPosition(t,e),h=z?e.ticklen:0;(e.automargin||ht||e._shiftPusher)&&("multicategory"===e.type?r=ft("tick2"):(r=ft(),"x"===y&&"b"===l&&(e._depth=Math.max(r.width>0?r.bottom-u:0,h))));var f=0,p=0;if(e._shiftPusher&&(f=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),e.title.text!==m._dfltTitle[y]&&(p=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(p+=St(e))),e._fullDepth=Math.max(f,p)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var d=[0,1],g="number"==typeof e._shift?e._shift:0;if("x"===y){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?u-r.top:0,h),d.reverse()),r.width>0){var x=r.right-(e._offset+e._length);x>0&&(n.xr=1,n.r=x);var _=e._offset-r.left;_>0&&(n.xl=0,n.l=_)}}else if("l"===l?(e._depth=Math.max(r.height>0?u-r.left:0,h),n[l]=e._depth-g):(e._depth=Math.max(r.height>0?r.right-u:0,h),n[l]=e._depth+g,d.reverse()),r.height>0){var b=r.bottom-(e._offset+e._length);b>0&&(n.yb=0,n.b=b);var w=e._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[v]="free"===e.anchor?e.position:e._anchorAxis.domain[d[0]],e.title.text!==m._dfltTitle[y]&&(n[l]+=St(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[c]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[c]+=h),!0===e.mirror||"ticks"===e.mirror?i[v]=e._anchorAxis.domain[d[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[v]=[e._counterDomainMin,e._counterDomainMax][d[1]]))}ht&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(Tt(n,e.automargin),Tt(i,e.automargin)),a.autoMargin(t,Lt(e),n),a.autoMargin(t,It(e),i),a.autoMargin(t,Pt(e),s)})),s.syncOrAsync(ct)}}function ft(t){var r=g+(t||"tick");return S[r]||(S[r]=function(t,e,r){var n,i,a,o;if(t._selections[e].size())n=1/0,i=-1/0,a=1/0,o=-1/0,t._selections[e].each((function(){var t=Ct(this),e=f.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),a=Math.min(a,e.left),o=Math.max(o,e.right)}));else{var s=Z.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(e,r,T)),S[r]}},Z.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},Z.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},Z.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,h=3,f=t.tickfont?t.tickfont.size:12;return(o||n)&&(u+=f*q,h+=(t.linewidth||0)/2),(i||a)&&(u+=(t.linewidth||0)/2,h+=3),s&&"top"===c&&(h-=f*(1-q)),(i||n)&&(u=-u),"bottom"!==c&&"right"!==c||(h=-h),[l?u:0,s?h:0]}(t),r=t.ticklabelshift||0,n=t.ticklabelstandoff||0,i=e[0],a=e[1],o=t.range[0]>t.range[1],s=t.ticklabelposition&&-1!==t.ticklabelposition.indexOf("inside"),c=!s;if(r&&(r*=o?-1:1),n){var u=t.side;n*=s&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===t._id.charAt(0)?function(e){return l(i+t._offset+t.l2p(At(e))+r,a+n)}:function(e){return l(a+n,i+t._offset+t.l2p(At(e))+r)}},Z.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===o?"M0,"+(e+s*r)+"v"+a*r:"M"+(e+s*r)+",0h"+a*r},Z.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",a=function(t){return-1!==n.indexOf(t)},o=a("top"),l=a("left"),c=a("right"),u=a("bottom")||l||o||c,h=a("inside"),f="inside"===n&&"inside"===t.ticks||!h&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,d=0,m=f?t.ticklen:0;if(h?m*=-1:u&&(m=0),f&&(p+=m,r)){var g=s.deg2rad(r);p=m*Math.cos(g)+1,d=m*Math.sin(g)}t.showticklabels&&(f||t.showline)&&(p+=.2*t.tickfont.size);var y,v,x,_,b,w={labelStandoff:p+=(t.linewidth||1)/2*(h?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if("x"===A)_=(b=!h&&"bottom"===k||h&&"top"===k)?1:-1,h&&(_*=-1),y=d*_,v=e+p*_,x=b?1:-.2,90===Math.abs(M)&&(h?x+=V:x=-90===M&&"bottom"===k?q:90===M&&"top"===k?V:.5,T=V/2*(M/90)),w.xFn=function(t){return t.dx+y+T*t.fontSize},w.yFn=function(t){return t.dy+v+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*_<0!==h?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==h?-n:0};else if("y"===A){if(_=(b=!h&&"left"===k||h&&"right"===k)?1:-1,h&&(_*=-1),y=p,v=d*_,x=0,h||90!==Math.abs(M)||(x=-90===M&&"left"===k||90===M&&"right"===k?q:.5),h){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*q*_,x=0}}w.xFn=function(t){return t.dx+e-(y+t.fontSize*x)*_+T*t.fontSize},w.yFn=function(t){return t.dy+v+t.fontSize*V},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":b?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},Z.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,Mt);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return f.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Nt(e,[B]),o.attr("transform",r.transFn)},Z.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",a=e.minor&&e.minor.showgrid,o=a?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&Z.shouldShowZeroLine(t,e,l))for(var c="array"===e.tickmode,u=0;u<s.length;u++){var p=s[u].x;if(c?!p:Math.abs(p)<e.dtick/100){if(s=s.slice(0,u).concat(s.slice(u+1)),!c)break;u--}}e._gw=f.crispRound(t,e.gridwidth,1);for(var d=a?f.crispRound(t,e.minor.gridwidth,1):0,m=r.layer,g=r.minorLayer,y=1;y>=0;y--){var v=y?m:g;if(v){var x=v.selectAll("path."+i).data(y?s:o,Mt);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return f.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?d:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Nt(e,[R,F])}},Z.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=Z.shouldShowZeroLine(t,e,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return X(t.id,e.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(h.stroke,e.zerolinecolor||h.defaultLine).style("stroke-width",f.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Nt(e,[D])},Z.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,u=r.cls||o+"tick",h=r.vals.filter((function(t){return t.text})),p=r.labelFns,d=r.secondary?0:e.tickangle,m=(e._prevTickAngles||{})[u],g=r.layer.selectAll("g."+u).data(e.showticklabels?h:[],Mt),y=[];function v(t,a){t.each((function(t){var o=n.select(this),s=o.select(".text-math-group"),u=p.anchorFn(t,a),h=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?" rotate("+a+","+p.xFn(t)+","+(p.yFn(t)-t.fontSize/2)+")":""),d=c.lineCount(o),m=H*t.fontSize,g=p.heightFn(t,i(a)?+a:0,(d-1)*m);if(g&&(h+=l(0,g)),s.empty()){var y=o.select("text");y.attr({transform:h,"text-anchor":u}),y.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var v=f.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",h+l(v,0))}}))}g.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(c.positionText,p.xFn(e),p.yFn(e)).call(f.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant,textcase:e.fontTextcase,lineposition:e.fontLineposition,shadow:e.fontShadow}).text(e.text).call(c.convertToTspans,t),t._promises[i]?y.push(t._promises.pop().then((function(){v(r,d)}))):v(r,d)})),Nt(e,[N]),g.exit().remove(),r.repositionOnUpdate&&g.each((function(t){n.select(this).select("text").call(c.positionText,p.xFn(t),p.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===e._id.charAt(0),l=0,c=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var u=s.simpleMap(e.range,e.r2l);l=e.l2p(u[0])+e._offset,c=e.l2p(u[1])+e._offset}var h=Math.min(l,c),p=Math.max(l,c),d=e.side,m=1/0,y=-1/0;for(var v in g.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=f.bBox(r.node()),s=0;o?(a.right>p||a.left<h)&&(s=1):(a.bottom>p||a.top+(e.tickangle?0:t.fontSize/4)<h)&&(s=1);var l=r.select("text");s?i&&l.style("opacity",0):(l.style("opacity",1),m="bottom"===d||"right"===d?Math.min(m,o?a.top:a.left):-1/0,y="top"===d||"left"===d?Math.max(y,o?a.bottom:a.right):1/0)}})),a._plots){var x=a._plots[v];if(e._id===x.xaxis._id||e._id===x.yaxis._id){var _=o?x.yaxis:x.xaxis;_&&(_["_visibleLabelMin_"+e._id]=m,_["_visibleLabelMax_"+e._id]=y)}}}},e._hideCounterAxisInsideTickLabels=function(t){var r="x"===e._id.charAt(0),i=[];for(var o in a._plots){var s=a._plots[o];e._id!==s.xaxis._id&&e._id!==s.yaxis._id||i.push(r?s.yaxis:s.xaxis)}i.forEach((function(r,i){r&&Bt(r)&&(t||[D,F,R,B,N]).forEach((function(t){var o="tick"===t.K&&"text"===t.L&&"period"===e.ticklabelmode,s=a._plots[e._mainSubplot];(t.K===D.K?s.zerolinelayer.selectAll("."+e._id+"zl"):t.K===F.K?s.minorGridlayer.selectAll("."+e._id):t.K===R.K?s.gridlayer.selectAll("."+e._id):s[e._id.charAt(0)+"axislayer"]).each((function(){var a=n.select(this);t.L&&(a=a.selectAll(t.L)),a.each((function(a){var s=e.l2p(o?At(a):a.x)+e._offset,l=n.select(this);s<e["_visibleLabelMax_"+r._id]&&s>e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},v(g,m+1?m:d);var x=null;e._selections&&(e._selections[u]=g);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(x=m,_.push((function(){v(g,m)}))):_.push((function(){if(v(g,d),h.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){x=e.autotickangles[0];var t,n=0,i=[],a=1;g.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),o=Ct(this),s=f.bBox(o.node());a=Math.max(a,c.lineCount(o)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})}));var o=("boundaries"===e.tickson||e.showdividers)&&!r.secondary,l=h.length,u=Math.abs((h[l-1].x-h[0].x)*e._m)/(l-1),p=o?u/2:u,m=o?e.ticklen:1.25*n*a,y=p/Math.sqrt(Math.pow(p,2)+Math.pow(m,2)),_=e.autotickangles.map((function(t){return t*Math.PI/180})),b=_.find((function(t){return Math.abs(Math.cos(t))<=y}));void 0===b&&(b=_.reduce((function(t,e){return Math.abs(Math.cos(t))<Math.abs(Math.cos(e))?t:e}),_[0]));var w=b*(180/Math.PI);if(o){var T=2;for(e.ticks&&(T+=e.tickwidth/2),t=0;t<i.length;t++){var k=h[t].xbnd,A=i[t];if(null!==k[0]&&A.left-e.l2p(k[0])<T||null!==k[1]&&e.l2p(k[1])-A.right<T){x=w;break}}}else{var M=e.ticklabelposition||"",S=function(t){return-1!==M.indexOf(t)},E=S("top"),C=S("left"),L=S("right"),I=S("bottom")||C||E||L?(e.tickwidth||0)+6:0;for(t=0;t<i.length-1;t++)if(s.bBoxIntersect(i[t],i[t+1],I)){x=w;break}}x&&v(g,x)}})),e._tickAngles&&_.push((function(){e._tickAngles[u]=null===x?i(d)?d:0:x}));var b=function(){var t=0,r=0;return g.each((function(n,i){var a,o=Ct(this);o.select(".text-math-group").empty()&&(e._vals[i]&&(a=e._vals[i].bb||f.bBox(o.node()),e._vals[i].bb=a),t=Math.max(t,a.width),r=Math.max(r,a.height))})),{labelsMaxW:t,labelsMaxH:r}},w=e._anchorAxis;if(w&&(w.autorange||w.insiderange)&&Bt(e)&&!$(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),w.autorange&&(a._insideTickLabelsUpdaterange[w._name+".autorange"]=w.autorange,_.push(b)),w.insiderange)){var T=b(),k="y"===e._id.charAt(0)?T.labelsMaxW:T.labelsMaxH;k+=6,"inside"===e.ticklabelposition&&(k+=e.ticklen||0);var A="right"===e.side||"top"===e.side?1:-1,M=1===A?1:0,S=1===A?0:1,E=[];E[S]=w.range[S];var C=w.range,L=w.r2p(C[M]),I=w.r2p(C[S]),P=a._insideTickLabelsUpdaterange[w._name+".range"];if(P){var z=w.r2p(P[M]),O=w.r2p(P[S]),j=A*("y"===e._id.charAt(0)?1:-1);j*L<j*z&&(L=z,E[M]=C[M]=P[M]),j*I>j*O&&(I=O,E[S]=C[S]=P[S])}var U=Math.abs(I-L);U-k>0?k*=1+k/(U-=k):k=0,"y"!==e._id.charAt(0)&&(k=-k),E[M]=w.p2r(w.r2p(C[M])+A*k),"min"===w.autorange||"max reversed"===w.autorange?(E[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(E[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=E}var V=s.syncOrAsync(_);return V&&V.then&&t._promises.push(V),V},Z.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),a=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w+e._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},Z.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===O)&&(Et(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var a=t._fullLayout,o=e._id.charAt(0),s=Z.counterLetter(e._id),l=e._offset+(Math.abs(n[0])<Math.abs(n[1])==("x"===o)?0:e._length),c=a._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return p(r);for(var u=Z.list(t,s),h=0;h<u.length;h++){var f=u[h];if(f._mainAxis===i&&p(f))return!0}}function p(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return"number"==typeof t&&Math.abs(t-l)<r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a<r.length;a++){var s=r[a];if(!0===s.visible&&s.xaxis+s.yaxis===n){if(o.traceIs(s,"bar-like")&&s.orientation==={x:"h",y:"v"}[i])return!0;if(s.fill&&s.fill.charAt(s.fill.length-1)===i)return!0}}return!1}(t,e))},Z.clipEnds=function(t,e){return e.filter((function(e){return Et(t,e.x)}))},Z.allowAutoMargin=function(t){for(var e=Z.list(t,"",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&(a.allowAutoMargin(t,Lt(n)),n.mirror&&a.allowAutoMargin(t,It(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&a.allowAutoMargin(t,Pt(n))}},Z.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,c=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],zt(c.x,l.x),zt(c.y,l.y);zt(c.x,[o]),zt(c.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)Ot(t,r[n].x,r[n].y)}},9666:function(t,e,r){"use strict";var n=r(10721),i=r(34809),a=r(63821).BADNUM,o=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,c=Math.round;function u(t,e){return e?n(t):"number"==typeof t}function h(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,f=r.noMultiCategory;if(o(i)&&!i.length)return"-";if(!f&&function(t){return o(t[0])&&o(t[1])}(i))return"multicategory";if(f&&Array.isArray(i[0])){for(var p=[],d=0;d<i.length;d++)if(o(i[d]))for(var m=0;m<i[d].length;m++)p.push(i[d][m]);i=p}if(function(t,e){for(var r=t.length,i=h(r),a=0,o=0,l={},u=0;u<r;u+=i){var f=t[c(u)],p=String(f);l[p]||(l[p]=1,s(f,e)&&a++,n(f)&&o++)}return a>2*o}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=h(r),i=0,o=0,s={},u=0;u<r;u+=n){var f=t[c(u)],p=String(f);if(!s[p]){s[p]=1;var d=typeof f;"boolean"===d?o++:(e?l(f)!==a:"number"===d)?i++:"string"===d&&o++}}return o>2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n<r;n++)if(u(t[n],e))return!0;return!1}(i,g)?"linear":"-"}},97655:function(t,e,r){"use strict";var n=r(10721),i=r(33626),a=r(34809),o=r(78032),s=r(59008),l=r(25829),c=r(22777),u=r(87433),h=r(12036),f=r(54616),p=r(46473),d=r(97405),m=r(90259),g=r(19091),y=r(54826).WEEKDAY_PATTERN,v=r(54826).HOUR_PATTERN;function x(t,e,r){function i(r,n){return a.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,c,u="";if(2===o.length)for(s=0;s<2;s++)if(c=b(o[s])){u=y;break}var h=i("pattern",u);if(h===y)for(s=0;s<2;s++)(c=b(o[s]))&&(e.bounds[s]=o[s]=c-1);if(h)for(s=0;s<2;s++)switch(c=o[s],h){case y:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=c;break;case v:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[s]=o[s]=c}if(!1===r.autorange){var f=r.range;if(f[0]<f[1]){if(o[0]<f[0]&&o[1]>f[1])return void(e.enabled=!1)}else if(o[0]>f[0]&&o[1]<f[1])return void(e.enabled=!1)}}else{var p=i("values");if(!p||!p.length)return void(e.enabled=!1);i("dvalue")}}}t.exports=function(t,e,r,n,v){var _,b=n.letter,w=n.font||{},T=n.splomStash||{},k=r("visible",!n.visibleDflt),A=e._template||{},M=e.type||A.type||"-";"date"===M&&(i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",n.calendar),n.noTicklabelmode||(_=r("ticklabelmode"))),n.noTicklabelindex||"date"!==M&&"linear"!==M||r("ticklabelindex");var S="";n.noTicklabelposition&&"multicategory"!==M||(S=a.coerce(t,e,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===_?["outside","inside"]:"x"===b?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==S.indexOf("inside")?"hide past domain":"category"===M||"multicategory"===M?"allow":"hide past div"),g(e,v),m(t,e,r,n),p(t,e,r,n),"category"===M||n.noHover||r("hoverformat");var E=r("color"),C=E!==l.color.dflt?E:w.color,L=T.label||v._dfltTitle[b];if(f(t,e,r,M,n),!k)return e;r("title.text",L),a.coerceFont(r,"title.font",w,{overrideDflt:{size:a.bigFont(w.size),color:C}}),c(t,e,r,M);var I=n.hasMinor;if(I&&(o.newContainer(e,"minor"),c(t,e,r,M,{isMinor:!0})),h(t,e,r,M,n),u(t,e,r,n),I){var P=n.isMinor;n.isMinor=!0,u(t,e,r,n),n.isMinor=P}d(t,e,r,{dfltColor:E,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:I,attributes:l}),!I||e.minor.ticks||e.minor.showgrid||delete e.minor,(e.showline||e.ticks)&&r("mirror");var z,O="multicategory"===M;if(n.noTickson||"category"!==M&&!O||!e.ticks&&!e.showgrid||(O&&(z="boundaries"),"boundaries"===r("tickson",z)&&delete e.ticklabelposition),O&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),"date"===M)if(s(t,e,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:x}),e.rangebreaks.length){for(var D=0;D<e.rangebreaks.length;D++)if(e.rangebreaks[D].pattern===y){e._hasDayOfWeekBreaks=!0;break}if(g(e,v),v._has("scattergl")||v._has("splom"))for(var R=0;R<n.data.length;R++){var F=n.data[R];"scattergl"!==F.type&&"splom"!==F.type||(F.visible=!1,a.warn(F.type+" traces do not work on axes with rangebreaks. Setting trace "+F.index+" to `visible: false`."))}}else delete e.rangebreaks;return e};var _={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function b(t){if("string"==typeof t)return _[t.substr(0,3).toLowerCase()]}},80712:function(t,e,r){"use strict";var n=r(87296),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return o(t,e)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?o:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:s}},5975:function(t,e,r){"use strict";var n=r(33626),i=r(54826);function a(t,e){if(e&&e.length)for(var r=0;r<e.length;r++)if(e[r][t])return!0;return!1}e.id2name=function(t){if("string"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.split(" ")[0].substr(1);return"1"===e&&(e=""),t.charAt(0)+"axis"+e}},e.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return"1"===e&&(e=""),t.charAt(0)+e}},e.cleanId=function(t,e,r){var n=/( domain)$/.test(t);if("string"==typeof t&&t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)&&(!n||r)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===a&&(a=""),t.charAt(0)+a+(n&&r?" domain":"")}},e.list=function(t,r,n){var i=t._fullLayout;if(!i)return[];var a,o=e.listIds(t,r),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+"axis"+l.substr(1)]}if(!n){var c=i._subplots.gl3d||[];for(a=0;a<c.length;a++){var u=i[c[a]];r?s.push(u[r+"axis"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},e.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+"axis"]:n.xaxis.concat(n.yaxis)},e.getFromId=function(t,r,n){var i=t._fullLayout;return r=void 0===r||"string"!=typeof r?r:r.replace(" domain",""),"x"===n?r=r.replace(/y[0-9]*/,""):"y"===n&&(r=r.replace(/x[0-9]*/,"")),i[e.id2name(r)]},e.getFromTrace=function(t,r,i){var a=t._fullLayout,o=null;if(n.traceIs(r,"gl3d")){var s=r.scene;"scene"===s.substr(0,5)&&(o=a[s][i+"axis"])}else o=e.getFromId(t,r[i+"axis"]||i);return o},e.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},46473:function(t,e,r){"use strict";var n=r(87800).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var a,o=t.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,c=r("categoryorder",a);"array"===c&&(l=r("categoryarray")),s||"array"!==c||(c=e.categoryorder="trace"),"trace"===c?e._initialCategories=[]:"array"===c?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+"axis"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var c=l[i];null!=c&&(o[c]=1)}}return Object.keys(o)}(e,i).sort(),"category ascending"===c?e._initialCategories=l:"category descending"===c&&(e._initialCategories=l.reverse()))}}},68599:function(t,e,r){"use strict";var n=r(10721),i=r(34809),a=r(63821),o=a.ONEDAY,s=a.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,a="category"===e,s=i?o:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:a?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),c=t.substr(1);return(c=n(c)?Number(c):0)<=0||!(i&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:t},e.tick0=function(t,e,r,a){return"date"===e?i.cleanDate(t,i.dateTick0(r,a%s==0?1:0)):"D1"!==a&&"D2"!==a?n(t)?Number(t):0:void 0}},54826:function(t,e,r){"use strict";var n=r(90694).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}},84391:function(t,e,r){"use strict";var n=r(34809),i=r(32919),a=r(5975).id2name,o=r(25829),s=r(67611),l=r(19091),c=r(63821).ALMOST_EQUAL,u=r(4530).FROM_BL;function h(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,c=s._axisConstraintGroups,u=s._axisMatchGroups,h=e._id,m=h.charAt(0),g=((s._splomAxes||{})[m]||{})[h]||{},y=e._id,v="x"===y.charAt(0);function x(r,i){return n.coerce(t,e,o,r,i)}e._matchGroup=null,e._constraintGroup=null,x("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:v?["left","center","right"]:["bottom","middle","top"],dflt:v?"center":"middle"}},"constraintoward");var _,b,w=e.type,T=[];for(_=0;_<i.length;_++)(b=i[_])!==y&&s[a(b)].type===w&&T.push(b);var k=p(c,y);if(k){var A=[];for(_=0;_<T.length;_++)k[b=T[_]]||A.push(b);T=A}var M,S,E=T.length;E&&(t.matches||g.matches)&&(M=n.coerce(t,e,{matches:{valType:"enumerated",values:T,dflt:-1!==T.indexOf(g.matches)?g.matches:void 0}},"matches"));var C=l&&!v?e.anchor:void 0;if(E&&!M&&(t.scaleanchor||C)&&(S=n.coerce(t,e,{scaleanchor:{valType:"enumerated",values:T.concat([!1])}},"scaleanchor",C)),M){e._matchGroup=d(u,y,M,1);var L=s[a(M)],I=f(s,e)/f(s,L);v!==("x"===M.charAt(0))&&(I=(v?"x":"y")+I),d(c,y,M,I)}else t.matches&&-1!==i.indexOf(t.matches)&&n.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(S){var P=x("scaleratio");P||(P=e.scaleratio=1),d(c,y,S,P)}else t.scaleanchor&&-1!==i.indexOf(t.scaleanchor)&&n.warn("ignored "+e._name+'.scaleanchor: "'+t.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function f(t,e){var r=e.domain;return r||(r=t[a(e.overlaying)].domain),r[1]-r[0]}function p(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function d(t,e,r,n){var i,a,o,s,l,c=p(t,e);null===c?((c={})[e]=1,l=t.length,t.push(c)):l=t.indexOf(c);var u=Object.keys(c);for(i=0;i<t.length;i++)if(o=t[i],i!==l&&o[r]){var h=o[r];for(a=0;a<u.length;a++)o[s=u[a]]=m(h,m(n,c[s]));return void t.splice(l,1)}if(1!==n)for(a=0;a<u.length;a++){var f=u[a];c[f]=m(n,c[f])}c[r]=1}function m(t,e){var r,n,i="",a="";"string"==typeof t&&(r=(i=t.match(/^[xy]*/)[0]).length,t=+t.substr(r)),"string"==typeof e&&(n=(a=e.match(/^[xy]*/)[0]).length,e=+e.substr(n));var o=t*e;return r||n?r&&n&&i.charAt(0)!==a.charAt(0)?r===n?o:(r>n?i.substr(n):a.substr(r))+o:i+a+t*e:o}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;o<a.length;o++){var s=a[o],l=t[s];if("string"==typeof l){var c=l.match(/^[xy]*/)[0],u=c.length;l=+l.substr(u);for(var h="y"===c.charAt(0)?n:1/n,f=0;f<u;f++)l*=h}i[s]=l}return i}function y(t,e){var r=t._inputDomain,n=u[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}e.handleDefaults=function(t,e,r){var i,o,s,c,u,f,p,d,m=r.axIds,g=r.axHasImage,y=e._axisConstraintGroups=[],v=e._axisMatchGroups=[];for(i=0;i<m.length;i++)h(u=t[c=a(m[i])],f=e[c],{axIds:m,layoutOut:e,hasImage:g[c]});function x(t,r){for(i=0;i<t.length;i++)for(s in o=t[i])e[a(s)][r]=o}for(x(v,"_matchGroup"),i=0;i<y.length;i++)for(s in o=y[i])if((f=e[a(s)]).fixedrange){for(var _ in o){var b=a(_);!1===(t[b]||{}).fixedrange&&n.warn("fixedrange was specified as false for axis "+b+" but was overridden because another axis in its constraint group has fixedrange true"),e[b].fixedrange=!0}break}for(i=0;i<y.length;){for(s in o=y[i]){(f=e[a(s)])._matchGroup&&Object.keys(f._matchGroup).length===Object.keys(o).length&&(y.splice(i,1),i--);break}i++}x(y,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],T=!1,k=!1;function A(){d=f[p],"rangebreaks"===p&&(k=f._hasDayOfWeekBreaks)}for(i=0;i<v.length;i++){o=v[i];for(var M=0;M<w.length;M++){var S;for(s in p=w[M],d=null,o)if(u=t[c=a(s)],f=e[c],p in f){if(!f.matches&&(S=f,p in u)){A();break}null===d&&p in u&&A()}if("range"===p&&d&&u.range&&2===u.range.length&&null!==u.range[0]&&null!==u.range[1]&&(T=!0),"autorange"===p&&null===d&&T&&(d=!1),null===d&&p in S&&(d=S[p]),null!==d)for(s in o)(f=e[a(s)])[p]="range"===p?d.slice():d,"rangebreaks"===p&&(f._hasDayOfWeekBreaks=k,l(f,e))}}},e.enforce=function(t){var e,r,n,o,l,u,h,f,p=t._fullLayout,d=p._axisConstraintGroups||[];for(e=0;e<d.length;e++){n=g(d[e],p);var m=Object.keys(n),v=1/0,x=0,_=1/0,b={},w={},T=!1;for(r=0;r<m.length;r++)w[o=m[r]]=l=p[a(o)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),b[o]=u=Math.abs(l._m)/n[o],v=Math.min(v,u),"domain"!==l.constrain&&l._constraintShrinkable||(_=Math.min(_,u)),delete l._constraintShrinkable,x=Math.max(x,u),"domain"===l.constrain&&(T=!0);if(!(v>c*x)||T)for(r=0;r<m.length;r++)if(u=b[o=m[r]],h=(l=w[o]).constrain,u!==_||"domain"===h)if(f=u/_,"range"===h)s(l,f);else{var k=l._inputDomain,A=(l.domain[1]-l.domain[0])/(k[1]-k[0]),M=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((f/=A)*M<1){l.domain=l._input.domain=k.slice(),s(l,f);continue}if(M<1&&(l.range=l._input.range=l._inputRange.slice(),f*=M),l.autorange){var S=l.r2l(l.range[0]),E=l.r2l(l.range[1]),C=(S+E)/2,L=C,I=C,P=Math.abs(E-C),z=C-P*f*1.0001,O=C+P*f*1.0001,D=i.makePadFn(p,l,0),R=i.makePadFn(p,l,1);y(l,f);var F,B,N=Math.abs(l._m),j=i.concatExtremes(t,l),U=j.min,V=j.max;for(B=0;B<U.length;B++)(F=U[B].val-D(U[B])/N)>z&&F<L&&(L=F);for(B=0;B<V.length;B++)(F=V[B].val+R(V[B])/N)<O&&F>I&&(I=F);f/=(I-L)/(2*P),L=l.l2r(L),I=l.l2r(I),l.range=l._input.range=S<E?[L,I]:[I,L]}y(l,f)}}},e.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n<r.length;n++)if(r[n][e])return"g"+n;return e},e.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&"domain"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},51680:function(t,e,r){"use strict";var n=r(45568),i=r(34809),a=i.numberFormat,o=r(65657),s=r(74043),l=r(33626),c=i.strTranslate,u=r(30635),h=r(78766),f=r(62203),p=r(32141),d=r(29714),m=r(27983),g=r(14751),y=r(70414),v=y.selectingOrDrawing,x=y.freeMode,_=r(4530).FROM_TL,b=r(34823),w=r(71817).redrawReglTraces,T=r(44122),k=r(5975).getFromId,A=r(44844).prepSelect,M=r(44844).clearOutline,S=r(44844).selectOnClick,E=r(67611),C=r(54826),L=C.MINDRAG,I=C.MINZOOM,P=!0;function z(t,e,r,n){var a=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return a.call(m,n),a.node()}function O(t,e,r,i,a,o,s){var l=z(t,"rect",e,r);return n.select(l).call(f.setRect,i,a,o,s),l}function D(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function R(t,e,r,n,i){for(var a=0;a<t.length;a++){var o=t[a];if(!o.fixedrange)if(o.rangebreaks){var s="y"===o._id.charAt(0),l=s?1-e:e,c=s?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(l*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(c*o._length))}else{var u=o._rl[0],h=o._rl[1]-u;n[o._name+".range[0]"]=o.l2r(u+h*e),n[o._name+".range[1]"]=o.l2r(u+h*r)}}if(i&&i.length){var f=(e+(1-r))/2;R(i,f,1-f,n,[])}}function F(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(!n.fixedrange){if(n.rangebreaks){var i=n._length,a=(n.p2l(0+e)-n.p2l(0)+(n.p2l(i+e)-n.p2l(i)))/2;n.range=[n.l2r(n._rl[0]-a),n.l2r(n._rl[1]-a)]}else n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)];n.limitRange&&n.limitRange()}}}function B(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function j(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),V(t,e,i,a)}function V(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function q(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(t){P&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),P=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,I)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function Z(t,e,r,n,a){for(var o,s,l,c,u=!1,h={},f={},p=(a||{}).xaHash,d=(a||{}).yaHash,m=0;m<e.length;m++){var g=e[m];for(o in r)if(g[o]){for(l in g)a&&(p[l]||d[l])||("x"===l.charAt(0)?r:n)[l]||(h[l]=o);for(s in n)a&&(p[s]||d[s])||!g[s]||(u=!0)}for(s in n)if(g[s])for(c in g)a&&(p[c]||d[c])||("x"===c.charAt(0)?r:n)[c]||(f[c]=s)}u&&(i.extendFlat(h,f),f={});var y={},v=[];for(l in h){var x=k(t,l);v.push(x),y[x._id]=x}var _={},b=[];for(c in f){var w=k(t,c);b.push(w),_[w._id]=w}return{xaHash:y,yaHash:_,xaxes:v,yaxes:b,xLinks:h,yLinks:f,isSubplotConstrained:u}}function W(t,e){if(s){var r=void 0!==t.onwheel?"wheel":"mousewheel";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener("wheel",e,{passive:!1}))}function Y(t){var e=[];for(var r in t)e.push(t[r]);return e}t.exports={makeDragBox:function(t,e,r,s,c,h,m,y){var P,z,V,X,$,J,K,Q,tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ht,ft,pt,dt,mt=t._fullLayout._zoomlayer,gt=m+y==="nsew",yt=1===(m+y).length;function vt(){if(P=e.xaxis,z=e.yaxis,tt=P._length,et=z._length,K=P._offset,Q=z._offset,(V={})[P._id]=P,(X={})[z._id]=z,m&&y)for(var r=e.overlays,n=0;n<r.length;n++){var i=r[n].xaxis;V[i._id]=i;var a=r[n].yaxis;X[a._id]=a}$=Y(V),J=Y(X),it=D($,y),at=D(J,m),ot=!at&&!it,nt=Z(t,t._fullLayout._axisMatchGroups,V,X);var o=(rt=Z(t,t._fullLayout._axisConstraintGroups,V,X,nt)).isSubplotConstrained||nt.isSubplotConstrained;st=y||o,lt=m||o;var s=t._fullLayout;ct=s._has("scattergl"),ut=s._has("splom"),ht=s._has("svg")}r+=e.yaxis._shift,vt();var xt=function(t,e,r){return t?"nsew"===t?r?"":"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}(at+it,t._fullLayout.dragmode,gt),_t=O(e,m+y+"drag",xt,r,s,c,h);if(ot&&!gt)return _t.onmousedown=null,_t.style.pointerEvents="none",_t;var bt,wt,Tt,kt,At,Mt,St,Et,Ct,Lt,It={element:_t,gd:t,plotinfo:e};function Pt(){It.plotinfo.selection=!1,M(t)}function zt(t,r){var i=It.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(q(i),2!==t||yt||Ht(),gt)o.indexOf("select")>-1&&S(r,i,$,J,e.id,It),o.indexOf("event")>-1&&p.click(i,r,e.id);else if(1===t&&yt){var s=m?z:P,c="s"===m||"w"===y?0:1,h=s._name+".range["+c+"]",f=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,c),d="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(d="right")):"e"===y&&(d="right"),i._context.showAxisRangeEntryBoxes&&n.select(_t).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:d,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,h,e)}))}}}function Ot(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+bt)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-bt),o=Math.abs(i-wt);function s(){St="",Tt.r=Tt.l,Tt.t=Tt.b,Ct.attr("d","M0,0Z")}if(Tt.l=Math.min(bt,n),Tt.r=Math.max(bt,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>I||o>I?(St="xy",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,bt>n?Tt.l=bt-a:Tt.r=bt+a),Ct.attr("d",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>I||o>I){St="xy";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Ct.attr("d",G(Tt))}else s();else!at||o<Math.min(Math.max(.6*a,L),I)?a<L||!it?s():(Tt.t=0,Tt.b=et,St="x",Ct.attr("d",function(t,e){return"M"+(t.l-.5)+","+(e-I-.5)+"h-3v"+(2*I+1)+"h3ZM"+(t.r+.5)+","+(e-I-.5)+"h3v"+(2*I+1)+"h-3Z"}(Tt,wt))):!it||a<Math.min(.6*o,I)?(Tt.l=0,Tt.r=tt,St="y",Ct.attr("d",function(t,e){return"M"+(e-I-.5)+","+(t.t-.5)+"v-3h"+(2*I+1)+"v3ZM"+(e-I-.5)+","+(t.b+.5)+"v3h"+(2*I+1)+"v-3Z"}(Tt,bt))):(St="xy",Ct.attr("d",G(Tt)));Tt.w=Tt.r-Tt.l,Tt.h=Tt.b-Tt.t,St&&(Lt=!0),t._dragged=Lt,U(Et,Ct,Tt,At,Mt,kt),Dt(),t.emit("plotly_relayouting",ft),Mt=!0}function Dt(){ft={},"xy"!==St&&"x"!==St||(R($,Tt.l/tt,Tt.r/tt,ft,rt.xaxes),Vt("x",ft)),"xy"!==St&&"y"!==St||(R(J,(et-Tt.b)/et,(et-Tt.t)/et,ft,rt.yaxes),Vt("y",ft))}function Rt(){Dt(),q(t),Gt(),H(t)}It.prepFn=function(e,r,n){var a=It.dragmode,s=t._fullLayout.dragmode;s!==a&&(It.dragmode=s),vt(),pt=t._fullLayout._invScaleX,dt=t._fullLayout._invScaleY,ot||(gt?e.shiftKey?"pan"===s?s="zoom":v(s)||(s="pan"):e.ctrlKey&&(s="pan"):s="pan"),x(s)?It.minDrag=1:It.minDrag=void 0,v(s)?(It.xaxes=$,It.yaxes=J,A(e,r,n,It,s)):(It.clickFn=zt,v(a)&&Pt(),ot||("zoom"===s?(It.moveFn=Ot,It.doneFn=Rt,It.minDrag=1,function(e,r,n){var a=_t.getBoundingClientRect();bt=r-a.left,wt=n-a.top,t._fullLayout._calcInverseTransform(t);var s=i.apply3DTransform(t._fullLayout._invTransform)(bt,wt);bt=s[0],wt=s[1],Tt={l:bt,r:bt,w:0,t:wt,b:wt,h:0},kt=t._hmpixcount?t._hmlumcount/t._hmpixcount:o(t._fullLayout.plot_bgcolor).getLuminance(),Mt=!1,St="xy",Lt=!1,Et=N(mt,kt,K,Q,At="M0,0H"+tt+"V"+et+"H0V0"),Ct=j(mt,K,Q)}(0,r,n)):"pan"===s&&(It.moveFn=Ut,It.doneFn=Gt))),t._fullLayout._redrag=function(){var e=t._dragdata;if(e&&e.element===_t){var r=t._fullLayout.dragmode;v(r)||(vt(),Zt([0,0,tt,et]),It.moveFn(e.dx,e.dy))}}},g.init(It);var Ft=[0,0,tt,et],Bt=null,Nt=C.REDRAWDELAY,jt=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function Ut(e,r){if(e*=pt,r*=dt,!t._transitioningWithDuration){if(t._fullLayout._replotting=!0,"ew"===it||"ns"===at){var n=it?-e:0,i=at?-r:0;if(nt.isSubplotConstrained){if(it&&at){var a=(e/tt-r/et)/2;n=-(e=a*tt),i=-(r=-a*et)}at?n=-i*tt/et:i=-n*et/tt}return it&&(F($,e),Vt("x")),at&&(F(J,r),Vt("y")),Zt([n,i,tt,et]),qt(),void t.emit("plotly_relayouting",ft)}var o,s,l="w"===it==("n"===at)?1:-1;if(it&&at&&(rt.isSubplotConstrained||nt.isSubplotConstrained)){var c=(e/tt+l*r/et)/2;e=c*tt,r=l*c*et}if("w"===it?e=p($,0,e):"e"===it?e=p($,1,-e):it||(e=0),"n"===at?r=p(J,1,r):"s"===at?r=p(J,0,-r):at||(r=0),o="w"===it?e:0,s="n"===at?r:0,rt.isSubplotConstrained&&!nt.isSubplotConstrained||nt.isSubplotConstrained&&it&&at&&l>0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;u<$.length;u++)$[u].range=$[u]._r.slice(),E($[u],1-r/et);o=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!at&&1===it.length){for(u=0;u<J.length;u++)J[u].range=J[u]._r.slice(),E(J[u],1-e/tt);s=(r=e*et/tt)/2}}nt.isSubplotConstrained&&at||Vt("x"),nt.isSubplotConstrained&&it||Vt("y");var h=tt-e,f=et-r;!nt.isSubplotConstrained||it&&at||(it?(s=o?0:e*et/tt,f=h*et/tt):(o=s?0:r*tt/et,h=f*tt/et)),Zt([o,s,h,f]),qt(),t.emit("plotly_relayouting",ft)}function p(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/B(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function Vt(t,e){for(var r=nt.isSubplotConstrained?{x:J,y:$}[t]:nt[t+"axes"],n=nt.isSubplotConstrained?{x:$,y:J}[t]:[],i=0;i<r.length;i++){var a=r[i],o=a._id,s=nt.xLinks[o]||nt.yLinks[o],l=n[0]||V[s]||X[s];l&&(e?(e[a._name+".range[0]"]=e[l._name+".range[0]"],e[a._name+".range[1]"]=e[l._name+".range[1]"]):a.range=l.range.slice())}}function qt(){var r,n=[];function i(t){for(r=0;r<t.length;r++)t[r].fixedrange||n.push(t[r]._id)}function a(t,e){for(r=0;r<t.length;r++){var i=t[r],a=i[e];i.fixedrange||"sync"!==a.tickmode||n.push(a._id)}}for(st&&(i($),i(rt.xaxes),i(nt.xaxes),a(e.overlays,"xaxis")),lt&&(i(J),i(rt.yaxes),i(nt.yaxes),a(e.overlays,"yaxis")),ft={},r=0;r<n.length;r++){var o=n[r],s=k(t,o);d.drawOne(t,s,{skipTitle:!0}),ft[s._name+".range[0]"]=s.range[0],ft[s._name+".range[1]"]=s.range[1]}d.redrawComponents(t,n)}function Ht(){if(!t._transitioningWithDuration){var e=t._context.doubleClick,r=[];it&&(r=r.concat($)),at&&(r=r.concat(J)),nt.xaxes&&(r=r.concat(nt.xaxes)),nt.yaxes&&(r=r.concat(nt.yaxes));var n,i,a={};if("reset+autosize"===e)for(e="autosize",i=0;i<r.length;i++){var o=(n=r[i])._rangeInitial0,s=n._rangeInitial1,c=void 0!==o||void 0!==s;if(c&&(void 0!==o&&o!==n.range[0]||void 0!==s&&s!==n.range[1])||!c&&!0!==n.autorange){e="reset";break}}if("autosize"===e)for(i=0;i<r.length;i++)(n=r[i]).fixedrange||(a[n._name+".autorange"]=!0);else if("reset"===e)for((it||rt.isSubplotConstrained)&&(r=r.concat(rt.xaxes)),at&&!rt.isSubplotConstrained&&(r=r.concat(rt.yaxes)),rt.isSubplotConstrained&&(it?at||(r=r.concat(J)):r=r.concat($)),i=0;i<r.length;i++)if(!(n=r[i]).fixedrange){var u=n._name,h=n._autorangeInitial;void 0===n._rangeInitial0&&void 0===n._rangeInitial1?a[u+".autorange"]=!0:void 0===n._rangeInitial0?(a[u+".autorange"]=h,a[u+".range"]=[null,n._rangeInitial1]):void 0===n._rangeInitial1?(a[u+".range"]=[n._rangeInitial0,null],a[u+".autorange"]=h):a[u+".range"]=[n._rangeInitial0,n._rangeInitial1]}t.emit("plotly_doubleclick",null),l.call("_guiRelayout",t,a)}}function Gt(){Zt([0,0,tt,et]),i.syncOrAsync([T.previousPromises,function(){t._fullLayout._replotting=!1,l.call("_guiRelayout",t,ft)}],t)}function Zt(e){var r,n,a,o,s=t._fullLayout,c=s._plots,u=s._subplots.cartesian;if(ut&&l.subplotsRegistry.splom.drag(t),ct)for(r=0;r<u.length;r++)if(a=(n=c[u[r]]).xaxis,o=n.yaxis,n._scene){a.limitRange&&a.limitRange(),o.limitRange&&o.limitRange();var h=i.simpleMap(a.range,a.r2l),p=i.simpleMap(o.range,o.r2l);n._scene.update({range:[h[0],p[0],h[1],p[1]]})}if((ut||ct)&&(b(t),w(t)),ht){var d=e[2]/P._length,g=e[3]/z._length;for(r=0;r<u.length;r++){a=(n=c[u[r]]).xaxis,o=n.yaxis;var v,x,_,T,k=(st||nt.isSubplotConstrained)&&!a.fixedrange&&V[a._id],A=(lt||nt.isSubplotConstrained)&&!o.fixedrange&&X[o._id];if(k?(v=d,_=y||nt.isSubplotConstrained?e[0]:Xt(a,v)):nt.xaHash[a._id]?(v=d,_=e[0]*a._length/P._length):nt.yaHash[a._id]?(v=g,_="ns"===at?-e[1]*a._length/z._length:Xt(a,v,{n:"top",s:"bottom"}[at])):_=Yt(a,v=Wt(a,d,g)),v>1&&(void 0!==a.maxallowed&&st===(a.range[0]<a.range[1]?"e":"w")||void 0!==a.minallowed&&st===(a.range[0]<a.range[1]?"w":"e"))&&(v=1,_=0),A?(x=g,T=m||nt.isSubplotConstrained?e[1]:Xt(o,x)):nt.yaHash[o._id]?(x=g,T=e[1]*o._length/z._length):nt.xaHash[o._id]?(x=d,T="ew"===it?-e[0]*o._length/P._length:Xt(o,x,{e:"right",w:"left"}[it])):T=Yt(o,x=Wt(o,d,g)),x>1&&(void 0!==o.maxallowed&&lt===(o.range[0]<o.range[1]?"n":"s")||void 0!==o.minallowed&&lt===(o.range[0]<o.range[1]?"s":"n"))&&(x=1,T=0),v||x){v||(v=1),x||(x=1);var M=a._offset-_/v,S=o._offset-T/x;n.clipRect.call(f.setTranslate,_,T).call(f.setScale,v,x),n.plot.call(f.setTranslate,M,S).call(f.setScale,1/v,1/x),v===n.xScaleFactor&&x===n.yScaleFactor||(f.setPointGroupScale(n.zoomScalePts,v,x),f.setTextPointsScale(n.zoomScaleTxt,v,x)),f.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=v,n.yScaleFactor=x}}}}function Wt(t,e,r){return t.fixedrange?0:st&&rt.xaHash[t._id]?e:lt&&(rt.isSubplotConstrained?rt.xaHash:rt.yaHash)[t._id]?r:0}function Yt(t,e){return e?(t.range=t._r.slice(),E(t,e),Xt(t,e)):0}function Xt(t,e,r){return t._length*(1-e)*_[r||t.constraintoward||"middle"]}return m.length*y.length!=1&&W(_t,(function(e){if(t._context._scrollZoom.cartesian||t._fullLayout._enablescrollzoom){if(Pt(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();vt(),clearTimeout(Bt);var r=-e.deltaY;if(isFinite(r)||(r=e.wheelDelta/10),isFinite(r)){var n,a=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=jt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-o.left)/o.width,l=(o.bottom-e.clientY)/o.height;if(st){for(y||(s=.5),n=0;n<$.length;n++)c($[n],s,a);Vt("x"),Ft[2]*=a,Ft[0]+=Ft[2]*s*(1/a-1)}if(lt){for(m||(l=.5),n=0;n<J.length;n++)c(J[n],l,a);Vt("y"),Ft[3]*=a,Ft[1]+=Ft[3]*(1-l)*(1/a-1)}Zt(Ft),qt(),t.emit("plotly_relayouting",ft),Bt=setTimeout((function(){t._fullLayout&&(Ft=[0,0,tt,et],Gt())}),Nt),e.preventDefault()}else i.log("Did not find wheel motion attributes: ",e)}function c(t,e,r){if(!t.fixedrange){var n=i.simpleMap(t.range,t.r2l),a=n[0]+(n[1]-n[0])*e;t.range=n.map((function(e){return t.l2r(a+(e-a)*r)}))}}})),_t},makeDragger:z,makeRectDragger:O,makeZoombox:N,makeCorners:j,updateZoombox:U,xyCorners:G,transitionZoombox:V,removeZoombox:q,showDoubleClickNotifier:H,attachWheelEventHandler:W}},95284:function(t,e,r){"use strict";var n=r(45568),i=r(32141),a=r(14751),o=r(27983),s=r(51680).makeDragBox,l=r(54826).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],o=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(t,n,o._offset,c._offset,o._length,c._length,"ns","ew");u.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=e},u.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,c._offset-l,l,l,"n","w"),s(t,n,o._offset+o._length,c._offset-l,l,l,"n","e"),s(t,n,o._offset-l,c._offset+c._length,l,l,"s","w"),s(t,n,o._offset+o._length,c._offset+c._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===o._mainSubplot){var h=o._mainLinePosition;"top"===o.side&&(h-=l),s(t,n,o._offset+.1*o._length,h,.8*o._length,l,"","ew"),s(t,n,o._offset,h,.1*o._length,l,"","w"),s(t,n,o._offset+.9*o._length,h,.1*o._length,l,"","e")}if(e===c._mainSubplot){var f=c._mainLinePosition;"right"!==c.side&&(f-=l),s(t,n,f,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(t,n,f,c._offset+.9*c._length,l,.1*c._length,"s",""),s(t,n,f,c._offset,l,.1*c._length,"n","")}}}));var o=r._hoverlayer.node();o.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";o(e._draggers,r)}},20706:function(t,e,r){"use strict";var n=r(33626),i=r(34809),a=r(5975);t.exports=function(t){return function(e,r){var o=e[t];if(Array.isArray(o))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,c=r._subplots,u=c.xaxis,h=c.yaxis,f=c.cartesian,p=r._has("cartesian")||r._has("gl2d"),d=0;d<o.length;d++){var m=o[d];if(i.isPlainObject(m)){var g=a.cleanId(m.xref,"x",!1),y=a.cleanId(m.yref,"y",!1),v=l.x.test(g),x=l.y.test(y);if(v||x){p||i.pushUnique(r._basePlotModules,s);var _=!1;v&&-1===u.indexOf(g)&&(u.push(g),_=!0),x&&-1===h.indexOf(y)&&(h.push(y),_=!0),_&&v&&x&&f.push(g+y)}}}}}},37703:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(34809),o=r(44122),s=r(62203),l=r(4173).eV,c=r(5975),u=r(54826),h=r(62972),f=a.ensureSingle;function p(t,e,r){return a.ensureSingle(t,e,r,(function(t){t.datum(r)}))}var d=u.zindexSeparator;function m(t,e,r,a,o){for(var c,h,f,p=u.traceLayerClasses,d=t._fullLayout,m=d._zindices,g=d._modules,y=[],v=[],x=0;x<m.length;x++)for(var _=m[x],b=0;b<g.length;b++){var w=(c=g[b]).name,T=i.modules[w].categories;if(T.svg){var k=c.layerName||w+"layer",A=k+(x?Number(x)+1:""),M=c.plot;f=(h=l(r,M,_))[0],r=h[1],f.length&&y.push({i:p.indexOf(k),zindex:x,className:A,plotMethod:M,cdModule:f}),T.zoomScale&&v.push("."+A)}}y.sort((function(t,e){return(t.zindex||0)-(e.zindex||0)||t.i-e.i}));var S=e.plot.selectAll("g.mlayer").data(y,(function(t){return t.className}));if(S.enter().append("g").attr("class",(function(t){return t.className})).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),S.exit().remove(),S.order(),S.each((function(r){var i=n.select(this),l=r.className;r.plotMethod(t,e,r.cdModule,i,a,o),-1===u.clipOnAxisFalseQuery.indexOf("."+l)&&s.setClipUrl(i,e.layerClipId,t)})),d._has("scattergl")&&(c=i.getModule("scattergl"),f=l(r,c)[0],c.plot(t,e,f)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(u.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),v.length)){var E=e.plot.selectAll(v.join(",")).selectAll(".trace");e.zoomScalePts=E.selectAll("path.point"),e.zoomScaleTxt=E.selectAll(".textpoint")}}function g(t,e){var r=t._fullLayout,n=e.plotgroup,i=e.id,a=-1!==i.indexOf(d),o=u.layerValue2layerClass[e.xaxis.layer],s=u.layerValue2layerClass[e.yaxis.layer],l=r._hasOnlyLargeSploms;if(!e.mainplot||r._zindices.length>1)if(l)e.xlines=f(n,"path","xlines-above"),e.ylines=f(n,"path","ylines-above"),e.xaxislayer=f(n,"g","xaxislayer-above"),e.yaxislayer=f(n,"g","yaxislayer-above");else{if(!a){var h=f(n,"g","layer-subplot");e.shapelayer=f(h,"g","shapelayer"),e.imagelayer=f(h,"g","imagelayer"),e.minorGridlayer=f(n,"g","minor-gridlayer"),e.gridlayer=f(n,"g","gridlayer"),e.zerolinelayer=f(n,"g","zerolinelayer");var m=f(n,"g","layer-between");e.shapelayerBetween=f(m,"g","shapelayer"),e.imagelayerBetween=f(m,"g","imagelayer"),f(n,"path","xlines-below"),f(n,"path","ylines-below"),e.overlinesBelow=f(n,"g","overlines-below"),f(n,"g","xaxislayer-below"),f(n,"g","yaxislayer-below"),e.overaxesBelow=f(n,"g","overaxes-below")}e.overplot=f(n,"g","overplot"),e.plot=f(e.overplot,"g",i),a||(e.xlines=f(n,"path","xlines-above"),e.ylines=f(n,"path","ylines-above"),e.overlinesAbove=f(n,"g","overlines-above"),f(n,"g","xaxislayer-above"),f(n,"g","yaxislayer-above"),e.overaxesAbove=f(n,"g","overaxes-above"),e.xlines=n.select(".xlines-"+o),e.ylines=n.select(".ylines-"+s),e.xaxislayer=n.select(".xaxislayer-"+o),e.yaxislayer=n.select(".yaxislayer-"+s))}else{var g=e.mainplotinfo,y=g.plotgroup,v=i+"-x",x=i+"-y";e.minorGridlayer=g.minorGridlayer,e.gridlayer=g.gridlayer,e.zerolinelayer=g.zerolinelayer,f(g.overlinesBelow,"path",v),f(g.overlinesBelow,"path",x),f(g.overaxesBelow,"g",v),f(g.overaxesBelow,"g",x),e.plot=f(g.overplot,"g",i),f(g.overlinesAbove,"path",v),f(g.overlinesAbove,"path",x),f(g.overaxesAbove,"g",v),f(g.overaxesAbove,"g",x),e.xlines=y.select(".overlines-"+o).select("."+v),e.ylines=y.select(".overlines-"+s).select("."+x),e.xaxislayer=y.select(".overaxes-"+o).select("."+v),e.yaxislayer=y.select(".overaxes-"+s).select("."+x)}a||(l||(p(e.minorGridlayer,"g",e.xaxis._id),p(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map((function(t){return t[0]})).sort(c.idSort),p(e.gridlayer,"g",e.xaxis._id),p(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map((function(t){return t[0]})).sort(c.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0))}function y(t,e){if(t){var r={};for(var i in t.each((function(t){var i=t[0];n.select(this).remove(),v(i,e),r[i]=!0})),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function v(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}e.name="cartesian",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=u.idRegex,e.attrRegex=u.attrRegex,e.attributes=r(55126),e.layoutAttributes=r(25829),e.supplyLayoutDefaults=r(74098),e.transitionAxes=r(84982),e.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,h=o.cartesian,f=h.concat(o.gl2d||[]),p={},d={};for(r=0;r<f.length;r++){var m=f[r].split("y");p[m[0]]=1,d["y"+m[1]]=1}for(r=0;r<s.length;r++)p[n=s[r]]||(i=(t[c.id2name(n)]||{}).anchor,u.idRegex.y.test(i)||(i="y"),h.push(n+i),f.push(n+i),d[i]||(d[i]=1,a.pushUnique(l,i)));for(r=0;r<l.length;r++)d[i=l[r]]||(n=(t[c.id2name(i)]||{}).anchor,u.idRegex.x.test(n)||(n="x"),h.push(n+i),f.push(n+i),p[n]||(p[n]=1,a.pushUnique(s,n)));if(!f.length){for(var g in n="",i="",t)u.attrRegex.test(g)&&("x"===g.charAt(0)?(!n||+g.substr(5)<+n.substr(5))&&(n=g):(!i||+g.substr(5)<+i.substr(5))&&(i=g));n=n?c.name2id(n):"x",i=i?c.name2id(i):"y",s.push(n),l.push(i),h.push(n+i)}},e.plot=function(t,e,r,n){var i,o=t._fullLayout,s=o._subplots.cartesian,l=t.calcdata;if(!Array.isArray(e))for(e=[],i=0;i<l.length;i++)e.push(i);for(var c=o._zindices,u=0;u<c.length;u++){var h=c[u];for(i=0;i<s.length;i++){var f=s[i],p=o._plots[f];if(u>0){var g=p.id;if(-1!==g.indexOf(d))continue;g+=d+(u+1),p=a.extendFlat({},p,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,v=[],x=0;x<l.length;x++){var _=l[x],b=_[0].trace;h===(b.zorder||0)&&b.xaxis+b.yaxis===f&&((-1!==e.indexOf(b.index)||b.carpet)&&(y&&y[0].trace.xaxis+y[0].trace.yaxis===f&&-1!==["tonextx","tonexty","tonext"].indexOf(b.fill)&&-1===v.indexOf(y)&&v.push(y),v.push(_)),y=_)}m(t,p,v,r,n)}}},e.clean=function(t,e,r,n){var i,a,o,s=n._plots||{},l=e._plots||{},u=n._subplots||{};if(n._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(o in s)(i=s[o]).plotgroup&&i.plotgroup.remove();var h=n._has&&n._has("gl"),f=e._has&&e._has("gl");if(h&&!f)for(o in s)(i=s[o])._scene&&i._scene.destroy();if(u.xaxis&&u.yaxis){var p=c.listIds({_fullLayout:n});for(a=0;a<p.length;a++){var m=p[a];e[c.id2name(m)]||n._infolayer.selectAll(".g-"+m+"title").remove()}}var g=n._has&&n._has("cartesian"),x=e._has&&e._has("cartesian");if(g&&!x)y(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(u.cartesian)for(a=0;a<u.cartesian.length;a++){var _=u.cartesian[a];if(-1===_.indexOf(d)&&!l[_]){var b="."+_+",."+_+"-x,."+_+"-y";n._cartesianlayer.selectAll(b).remove(),v(_,n)}}},e.drawFramework=function(t){var e,r=t._fullLayout,i=t.calcdata,o={};for(e=0;e<i.length;e++){var s=i[e][0],l=s.trace.zorder||0;o[l]||(o[l]=[]),o[l].push(s)}var c=Object.keys(o).map(Number).sort(a.sorterAsc);c.length||(c=[0]),r._zindices=c;var u=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._zindices.length,c=s._subplots.cartesian,u=c.length,h=[],f=[];for(e=0;e<u;e++){n=c[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var p=a._mainAxis,m=o._mainAxis,g=p._id+m._id,y=s._plots[g];i.overlays=[],g!==n&&y?(i.mainplot=g,i.mainplotinfo=y,f.push(n)):(i.mainplot=void 0,i.mainplotinfo=void 0,h.push(n))}for(e=0;e<f.length;e++)n=f[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var v=h.concat(f),x=[];for(e=0;e<u;e++){n=v[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;for(var _=[],b=1;b<=l;b++){var w="";for(b>1&&(w+=d+b),_.push(n+w),r=0;r<i.overlays.length;r++)_.push(i.overlays[r].id+w)}_=_.concat([a.layer,o.layer,a.overlaying||"",o.overlaying||""]),x.push(_)}return x}(t),h=u.length,p=[];for(e=0;e<h;e++)p[e]=u[e].slice();for(var m=1;m<c.length;m++){var v=[];for(e=0;e<h;e++)v[e]=u[e].slice(),v[e][0]+=d+(m+1);p=p.concat(v)}var x=r._cartesianlayer.selectAll(".subplot").data(p,String);x.enter().append("g").attr("class",(function(t){return"subplot "+t[0]})),x.order(),x.exit().call(y,r),x.each((function(e){var i=e[0],o=i.indexOf(d),s=-1!==o,l=s?i.slice(0,o):i,c=r._plots[i];c||(c=a.extendFlat({},r._plots[l]))&&(c.id=i,r._plots[i]=c,r._subplots.cartesian.push(i)),c&&(c.plotgroup=n.select(this),g(t,c),s||(c.draglayer=f(r._draggers,"g",i)))}))},e.rangePlot=function(t,e,r){g(t,e),m(t,e,r),o.style(t)},e.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this,r=t.toDataURL("image/png");e.append("svg:image").attr({xmlns:h.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})}))},e.updateFx=r(95284).updateFx},25829:function(t,e,r){"use strict";var n=r(80337),i=r(10229),a=r(94850).T,o=r(93049).extendFlat,s=r(78032).templatedArray,l=r(80712).descriptionWithDates,c=r(63821).ONEDAY,u=r(54826),h=u.HOUR_PATTERN,f=u.WEEKDAY_PATTERN,p={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},d=o({},p,{values:p.values.slice().concat(["sync"])});function m(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks"}}var g={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"data_array",editType:"ticks"},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function _(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=5),e}function b(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var w={valType:"color",dflt:i.defaultLine,editType:"ticks"},T={valType:"color",dflt:i.lightLine,editType:"ticks"};function k(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var A=o({},a,{editType:"ticks"}),M={valType:"boolean",editType:"ticks"};t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:i.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:n({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"calc"},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[f,h,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:c},editType:"calc"}),tickmode:d,nticks:m(),tick0:g,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:v,ticktext:{valType:"data_array",editType:"ticks"},ticks:x,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:_(),tickwidth:b(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:M,gridcolor:T,gridwidth:k(),griddash:A,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",u.idRegex.x.toString(),u.idRegex.y.toString()],editType:"plot"},minor:{tickmode:p,nticks:m("minor"),tick0:g,dtick:y,tickvals:v,ticks:x,ticklen:_("minor"),tickwidth:b("minor"),tickcolor:w,gridcolor:T,gridwidth:k("minor"),griddash:A,showgrid:M,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:n({editType:"ticks"})}}},74098:function(t,e,r){"use strict";var n=r(34809),i=r(78766),a=r(36040).isUnifiedHover,o=r(45265),s=r(78032),l=r(6704),c=r(25829),u=r(4392),h=r(97655),f=r(84391),p=r(40957),d=r(5975),m=d.id2name,g=d.name2id,y=r(54826).AX_ID_PATTERN,v=r(33626),x=v.traceIs,_=v.getComponentMethod;function b(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var v,w,T=e.autotypenumbers,k={},A={},M={},S={},E={},C={},L={},I={},P={},z={};for(v=0;v<r.length;v++){var O=r[v];if(x(O,"cartesian")||x(O,"gl2d")){var D,R;if(O.xaxis)D=m(O.xaxis),b(k,D,O);else if(O.xaxes)for(w=0;w<O.xaxes.length;w++)b(k,m(O.xaxes[w]),O);if(O.yaxis)R=m(O.yaxis),b(k,R,O);else if(O.yaxes)for(w=0;w<O.yaxes.length;w++)b(k,m(O.yaxes[w]),O);"funnel"===O.type?"h"===O.orientation?(D&&(A[D]=!0),R&&(L[R]=!0)):R&&(M[R]=!0):"image"===O.type?(R&&(I[R]=!0),D&&(I[D]=!0)):(R&&(E[R]=!0,C[R]=!0),x(O,"carpet")&&("carpet"!==O.type||O._cheater)||D&&(S[D]=!0)),"carpet"===O.type&&O._cheater&&D&&(A[D]=!0),x(O,"2dMap")&&(P[D]=!0,P[R]=!0),x(O,"oriented")&&(z["h"===O.orientation?R:D]=!0)}}var F=e._subplots,B=F.xaxis,N=F.yaxis,j=n.simpleMap(B,m),U=n.simpleMap(N,m),V=j.concat(U),q=i.background;B.length&&N.length&&(q=n.coerce(t,e,l,"plot_bgcolor"));var H,G,Z,W,Y,X=i.combine(q,e.paper_bgcolor);function $(){var t=k[H]||[];Y._traceIndices=t.map((function(t){return t._expandedIndex})),Y._annIndices=[],Y._shapeIndices=[],Y._selectionIndices=[],Y._imgIndices=[],Y._subplotsWith=[],Y._counterAxes=[],Y._name=Y._attr=H,Y._id=G}function J(t,e){return n.coerce(W,Y,c,t,e)}function K(t,e){return n.coerce2(W,Y,c,t,e)}function Q(t){return"x"===t?N:B}function tt(e,r){for(var n="x"===e?j:U,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(g(o))}return i}var et={x:Q("x"),y:Q("y")},rt=et.x.concat(et.y),nt={},it=[];function at(){var t=W.matches;y.test(t)&&-1===rt.indexOf(t)&&(nt[t]=W.type,it=Object.keys(nt))}var ot=o(t,e),st=a(ot);for(v=0;v<V.length;v++){H=V[v],G=g(H),Z=H.charAt(0),n.isPlainObject(t[H])||(t[H]={}),W=t[H],Y=s.newContainer(e,H,Z+"axis"),$();var lt="x"===Z&&!S[H]&&A[H]||"y"===Z&&!E[H]&&M[H],ct="y"===Z&&(!C[H]&&L[H]||I[H]),ut={hasMinor:!0,letter:Z,font:e.font,outerTicks:P[H],showGrid:!z[H],data:k[H]||[],bgColor:X,calendar:e.calendar,automargin:!0,visibleDflt:lt,reverseDflt:ct,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[Z]||{})[G],noAutotickangles:"y"===Z};J("uirevision",e.uirevision),u(W,Y,J,ut),h(W,Y,J,ut,e);var ht=st&&Z===ot.charAt(0),ft=K("spikecolor",st?Y.color:void 0),pt=K("spikethickness",st?1.5:void 0),dt=K("spikedash",st?"dot":void 0),mt=K("spikemode",st?"across":void 0),gt=K("spikesnap");J("showspikes",!!(ht||ft||pt||dt||mt||gt))||(delete Y.spikecolor,delete Y.spikethickness,delete Y.spikedash,delete Y.spikemode,delete Y.spikesnap);var yt=m(W.overlaying),vt=[0,1];if(void 0!==e[yt]){var xt=m(e[yt].anchor);void 0!==e[xt]&&(vt=e[xt].domain)}p(W,Y,J,{letter:Z,counterAxes:et[Z],overlayableAxes:tt(Z,H),grid:e.grid,overlayingDomain:vt}),J("title.standoff"),at(),Y._input=W}for(v=0;v<it.length;){G=it[v++],Z=(H=m(G)).charAt(0),n.isPlainObject(t[H])||(t[H]={}),W=t[H],Y=s.newContainer(e,H,Z+"axis"),$();var _t={letter:Z,font:e.font,outerTicks:P[H],showGrid:!z[H],data:[],bgColor:X,calendar:e.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[Z]||{})[G]};J("uirevision",e.uirevision),Y.type=nt[G]||"linear",h(W,Y,J,_t,e),p(W,Y,J,{letter:Z,counterAxes:et[Z],overlayableAxes:tt(Z,H),grid:e.grid}),J("fixedrange"),at(),Y._input=W}var bt=_("rangeslider","handleDefaults"),wt=_("rangeselector","handleDefaults");for(v=0;v<j.length;v++)H=j[v],W=t[H],Y=e[H],bt(t,e,H),"date"===Y.type&&wt(W,Y,e,U,Y.calendar),J("fixedrange");for(v=0;v<U.length;v++){H=U[v],W=t[H],Y=e[H];var Tt=e[m(Y.anchor)];J("fixedrange",_("rangeslider","isVisible")(Tt))}f.handleDefaults(t,e,{axIds:rt.concat(it).sort(d.idSort),axHasImage:I})}},97405:function(t,e,r){"use strict";var n=r(65657).mix,i=r(10229),a=r(34809);t.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var c=l("linecolor",s),u=l("linewidth");r("showline",o.showLine||!!c||!!u)||(delete e.linecolor,delete e.linewidth);var h=l("gridcolor",n(s,o.bgColor,o.blend||i.lightFraction).toRgbString()),f=l("gridwidth"),p=l("griddash");if(r("showgrid",o.showGrid||!!h||!!f||!!p)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),o.hasMinor){var d=l("minor.gridcolor",n(e.gridcolor,o.bgColor,67).toRgbString()),m=l("minor.gridwidth",e.gridwidth||1),g=l("minor.griddash",e.griddash||"solid");r("minor.showgrid",!!d||!!m||!!g)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!o.noZeroLine){var y=l("zerolinecolor",s),v=l("zerolinewidth");r("zeroline",o.showGrid||!!y||!!v)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},40957:function(t,e,r){"use strict";var n=r(10721),i=r(34809);t.exports=function(t,e,r,a){var o,s,l,c,u,h,f=a.counterAxes||[],p=a.overlayableAxes||[],d=a.letter,m=a.grid,g=a.overlayingDomain;m&&(s=m._domains[d][m._axisMap[e._id]],o=m._anchors[e._id],s&&(l=m[d+"side"].split(" ")[0],c=m.domain[d]["right"===l||"top"===l?1:0])),s=s||[0,1],o=o||(n(t.position)?"free":f[0]||"free"),l=l||("x"===d?"bottom":"left"),c=c||0,u=0,h=!1;var y=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(f),dflt:o}},"anchor"),v=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===d?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===y&&("y"===d&&(r("autoshift")&&(c="left"===v?g[0]:g[1],h=!e.automargin||e.automargin,u="left"===v?-3:3),r("shift",u)),r("position",c)),r("automargin",h);var x=!1;if(p.length&&(x=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(p),dflt:!1}},"overlaying")),!x){var _=r("domain",s);_[0]>_[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},54616:function(t,e,r){"use strict";var n=r(87703);t.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},90259:function(t,e,r){"use strict";var n=r(75511);t.exports=function(t,e,r,i){var a=e._template||{},o=e.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var c,u=e.getAutorangeDflt(l,i),h=r("autorange",u);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==h&&!0!==h)&&(null===l[0]||"min"!==h&&"max reversed"!==h)&&(null===l[1]||"max"!==h&&"min reversed"!==h)||(l=void 0,delete e.range,e.autorange=!0,c=!0),c||(h=r("autorange",u=e.getAutorangeDflt(l,i))),h&&(n(r,h,l),"linear"!==o&&"-"!==o||r("rangemode")),e.cleanRange()}},67611:function(t,e,r){"use strict";var n=r(4530).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},19091:function(t,e,r){"use strict";var n=r(45568),i=r(42696).aL,a=r(34809),o=a.numberFormat,s=r(10721),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,h=a.ensureNumber,f=a.isArrayOrTypedArray,p=r(63821),d=p.FP_SAFE,m=p.BADNUM,g=p.LOG_CLIP,y=p.ONEWEEK,v=p.ONEDAY,x=p.ONEHOUR,_=p.ONEMIN,b=p.ONESEC,w=r(5975),T=r(54826),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",p=r.charAt(0);function E(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function C(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===m){if(!s(e))return m;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function L(e,r,n){return c(e,r,n||t.calendar)}function I(e){return t._categories[Math.round(e)]}function P(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return m}function z(e){if(t._categoriesMap)return t._categoriesMap[e]}function O(t){var e=z(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:z(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):m},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j="y"===p;B=function(e){if(!s(e))return m;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;l<r;l++){var c=i*t._rangebreaks[l].min,u=i*t._rangebreaks[l].max;if(a<c)break;if(!(a>u)){o=a<(c+u)/2?l:l+1;break}o=l+1}var h=t._B[o]||0;return isFinite(h)?R(e,t._m2,h):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;i<r&&!(e<t._rangebreaks[i].pmin);i++)e>t._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l="log"===t.type?E:h,t.l2c="log"===t.type?M:h,t.l2p=B,t.p2l=N,t.c2p="log"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c="log"===t.type?function(t){return M(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=h,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=h):"log"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=h,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=h):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=C,t.c2d=t.c2r=t.l2d=t.l2r=L,t.d2p=t.r2p=function(e,r,n){return t.l2p(C(e,0,n))},t.p2d=t.p2r=function(t,e,r){return L(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,m,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=P,t.r2d=t.c2d=t.l2d=I,t.d2r=t.d2l_noadd=O,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=h,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return I(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:h(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=I,t.d2r=t.d2l_noadd=O,t.r2c=function(e){var r=O(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=z,t.l2r=t.c2r=h,t.r2l=O,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return I(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:h(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var h=[[0,{}],[0,{}]],d=[];for(i=0;i<s.length;i++){var m=n[s[i]];if(p in m){var g=m[p],y=m._length||a.minRowLength(g);if(f(g[0])&&f(g[1]))for(o=0;o<y;o++){var v=g[0][o],x=g[1][o];S(v)&&S(x)&&(d.push([v,x]),v in h[0][1]||(h[0][1][v]=h[0][0]++),x in h[1][1]||(h[1][1][x]=h[1][0]++))}}}for(d.sort((function(t,e){var r=h[0][1],n=r[t[0]]-r[e[0]];if(n)return n;var i=h[1][1];return i[t[1]]-i[e[1]]})),i=0;i<d.length;i++)P(d[i])}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.limitRange=function(e){var r=t.minallowed,n=t.maxallowed;if(void 0!==r||void 0!==n){e||(e="range");var i=a.nestedProperty(t,e).get(),o=a.simpleMap(i,t.r2l),s=o[1]<o[0];s&&o.reverse();var l=a.simpleMap([r,n],t.r2l);if(void 0!==r&&o[0]<l[0]&&(i[s?1:0]=r),void 0!==n&&o[1]>l[1]&&(i[s?0:1]=n),i[0]===i[1]){var c=t.l2r(r),u=t.l2r(n);if(void 0!==r){var h=c+1;void 0!==n&&(h=Math.min(h,u)),i[s?1:0]=h}if(void 0!==n){var f=u+1;void 0!==r&&(f=Math.max(f,c)),i[s?0:1]=f}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,o=a.nestedProperty(t,e).get();if(i=(i="date"===t.type?a.dfltRange(t.calendar):"y"===p?T.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],c=null===o[1];for("date"!==t.type||t.autorange||(o[0]=a.cleanDate(o[0],m,t.calendar),o[1]=a.cleanDate(o[1],m,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!a.isDateTime(o[n],t.calendar)){t[e]=i;break}if(t.r2l(o[0])===t.r2l(o[1])){var u=a.constrain(t.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=t.l2r(u-1e3),o[1]=t.l2r(u+1e3);break}}else{if(!s(o[n])){if(l||c||!s(o[1-n])){t[e]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-d?o[n]=-d:o[n]>d&&(o[n]=d),o[0]===o[1]){var h=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=h,o[1]+=h}}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),h="y"===p;if(h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._lBreaks+=Math.abs(l.max-l.min);var f=h;c>u&&(f=!f),f&&t._rangebreaks.reverse();var d=f?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(h?u:c)),s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._B.push(t._B[t._B.length-1]-d*t._m2*(l.max-l.min));for(s=0;s<t._rangebreaks.length;s++)(l=t._rangebreaks[s]).pmin=B(l.min),l.pmax=B(l.max)}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.maskBreaks=function(e){var r,n,i,o,s,c=t.rangebreaks||[];c._cachedPatterns||(c._cachedPatterns=c.map((function(e){return e.enabled&&e.bounds?a.simpleMap(e.bounds,e.pattern?l:t.d2c):null}))),c._cachedValues||(c._cachedValues=c.map((function(e){return e.enabled&&e.values?a.simpleMap(e.values,t.d2c).sort(a.sorterAsc):null})));for(var u=0;u<c.length;u++){var h=c[u];if(h.enabled)if(h.bounds){var f=h.pattern;switch(n=(r=c._cachedPatterns[u])[0],i=r[1],f){case A:o=(s=new Date(e)).getUTCDay(),n>i&&(i+=7,o<n&&(o+=7));break;case k:o=(s=new Date(e)).getUTCHours()+(s.getUTCMinutes()/60+s.getUTCSeconds()/3600+s.getUTCMilliseconds()/36e5),n>i&&(i+=24,o<n&&(o+=24));break;case"":o=e}if(o>=n&&o<i)return m}else for(var p=c._cachedValues[u],d=0;d<p.length;d++)if(i=(n=p[d])+h.dvalue,e>=n&&e<i)return m}return e},t.locateBreaks=function(e,r){var n,i,o,s,c=[];if(!t.rangebreaks)return c;var u=t.rangebreaks.slice().sort((function(t,e){return t.pattern===A&&e.pattern===k?-1:e.pattern===A&&t.pattern===k?1:0})),h=function(t,n){if((t=a.constrain(t,e,r))!==(n=a.constrain(n,e,r))){for(var i=!0,o=0;o<c.length;o++){var s=c[o];t<s.max&&n>=s.min&&(t<s.min&&(s.min=t),n>s.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;n<u.length;n++){var f=u[n];if(f.enabled)if(f.bounds){var p=e,d=r;f.pattern&&(p=Math.floor(p)),o=(i=a.simpleMap(f.bounds,f.pattern?l:t.r2l))[0],s=i[1];var m,g,w=new Date(p);switch(f.pattern){case A:g=y,m=(s-o+(s<o?7:0))*v,p+=o*v-(w.getUTCDay()*v+w.getUTCHours()*x+w.getUTCMinutes()*_+w.getUTCSeconds()*b+w.getUTCMilliseconds());break;case k:g=v,m=(s-o+(s<o?24:0))*x,p+=o*x-(w.getUTCHours()*x+w.getUTCMinutes()*_+w.getUTCSeconds()*b+w.getUTCMilliseconds());break;default:p=Math.min(i[0],i[1]),m=g=(d=Math.max(i[0],i[1]))-p}for(var T=p;T<d;T+=g)h(T,T+m)}else for(var M=a.simpleMap(f.values,t.d2c),S=0;S<M.length;S++)h(o=M[S],s=o+f.dvalue)}return c.sort((function(t,e){return t.min-e.min})),c},t.makeCalcdata=function(e,r,n){var i,o,s,l,c=t.type,u="date"===c&&e[r+"calendar"];if(r in e){if(i=e[r],l=e._length||a.minRowLength(i),a.isTypedArray(i)&&("linear"===c||"log"===c)){if(l===i.length)return i;if(i.subarray)return i.subarray(0,l)}if("multicategory"===c)return function(t,e){for(var r=new Array(e),n=0;n<e;n++){var i=(t[0]||[])[n],a=(t[1]||[])[n];r[n]=z([i,a])}return r}(i,l);for(o=new Array(l),s=0;s<l;s++)o[s]=t.d2c(i[s],0,u,n)}else{var h=r+"0"in e?t.d2c(e[r+"0"],0,u):0,f=e["d"+r]?Number(e["d"+r]):1;for(i=e[{x:"y",y:"x"}[r]],l=e._length||i.length,o=new Array(l),s=0;s<l;s++)o[s]=h+s*f}if(t.rangebreaks)for(s=0;s<l;s++)o[s]=t.maskBreaks(o[s]);return o},t.isValidRange=function(e,r){return Array.isArray(e)&&2===e.length&&(r&&null===e[0]||s(t.r2l(e[0])))&&(r&&null===e[1]||s(t.r2l(e[1])))},t.getAutorangeDflt=function(e,r){var n=!t.isValidRange(e,"nullOk");return n&&r&&r.reverseDflt?n="reversed":e&&(null===e[0]&&null===e[1]?n=!0:null===e[0]&&null!==e[1]?n="min":null!==e[0]&&null===e[1]&&(n="max")),n},t.isReversed=function(){var e=t.autorange;return"reversed"===e||"min reversed"===e||"max reversed"===e},t.isPtWithinRange=function(e,r){var n=t.c2l(e[p],null,r),i=t.r2l(t.range[0]),a=t.r2l(t.range[1]);return i<a?i<=n&&n<=a:a<=n&&n<=i},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var r=t._matchGroup;if(r){var n=null,i=null;for(var a in r){var o=e[w.id2name(a)];if(o._categories){n=o._categories,i=o._categoriesMap;break}}n&&i?(t._categories=n,t._categoriesMap=i):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var s=0;s<t._initialCategories.length;s++)P(t._initialCategories[s])},t.sortByInitialCategories=function(){var n=[];if(t._emptyCategories(),t._initialCategories)for(var i=0;i<t._initialCategories.length;i++)P(t._initialCategories[i]);n=n.concat(t._traceIndices);var a=t._matchGroup;for(var o in a)if(r!==o){var s=e[w.id2name(o)];s._categories=t._categories,s._categoriesMap=t._categoriesMap,n=n.concat(s._traceIndices)}return n};var U=e._d3locale;"date"===t.type&&(t._dateFormat=U?U.timeFormat:i,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=U?U.numberFormat:o,delete t._minDtick,delete t._forceTick0}},87703:function(t){"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},12036:function(t,e,r){"use strict";var n=r(34809),i=r(78766).contrast,a=r(25829),o=r(87703),s=r(59008);function l(t,e){function r(r,i){return n.coerce(t,e,a.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,c,u){u||(u={});var h=r("labelalias");n.isPlainObject(h)||delete e.labelalias;var f=o(t);if(r("showticklabels")){u.noTicklabelshift||r("ticklabelshift"),u.noTicklabelstandoff||r("ticklabelstandoff");var p=u.font||{},d=e.color,m=-1!==(e.ticklabelposition||"").indexOf("inside")?i(u.bgColor):d&&d!==a.color.dflt?d:p.color;if(n.coerceFont(r,"tickfont",p,{overrideDflt:{color:m}}),u.noTicklabelstep||"multicategory"===c||"log"===c||r("ticklabelstep"),!u.noAng){var g=r("tickangle");u.noAutotickangles||"auto"!==g||r("autotickangles")}if("category"!==c){var y=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,u.noExp||y||"date"===c||(r("showexponent",f),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},87433:function(t,e,r){"use strict";var n=r(34809),i=r(25829);t.exports=function(t,e,r,a){var o=a.isMinor,s=o?t.minor||{}:t,l=o?e.minor:e,c=o?i.minor:i,u=o?"minor.":"",h=n.coerce2(s,l,c,"ticklen",o?.6*(e.ticklen||5):void 0),f=n.coerce2(s,l,c,"tickwidth",o?e.tickwidth||1:void 0),p=n.coerce2(s,l,c,"tickcolor",(o?e.tickcolor:void 0)||l.color);r(u+"ticks",!o&&a.outerTicks||h||f||p?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},22777:function(t,e,r){"use strict";var n=r(68599),i=r(34809).isArrayOrTypedArray,a=r(87800).isTypedArraySpec,o=r(87800).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var c=l.isMinor,u=c?t.minor||{}:t,h=c?e.minor:e,f=c?"minor.":"";function p(t){var e=u[t];return a(e)&&(e=o(e)),void 0!==e?e:(h._template||{})[t]}var d=p("tick0"),m=p("dtick"),g=p("tickvals"),y=r(f+"tickmode",i(g)?"array":m?"linear":"auto");if("auto"===y||"sync"===y)r(f+"nticks");else if("linear"===y){var v=h.dtick=n.dtick(m,s);h.tick0=n.tick0(d,s,e.calendar,v)}else"multicategory"!==s&&(void 0===r(f+"tickvals")?h.tickmode="auto":c||r("ticktext"))}},84982:function(t,e,r){"use strict";var n=r(45568),i=r(33626),a=r(34809),o=r(62203),s=r(29714);t.exports=function(t,e,r,l){var c=t._fullLayout;if(0!==e.length){var u,h,f,p;l&&(u=l());var d=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr0&&(r[o._name+".range"]=a.xr0.slice()),a.yr0&&(r[s._name+".range"]=a.yr0.slice())}return i.call("relayout",t,r).then((function(){for(var t=0;t<e.length;t++)m(e[t].plotinfo)}))}()})),h=Date.now(),p=window.requestAnimationFrame((function n(){f=Date.now();for(var a=Math.min(1,(f-h)/r.duration),o=d(a),s=0;s<e.length;s++)g(e[s],o);f-h>r.duration?(function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr1&&(r[o._name+".range"]=a.xr1.slice()),a.yr1&&(r[s._name+".range"]=a.yr1.slice())}u&&u(),i.call("relayout",t,r).then((function(){for(var t=0;t<e.length;t++)m(e[t].plotinfo)}))}(),p=window.cancelAnimationFrame(n)):p=window.requestAnimationFrame(n)})),Promise.resolve()}function m(t){var e=t.xaxis,r=t.yaxis;c._defs.select("#"+t.clipId+"> rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,h=!!e.xr1,f=!!e.yr1,p=[];if(h){var d=a.simpleMap(e.xr0,i.r2l),m=a.simpleMap(e.xr1,i.r2l),g=d[1]-d[0],y=m[1]-m[0];p[0]=(d[0]*(1-r)+r*m[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*y/g),i.range[0]=i.l2r(d[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*m[1])}else p[0]=0,p[2]=c;if(f){var v=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),_=v[1]-v[0],b=x[1]-x[0];p[1]=(v[1]*(1-r)+r*x[1]-v[1])/(v[0]-v[1])*u,p[3]=u*(1-r+r*b/_),l.range[0]=i.l2r(v[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(v[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=h?c/p[2]:1,T=f?u/p[3]:1,k=h?p[0]:0,A=f?p[1]:0,M=h?p[0]/p[2]*c:0,S=f?p[1]/p[3]*u:0,E=i._offset-M,C=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},4392:function(t,e,r){"use strict";var n=r(33626).traceIs,i=r(9666);function a(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=a(t),i=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if("splom"===i.type&&i._length>0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(c)if("histogram"!==c.type||l!=={v:"y",h:"x"}[c.orientation||"v"]){var u=l+"calendar",h=c[u],f={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0),f.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r<e.length;r++){var m=e[r];n(m,"box-violin")&&(m[l+"axis"]||l)===s&&(void 0!==m[p]?d.push(m[p][0]):void 0!==m.name?d.push(m.name):d.push("text"),m[u]!==h&&(h=void 0))}t.type=i(d,h,f)}else if("splom"===c.type){var g=c.dimensions[c._axesDim[s]];g.visible&&(t.type=i(g.values,h,f))}else t.type=i(c[l]||[c[l+"0"]],h,f)}else t.type="linear"}}(e,s.data),"-"===e.type?e.type="linear":t.type=e.type)}},90251:function(t,e,r){"use strict";var n=r(33626),i=r(34809);function a(t,e,r){var n,a,o,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if("string"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},"string"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,(function(e,n,i){var a,o;if(Array.isArray(i)){o=i.slice();var l=Math.min(o.length,t.data.length);r&&(l=Math.min(l,r.length)),a=[];for(var c=0;c<l;c++)a[c]=r?r[c]:c}else o=i,a=r?r.slice():null;if(null===a)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(a)){if(!Array.isArray(o)){var u=o;o=[];for(var h=0;h<a.length;h++)o[h]=u}o.length=Math.min(a.length,o.length)}s.push({type:"data",prop:e,traces:a,value:o})}),"",0),s}function l(t,e,r,n){Object.keys(t).forEach((function(a){var o=t[a];if("_"!==a[0]){var s=r+(n>0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}e.manageCommandObserver=function(t,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(c)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(c){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h<u.length;h++)t._internalOn(u[h],s.check);s.remove=function(){for(var e=0;e<u.length;e++)t._removeInternalListener(u[e],s.check)}}else i.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},r&&(r._commandObserver=s),s},e.hasSimpleAPICommandBindings=function(t,r,n){var i,a,o=r.length;for(i=0;i<o;i++){var s,l=r[i],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var h=e.computeAPICommandBindings(t,c,u);if(1!==h.length)return!1;if(a){if((s=h[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var f=0;f<a.traces.length;f++)if(a.traces[f]!==s.traces[f])return!1}else if(s.prop!==a.prop)return!1}else a=h[0],Array.isArray(a.traces)&&a.traces.sort();var p=(s=h[0]).value;if(Array.isArray(p)){if(1!==p.length)return!1;p=p[0]}n&&(n[p]=i)}return a},e.executeAPICommand=function(t,e,r){if("skip"===e)return Promise.resolve();var a=n.apiMethodRegistry[e],o=[t];Array.isArray(r)||(r=[]);for(var s=0;s<r.length;s++)o.push(r[s]);return a.apply(null,o).catch((function(t){return i.warn("API call to Plotly."+e+" rejected.",t),Promise.reject(t)}))},e.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case"restyle":n=s(t,r);break;case"relayout":n=o(0,r);break;case"update":n=s(t,[r[0],r[2]]).concat(o(0,[r[1]]));break;case"animate":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==["string","number"].indexOf(typeof e[0][0])?[{type:"layout",prop:"_currentFrame",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},13792:function(t,e,r){"use strict";var n=r(93049).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:t.editType},i.column={valType:"integer",min:0,dflt:0,editType:t.editType}),i},e.N=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r("domain.column");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r("domain.row");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}var c=r("domain.x",i),u=r("domain.y",a);c[0]<c[1]||(t.domain.x=i.slice()),u[0]<u[1]||(t.domain.y=a.slice())}},80337:function(t){"use strict";t.exports=function(t){var e=t.variantValues,r=t.editType,n=t.colorEditType;void 0===n&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};t.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:t.noFontVariant?void 0:{editType:r,valType:"enumerated",values:e||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:t.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:t.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:t.noFontShadow?void 0:{editType:r,valType:"string",dflt:t.autoShadowDflt?"auto":"none"},editType:r};return t.autoSize&&(a.size.dflt="auto"),t.autoColor&&(a.color.dflt="auto"),t.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,t.noFontVariant||(a.variant.arrayOk=!0),t.noFontTextcase||(a.textcase.arrayOk=!0),t.noFontLineposition||(a.lineposition.arrayOk=!0),t.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}},58935:function(t){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},74285:function(t,e){"use strict";e.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},e.axesNames=["lonaxis","lataxis"],e.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},e.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},e.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},e.clipPad=.001,e.precision=.1,e.landColor="#F0DC82",e.waterColor="#3399FF",e.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},e.sphereSVG={type:"Sphere"},e.fillLayers={ocean:1,land:1,lakes:1},e.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},e.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],e.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],e.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},6493:function(t,e,r){"use strict";var n=r(45568),i=r(70884),a=i.geoPath,o=i.geoDistance,s=r(75987),l=r(33626),c=r(34809),u=c.strTranslate,h=r(78766),f=r(62203),p=r(32141),d=r(44122),m=r(29714),g=r(32919).getAutoRange,y=r(14751),v=r(44844).prepSelect,x=r(44844).clearOutline,_=r(44844).selectOnClick,b=r(14309),w=r(74285),T=r(3994),k=r(11577),A=r(48640).N4;function M(t){this.id=t.id,this.graphDiv=t.graphDiv,this.container=t.container,this.topojsonURL=t.topojsonURL,this.isStatic=t.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var S=M.prototype;function E(t,e){var r=w.clipPad,n=t[0]+r,i=t[1]-r,a=e[0]+r,o=e[1]-r;n>0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}t.exports=function(t){return new M(t)},S.plot=function(t,e,r,n){var i=this;if(n)return i.update(t,e,!0);i._geoCalcData=t,i._fullLayout=e;var a=e[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var c=!1,u=0;u<t.length;u++){var h=t[0][0].trace;h._geo=i,h.locationmode&&(s=!0);var f=h.marker;if(f){var p=f.angle,d=f.angleref;(p||"north"===d||"previous"===d)&&(c=!0)}}if(this._hasMarkerAngles=c,s){var m=k.getTopojsonName(a);null!==i.topojson&&m===i.topojsonName||(i.topojsonName=m,void 0===PlotlyGeoAssets.topojson[i.topojsonName]&&o.push(i.fetchTopojson()))}o=o.concat(T.fetchTraceGeoData(t)),r.push(new Promise((function(r,n){Promise.all(o).then((function(){i.topojson=PlotlyGeoAssets.topojson[i.topojsonName],i.update(t,e),r()})).catch(n)})))},S.fetchTopojson=function(){var t=this,e=k.getTopojsonPath(t.topojsonURL,t.topojsonName);return new Promise((function(r,i){n.json(e,(function(n,a){if(n)return 404===n.status?i(new Error(["plotly.js could not find topojson file at",e+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):i(new Error(["unexpected error while fetching topojson file at",e].join(" ")));PlotlyGeoAssets.topojson[t.topojsonName]=a,r()}))}))},S.update=function(t,e,r){var n=e[this.id];this.hasChoropleth=!1;for(var i=0;i<t.length;i++){var a=t[i],o=a[0].trace;"choropleth"===o.type&&(this.hasChoropleth=!0),!0===o.visible&&o._length>0&&o._module.calcGeoJSON(a,e)}if(!r){if(this.updateProjection(t,e))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(e,n),this.updateDims(e,n),this.updateFx(e,n),d.generalUpdatePerTraceModule(this.graphDiv,this,t,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,h=n.projection,f=n.lonaxis,p=n.lataxis,d=f._ax,m=p._ax,y=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n="geo"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,h=["center","rotate","parallels","clipExtent"],f=function(t){return t?l:[]},p=0;p<h.length;p++){var d=h[p];"function"!=typeof l[d]&&(l[d]=f)}return l.isLonLatOverEdges=function(t){if(null===l(t))return!0;if(u){var e=l.rotate();return o(t,[-e[0],-e[1]])>u*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance),u&&l.clipAngle(u-w.clipPad),l}(n),v=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},_=h.rotation||{},b=f.range||[],T=p.range||[];if(n.fitbounds){d._length=v[1][0]-v[0][0],m._length=v[1][1]-v[0][1],d.range=g(r,d),m.range=g(r,m);var k=(d.range[0]+d.range[1])/2,A=(m.range[0]+m.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},_={lon:k,lat:A,roll:_.roll};var M=h.type,S=w.lonaxisSpan[M]/2||180,C=w.lataxisSpan[M]/2||90;b=[k-S,k+S],T=[A-C,A+C]}else x={lon:k,lat:A},_={lon:k,lat:_.lat,roll:_.roll}}y.center([x.lon-_.lon,x.lat-_.lat]).rotate([-_.lon,-_.lat,_.roll]).parallels(h.parallels);var L=E(b,T);y.fitExtent(v,L);var I=this.bounds=y.getBounds(L),P=this.fitScale=y.scale(),z=y.translate();if(n.fitbounds){var O=y.getBounds(E(d.range,m.range)),D=Math.min((I[1][0]-I[0][0])/(O[1][0]-O[0][0]),(I[1][1]-I[0][1])/(O[1][1]-O[0][1]));isFinite(D)?y.scale(D*P):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(h.scale*P);var R=this.midPt=[(I[0][0]+I[1][0])/2,(I[0][1]+I[1][1])/2];if(y.translate([z[0]+(R[0]-z[0]),z[1]+(R[1]-z[1])]).clipExtent(I),n._isAlbersUsa){var F=y([x.lon,x.lat]),B=y.translate();y.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return"lonaxis"===t||"lataxis"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e["show"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(".layer").data(u,String);p.exit().each((function(t){delete a[t],delete o[t],n.select(this).remove()})),p.enter().append("g").attr("class",(function(t){return"layer "+t})).each((function(t){var e=a[t]=n.select(this);"bg"===t?r.bgRect=e.append("rect").style("pointer-events","all"):s(t)?o[t]=e.append("path").style("fill","none"):"backplot"===t?e.append("g").classed("choroplethlayer",!0):"frontplot"===t?e.append("g").classed("scatterlayer",!0):l(t)?o[t]=e.append("path").style("fill","none").style("stroke-miterlimit",2):c(t)&&(o[t]=e.append("path").style("stroke","none"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];"lonaxis"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):"lataxis"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};m.setConvert(l,r);var c=m.calcTicks(l);e.isScoped||"lonaxis"!==t||c.pop();for(var u=c.length,h=new Array(u),f=0;f<u;f++)for(var p=c[f].x,d=h[f]=[],g=i[0];g<i[1]+2.5;g+=2.5)d.push(a(p,g));return{type:"MultiLineString",coordinates:h}}(r,e,t)).call(h.stroke,e[r].gridcolor).call(f.dashLine,e[r].griddash,e[r].gridwidth),l(r)?n.call(h.stroke,e[a+"color"]).call(f.dashLine,"",e[a+"width"]):c(r)&&n.call(h.fill,e[a+"color"])}))},S.updateDims=function(t,e){var r=this.bounds,n=(e.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;f.setRect(this.clipRect,i,a,o,s),this.bgRect.call(f.setRect,i,a,o,s).call(h.fill,e.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s},S.updateFx=function(t,e){var r=this,i=r.graphDiv,a=r.bgRect,o=t.dragmode,s=t.clickmode;if(!r.isStatic){var u={element:r.bgRect.node(),gd:i,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:function(t,e){e.isRect?(t.range={})[r.id]=[h([e.xmin,e.ymin]),h([e.xmax,e.ymax])]:(t.lassoPoints={})[r.id]=e.map(h)}},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(t){2===t&&x(i)}};"pan"===o?(a.node().onmousedown=null,a.call(b(r,e)),a.on("dblclick.zoom",(function(){var t=r.viewInitial,e={};for(var n in t)e[r.id+"."+n]=t[n];l.call("_guiRelayout",i,e),i.emit("plotly_doubleclick",null)})),i._context._scrollZoom.geo||a.on("wheel.zoom",null)):"select"!==o&&"lasso"!==o||(a.on(".zoom",null),u.prepFn=function(t,e,r){v(t,e,r,u,o)},y.init(u)),a.on("mousemove",(function(){var t=r.projection.invert(c.getPositionFromD3Event());if(!t)return y.unhover(i,n.event);r.xaxis.p2c=function(){return t[0]},r.yaxis.p2c=function(){return t[1]},p.hover(i,n.event,r.id)})),a.on("mouseout",(function(){i._dragging||y.unhover(i,n.event)})),a.on("click",(function(){"select"!==o&&"lasso"!==o&&(s.indexOf("select")>-1&&_(n.event,i,[r.xaxis],[r.yaxis],r.id,u),s.indexOf("event")>-1&&p.click(i,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",i),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(f.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},m.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(t){this._hasMarkerAngles&&t?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},47544:function(t,e,r){"use strict";var n=r(4173).fX,i=r(34809).counterRegex,a=r(6493),o="geo",s=i(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"},t.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(42194),supplyLayoutDefaults:r(31653),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[o],s=0;s<i.length;s++){var l=i[s],c=n(r,o,l),u=e[l]._subplot;u||(u=a({id:l,graphDiv:t,container:e._geolayer.node(),topojsonURL:t._context.topojsonURL,staticPlot:t._context.staticPlot}),e[l]._subplot=u),u.plot(c,e,t._promises)}},updateFx:function(t){for(var e=t._fullLayout,r=e._subplots[o],n=0;n<r.length;n++){var i=e[r[n]];i._subplot.updateFx(e,i)}},clean:function(t,e,r,n){for(var i=n._subplots[o]||[],a=0;a<i.length;a++){var s=i[a],l=n[s]._subplot;!e[s]&&l&&(l.framework.remove(),l.clipDef.remove())}}}},42194:function(t,e,r){"use strict";var n=r(10229),i=r(13792).u,a=r(94850).T,o=r(74285),s=r(13582).overrideAll,l=r(62994),c={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:n.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:a};(t.exports=s({domain:i({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:l(o.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:l(o.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:n.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:o.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:o.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:o.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:o.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:n.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:n.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:n.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:n.background},lonaxis:c,lataxis:c},"plot","from-root")).uirevision={valType:"any",editType:"none"}},31653:function(t,e,r){"use strict";var n=r(34809),i=r(4448),a=r(4173).KO,o=r(74285),s=r(42194),l=o.axesNames;function c(t,e,r,i){var s=a(i.fullData,"geo",i.id).map((function(t){return t._expandedIndex})),c=r("resolution"),u=r("scope"),h=o.scopeDefaults[u],f=r("projection.type",h.projType),p=e._isAlbersUsa="albers usa"===f;p&&(u=e.scope="usa");var d=e._isScoped="world"!==u,m=e._isSatellite="satellite"===f,g=e._isConic=-1!==f.indexOf("conic")||"albers"===f,y=e._isClipped=!!o.lonaxisSpan[f];if(!1===t.visible){var v=n.extendDeep({},e._template);v.showcoastlines=!1,v.showcountries=!1,v.showframe=!1,v.showlakes=!1,v.showland=!1,v.showocean=!1,v.showrivers=!1,v.showsubunits=!1,v.lonaxis&&(v.lonaxis.showgrid=!1),v.lataxis&&(v.lataxis.showgrid=!1),e._template=v}for(var x=r("visible"),_=0;_<l.length;_++){var b,w=l[_],T=[30,10][_];if(d)b=h[w+"Range"];else{var k=o[w+"Span"],A=(k[f]||k["*"])/2,M=r("projection.rotation."+w.substr(0,3),h.projRotate[_]);b=[M-A,M+A]}var S=r(w+".range",b);r(w+".tick0"),r(w+".dtick",T),r(w+".showgrid",!!x&&void 0)&&(r(w+".gridcolor"),r(w+".gridwidth"),r(w+".griddash")),e[w]._ax={type:"linear",_id:w.slice(0,3),_traceIndices:s,setScale:n.identity,c2l:n.identity,r2l:n.identity,autorange:!0,range:S.slice(),_m:1,_input:{}}}var E=e.lonaxis.range,C=e.lataxis.range,L=E[0],I=E[1];L>0&&I<0&&(I+=360);var P,z,O,D=(L+I)/2;if(!p){var R=d?h.projRotate:[D,0,0];P=r("projection.rotation.lon",R[0]),r("projection.rotation.lat",R[1]),r("projection.rotation.roll",R[2]),r("showcoastlines",!d&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}p?(z=-96.6,O=38.7):(z=d?D:P,O=(C[0]+C[1])/2),r("center.lon",z),r("center.lat",O),m&&(r("projection.tilt"),r("projection.distance")),g&&r("projection.parallels",h.projParallels||[0,60]),r("projection.scale"),r("showland",!!x&&void 0)&&r("landcolor"),r("showlakes",!!x&&void 0)&&r("lakecolor"),r("showrivers",!!x&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==u&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),d||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):y?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}t.exports=function(t,e,r){i(t,e,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},14309:function(t,e,r){"use strict";var n=r(45568),i=r(34809),a=r(33626),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function h(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],h={},f={};function p(t,e){h[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),f[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",f)}function f(t,e){var r=u(0,e);function i(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render(!0);var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),h(t,e,i)})),r}function p(t,e){var r,i,a,o,s,f,p,d,m,g=u(0,e);function y(t){return e.invert(t)}function v(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=y(r)})).on("zoom",(function(){if(f=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return g.scale(e.scale()),void g.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?y(f)&&(d=y(f),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=y(r=f),m=!0,t.render(!0);var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),m&&h(t,e,v)})),g}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),f=function(t){for(var e=0,r=arguments.length,i=[];++e<r;)i.push(arguments[e]);var a=n.dispatch.apply(null,i);return a.of=function(e,r){return function(i){var o;try{o=i.sourceEvent=n.event,i.target=t,n.event=i,a[i.type].apply(e,r)}finally{n.event=o}}},a}(a,"zoomstart","zoom","zoomend"),p=0,d=a.on;function y(t){var r=e.rotate();t("projection.rotation.lon",-r[0]),t("projection.rotation.lat",-r[1])}return a.on("zoomstart",(function(){n.select(this).style(l);var t,c,u,h,y,_,b,w,T,k,A,M=n.mouse(this),S=e.rotate(),E=S,C=e.translate(),L=(c=.5*(t=S)[0]*o,u=.5*t[1]*o,h=.5*t[2]*o,y=Math.sin(c),_=Math.cos(c),b=Math.sin(u),w=Math.cos(u),T=Math.sin(h),[_*w*(k=Math.cos(h))+y*b*T,y*w*k-_*b*T,_*b*k+y*w*T,_*w*T-y*b*k]);r=m(e,M),d.call(a,"zoom",(function(){var t,a,o,l,c,u,h,p,d,y,_=n.mouse(this);if(e.scale(i.k=n.event.scale),r){if(m(e,_)){e.rotate(S).translate(C);var b=m(e,_),w=function(t,e){if(t&&e){var r=function(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}(t,e),n=Math.sqrt(x(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,x(t,e)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}(r,b),T=function(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}((o=(t=L)[0],l=t[1],c=t[2],u=t[3],[o*(h=(a=w)[0])-l*(p=a[1])-c*(d=a[2])-u*(y=a[3]),o*p+l*h+c*y-u*d,o*d-l*y+c*h+u*p,o*y+l*d-c*p+u*h])),k=i.r=function(t,e,r){var n=v(e,2,t[0]);n=v(n,1,t[1]),n=v(n,0,t[2]-r[2]);var i,a,o=e[0],l=e[1],c=e[2],u=n[0],h=n[1],f=n[2],p=Math.atan2(l,o)*s,d=Math.sqrt(o*o+l*l);Math.abs(h)>d?(a=(h>0?90:-90)-p,i=0):(a=Math.asin(h/d)*s-p,i=Math.sqrt(d*d-h*h));var m=180-a-2*p,y=(Math.atan2(f,u)-Math.atan2(c,i))*s,x=(Math.atan2(f,u)-Math.atan2(c,-i))*s;return g(r[0],r[1],a,y)<=g(r[0],r[1],m,x)?[a,y,r[2]]:[m,x,r[2]]}(T,r,E);isFinite(k[0])&&isFinite(k[1])&&isFinite(k[2])||(k=E),e.rotate(k),E=k}}else r=m(e,M=_);f.of(this,arguments)({type:"zoom"})})),A=f.of(this,arguments),p++||A({type:"zoomstart"})})).on("zoomend",(function(){var r;n.select(this).style(c),d.call(a,"zoom",null),r=f.of(this,arguments),--p||r({type:"zoomend"}),h(t,e,y)})).on("zoom.redraw",(function(){t.render(!0);var r=e.rotate();t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(a,f,"on")}function m(t,e){var r=t.invert(e);return r&&isFinite(r[0])&&isFinite(r[1])&&function(t){var e=t[0]*o,r=t[1]*o,n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}(r)}function g(t,e,r,n){var i=y(r-t),a=y(n-e);return Math.sqrt(i*i+a*a)}function y(t){return(t%360+540)%360-180}function v(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function x(t,e){for(var r=0,n=0,i=t.length;n<i;++n)r+=t[n]*e[n];return r}t.exports=function(t,e){var r=t.projection;return(e._isScoped?f:e._isClipped?d:p)(t,r)}},4173:function(t,e,r){"use strict";var n=r(33626),i=r(54826).SUBPLOT_PATTERN;e.fX=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},e.eV=function(t,e,r){var i,a=[],o=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[a,t];for(var s=r,l=0;l<t.length;l++){var c=t[l],u=c[0].trace,h=void 0!==u.zorder;!0===u.visible&&0!==u._length&&(!u._module||u._module.plot!==i||h&&u.zorder!==s?o.push(c):a.push(c))}return[a,o]},e.KO=function(t,e,r){if(!n.subplotsRegistry[e])return[];var a,o,s,l=n.subplotsRegistry[e].attr,c=[];if("gl2d"===e){var u=r.match(i);o="x"+u[1],s="y"+u[2]}for(var h=0;h<t.length;h++)a=t[h],"gl2d"===e&&n.traceIs(a,"gl2d")?a[l[0]]===o&&a[l[1]]===s&&c.push(a):a[l]===r&&c.push(a);return c}},77055:function(t,e,r){"use strict";var n=r(99978),i=r(20573),a=r(44039),o=r(54826),s=r(74043);function l(t,e){this.element=t,this.plot=e,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}t.exports=function(t){var e=t.mouseContainer,r=t.glplot,c=new l(e,r);function u(){t.xaxis.autorange=!1,t.yaxis.autorange=!1}function h(e,n,i){var a,s,l=t.calcDataBox(),h=r.viewBox,f=c.lastPos[0],p=c.lastPos[1],d=o.MINDRAG*r.pixelRatio,m=o.MINZOOM*r.pixelRatio;function g(e,r,n){var i=Math.min(r,n),a=Math.max(r,n);i!==a?(l[e]=i,l[e+2]=a,c.dataBox=l,t.setRanges(l)):(t.selectBox.selectBox=[0,0,1,1],t.glplot.setDirty())}switch(n*=r.pixelRatio,i*=r.pixelRatio,i=h[3]-h[1]-i,t.fullLayout.dragmode){case"zoom":if(e){var y=n/(h[2]-h[0])*(l[2]-l[0])+l[0],v=i/(h[3]-h[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=y,c.boxStart[1]=v,c.dragStart[0]=n,c.dragStart[1]=i),c.boxEnd[0]=y,c.boxEnd[1]=v,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var x=Math.abs(c.dragStart[0]-n)<m,_=Math.abs(c.dragStart[1]-i)<m;if(!function(){for(var e=t.graphDiv._fullLayout._axisConstraintGroups,r=t.xaxis._id,n=t.yaxis._id,i=0;i<e.length;i++)if(-1!==e[i][r]){if(-1!==e[i][n])return!0;break}return!1}()||x&&_)x&&(c.boxEnd[0]=c.boxStart[0]),_&&(c.boxEnd[1]=c.boxStart[1]);else{a=c.boxEnd[0]-c.boxStart[0],s=c.boxEnd[1]-c.boxStart[1];var b=(l[3]-l[1])/(l[2]-l[0]);Math.abs(a*b)>Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*b*(s>=0?1:-1),c.boxEnd[1]<l[1]?(c.boxEnd[1]=l[1],c.boxEnd[0]=c.boxStart[0]+(l[1]-c.boxStart[1])/Math.abs(b)):c.boxEnd[1]>l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(b))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/b*(a>=0?1:-1),c.boxEnd[0]<l[0]?(c.boxEnd[0]=l[0],c.boxEnd[1]=c.boxStart[1]+(l[0]-c.boxStart[0])*Math.abs(b)):c.boxEnd[0]>l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(b)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(g(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(g(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n)<d&&(n=c.dragStart[0]),Math.abs(c.dragStart[1]-i)<d&&(i=c.dragStart[1]),a=(f-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(p-i)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=a,l[2]+=a,l[1]+=s,l[3]+=s,t.setRanges(l),c.panning=!0,c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations()):c.panning&&(c.panning=!1,t.relayoutCallback())}c.lastPos[0]=n,c.lastPos[1]=i}return c.mouseListener=n(e,h),e.addEventListener("touchstart",(function(t){var r=a(t.changedTouches[0],e);h(0,r[0],r[1]),h(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener("touchmove",(function(t){t.preventDefault();var r=a(t.changedTouches[0],e);h(1,r[0],r[1]),t.preventDefault()}),!!s&&{passive:!1}),e.addEventListener("touchend",(function(t){h(0,c.lastPos[0],c.lastPos[1]),t.preventDefault()}),!!s&&{passive:!1}),c.wheelListener=i(e,(function(e,n){if(!t.scrollZoom)return!1;var i=t.calcDataBox(),a=r.viewBox,o=c.lastPos[0],s=c.lastPos[1],l=Math.exp(5*n/(a[3]-a[1])),h=o/(a[2]-a[0])*(i[2]-i[0])+i[0],f=s/(a[3]-a[1])*(i[3]-i[1])+i[1];return i[0]=(i[0]-h)*l+h,i[2]=(i[2]-h)*l+h,i[1]=(i[1]-f)*l+f,i[3]=(i[3]-f)*l+f,t.setRanges(i),c.lastInputTime=Date.now(),u(),t.cameraChanged(),t.handleAnnotations(),t.relayoutCallback(),!0}),!0),c}},10749:function(t,e,r){"use strict";var n=r(29714),i=r(55010);function a(t){this.scene=t,this.gl=t.gl,this.pixelRatio=t.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var o=a.prototype,s=["xaxis","yaxis"];o.merge=function(t){var e,r,n,a,o,l,c,u,h,f,p;for(this.titleEnable=!1,this.backgroundColor=i(t.plot_bgcolor),f=0;f<2;++f){var d=(e=s[f]).charAt(0);for(n=(r=t[this.scene[e]._name]).title.text===this.scene.fullLayout._dfltTitle[d]?"":r.title.text,p=0;p<=2;p+=2)this.labelEnable[f+p]=!1,this.labels[f+p]=n,this.labelColor[f+p]=i(r.title.font.color),this.labelFont[f+p]=r.title.font.family,this.labelSize[f+p]=r.title.font.size,this.labelPad[f+p]=this.getLabelPad(e,r),this.tickEnable[f+p]=!1,this.tickColor[f+p]=i((r.tickfont||{}).color),this.tickAngle[f+p]="auto"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[f+p]=this.getTickPad(r),this.tickMarkLength[f+p]=0,this.tickMarkWidth[f+p]=r.tickwidth||0,this.tickMarkColor[f+p]=i(r.tickcolor),this.borderLineEnable[f+p]=!1,this.borderLineColor[f+p]=i(r.linecolor),this.borderLineWidth[f+p]=r.linewidth||0;c=this.hasSharedAxis(r),o=this.hasAxisInDfltPos(e,r)&&!c,l=this.hasAxisInAltrPos(e,r)&&!c,a=r.mirror||!1,u=c?-1!==String(a).indexOf("all"):!!a,h=c?"allticks"===a:-1!==String(a).indexOf("ticks"),o?this.labelEnable[f]=!0:l&&(this.labelEnable[f+2]=!0),o?this.tickEnable[f]=r.showticklabels:l&&(this.tickEnable[f+2]=r.showticklabels),(o||u)&&(this.borderLineEnable[f]=r.showline),(l||u)&&(this.borderLineEnable[f+2]=r.showline),(o||h)&&(this.tickMarkLength[f]=this.getTickMarkLength(r)),(l||h)&&(this.tickMarkLength[f+2]=this.getTickMarkLength(r)),this.gridLineEnable[f]=r.showgrid,this.gridLineColor[f]=i(r.gridcolor),this.gridLineWidth[f]=r.gridwidth,this.zeroLineEnable[f]=r.zeroline,this.zeroLineColor[f]=i(r.zerolinecolor),this.zeroLineWidth[f]=r.zerolinewidth}},o.hasSharedAxis=function(t){var e=this.scene,r=e.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,t).indexOf(e.id)},o.hasAxisInDfltPos=function(t,e){var r=e.side;return"xaxis"===t?"bottom"===r:"yaxis"===t?"left"===r:void 0},o.hasAxisInAltrPos=function(t,e){var r=e.side;return"xaxis"===t?"top"===r:"yaxis"===t?"right"===r:void 0},o.getLabelPad=function(t,e){var r=1.5,n=e.title.font.size,i=e.showticklabels;return"xaxis"===t?"top"===e.side?n*(r+(i?1:0))-10:n*(r+(i?.5:0))-10:"yaxis"===t?"right"===e.side?10+n*(r+(i?1:.5)):10+n*(r+(i?.5:0)):void 0},o.getTickPad=function(t){return"outside"===t.ticks?10+t.ticklen:15},o.getTickMarkLength=function(t){if(!t.ticks)return 0;var e=t.ticklen;return"inside"===t.ticks?-e:e},t.exports=function(t){return new a(t)}},24585:function(t,e,r){"use strict";var n=r(13582).overrideAll,i=r(27672),a=r(6704),o=r(62972),s=r(54826),l=r(37703),c=r(6811),u=r(4173).KO;e.name="gl2d",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=s.idRegex,e.attrRegex=s.attrRegex,e.attributes=r(55126),e.supplyLayoutDefaults=function(t,e,r){e._has("cartesian")||l.supplyLayoutDefaults(t,e,r)},e.layoutAttrOverrides=n(l.layoutAttributes,"plot","from-root"),e.baseLayoutAttrOverrides=n({plot_bgcolor:a.plot_bgcolor,hoverlabel:c.hoverlabel},"plot","nested"),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots.gl2d,a=0;a<n.length;a++){var o=n[a],s=e._plots[o],l=u(r,"gl2d",o),c=s._scene2d;void 0===c&&(c=new i({id:o,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio},e),s._scene2d=c),c.plot(l,t.calcdata,e,t.layout)}},e.clean=function(t,e,r,n){for(var i=n._subplots.gl2d||[],a=0;a<i.length;a++){var o=i[a],s=n._plots[o];s._scene2d&&0===u(t,"gl2d",o).length&&(s._scene2d.destroy(),delete n._plots[o])}l.clean.apply(this,arguments)},e.drawFramework=function(t){t._context.staticPlot||l.drawFramework(t)},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++){var i=e._plots[r[n]]._scene2d,a=i.toImage("png");e._glimages.append("svg:image").attr({xmlns:o.svg,"xlink:href":a,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),i.destroy()}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.gl2d,n=0;n<r.length;n++)e._plots[r[n]]._scene2d.updateFx(e.dragmode)}},27672:function(t,e,r){"use strict";var n,i,a=r(33626),o=r(29714),s=r(32141),l=r(99098).gl_plot2d,c=r(99098).gl_spikes2d,u=r(99098).gl_select_box,h=r(22248),f=r(10749),p=r(77055),d=r(97464),m=r(84391),g=m.enforce,y=m.clean,v=r(32919).doAutoRange,x=r(70414),_=x.drawMode,b=x.selectMode,w=["xaxis","yaxis"],T=r(54826).SUBPLOT_PATTERN;function k(t,e){this.container=t.container,this.graphDiv=t.graphDiv,this.pixelRatio=t.plotGlPixelRatio||window.devicePixelRatio,this.id=t.id,this.staticPlot=!!t.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(e),this.makeFramework(),this.stopped||(this.glplotOptions=f(this),this.glplotOptions.merge(e),this.glplot=l(this.glplotOptions),this.camera=p(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}t.exports=k;var A=k.prototype;A.makeFramework=function(){if(this.staticPlot){if(!(i||(n=document.createElement("canvas"),i=h({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=n,this.gl=i}else{var t=this.container.querySelector(".gl-canvas-focus"),e=h({canvas:t,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!e)return d(this),void(this.stopped=!0);this.canvas=t,this.gl=e}var r=this.canvas;r.style.width="100%",r.style.height="100%",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style["pointer-events"]="none",this.updateSize(r);var a=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none";var o=this.mouseContainer=document.createElement("div");o.style.position="absolute",o.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var s=this.container;s.appendChild(a),s.appendChild(o);var l=this;o.addEventListener("mouseout",(function(){l.isMouseOver=!1,l.unhover()})),o.addEventListener("mouseover",(function(){l.isMouseOver=!0}))},A.toImage=function(t){t||(t="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.clearColor(1,1,1,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a);for(var o=0,s=i-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=a[4*(r*o+l)+c];a[4*(r*o+l)+c]=a[4*(r*s+l)+c],a[4*(r*s+l)+c]=u}var h=document.createElement("canvas");h.width=r,h.height=i;var f,p=h.getContext("2d",{willReadFrequently:!0}),d=p.createImageData(r,i);switch(d.data.set(a),p.putImageData(d,0,0),t){case"jpeg":f=h.toDataURL("image/jpeg");break;case"webp":f=h.toDataURL("image/webp");break;default:f=h.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(n),f},A.updateSize=function(t){t||(t=this.canvas);var e=this.pixelRatio,r=this.fullLayout,n=r.width,i=r.height,a=0|Math.ceil(e*n),o=0|Math.ceil(e*i);return t.width===a&&t.height===o||(t.width=a,t.height=o),t},A.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var t=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],e=0;e<2;++e)for(var r=0;r<t[e].length;++r)t[e][r].text=t[e][r].text+"";return t},A.updateRefs=function(t){this.fullLayout=t;var e=this.id.match(T),r="xaxis"+e[1],n="yaxis"+e[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},A.relayoutCallback=function(){var t=this.graphDiv,e=this.xaxis,r=this.yaxis,n=t.layout,i={},o=i[e._name+".range"]=e.range.slice(),s=i[r._name+".range"]=r.range.slice();i[e._name+".autorange"]=e.autorange,i[r._name+".autorange"]=r.autorange,a.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i);var l=n[e._name];l.range=o,l.autorange=e.autorange;var c=n[r._name];c.range=s,c.autorange=r.autorange,i.lastInputTime=this.camera.lastInputTime,t.emit("plotly_relayout",i)},A.cameraChanged=function(){var t=this.camera;this.glplot.setDataBox(this.calcDataBox());var e=this.computeTickMarks();(function(t,e){for(var r=0;r<2;++r){var n=t[r],i=e[r];if(n.length!==i.length)return!0;for(var a=0;a<n.length;++a)if(n[a].x!==i[a].x)return!0}return!1})(e,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=e,this.glplotOptions.dataBox=t.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},A.handleAnnotations=function(){for(var t=this.graphDiv,e=this.fullLayout.annotations,r=0;r<e.length;r++){var n=e[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&a.getComponentMethod("annotations","drawOne")(t,r)}},A.destroy=function(){if(this.glplot){var t=this.traces;t&&Object.keys(t).map((function(e){t[e].dispose(),delete t[e]})),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},A.plot=function(t,e,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(t,e),this.updateFx(r.dragmode);var i=r.width,a=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,i,a];var s={_fullLayout:{_axisConstraintGroups:r._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:r._size}};y(s,this.xaxis),y(s,this.yaxis);var l,c,u=r._size,h=this.xaxis.domain,f=this.yaxis.domain;for(o.viewBox=[u.l+h[0]*u.w,u.b+f[0]*u.h,i-u.r-(1-h[1])*u.w,a-u.t-(1-f[1])*u.h],this.mouseContainer.style.width=u.w*(h[1]-h[0])+"px",this.mouseContainer.style.height=u.h*(f[1]-f[0])+"px",this.mouseContainer.height=u.h*(f[1]-f[0]),this.mouseContainer.style.left=u.l+h[0]*u.w+"px",this.mouseContainer.style.top=u.t+(1-f[1])*u.h+"px",c=0;c<2;++c)(l=this[w[c]])._length=o.viewBox[c+2]-o.viewBox[c],v(this.graphDiv,l),l.setScale();g(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},A.calcDataBox=function(){var t=this.xaxis,e=this.yaxis,r=t.range,n=e.range,i=t.r2l,a=e.r2l;return[i(r[0]),a(n[0]),i(r[1]),a(n[1])]},A.setRanges=function(t){var e=this.xaxis,r=this.yaxis,n=e.l2r,i=r.l2r;e.range=[n(t[0]),n(t[2])],r.range=[i(t[1]),i(t[3])]},A.updateTraces=function(t,e){var r,n,i,a=Object.keys(this.traces);this.fullData=t;t:for(r=0;r<a.length;r++){var o=a[r],s=this.traces[o];for(n=0;n<t.length;n++)if((i=t[n]).uid===o&&i.type===s.type)continue t;s.dispose(),delete this.traces[o]}for(r=0;r<t.length;r++){i=t[r];var l=e[r],c=this.traces[i.uid];c?c.update(i,l):(c=i._module.plot(this,i,l),this.traces[i.uid]=c)}this.glplot.objects.sort((function(t,e){return t._trace.index-e._trace.index}))},A.updateFx=function(t){b(t)||_(t)?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),this.mouseContainer.style.cursor="pan"===t?"move":"zoom"===t?"crosshair":null},A.emitPointAction=function(t,e){for(var r,n=t.trace.uid,i=t.pointIndex,a=0;a<this.fullData.length;a++)this.fullData[a].uid===n&&(r=this.fullData[a]);var o={x:t.traceCoord[0],y:t.traceCoord[1],curveNumber:r.index,pointNumber:i,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,i),this.graphDiv.emit(e,{points:[o]})},A.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var t=this.glplot,e=this.camera,r=e.mouseListener,n=1===this.lastButtonState&&0===r.buttons,i=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var a,o=r.x*t.pixelRatio,l=this.canvas.height-t.pixelRatio*r.y;if(e.boxEnabled&&"zoom"===i.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(e.boxStart[0],e.boxEnd[0]),Math.min(e.boxStart[1],e.boxEnd[1]),Math.max(e.boxStart[0],e.boxEnd[0]),Math.max(e.boxStart[1],e.boxEnd[1])],u=0;u<2;u++)e.boxStart[u]===e.boxEnd[u]&&(c[u]=t.dataBox[u],c[u+2]=t.dataBox[u+2]);t.setDirty()}else if(!e.panning&&this.isMouseOver){this.selectBox.enabled=!1;var h=i._size,f=this.xaxis.domain,p=this.yaxis.domain,d=(a=t.pick(o/t.pixelRatio+h.l+f[0]*h.w,l/t.pixelRatio-(h.t+(1-p[1])*h.h)))&&a.object._trace.handlePick(a);if(d&&n&&this.emitPointAction(d,"plotly_click"),a&&"skip"!==a.object._trace.hoverinfo&&i.hovermode&&d&&(!this.lastPickResult||this.lastPickResult.traceUid!==d.trace.uid||this.lastPickResult.dataCoord[0]!==d.dataCoord[0]||this.lastPickResult.dataCoord[1]!==d.dataCoord[1])){var m=d;this.lastPickResult={traceUid:d.trace?d.trace.uid:null,dataCoord:d.dataCoord.slice()},this.spikes.update({center:a.dataCoord}),m.screenCoord=[((t.viewBox[2]-t.viewBox[0])*(a.dataCoord[0]-t.dataBox[0])/(t.dataBox[2]-t.dataBox[0])+t.viewBox[0])/t.pixelRatio,(this.canvas.height-(t.viewBox[3]-t.viewBox[1])*(a.dataCoord[1]-t.dataBox[1])/(t.dataBox[3]-t.dataBox[1])-t.viewBox[1])/t.pixelRatio],this.emitPointAction(d,"plotly_hover");var g=this.fullData[m.trace.index]||{},y=m.pointIndex,v=s.castHoverinfo(g,i,y);if(v&&"all"!==v){var x=v.split("+");-1===x.indexOf("x")&&(m.traceCoord[0]=void 0),-1===x.indexOf("y")&&(m.traceCoord[1]=void 0),-1===x.indexOf("z")&&(m.traceCoord[2]=void 0),-1===x.indexOf("text")&&(m.textLabel=void 0),-1===x.indexOf("name")&&(m.name=void 0)}s.loneHover({x:m.screenCoord[0],y:m.screenCoord[1],xLabel:this.hoverFormatter("xaxis",m.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",m.traceCoord[1]),zLabel:m.traceCoord[2],text:m.textLabel,name:m.name,color:s.castHoverOption(g,y,"bgcolor")||m.color,borderColor:s.castHoverOption(g,y,"bordercolor"),fontFamily:s.castHoverOption(g,y,"font.family"),fontSize:s.castHoverOption(g,y,"font.size"),fontColor:s.castHoverOption(g,y,"font.color"),nameLength:s.castHoverOption(g,y,"namelength"),textAlign:s.castHoverOption(g,y,"align")},{container:this.svgContainer,gd:this.graphDiv})}}a||this.unhover(),t.draw()}},A.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),s.loneUnhover(this.svgContainer))},A.hoverFormatter=function(t,e){if(void 0!==e){var r=this[t];return o.tickText(r,r.c2l(e),"hover").text}}},2487:function(t,e,r){"use strict";var n=r(13582).overrideAll,i=r(6811),a=r(20299),o=r(4173).KO,s=r(34809),l=r(62972),c="gl3d",u="scene";e.name=c,e.attr=u,e.idRoot=u,e.idRegex=e.attrRegex=s.counterRegex("scene"),e.attributes=r(22597),e.layoutAttributes=r(77168),e.baseLayoutAttrOverrides=n({hoverlabel:i.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=r(15250),e.plot=function(t){for(var e=t._fullLayout,r=t._fullData,n=e._subplots[c],i=0;i<n.length;i++){var s=n[i],l=o(r,c,s),u=e[s],h=u.camera,f=u._scene;f||(f=new a({id:s,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:h},e),u._scene=f),f.viewInitial||(f.viewInitial={up:{x:h.up.x,y:h.up.y,z:h.up.z},eye:{x:h.eye.x,y:h.eye.y,z:h.eye.z},center:{x:h.center.x,y:h.center.y,z:h.center.z}}),f.plot(l,e,t.layout)}},e.clean=function(t,e,r,n){for(var i=n._subplots[c]||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(".annotation-"+o).remove())}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots[c],n=e._size,i=0;i<r.length;i++){var a=e[r[i]],o=a.domain,s=a._scene,u=s.toImage("png");e._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":u,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"}),s.destroy()}},e.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var e=t.substr(5);return"1"===e&&(e=""),u+e}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[c],n=0;n<r.length;n++)e[r[n]]._scene.updateFx(e.dragmode,e.hovermode)}},22597:function(t){"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},63397:function(t,e,r){"use strict";var n=r(78766),i=r(25829),a=r(93049).extendFlat,o=r(13582).overrideAll;t.exports=o({visible:i.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:n.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:a({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:a({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:a({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth,_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},"plot","from-root")},34258:function(t,e,r){"use strict";var n=r(65657).mix,i=r(34809),a=r(78032),o=r(63397),s=r(4392),l=r(97655),c=["xaxis","yaxis","zaxis"];t.exports=function(t,e,r){var u,h;function f(t,e){return i.coerce(u,h,o,t,e)}for(var p=0;p<c.length;p++){var d=c[p];u=t[d]||{},(h=a.newContainer(e,d))._id=d[0]+r.scene,h._name=d,s(u,h,f,r),l(u,h,f,{font:r.font,letter:d[0],data:r.data,showGrid:!0,noAutotickangles:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),f("gridcolor",n(h.color,r.bgColor,72.72727272727273).toRgbString()),f("title.text",d[0]),h.setScale=i.noop,f("showspikes")&&(f("spikesides"),f("spikethickness"),f("spikecolor",h.color)),f("showaxeslabels"),f("showbackground")&&f("backgroundcolor")}}},95701:function(t,e,r){"use strict";var n=r(55010),i=r(34809),a=["xaxis","yaxis","zaxis"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(t,e){for(var r=this,o=0;o<3;++o){var s=e[a[o]];s.visible?(r.labels[o]=t._meta?i.templateString(s.title.text,t._meta):s.title.text,"font"in s.title&&(s.title.font.color&&(r.labelColor[o]=n(s.title.font.color)),s.title.font.family&&(r.labelFont[o]=s.title.font.family),s.title.font.size&&(r.labelSize[o]=s.title.font.size),s.title.font.weight&&(r.labelFontWeight[o]=s.title.font.weight),s.title.font.style&&(r.labelFontStyle[o]=s.title.font.style),s.title.font.variant&&(r.labelFontVariant[o]=s.title.font.variant)),"showline"in s&&(r.lineEnable[o]=s.showline),"linecolor"in s&&(r.lineColor[o]=n(s.linecolor)),"linewidth"in s&&(r.lineWidth[o]=s.linewidth),"showgrid"in s&&(r.gridEnable[o]=s.showgrid),"gridcolor"in s&&(r.gridColor[o]=n(s.gridcolor)),"gridwidth"in s&&(r.gridWidth[o]=s.gridwidth),"log"===s.type?r.zeroEnable[o]=!1:"zeroline"in s&&(r.zeroEnable[o]=s.zeroline),"zerolinecolor"in s&&(r.zeroLineColor[o]=n(s.zerolinecolor)),"zerolinewidth"in s&&(r.zeroLineWidth[o]=s.zerolinewidth),"ticks"in s&&s.ticks?r.lineTickEnable[o]=!0:r.lineTickEnable[o]=!1,"ticklen"in s&&(r.lineTickLength[o]=r._defaultLineTickLength[o]=s.ticklen),"tickcolor"in s&&(r.lineTickColor[o]=n(s.tickcolor)),"tickwidth"in s&&(r.lineTickWidth[o]=s.tickwidth),"tickangle"in s&&(r.tickAngle[o]="auto"===s.tickangle?-3600:Math.PI*-s.tickangle/180),"showticklabels"in s&&(r.tickEnable[o]=s.showticklabels),"tickfont"in s&&(s.tickfont.color&&(r.tickColor[o]=n(s.tickfont.color)),s.tickfont.family&&(r.tickFont[o]=s.tickfont.family),s.tickfont.size&&(r.tickSize[o]=s.tickfont.size),s.tickfont.weight&&(r.tickFontWeight[o]=s.tickfont.weight),s.tickfont.style&&(r.tickFontStyle[o]=s.tickfont.style),s.tickfont.variant&&(r.tickFontVariant[o]=s.tickfont.variant)),"mirror"in s?-1!==["ticks","all","allticks"].indexOf(s.mirror)?(r.lineTickMirror[o]=!0,r.lineMirror[o]=!0):!0===s.mirror?(r.lineTickMirror[o]=!1,r.lineMirror[o]=!0):(r.lineTickMirror[o]=!1,r.lineMirror[o]=!1):r.lineMirror[o]=!1,"showbackground"in s&&!1!==s.showbackground?(r.backgroundEnable[o]=!0,r.backgroundColor[o]=n(s.backgroundcolor)):r.backgroundEnable[o]=!1):(r.tickEnable[o]=!1,r.labelEnable[o]=!1,r.lineEnable[o]=!1,r.lineTickEnable[o]=!1,r.gridEnable[o]=!1,r.zeroEnable[o]=!1,r.backgroundEnable[o]=!1)}},t.exports=function(t,e){var r=new o;return r.merge(t,e),r}},15250:function(t,e,r){"use strict";var n=r(34809),i=r(78766),a=r(33626),o=r(4448),s=r(34258),l=r(77168),c=r(4173).KO,u="gl3d";function h(t,e,r,n){for(var o=r("bgcolor"),l=i.combine(o,n.paper_bgcolor),h=["up","center","eye"],f=0;f<h.length;f++)r("camera."+h[f]+".x"),r("camera."+h[f]+".y"),r("camera."+h[f]+".z");r("camera.projection.type");var p=!!r("aspectratio.x")&&!!r("aspectratio.y")&&!!r("aspectratio.z"),d=r("aspectmode",p?"manual":"auto");p||(t.aspectratio=e.aspectratio={x:1,y:1,z:1},"manual"===d&&(e.aspectmode="auto"),t.aspectmode=e.aspectmode);var m=c(n.fullData,u,n.id);s(t,e,{font:n.font,scene:n.id,data:m,bgColor:l,calendar:n.calendar,autotypenumbersDflt:n.autotypenumbersDflt,fullLayout:n.fullLayout}),a.getComponentMethod("annotations3d","handleDefaults")(t,e,n);var g=n.getDfltFromLayout("dragmode");if(!1!==g&&!g)if(g="orbit",t.camera&&t.camera.up){var y=t.camera.up.x,v=t.camera.up.y,x=t.camera.up.z;0!==x&&(y&&v&&x?x/Math.sqrt(y*y+v*v+x*x)>.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:u,attributes:l,handleDefaults:h,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},77168:function(t,e,r){"use strict";var n=r(63397),i=r(13792).u,a=r(93049).extendFlat,o=r(34809).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},64087:function(t,e,r){"use strict";var n=r(55010),i=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},t.exports=function(t){var e=new a;return e.merge(t),e}},32412:function(t,e,r){"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var h=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var f=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/f)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d<p.length;++d)p[d].x=p[d].x*t.dataScale[c],"date"===u.type&&(p[d].text=p[d].text.replace(/\<br\>/g," "));l[c]=p,u.tickmode=h}}for(e.ticks=l,c=0;c<3;++c)for(o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]),d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;a<n.length;++a)i[a]=n[a].x;e[r]=i}return e}(l)};var n=r(29714),i=r(34809),a=["xaxis","yaxis","zaxis"],o=[0,0,0]},25802:function(t){"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},20299:function(t,e,r){"use strict";var n,i,a=r(99098).gl_plot3d,o=a.createCamera,s=a.createScene,l=r(22248),c=r(74043),u=r(33626),h=r(34809),f=h.preserveDrawingBuffer(),p=r(29714),d=r(32141),m=r(55010),g=r(97464),y=r(25802),v=r(95701),x=r(64087),_=r(32412),b=r(32919).applyAutorangeOptions,w=!1;function T(t,e){var r=document.createElement("div"),n=t.container;this.graphDiv=t.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=t.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=e,this.id=t.id||"scene",this.fullSceneLayout=e[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(e,e[this.id]),this.spikeOptions=x(e[this.id]),this.container=r,this.staticMode=!!t.staticPlot,this.pixelRatio=this.pixelRatio||t.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var k=T.prototype;k.prepareOptions=function(){var t=this,e={canvas:t.canvas,gl:t.gl,glOptions:{preserveDrawingBuffer:f,premultipliedAlpha:!0,antialias:!0},container:t.container,axes:t.axesOptions,spikes:t.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t.camera,pixelRatio:t.pixelRatio};if(t.staticMode){if(!(i||(n=document.createElement("canvas"),i=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");e.gl=i,e.canvas=n}return e};var A=!0;k.tryCreatePlot=function(){var t=this,e=t.prepareOptions(),r=!0;try{t.glplot=s(e)}catch(n){if(t.staticMode||!A||f)r=!1;else{h.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{f=e.glOptions.preserveDrawingBuffer=!0,t.glplot=s(e)}catch(t){f=e.glOptions.preserveDrawingBuffer=!1,r=!1}}}return A=!1,r},k.initializeGLCamera=function(){var t=this,e=t.fullSceneLayout.camera,r="orthographic"===e.projection.type;t.camera=o(t.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.initializeGLPlot=function(){var t=this;if(t.initializeGLCamera(),!t.tryCreatePlot())return g(t);t.traces={},t.make4thDimension();var e=t.graphDiv,r=e.layout,n=function(){var e={};return t.isCameraChanged(r)&&(e[t.id+".camera"]=t.getCamera()),t.isAspectChanged(r)&&(e[t.id+".aspectratio"]=t.glplot.getAspectratio(),"manual"!==r[t.id].aspectmode&&(t.fullSceneLayout.aspectmode=r[t.id].aspectmode=e[t.id+".aspectmode"]="manual")),e},i=function(t){if(!1!==t.fullSceneLayout.dragmode){var e=n();t.saveLayout(r),t.graphDiv.emit("plotly_relayout",e)}};return t.glplot.canvas&&(t.glplot.canvas.addEventListener("mouseup",(function(){i(t)})),t.glplot.canvas.addEventListener("touchstart",(function(){w=!0})),t.glplot.canvas.addEventListener("wheel",(function(r){if(e._context._scrollZoom.gl3d){if(t.camera._ortho){var n=r.deltaX>r.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},k.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),_(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,f=e.glplot.selection,m=0;m<c.length;++m)"skip"!==(t=e.traces[c[m]]).data.hoverinfo&&t.handlePick(f)&&(u=t),t.setContourLevels&&t.setContourLevels();function g(t,r,n){var i=e.fullSceneLayout[t+"axis"];return"log"!==i.type&&(r=i.d2l(r)),p.hoverLabelText(i,r,n)}if(null!==u){var v=y(e.glplot.cameraParams,f.dataCoordinate);t=u.data;var x,b=r._fullData[t.index],T=f.index,k={xLabel:g("x",f.traceCoordinate[0],t.xhoverformat),yLabel:g("y",f.traceCoordinate[1],t.yhoverformat),zLabel:g("z",f.traceCoordinate[2],t.zhoverformat)},A=d.castHoverinfo(b,e.fullLayout,T),M=(A||"").split("+"),S=A&&"all"===A;b.hovertemplate||S||(-1===M.indexOf("x")&&(k.xLabel=void 0),-1===M.indexOf("y")&&(k.yLabel=void 0),-1===M.indexOf("z")&&(k.zLabel=void 0),-1===M.indexOf("text")&&(f.textLabel=void 0),-1===M.indexOf("name")&&(u.name=void 0));var E=[];"cone"===t.type||"streamtube"===t.type?(k.uLabel=g("x",f.traceCoordinate[3],t.uhoverformat),(S||-1!==M.indexOf("u"))&&E.push("u: "+k.uLabel),k.vLabel=g("y",f.traceCoordinate[4],t.vhoverformat),(S||-1!==M.indexOf("v"))&&E.push("v: "+k.vLabel),k.wLabel=g("z",f.traceCoordinate[5],t.whoverformat),(S||-1!==M.indexOf("w"))&&E.push("w: "+k.wLabel),k.normLabel=f.traceCoordinate[6].toPrecision(3),(S||-1!==M.indexOf("norm"))&&E.push("norm: "+k.normLabel),"streamtube"===t.type&&(k.divergenceLabel=f.traceCoordinate[7].toPrecision(3),(S||-1!==M.indexOf("divergence"))&&E.push("divergence: "+k.divergenceLabel)),f.textLabel&&E.push(f.textLabel),x=E.join("<br>")):"isosurface"===t.type||"volume"===t.type?(k.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),t.valuehoverformat),E.push("value: "+k.valueLabel),f.textLabel&&E.push(f.textLabel),x=E.join("<br>")):x=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:T};d.appendArrayPointValue(C,b,T),t._module.eventData&&(C=b._module.eventData(C,f,b,{},T));var L={points:[C]};if(e.fullSceneLayout.hovermode){var I=[];d.loneHover({trace:b,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:k.xLabel,yLabel:k.yLabel,zLabel:k.zLabel,text:x,name:u.name,color:d.castHoverOption(b,T,"bgcolor")||u.color,borderColor:d.castHoverOption(b,T,"bordercolor"),fontFamily:d.castHoverOption(b,T,"font.family"),fontSize:d.castHoverOption(b,T,"font.size"),fontColor:d.castHoverOption(b,T,"font.color"),nameLength:d.castHoverOption(b,T,"namelength"),textAlign:d.castHoverOption(b,T,"align"),hovertemplate:h.castOption(b,T,"hovertemplate"),hovertemplateLabels:h.extendFlat({},C,k),eventData:[C]},{container:n,gd:r,inOut_bbox:I}),C.bbox=I[0]}f.distance<5&&(f.buttons||w)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},k.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):h.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var M=["xaxis","yaxis","zaxis"];function S(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=M[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+"calendar"],u=e["_"+o+"length"];if(h.isArrayOrTypedArray(l))for(var f,p=0;p<(u||l.length);p++)if(h.isArrayOrTypedArray(l[p]))for(var d=0;d<l[p].length;++d)f=s.d2l(l[p][d],0,c),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f));else f=s.d2l(l[p],0,c),!isNaN(f)&&isFinite(f)&&(r[0][i]=Math.min(r[0][i],f),r[1][i]=Math.max(r[1][i],f));else r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],u-1)}}k.plot=function(t,e,r){var n=this;if(n.plotArgs=[t,e,r],!n.glplot.contextLost){var i,a,o,s,l,c,u=e[n.id],h=r[n.id];n.fullLayout=e,n.fullSceneLayout=u,n.axesOptions.merge(e,u),n.spikeOptions.merge(u),n.setViewport(u),n.updateFx(u.dragmode,u.hovermode),n.camera.enableWheel=n.graphDiv._context._scrollZoom.gl3d,n.glplot.setClearColor(m(u.bgcolor)),n.setConvert(l),t?Array.isArray(t)||(t=[t]):t=[];var f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(o=0;o<t.length;++o)!0===(i=t[o]).visible&&0!==i._length&&S(this,i,f);!function(t,e){for(var r=t.fullSceneLayout,n=r.annotations||[],i=0;i<3;i++)for(var a=M[i],o=a.charAt(0),s=r[a],l=0;l<n.length;l++){var c=n[l];if(c.visible){var u=s.r2l(c[o]);!isNaN(u)&&isFinite(u)&&(e[0][i]=Math.min(e[0][i],u),e[1][i]=Math.max(e[1][i],u))}}}(this,f);var p=[1,1,1];for(s=0;s<3;++s)f[1][s]===f[0][s]?p[s]=1:p[s]=1/(f[1][s]-f[0][s]);for(n.dataScale=p,n.convertAnnotations(this),o=0;o<t.length;++o)!0===(i=t[o]).visible&&0!==i._length&&((a=n.traces[i.uid])?a.data.type===i.type?a.update(i):(a.dispose(),a=i._module.plot(this,i),n.traces[i.uid]=a):(a=i._module.plot(this,i),n.traces[i.uid]=a),a.name=i.name);var d=Object.keys(n.traces);t:for(o=0;o<d.length;++o){for(s=0;s<t.length;++s)if(t[s].uid===d[o]&&!0===t[s].visible&&0!==t[s]._length)continue t;(a=n.traces[d[o]]).dispose(),delete n.traces[d[o]]}n.glplot.objects.sort((function(t,e){return t._trace.data.index-e._trace.data.index}));var g,y=[[0,0,0],[0,0,0]],v=[],x={};for(o=0;o<3;++o){var _;if((c=(l=u[M[o]]).type)in x?(x[c].acc*=p[o],x[c].count+=1):x[c]={acc:p[o],count:1},l.autorange){y[0][o]=1/0,y[1][o]=-1/0;var w=n.glplot.objects,T=n.fullSceneLayout.annotations||[],k=l._name.charAt(0);for(s=0;s<w.length;s++){var A=w[s],E=A.bounds,C=A._trace.data._pad||0;"ErrorBars"===A.constructor.name&&l._lowerLogErrorBound?y[0][o]=Math.min(y[0][o],l._lowerLogErrorBound):y[0][o]=Math.min(y[0][o],E[0][o]/p[o]-C),y[1][o]=Math.max(y[1][o],E[1][o]/p[o]+C)}for(s=0;s<T.length;s++){var L=T[s];if(L.visible){var I=l.r2l(L[k]);y[0][o]=Math.min(y[0][o],I),y[1][o]=Math.max(y[1][o],I)}}if("rangemode"in l&&"tozero"===l.rangemode&&(y[0][o]=Math.min(y[0][o],0),y[1][o]=Math.max(y[1][o],0)),y[0][o]>y[1][o])y[0][o]=-1,y[1][o]=1;else{var P=y[1][o]-y[0][o];y[0][o]-=P/32,y[1][o]+=P/32}if(_=[y[0][o],y[1][o]],_=b(_,l),y[0][o]=_[0],y[1][o]=_[1],l.isReversed()){var z=y[0][o];y[0][o]=y[1][o],y[1][o]=z}}else _=l.range,y[0][o]=l.r2l(_[0]),y[1][o]=l.r2l(_[1]);y[0][o]===y[1][o]&&(y[0][o]-=1,y[1][o]+=1),v[o]=y[1][o]-y[0][o],l.range=[y[0][o],y[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*p[o],max:l.range[1]*p[o]})}var O=u.aspectmode;if("cube"===O)g=[1,1,1];else if("manual"===O){var D=u.aspectratio;g=[D.x,D.y,D.z]}else{if("auto"!==O&&"data"!==O)throw new Error("scene.js aspectRatio was not one of the enumerated types");var R=[1,1,1];for(o=0;o<3;++o){var F=x[c=(l=u[M[o]]).type];R[o]=Math.pow(F.acc,1/F.count)/p[o]}g="data"===O||Math.max.apply(null,R)/Math.min.apply(null,R)<=4?R:[1,1,1]}u.aspectratio.x=h.aspectratio.x=g[0],u.aspectratio.y=h.aspectratio.y=g[1],u.aspectratio.z=h.aspectratio.z=g[2],n.glplot.setAspectratio(u.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=u.aspectmode);var B=u.domain||null,N=e._size||null;if(B&&N){var j=n.container.style;j.position="absolute",j.left=N.l+B.x[0]*N.w+"px",j.top=N.t+(1-B.y[1])*N.h+"px",j.width=N.w*(B.x[1]-B.x[0])+"px",j.height=N.h*(B.y[1]-B.y[0])+"px"}n.glplot.redraw()}},k.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},k.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},k.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},k.isCameraChanged=function(t){var e=this.getCamera(),r=h.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},k.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=h.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},k.saveLayout=function(t){var e,r,n,i,a,o,s=this,l=s.fullLayout,c=s.isCameraChanged(t),f=s.isAspectChanged(t),p=c||f;if(p){var d={};c&&(e=s.getCamera(),n=(r=h.nestedProperty(t,s.id+".camera")).get(),d[s.id+".camera"]=n),f&&(i=s.glplot.getAspectratio(),o=(a=h.nestedProperty(t,s.id+".aspectratio")).get(),d[s.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",t,l._preGUI,d),c&&(r.set(e),h.nestedProperty(l,s.id+".camera").set(e)),f&&(a.set(i),h.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},k.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,c=o.up.z;if(c/Math.sqrt(s*s+l*l+c*c)<.999){var f=r.id+".camera.up",p={x:0,y:0,z:1},d={};d[f]=p;var m=i.layout;u.call("_storeDirectGUIEdit",m,a._preGUI,d),o.up=p,h.nestedProperty(m,f).set(p)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},k.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(t,e,r){for(var n=0,i=r-1;n<i;++n,--i)for(var a=0;a<e;++a)for(var o=0;o<4;++o){var s=4*(e*n+a)+o,l=4*(e*i+a)+o,c=t[s];t[s]=t[l],t[l]=c}}(o,i,a),function(t,e,r){for(var n=0;n<r;++n)for(var i=0;i<e;++i){var a=4*(e*n+i),o=t[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,a);switch(u.data.set(o),c.putImageData(u,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},k.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[M[t]];p.setConvert(e,this.fullLayout),e.setScale=h.noop}},k.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(t._mockAxis,e)},t.exports=T},88239:function(t){"use strict";t.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a<n;a++)i[a]=[t[a],e[a],r[a]];return i}},6704:function(t,e,r){"use strict";var n=r(80337),i=r(49722),a=r(10229),o=r(64101),s=r(52307),l=r(57891),c=r(93049).extendFlat,u=n({editType:"calc"});u.family.dflt='"Open Sans", verdana, arial, sans-serif',u.size.dflt=12,u.color.dflt=a.defaultLine,t.exports={font:u,title:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:c(l({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:c({},i.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},8814:function(t,e,r){"use strict";var n=r(62994),i=r(37071),a="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",s="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",l={basic:s,streets:s,outdoors:s,light:a,dark:o,satellite:r(51962),"satellite-streets":i,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:'© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":a,"carto-darkmatter":o,"carto-voyager":s,"carto-positron-nolabels":"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json","carto-darkmatter-nolabels":"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json","carto-voyager-nolabels":"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json"},c=n(l);t.exports={styleValueDflt:"basic",stylesMap:l,styleValuesMap:c,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",c.join(", "),"or use a tile service."].join("\n"),mapOnErrorMsg:"Map error."}},4657:function(t,e,r){"use strict";var n=r(34809);t.exports=function(t,e){var r=t.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},34091:function(t,e,r){"use strict";var n=r(34809),i=n.strTranslate,a=n.strScale,o=r(4173).fX,s=r(62972),l=r(45568),c=r(62203),u=r(30635),h=r(38793),f="map";e.name=f,e.attr="subplot",e.idRoot=f,e.idRegex=e.attrRegex=n.counterRegex(f),e.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},e.layoutAttributes=r(8257),e.supplyLayoutDefaults=r(97446),e.plot=function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[f],a=0;a<i.length;a++){var s=i[a],l=o(r,f,s),c=e[s],u=c._subplot;u||(u=new h(t,s),e[s]._subplot=u),u.viewInitial||(u.viewInitial={center:n.extendFlat({},c.center),zoom:c.zoom,bearing:c.bearing,pitch:c.pitch}),u.plot(l,e,t._promises)}},e.clean=function(t,e,r,n){for(var i=n._subplots[f]||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots[f],n=e._size,o=0;o<r.length;o++){var h=e[r[o]],p=h.domain,d=h._subplot.toImage("png");e._glimages.append("svg:image").attr({xmlns:s.svg,"xlink:href":d,x:n.l+n.w*p.x[0],y:n.t+n.h*(1-p.y[1]),width:n.w*(p.x[1]-p.x[0]),height:n.h*(p.y[1]-p.y[0]),preserveAspectRatio:"none"});var m=l.select(h._subplot.div).select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),g=e._glimages.append("g"),y=g.append("text");y.text(m).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":m});var v=c.bBox(y.node()),x=n.w*(p.x[1]-p.x[0]);if(v.width>x/2){var _=m.split("|").join("<br>");y.text(_).attr("data-unformatted",_).call(u.convertToTspans,t),v=c.bBox(y.node())}y.attr("transform",i(-3,8-v.height)),g.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var b=1;v.width+6>x&&(b=x/(v.width+6));var w=[n.l+n.w*p.x[1],n.t+n.h*(1-p.y[0])];g.attr("transform",i(w[0],w[1])+a(b))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[f],n=0;n<r.length;n++)e[r[n]]._subplot.updateFx(e)}},33389:function(t,e,r){"use strict";var n=r(34809),i=r(30635).sanitizeHTML,a=r(4657),o=r(8814);function s(t,e){this.subplot=t,this.uid=t.uid+"-"+e,this.index=e,this.idSource="source-"+this.uid,this.idLayer=o.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function c(t){if(!t.visible)return!1;var e=t.source;if(Array.isArray(e)&&e.length>0){for(var r=0;r<e.length;r++)if("string"!=typeof e[r]||0===e[r].length)return!1;return!0}return n.isPlainObject(e)||"string"==typeof e&&e.length>0}function u(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution)),a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r<e.length;r++){var n=e[r].id;if("string"==typeof n&&0===n.indexOf(o.traceLayerPrefix)){t=n;break}}return t},l.updateLayer=function(t){var e=this.subplot,r=u(t),n=this.lookupBelow(),i=this.findFollowingMapLayerId(n);this.removeLayer(),c(t)&&e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type,minzoom:t.minzoom,maxzoom:t.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=t.type,this.below=n},l.updateStyle=function(t){if(c(t)){var e=u(t);this.subplot.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",e.paint)}},l.removeLayer=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer)},l.dispose=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer),t.getSource(this.idSource)&&t.removeSource(this.idSource)},t.exports=function(t,e,r){var n=new s(t,e);return n.update(r),n}},8257:function(t,e,r){"use strict";var n=r(34809),i=r(78766).defaultLine,a=r(13792).u,o=r(80337),s=r(36640).textposition,l=r(13582).overrideAll,c=r(78032).templatedArray,u=r(8814),h=o({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});h.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=l({_arrayAttrRegexps:[n.counterRegex("map",".layers",!0)],domain:a({name:"map"}),style:{valType:"any",values:u.styleValuesMap,dflt:u.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:c("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:h,textposition:n.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},97446:function(t,e,r){"use strict";var n=r(34809),i=r(4448),a=r(59008),o=r(8257);function s(t,e,r){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var n=r("bounds.west"),i=r("bounds.east"),o=r("bounds.south"),s=r("bounds.north");void 0!==n&&void 0!==i&&void 0!==o&&void 0!==s||delete e.bounds,a(t,e,{name:"layers",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r("visible")){var i,a=r("sourcetype"),s="raster"===a||"image"===a;r("source"),r("sourceattribution"),"vector"===a&&r("sourcelayer"),"image"===a&&r("coordinates"),s&&(i="raster");var l=r("type",i);s&&"raster"!==l&&(l=e.type="raster",n.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),"circle"===l&&r("circle.radius"),"line"===l&&(r("line.width"),r("line.dash")),"fill"===l&&r("fill.outlinecolor"),"symbol"===l&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),n.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}t.exports=function(t,e,r){i(t,e,r,{type:"map",attributes:o,handleDefaults:s,partition:"y"})}},38793:function(t,e,r){"use strict";var n=r(89380),i=r(34809),a=r(3994),o=r(33626),s=r(29714),l=r(14751),c=r(32141),u=r(70414),h=u.drawMode,f=u.selectMode,p=r(44844).prepSelect,d=r(44844).clearOutline,m=r(44844).clearSelectionsCache,g=r(44844).selectOnClick,y=r(8814),v=r(33389);function x(t,e){this.id=e,this.gd=t;var r=t._fullLayout,n=t._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var _=x.prototype;_.plot=function(t,e,r){var n,i=this;n=i.map?new Promise((function(r,n){i.updateMap(t,e,r,n)})):new Promise((function(r,n){i.createMap(t,e,r,n)})),r.push(n)},_.createMap=function(t,e,r,i){var o=this,s=e[o.id],l=o.styleObj=w(s.style),c=s.bounds,u=c?[[c.west,c.south],[c.east,c.north]]:null,h=o.map=new n.Map({container:o.div,style:l.style,center:T(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:u,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0})),f={};h.on("styleimagemissing",(function(t){var e=t.id;if(!f[e]&&e.includes("-15")){f[e]=!0;var r=new Image(15,15);r.onload=function(){h.addImage(e,r)},r.crossOrigin="Anonymous",r.src="https://unpkg.com/maki@2.1.0/icons/"+e+".svg"}})),h.setTransformRequest((function(t){return{url:t=(t=(t=t.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold")).replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold")).replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular")}})),h._canvas.style.left="0px",h._canvas.style.top="0px",o.rejectOnError(i),o.isStatic||o.initFx(t,e);var p=[];p.push(new Promise((function(t){h.once("load",t)}))),p=p.concat(a.fetchTraceGeoData(t)),Promise.all(p).then((function(){o.fillBelowLookup(t,e),o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)})).catch(i)},_.updateMap=function(t,e,r,n){var i=this,o=i.map,s=e[this.id];i.rejectOnError(n);var l=[],c=w(s.style);JSON.stringify(i.styleObj)!==JSON.stringify(c)&&(i.styleObj=c,o.setStyle(c.style),i.traceHash={},l.push(new Promise((function(t){o.once("styledata",t)})))),l=l.concat(a.fetchTraceGeoData(t)),Promise.all(l).then((function(){i.fillBelowLookup(t,e),i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})).catch(n)},_.fillBelowLookup=function(t,e){var r,n,i=e[this.id].layers,a=this.belowLookup={},o=!1;for(r=0;r<t.length;r++){var s=t[r][0].trace,l=s._module;"string"==typeof s.below?n=s.below:l.getBelow&&(n=l.getBelow(s,this)),""===n&&(o=!0),a["trace-"+s.uid]=n||""}for(r=0;r<i.length;r++){var c=i[r];n="string"==typeof c.below?c.below:o?"traces":"",a["layout-"+r]=n}var u,h,f={};for(u in a)f[n=a[u]]?f[n].push(u):f[n]=[u];for(n in f){var p=f[n];if(p.length>1)for(r=0;r<p.length;r++)0===(u=p[r]).indexOf("trace-")?(h=u.split("trace-")[1],this.traceHash[h]&&(this.traceHash[h].below=null)):0===u.indexOf("layout-")&&(h=u.split("layout-")[1],this.layerList[h]&&(this.layerList[h].below=null))}};var b={choroplethmap:0,densitymap:1,scattermap:2};function w(t){var e={};return i.isPlainObject(t)?(e.id=t.id,e.style=t):"string"==typeof t?(e.id=t,y.stylesMap[t]?e.style=y.stylesMap[t]:e.style=t):(e.id=y.styleValueDflt,e.style=function(t){return y.styleUrlPrefix+t+"-"+y.styleUrlSuffix}(y.styleValueDflt)),e.transition={duration:0,delay:0},e}function T(t){return[t.lon,t.lat]}_.updateData=function(t){var e,r,n,i,a=this.traceHash,o=t.slice().sort((function(t,e){return b[t[0].trace.type]-b[e[0].trace.type]}));for(n=0;n<o.length;n++){var s=o[n],l=!1;(e=a[(r=s[0].trace).uid])&&(e.type===r.type?(e.update(s),l=!0):e.dispose()),!l&&r._module&&(a[r.uid]=r._module.plot(this,s))}var c=Object.keys(a);t:for(n=0;n<c.length;n++){var u=c[n];for(i=0;i<t.length;i++)if(u===(r=t[i][0].trace).uid)continue t;(e=a[u]).dispose(),delete a[u]}},_.updateLayout=function(t){var e=this.map,r=t[this.id];this.dragging||this.wheeling||(e.setCenter(T(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch)),this.updateLayers(t),this.updateFramework(t),this.updateFx(t),this.map.resize(),this.gd._context._scrollZoom.map?e.scrollZoom.enable():e.scrollZoom.disable()},_.resolveOnRender=function(t){var e=this.map;e.on("render",(function r(){e.loaded()&&(e.off("render",r),setTimeout(t,10))}))},_.rejectOnError=function(t){var e=this.map;function r(){t(new Error(y.mapOnErrorMsg))}e.once("error",r),e.once("style.error",r),e.once("source.error",r),e.once("tile.error",r),e.once("layer.error",r)},_.createFramework=function(t){var e=this,r=e.div=document.createElement("div");r.id=e.uid,r.style.position="absolute",e.container.appendChild(r),e.xaxis={_id:"x",c2p:function(t){return e.project(t).x}},e.yaxis={_id:"y",c2p:function(t){return e.project(t).y}},e.updateFramework(t),e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},s.setConvert(e.mockAxis,t)},_.initFx=function(t,e){var r=this,n=r.gd,i=r.map;function a(){c.loneUnhover(e._hoverlayer)}function s(){var t=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(t))}i.on("moveend",(function(t){if(r.map){var e=n._fullLayout;if(t.originalEvent||r.wheeling){var i=e[r.id];o.call("_storeDirectGUIEdit",n.layout,e._preGUI,r.getViewEdits(i));var a=r.getView();i._input.center=i.center=a.center,i._input.zoom=i.zoom=a.zoom,i._input.bearing=i.bearing=a.bearing,i._input.pitch=i.pitch=a.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(a))}t.originalEvent&&"mouseup"===t.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),e&&e._rehover&&e._rehover()}})),i.on("wheel",(function(){r.wheeling=!0})),i.on("mousemove",(function(t){var e=r.div.getBoundingClientRect(),a=[t.originalEvent.offsetX,t.originalEvent.offsetY];t.target.getBoundingClientRect=function(){return e},r.xaxis.p2c=function(){return i.unproject(a).lng},r.yaxis.p2c=function(){return i.unproject(a).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&c.hover(n,t,r.id)},c.hover(n,t,r.id),n._fullLayout._hoversubplot=r.id})),i.on("dragstart",(function(){r.dragging=!0,a()})),i.on("zoomstart",a),i.on("mouseout",(function(){n._fullLayout._hoversubplot=null})),i.on("drag",s),i.on("zoom",s),i.on("dblclick",(function(){var t=n._fullLayout[r.id];o.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(t));var e=r.viewInitial;i.setCenter(T(e.center)),i.setZoom(e.zoom),i.setBearing(e.bearing),i.setPitch(e.pitch);var a=r.getView();t._input.center=t.center=a.center,t._input.zoom=t.zoom=a.zoom,t._input.bearing=t.bearing=a.bearing,t._input.pitch=t.pitch=a.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(a))})),r.clearOutline=function(){m(r.dragOptions),d(r.dragOptions.gd)},r.onClickInPanFn=function(t){return function(e){var i=n._fullLayout.clickmode;i.indexOf("select")>-1&&g(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),f(o)||h(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){p(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e<n.length;e++)n[e].dispose();for(n=this.layerList=[],e=0;e<r.length;e++)n.push(v(this,e,r[e]))}else for(e=0;e<r.length;e++)n[e].update(r[e])},_.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},_.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},_.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},_.getMapLayers=function(){return this.map.getStyle().layers},_.addLayer=function(t,e){var r=this.map;if("string"==typeof e){if(""===e)return void r.addLayer(t,e);for(var n=this.getMapLayers(),a=0;a<n.length;a++)if(e===n[a].id)return void r.addLayer(t,e);i.warn(["Trying to add layer with *below* value",e,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(t)},_.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},_.getView=function(){var t=this.map,e=t.getCenter(),r={lon:e.lng,lat:e.lat},n=t.getCanvas(),i=parseInt(n.style.width),a=parseInt(n.style.height);return{center:r,zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch(),_derived:{coordinates:[t.unproject([0,0]).toArray(),t.unproject([i,0]).toArray(),t.unproject([i,a]).toArray(),t.unproject([0,a]).toArray()]}}},_.getViewEdits=function(t){for(var e=this.id,r=["center","zoom","bearing","pitch"],n={},i=0;i<r.length;i++){var a=r[i];n[e+"."+a]=t[a]}return n},_.getViewEditsWithDerived=function(t){var e=this.id,r=this.getViewEdits(t);return r[e+"._derived"]=t._derived,r},t.exports=x},44245:function(t,e,r){"use strict";var n=r(62994),i="1.13.4",a='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',o=['© <a target="_blank" href="https://carto.com/">Carto</a>',a].join(" "),s=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},c=n(l);t.exports={requiredVersion:i,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:l,styleValuesNonMapbox:c,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+i+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",c.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},2178:function(t,e,r){"use strict";var n=r(34809);t.exports=function(t,e){var r=t.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},68192:function(t,e,r){"use strict";var n=r(32280),i=r(34809),a=i.strTranslate,o=i.strScale,s=r(4173).fX,l=r(62972),c=r(45568),u=r(62203),h=r(30635),f=r(5417),p="mapbox",d=e.constants=r(44245);e.name=p,e.attr="subplot",e.idRoot=p,e.idRegex=e.attrRegex=i.counterRegex(p);var m=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/javascript/maplibre-migration/"].join(" ");e.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},e.layoutAttributes=r(67514),e.supplyLayoutDefaults=r(86989);var g=!0;function y(t){return"string"==typeof t&&(-1!==d.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://")||0===t.indexOf("stamen"))}e.plot=function(t){g&&(g=!1,i.warn(m));var e=t._fullLayout,r=t.calcdata,a=e._subplots[p];if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],a=[],o=!1,s=!1,l=0;l<e.length;l++){var c=r[e[l]],u=c.accesstoken;y(c.style)&&(u?i.pushUnique(n,u):(y(c._input.style)&&(i.error("Uses Mapbox map style, but did not set an access token."),o=!0),s=!0)),u&&i.pushUnique(a,u)}if(s){var h=o?d.noAccessTokenErrorMsg:d.missingStyleErrorMsg;throw i.error(h),new Error(h)}return n.length?(n.length>1&&i.warn(d.multipleTokensErrorMsg),n[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,a);n.accessToken=o;for(var l=0;l<a.length;l++){var c=a[l],u=s(r,p,c),h=e[c],v=h._subplot;v||(v=new f(t,c),e[c]._subplot=v),v.viewInitial||(v.viewInitial={center:i.extendFlat({},h.center),zoom:h.zoom,bearing:h.bearing,pitch:h.pitch}),v.plot(u,e,t._promises)}},e.clean=function(t,e,r,n){for(var i=n._subplots[p]||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots[p],n=e._size,i=0;i<r.length;i++){var s=e[r[i]],f=s.domain,m=s._subplot.toImage("png");e._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":m,x:n.l+n.w*f.x[0],y:n.t+n.h*(1-f.y[1]),width:n.w*(f.x[1]-f.x[0]),height:n.h*(f.y[1]-f.y[0]),preserveAspectRatio:"none"});var g=c.select(s._subplot.div);if(null!==g.select(".mapboxgl-ctrl-logo").node().offsetParent){var y=e._glimages.append("g");y.attr("transform",a(n.l+n.w*f.x[0]+10,n.t+n.h*(1-f.y[0])-31)),y.append("path").attr("d",d.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),y.append("path").attr("d",d.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),y.append("path").attr("d",d.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),y.append("polygon").attr("points",d.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var v=g.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),x=e._glimages.append("g"),_=x.append("text");_.text(v).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":v});var b=u.bBox(_.node()),w=n.w*(f.x[1]-f.x[0]);if(b.width>w/2){var T=v.split("|").join("<br>");_.text(T).attr("data-unformatted",T).call(h.convertToTspans,t),b=u.bBox(_.node())}_.attr("transform",a(-3,8-b.height)),x.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;b.width+6>w&&(k=w/(b.width+6));var A=[n.l+n.w*f.x[1],n.t+n.h*(1-f.y[0])];x.attr("transform",a(A[0],A[1])+o(k))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[p],n=0;n<r.length;n++)e[r[n]]._subplot.updateFx(e)}},51276:function(t,e,r){"use strict";var n=r(34809),i=r(30635).sanitizeHTML,a=r(2178),o=r(44245);function s(t,e){this.subplot=t,this.uid=t.uid+"-"+e,this.index=e,this.idSource="source-"+this.uid,this.idLayer=o.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function c(t){if(!t.visible)return!1;var e=t.source;if(Array.isArray(e)&&e.length>0){for(var r=0;r<e.length;r++)if("string"!=typeof e[r]||0===e[r].length)return!1;return!0}return n.isPlainObject(e)||"string"==typeof e&&e.length>0}function u(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution)),a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r<e.length;r++){var n=e[r].id;if("string"==typeof n&&0===n.indexOf(o.traceLayerPrefix)){t=n;break}}return t},l.updateLayer=function(t){var e=this.subplot,r=u(t),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),c(t)&&e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type,minzoom:t.minzoom,maxzoom:t.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=t.type,this.below=n},l.updateStyle=function(t){if(c(t)){var e=u(t);this.subplot.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",e.paint)}},l.removeLayer=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer)},l.dispose=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer),t.getSource(this.idSource)&&t.removeSource(this.idSource)},t.exports=function(t,e,r){var n=new s(t,e);return n.update(r),n}},67514:function(t,e,r){"use strict";var n=r(34809),i=r(78766).defaultLine,a=r(13792).u,o=r(80337),s=r(36640).textposition,l=r(13582).overrideAll,c=r(78032).templatedArray,u=r(44245),h=o({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});h.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=l({_arrayAttrRegexps:[n.counterRegex("mapbox",".layers",!0)],domain:a({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:u.styleValuesMapbox.concat(u.styleValuesNonMapbox),dflt:u.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:c("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:h,textposition:n.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},86989:function(t,e,r){"use strict";var n=r(34809),i=r(4448),a=r(59008),o=r(67514);function s(t,e,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),c=r("bounds.north");void 0!==i&&void 0!==o&&void 0!==s&&void 0!==c||delete e.bounds,a(t,e,{name:"layers",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r("visible")){var i,a=r("sourcetype"),s="raster"===a||"image"===a;r("source"),r("sourceattribution"),"vector"===a&&r("sourcelayer"),"image"===a&&r("coordinates"),s&&(i="raster");var l=r("type",i);s&&"raster"!==l&&(l=e.type="raster",n.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),"circle"===l&&r("circle.radius"),"line"===l&&(r("line.width"),r("line.dash")),"fill"===l&&r("fill.outlinecolor"),"symbol"===l&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),n.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}t.exports=function(t,e,r){i(t,e,r,{type:"mapbox",attributes:o,handleDefaults:s,partition:"y",accessToken:e._mapboxAccessToken})}},5417:function(t,e,r){"use strict";var n=r(32280),i=r(34809),a=r(3994),o=r(33626),s=r(29714),l=r(14751),c=r(32141),u=r(70414),h=u.drawMode,f=u.selectMode,p=r(44844).prepSelect,d=r(44844).clearOutline,m=r(44844).clearSelectionsCache,g=r(44844).selectOnClick,y=r(44245),v=r(51276);function x(t,e){this.id=e,this.gd=t;var r=t._fullLayout,n=t._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var _=x.prototype;_.plot=function(t,e,r){var n,i=this,a=e[i.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]),n=i.map?new Promise((function(r,n){i.updateMap(t,e,r,n)})):new Promise((function(r,n){i.createMap(t,e,r,n)})),r.push(n)},_.createMap=function(t,e,r,i){var o=this,s=e[o.id],l=o.styleObj=w(s.style,e);o.accessToken=s.accesstoken;var c=s.bounds,u=c?[[c.west,c.south],[c.east,c.north]]:null,h=o.map=new n.Map({container:o.div,style:l.style,center:k(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:u,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0}));h._canvas.style.left="0px",h._canvas.style.top="0px",o.rejectOnError(i),o.isStatic||o.initFx(t,e);var f=[];f.push(new Promise((function(t){h.once("load",t)}))),f=f.concat(a.fetchTraceGeoData(t)),Promise.all(f).then((function(){o.fillBelowLookup(t,e),o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)})).catch(i)},_.updateMap=function(t,e,r,n){var i=this,o=i.map,s=e[this.id];i.rejectOnError(n);var l=[],c=w(s.style,e);JSON.stringify(i.styleObj)!==JSON.stringify(c)&&(i.styleObj=c,o.setStyle(c.style),i.traceHash={},l.push(new Promise((function(t){o.once("styledata",t)})))),l=l.concat(a.fetchTraceGeoData(t)),Promise.all(l).then((function(){i.fillBelowLookup(t,e),i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})).catch(n)},_.fillBelowLookup=function(t,e){var r,n,i=e[this.id].layers,a=this.belowLookup={},o=!1;for(r=0;r<t.length;r++){var s=t[r][0].trace,l=s._module;"string"==typeof s.below?n=s.below:l.getBelow&&(n=l.getBelow(s,this)),""===n&&(o=!0),a["trace-"+s.uid]=n||""}for(r=0;r<i.length;r++){var c=i[r];n="string"==typeof c.below?c.below:o?"traces":"",a["layout-"+r]=n}var u,h,f={};for(u in a)f[n=a[u]]?f[n].push(u):f[n]=[u];for(n in f){var p=f[n];if(p.length>1)for(r=0;r<p.length;r++)0===(u=p[r]).indexOf("trace-")?(h=u.split("trace-")[1],this.traceHash[h]&&(this.traceHash[h].below=null)):0===u.indexOf("layout-")&&(h=u.split("layout-")[1],this.layerList[h]&&(this.layerList[h].below=null))}};var b={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function w(t,e){var r={};if(i.isPlainObject(t))r.id=t.id,r.style=t;else if("string"==typeof t)if(r.id=t,-1!==y.styleValuesMapbox.indexOf(t))r.style=T(t);else if(y.stylesNonMapbox[t]){r.style=y.stylesNonMapbox[t];var n=r.style.sources["plotly-"+t],a=n?n.tiles:void 0;a&&a[0]&&"?api_key="===a[0].slice(-9)&&(a[0]+=e._mapboxAccessToken)}else r.style=t;else r.id=y.styleValueDflt,r.style=T(y.styleValueDflt);return r.transition={duration:0,delay:0},r}function T(t){return y.styleUrlPrefix+t+"-"+y.styleUrlSuffix}function k(t){return[t.lon,t.lat]}_.updateData=function(t){var e,r,n,i,a=this.traceHash,o=t.slice().sort((function(t,e){return b[t[0].trace.type]-b[e[0].trace.type]}));for(n=0;n<o.length;n++){var s=o[n],l=!1;(e=a[(r=s[0].trace).uid])&&(e.type===r.type?(e.update(s),l=!0):e.dispose()),!l&&r._module&&(a[r.uid]=r._module.plot(this,s))}var c=Object.keys(a);t:for(n=0;n<c.length;n++){var u=c[n];for(i=0;i<t.length;i++)if(u===(r=t[i][0].trace).uid)continue t;(e=a[u]).dispose(),delete a[u]}},_.updateLayout=function(t){var e=this.map,r=t[this.id];this.dragging||this.wheeling||(e.setCenter(k(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch)),this.updateLayers(t),this.updateFramework(t),this.updateFx(t),this.map.resize(),this.gd._context._scrollZoom.mapbox?e.scrollZoom.enable():e.scrollZoom.disable()},_.resolveOnRender=function(t){var e=this.map;e.on("render",(function r(){e.loaded()&&(e.off("render",r),setTimeout(t,10))}))},_.rejectOnError=function(t){var e=this.map;function r(){t(new Error(y.mapOnErrorMsg))}e.once("error",r),e.once("style.error",r),e.once("source.error",r),e.once("tile.error",r),e.once("layer.error",r)},_.createFramework=function(t){var e=this,r=e.div=document.createElement("div");r.id=e.uid,r.style.position="absolute",e.container.appendChild(r),e.xaxis={_id:"x",c2p:function(t){return e.project(t).x}},e.yaxis={_id:"y",c2p:function(t){return e.project(t).y}},e.updateFramework(t),e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},s.setConvert(e.mockAxis,t)},_.initFx=function(t,e){var r=this,n=r.gd,i=r.map;function a(){c.loneUnhover(e._hoverlayer)}function s(){var t=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(t))}i.on("moveend",(function(t){if(r.map){var e=n._fullLayout;if(t.originalEvent||r.wheeling){var i=e[r.id];o.call("_storeDirectGUIEdit",n.layout,e._preGUI,r.getViewEdits(i));var a=r.getView();i._input.center=i.center=a.center,i._input.zoom=i.zoom=a.zoom,i._input.bearing=i.bearing=a.bearing,i._input.pitch=i.pitch=a.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(a))}t.originalEvent&&"mouseup"===t.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),e._rehover&&e._rehover()}})),i.on("wheel",(function(){r.wheeling=!0})),i.on("mousemove",(function(t){var e=r.div.getBoundingClientRect(),a=[t.originalEvent.offsetX,t.originalEvent.offsetY];t.target.getBoundingClientRect=function(){return e},r.xaxis.p2c=function(){return i.unproject(a).lng},r.yaxis.p2c=function(){return i.unproject(a).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&c.hover(n,t,r.id)},c.hover(n,t,r.id),n._fullLayout._hoversubplot=r.id})),i.on("dragstart",(function(){r.dragging=!0,a()})),i.on("zoomstart",a),i.on("mouseout",(function(){n._fullLayout._hoversubplot=null})),i.on("drag",s),i.on("zoom",s),i.on("dblclick",(function(){var t=n._fullLayout[r.id];o.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(t));var e=r.viewInitial;i.setCenter(k(e.center)),i.setZoom(e.zoom),i.setBearing(e.bearing),i.setPitch(e.pitch);var a=r.getView();t._input.center=t.center=a.center,t._input.zoom=t.zoom=a.zoom,t._input.bearing=t.bearing=a.bearing,t._input.pitch=t.pitch=a.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(a))})),r.clearOutline=function(){m(r.dragOptions),d(r.dragOptions.gd)},r.onClickInPanFn=function(t){return function(e){var i=n._fullLayout.clickmode;i.indexOf("select")>-1&&g(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),f(o)||h(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){p(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e<n.length;e++)n[e].dispose();for(n=this.layerList=[],e=0;e<r.length;e++)n.push(v(this,e,r[e]))}else for(e=0;e<r.length;e++)n[e].update(r[e])},_.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},_.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},_.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},_.getMapLayers=function(){return this.map.getStyle().layers},_.addLayer=function(t,e){var r=this.map;if("string"==typeof e){if(""===e)return void r.addLayer(t,e);for(var n=this.getMapLayers(),a=0;a<n.length;a++)if(e===n[a].id)return void r.addLayer(t,e);i.warn(["Trying to add layer with *below* value",e,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(t)},_.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},_.getView=function(){var t=this.map,e=t.getCenter(),r={lon:e.lng,lat:e.lat},n=t.getCanvas(),i=parseInt(n.style.width),a=parseInt(n.style.height);return{center:r,zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch(),_derived:{coordinates:[t.unproject([0,0]).toArray(),t.unproject([i,0]).toArray(),t.unproject([i,a]).toArray(),t.unproject([0,a]).toArray()]}}},_.getViewEdits=function(t){for(var e=this.id,r=["center","zoom","bearing","pitch"],n={},i=0;i<r.length;i++){var a=r[i];n[e+"."+a]=t[a]}return n},_.getViewEditsWithDerived=function(t){var e=this.id,r=this.getViewEdits(t);return r[e+"._derived"]=t._derived,r},t.exports=x},57891:function(t){"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},44122:function(t,e,r){"use strict";var n=r(45568),i=r(42696).de,a=r(36464).OE,o=r(10721),s=r(93229),l=r(33626),c=r(57297),u=r(78032),h=r(34809),f=r(78766),p=r(63821).BADNUM,d=r(5975),m=r(78534).clearOutline,g=r(26667),y=r(49722),v=r(58935),x=r(4173).eV,_=h.relinkPrivateKeys,b=h._,w=t.exports={};h.extendFlat(w,l),w.attributes=r(9829),w.attributes.type.values=w.allTypes,w.fontAttrs=r(80337),w.layoutAttributes=r(6704);var T=w.transformsRegistry,k=r(90251);w.executeAPICommand=k.executeAPICommand,w.computeAPICommandBindings=k.computeAPICommandBindings,w.manageCommandObserver=k.manageCommandObserver,w.hasSimpleAPICommandBindings=k.hasSimpleAPICommandBindings,w.redrawText=function(t){return t=h.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(w.previousPromises(t)))}),300)}))},w.resize=function(t){var e;t=h.getGraphDiv(t);var r=new Promise((function(r,n){t&&!h.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||h.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},w.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},w.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=h.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:f.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),a={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){w.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var A=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],M=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var s=t._context.locales,c=0;c<2;c++){var u=(s[r]||{}).format;if(u&&(a(u),n))break;s=l.localeRegistry}var h=r.split("-")[0];if(n||h===r)break;r=h}return n||a(l.localeRegistry.en.format),i}function E(t,e){var r={_fullLayout:e},n="x"===t._id.charAt(0),i=t._mainAxis._anchorAxis,a="",o="",s="";if(i&&(s=i._mainAxis._id,a=n?t._id+s:s+t._id),!a||!e._plots[a]){a="";for(var l=t._counterAxes,c=0;c<l.length;c++){var u=l[c],h=n?t._id+u:u+t._id;o||(o=h);var f=d.getFromId(r,u);if(s&&f.overlaying===s){a=h;break}}}return a||o}function C(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var n=e[r],i=n._module||T[n.type];if(i&&i.makesData)return!0}return!1}function L(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=T[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function I(t){return"string"==typeof t&&"px"===t.substr(t.length-2)&&parseFloat(t)}function P(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={}),t._reservedMargin||(t._reservedMargin={})}w.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,n=t._fullLayout||{};if(n._skipDefaults)delete n._skipDefaults;else{var o,s=t._fullLayout={},c=t.layout||{},u=t._fullData||[],f=t._fullData=[],p=t.data||[],d=t.calcdata||[],g=t._context||{};t._transitionData||w.createTransitionData(t),s._dfltTitle={plot:b(t,"Click to enter Plot title"),subtitle:b(t,"Click to enter Plot subtitle"),x:b(t,"Click to enter X axis title"),y:b(t,"Click to enter Y axis title"),colorbar:b(t,"Click to enter Colorscale title"),annotation:b(t,"new text")},s._traceWord=b(t,"trace");var y=S(t,A);if(s._mapboxAccessToken=g.mapboxAccessToken,n._initialAutoSizeIsDone){var v=n.width,x=n.height;w.supplyLayoutGlobalDefaults(c,s,y),c.width||(s.width=v),c.height||(s.height=x),w.sanitizeMargins(s)}else{w.supplyLayoutGlobalDefaults(c,s,y);var T=!c.width||!c.height,k=s.autosize,E=g.autosizable;T&&(k||E)?w.plotAutoSize(t,c,s):T&&w.sanitizeMargins(s),!k&&T&&(c.width=s.width,c.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(e){try{e=a(t).format(h.adjustFormat(e))}catch(t){return h.warnBadFormat(e),h.noFormat}return e},timeFormat:i(t).utcFormat}}(y,s.separators),s._extraFormat=S(t,M),s._initialAutoSizeIsDone=!0,s._dataLength=p.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var C=s._subplots=function(){var t,e,r=l.collectableSubplotTypes,n={};if(!r){r=[];var i=l.subplotsRegistry;for(var a in i){var o=i[a].attr;if(o&&(r.push(a),Array.isArray(o)))for(e=0;e<o.length;e++)h.pushUnique(r,o[e])}}for(t=0;t<r.length;t++)n[r[t]]=[];return n}(),L=s._splomAxes={x:{},y:{}},I=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._alignmentOpts={},s._colorAxes={},s._requestRangeslider={},s._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r]._fullInput;o!==n&&a.push(o),n=o}var s=a.length,l=new Array(i),c={};function u(t,e){l[e]=t,c[t]=1}function f(t,e){if(t&&"string"==typeof t&&!c[t])return u(t,e),!0}for(r=0;r<i;r++){var p=e[r].uid;"number"==typeof p&&(p=String(p)),f(p,r)||r<s&&f(a[r].uid,r)||u(h.randstr(c),r)}return l}(u,p),s._globalTransforms=(t._context||{}).globalTransforms,w.supplyDataDefaults(p,f,c,s);var z=Object.keys(L.x),O=Object.keys(L.y);if(z.length>1&&O.length>1){for(l.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o<z.length;o++)h.pushUnique(C.xaxis,z[o]);for(o=0;o<O.length;o++)h.pushUnique(C.yaxis,O[o]);for(var D in I)h.pushUnique(C.cartesian,D)}if(s._has=w._hasPlotType.bind(s),u.length===f.length)for(o=0;o<f.length;o++)_(f[o],u[o]);w.supplyLayoutModuleDefaults(c,s,f,t._transitionData);var R=s._visibleModules,F=[];for(o=0;o<R.length;o++){var B=R[o].crossTraceDefaults;B&&h.pushUnique(F,B)}for(o=0;o<F.length;o++)F[o](f,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&z.length>15&&O.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(f,s,u,n),w.cleanPlot(f,s,u,n);var N=!(!n._has||!n._has("gl2d")),j=!(!s._has||!s._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||N,V=!(!s._has||!s._has("cartesian"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&m({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var a=t[i];a.meta?n[a.index]=a._meta={meta:a.meta}:e.meta&&(a._meta={meta:e.meta}),e.meta&&(a._meta.layout={meta:e.meta})}n.length&&(r||(r=e._meta={}),r.data=n)}(f,s),_(s,n),l.getComponentMethod("colorscale","crossTraceDefaults")(f,s),s._preGUI||(s._preGUI={}),s._tracePreGUI||(s._tracePreGUI={});var q,H=s._tracePreGUI,G={};for(q in H)G[q]="old";for(o=0;o<f.length;o++)G[q=f[o]._fullInput.uid]||(H[q]={}),G[q]="new";for(q in G)"old"===G[q]&&delete H[q];P(s),l.getComponentMethod("rangeslider","makeData")(s),r||d.length!==f.length||w.supplyDefaultsUpdateCalc(d,f)}},w.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=(t[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,l,c=a._arrayAttrs;for(o=0;o<c.length;o++)s=c[o],l=h.nestedProperty(a,s).get().slice(),h.nestedProperty(n,s).set(l)}i.trace=n}}},w.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},w._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var a=l.modules[i];if(a&&a.categories[t])return!0}return!1},w.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=n._has&&n._has("gl"),c=e._has&&e._has("gl");l&&!c&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var u=!!n._infolayer;t:for(i=0;i<r.length;i++){var h=r[i].uid;for(a=0;a<t.length;a++)if(h===t[a].uid)continue t;u&&n._infolayer.select(".cb"+h).remove()}},w.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},s=e._plots={},c=e._subplots,u={_fullData:t,_fullLayout:e},f=c.cartesian.concat(c.gl2d||[]);for(i=0;i<f.length;i++){var p,m=f[i],g=o[m],y=d.getFromId(u,m,"x"),v=d.getFromId(u,m,"y");for(g?p=s[m]=g:(p=s[m]={}).id=m,y._counterAxes.push(v._id),v._counterAxes.push(y._id),y._subplotsWith.push(m),v._subplotsWith.push(m),p.xaxis=y,p.yaxis=v,p._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var x=t[a];if(x.xaxis===p.xaxis._id&&x.yaxis===p.yaxis._id&&!1===x.cliponaxis){p._hasClipOnAxisFalse=!0;break}}}var _,b=d.list(u,null,!0);for(i=0;i<b.length;i++){var w=null;(_=b[i]).overlaying&&(w=d.getFromId(u,_.overlaying))&&w.overlaying&&(_.overlaying=!1,w=null),_._mainAxis=w||_,w&&(_.domain=w.domain.slice()),_._anchorAxis="free"===_.anchor?null:d.getFromId(u,_.anchor)}for(i=0;i<b.length;i++)if((_=b[i])._counterAxes.sort(d.idSort),_._subplotsWith.sort(h.subplotSort),_._mainSubplot=E(_,e),_._counterAxes.length&&(_.spikemode&&-1!==_.spikemode.indexOf("across")||_.automargin&&_.mirror&&"free"!==_.anchor||l.getComponentMethod("rangeslider","isVisible")(_))){var T=1,k=0;for(a=0;a<_._counterAxes.length;a++){var A=d.getFromId(u,_._counterAxes[a]);T=Math.min(T,A.domain[0]),k=Math.max(k,A.domain[1])}T<k&&(_._counterDomainMin=T,_._counterDomainMax=k)}},w.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],c.crawl(t._module.attributes,(function(t,n,i,a){r[a]=n,r.length=a+1,"color"===t.valType&&void 0===t.dflt&&e.push(r.join("."))}))),n=0;n<e.length;n++)h.nestedProperty(t,"_input."+e[n]).get()||h.nestedProperty(t,e[n]).set(null)},w.supplyDataDefaults=function(t,e,r,n){var i,a,o,s=n._modules,c=n._visibleModules,f=n._basePlotModules,p=0,d=0;function m(t){e.push(t);var r=t._module;r&&(h.pushUnique(s,r),!0===t.visible&&h.pushUnique(c,r),h.pushUnique(f,t._module.basePlotModule),p++,!1!==t._input.visible&&d++)}n._transformModules=[];var g={},y=[],v=(r.template||{}).data||{},x=u.traceTemplater(v);for(i=0;i<t.length;i++){if(o=t[i],(a=x.newTrace(o)).uid=n._traceUids[i],w.supplyTraceDefaults(o,a,d,n,i),a.index=i,a._input=o,a._expandedIndex=p,a.transforms&&a.transforms.length)for(var b=!1!==o.visible&&!1===a.visible,T=L(a,e,r,n),k=0;k<T.length;k++){var A=T[k],M={_template:a._template,type:a.type,uid:a.uid+k};b&&!1===A.visible&&delete A.visible,w.supplyTraceDefaults(A,M,p,n,i),_(M,A),M.index=i,M._input=o,M._fullInput=a,M._expandedIndex=p,M._expandedInput=A,m(M)}else a._fullInput=a,a._expandedInput=a,m(a);l.traceIs(a,"carpetAxis")&&(g[a.carpet]=a),l.traceIs(a,"carpetDependent")&&y.push(i)}for(i=0;i<y.length;i++)if((a=e[y[i]]).visible){var S=g[a.carpet];a._carpet=S,S&&S.visible?(a.xaxis=S.xaxis,a.yaxis=S.yaxis):a.visible=!1}},w.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return h.coerce(t||{},r,y,e,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=w.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=w.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=w.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=w.supplyAnimationTransitionDefaults(t.transition||{});return r},w.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return h.coerce(t||{},e,y.frame,r,n)}return r("duration"),r("redraw"),e},w.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return h.coerce(t||{},e,y.transition,r,n)}return r("duration"),r("easing"),e},w.supplyFrameDefaults=function(t){var e={};function r(r,n){return h.coerce(t,e,v,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e},w.supplyTraceDefaults=function(t,e,r,n,i){var a,o=n.colorway||f.defaults,s=o[r%o.length];function c(r,n){return h.coerce(t,e,w.attributes,r,n)}var u=c("visible");c("type"),c("name",n._traceWord+" "+i),c("uirevision",n.uirevision);var p=w.getModule(e);if(e._module=p,p){var d=p.basePlotModule,m=d.attr,g=d.attributes;if(m&&g){var y=n._subplots,v="";if(u||"gl2d"!==d.name){if(Array.isArray(m))for(a=0;a<m.length;a++){var x=m[a],_=h.coerce(t,e,g,x);y[x]&&h.pushUnique(y[x],_),v+=_}else v=h.coerce(t,e,g,m);y[d.name]&&h.pushUnique(y[d.name],v)}}}if(u){if(c("customdata"),c("ids"),c("meta"),l.traceIs(e,"showLegend")?(h.coerce(t,e,p.attributes.showlegend?p.attributes:w.attributes,"showlegend"),c("legend"),c("legendwidth"),c("legendgroup"),c("legendgrouptitle.text"),c("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,p&&p.supplyDefaults(t,e,s,n),l.traceIs(e,"noOpacity")||c("opacity"),l.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),l.traceIs(e,"noHover")||(e.hovertemplate||h.coerceHoverinfo(t,e,n),"parcats"!==e.type&&l.getComponentMethod("fx","supplyDefaults")(t,e,s,n)),p&&p.selectPoints){var b=c("selectedpoints");h.isTypedArray(b)&&(e.selectedpoints=Array.from(b))}w.supplyTransformDefaults(t,e,n)}return e},w.hasMakesDataTransform=C,w.supplyTransformDefaults=function(t,e,r){if(e._length||C(t)){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],l=0;l<o.length;l++){var c,u=o[l],f=u.type,p=T[f],d=!(u._module&&u._module===p),m=p&&"function"==typeof p.transform;p||h.warn("Unrecognized transform type "+f+"."),p&&p.supplyDefaults&&(d||m)?((c=p.supplyDefaults(u,e,r,t)).type=f,c._module=p,h.pushUnique(i,p)):c=h.extendFlat({},u),s.push(c)}}},w.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return h.coerce(t,e,w.layoutAttributes,r,n)}var i=t.template;h.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),n("autotypenumbers");var a=h.coerceFont(n,"font"),o=a.size;h.coerceFont(n,"title.font",a,{overrideDflt:{size:Math.round(1.4*o)}}),n("title.text",e._dfltTitle.plot),n("title.xref");var s=n("title.yref");n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l");var c=n("title.automargin");n("title.x"),n("title.xanchor"),n("title.y"),n("title.yanchor"),n("title.subtitle.text",e._dfltTitle.subtitle),h.coerceFont(n,"title.subtitle.font",a,{overrideDflt:{size:Math.round(.7*e.title.font.size)}}),c&&("paper"===s&&(0!==e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=0===e.title.y?"top":"bottom")),"container"===s&&("auto"===e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=e.title.y<.5?"bottom":"top"))),n("uniformtext.mode")&&n("uniformtext.minsize"),n("autosize",!(t.width&&t.height)),n("width"),n("height"),n("minreducedwidth"),n("minreducedheight"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),t.width&&t.height&&w.sanitizeMargins(e),l.getComponentMethod("grid","sizeDefaults")(t,e),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var u=n("uirevision");n("editrevision",u),n("selectionrevision",u),l.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),l.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,n),l.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,n),n("meta"),h.isPlainObject(t.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),l.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),l.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,n),h.coerce(t,e,g,"scattermode")},w.plotAutoSize=function(t,e,r){var n,i,a=t._context||{},s=a.frameMargins,l=h.isPlotDiv(t);if(l&&t.emit("plotly_autosize"),a.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else{var c=l?window.getComputedStyle(t):{};if(n=I(c.width)||I(c.maxWidth)||r.width,i=I(c.height)||I(c.maxHeight)||r.height,o(s)&&s>0){var u=1-2*s;n=Math.round(u*n),i=Math.round(u*i)}}var f=w.layoutAttributes.width.min,p=w.layoutAttributes.height.min;n<f&&(n=f),i<p&&(i=p);var d=!e.width&&Math.abs(r.width-n)>1,m=!e.height&&Math.abs(r.height-i)>1;(m||d)&&(d&&(r.width=n),m&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,s=l.componentsRegistry,c=e._basePlotModules,u=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var f in c.length||c.push(u),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),u.finalizeSubplots(t,e)),e._subplots)e._subplots[f].sort(h.subplotSort);for(a=0;a<c.length;a++)(o=c[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var p=e._modules;for(a=0;a<p.length;a++)(o=p[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var d=e._transformModules;for(a=0;a<d.length;a++)(o=d[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in s)(o=s[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},w.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),h.clearThrottle(),h.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},w.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&h.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},w.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},w.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},w.autoMargin=function(t,e,r){var n=t._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,c=h.constrain(i-o.l-o.r,2,s),u=h.constrain(a-o.t-o.b,2,l),f=Math.max(0,i-c),p=Math.max(0,a-u),d=n._pushmargin,m=n._pushmarginIds;if(!1!==o.autoexpand){if(r){var g=r.pad;if(void 0===g&&(g=Math.min(12,o.l,o.r,o.t,o.b)),f){var y=(r.l+r.r)/f;y>1&&(r.l/=y,r.r/=y)}if(p){var v=(r.t+r.b)/p;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,_=void 0!==r.xr?r.xr:r.x,b=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:x,size:r.l+g},r:{val:_,size:r.r+g},b:{val:T,size:r.b+g},t:{val:b,size:r.t+g}},m[e]=1}else delete d[e],delete m[e];if(!n._replotting)return w.doAutoMargin(t)}},w.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),P(e);var i=e._size,a=e.margin,s={t:0,b:0,l:0,r:0},c=h.extendFlat({},i),u=a.l,f=a.r,p=a.t,m=a.b,g=e._pushmargin,y=e._pushmarginIds,v=e.minreducedwidth,x=e.minreducedheight;if(!1!==a.autoexpand){for(var _ in g)y[_]||delete g[_];var b=t._fullLayout._reservedMargin;for(var T in b)for(var k in b[T]){var A=b[T][k];s[k]=Math.max(s[k],A)}for(var M in g.base={l:{val:0,size:u},r:{val:1,size:f},t:{val:1,size:p},b:{val:0,size:m}},s){var S=0;for(var E in g)"base"!==E&&o(g[E][M].size)&&(S=g[E][M].size>S?g[E][M].size:S);var C=Math.max(0,a[M]-S);s[M]=Math.max(0,s[M]-C)}for(var L in g){var I=g[L].l||{},z=g[L].b||{},O=I.val,D=I.size,R=z.val,F=z.size,B=r-s.r-s.l,N=n-s.t-s.b;for(var j in g){if(o(D)&&g[j].r){var U=g[j].r.val,V=g[j].r.size;if(U>O){var q=(D*U+(V-B)*O)/(U-O),H=(V*(1-O)+(D-B)*(1-U))/(U-O);q+H>u+f&&(u=q,f=H)}}if(o(F)&&g[j].t){var G=g[j].t.val,Z=g[j].t.size;if(G>R){var W=(F*G+(Z-N)*R)/(G-R),Y=(Z*(1-R)+(F-N)*(1-G))/(G-R);W+Y>m+p&&(m=W,p=Y)}}}}}var X=h.constrain(r-a.l-a.r,2,v),$=h.constrain(n-a.t-a.b,2,x),J=Math.max(0,r-X),K=Math.max(0,n-$);if(J){var Q=(u+f)/J;Q>1&&(u/=Q,f/=Q)}if(K){var tt=(m+p)/K;tt>1&&(m/=tt,p/=tt)}if(i.l=Math.round(u)+s.l,i.r=Math.round(f)+s.r,i.t=Math.round(p)+s.t,i.b=Math.round(m)+s.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(w.didMarginChange(c,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=d.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var et=3*(1+Object.keys(y).length);if(e._redrawFromAutoMarginCount<et)return l.call("_doPlot",t);e._size=c,h.warn("Too many auto-margin redraws.")}!function(t){var e=d.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach((function(t){for(var r=0;r<e.length;r++){var n=e[r][t];n&&n()}}))}(t)};var z=["l","r","t","b","p","w","h"];function O(t,e,r){var n=!1,i=[w.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},r.prepareFn,w.rehover,w.reselect,function(){return t.emit("plotly_transitioning",[]),new Promise((function(i){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function s(){return a++,function(){var e;o++,n||o!==a||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],a=h.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}w.didMarginChange=function(t,e){for(var r=0;r<z.length;r++){var n=z[r],i=t[n],a=e[n];if(!o(i)||Math.abs(a-i)>1)return!0}return!1},w.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&w.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,c=(t._transitionData||{})._frames;function u(t,e){if("function"==typeof t)return e?"_function_":null;if(h.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=u(t[a],e)}else e&&(i[a]="_function")})),i}var a=Array.isArray(t),o=h.isTypedArray(t);if((a||o)&&t.dtype&&t.shape){var l=t.bdata;return u({dtype:t.dtype,shape:t.shape,bdata:h.isArrayBuffer(l)?s.encode(l):l},e)}return a?t.map((function(t){return u(t,e)})):o?h.simpleMap(t,h.identity):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=u(l),i)){var p=l._size;f.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return c&&(f.frames=u(c)),a&&(f.config=u(t._context,!0)),"object"===n?f:JSON.stringify(f)},w.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case"replace":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case"insert":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case"delete":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},w.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error("computeFrame must be given a string frame name");var s=o[e.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=w.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<s.data.length;r++)null!=(i=n[r])&&(-1===(a=u.traces.indexOf(i))&&(a=u.data.length,u.traces[a]=i),u.data[a]=w.extendTrace(u.data[a],s.data[r]))}return u},w.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},w.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,c,u=h.extendDeepNoArrays({},e||{}),f=h.expandObjectPaths(u),p={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=h.nestedProperty(f,r[a])).get())?h.nestedProperty(p,r[a]).set(null):(n.set(null),h.nestedProperty(p,r[a]).set(i));if(t=h.extendDeepNoArrays(t||{},f),r&&r.length)for(a=0;a<r.length;a++)if(l=h.nestedProperty(p,r[a]).get()){for(c=(s=h.nestedProperty(t,r[a])).get(),Array.isArray(c)||(c=[],s.set(c)),o=0;o<l.length;o++){var d=l[o];c[o]=null===d?null:w.extendObjectWithContainers(c[o],d)}s.set(c)}return t},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=l.layoutArrayContainers,w.extendTrace=function(t,e){return w.extendObjectWithContainers(t,e,w.dataArrayContainers)},w.extendLayout=function(t,e){return w.extendObjectWithContainers(t,e,w.layoutArrayContainers)},w.transition=function(t,e,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var i=Array.isArray(e)?e.length:0,a=n.slice(0,i),o=0;o<a.length;o++){var c=a[o],u=t._fullData[c]._module;if(u){if(u.animatable){var f=u.basePlotModule.name;s[f]||(s[f]=[]),s[f].push(c)}t.data[a[o]]=w.extendTrace(t.data[a[o]],e[o])}}var p=h.expandObjectPaths(h.extendDeepNoArrays({},r)),d=/^[xy]axis[0-9]*$/;for(var m in p)d.test(m)&&delete p[m].range;w.extendLayout(t.layout,p),delete t.calcdata,w.supplyDefaults(t),w.doCalcdata(t);var g=h.expandObjectPaths(r);if(g){var y=t._fullLayout._plots;for(var v in y){var x=y[v],_=x.xaxis,b=x.yaxis,T=_.range.slice(),k=b.range.slice(),A=null,M=null,S=null,E=null;Array.isArray(g[_._name+".range"])?A=g[_._name+".range"].slice():Array.isArray((g[_._name]||{}).range)&&(A=g[_._name].range.slice()),Array.isArray(g[b._name+".range"])?M=g[b._name+".range"].slice():Array.isArray((g[b._name]||{}).range)&&(M=g[b._name].range.slice()),T&&A&&(_.r2l(T[0])!==_.r2l(A[0])||_.r2l(T[1])!==_.r2l(A[1]))&&(S={xr0:T,xr1:A}),k&&M&&(b.r2l(k[0])!==b.r2l(M[0])||b.r2l(k[1])!==b.r2l(M[1]))&&(E={yr0:k,yr1:M}),(S||E)&&l.push(h.extendFlat({plotinfo:x},S,E))}}return Promise.resolve()},o.runFn=function(e){var n,i,o=t._fullLayout._basePlotModules,c=l.length;if(r)for(i=0;i<o.length;i++)o[i].transitionAxes&&o[i].transitionAxes(t,l,a,e);for(var u in c?((n=h.extendFlat({},a)).duration=0,delete s.cartesian):n=a,s){var f=s[u];t._fullData[f[0]]._module.basePlotModule.plot(t,f,n,e)}},O(t,a,o)},w.transitionFromReact=function(t,e,r,n){var i=t._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var t=i._plots;for(var a in o.redraw=!1,"some"===e.anim&&(o.redraw=!0),"some"===r.anim&&(o.redraw=!0),t){var l=t[a],c=l.xaxis,u=l.yaxis,f=n[c._name].range.slice(),p=n[u._name].range.slice(),d=c.range.slice(),m=u.range.slice();c.setScale(),u.setScale();var g=null,y=null;c.r2l(f[0])===c.r2l(d[0])&&c.r2l(f[1])===c.r2l(d[1])||(g={xr0:f,xr1:d}),u.r2l(p[0])===u.r2l(m[0])&&u.r2l(p[1])===u.r2l(m[1])||(y={yr0:p,yr1:m}),(g||y)&&s.push(h.extendFlat({plotinfo:l},g,y))}return Promise.resolve()},o.runFn=function(r){for(var n,i,o,l=t._fullData,c=t._fullLayout._basePlotModules,u=[],f=0;f<l.length;f++)u.push(f);function p(){if(t._fullLayout)for(var e=0;e<c.length;e++)c[e].transitionAxes&&c[e].transitionAxes(t,s,n,r)}function d(){if(t._fullLayout)for(var e=0;e<c.length;e++)c[e].plot(t,o,i,r)}s.length&&e.anim?"traces first"===a.ordering?(n=h.extendFlat({},a,{duration:0}),o=u,i=a,setTimeout(p,a.duration),d()):(n=a,o=null,i=h.extendFlat({},a,{duration:0}),setTimeout(d,n.duration),p()):s.length?(n=a,p()):e.anim&&(o=u,i=a,d())},O(t,a,o)},w.doCalcdata=function(t,e){var r,n,i,a,o=d.list(t),s=t._fullData,u=t._fullLayout,f=new Array(s.length),m=(t.calcdata||[]).slice();for(t.calcdata=f,u._numBoxes=0,u._numViolins=0,u._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,u._piecolormap={},u._sunburstcolormap={},u._treemapcolormap={},u._iciclecolormap={},u._funnelareacolormap={},i=0;i<s.length;i++)Array.isArray(e)&&-1===e.indexOf(i)&&(f[i]=m[i]);for(i=0;i<s.length;i++)(r=s[i])._arrayAttrs=c.findArrayAttributes(r),r._extremes={};var g=u._subplots.polar||[];for(i=0;i<g.length;i++)o.push(u[g[i]].radialaxis,u[g[i]].angularaxis);for(var y in u._colorAxes){var v=u[y];!1!==v.cauto&&(delete v.cmin,delete v.cmax)}var x=!1;function _(e){if(r=s[e],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var i=n.calc(t,r);i[0]&&i[0].t&&i[0].t._scene&&delete i[0].t._scene.dirty}for(a=0;a<r.transforms.length;a++){var o=r.transforms[a];(n=T[o.type])&&n.calcTransform&&(r._hasCalcTransform=!0,x=!0,n.calcTransform(t,r,o))}}}function b(e,i){if(r=s[e],!!(n=r._module).isContainer===i){var o=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var l=r.transforms||[];for(a=l.length-1;a>=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:p,y:p}]),o[0].t||(o[0].t={}),o[0].trace=r,f[e]=o}}for(R(o,s,u),i=0;i<s.length;i++)b(i,!0);for(i=0;i<s.length;i++)_(i);for(x&&R(o,s,u),i=0;i<s.length;i++)b(i,!0);for(i=0;i<s.length;i++)b(i,!1);F(t);var w=function(t,e){var r,n,i,a,o,s=[];function c(t,r,n){var i=r._id.charAt(0);if("histogram2dcontour"===t){var a=r._counterAxes[0],o=d.getFromId(e,a),s="x"===i||"x"===a&&"category"===o.type,l="y"===i||"y"===a&&"category"===o.type;return function(t,e){return 0===t||0===e||s&&t===n[e].length-1||l&&e===n.length-1?-1:("y"===i?e:t)-1}}return function(t,e){return"y"===i?e:t}}var u={min:function(t){return h.aggNums(Math.min,null,t)},max:function(t){return h.aggNums(Math.max,null,t)},sum:function(t){return h.aggNums((function(t,e){return t+e}),null,t)},total:function(t){return h.aggNums((function(t,e){return t+e}),null,t)},mean:function(t){return h.mean(t)},"geometric mean":function(t){return h.geometricMean(t)},median:function(t){return h.median(t)}};function f(t,e){return t[1]-e[1]}function p(t,e){return e[1]-t[1]}for(r=0;r<t.length;r++){var m=t[r];if("category"===m.type){var g=m.categoryorder.match(D);if(g){var y=g[1],v=g[2],x=m._id.charAt(0),_="x"===x,b=[];for(n=0;n<m._categories.length;n++)b.push([m._categories[n],[]]);for(n=0;n<m._traceIndices.length;n++){var w=m._traceIndices[n],T=e._fullData[w];if(!0===T.visible){var k=T.type;l.traceIs(T,"histogram")&&(delete T._xautoBinFinished,delete T._yautoBinFinished);var A="splom"===k,M="scattergl"===k,S=e.calcdata[w];for(i=0;i<S.length;i++){var E,C,L=S[i];if(A){var I=T._axesDim[m._id];if(!_){var P=T._diag[I][0];P&&(m=e._fullLayout[d.id2name(P)])}var z=L.trace.dimensions[I].values;for(a=0;a<z.length;a++)for(E=m._categoriesMap[z[a]],o=0;o<L.trace.dimensions.length;o++)if(o!==I){var O=L.trace.dimensions[o];b[E][1].push(O.values[a])}}else if(M){for(a=0;a<L.t.x.length;a++)_?(E=L.t.x[a],C=L.t.y[a]):(E=L.t.y[a],C=L.t.x[a]),b[E][1].push(C);L.t&&L.t._scene&&delete L.t._scene.dirty}else if(L.hasOwnProperty("z")){C=L.z;var R=c(T.type,m,C);for(a=0;a<C.length;a++)for(o=0;o<C[a].length;o++)(E=R(o,a))+1&&b[E][1].push(C[a][o])}else for(void 0===(E=L.p)&&(E=L[x]),void 0===(C=L.s)&&(C=L.v),void 0===C&&(C=_?L.y:L.x),Array.isArray(C)||(C=void 0===C?[]:[C]),a=0;a<C.length;a++)b[E][1].push(C[a])}}}m._categoriesValue=b;var F=[];for(n=0;n<b.length;n++)F.push([b[n][0],u[y](b[n][1])]);F.sort("descending"===v?p:f),m._categoriesAggregatedValue=F,m._initialCategories=F.map((function(t){return t[0]})),s=s.concat(m.sortByInitialCategories())}}}return s}(o,t);if(w.length){for(u._numBoxes=0,u._numViolins=0,i=0;i<w.length;i++)b(w[i],!0);for(i=0;i<w.length;i++)b(w[i],!1);F(t)}l.getComponentMethod("fx","calc")(t),l.getComponentMethod("errorbars","calc")(t)};var D=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function R(t,e,r){var n={};function i(t){t.clearCalc(),"multicategory"===t.type&&t.setupMultiCategory(e),n[t._id]=1}h.simpleMap(t,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[d.id2name(s)])}function F(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r<a.length;r++){var s=a[r],l=s.crossTraceCalc;if(l){var c=s.basePlotModule.name;o[c]?h.pushUnique(o[c],l):o[c]=[l]}}for(n in o){var u=o[n],f=i._subplots[n];if(Array.isArray(f))for(e=0;e<f.length;e++){var p=f[e],d="cartesian"===n?i._plots[p]:i[p];for(r=0;r<u.length;r++)u[r](t,d,p)}else for(r=0;r<u.length;r++)u[r](t)}}w.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},w.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()},w.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,n=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(n);l.getComponentMethod("selections","reselect")(t,i)},w.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],l=s[0].trace;l.visible&&(o[l.type]=o[l.type]||[],o[l.type].push(s))}for(var c in a)if(!o[c]){var u=a[c][0];u[0].trace.visible=!1,o[c]=[u]}for(var f in o){var p=o[f];p[0][0].trace._module.plot(t,e,h.filterVisible(p),n)}e.traceHash=o},w.plotBasePlot=function(t,e,r,n,i){var a=l.getModule(t),o=x(e.calcdata,a)[0];a.plot(e,o,n,i)},w.cleanBasePlot=function(t,e,r,n,i){var a=i._has&&i._has(t),o=r._has&&r._has(t);a&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()}},26484:function(t){"use strict";t.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},95928:function(t,e,r){"use strict";var n=r(34809),i=r(80899).tester,a=n.findIndexOfMin,o=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function c(t,e,r,n){var i,a,o=n[0],s=n[1],l=h(Math.sin(e)-Math.sin(t)),c=h(Math.cos(e)-Math.cos(t)),u=Math.tan(r),f=h(1/u),p=l/c,d=s-p*o;return f?l&&c?a=u*(i=d/(u-p)):c?(i=s*f,a=s):(i=o,a=o*u):l&&c?(i=0,a=d):c?(i=0,a=s):i=a=NaN,[i,a]}function u(t,e,r,i){return n.isFullCircle([e,r])?function(t,e){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;r++){var a=e[r];i[r]=[t*Math.cos(a),t*Math.sin(a)]}return i[r]=i[0].slice(),i}(t,i):function(t,e,r,i){var s,u,h=i.length,f=[];function p(e){return[t*Math.cos(e),t*Math.sin(e)]}function d(t,e,r){return c(t,e,r,p(t))}function m(t){return n.mod(t,h)}function g(t){return o(t,[e,r])}var y=a(i,(function(t){return g(t)?l(t,e):1/0})),v=d(i[y],i[m(y-1)],e);for(f.push(v),s=y,u=0;u<h;s++,u++){var x=i[m(s)];if(!g(x))break;f.push(p(x))}var _=a(i,(function(t){return g(t)?l(t,r):1/0})),b=d(i[_],i[m(_+1)],r);return f.push(b),f.push([0,0]),f.push(f[0].slice()),f}(t,e,r,i)}function h(t){return Math.abs(t)>1e-10?t:0}function f(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a<n;a++){var o=t[a];i[a]=[e+o[0],r-o[1]]}return i}t.exports={isPtInsidePolygon:function(t,e,r,n,a){if(!o(e,n))return!1;var s,l;r[0]<r[1]?(s=r[0],l=r[1]):(s=r[1],l=r[0]);var c=i(u(s,n[0],n[1],a)),h=i(u(l,n[0],n[1],a)),f=[t*Math.cos(e),t*Math.sin(e)];return h.contains(f)&&!c.contains(f)},findPolygonOffset:function(t,e,r,n){for(var i=1/0,a=1/0,o=u(t,e,r,n),s=0;s<o.length;s++){var l=o[s];i=Math.min(i,l[0]),a=Math.min(a,-l[1])}return[i,a]},findEnclosingVertexAngles:function(t,e){var r=a(e,(function(e){var r=s(e,t);return r>0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:h,pathPolygon:function(t,e,r,n,i,a){return"M"+f(u(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t<e?(s=t,l=e):(s=e,l=t);var c=f(u(s,r,n,i),a,o);return"M"+f(u(l,r,n,i),a,o).reverse().join("L")+"M"+c.join("L")}}},31645:function(t,e,r){"use strict";var n=r(4173).fX,i=r(34809).counterRegex,a=r(35785),o=r(26484),s=o.attr,l=o.name,c=i(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc"},t.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:r(42219),supplyLayoutDefaults:r(84588),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots[l],o=0;o<i.length;o++){var s=i[o],c=n(r,l,s),u=e[s]._subplot;u||(u=a(t,s),e[s]._subplot=u),u.plot(c,e,t._promises)}},clean:function(t,e,r,n){for(var i=n._subplots[l]||[],a=n._has&&n._has("gl"),o=e._has&&e._has("gl"),s=a&&!o,c=0;c<i.length;c++){var u=i[c],h=n[u]._subplot;if(!e[u]&&h)for(var f in h.framework.remove(),h.layers["radial-axis-title"].remove(),h.clipPaths)h.clipPaths[f].remove();s&&h._scene&&(h._scene.destroy(),h._scene=null)}},toSVG:r(37703).toSVG}},42219:function(t,e,r){"use strict";var n=r(10229),i=r(25829),a=r(13792).u,o=r(34809).extendFlat,s=r(13582).overrideAll,l=s({color:i.color,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),c=s({tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,layer:i.layer},"plot","from-root"),u={visible:o({},i.visible,{dflt:!0}),type:o({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},autorange:o({},i.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:o({},i.minallowed,{editType:"plot"}),maxallowed:o({},i.maxallowed,{editType:"plot"}),range:o({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:i.categoryorder,categoryarray:i.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:i.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:o({},i.title.text,{editType:"plot",dflt:""}),font:o({},i.title.font,{editType:"plot"}),editType:"plot"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}};o(u,l,c);var h={visible:o({},i.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:i.autotypenumbers,categoryorder:i.categoryorder,categoryarray:i.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:i.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};o(h,l,c),t.exports={domain:a({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:n.background},radialaxis:u,angularaxis:h,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},84588:function(t,e,r){"use strict";var n=r(34809),i=r(78766),a=r(78032),o=r(4448),s=r(4173).KO,l=r(22777),c=r(87433),u=r(12036),h=r(54616),f=r(46473),p=r(97405),d=r(75511),m=r(9666),g=r(42219),y=r(51937),v=r(26484),x=v.axisNames;function _(t,e,r,o){var m=r("bgcolor");o.bgColor=i.combine(m,o.paper_bgcolor);var _=r("sector");r("hole");var w,T=s(o.fullData,v.name,o.id),k=o.layoutOut;function A(t,e){return r(w+"."+t,e)}for(var M=0;M<x.length;M++){w=x[M],n.isPlainObject(t[w])||(t[w]={});var S=t[w],E=a.newContainer(e,w);E._id=E._name=w,E._attr=o.id+"."+w,E._traceIndices=T.map((function(t){return t._expandedIndex}));var C=v.axisName2dataArray[w],L=b(S,E,A,T,C,o);f(S,E,A,{axData:T,dataAttr:C});var I=A("visible");switch(y(E,e,k),A("uirevision",e.uirevision),E._m=1,w){case"radialaxis":A("minallowed"),A("maxallowed");var P,z=A("range"),O=E.getAutorangeDflt(z),D=A("autorange",O);!z||(null!==z[0]||null!==z[1])&&(null!==z[0]&&null!==z[1]||"reversed"!==D&&!0!==D)&&(null===z[0]||"min"!==D&&"max reversed"!==D)&&(null===z[1]||"max"!==D&&"min reversed"!==D)||(z=void 0,delete E.range,E.autorange=!0,P=!0),P||(D=A("autorange",O=E.getAutorangeDflt(z))),S.autorange=D,D&&(d(A,D,z),"linear"!==L&&"-"!==L||A("rangemode"),E.isReversed()&&(E._m=-1)),E.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if("date"===L){n.log("Polar plots do not support date angular axes yet.");for(var R=0;R<T.length;R++)T[R].visible=!1;L=S.type=E.type="linear"}A("linear"===L?"thetaunit":"period");var F=A("direction");A("rotation",{counterclockwise:0,clockwise:90}[F])}if(h(S,E,A,E.type,{tickSuffixDflt:"degrees"===E.thetaunit?"°":void 0}),I){var B,N,j,U,V,q,H,G,Z,W,Y=o.font||{};N=(B=A("color"))===S.color?B:Y.color,j=Y.size,U=Y.family,V=Y.weight,q=Y.style,H=Y.variant,G=Y.textcase,Z=Y.lineposit