@deephaven/embed-grid 0.22.1-beta.1 → 0.22.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{index.a5dbbfbc.js → index.fb57960d.js} +2 -2
- package/build/assets/{index.a5dbbfbc.js.map → index.fb57960d.js.map} +1 -1
- package/build/assets/plotly.b0044521.js +7 -0
- package/build/assets/{plotly.2f9046a1.js.map → plotly.b0044521.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +12 -12
- package/build/assets/plotly.2f9046a1.js +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{f as gt,t as ca,d as ct,g as Bb,r as ul,i as O2,a as jb,e as Ed,m as B2,h as Gb,b as Ub,p as j2,c as G2,j as U2,k as V2,l as Vb,s as q2,n as X2,o as Y2,q as W2,u as Z2,v as K2,w as Q2,x as $d,y as qb,z as J2,A as ek}from"./vendor.f4457b06.js";import{g as Ai,c as tk}from"./helpers.162e09a8.js";var Xb={exports:{}},Yb={},Of={};Of.version="2.11.1";var me={exports:{}},Jt={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"},Ur={},Rd=Array.isArray,rk=ArrayBuffer,ak=DataView;function Wb(t){return rk.isView(t)&&!(t instanceof ak)}Ur.isTypedArray=Wb;function lf(t){return Rd(t)||Wb(t)}Ur.isArrayOrTypedArray=lf;function ik(t){return!lf(t[0])}Ur.isArray1D=ik;Ur.ensureArray=function(t,e){return Rd(t)||(t=[]),t.length=e,t};Ur.concat=function(){var t=[],e=!0,r=0,a,i,n,o,l,s,f,c;for(n=0;n<arguments.length;n++)o=arguments[n],s=o.length,s&&(i?t.push(o):(i=o,l=s),Rd(o)?a=!1:(e=!1,r?a!==o.constructor&&(a=!1):a=o.constructor),r+=s);if(!r)return[];if(!t.length)return i;if(e)return i.concat.apply(i,t);if(a){for(f=new a(r),f.set(i),n=0;n<t.length;n++)o=t[n],f.set(o,l),l+=o.length;return f}for(f=new Array(r),c=0;c<i.length;c++)f[c]=i[c];for(n=0;n<t.length;n++){for(o=t[n],c=0;c<o.length;c++)f[l+c]=o[c];l+=c}return f};Ur.maxRowLength=function(t){return Zb(t,Math.max,0)};Ur.minRowLength=function(t){return Zb(t,Math.min,1/0)};function Zb(t,e,r){if(lf(t))if(lf(t[0])){for(var a=r,i=0;i<t.length;i++)a=e(a,t[i].length);return a}else return t.length;return 0}var Kb=gt,Pd=Ur.isArrayOrTypedArray,zd=function(e,r){if(Kb(r))r=String(r);else if(typeof r!="string"||r.substr(r.length-4)==="[-1]")throw"bad property string";for(var a=0,i=r.split("."),n,o,l;a<i.length;){if(n=String(i[a]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),n){if(n[1])i[a]=n[1];else if(a===0)i.splice(0,1);else throw"bad property string";for(o=n[2].substr(1,n[2].length-2).split("]["),l=0;l<o.length;l++)a++,i.splice(a,0,Number(o[l]))}a++}return typeof e!="object"?sk(e,r,i):{set:Jb(e,i,r),get:Qb(e,i),astr:r,parts:i,obj:e}};function Qb(t,e){return function(){var r=t,a,i,n,o,l;for(o=0;o<e.length-1;o++){if(a=e[o],a===-1){for(i=!0,n=[],l=0;l<r.length;l++)n[l]=Qb(r[l],e.slice(o+1))(),n[l]!==n[0]&&(i=!1);return i?n[0]:n}if(typeof a=="number"&&!Pd(r)||(r=r[a],typeof r!="object"||r===null))return}if(!(typeof r!="object"||r===null)&&(n=r[e[o]],n!==null))return n}}var nk=/(^|\.)args\[/;function Ev(t,e){return t===void 0||t===null&&!e.match(nk)}function Jb(t,e,r){return function(a){var i=t,n="",o=Ev(a,r),l,s;for(s=0;s<e.length-1;s++){if(l=e[s],typeof l=="number"&&!Pd(i))throw"array index but container is not an array";if(l===-1){if(o=!lk(i,e.slice(s+1),a,r),o)break;return}if(!ex(i,l,e[s+1],o))break;if(i=i[l],typeof i!="object"||i===null)throw"container is not an object";n=ok(n,l)}if(o){if(s===e.length-1&&(delete i[e[s]],Array.isArray(i)&&+e[s]===i.length-1))for(;i.length&&i[i.length-1]===void 0;)i.pop()}else i[e[s]]=a}}function ok(t,e){var r=e;return Kb(e)?r="["+e+"]":t&&(r="."+e),t+r}function lk(t,e,r,a){var i=Pd(r),n=!0,o=r,l=a.replace("-1",0),s=i?!1:Ev(r,l),f=e[0],c;for(c=0;c<t.length;c++)l=a.replace("-1",c),i&&(o=r[c%r.length],s=Ev(o,l)),s&&(n=!1),ex(t,c,f,s)&&Jb(t[c],e,a.replace("-1",c))(o);return n}function ex(t,e,r,a){if(t[e]===void 0){if(a)return!1;typeof r=="number"?t[e]=[]:t[e]={}}return!0}function sk(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}var mn=zd,fk=/^\w*$/,ck=0,dp=1,Yl=2,hp=3,Pi=4,uk=function(e,r,a,i){a=a||"name",i=i||"value";var n,o,l,s={};r&&r.length?(l=mn(e,r),o=l.get()):o=e,r=r||"";var f={};if(o)for(n=0;n<o.length;n++)f[o[n][a]]=n;var c=fk.test(i),v={set:function(u,d){var h=d===null?Pi:ck;if(!o){if(!l||h===Pi)return;o=[],l.set(o)}var p=f[u];if(p===void 0){if(h===Pi)return;h=h|hp,p=o.length,f[u]=p}else d!==(c?o[p][i]:mn(o[p],i).get())&&(h=h|Yl);var g=o[p]=o[p]||{};return g[a]=u,c?g[i]=d:mn(g,i).set(d),d!==null&&(h=h&~Pi),s[p]=s[p]|h,v},get:function(u){if(!!o){var d=f[u];if(d!==void 0)return c?o[d][i]:mn(o[d],i).get()}},rename:function(u,d){var h=f[u];return h===void 0||(s[h]=s[h]|dp,f[d]=h,delete f[u],o[h][a]=d),v},remove:function(u){var d=f[u];if(d===void 0)return v;var h=o[d];if(Object.keys(h).length>2)return s[d]=s[d]|Yl,v.set(u,null);if(c){for(n=d;n<o.length;n++)s[n]=s[n]|hp;for(n=d;n<o.length;n++)f[o[n][a]]--;o.splice(d,1),delete f[u]}else mn(h,i).set(null),s[d]=s[d]|Yl|Pi;return v},constructUpdate:function(){for(var u,d,h={},p=Object.keys(s),g=0;g<p.length;g++)d=p[g],u=r+"["+d+"]",o[d]?(s[d]&dp&&(h[u+"."+a]=o[d][a]),s[d]&Yl&&(c?h[u+"."+i]=s[d]&Pi?null:o[d][i]:h[u+"."+i]=s[d]&Pi?null:mn(o[d],i).get())):h[u]=null;return h}};return v},vk=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,dk=/^[^\.\[\]]+$/,hk=function(t,e){for(;e;){var r=t.match(vk);if(r)t=r[1];else if(t.match(dk))t="";else throw new Error("bad relativeAttr call:"+[t,e]);if(e.charAt(0)==="^")e=e.slice(1);else break}return t&&e.charAt(0)!=="["?t+"."+e:t+e},Ll=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")},pk=gt,Id=function(e,r){if(e>0)return Math.log(e)/Math.LN10;var a=Math.log(Math.min(r[0],r[1]))/Math.LN10;return pk(a)||(a=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),a},pp=Ur.isArrayOrTypedArray,Mo=Ll,mk=function t(e,r){for(var a in r){var i=r[a],n=e[a];if(n!==i)if(a.charAt(0)==="_"||typeof i=="function"){if(a in e)continue;e[a]=i}else if(pp(i)&&pp(n)&&Mo(i[0])){if(a==="customdata"||a==="ids")continue;for(var o=Math.min(i.length,n.length),l=0;l<o;l++)n[l]!==i[l]&&Mo(i[l])&&Mo(n[l])&&t(n[l],i[l])}else Mo(i)&&Mo(n)&&(t(n,i),Object.keys(n).length||delete e[a])}};function yk(t,e){var r=t%e;return r<0?r+e:r}function gk(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}var Cl={mod:yk,modHalf:gk},tx={},Dr=function(t){var e=t.editType,r=t.colorEditType;r===void 0&&(r=e);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:e,description:["HTML font family - the typeface that will be applied by the web browser.","The web browser will only be able to apply a font if it is available on the system","which it operates. Provide multiple font families, separated by commas, to indicate","the preference in which to apply fonts if they aren't available on the system.","The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server,","where only a select number of","fonts are installed and supported.","These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*,","*Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*,","*PT Sans Narrow*, *Raleway*, *Times New Roman*."].join(" ")},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:r},editType:e,description:""+(t.description||"")};return t.autoSize&&(a.size.dflt="auto"),t.autoColor&&(a.color.dflt="auto"),t.arrayOk&&(a.family.arrayOk=!0,a.size.arrayOk=!0,a.color.arrayOk=!0),a},Bf={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"},rx=Bf,ax=Dr,Nd=ax({editType:"none",description:"Sets the default hover label font used by all traces on the graph."});Nd.family.dflt=rx.HOVERFONT;Nd.size.dflt=rx.HOVERFONTSIZE;var Dl={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"],description:["Determines the mode of single click interactions.","*event* is the default value and emits the `plotly_click`","event. In addition this mode emits the `plotly_selected` event","in drag modes *lasso* and *select*, but with no event data attached","(kept for compatibility reasons).","The *select* flag enables selecting single","data points via click. This mode also supports persistent selections,","meaning that pressing Shift while clicking, adds to / subtracts from an","existing selection. *select* with `hovermode`: *x* can be confusing, consider","explicitly setting `hovermode`: *closest* when using this feature.","Selection events are sent accordingly as long as *event* flag is set as well.","When the *event* flag is missing, `plotly_click` and `plotly_selected`","events are not fired."].join(" ")},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar",description:["Determines the mode of drag interactions.","*select* and *lasso* apply only to scatter traces with","markers or text. *orbit* and *turntable* apply only to","3D scenes."].join(" ")},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar",description:["Determines the mode of hover interactions.","If *closest*, a single hoverlabel will appear","for the *closest* point within the `hoverdistance`.","If *x* (or *y*), multiple hoverlabels will appear for multiple points","at the *closest* x- (or y-) coordinate within the `hoverdistance`,","with the caveat that no more than one hoverlabel will appear per trace.","If *x unified* (or *y unified*), a single hoverlabel will appear","multiple points at the closest x- (or y-) coordinate within the `hoverdistance`","with the caveat that no more than one hoverlabel will appear per trace.","In this mode, spikelines are enabled by default perpendicular to the specified axis.","If false, hover interactions are disabled."].join(" ")},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none",description:["Sets the default distance (in pixels) to look for data","to add hover labels (-1 means no cutoff, 0 means no looking for data).","This is only a real distance for hovering on point-like objects,","like scatter points. For area-like objects (bars, scatter fills, etc)","hovering is on inside the area and off outside, but these objects","will not supersede hover on point-like objects in case of conflict."].join(" ")},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none",description:["Sets the default distance (in pixels) to look for data to draw","spikelines to (-1 means no cutoff, 0 means no looking for data).","As with hoverdistance, distance does not apply to area-like objects.","In addition, some objects can be hovered on but will not generate","spikelines, such as scatter fills."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"none",description:["Sets the background color of all hover labels on graph"].join(" ")},bordercolor:{valType:"color",editType:"none",description:["Sets the border color of all hover labels on graph."].join(" ")},font:Nd,grouptitlefont:ax({editType:"none",description:["Sets the font for group titles in hover (unified modes).","Defaults to `hoverlabel.font`."].join(" ")}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none",description:["Sets the horizontal alignment of the text content within hover label box.","Has an effect only if the hover label text spans more two or more lines"].join(" ")},namelength:{valType:"integer",min:-1,dflt:15,editType:"none",description:["Sets the default length (in number of characters) of the trace name in","the hover labels for all traces. -1 shows the whole name","regardless of length. 0-3 shows the first 0-3 characters, and","an integer >3 will show the whole name if it is less than that","many characters, but if it is longer, will truncate to","`namelength - 3` characters and add an ellipsis."].join(" ")},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",description:["When `dragmode` is set to *select*, this limits the selection of the drag to","horizontal, vertical or diagonal. *h* only allows horizontal selection,","*v* only vertical, *d* only diagonal and *any* sets no limit."].join(" "),editType:"none"}},er={},mp=Ll,So=Array.isArray;function bk(t,e){var r,a;for(r=0;r<t.length;r++){if(a=t[r],a!==null&&typeof a=="object")return!1;a!==void 0&&(e[r]=a)}return!0}er.extendFlat=function(){return El(arguments,!1,!1,!1)};er.extendDeep=function(){return El(arguments,!0,!1,!1)};er.extendDeepAll=function(){return El(arguments,!0,!0,!1)};er.extendDeepNoArrays=function(){return El(arguments,!0,!1,!0)};function El(t,e,r,a){var i=t[0],n=t.length,o,l,s,f,c,v,u;if(n===2&&So(i)&&So(t[1])&&i.length===0){if(u=bk(t[1],i),u)return i;i.splice(0,i.length)}for(var d=1;d<n;d++){o=t[d];for(l in o)s=i[l],f=o[l],a&&So(f)?i[l]=f:e&&f&&(mp(f)||(c=So(f)))?(c?(c=!1,v=s&&So(s)?s:[]):v=s&&mp(s)?s:{},i[l]=El([v,f],e,r,a)):(typeof f<"u"||r)&&(i[l]=f)}return i}var xk=Dr,Wl=Dl.hoverlabel,Zl=er.extendFlat,jf={hoverlabel:{bgcolor:Zl({},Wl.bgcolor,{arrayOk:!0,description:"Sets the background color of the hover labels for this trace"}),bordercolor:Zl({},Wl.bordercolor,{arrayOk:!0,description:"Sets the border color of the hover labels for this trace."}),font:xk({arrayOk:!0,editType:"none",description:"Sets the font used in hover labels."}),align:Zl({},Wl.align,{arrayOk:!0}),namelength:Zl({},Wl.namelength,{arrayOk:!0}),editType:"none"}},_k=Dr,wk=jf,Ba={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc",description:["Determines whether or not this trace is visible.","If *legendonly*, the trace is not drawn,","but can appear as a legend item","(provided that the legend itself is visible)."].join(" ")},showlegend:{valType:"boolean",dflt:!0,editType:"style",description:["Determines whether or not an item corresponding to this","trace is shown in the legend."].join(" ")},legendgroup:{valType:"string",dflt:"",editType:"style",description:["Sets the legend group for this trace.","Traces part of the same legend group hide/show at the same time","when toggling legend items."].join(" ")},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style",description:["Sets the title of the legend group."].join(" ")},font:_k({editType:"style",description:["Sets this legend group's title font."].join(" ")}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style",description:["Sets the legend rank for this trace.","Items and groups with smaller ranks are presented on top/left side while","with `*reversed* `legend.traceorder` they are on bottom/right side.","The default legendrank is 1000,","so that you can use ranks less than 1000 to place certain items before all unranked items,","and ranks greater than 1000 to go after all unranked items."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style",description:"Sets the opacity of the trace."},name:{valType:"string",editType:"style",description:["Sets the trace name.","The trace name appear as the legend item and on hover."].join(" ")},uid:{valType:"string",editType:"plot",anim:!0,description:["Assign an id to this trace,","Use this to provide object constancy between traces during animations","and transitions."].join(" ")},ids:{valType:"data_array",editType:"calc",anim:!0,description:["Assigns id labels to each datum.","These ids for object constancy of data points during animation.","Should be an array of strings, not numbers or any other type."].join(" ")},customdata:{valType:"data_array",editType:"calc",description:["Assigns extra data each datum.","This may be useful when listening to hover, click and selection events.","Note that, *scatter* traces also appends customdata items in the markers","DOM elements"].join(" ")},meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information associated with this trace","that can be used in various text attributes.","Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text`","`rangeselector`, `updatemenues` and `sliders` `label` text","all support `meta`.","To access the trace `meta` values in an attribute in the same trace, simply use","`%{meta[i]}` where `i` is the index or key of the `meta`","item in question.","To access trace `meta` in layout attributes, use","`%{data[n[.meta[i]}` where `i` is the index or key of the `meta`","and `n` is the trace index."].join(" ")},selectedpoints:{valType:"any",editType:"calc",description:["Array containing integer indices of selected points.","Has an effect only for traces that support selections.","Note that an empty array means an empty selection where the `unselected`","are turned on for all points, whereas, any other non-array values means no","selection all where the `selected` and `unselected` styles have no effect."].join(" ")},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none",description:["Determines which trace information appear on hover.","If `none` or `skip` are set, no information is displayed upon hovering.","But, if `none` is set, click and hover events are still fired."].join(" ")},hoverlabel:wk.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc",description:["The stream id number links a data trace on a plot with a stream.","See https://chart-studio.plotly.com/settings for more details."].join(" ")},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc",description:["Sets the maximum number of points to keep on the plots from an","incoming stream.","If `maxpoints` is set to *50*, only the newest 50 points will","be displayed on the plot."].join(" ")},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc",description:["WARNING: All transforms are deprecated and may be removed from the API in next major version.","An array of operations that manipulate the trace data,","for example filtering or sorting the data arrays."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of some user-driven changes to the trace:","`constraintrange` in `parcoords` traces, as well as some","`editable: true` modifications such as `name` and `colorbar.title`.","Defaults to `layout.uirevision`.","Note that other user-driven trace attribute changes are controlled","by `layout` attributes:","`trace.visible` is controlled by `layout.legend.uirevision`,","`selectedpoints` is controlled by `layout.selectionrevision`,","and `colorbar.(x|y)` (accessible with `config: {editable: true}`)","is controlled by `layout.editrevision`.","Trace changes are tracked by `uid`, which only falls back on trace","index if no `uid` is provided. So if your app can add/remove traces","before the end of the `data` array, such that the same trace has a","different index, you can still preserve user-driven changes if you","give each trace a `uid` that stays with it as it moves."].join(" ")}},Tk=ca.exports,Gf={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)"]]},ix=Gf.RdBu;function kk(t,e){if(e||(e=ix),!t)return e;function r(){try{t=Gf[t]||JSON.parse(t)}catch{t=e}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),nx(t)?t:e}function nx(t){var e=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;r<t.length;r++){var a=t[r];if(a.length!==2||+a[0]<e||!Tk(a[1]).isValid())return!1;e=+a[0]}return!0}function Ak(t){return Gf[t]!==void 0?!0:nx(t)}var vo={scales:Gf,defaultScale:ix,get:kk,isValid:Ak},ft={exports:{}},Er={};Er.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Er.defaultLine="#444";Er.lightLine="#eee";Er.background="#fff";Er.borderLine="#BEC8D9";Er.lightFraction=100*(14-4)/(15-4);var ka=ca.exports,Mk=gt,Sk=Ur.isTypedArray,gr=ft.exports={},Uf=Er;gr.defaults=Uf.defaults;var Lk=gr.defaultLine=Uf.defaultLine;gr.lightLine=Uf.lightLine;var $v=gr.background=Uf.background;gr.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"};gr.rgb=function(t){return gr.tinyRGB(ka(t))};gr.opacity=function(t){return t?ka(t).getAlpha():0};gr.addOpacity=function(t,e){var r=ka(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"};gr.combine=function(t,e){var r=ka(t).toRgb();if(r.a===1)return ka(t).toRgbString();var a=ka(e||$v).toRgb(),i=a.a===1?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},n={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return ka(n).toRgbString()};gr.contrast=function(t,e,r){var a=ka(t);a.getAlpha()!==1&&(a=ka(gr.combine(t,$v)));var i=a.isDark()?e?a.lighten(e):$v:r?a.darken(r):Lk;return i.toString()};gr.stroke=function(t,e){var r=ka(e);t.style({stroke:gr.tinyRGB(r),"stroke-opacity":r.getAlpha()})};gr.fill=function(t,e){var r=ka(e);t.style({fill:gr.tinyRGB(r),"fill-opacity":r.getAlpha()})};gr.clean=function(t){if(!(!t||typeof t!="object")){var e=Object.keys(t),r,a,i,n;for(r=0;r<e.length;r++)if(i=e[r],n=t[i],i.substr(i.length-5)==="color")if(Array.isArray(n))for(a=0;a<n.length;a++)n[a]=Mc(n[a]);else t[i]=Mc(n);else if(i.substr(i.length-10)==="colorscale"&&Array.isArray(n))for(a=0;a<n.length;a++)Array.isArray(n[a])&&(n[a][1]=Mc(n[a][1]));else if(Array.isArray(n)){var o=n[0];if(!Array.isArray(o)&&o&&typeof o=="object")for(a=0;a<n.length;a++)gr.clean(n[a])}else n&&typeof n=="object"&&!Sk(n)&&gr.clean(n)}};function Mc(t){if(Mk(t)||typeof t!="string")return t;var e=t.trim();if(e.substr(0,3)!=="rgb")return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var a=r[1].trim().split(/\s*[\s,]\s*/),i=e.charAt(3)==="a"&&a.length===4;if(!i&&a.length!==3)return t;for(var n=0;n<a.length;n++){if(!a[n].length||(a[n]=Number(a[n]),!(a[n]>=0)))return t;if(n===3)a[n]>1&&(a[n]=1);else if(a[n]>=1)return t}var o=Math.round(a[0]*255)+", "+Math.round(a[1]*255)+", "+Math.round(a[2]*255);return i?"rgba("+o+", "+a[3]+")":"rgb("+o+")"}var $l={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2},ho={};ho.counter=function(t,e,r,a){var i=(e||"")+(r?"":"$"),n=a===!1?"":"^";return t==="xy"?new RegExp(n+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(n+t+"([2-9]|[1-9][0-9]+)?"+i)};(function(t){var e=gt,r=ca.exports,a=Ba,i=vo,n=ft.exports,o=$l.DESELECTDIM,l=zd,s=ho.counter,f=Cl.modHalf,c=Ur.isArrayOrTypedArray;t.valObjectMeta={data_array:{description:["An {array} of data.","The value MUST be an {array}, or we ignore it.","Note that typed arrays (e.g. Float32Array) are supported."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){c(u)?d.set(u):h!==void 0&&d.set(h)}},enumerated:{description:["Enumerated value type. The available values are listed","in `values`."].join(" "),requiredOpts:["values"],otherOpts:["dflt","coerceNumber","arrayOk"],coerceFunction:function(u,d,h,p){p.coerceNumber&&(u=+u),p.values.indexOf(u)===-1?d.set(h):d.set(u)},validateFunction:function(u,d){d.coerceNumber&&(u=+u);for(var h=d.values,p=0;p<h.length;p++){var g=String(h[p]);if(g.charAt(0)==="/"&&g.charAt(g.length-1)==="/"){var _=new RegExp(g.substr(1,g.length-2));if(_.test(u))return!0}else if(u===h[p])return!0}return!1}},boolean:{description:"A boolean (true/false) value.",requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){u===!0||u===!1?d.set(u):d.set(h)}},number:{description:["A number or a numeric value","(e.g. a number inside a string).","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,d,h,p){!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?d.set(h):d.set(+u)}},integer:{description:["An integer or an integer inside a string.","When applicable, values greater (less) than `max` (`min`)","are coerced to the `dflt`."].join(" "),requiredOpts:[],otherOpts:["dflt","min","max","arrayOk"],coerceFunction:function(u,d,h,p){u%1||!e(u)||p.min!==void 0&&u<p.min||p.max!==void 0&&u>p.max?d.set(h):d.set(+u)}},string:{description:["A string value.","Numbers are converted to strings except for attributes with","`strict` set to true."].join(" "),requiredOpts:[],otherOpts:["dflt","noBlank","strict","arrayOk","values"],coerceFunction:function(u,d,h,p){if(typeof u!="string"){var g=typeof u=="number";p.strict===!0||!g?d.set(h):d.set(String(u))}else p.noBlank&&!u?d.set(h):d.set(u)}},color:{description:["A string describing color.","Supported formats:","- hex (e.g. '#d3d3d3')","- rgb (e.g. 'rgb(255, 0, 0)')","- rgba (e.g. 'rgb(255, 0, 0, 0.5)')","- hsl (e.g. 'hsl(0, 100%, 50%)')","- hsv (e.g. 'hsv(0, 100%, 100%)')","- named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)"].join(" "),requiredOpts:[],otherOpts:["dflt","arrayOk"],coerceFunction:function(u,d,h){r(u).isValid()?d.set(u):d.set(h)}},colorlist:{description:["A list of colors.","Must be an {array} containing valid colors."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){function p(g){return r(g).isValid()}!Array.isArray(u)||!u.length?d.set(h):u.every(p)?d.set(u):d.set(h)}},colorscale:{description:["A Plotly colorscale either picked by a name:","(any of",Object.keys(i.scales).join(", "),")","customized as an {array} of 2-element {arrays} where","the first element is the normalized color level value","(starting at *0* and ending at *1*),","and the second item is a valid color string."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){d.set(i.get(u,h))}},angle:{description:["A number (in degree) between -180 and 180."].join(" "),requiredOpts:[],otherOpts:["dflt"],coerceFunction:function(u,d,h){u==="auto"?d.set("auto"):e(u)?d.set(f(+u,360)):d.set(h)}},subplotid:{description:["An id string of a subplot type (given by dflt), optionally","followed by an integer >1. e.g. if dflt='geo', we can have","'geo', 'geo2', 'geo3', ..."].join(" "),requiredOpts:["dflt"],otherOpts:["regex"],coerceFunction:function(u,d,h,p){var g=p.regex||s(h);if(typeof u=="string"&&g.test(u)){d.set(u);return}d.set(h)},validateFunction:function(u,d){var h=d.dflt;return u===h?!0:typeof u!="string"?!1:!!s(h).test(u)}},flaglist:{description:["A string representing a combination of flags","(order does not matter here).","Combine any of the available `flags` with *+*.","(e.g. ('lines+markers')).","Values in `extras` cannot be combined."].join(" "),requiredOpts:["flags"],otherOpts:["dflt","extras","arrayOk"],coerceFunction:function(u,d,h,p){if(typeof u!="string"){d.set(h);return}if((p.extras||[]).indexOf(u)!==-1){d.set(u);return}for(var g=u.split("+"),_=0;_<g.length;){var b=g[_];p.flags.indexOf(b)===-1||g.indexOf(b)<_?g.splice(_,1):_++}g.length?d.set(g.join("+")):d.set(h)}},any:{description:"Any type.",requiredOpts:[],otherOpts:["dflt","values","arrayOk"],coerceFunction:function(u,d,h){u===void 0?d.set(h):d.set(u)}},info_array:{description:["An {array} of plot information."].join(" "),requiredOpts:["items"],otherOpts:["dflt","freeLength","dimensions"],coerceFunction:function(u,d,h,p){function g($,I,P){var R,L={set:function(C){R=C}};return P===void 0&&(P=I.dflt),t.valObjectMeta[I.valType].coerceFunction($,L,P,I),R}var _=p.dimensions===2||p.dimensions==="1-2"&&Array.isArray(u)&&Array.isArray(u[0]);if(!Array.isArray(u)){d.set(h);return}var b=p.items,w=[],m=Array.isArray(b),y=m&&_&&Array.isArray(b[0]),x=_&&m&&!y,T=m&&!x?b.length:u.length,k,S,A,E,M,D;if(h=Array.isArray(h)?h:[],_)for(k=0;k<T;k++)for(w[k]=[],A=Array.isArray(u[k])?u[k]:[],x?M=b.length:m?M=b[k].length:M=A.length,S=0;S<M;S++)x?E=b[S]:m?E=b[k][S]:E=b,D=g(A[S],E,(h[k]||[])[S]),D!==void 0&&(w[k][S]=D);else for(k=0;k<T;k++)D=g(u[k],m?b[k]:b,h[k]),D!==void 0&&(w[k]=D);d.set(w)},validateFunction:function(u,d){if(!Array.isArray(u))return!1;var h=d.items,p=Array.isArray(h),g=d.dimensions===2;if(!d.freeLength&&u.length!==h.length)return!1;for(var _=0;_<u.length;_++)if(g){if(!Array.isArray(u[_])||!d.freeLength&&u[_].length!==h[_].length)return!1;for(var b=0;b<u[_].length;b++)if(!v(u[_][b],p?h[_][b]:h))return!1}else if(!v(u[_],p?h[_]:h))return!1;return!0}}},t.coerce=function(u,d,h,p,g){var _=l(h,p).get(),b=l(u,p),w=l(d,p),m=b.get(),y=d._template;if(m===void 0&&y&&(m=l(y,p).get(),y=0),g===void 0&&(g=_.dflt),_.arrayOk&&c(m))return w.set(m),m;var x=t.valObjectMeta[_.valType].coerceFunction;x(m,w,g,_);var T=w.get();return y&&T===g&&!v(m,_)&&(m=l(y,p).get(),x(m,w,g,_),T=w.get()),T},t.coerce2=function(u,d,h,p,g){var _=l(u,p),b=t.coerce(u,d,h,p,g),w=_.get();return w!=null?b:!1},t.coerceFont=function(u,d,h){var p={};return h=h||{},p.family=u(d+".family",h.family),p.size=u(d+".size",h.size),p.color=u(d+".color",h.color),p},t.coercePattern=function(u,d,h,p){var g=u(d+".shape");if(g){u(d+".solidity"),u(d+".size");var _=u(d+".fillmode"),b=_==="overlay";if(!p){var w=u(d+".bgcolor",b?h:void 0);u(d+".fgcolor",b?n.contrast(w):h)}u(d+".fgopacity",b?.5:1)}},t.coerceHoverinfo=function(u,d,h){var p=d._module.attributes,g=p.hoverinfo?p:a,_=g.hoverinfo,b;if(h._dataLength===1){var w=_.dflt==="all"?_.flags.slice():_.dflt.split("+");w.splice(w.indexOf("name"),1),b=w.join("+")}return t.coerce(u,d,g,"hoverinfo",b)},t.coerceSelectionMarkerOpacity=function(u,d){if(!!u.marker){var h=u.marker.opacity;if(h!==void 0){var p,g;!c(h)&&!u.selected&&!u.unselected&&(p=h,g=o*h),d("selected.marker.opacity",p),d("unselected.marker.opacity",g)}}};function v(u,d){var h=t.valObjectMeta[d.valType];if(d.arrayOk&&c(u))return!0;if(h.validateFunction)return h.validateFunction(u,d);var p={},g=p,_={set:function(b){g=b}};return h.coerceFunction(u,_,p,d),g!==p}t.validate=v})(tx);var ox={},sn={exports:{}},lx={staticPlot:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are interactive or not.","If *false*, no interactivity, for export or image generation."].join(" ")},typesetMath:{valType:"boolean",dflt:!0,description:["Determines whether math should be typeset or not,","when MathJax (either v2 or v3) is present on the page."].join(" ")},plotlyServerURL:{valType:"string",dflt:"",description:["When set it determines base URL for","the 'Edit in Chart Studio' `showEditInChartStudio`/`showSendToCloud` mode bar button","and the showLink/sendData on-graph link.","To enable sending your data to Chart Studio Cloud, you need to","set both `plotlyServerURL` to 'https://chart-studio.plotly.com' and","also set `showSendToCloud` to true."].join(" ")},editable:{valType:"boolean",dflt:!1,description:["Determines whether the graph is editable or not.","Sets all pieces of `edits`","unless a separate `edits` config item overrides individual parts."].join(" ")},edits:{annotationPosition:{valType:"boolean",dflt:!1,description:["Determines if the main anchor of the annotation is editable.","The main anchor corresponds to the","text (if no arrow) or the arrow (which drags the whole thing leaving","the arrow length & direction unchanged)."].join(" ")},annotationTail:{valType:"boolean",dflt:!1,description:["Has only an effect for annotations with arrows.","Enables changing the length and direction of the arrow."].join(" ")},annotationText:{valType:"boolean",dflt:!1,description:"Enables editing annotation text."},axisTitleText:{valType:"boolean",dflt:!1,description:"Enables editing axis title text."},colorbarPosition:{valType:"boolean",dflt:!1,description:"Enables moving colorbars."},colorbarTitleText:{valType:"boolean",dflt:!1,description:"Enables editing colorbar title text."},legendPosition:{valType:"boolean",dflt:!1,description:"Enables moving the legend."},legendText:{valType:"boolean",dflt:!1,description:"Enables editing the trace name fields from the legend"},shapePosition:{valType:"boolean",dflt:!1,description:"Enables moving shapes."},titleText:{valType:"boolean",dflt:!1,description:"Enables editing the global layout title."}},autosizable:{valType:"boolean",dflt:!1,description:["Determines whether the graphs are plotted with respect to","layout.autosize:true and infer its container size."].join(" ")},responsive:{valType:"boolean",dflt:!1,description:["Determines whether to change the layout size when window is resized.","In v3, this option will be removed and will always be true."].join(" ")},fillFrame:{valType:"boolean",dflt:!1,description:["When `layout.autosize` is turned on, determines whether the graph","fills the container (the default) or the screen (if set to *true*)."].join(" ")},frameMargins:{valType:"number",dflt:0,min:0,max:.5,description:["When `layout.autosize` is turned on, set the frame margins","in fraction of the graph size."].join(" ")},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox",description:["Determines whether mouse wheel or two-finger scroll zooms is enable.","Turned on by default for gl3d, geo and mapbox subplots","(as these subplot types do not have zoombox via pan),","but turned off by default for cartesian subplots.","Set `scrollZoom` to *false* to disable scrolling for all subplots."].join(" ")},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize",description:["Sets the double click interaction mode.","Has an effect only in cartesian plots.","If *false*, double click is disable.","If *reset*, double click resets the axis ranges to their initial values.","If *autosize*, double click set the axis ranges to their autorange values.","If *reset+autosize*, the odd double clicks resets the axis ranges","to their initial values and even double clicks set the axis ranges","to their autorange values."].join(" ")},doubleClickDelay:{valType:"number",dflt:300,min:0,description:["Sets the delay for registering a double-click in ms.","This is the time interval (in ms) between first mousedown and","2nd mouseup to constitute a double-click.","This setting propagates to all on-subplot double clicks","(except for geo and mapbox) and on-legend double clicks."].join(" ")},showAxisDragHandles:{valType:"boolean",dflt:!0,description:["Set to *false* to omit cartesian axis pan/zoom drag handles."].join(" ")},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0,description:["Set to *false* to omit direct range entry at the pan/zoom drag points,","note that `showAxisDragHandles` must be enabled to have an effect."].join(" ")},showTips:{valType:"boolean",dflt:!0,description:["Determines whether or not tips are shown while interacting","with the resulting graphs."].join(" ")},showLink:{valType:"boolean",dflt:!1,description:["Determines whether a link to Chart Studio Cloud is displayed","at the bottom right corner of resulting graphs.","Use with `sendData` and `linkText`."].join(" ")},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0,description:["Sets the text appearing in the `showLink` link."].join(" ")},sendData:{valType:"boolean",dflt:!0,description:["If *showLink* is true, does it contain data","just link to a Chart Studio Cloud file?"].join(" ")},showSources:{valType:"any",dflt:!1,description:["Adds a source-displaying function to show sources on","the resulting graphs."].join(" ")},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover",description:["Determines the mode bar display mode.","If *true*, the mode bar is always visible.","If *false*, the mode bar is always hidden.","If *hover*, the mode bar is visible while the mouse cursor","is on the graph container."].join(" ")},showSendToCloud:{valType:"boolean",dflt:!1,description:['Should we include a ModeBar button, labeled "Edit in Chart Studio",',"that sends this chart to chart-studio.plotly.com (formerly plot.ly) or another plotly server","as specified by `plotlyServerURL` for editing, export, etc? Prior to version 1.43.0","this button was included by default, now it is opt-in using this flag.","Note that this button can (depending on `plotlyServerURL` being set) send your data","to an external server. However that server does not persist your data",'until you arrive at the Chart Studio and explicitly click "Save".'].join(" ")},showEditInChartStudio:{valType:"boolean",dflt:!1,description:["Same as `showSendToCloud`, but use a pencil icon instead of a floppy-disk.","Note that if both `showSendToCloud` and `showEditInChartStudio` are turned,","only `showEditInChartStudio` will be honored."].join(" ")},modeBarButtonsToRemove:{valType:"any",dflt:[],description:["Remove mode bar buttons by name.","See ./components/modebar/buttons.js for the list of names."].join(" ")},modeBarButtonsToAdd:{valType:"any",dflt:[],description:["Add mode bar button using config objects","See ./components/modebar/buttons.js for list of arguments.","To enable predefined modebar buttons e.g. shape drawing, hover and spikelines,","simply provide their string name(s). This could include:","*v1hovermode*, *hoverclosest*, *hovercompare*, *togglehover*, *togglespikelines*,","*drawline*, *drawopenpath*, *drawclosedpath*, *drawcircle*, *drawrect* and *eraseshape*.","Please note that these predefined buttons will only be shown if they are compatible","with all trace types used in a graph."].join(" ")},modeBarButtons:{valType:"any",dflt:!1,description:["Define fully custom mode bar buttons as nested array,","where the outer arrays represents button groups, and","the inner arrays have buttons config objects or names of default buttons","See ./components/modebar/buttons.js for more info."].join(" ")},toImageButtonOptions:{valType:"any",dflt:{},description:["Statically override options for toImage modebar button","allowed keys are format, filename, width, height, scale","see ../components/modebar/buttons.js"].join(" ")},displaylogo:{valType:"boolean",dflt:!0,description:["Determines whether or not the plotly logo is displayed","on the end of the mode bar."].join(" ")},watermark:{valType:"boolean",dflt:!1,description:"watermark the images with the company's logo"},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4,description:["Set the pixel ratio during WebGL image export.","This config option was formerly named `plot3dPixelRatio`","which is now deprecated."].join(" ")},setBackground:{valType:"any",dflt:"transparent",description:["Set function to add the background color (i.e. `layout.paper_color`)","to a different container.","This function take the graph div as first argument and the current background","color as second argument.","Alternatively, set to string *opaque* to ensure there is white behind it."].join(" ")},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/",description:["Set the URL to topojson used in geo charts.","By default, the topojson files are fetched from cdn.plot.ly.","For example, set this option to:","<path-to-plotly.js>/dist/topojson/","to render geographical feature using the topojson files","that ship with the plotly.js module."].join(" ")},mapboxAccessToken:{valType:"string",dflt:null,description:["Mapbox access token (required to plot mapbox trace types)","If using an Mapbox Atlas server, set this option to ''","so that plotly.js won't attempt to authenticate to the public Mapbox server."].join(" ")},logging:{valType:"integer",min:0,max:2,dflt:1,description:["Turn all console logging on or off (errors will be thrown)","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0,description:["Set on-graph logging (notifier) level","This should ONLY be set via Plotly.setPlotConfig","Available levels:","0: no on-graph logs","1: warnings and errors, but not informational messages","2: verbose logs"].join(" ")},queueLength:{valType:"integer",min:0,dflt:0,description:"Sets the length of the undo/redo queue."},globalTransforms:{valType:"any",dflt:[],description:["Set global transform to be applied to all traces with no","specification needed"].join(" ")},locale:{valType:"string",dflt:"en-US",description:["Which localization should we use?","Should be a string like 'en' or 'en-US'."].join(" ")},locales:{valType:"any",dflt:{},description:["Localization definitions","Locales can be provided either here (specific to one chart) or globally","by registering them as modules.","Should be an object of objects {locale: {dictionary: {...}, format: {...}}}","{"," da: {"," dictionary: {'Reset axes': 'Nulstil aksler', ...},"," format: {months: [...], shortMonths: [...]}"," },"," ...","}","All parts are optional. When looking for translation or format fields, we","look first for an exact match in a config locale, then in a registered","module. If those fail, we strip off any regionalization ('en-US' -> 'en')","and try each (config, registry) again. The final fallback for translation","is untranslated (which is US English) and for formats is the base English","(the only consequence being the last fallback date format %x is DD/MM/YYYY","instead of MM/DD/YYYY). Currently `grouping` and `currency` are ignored","for our automatic number formatting, but can be used in custom formats."].join(" ")}},sx={};function fx(t,e){for(var r in t){var a=t[r];a.valType?e[r]=a.dflt:(e[r]||(e[r]={}),fx(a,e[r]))}}fx(lx,sx);var po={configAttributes:lx,dfltConfig:sx},Sc=ct.exports,Ck=gt,Lo=[],cx=function(t,e){if(Lo.indexOf(t)!==-1)return;Lo.push(t);var r=1e3;Ck(e)?r=e:e==="long"&&(r=3e3);var a=Sc.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(Lo);function n(o){o.duration(700).style("opacity",0).each("end",function(l){var s=Lo.indexOf(l);s!==-1&&Lo.splice(s,1),Sc.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var l=Sc.select(this);l.append("button").classed("notifier-close",!0).html("×").on("click",function(){l.transition().call(n)});for(var s=l.append("p"),f=o.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?l.transition().duration(350).style("opacity",1):l.transition().duration(700).style("opacity",1).transition().delay(r).call(n)})},Jn=po.dfltConfig,Fd=cx,Hd=sn.exports={};Hd.log=function(){var t;if(Jn.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Jn.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Fd(r.join("<br>"),"long")}};Hd.warn=function(){var t;if(Jn.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(Jn.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Fd(r.join("<br>"),"stick")}};Hd.error=function(){var t;if(Jn.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(Jn.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);Fd(r.join("<br>"),"stick")}};var We={},Od=function(){},ux=function(e,r){if(r instanceof RegExp){for(var a=r.toString(),i=0;i<e.length;i++)if(e[i]instanceof RegExp&&e[i].toString()===a)return e;e.push(r)}else(r||r===0)&&e.indexOf(r)===-1&&e.push(r);return e},Vf={};(function(t){var e=Bb;t.init2dArray=function(r,a){for(var i=new Array(r),n=0;n<r;n++)i[n]=new Array(a);return i},t.transposeRagged=function(r){var a=0,i=r.length,n,o;for(n=0;n<i;n++)a=Math.max(a,r[n].length);var l=new Array(a);for(n=0;n<a;n++)for(l[n]=new Array(i),o=0;o<i;o++)l[n][o]=r[o][n];return l},t.dot=function(r,a){if(!(r.length&&a.length)||r.length!==a.length)return null;var i=r.length,n,o;if(r[0].length)for(n=new Array(i),o=0;o<i;o++)n[o]=t.dot(r[o],a);else if(a[0].length){var l=t.transposeRagged(a);for(n=new Array(l.length),o=0;o<l.length;o++)n[o]=t.dot(r,l[o])}else for(n=0,o=0;o<i;o++)n+=r[o]*a[o];return n},t.translationMatrix=function(r,a){return[[1,0,r],[0,1,a],[0,0,1]]},t.rotationMatrix=function(r){var a=r*Math.PI/180;return[[Math.cos(a),-Math.sin(a),0],[Math.sin(a),Math.cos(a),0],[0,0,1]]},t.rotationXYMatrix=function(r,a,i){return t.dot(t.dot(t.translationMatrix(a,i),t.rotationMatrix(r)),t.translationMatrix(-a,-i))},t.apply3DTransform=function(r){return function(){var a=arguments,i=arguments.length===1?a[0]:[a[0],a[1],a[2]||0];return t.dot(r,[i[0],i[1],i[2],1]).slice(0,3)}},t.apply2DTransform=function(r){return function(){var a=arguments;a.length===3&&(a=a[0]);var i=arguments.length===1?a[0]:[a[0],a[1]];return t.dot(r,[i[0],i[1],1]).slice(0,2)}},t.apply2DTransform2=function(r){var a=t.apply2DTransform(r);return function(i){return a(i.slice(0,2)).concat(a(i.slice(2,4)))}},t.convertCssMatrix=function(r){if(r){var a=r.length;if(a===16)return r;if(a===6)return[r[0],r[1],0,0,r[2],r[3],0,0,0,0,1,0,r[4],r[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},t.inverseTransformMatrix=function(r){var a=[];return e.invert(a,r),[[a[0],a[1],a[2],a[3]],[a[4],a[5],a[6],a[7]],[a[8],a[9],a[10],a[11]],[a[12],a[13],a[14],a[15]]]}})(Vf);var Dk=ct.exports,Ek=sn.exports,$k=Vf,Rk=Bb;function Pk(t){var e;if(typeof t=="string"){if(e=document.getElementById(t),e===null)throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}else if(t==null)throw new Error("DOM element provided is null or undefined");return t}function zk(t){var e=Dk.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")}function vx(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function Ik(t,e){dx("global",t,e)}function dx(t,e,r){var a="plotly.js-style-"+t,i=document.getElementById(a);i||(i=document.createElement("style"),i.setAttribute("id",a),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var n=i.sheet;n.insertRule?n.insertRule(e+"{"+r+"}",0):n.addRule?n.addRule(e,r,0):Ek.warn("addStyleRule failed")}function Nk(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&vx(r)}function Fk(t){var e=px(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(a){var i=hx(a);if(i){var n=$k.convertCssMatrix(i);r=Rk.multiply(r,r,n)}}),r}function hx(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function px(t){for(var e=[];Hk(t);)e.push(t),t=t.parentNode;return e}function Hk(t){return t&&(t instanceof Element||t instanceof HTMLElement)}function Ok(t,e){return t&&e&&t.x===e.x&&t.y===e.y&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}var Bd={getGraphDiv:Pk,isPlotDiv:zk,removeElement:vx,addStyleRule:Ik,addRelatedStyleRule:dx,deleteRelatedStyleRule:Nk,getFullTransformMatrix:Fk,getElementTransformMatrix:hx,getElementAndAncestors:px,equalDomRects:Ok},qf={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"],description:["Describes how a new animate call interacts with currently-running","animations. If `immediate`, current animations are interrupted and","the new animation is started. If `next`, the current frame is allowed","to complete, after which the new animation is started. If `afterall`","all existing frames are animated to completion before the new animation","is started."].join(" ")},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward",description:["The direction in which to play the frames triggered by the animation call"].join(" ")},fromcurrent:{valType:"boolean",dflt:!1,description:["Play frames starting at the current frame instead of the beginning."].join(" ")},frame:{duration:{valType:"number",min:0,dflt:500,description:["The duration in milliseconds of each frame. If greater than the frame","duration, it will be limited to the frame duration."].join(" ")},redraw:{valType:"boolean",dflt:!0,description:["Redraw the plot at completion of the transition. This is desirable","for transitions that include properties that cannot be transitioned,","but may significantly slow down updates that do not require a full","redraw of the plot"].join(" ")}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none",description:["The duration of the transition, in milliseconds. If equal to zero,","updates are synchronous."].join(" ")},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none",description:"The easing function used for the transition"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none",description:["Determines whether the figure's layout or traces smoothly transitions","during updates that make both traces and layout change."].join(" ")}}},ei={};ei.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style",description:["Sets the dash style of lines. Set to a dash type string","(*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*)","or a dash length list in px (eg *5px,10px,2px,2px*)."].join(" ")};ei.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style",description:["Sets the shape of the pattern fill.","By default, no pattern is used for filling the area."].join(" ")},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style",description:["Determines whether `marker.color` should be used","as a default to `bgcolor` or a `fgcolor`."].join(" ")},bgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of background pattern fill.","Defaults to a `marker.color` background when `fillmode` is *overlay*.","Otherwise, defaults to a transparent background."].join(" ")},fgcolor:{valType:"color",arrayOk:!0,editType:"style",description:["When there is no colorscale sets the color of foreground pattern fill.","Defaults to a `marker.color` background when `fillmode` is *replace*.","Otherwise, defaults to dark grey or white","to increase contrast with the `bgcolor`."].join(" ")},fgopacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the foreground pattern fill.","Defaults to a 0.5 when `fillmode` is *overlay*.","Otherwise, defaults to 1."].join(" ")},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style",description:["Sets the size of unit squares of the pattern fill in pixels,","which corresponds to the interval of repetition of the pattern."].join(" ")},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style",description:["Sets the solidity of the pattern fill.","Solidity is roughly the fraction of the area filled by the pattern.","Solidity of 0 shows only the background color without pattern","and solidty of 1 shows only the foreground color without pattern."].join(" ")},editType:"style",description:["Sets the pattern within the marker."].join(" ")};var Bk=ei.dash,jk=er.extendFlat,Gk={newshape:{line:{color:{valType:"color",editType:"none",description:["Sets the line color.","By default uses either dark grey or white","to increase contrast with background color."].join(" ")},width:{valType:"number",min:0,dflt:4,editType:"none",description:"Sets the line width (in px)."},dash:jk({},Bk,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none",description:["Sets the color filling new shapes' interior.","Please note that if using a fillcolor with alpha greater than half,","drag inside the active shape starts moving the shape underneath,","otherwise a new shape could be started over."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none",description:["Determines the path's interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none",description:"Sets the opacity of new shapes."},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none",description:"Specifies whether new shapes are drawn below or above traces."},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none",description:["When `dragmode` is set to *drawrect*, *drawline* or *drawcircle*","this limits the drag to be horizontal, vertical or diagonal.","Using *diagonal* there is no limit e.g. in drawing lines in any direction.","*ortho* limits the draw to be either horizontal or vertical.","*horizontal* allows horizontal extend.","*vertical* allows vertical extend."].join(" ")},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none",description:"Sets the opacity of the active shape."},editType:"none"}},jd=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the top of the component."},r:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the right side of the component."},b:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) along the bottom of the component."},l:{valType:"number",dflt:0,editType:e,description:"The amount of padding (in px) on the left side of the component."},editType:e}},Rv=Dr,Uk=qf,js=Er,yp=Gk,Vk=jd,gp=er.extendFlat,Xf=Rv({editType:"calc",description:["Sets the global font.","Note that fonts used in traces and other","layout components inherit from the global font."].join(" ")});Xf.family.dflt='"Open Sans", verdana, arial, sans-serif';Xf.size.dflt=12;Xf.color.dflt=js.defaultLine;var Rl={font:Xf,title:{text:{valType:"string",editType:"layoutstyle",description:["Sets the plot's title.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Rv({editType:"layoutstyle",description:["Sets the title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `x` refers to.","*container* spans the entire `width` of the plot.","*paper* refers to the width of the plotting area only."].join(" ")},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle",description:["Sets the container `y` refers to.","*container* spans the entire `height` of the plot.","*paper* refers to the height of the plotting area only."].join(" ")},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle",description:["Sets the x position with respect to `xref` in normalized","coordinates from *0* (left) to *1* (right)."].join(" ")},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle",description:["Sets the y position with respect to `yref` in normalized","coordinates from *0* (bottom) to *1* (top).","*auto* places the baseline of the title onto the","vertical center of the top margin."].join(" ")},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle",description:["Sets the title's horizontal alignment with respect to its x position.","*left* means that the title starts at x,","*right* means that the title ends at x","and *center* means that the title's center is at x.","*auto* divides `xref` by three and calculates the `xanchor`","value automatically based on the value of `x`."].join(" ")},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle",description:["Sets the title's vertical alignment with respect to its y position.","*top* means that the title's cap line is at y,","*bottom* means that the title's baseline is at y","and *middle* means that the title's midline is at y.","*auto* divides `yref` by three and calculates the `yanchor`","value automatically based on the value of `y`."].join(" ")},pad:gp(Vk({editType:"layoutstyle"}),{description:["Sets the padding of the title.","Each padding value only applies when the corresponding","`xanchor`/`yanchor` value is set accordingly. E.g. for left","padding to take effect, `xanchor` must be set to *left*.","The same rule applies if `xanchor`/`yanchor` is determined automatically.","Padding is muted if the respective anchor value is *middle*/*center*."].join(" ")}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot",description:["Determines how the font size for various text","elements are uniformed between each trace type.","If the computed text sizes were smaller than","the minimum size defined by `uniformtext.minsize`","using *hide* option hides the text; and","using *show* option shows the text without further downscaling.","Please note that if the size defined by `minsize` is greater than","the font size defined by trace, then the `minsize` is used."].join(" ")},minsize:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the minimum text size between traces of the same type."].join(" ")},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none",description:["Determines whether or not a layout width or height","that has been left undefined by the user","is initialized on each relayout.","Note that, regardless of this attribute,","an undefined layout width or height","is always initialized on the first call to plot."].join(" ")},width:{valType:"number",min:10,dflt:700,editType:"plot",description:["Sets the plot's width (in px)."].join(" ")},height:{valType:"number",min:10,dflt:450,editType:"plot",description:["Sets the plot's height (in px)."].join(" ")},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the left margin (in px)."},r:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the right margin (in px)."},t:{valType:"number",min:0,dflt:100,editType:"plot",description:"Sets the top margin (in px)."},b:{valType:"number",min:0,dflt:80,editType:"plot",description:"Sets the bottom margin (in px)."},pad:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets the amount of padding (in px)","between the plotting area and the axis lines"].join(" ")},autoexpand:{valType:"boolean",dflt:!0,editType:"plot",description:["Turns on/off margin expansion computations.","Legends, colorbars, updatemenus, sliders, axis rangeselector and rangeslider","are allowed to push the margins by defaults."].join(" ")},editType:"plot"},computed:{valType:"any",editType:"none",description:["Placeholder for exporting automargin-impacting values namely","`margin.t`, `margin.b`, `margin.l` and `margin.r` in *full-json* mode."].join(" ")},paper_bgcolor:{valType:"color",dflt:js.background,editType:"plot",description:"Sets the background color of the paper where the graph is drawn."},plot_bgcolor:{valType:"color",dflt:js.background,editType:"layoutstyle",description:["Sets the background color of the plotting area in-between x and y axes."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","This is the default value; however it could be overridden for individual axes."].join(" ")},separators:{valType:"string",editType:"plot",description:["Sets the decimal and thousand separators.","For example, *. * puts a '.' before decimals and a space","between thousands. In English locales, dflt is *.,* but","other locales may alter this default."].join(" ")},hidesources:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether or not a text link citing the data source is","placed at the bottom-right cored of the figure.","Has only an effect only on graphs that have been generated via","forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise)."].join(" ")},showlegend:{valType:"boolean",editType:"legend",description:["Determines whether or not a legend is drawn.","Default is `true` if there is a trace to show and any of these:","a) Two or more traces would by default be shown in the legend.","b) One pie trace is shown in the legend.","c) One trace is explicitly given with `showlegend: true`."].join(" ")},colorway:{valType:"colorlist",dflt:js.defaults,editType:"calc",description:"Sets the default trace colors."},datarevision:{valType:"any",editType:"calc",description:["If provided, a changed value tells `Plotly.react` that","one or more data arrays has changed. This way you can modify","arrays in-place rather than making a complete new copy for an","incremental change.","If NOT provided, `Plotly.react` assumes that data arrays are","being treated as immutable, thus any data array with a","different identity from its predecessor contains new data."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Used to allow user interactions with the plot to persist after","`Plotly.react` calls that are unaware of these interactions.","If `uirevision` is omitted, or if it is given and it changed from","the previous `Plotly.react` call, the exact new figure is used.","If `uirevision` is truthy and did NOT change, any attribute","that has been affected by user interactions and did not receive a","different value in the new figure will keep the interaction value.","`layout.uirevision` attribute serves as the default for","`uirevision` attributes in various sub-containers. For finer","control you can set these sub-attributes directly. For example,","if your app separately controls the data on the x and y axes you","might set `xaxis.uirevision=*time*` and `yaxis.uirevision=*cost*`.","Then if only the y data is changed, you can update","`yaxis.uirevision=*quantity*` and the y axis range will reset but","the x axis range will retain any user-driven zoom."].join(" ")},editrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in `editable: true`","configuration, other than trace names and axis titles.","Defaults to `layout.uirevision`."].join(" ")},selectionrevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in selected points","from all traces."].join(" ")},template:{valType:"any",editType:"calc",description:["Default attributes to be applied to the plot. Templates can be","created from existing plots using `Plotly.makeTemplate`, or","created manually. They should be objects with format:","`{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`","`layoutTemplate` and `traceTemplate` are objects matching the","attribute structure of `layout` and a data trace. ","Trace templates are applied cyclically to traces of each type.","Container arrays (eg `annotations`) have special handling:","An object ending in `defaults` (eg `annotationdefaults`) is applied","to each array item. But if an item has a `templateitemname` key","we look in the template array for an item with matching `name` and","apply that instead. If no matching `name` is found we mark the item","invisible. Any named template item not referenced is appended to","the end of the array, so you can use this for a watermark annotation","or a logo image, for example. To omit one of these items on the plot,","make an item with matching `templateitemname` and `visible: false`."].join(" ")},newshape:yp.newshape,activeshape:yp.activeshape,meta:{valType:"any",arrayOk:!0,editType:"plot",description:["Assigns extra meta information that can be used in various `text` attributes.","Attributes such as the graph, axis and colorbar `title.text`, annotation `text`","`trace.name` in legend items, `rangeselector`, `updatemenus` and `sliders` `label` text","all support `meta`. One can access `meta` fields using template strings:","`%{meta[i]}` where `i` is the index of the `meta`","item in question.","`meta` can also be an object for example `{key: value}` which can be accessed","%{meta[key]}."].join(" ")},transition:gp({},Uk.transition,{description:["Sets transition options used during Plotly.react updates."].join(" "),editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the contents of the title, please use `title.text` now."].join(" ")},titlefont:Rv({editType:"layoutstyle",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}};(function(t){var e=sn.exports,r=Od,a=ux,i=Ll,n=Bd.addStyleRule,o=er,l=Ba,s=Rl,f=o.extendFlat,c=o.extendDeepAll;t.modules={},t.allCategories={},t.allTypes=[],t.subplotsRegistry={},t.transformsRegistry={},t.componentsRegistry={},t.layoutArrayContainers=[],t.layoutArrayRegexes=[],t.traceLayoutAttributes={},t.localeRegistry={},t.apiMethodRegistry={},t.collectableSubplotTypes=null,t.register=function(x){if(t.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var T=0;T<x.length;T++){var k=x[T];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":v(k);break;case"transform":h(k);break;case"component":d(k);break;case"locale":p(k);break;case"apiMethod":var S=k.name;t.apiMethodRegistry[S]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},t.getModule=function(y){var x=t.modules[m(y)];return x?x._module:!1},t.traceIs=function(y,x){if(y=m(y),y==="various")return!1;var T=t.modules[y];return T||(y&&e.log("Unrecognized trace type "+y+"."),T=t.modules[l.type.dflt]),!!T.categories[x]},t.getTransformIndices=function(y,x){for(var T=[],k=y.transforms||[],S=0;S<k.length;S++)k[S].type===x&&T.push(S);return T},t.hasTransform=function(y,x){for(var T=y.transforms||[],k=0;k<T.length;k++)if(T[k].type===x)return!0;return!1},t.getComponentMethod=function(y,x){var T=t.componentsRegistry[y];return T&&T[x]||r},t.call=function(){var y=arguments[0],x=[].slice.call(arguments,1);return t.apiMethodRegistry[y].apply(null,x)};function v(y){var x=y.name,T=y.categories,k=y.meta;if(t.modules[x]){e.log("Type "+x+" already registered");return}t.subplotsRegistry[y.basePlotModule.name]||u(y.basePlotModule);for(var S={},A=0;A<T.length;A++)S[T[A]]=!0,t.allCategories[T[A]]=!0;t.modules[x]={_module:y,categories:S},k&&Object.keys(k).length&&(t.modules[x].meta=k),t.allTypes.push(x);for(var E in t.componentsRegistry)_(E,x);y.layoutAttributes&&f(t.traceLayoutAttributes,y.layoutAttributes);var M=y.basePlotModule,D=M.name;if(D==="mapbox"){var $=M.constants.styleRules;for(var I in $)n(".js-plotly-plot .plotly .mapboxgl-"+I,$[I])}(D==="geo"||D==="mapbox")&&typeof window!==void 0&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function u(y){var x=y.name;if(t.subplotsRegistry[x]){e.log("Plot type "+x+" already registered.");return}g(y),t.subplotsRegistry[x]=y;for(var T in t.componentsRegistry)w(T,y.name)}function d(y){if(typeof y.name!="string")throw new Error("Component module *name* must be a string.");var x=y.name;t.componentsRegistry[x]=y,y.layoutAttributes&&(y.layoutAttributes._isLinkedToArray&&a(t.layoutArrayContainers,x),g(y));for(var T in t.modules)_(x,T);for(var k in t.subplotsRegistry)w(x,k);for(var S in t.transformsRegistry)b(x,S);y.schema&&y.schema.layout&&c(s,y.schema.layout)}function h(y){if(typeof y.name!="string")throw new Error("Transform module *name* must be a string.");var x="Transform module "+y.name,T=typeof y.transform=="function",k=typeof y.calcTransform=="function";if(!T&&!k)throw new Error(x+" is missing a *transform* or *calcTransform* method.");T&&k&&e.log([x+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),i(y.attributes)||e.log(x+" registered without an *attributes* object."),typeof y.supplyDefaults!="function"&&e.log(x+" registered without a *supplyDefaults* method."),t.transformsRegistry[y.name]=y;for(var S in t.componentsRegistry)b(S,y.name)}function p(y){var x=y.name,T=x.split("-")[0],k=y.dictionary,S=y.format,A=k&&Object.keys(k).length,E=S&&Object.keys(S).length,M=t.localeRegistry,D=M[x];if(D||(M[x]=D={}),T!==x){var $=M[T];$||(M[T]=$={}),A&&$.dictionary===D.dictionary&&($.dictionary=k),E&&$.format===D.format&&($.format=S)}A&&(D.dictionary=k),E&&(D.format=S)}function g(y){if(y.layoutAttributes){var x=y.layoutAttributes._arrayAttrRegexps;if(x)for(var T=0;T<x.length;T++)a(t.layoutArrayRegexes,x[T])}}function _(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.traces)){var k=T.traces[x];k&&c(t.modules[x]._module.attributes,k)}}function b(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.transforms)){var k=T.transforms[x];k&&c(t.transformsRegistry[x].attributes,k)}}function w(y,x){var T=t.componentsRegistry[y].schema;if(!(!T||!T.subplots)){var k=t.subplotsRegistry[x],S=k.layoutAttributes,A=k.attr==="subplot"?k.name:k.attr;Array.isArray(A)&&(A=A[0]);var E=T.subplots[A];S&&E&&c(S,E)}}function m(y){return typeof y=="object"&&(y=y.type),y}})(We);(function(t){var e=ul.timeFormat,r=gt,a=sn.exports,i=Cl.mod,n=Jt,o=n.BADNUM,l=n.ONEDAY,s=n.ONEHOUR,f=n.ONEMIN,c=n.ONESEC,v=n.EPOCHJD,u=We,d=ul.utcFormat,h=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,g=new Date().getFullYear()-70;function _(R){return R&&u.componentsRegistry.calendars&&typeof R=="string"&&R!=="gregorian"}t.dateTick0=function(R,L){var C=b(R,!!L);if(L<2)return C;var z=t.dateTime2ms(C,R);return z+=l*(L-1),t.ms2DateTime(z,0,R)};function b(R,L){return _(R)?L?u.getComponentMethod("calendars","CANONICAL_SUNDAY")[R]:u.getComponentMethod("calendars","CANONICAL_TICK")[R]:L?"2000-01-02":"2000-01-01"}t.dfltRange=function(R){return _(R)?u.getComponentMethod("calendars","DFLTRANGE")[R]:["2000-01-01","2001-01-01"]},t.isJSDate=function(R){return typeof R=="object"&&R!==null&&typeof R.getTime=="function"};var w,m;t.dateTime2ms=function(R,L){if(t.isJSDate(R)){var C=R.getTimezoneOffset()*f,z=(R.getUTCMinutes()-R.getMinutes())*f+(R.getUTCSeconds()-R.getSeconds())*c+(R.getUTCMilliseconds()-R.getMilliseconds());if(z){var F=3*f;C=C-F/2+i(z-C+F/2,F)}return R=Number(R)-C,R>=w&&R<=m?R:o}if(typeof R!="string"&&typeof R!="number")return o;R=String(R);var H=_(L),B=R.charAt(0);H&&(B==="G"||B==="g")&&(R=R.substr(1),L="");var O=H&&L.substr(0,7)==="chinese",W=R.match(O?p:h);if(!W)return o;var j=W[1],Z=W[3]||"1",K=Number(W[5]||1),Q=Number(W[7]||0),ee=Number(W[9]||0),ne=Number(W[11]||0);if(H){if(j.length===2)return o;j=Number(j);var le;try{var se=u.getComponentMethod("calendars","getCal")(L);if(O){var oe=Z.charAt(Z.length-1)==="i";Z=parseInt(Z,10),le=se.newDate(j,se.toMonthIndex(j,Z,oe),K)}else le=se.newDate(j,Number(Z),K)}catch{return o}return le?(le.toJD()-v)*l+Q*s+ee*f+ne*c:o}j.length===2?j=(Number(j)+2e3-g)%100+g:j=Number(j),Z-=1;var V=new Date(Date.UTC(2e3,Z,K,Q,ee));return V.setUTCFullYear(j),V.getUTCMonth()!==Z||V.getUTCDate()!==K?o:V.getTime()+ne*c},w=t.MIN_MS=t.dateTime2ms("-9999"),m=t.MAX_MS=t.dateTime2ms("9999-12-31 23:59:59.9999"),t.isDateTime=function(R,L){return t.dateTime2ms(R,L)!==o};function y(R,L){return String(R+Math.pow(10,L)).substr(1)}var x=90*l,T=3*s,k=5*f;t.ms2DateTime=function(R,L,C){if(typeof R!="number"||!(R>=w&&R<=m))return o;L||(L=0);var z=Math.floor(i(R+.05,1)*10),F=Math.round(R-z/10),H,B,O,W,j,Z;if(_(C)){var K=Math.floor(F/l)+v,Q=Math.floor(i(R,l));try{H=u.getComponentMethod("calendars","getCal")(C).fromJD(K).formatDate("yyyy-mm-dd")}catch{H=d("G%Y-%m-%d")(new Date(F))}if(H.charAt(0)==="-")for(;H.length<11;)H="-0"+H.substr(1);else for(;H.length<10;)H="0"+H;B=L<x?Math.floor(Q/s):0,O=L<x?Math.floor(Q%s/f):0,W=L<T?Math.floor(Q%f/c):0,j=L<k?Q%c*10+z:0}else Z=new Date(F),H=d("%Y-%m-%d")(Z),B=L<x?Z.getUTCHours():0,O=L<x?Z.getUTCMinutes():0,W=L<T?Z.getUTCSeconds():0,j=L<k?Z.getUTCMilliseconds()*10+z:0;return S(H,B,O,W,j)},t.ms2DateTimeLocal=function(R){if(!(R>=w+l&&R<=m-l))return o;var L=Math.floor(i(R+.05,1)*10),C=new Date(Math.round(R-L/10)),z=e("%Y-%m-%d")(C),F=C.getHours(),H=C.getMinutes(),B=C.getSeconds(),O=C.getUTCMilliseconds()*10+L;return S(z,F,H,B,O)};function S(R,L,C,z,F){if((L||C||z||F)&&(R+=" "+y(L,2)+":"+y(C,2),(z||F)&&(R+=":"+y(z,2),F))){for(var H=4;F%10===0;)H-=1,F/=10;R+="."+y(F,H)}return R}t.cleanDate=function(R,L,C){if(R===o)return L;if(t.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(_(C))return a.error("JS Dates and milliseconds are incompatible with world calendars",R),L;if(R=t.ms2DateTimeLocal(+R),!R&&L!==void 0)return L}else if(!t.isDateTime(R,C))return a.error("unrecognized date",R),L;return R};var A=/%\d?f/g,E=/%h/g,M={1:"1",2:"1",3:"2",4:"2"};function D(R,L,C,z){R=R.replace(A,function(H){var B=Math.min(+H.charAt(1)||6,6),O=(L/1e3%1+2).toFixed(B).substr(2).replace(/0+$/,"")||"0";return O});var F=new Date(Math.floor(L+.05));if(R=R.replace(E,function(){return M[C("%q")(F)]}),_(z))try{R=u.getComponentMethod("calendars","worldCalFmt")(R,L,z)}catch{return"Invalid"}return C(R)(F)}var $=[59,59.9,59.99,59.999,59.9999];function I(R,L){var C=i(R+.05,l),z=y(Math.floor(C/s),2)+":"+y(i(Math.floor(C/f),60),2);if(L!=="M"){r(L)||(L=0);var F=Math.min(i(R/c,60),$[L]),H=(100+F).toFixed(L).substr(1);L>0&&(H=H.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+H}return z}t.formatDate=function(R,L,C,z,F,H){if(F=_(F)&&F,!L)if(C==="y")L=H.year;else if(C==="m")L=H.month;else if(C==="d")L=H.dayMonth+`
|
|
2
|
-
`+H.year;else return I(R,C)+`
|
|
3
|
-
`+D(H.dayMonthYear,R,z,F);return D(L,R,z,F)};var P=3*l;t.incrementMonth=function(R,L,C){C=_(C)&&C;var z=i(R,l);if(R=Math.round(R-z),C)try{var F=Math.round(R/l)+v,H=u.getComponentMethod("calendars","getCal")(C),B=H.fromJD(F);return L%12?H.add(B,L,"m"):H.add(B,L/12,"y"),(B.toJD()-v)*l+z}catch{a.error("invalid ms "+R+" in calendar "+C)}var O=new Date(R+P);return O.setUTCMonth(O.getUTCMonth()+L)+z-P},t.findExactDates=function(R,L){for(var C=0,z=0,F=0,H=0,B,O,W=_(L)&&u.getComponentMethod("calendars","getCal")(L),j=0;j<R.length;j++){if(O=R[j],!r(O)){H++;continue}if(!(O%l))if(W)try{B=W.fromJD(O/l+v),B.day()===1?B.month()===1?C++:z++:F++}catch{}else B=new Date(O),B.getUTCDate()===1?B.getUTCMonth()===0?C++:z++:F++}z+=C,F+=z;var Z=R.length-H;return{exactYears:C/Z,exactMonths:z/Z,exactDays:F/Z}}})(ox);var Gd={},mx=function(e){return e};(function(t){var e=gt,r=sn.exports,a=mx,i=Jt.BADNUM,n=1e-9;t.findBin=function(c,v,u){if(e(v.start))return u?Math.ceil((c-v.start)/v.size-n)-1:Math.floor((c-v.start)/v.size+n);var d=0,h=v.length,p=0,g=h>1?(v[h-1]-v[0])/(h-1):1,_,b;for(g>=0?b=u?o:l:b=u?f:s,c+=g*n*(u?-1:1)*(g>=0?1:-1);d<h&&p++<100;)_=Math.floor((d+h)/2),b(v[_],c)?d=_+1:h=_;return p>90&&r.log("Long binary search..."),d-1};function o(c,v){return c<v}function l(c,v){return c<=v}function s(c,v){return c>v}function f(c,v){return c>=v}t.sorterAsc=function(c,v){return c-v},t.sorterDes=function(c,v){return v-c},t.distinctVals=function(c){var v=c.slice();v.sort(t.sorterAsc);var u;for(u=v.length-1;u>-1&&v[u]===i;u--);for(var d=v[u]-v[0]||1,h=d/(u||1)/1e4,p=[],g,_=0;_<=u;_++){var b=v[_],w=b-g;g===void 0?(p.push(b),g=b):w>h&&(d=Math.min(d,w),p.push(b),g=b)}return{vals:p,minDiff:d}},t.roundUp=function(c,v,u){for(var d=0,h=v.length-1,p,g=0,_=u?0:1,b=u?1:0,w=u?Math.ceil:Math.floor;d<h&&g++<100;)p=w((d+h)/2),v[p]<=c?d=p+_:h=p-b;return v[d]},t.sort=function(c,v){for(var u=0,d=0,h=1;h<c.length;h++){var p=v(c[h],c[h-1]);if(p<0?u=1:p>0&&(d=1),u&&d)return c.sort(v)}return d?c:c.reverse()},t.findIndexOfMin=function(c,v){v=v||a;for(var u=1/0,d,h=0;h<c.length;h++){var p=v(c[h]);p<u&&(u=p,d=h)}return d}})(Gd);var Ud=function(e){return Object.keys(e).sort()},yx={};(function(t){var e=gt,r=Ur.isArrayOrTypedArray;t.aggNums=function(a,i,n,o){var l,s;if((!o||o>n.length)&&(o=n.length),e(i)||(i=!1),r(n[0])){for(s=new Array(o),l=0;l<o;l++)s[l]=t.aggNums(a,i,n[l]);n=s}for(l=0;l<o;l++)e(i)?e(n[l])&&(i=a(+i,+n[l])):i=n[l];return i},t.len=function(a){return t.aggNums(function(i){return i+1},0,a)},t.mean=function(a,i){return i||(i=t.len(a)),t.aggNums(function(n,o){return n+o},0,a)/i},t.midRange=function(a){if(!(a===void 0||a.length===0))return(t.aggNums(Math.max,null,a)+t.aggNums(Math.min,null,a))/2},t.variance=function(a,i,n){return i||(i=t.len(a)),e(n)||(n=t.mean(a,i)),t.aggNums(function(o,l){return o+Math.pow(l-n,2)},0,a)/i},t.stdev=function(a,i,n){return Math.sqrt(t.variance(a,i,n))},t.median=function(a){var i=a.slice().sort();return t.interp(i,.5)},t.interp=function(a,i){if(!e(i))throw"n should be a finite number";if(i=i*a.length-.5,i<0)return a[0];if(i>a.length-1)return a[a.length-1];var n=i%1;return n*a[Math.ceil(i)]+(1-n)*a[Math.floor(i)]}})(yx);var gx=Cl,Lc=gx.mod,qk=gx.modHalf,vl=Math.PI,gi=2*vl;function Xk(t){return t/180*vl}function Yk(t){return t/vl*180}function Vd(t){return Math.abs(t[1]-t[0])>gi-1e-14}function bx(t,e){return qk(e-t,gi)}function Wk(t,e){return Math.abs(bx(t,e))}function xx(t,e){if(Vd(e))return!0;var r,a;e[0]<e[1]?(r=e[0],a=e[1]):(r=e[1],a=e[0]),r=Lc(r,gi),a=Lc(a,gi),r>a&&(a+=gi);var i=Lc(t,gi),n=i+gi;return i>=r&&i<=a||n>=r&&n<=a}function Zk(t,e,r,a){if(!xx(e,a))return!1;var i,n;return r[0]<r[1]?(i=r[0],n=r[1]):(i=r[1],n=r[0]),t>=i&&t<=n}function qd(t,e,r,a,i,n,o){i=i||0,n=n||0;var l=Vd([r,a]),s,f,c,v,u;l?(s=0,f=vl,c=gi):r<a?(s=r,c=a):(s=a,c=r),t<e?(v=t,u=e):(v=e,u=t);function d(_,b){return[_*Math.cos(b)+i,n-_*Math.sin(b)]}var h=Math.abs(c-s)<=vl?0:1;function p(_,b,w){return"A"+[_,_]+" "+[0,h,w]+" "+d(_,b)}var g;return l?v===null?g="M"+d(u,s)+p(u,f,0)+p(u,c,0)+"Z":g="M"+d(v,s)+p(v,f,0)+p(v,c,0)+"ZM"+d(u,s)+p(u,f,1)+p(u,c,1)+"Z":v===null?(g="M"+d(u,s)+p(u,c,0),o&&(g+="L0,0Z")):g="M"+d(v,s)+"L"+d(u,s)+p(u,c,0)+"L"+d(v,c)+p(v,s,1)+"Z",g}function Kk(t,e,r,a,i){return qd(null,t,e,r,a,i,0)}function Qk(t,e,r,a,i){return qd(null,t,e,r,a,i,1)}function Jk(t,e,r,a,i,n){return qd(t,e,r,a,i,n,1)}var eA={deg2rad:Xk,rad2deg:Yk,angleDelta:bx,angleDist:Wk,isFullCircle:Vd,isAngleInsideSector:xx,isPtInsideSector:Zk,pathArc:Kk,pathSector:Qk,pathAnnulus:Jk},fn={};fn.isLeftAnchor=function(e){return e.xanchor==="left"||e.xanchor==="auto"&&e.x<=1/3};fn.isCenterAnchor=function(e){return e.xanchor==="center"||e.xanchor==="auto"&&e.x>1/3&&e.x<2/3};fn.isRightAnchor=function(e){return e.xanchor==="right"||e.xanchor==="auto"&&e.x>=2/3};fn.isTopAnchor=function(e){return e.yanchor==="top"||e.yanchor==="auto"&&e.y>=2/3};fn.isMiddleAnchor=function(e){return e.yanchor==="middle"||e.yanchor==="auto"&&e.y>1/3&&e.y<2/3};fn.isBottomAnchor=function(e){return e.yanchor==="bottom"||e.yanchor==="auto"&&e.y<=1/3};var cn={},Cc=Cl.mod;cn.segmentsIntersect=_x;function _x(t,e,r,a,i,n,o,l){var s=r-t,f=i-t,c=o-i,v=a-e,u=n-e,d=l-n,h=s*d-c*v;if(h===0)return null;var p=(f*d-c*u)/h,g=(f*v-s*u)/h;return g<0||g>1||p<0||p>1?null:{x:t+s*p,y:e+v*p}}cn.segmentDistance=function(e,r,a,i,n,o,l,s){if(_x(e,r,a,i,n,o,l,s))return 0;var f=a-e,c=i-r,v=l-n,u=s-o,d=f*f+c*c,h=v*v+u*u,p=Math.min(Kl(f,c,d,n-e,o-r),Kl(f,c,d,l-e,s-r),Kl(v,u,h,e-n,r-o),Kl(v,u,h,a-n,i-o));return Math.sqrt(p)};function Kl(t,e,r,a,i){var n=a*t+i*e;if(n<0)return a*a+i*i;if(n>r){var o=a-t,l=i-e;return o*o+l*l}else{var s=a*e-i*t;return s*s/r}}var Ql,Pv,bp;cn.getTextLocation=function(e,r,a,i){if((e!==Pv||i!==bp)&&(Ql={},Pv=e,bp=i),Ql[a])return Ql[a];var n=e.getPointAtLength(Cc(a-i/2,r)),o=e.getPointAtLength(Cc(a+i/2,r)),l=Math.atan((o.y-n.y)/(o.x-n.x)),s=e.getPointAtLength(Cc(a,r)),f=(s.x*4+n.x+o.x)/6,c=(s.y*4+n.y+o.y)/6,v={x:f,y:c,theta:l};return Ql[a]=v,v};cn.clearLocationCache=function(){Pv=null};cn.getVisibleSegment=function(e,r,a){var i=r.left,n=r.right,o=r.top,l=r.bottom,s=0,f=e.getTotalLength(),c=f,v,u;function d(p){var g=e.getPointAtLength(p);p===0?v=g:p===f&&(u=g);var _=g.x<i?i-g.x:g.x>n?g.x-n:0,b=g.y<o?o-g.y:g.y>l?g.y-l:0;return Math.sqrt(_*_+b*b)}for(var h=d(s);h;){if(s+=h+a,s>c)return;h=d(s)}for(h=d(c);h;){if(c-=h+a,s>c)return;h=d(c)}return{min:s,max:c,len:c-s,total:f,isClosed:s===0&&c===f&&Math.abs(v.x-u.x)<.1&&Math.abs(v.y-u.y)<.1}};cn.findPointOnPath=function(e,r,a,i){i=i||{};for(var n=i.pathLength||e.getTotalLength(),o=i.tolerance||.001,l=i.iterationLimit||30,s=e.getPointAtLength(0)[a]>e.getPointAtLength(n)[a]?-1:1,f=0,c=0,v=n,u,d,h;f<l;){if(u=(c+v)/2,d=e.getPointAtLength(u),h=d[a]-r,Math.abs(h)<o)return d;s*h>0?v=u:c=u,f++}return d};var Yf={};(function(t){var e={};t.throttle=function(i,n,o){var l=e[i],s=Date.now();if(!l){for(var f in e)e[f].ts<s-6e4&&delete e[f];l=e[i]={ts:0,timer:null}}r(l);function c(){o(),l.ts=Date.now(),l.onDone&&(l.onDone(),l.onDone=null)}if(s>l.ts+n){c();return}l.timer=setTimeout(function(){c(),l.timer=null},n)},t.done=function(a){var i=e[a];return!i||!i.timer?Promise.resolve():new Promise(function(n){var o=i.onDone;i.onDone=function(){o&&o(),n(),i.onDone=null}})},t.clear=function(a){if(a)r(e[a]),delete e[a];else for(var i in e)t.clear(i)};function r(a){a&&a.timer!==null&&(clearTimeout(a.timer),a.timer=null)}})(Yf);var tA=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)},rA=gt,aA=O2.exports,iA=function(e){var r;if(e&&e.hasOwnProperty("userAgent")?r=e.userAgent:r=nA(),typeof r!="string")return!0;var a=aA({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!a)for(var i=r.split(" "),n=1;n<i.length;n++){var o=i[n];if(o.indexOf("Safari")!==-1)for(var l=n-1;l>-1;l--){var s=i[l];if(s.substr(0,8)==="Version/"){var f=s.substr(8).split(".")[0];if(rA(f)&&(f=+f),f>=13)return!0}}}return a};function nA(){var t;return typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),t}var oA=ct.exports,lA=function(e,r,a){var i=e.selectAll("g."+a.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",a),i.order();var n=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(o){o[0][n]=oA.select(this)}),i},sA=We,fA=function(e,r){for(var a=e._context.locale,i=0;i<2;i++){for(var n=e._context.locales,o=0;o<2;o++){var l=(n[a]||{}).dictionary;if(l){var s=l[r];if(s)return s}n=sA.localeRegistry}var f=a.split("-")[0];if(f===a)break;a=f}return r},cA=function(e){for(var r={},a=[],i=0,n=0;n<e.length;n++){var o=e[n];r[o]!==1&&(r[o]=1,a[i++]=o)}return a},uA=function(e){for(var r=hA(e)?dA:vA,a=[],i=0;i<e.length;i++){var n=e[i];r(n)&&a.push(n)}return a};function vA(t){return t.visible===!0}function dA(t){var e=t[0].trace;return e.visible===!0&&e._length!==0}function hA(t){return Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace}var pA=function(e,r){if(!r)return e;var a=1/Math.abs(r),i=a>1?(a*e+a*r)/a:e+r,n=String(i).length;if(n>16){var o=String(r).length,l=String(e).length;if(n>=l+o){var s=parseFloat(i).toPrecision(12);s.indexOf("e+")===-1&&(i=+s)}}return i},mA=gt,yA=Jt.BADNUM,gA=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,bA=function(e){return typeof e=="string"&&(e=e.replace(gA,"")),mA(e)?Number(e):yA},Ko=ct.exports,xA=ul.utcFormat,_A=jb.format,wx=gt,Tx=Jt,kx=Tx.FP_SAFE,wA=-kx,xp=Tx.BADNUM,te=me.exports={};te.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:e==="0.f"?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var _p={};te.warnBadFormat=function(t){var e=String(t);_p[e]||(_p[e]=1,te.warn('encountered bad format: "'+e+'"'))};te.noFormat=function(t){return String(t)};te.numberFormat=function(t){var e;try{e=_A(te.adjustFormat(t))}catch{return te.warnBadFormat(t),te.noFormat}return e};te.nestedProperty=zd;te.keyedContainer=uk;te.relativeAttr=hk;te.isPlainObject=Ll;te.toLogRange=Id;te.relinkPrivateKeys=mk;var un=Ur;te.isTypedArray=un.isTypedArray;te.isArrayOrTypedArray=un.isArrayOrTypedArray;te.isArray1D=un.isArray1D;te.ensureArray=un.ensureArray;te.concat=un.concat;te.maxRowLength=un.maxRowLength;te.minRowLength=un.minRowLength;var Ax=Cl;te.mod=Ax.mod;te.modHalf=Ax.modHalf;var Mi=tx;te.valObjectMeta=Mi.valObjectMeta;te.coerce=Mi.coerce;te.coerce2=Mi.coerce2;te.coerceFont=Mi.coerceFont;te.coercePattern=Mi.coercePattern;te.coerceHoverinfo=Mi.coerceHoverinfo;te.coerceSelectionMarkerOpacity=Mi.coerceSelectionMarkerOpacity;te.validate=Mi.validate;var Jr=ox;te.dateTime2ms=Jr.dateTime2ms;te.isDateTime=Jr.isDateTime;te.ms2DateTime=Jr.ms2DateTime;te.ms2DateTimeLocal=Jr.ms2DateTimeLocal;te.cleanDate=Jr.cleanDate;te.isJSDate=Jr.isJSDate;te.formatDate=Jr.formatDate;te.incrementMonth=Jr.incrementMonth;te.dateTick0=Jr.dateTick0;te.dfltRange=Jr.dfltRange;te.findExactDates=Jr.findExactDates;te.MIN_MS=Jr.MIN_MS;te.MAX_MS=Jr.MAX_MS;var vn=Gd;te.findBin=vn.findBin;te.sorterAsc=vn.sorterAsc;te.sorterDes=vn.sorterDes;te.distinctVals=vn.distinctVals;te.roundUp=vn.roundUp;te.sort=vn.sort;te.findIndexOfMin=vn.findIndexOfMin;te.sortObjectKeys=Ud;var Si=yx;te.aggNums=Si.aggNums;te.len=Si.len;te.mean=Si.mean;te.median=Si.median;te.midRange=Si.midRange;te.variance=Si.variance;te.stdev=Si.stdev;te.interp=Si.interp;var Sa=Vf;te.init2dArray=Sa.init2dArray;te.transposeRagged=Sa.transposeRagged;te.dot=Sa.dot;te.translationMatrix=Sa.translationMatrix;te.rotationMatrix=Sa.rotationMatrix;te.rotationXYMatrix=Sa.rotationXYMatrix;te.apply3DTransform=Sa.apply3DTransform;te.apply2DTransform=Sa.apply2DTransform;te.apply2DTransform2=Sa.apply2DTransform2;te.convertCssMatrix=Sa.convertCssMatrix;te.inverseTransformMatrix=Sa.inverseTransformMatrix;var ja=eA;te.deg2rad=ja.deg2rad;te.rad2deg=ja.rad2deg;te.angleDelta=ja.angleDelta;te.angleDist=ja.angleDist;te.isFullCircle=ja.isFullCircle;te.isAngleInsideSector=ja.isAngleInsideSector;te.isPtInsideSector=ja.isPtInsideSector;te.pathArc=ja.pathArc;te.pathSector=ja.pathSector;te.pathAnnulus=ja.pathAnnulus;var mo=fn;te.isLeftAnchor=mo.isLeftAnchor;te.isCenterAnchor=mo.isCenterAnchor;te.isRightAnchor=mo.isRightAnchor;te.isTopAnchor=mo.isTopAnchor;te.isMiddleAnchor=mo.isMiddleAnchor;te.isBottomAnchor=mo.isBottomAnchor;var yo=cn;te.segmentsIntersect=yo.segmentsIntersect;te.segmentDistance=yo.segmentDistance;te.getTextLocation=yo.getTextLocation;te.clearLocationCache=yo.clearLocationCache;te.getVisibleSegment=yo.getVisibleSegment;te.findPointOnPath=yo.findPointOnPath;var Wf=er;te.extendFlat=Wf.extendFlat;te.extendDeep=Wf.extendDeep;te.extendDeepAll=Wf.extendDeepAll;te.extendDeepNoArrays=Wf.extendDeepNoArrays;var Xd=sn.exports;te.log=Xd.log;te.warn=Xd.warn;te.error=Xd.error;var TA=ho;te.counterRegex=TA.counter;var Yd=Yf;te.throttle=Yd.throttle;te.throttleDone=Yd.done;te.clearThrottle=Yd.clear;var Ga=Bd;te.getGraphDiv=Ga.getGraphDiv;te.isPlotDiv=Ga.isPlotDiv;te.removeElement=Ga.removeElement;te.addStyleRule=Ga.addStyleRule;te.addRelatedStyleRule=Ga.addRelatedStyleRule;te.deleteRelatedStyleRule=Ga.deleteRelatedStyleRule;te.getFullTransformMatrix=Ga.getFullTransformMatrix;te.getElementTransformMatrix=Ga.getElementTransformMatrix;te.getElementAndAncestors=Ga.getElementAndAncestors;te.equalDomRects=Ga.equalDomRects;te.clearResponsive=tA;te.preserveDrawingBuffer=iA;te.makeTraceGroups=lA;te._=fA;te.notifier=cx;te.filterUnique=cA;te.filterVisible=uA;te.pushUnique=ux;te.increment=pA;te.cleanNumber=bA;te.ensureNumber=function(e){return wx(e)?(e=Number(e),e>kx||e<wA?xp:e):xp};te.isIndex=function(t,e){return e!==void 0&&t>=e?!1:wx(t)&&t>=0&&t%1===0};te.noop=Od;te.identity=mx;te.repeat=function(t,e){for(var r=new Array(e),a=0;a<e;a++)r[a]=t;return r};te.swapAttrs=function(t,e,r,a){r||(r="x"),a||(a="y");for(var i=0;i<e.length;i++){var n=e[i],o=te.nestedProperty(t,n.replace("?",r)),l=te.nestedProperty(t,n.replace("?",a)),s=o.get();o.set(l.get()),l.set(s)}};te.raiseToTop=function(e){e.parentNode.appendChild(e)};te.cancelTransition=function(t){return t.transition().duration(0)};te.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))};te.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};te.simpleMap=function(t,e,r,a,i){for(var n=t.length,o=new Array(n),l=0;l<n;l++)o[l]=e(t[l],r,a,i);return o};te.randstr=function t(e,r,a,i){if(a||(a=16),r===void 0&&(r=24),r<=0)return"0";var n=Math.log(Math.pow(2,r))/Math.log(a),o="",l,s,f;for(l=2;n===1/0;l*=2)n=Math.log(Math.pow(2,r/l))/Math.log(a)*l;var c=n-Math.floor(n);for(l=0;l<Math.floor(n);l++)f=Math.floor(Math.random()*a).toString(a),o=f+o;c&&(s=Math.pow(a,c),f=Math.floor(Math.random()*s).toString(a),o=f+o);var v=parseInt(o,a);return e&&e[o]||v!==1/0&&v>=Math.pow(2,r)?i>10?(te.warn("randstr failed uniqueness"),o):t(e,r,a,(i||0)+1):o};te.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={};return r.optionList=[],r._newoption=function(a){a[e]=t,r[a.name]=a,r.optionList.push(a)},r["_"+e]=t,r};te.smooth=function(t,e){if(e=Math.round(e)||0,e<2)return t;var r=t.length,a=2*r,i=2*e-1,n=new Array(i),o=new Array(r),l,s,f,c;for(l=0;l<i;l++)n[l]=(1-Math.cos(Math.PI*(l+1)/e))/(2*e);for(l=0;l<r;l++){for(c=0,s=0;s<i;s++)f=l+s+1-e,f<-r?f-=a*Math.round(f/a):f>=a&&(f-=a*Math.floor(f/a)),f<0?f=-1-f:f>=r&&(f=a-1-f),c+=t[f]*n[s];o[l]=c}return o};te.syncOrAsync=function(t,e,r){var a,i;function n(){return te.syncOrAsync(t,e,r)}for(;t.length;)if(i=t.splice(0,1)[0],a=i(e),a&&a.then)return a.then(n);return r&&r(e)};te.stripTrailingSlash=function(t){return t.substr(-1)==="/"?t.substr(0,t.length-1):t};te.noneOrAll=function(t,e,r){if(!!t){var a=!1,i=!0,n,o;for(n=0;n<r.length;n++)o=t[r[n]],o!=null?a=!0:i=!1;if(a&&!i)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}};te.mergeArray=function(t,e,r,a){var i=typeof a=="function";if(te.isArrayOrTypedArray(t))for(var n=Math.min(t.length,e.length),o=0;o<n;o++){var l=t[o];e[o][r]=i?a(l):l}};te.mergeArrayCastPositive=function(t,e,r){return te.mergeArray(t,e,r,function(a){var i=+a;return isFinite(i)&&i>0?i:0})};te.fillArray=function(t,e,r,a){if(a=a||te.identity,te.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=a(t[i])};te.castOption=function(t,e,r,a){a=a||te.identity;var i=te.nestedProperty(t,r).get();return te.isArrayOrTypedArray(i)?Array.isArray(e)&&te.isArrayOrTypedArray(i[e[0]])?a(i[e[0]][e[1]]):a(i[e]):i};te.extractOption=function(t,e,r,a){if(r in t)return t[r];var i=te.nestedProperty(e,a).get();if(!Array.isArray(i))return i};function Mx(t){var e={};for(var r in t)for(var a=t[r],i=0;i<a.length;i++)e[a[i]]=+r;return e}te.tagSelected=function(t,e,r){var a=e.selectedpoints,i=e._indexToPoints,n;i&&(n=Mx(i));function o(v){return v!==void 0&&v<t.length}for(var l=0;l<a.length;l++){var s=a[l];if(te.isIndex(s)||te.isArrayOrTypedArray(s)&&te.isIndex(s[0])&&te.isIndex(s[1])){var f=n?n[s]:s,c=r?r[f]:f;o(c)&&(t[c].selected=1)}}};te.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var a=Mx(r),i=[],n=0;n<e.length;n++){var o=e[n];if(te.isIndex(o)){var l=a[o];te.isIndex(l)&&i.push(l)}}return i}else return e};te.getTargetArray=function(t,e){var r=e.target;if(typeof r=="string"&&r){var a=te.nestedProperty(t,r).get();return Array.isArray(a)?a:!1}else if(Array.isArray(r))return r;return!1};te.minExtend=function(t,e){var r={};typeof e!="object"&&(e={});var a=3,i=Object.keys(t),n,o,l;for(n=0;n<i.length;n++)o=i[n],l=t[o],!(o.charAt(0)==="_"||typeof l=="function")&&(o==="module"?r[o]=l:Array.isArray(l)?o==="colorscale"?r[o]=l.slice():r[o]=l.slice(0,a):te.isTypedArray(l)?r[o]=l.subarray(0,a):l&&typeof l=="object"?r[o]=te.minExtend(t[o],e[o]):r[o]=l);for(i=Object.keys(e),n=0;n<i.length;n++)o=i[n],l=e[o],(typeof l!="object"||!(o in r)||typeof r[o]!="object")&&(r[o]=l);return r};te.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)};te.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])!==-1)return!0;return!1};te.isIE=function(){return typeof window.navigator.msSaveBlob<"u"};var kA=/Version\/[\d\.]+.*Safari/;te.isSafari=function(){return kA.test(window.navigator.userAgent)};var AA=/iPad|iPhone|iPod/;te.isIOS=function(){return AA.test(window.navigator.userAgent)};var MA=/Firefox\/(\d+)\.\d+/;te.getFirefoxVersion=function(){var t=MA.exec(window.navigator.userAgent);if(t&&t.length===2){var e=parseInt(t[1]);if(!isNaN(e))return e}return null};te.isD3Selection=function(t){return t instanceof Ko.selection};te.ensureSingle=function(t,e,r,a){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var n=t.append(e);return r&&n.classed(r,!0),a&&n.call(a),n};te.ensureSingleById=function(t,e,r,a){var i=t.select(e+"#"+r);if(i.size())return i;var n=t.append(e).attr("id",r);return a&&n.call(a),n};te.objectFromPath=function(t,e){for(var r=t.split("."),a,i=a={},n=0;n<r.length;n++){var o=r[n],l=null,s=r[n].match(/(.*)\[([0-9]+)\]/);s?(o=s[1],l=s[2],a=a[o]=[],n===r.length-1?a[l]=e:a[l]={},a=a[l]):(n===r.length-1?a[o]=e:a[o]={},a=a[o])}return i};var SA=/^([^\[\.]+)\.(.+)?/,LA=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;te.expandObjectPaths=function(t){var e,r,a,i,n,o,l;if(typeof t=="object"&&!Array.isArray(t))for(r in t)t.hasOwnProperty(r)&&((e=r.match(SA))?(i=t[r],a=e[1],delete t[r],t[a]=te.extendDeepNoArrays(t[a]||{},te.objectFromPath(r,te.expandObjectPaths(i))[a])):(e=r.match(LA))?(i=t[r],a=e[1],n=parseInt(e[2]),delete t[r],t[a]=t[a]||[],e[3]==="."?(l=e[4],o=t[a][n]=t[a][n]||{},te.extendDeepNoArrays(o,te.objectFromPath(l,te.expandObjectPaths(i)))):t[a][n]=te.expandObjectPaths(i)):t[r]=te.expandObjectPaths(t[r]));return t};te.numSeparate=function(t,e,r){if(r||(r=!1),typeof e!="string"||e.length===0)throw new Error("Separator string required for formatting!");typeof t=="number"&&(t=String(t));var a=/(\d+)(\d{3})/,i=e.charAt(0),n=e.charAt(1),o=t.split("."),l=o[0],s=o.length>1?i+o[1]:"";if(n&&(o.length>1||l.length>4||r))for(;a.test(l);)l=l.replace(a,"$1"+n+"$2");return l+s};te.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Sx=/^\w*$/;te.templateString=function(t,e){var r={};return t.replace(te.TEMPLATE_STRING_REGEX,function(a,i){var n;return Sx.test(i)?n=e[i]:(r[i]=r[i]||te.nestedProperty(e,i).get,n=r[i]()),te.isValidTextValue(n)?n:""})};var CA={max:10,count:0,name:"hovertemplate"};te.hovertemplateString=function(){return Lx.apply(CA,arguments)};var DA={max:10,count:0,name:"texttemplate"};te.texttemplateString=function(){return Lx.apply(DA,arguments)};var wp=/^[:|\|]/;function Lx(t,e,r){var a=this,i=arguments;e||(e={});var n={};return t.replace(te.TEMPLATE_STRING_REGEX,function(o,l,s){var f=l==="xother"||l==="yother",c=l==="_xother"||l==="_yother",v=l==="_xother_"||l==="_yother_",u=l==="xother_"||l==="yother_",d=f||c||u||v,h=l;(c||v)&&(h=h.substring(1)),(u||v)&&(h=h.substring(0,h.length-1));var p;if(d){if(p=e[h],p===void 0)return""}else{var g,_;for(_=3;_<i.length;_++)if(g=i[_],!!g){if(g.hasOwnProperty(h)){p=g[h];break}if(Sx.test(h)||(p=te.nestedProperty(g,h).get(),p=n[h]||te.nestedProperty(g,h).get(),p&&(n[h]=p)),p!==void 0)break}}if(p===void 0&&a)return a.count<a.max&&(te.warn("Variable '"+h+"' in "+a.name+" could not be found!"),p=o),a.count===a.max&&te.warn("Too many "+a.name+" warnings - additional warnings will be suppressed"),a.count++,o;if(s){var b;if(s[0]===":"&&(b=r?r.numberFormat:te.numberFormat,p=b(s.replace(wp,""))(p)),s[0]==="|"){b=r?r.timeFormat:xA;var w=te.dateTime2ms(p);p=te.formatDate(w,s.replace(wp,""),!1,b)}}else{var m=h+"Label";e.hasOwnProperty(m)&&(p=e[m])}return d&&(p="("+p+")",(c||v)&&(p=" "+p),(u||v)&&(p=p+" ")),p})}var Jl=48,Tp=57;te.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,a=0,i=0,n=0;n<r;n++){var o=t.charCodeAt(n)||0,l=e.charCodeAt(n)||0,s=o>=Jl&&o<=Tp,f=l>=Jl&&l<=Tp;if(s&&(a=10*a+o-Jl),f&&(i=10*i+l-Jl),!s||!f){if(a!==i)return a-i;if(o!==l)return o-l}}return i-a};var Fn=2e9;te.seedPseudoRandom=function(){Fn=2e9};te.pseudoRandom=function(){var t=Fn;return Fn=(69069*Fn+1)%4294967296,Math.abs(Fn-t)<429496729?te.pseudoRandom():Fn/4294967296};te.fillText=function(t,e,r){var a=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=te.extractOption(t,e,"htx","hovertext");if(te.isValidTextValue(i))return a(i);var n=te.extractOption(t,e,"tx","text");if(te.isValidTextValue(n))return a(n)};te.isValidTextValue=function(t){return t||t===0};te.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",a=0;a<e;a++)r.indexOf(".")!==-1&&(r=r.replace("0%","%"),r=r.replace(".%","%"));return r};te.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||e==="none"};te.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""};te.strRotate=function(t){return t?"rotate("+t+")":""};te.strScale=function(t){return t!==1?"scale("+t+")":""};te.getTextTransform=function(t){var e=t.noCenter,r=t.textX,a=t.textY,i=t.targetX,n=t.targetY,o=t.anchorX||0,l=t.anchorY||0,s=t.rotate,f=t.scale;return f?f>1&&(f=1):f=0,te.strTranslate(i-f*(r+o),n-f*(a+l))+te.strScale(f)+(s?"rotate("+s+(e?"":" "+r+" "+a)+")":"")};te.ensureUniformFontSize=function(t,e){var r=te.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r};te.join2=function(t,e,r){var a=t.length;return a>1?t.slice(0,-1).join(e)+r+t[a-1]:t.join(e)};te.bigFont=function(t){return Math.round(1.2*t)};var kp=te.getFirefoxVersion(),EA=kp!==null&&kp<86;te.getPositionFromD3Event=function(){return EA?[Ko.event.layerX,Ko.event.layerY]:[Ko.event.offsetX,Ko.event.offsetY]};var $A=me.exports,Ap={"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:transparent;border:6px solid transparent;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 transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",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 Mp in Ap){var RA=Mp.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");$A.addStyleRule(RA,Ap[Mp])}var Wt={},Wd={},Dc=Ed.exports.EventEmitter,PA={init:function(t){if(t._ev instanceof Dc)return t;var e=new Dc,r=new Dc;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(a,i){typeof jQuery<"u"&&jQuery(t).trigger(a,i),e.emit(a,i),r.emit(a,i)},t},triggerHandler:function(t,e,r){var a,i;typeof jQuery<"u"&&(a=jQuery(t).triggerHandler(e,r));var n=t._ev;if(!n)return a;var o=n._events[e];if(!o)return a;function l(f){if(f.listener){if(n.removeListener(e,f.listener),!f.fired)return f.fired=!0,f.listener.apply(n,[r])}else return f.apply(n,[r])}o=Array.isArray(o)?o:[o];var s;for(s=0;s<o.length-1;s++)l(o[s]);return i=l(o[s]),a!==void 0?a:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}},Pl=PA,Sp=me.exports,zA=po.dfltConfig;function IA(t,e){for(var r=[],a,i=0;i<e.length;i++)a=e[i],a===t?r[i]=a:typeof a=="object"?r[i]=Array.isArray(a)?Sp.extendDeep([],a):Sp.extendDeepAll({},a):r[i]=a;return r}var Ja={};Ja.add=function(t,e,r,a,i){var n,o;if(t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},o=t.undoQueue.index,t.autoplay){t.undoQueue.inSequence||(t.autoplay=!1);return}!t.undoQueue.sequence||t.undoQueue.beginSequence?(n={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(o,t.undoQueue.queue.length-o,n),t.undoQueue.index+=1):n=t.undoQueue.queue[o-1],t.undoQueue.beginSequence=!1,n&&(n.undo.calls.unshift(e),n.undo.args.unshift(r),n.redo.calls.push(a),n.redo.args.push(i)),t.undoQueue.queue.length>zA.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)};Ja.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0};Ja.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1};Ja.undo=function(e){var r,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,r=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a<r.undo.calls.length;a++)Ja.plotDo(e,r.undo.calls[a],r.undo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1}};Ja.redo=function(e){var r,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index>=e.undoQueue.queue.length)){for(r=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a<r.redo.calls.length;a++)Ja.plotDo(e,r.redo.calls[a],r.redo.args[a]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}};Ja.plotDo=function(t,e,r){t.autoplay=!0,r=IA(t,r),e.apply(null,r)};var NA=Ja,go={},Cx={_isLinkedToArray:"frames_entry",group:{valType:"string",description:["An identifier that specifies the group to which the frame belongs,","used by animate to select a subset of frames."].join(" ")},name:{valType:"string",description:"A label by which to identify the frame"},traces:{valType:"any",description:["A list of trace indices that identify the respective traces in the","data attribute"].join(" ")},baseframe:{valType:"string",description:["The name of the frame into which this frame's properties are merged","before applying. This is used to unify properties and avoid needing","to specify the same values for the same properties in multiple frames."].join(" ")},data:{valType:"any",description:["A list of traces this frame modifies. The format is identical to the","normal trace definition."].join(" ")},layout:{valType:"any",description:["Layout properties which this frame modifies. The format is identical","to the normal layout definition."].join(" ")}},Dx=me.exports,Ex=Dx.extendFlat,FA=Dx.isPlainObject,$x={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"],description:["trace attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*clearAxisTypes* resets the types of the axes this trace is on, because new data could","cause the automatic axis type detection to change. Log type will not be cleared, as that","is never automatically chosen so must have been user-specified.","*plot* (re)plots but without first clearing `gd.calcdata`.","*style* only calls `module.style` (or module.editStyle) for all trace modules and redraws the legend.","*markerSize* is like *style*, but propagate axis-range changes due to scatter `marker.size`","*colorbars* only redraws colorbars."].join(" ")},Rx={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"],description:["layout attributes should include an `editType` string matching this flaglist.","*calc* is the most extensive: a full (re)plot starting by clearing `gd.calcdata`","to force it to be regenerated","*plot* (re)plots but without first clearing `gd.calcdata`.","*legend* only redraws the legend.","*ticks* only redraws axis ticks, labels, and gridlines.","*axrange* minimal sequence when updating axis ranges.","*layoutstyle* reapplies global and SVG cartesian axis styles.","*modebar* just updates the modebar.","*camera* just updates the camera settings for gl3d scenes.","*arraydraw* allows component arrays to invoke the redraw routines just for the","component(s) that changed.","*colorbars* only redraws colorbars."].join(" ")},HA=$x.flags.slice().concat(["fullReplot"]),OA=Rx.flags.slice().concat("layoutReplot"),Li={traces:$x,layout:Rx,traceFlags:function(){return Lp(HA)},layoutFlags:function(){return Lp(OA)},update:function(t,e){var r=e.editType;if(r&&r!=="none")for(var a=r.split("+"),i=0;i<a.length;i++)t[a[i]]=!0},overrideAll:Px};function Lp(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function Px(t,e,r){var a=Ex({},t);for(var i in a){var n=a[i];FA(n)&&(a[i]=zx(n,e,r,i))}return r==="from-root"&&(a.editType=e),a}function zx(t,e,r,a){if(t.valType){var i=Ex({},t);if(i.editType=e,Array.isArray(t.items)){i.items=new Array(t.items.length);for(var n=0;n<t.items.length;n++)i.items[n]=zx(t.items[n],e)}return i}else return Px(t,e,a.charAt(0)==="_"?"nested":"from-root")}(function(t){var e=We,r=me.exports,a=Ba,i=Rl,n=Cx,o=qf,l=po.configAttributes,s=Li,f=r.extendDeepAll,c=r.isPlainObject,v=r.isArrayOrTypedArray,u=r.nestedProperty,d=r.valObjectMeta,h="_isSubplotObj",p="_isLinkedToArray",g="_arrayAttrRegexps",_="_deprecated",b=[h,p,g,_];t.IS_SUBPLOT_OBJ=h,t.IS_LINKED_TO_ARRAY=p,t.DEPRECATED=_,t.UNDERSCORE_ATTRS=b,t.get=function(){var P={};e.allTypes.forEach(function(L){P[L]=x(L)});var R={};return Object.keys(e.transformsRegistry).forEach(function(L){R[L]=k(L)}),{defs:{valObjects:d,metaKeys:b.concat(["description","role","editType","impliedEdits"]),editType:{traces:s.traces,layout:s.layout},impliedEdits:{description:["Sometimes when an attribute is changed, other attributes","must be altered as well in order to achieve the intended","result. For example, when `range` is specified, it is","important to set `autorange` to `false` or the new `range`","value would be lost in the redraw. `impliedEdits` is the","mechanism to do this: `impliedEdits: {autorange: false}`.","Each key is a relative paths to the attribute string to","change, using *^* to ascend into the parent container,","for example `range[0]` has `impliedEdits: {*^autorange*: false}`.","A value of `undefined` means that the attribute will not be","changed, but its previous value should be recorded in case","we want to reverse this change later. For example, `autorange`","has `impliedEdits: {*range[0]*: undefined, *range[1]*:undefined}","because the range will likely be changed by redraw."].join(" ")}},traces:P,layout:T(),transforms:R,frames:S(),animation:A(o),config:A(l)}},t.crawl=function(P,R,L,C){var z=L||0;C=C||"",Object.keys(P).forEach(function(F){var H=P[F];if(b.indexOf(F)===-1){var B=(C?C+".":"")+F;R(H,F,P,z,B),!t.isValObject(H)&&c(H)&&F!=="impliedEdits"&&t.crawl(H,R,z+1,B)}})},t.isValObject=function(P){return P&&P.valType!==void 0},t.findArrayAttributes=function(P){var R=[],L=[],C=[],z,F;function H(K,Q,ee,ne){L=L.slice(0,ne).concat([Q]),C=C.slice(0,ne).concat([K&&K._isLinkedToArray]);var le=K&&(K.valType==="data_array"||K.arrayOk===!0)&&!(L[ne-1]==="colorbar"&&(Q==="ticktext"||Q==="tickvals"));!le||B(z,0,"")}function B(K,Q,ee){var ne=K[L[Q]],le=ee+L[Q];if(Q===L.length-1)v(ne)&&R.push(F+le);else if(C[Q]){if(Array.isArray(ne))for(var se=0;se<ne.length;se++)c(ne[se])&&B(ne[se],Q+1,le+"["+se+"].")}else c(ne)&&B(ne,Q+1,le+".")}z=P,F="",t.crawl(a,H),P._module&&P._module.attributes&&t.crawl(P._module.attributes,H);var O=P.transforms;if(O)for(var W=0;W<O.length;W++){var j=O[W],Z=j._module;Z&&(F="transforms["+W+"].",z=j,t.crawl(Z.attributes,H))}return R},t.getTraceValObject=function(P,R){var L=R[0],C=1,z,F;if(L==="transforms"){if(R.length===1)return a.transforms;var H=P.transforms;if(!Array.isArray(H)||!H.length)return!1;var B=R[1];if(!y(B)||B>=H.length)return!1;z=(e.transformsRegistry[H[B].type]||{}).attributes,F=z&&z[R[2]],C=3}else{var O=P._module;if(O||(O=(e.modules[P.type||a.type.dflt]||{})._module),!O)return!1;if(z=O.attributes,F=z&&z[L],!F){var W=O.basePlotModule;W&&W.attributes&&(F=W.attributes[L])}F||(F=a[L])}return m(F,R,C)},t.getLayoutValObject=function(P,R){var L=w(P,R[0]);return m(L,R,1)};function w(P,R){var L,C,z,F,H=P._basePlotModules;if(H){var B;for(L=0;L<H.length;L++){if(z=H[L],z.attrRegex&&z.attrRegex.test(R)){if(z.layoutAttrOverrides)return z.layoutAttrOverrides;!B&&z.layoutAttributes&&(B=z.layoutAttributes)}var O=z.baseLayoutAttrOverrides;if(O&&R in O)return O[R]}if(B)return B}var W=P._modules;if(W){for(L=0;L<W.length;L++)if(F=W[L].layoutAttributes,F&&R in F)return F[R]}for(C in e.componentsRegistry){if(z=e.componentsRegistry[C],z.name==="colorscale"&&R.indexOf("coloraxis")===0)return z.layoutAttributes[R];if(!z.schema&&R===z.name)return z.layoutAttributes}return R in i?i[R]:!1}function m(P,R,L){if(!P)return!1;if(P._isLinkedToArray){if(y(R[L]))L++;else if(L<R.length)return!1}for(;L<R.length;L++){var C=P[R[L]];if(c(C))P=C;else break;if(L===R.length-1)break;if(P._isLinkedToArray){if(L++,!y(R[L]))return!1}else if(P.valType==="info_array"){L++;var z=R[L];if(!y(z))return!1;var F=P.items;if(Array.isArray(F)){if(z>=F.length)return!1;if(P.dimensions===2){if(L++,R.length===L)return P;var H=R[L];if(!y(H))return!1;P=F[z][H]}else P=F[z]}else P=F}}return P}function y(P){return P===Math.round(P)&&P>=0}function x(P){var R,L;R=e.modules[P]._module,L=R.basePlotModule;var C={};C.type=null;var z=f({},a),F=f({},R.attributes);t.crawl(F,function(O,W,j,Z,K){u(z,K).set(void 0),O===void 0&&u(F,K).set(void 0)}),f(C,z),e.traceIs(P,"noOpacity")&&delete C.opacity,e.traceIs(P,"showLegend")||(delete C.showlegend,delete C.legendgroup),e.traceIs(P,"noHover")&&(delete C.hoverinfo,delete C.hoverlabel),R.selectPoints||delete C.selectedpoints,f(C,F),L.attributes&&f(C,L.attributes),C.type=P;var H={meta:R.meta||{},categories:R.categories||{},animatable:Boolean(R.animatable),type:P,attributes:A(C)};if(R.layoutAttributes){var B={};f(B,R.layoutAttributes),H.layoutAttributes=A(B)}return R.animatable||t.crawl(H,function(O){t.isValObject(O)&&"anim"in O&&delete O.anim}),H}function T(){var P={},R,L;f(P,i);for(R in e.subplotsRegistry)if(L=e.subplotsRegistry[R],!!L.layoutAttributes)if(Array.isArray(L.attr))for(var C=0;C<L.attr.length;C++)$(P,L,L.attr[C]);else{var z=L.attr==="subplot"?L.name:L.attr;$(P,L,z)}for(R in e.componentsRegistry){L=e.componentsRegistry[R];var F=L.schema;if(F&&(F.subplots||F.layout)){var H=F.subplots;if(H&&H.xaxis&&!H.yaxis)for(var B in H.xaxis)delete P.yaxis[B]}else L.name==="colorscale"?f(P,L.layoutAttributes):L.layoutAttributes&&I(P,L.layoutAttributes,L.name)}return{layoutAttributes:A(P)}}function k(P){var R=e.transformsRegistry[P],L=f({},R.attributes);return Object.keys(e.componentsRegistry).forEach(function(C){var z=e.componentsRegistry[C];z.schema&&z.schema.transforms&&z.schema.transforms[P]&&Object.keys(z.schema.transforms[P]).forEach(function(F){I(L,z.schema.transforms[P][F],F)})}),{attributes:A(L)}}function S(){var P={frames:f({},n)};return A(P),P.frames}function A(P){return E(P),M(P),D(P),P}function E(P){function R(C){return{valType:"string",description:"Sets the source reference on Chart Studio Cloud for `"+C+"`.",editType:"none"}}function L(C,z,F){t.isValObject(C)?(C.arrayOk===!0||C.valType==="data_array")&&(F[z+"src"]=R(z)):c(C)&&(C.role="object")}t.crawl(P,L)}function M(P){function R(L,C,z){if(!!L){var F=L[p];!F||(delete L[p],z[C]={items:{}},z[C].items[F]=L,z[C].role="object")}}t.crawl(P,R)}function D(P){function R(L){for(var C in L)if(c(L[C]))R(L[C]);else if(Array.isArray(L[C]))for(var z=0;z<L[C].length;z++)R(L[C][z]);else L[C]instanceof RegExp&&(L[C]=L[C].toString())}R(P)}function $(P,R,L){var C=u(P,L),z=f({},R.layoutAttributes);z[h]=!0,C.set(z)}function I(P,R,L){var C=u(P,L);C.set(f(C.get()||{},R))}})(go);var ar={exports:{}},Ht={},Yn=me.exports,BA=Ba,xi="templateitemname",zv={name:{valType:"string",editType:"none",description:["When used in a template, named items are created in the output figure","in addition to any items the figure already has in this array.","You can modify these items in the output figure by making your own","item with `templateitemname` matching this `name`","alongside your modifications (including `visible: false` or","`enabled: false` to hide it).","Has no effect outside of a template."].join(" ")}};zv[xi]={valType:"string",editType:"calc",description:["Used to refer to a named item in this array in the template. Named","items from the template will be created even without a matching item","in the input figure, but you can modify one by making an item with","`templateitemname` matching its `name`, alongside your modifications","(including `visible: false` or `enabled: false` to hide it).","If there is no template or no matching item, this item will be","hidden unless you explicitly show it with `visible: true`."].join(" ")};Ht.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=zv.name,e[xi]=zv[xi],e};Ht.traceTemplater=function(t){var e={},r,a;for(r in t)a=t[r],Array.isArray(a)&&a.length&&(e[r]=0);function i(n){r=Yn.coerce(n,{},BA,"type");var o={type:r,_template:null};if(r in e){a=t[r];var l=e[r]%a.length;e[r]++,o._template=a[l]}return o}return{newTrace:i}};Ht.newContainer=function(t,e,r){var a=t._template,i=a&&(a[e]||r&&a[r]);Yn.isPlainObject(i)||(i=null);var n=t[e]={_template:i};return n};Ht.arrayTemplater=function(t,e,r){var a=t._template,i=a&&a[Ix(e)],n=a&&a[e];(!Array.isArray(n)||!n.length)&&(n=[]);var o={};function l(f){var c={name:f.name,_input:f},v=c[xi]=f[xi];if(!Cp(v))return c._template=i,c;for(var u=0;u<n.length;u++){var d=n[u];if(d.name===v)return o[v]=1,c._template=d,c}return c[r]=f[r]||!1,c._template=!1,c}function s(){for(var f=[],c=0;c<n.length;c++){var v=n[c],u=v.name;if(Cp(u)&&!o[u]){var d={_template:v,name:u,_input:{_templateitemname:u}};d[xi]=v[xi],f.push(d),o[u]=1}}return f}return{newItem:l,defaultItems:s}};function Cp(t){return t&&typeof t=="string"}function Ix(t){var e=t.length-1;return t.charAt(e)!=="s"&&Yn.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}Ht.arrayDefaultKey=Ix;Ht.arrayEditor=function(t,e,r){var a=(Yn.nestedProperty(t,e).get()||[]).length,i=r._index,n=i>=a&&(r._input||{})._templateitemname;n&&(i=a);var o=e+"["+i+"]",l;function s(){l={},n&&(l[o]={},l[o][xi]=n)}s();function f(d,h){l[d]=h}function c(d,h){n?Yn.nestedProperty(l[o],d).set(h):l[o+"."+d]=h}function v(){var d=l;return s(),d}function u(d,h){d&&c(d,h);var p=v();for(var g in p)Yn.nestedProperty(t,g).set(p[g])}return{modifyBase:f,modifyItem:c,getUpdateObj:v,applyUpdate:u}};var ir={},Co=ho.counter,$r={idRegex:{x:Co("x","( domain)?"),y:Co("y","( domain)?")},attrRegex:Co("[xy]axis"),xAxisMatch:Co("xaxis"),yAxisMatch:Co("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,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:"-select",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}};(function(t){var e=We,r=$r;t.id2name=function(n){if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))){var o=n.split(" ")[0].substr(1);return o==="1"&&(o=""),n.charAt(0)+"axis"+o}},t.name2id=function(n){if(!!n.match(r.AX_NAME_PATTERN)){var o=n.substr(5);return o==="1"&&(o=""),n.charAt(0)+o}},t.cleanId=function(n,o,l){var s=/( domain)$/.test(n);if(!(typeof n!="string"||!n.match(r.AX_ID_PATTERN))&&!(o&&n.charAt(0)!==o)&&!(s&&!l)){var f=n.split(" ")[0].substr(1).replace(/^0+/,"");return f==="1"&&(f=""),n.charAt(0)+f+(s&&l?" domain":"")}},t.list=function(i,n,o){var l=i._fullLayout;if(!l)return[];var s=t.listIds(i,n),f=new Array(s.length),c;for(c=0;c<s.length;c++){var v=s[c];f[c]=l[v.charAt(0)+"axis"+v.substr(1)]}if(!o){var u=l._subplots.gl3d||[];for(c=0;c<u.length;c++){var d=l[u[c]];n?f.push(d[n+"axis"]):f.push(d.xaxis,d.yaxis,d.zaxis)}}return f},t.listIds=function(i,n){var o=i._fullLayout;if(!o)return[];var l=o._subplots;return n?l[n+"axis"]:l.xaxis.concat(l.yaxis)},t.getFromId=function(i,n,o){var l=i._fullLayout;return n=n===void 0||typeof n!="string"?n:n.replace(" domain",""),o==="x"?n=n.replace(/y[0-9]*/,""):o==="y"&&(n=n.replace(/x[0-9]*/,"")),l[t.id2name(n)]},t.getFromTrace=function(i,n,o){var l=i._fullLayout,s=null;if(e.traceIs(n,"gl3d")){var f=n.scene;f.substr(0,5)==="scene"&&(s=l[f][o+"axis"])}else s=t.getFromId(i,n[o+"axis"]||o);return s},t.idSort=function(i,n){var o=i.charAt(0),l=n.charAt(0);return o!==l?o>l?1:-1:+(i.substr(1)||1)-+(n.substr(1)||1)},t.ref2id=function(i){return/^[xyz]/.test(i)?i.split(" ")[0]:!1};function a(i,n){if(n&&n.length){for(var o=0;o<n.length;o++)if(n[o][i])return!0}return!1}t.isLinked=function(i,n){return a(n,i._axisMatchGroups)||a(n,i._axisConstraintGroups)}})(ir);function jA(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()}function GA(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._drawing=!1}var zl={clearOutlineControllers:jA,clearSelect:GA},Il={},rl=We,UA=$r.SUBPLOT_PATTERN;Il.getSubplotCalcData=function(t,e,r){var a=rl.subplotsRegistry[e];if(!a)return[];for(var i=a.attr,n=[],o=0;o<t.length;o++){var l=t[o],s=l[0].trace;s[i]===r&&n.push(l)}return n};Il.getModuleCalcData=function(t,e){var r=[],a=[],i;if(typeof e=="string"?i=rl.getModule(e).plot:typeof e=="function"?i=e:i=e.plot,!i)return[r,t];for(var n=0;n<t.length;n++){var o=t[n],l=o[0].trace;l.visible!==!0||l._length===0||(l._module.plot===i?r.push(o):a.push(o))}return[r,a]};Il.getSubplotData=function(e,r,a){if(!rl.subplotsRegistry[r])return[];var i=rl.subplotsRegistry[r].attr,n=[],o,l,s;if(r==="gl2d"){var f=a.match(UA);l="x"+f[1],s="y"+f[2]}for(var c=0;c<e.length;c++)o=e[c],r==="gl2d"&&rl.traceIs(o,"gl2d")?o[i[0]]===l&&o[i[1]]===s&&n.push(o):o[i]===a&&n.push(o);return n};var Ec={},Dp;function VA(){return Dp||(Dp=1,function(t){var e=We,r=me.exports;t.manageCommandObserver=function(s,f,c,v){var u={},d=!0;f&&f._commandObserver&&(u=f._commandObserver),u.cache||(u.cache={}),u.lookupTable={};var h=t.hasSimpleAPICommandBindings(s,c,u.lookupTable);if(f&&f._commandObserver){if(h)return u;if(f._commandObserver.remove)return f._commandObserver.remove(),f._commandObserver=null,u}if(h){a(s,h,u.cache),u.check=function(){if(!!d){var b=a(s,h,u.cache);return b.changed&&v&&u.lookupTable[b.value]!==void 0&&(u.disable(),Promise.resolve(v({value:b.value,type:h.type,prop:h.prop,traces:h.traces,index:u.lookupTable[b.value]})).then(u.enable,u.enable)),b.changed}};for(var p=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],g=0;g<p.length;g++)s._internalOn(p[g],u.check);u.remove=function(){for(var _=0;_<p.length;_++)s._removeInternalListener(p[_],u.check)}}else r.log("Unable to automatically bind plot updates to API command"),u.lookupTable={},u.remove=function(){};return u.disable=function(){d=!1},u.enable=function(){d=!0},f&&(f._commandObserver=u),u},t.hasSimpleAPICommandBindings=function(s,f,c){var v,u=f.length,d;for(v=0;v<u;v++){var h,p=f[v],g=p.method,_=p.args;if(Array.isArray(_)||(_=[]),!g)return!1;var b=t.computeAPICommandBindings(s,g,_);if(b.length!==1)return!1;if(!d)d=b[0],Array.isArray(d.traces)&&d.traces.sort();else{if(h=b[0],h.type!==d.type||h.prop!==d.prop)return!1;if(Array.isArray(d.traces))if(Array.isArray(h.traces)){h.traces.sort();for(var w=0;w<d.traces.length;w++)if(d.traces[w]!==h.traces[w])return!1}else return!1;else if(h.prop!==d.prop)return!1}h=b[0];var m=h.value;if(Array.isArray(m))if(m.length===1)m=m[0];else return!1;c&&(c[m]=v)}return d};function a(s,f,c){var v,u,d,h=!1;if(f.type==="data")v=s._fullData[f.traces!==null?f.traces[0]:0];else if(f.type==="layout")v=s._fullLayout;else return!1;return u=r.nestedProperty(v,f.prop).get(),d=c[f.type]=c[f.type]||{},d.hasOwnProperty(f.prop)&&d[f.prop]!==u&&(h=!0),d[f.prop]=u,{changed:h,value:u}}t.executeAPICommand=function(s,f,c){if(f==="skip")return Promise.resolve();var v=e.apiMethodRegistry[f],u=[s];Array.isArray(c)||(c=[]);for(var d=0;d<c.length;d++)u.push(c[d]);return v.apply(null,u).catch(function(h){return r.warn("API call to Plotly."+f+" rejected.",h),Promise.reject(h)})},t.computeAPICommandBindings=function(s,f,c){var v;switch(Array.isArray(c)||(c=[]),f){case"restyle":v=o(s,c);break;case"relayout":v=n(s,c);break;case"update":v=o(s,[c[0],c[2]]).concat(n(s,[c[1]]));break;case"animate":v=i(s,c);break;default:v=[]}return v};function i(s,f){return Array.isArray(f[0])&&f[0].length===1&&["string","number"].indexOf(typeof f[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:f[0][0].toString()}]:[]}function n(s,f){var c=[],v=f[0],u={};if(typeof v=="string")u[v]=f[1];else if(r.isPlainObject(v))u=v;else return c;return l(u,function(d,h,p){c.push({type:"layout",prop:d,value:p})},"",0),c}function o(s,f){var c,v,u,d,h=[];if(v=f[0],u=f[1],c=f[2],d={},typeof v=="string")d[v]=u;else if(r.isPlainObject(v))d=v,c===void 0&&(c=u);else return h;return c===void 0&&(c=null),l(d,function(p,g,_){var b,w;if(Array.isArray(_)){w=_.slice();var m=Math.min(w.length,s.data.length);c&&(m=Math.min(m,c.length)),b=[];for(var y=0;y<m;y++)b[y]=c?c[y]:y}else w=_,b=c?c.slice():null;if(b===null)Array.isArray(w)&&(w=w[0]);else if(Array.isArray(b)){if(!Array.isArray(w)){var x=w;w=[];for(var T=0;T<b.length;T++)w[T]=x}w.length=Math.min(b.length,w.length)}h.push({type:"data",prop:p,traces:b,value:w})},"",0),h}function l(s,f,c,v){Object.keys(s).forEach(function(u){var d=s[u];if(u[0]!=="_"){var h=c+(v>0?".":"")+u;r.isPlainObject(d)?l(d,f,h,v+1):f(h,u,d)}})}}(Ec)),Ec}var Nx=ct.exports,qA=ul.timeFormatLocale,XA=jb.formatLocale,sf=gt,Ct=We,Fx=go,YA=Ht,Ne=me.exports,Hx=ft.exports,Ep=Jt.BADNUM,Wr=ir,WA=zl.clearSelect,Zd=qf,ZA=Cx,KA=Il.getModuleCalcData,Iv=Ne.relinkPrivateKeys,yn=Ne._,Ee=ar.exports={};Ne.extendFlat(Ee,Ct);Ee.attributes=Ba;Ee.attributes.type.values=Ee.allTypes;Ee.fontAttrs=Dr;Ee.layoutAttributes=Rl;Ee.fontWeight="normal";var Zf=Ee.transformsRegistry,Kf=VA();Ee.executeAPICommand=Kf.executeAPICommand;Ee.computeAPICommandBindings=Kf.computeAPICommandBindings;Ee.manageCommandObserver=Kf.manageCommandObserver;Ee.hasSimpleAPICommandBindings=Kf.hasSimpleAPICommandBindings;Ee.redrawText=function(t){return t=Ne.getGraphDiv(t),new Promise(function(e){setTimeout(function(){!t._fullLayout||(Ct.getComponentMethod("annotations","draw")(t),Ct.getComponentMethod("legend","draw")(t),Ct.getComponentMethod("colorbar","draw")(t),e(Ee.previousPromises(t)))},300)})};Ee.resize=function(t){t=Ne.getGraphDiv(t);var e,r=new Promise(function(a,i){(!t||Ne.isHidden(t))&&i(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=a,t._redrawTimer=setTimeout(function(){if(!t.layout||t.layout.width&&t.layout.height||Ne.isHidden(t)){a(t);return}delete t.layout.width,delete t.layout.height;var n=t.changed;t.autoplay=!0,Ct.call("relayout",t,{autosize:!0}).then(function(){t.changed=n,t._resolveResize===a&&(delete t._resolveResize,a(t))})},100)});return e&&e(r),r};Ee.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then(function(){t._promises=[]})};Ee.addLinks=function(t){if(!(!t._context.showLink&&!t._context.showSources)){var e=t._fullLayout,r=Ne.ensureSingle(e._paper,"text","js-plot-link-container",function(s){s.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Hx.defaultLine,"pointer-events":"all"}).each(function(){var f=Nx.select(this);f.append("tspan").classed("js-link-to-tool",!0),f.append("tspan").classed("js-link-spacer",!0),f.append("tspan").classed("js-sourcelinks",!0)})}),a=r.node(),i={y:e._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=e.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=e._paper.attr("width")-7),r.attr(i);var n=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&QA(t,n),o.text(n.text()&&l.text()?" - ":"")}};function QA(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(){Ee.sendDataToCloud(t)});else{var a=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+a[2].split(".")[0]+"/"+a[1]+i})}}Ee.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(!!e){t.emit("plotly_beforeexport");var r=Nx.select(t).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"}),i=a.append("input").attr({type:"text",name:"data"});return i.node().value=Ee.graphJson(t,!1,"keepdata"),a.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var JA=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],eM=["year","month","dayMonth","dayMonthYear"];Ee.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,a=t._fullLayout||{};if(a._skipDefaults){delete a._skipDefaults;return}var i=t._fullLayout={},n=t.layout||{},o=t._fullData||[],l=t._fullData=[],s=t.data||[],f=t.calcdata||[],c=t._context||{},v;t._transitionData||Ee.createTransitionData(t),i._dfltTitle={plot:yn(t,"Click to enter Plot title"),x:yn(t,"Click to enter X axis title"),y:yn(t,"Click to enter Y axis title"),colorbar:yn(t,"Click to enter Colorscale title"),annotation:yn(t,"new text")},i._traceWord=yn(t,"trace");var u=$p(t,JA);if(i._mapboxAccessToken=c.mapboxAccessToken,a._initialAutoSizeIsDone){var d=a.width,h=a.height;Ee.supplyLayoutGlobalDefaults(n,i,u),n.width||(i.width=d),n.height||(i.height=h),Ee.sanitizeMargins(i)}else{Ee.supplyLayoutGlobalDefaults(n,i,u);var p=!n.width||!n.height,g=i.autosize,_=c.autosizable,b=p&&(g||_);b?Ee.plotAutoSize(t,n,i):p&&Ee.sanitizeMargins(i),!g&&p&&(n.width=i.width,n.height=i.height)}i._d3locale=aM(u,i.separators),i._extraFormat=$p(t,eM),i._initialAutoSizeIsDone=!0,i._dataLength=s.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var w=i._subplots=rM(),m=i._splomAxes={x:{},y:{}},y=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=tM(o,s),i._globalTransforms=(t._context||{}).globalTransforms,Ee.supplyDataDefaults(s,l,n,i);var x=Object.keys(m.x),T=Object.keys(m.y);if(x.length>1&&T.length>1){for(Ct.getComponentMethod("grid","sizeDefaults")(n,i),v=0;v<x.length;v++)Ne.pushUnique(w.xaxis,x[v]);for(v=0;v<T.length;v++)Ne.pushUnique(w.yaxis,T[v]);for(var k in y)Ne.pushUnique(w.cartesian,k)}if(i._has=Ee._hasPlotType.bind(i),o.length===l.length)for(v=0;v<l.length;v++)Iv(l[v],o[v]);Ee.supplyLayoutModuleDefaults(n,i,l,t._transitionData);var S=i._visibleModules,A=[];for(v=0;v<S.length;v++){var E=S[v].crossTraceDefaults;E&&Ne.pushUnique(A,E)}for(v=0;v<A.length;v++)A[v](l,i);i._hasOnlyLargeSploms=i._basePlotModules.length===1&&i._basePlotModules[0].name==="splom"&&x.length>15&&T.length>15&&i.shapes.length===0&&i.images.length===0,Ee.linkSubplots(l,i,o,a),Ee.cleanPlot(l,i,o,a);var M=!!(a._has&&a._has("gl2d")),D=!!(i._has&&i._has("gl2d")),$=!!(a._has&&a._has("cartesian")),I=!!(i._has&&i._has("cartesian")),P=$||M,R=I||D;P&&!R?a._bgLayer.remove():R&&!P&&(i._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&WA({_fullLayout:a}),iM(l,i),Iv(i,a),Ct.getComponentMethod("colorscale","crossTraceDefaults")(l,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var L=i._tracePreGUI,C={},z;for(z in L)C[z]="old";for(v=0;v<l.length;v++)z=l[v]._fullInput.uid,C[z]||(L[z]={}),C[z]="new";for(z in C)C[z]==="old"&&delete L[z];Bx(i),Ct.getComponentMethod("rangeslider","makeData")(i),!r&&f.length===l.length&&Ee.supplyDefaultsUpdateCalc(f,l)};Ee.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var a=e[r],i=(t[r]||[])[0];if(i&&i.trace){var n=i.trace;if(n._hasCalcTransform){var o=n._arrayAttrs,l,s,f;for(l=0;l<o.length;l++)s=o[l],f=Ne.nestedProperty(n,s).get().slice(),Ne.nestedProperty(a,s).set(f)}i.trace=a}}};function tM(t,e){var r=e.length,a=[],i,n;for(i=0;i<t.length;i++){var o=t[i]._fullInput;o!==n&&a.push(o),n=o}var l=a.length,s=new Array(r),f={};function c(d,h){s[h]=d,f[d]=1}function v(d,h){if(d&&typeof d=="string"&&!f[d])return c(d,h),!0}for(i=0;i<r;i++){var u=e[i].uid;typeof u=="number"&&(u=String(u)),!v(u,i)&&(i<l&&v(a[i].uid,i)||c(Ne.randstr(f),i))}return s}function rM(){var t=Ct.collectableSubplotTypes,e={},r,a;if(!t){t=[];var i=Ct.subplotsRegistry;for(var n in i){var o=i[n],l=o.attr;if(l&&(t.push(n),Array.isArray(l)))for(a=0;a<l.length;a++)Ne.pushUnique(t,l[a])}}for(r=0;r<t.length;r++)e[t[r]]=[];return e}function $p(t,e){var r=t._context.locale;r||(r="en-US");var a=!1,i={};function n(v){for(var u=!0,d=0;d<e.length;d++){var h=e[d];i[h]||(v[h]?i[h]=v[h]:u=!1)}u&&(a=!0)}for(var o=0;o<2;o++){for(var l=t._context.locales,s=0;s<2;s++){var f=(l[r]||{}).format;if(f&&(n(f),a))break;l=Ct.localeRegistry}var c=r.split("-")[0];if(a||c===r)break;r=c}return a||n(Ct.localeRegistry.en.format),i}function aM(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(r){try{r=XA(t).format(Ne.adjustFormat(r))}catch{return Ne.warnBadFormat(r),Ne.noFormat}return r},timeFormat:qA(t).utcFormat}}function iM(t,e){var r,a=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var n=t[i];n.meta?a[n.index]=n._meta={meta:n.meta}:e.meta&&(n._meta={meta:e.meta}),e.meta&&(n._meta.layout={meta:e.meta})}a.length&&(r||(r=e._meta={}),r.data=a)}Ee.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])};Ee._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var a=this._modules||[];for(e=0;e<a.length;e++){var i=a[e].name;if(i===t)return!0;var n=Ct.modules[i];if(n&&n.categories[t])return!0}return!1};Ee.cleanPlot=function(t,e,r,a){var i,n,o=a._basePlotModules||[];for(i=0;i<o.length;i++){var l=o[i];l.clean&&l.clean(t,e,r,a)}var s=a._has&&a._has("gl"),f=e._has&&e._has("gl");s&&!f&&a._glcontainer!==void 0&&(a._glcontainer.selectAll(".gl-canvas").remove(),a._glcontainer.selectAll(".no-webgl").remove(),a._glcanvas=null);var c=!!a._infolayer;e:for(i=0;i<r.length;i++){var v=r[i],u=v.uid;for(n=0;n<t.length;n++){var d=t[n];if(u===d.uid)continue e}c&&a._infolayer.select(".cb"+u).remove()}};Ee.linkSubplots=function(t,e,r,a){var i,n,o=a._plots||{},l=e._plots={},s=e._subplots,f={_fullData:t,_fullLayout:e},c=s.cartesian.concat(s.gl2d||[]);for(i=0;i<c.length;i++){var v=c[i],u=o[v],d=Wr.getFromId(f,v,"x"),h=Wr.getFromId(f,v,"y"),p;for(u?p=l[v]=u:(p=l[v]={},p.id=v),d._counterAxes.push(h._id),h._counterAxes.push(d._id),d._subplotsWith.push(v),h._subplotsWith.push(v),p.xaxis=d,p.yaxis=h,p._hasClipOnAxisFalse=!1,n=0;n<t.length;n++){var g=t[n];if(g.xaxis===p.xaxis._id&&g.yaxis===p.yaxis._id&&g.cliponaxis===!1){p._hasClipOnAxisFalse=!0;break}}}var _=Wr.list(f,null,!0),b;for(i=0;i<_.length;i++){b=_[i];var w=null;b.overlaying&&(w=Wr.getFromId(f,b.overlaying),w&&w.overlaying&&(b.overlaying=!1,w=null)),b._mainAxis=w||b,w&&(b.domain=w.domain.slice()),b._anchorAxis=b.anchor==="free"?null:Wr.getFromId(f,b.anchor)}for(i=0;i<_.length;i++)if(b=_[i],b._counterAxes.sort(Wr.idSort),b._subplotsWith.sort(Ne.subplotSort),b._mainSubplot=nM(b,e),b._counterAxes.length&&(b.spikemode&&b.spikemode.indexOf("across")!==-1||b.automargin&&b.mirror&&b.anchor!=="free"||Ct.getComponentMethod("rangeslider","isVisible")(b))){var m=1,y=0;for(n=0;n<b._counterAxes.length;n++){var x=Wr.getFromId(f,b._counterAxes[n]);m=Math.min(m,x.domain[0]),y=Math.max(y,x.domain[1])}m<y&&(b._counterDomainMin=m,b._counterDomainMax=y)}};function nM(t,e){var r={_fullLayout:e},a=t._id.charAt(0)==="x",i=t._mainAxis._anchorAxis,n="",o="",l="";if(i&&(l=i._mainAxis._id,n=a?t._id+l:l+t._id),!n||!e._plots[n]){n="";for(var s=t._counterAxes,f=0;f<s.length;f++){var c=s[f],v=a?t._id+c:c+t._id;o||(o=v);var u=Wr.getFromId(r,c);if(l&&u.overlaying===l){n=v;break}}}return n||o}Ee.clearExpandedTraceDefaultColors=function(t){var e,r,a;function i(o,l,s,f){r[f]=l,r.length=f+1,o.valType==="color"&&o.dflt===void 0&&e.push(r.join("."))}for(r=[],e=t._module._colorAttrs,e||(t._module._colorAttrs=e=[],Fx.crawl(t._module.attributes,i)),a=0;a<e.length;a++){var n=Ne.nestedProperty(t,"_input."+e[a]);n.get()||Ne.nestedProperty(t,e[a]).set(null)}};Ee.supplyDataDefaults=function(t,e,r,a){var i=a._modules,n=a._visibleModules,o=a._basePlotModules,l=0,s=0,f,c,v;a._transformModules=[];function u(T){e.push(T);var k=T._module;!k||(Ne.pushUnique(i,k),T.visible===!0&&Ne.pushUnique(n,k),Ne.pushUnique(o,T._module.basePlotModule),l++,T._input.visible!==!1&&s++)}var d={},h=[],p=(r.template||{}).data||{},g=YA.traceTemplater(p);for(f=0;f<t.length;f++){if(v=t[f],c=g.newTrace(v),c.uid=a._traceUids[f],Ee.supplyTraceDefaults(v,c,s,a,f),c.index=f,c._input=v,c._expandedIndex=l,c.transforms&&c.transforms.length)for(var _=v.visible!==!1&&c.visible===!1,b=oM(c,e,r,a),w=0;w<b.length;w++){var m=b[w],y={_template:c._template,type:c.type,uid:c.uid+w};_&&m.visible===!1&&delete m.visible,Ee.supplyTraceDefaults(m,y,l,a,f),Iv(y,m),y.index=f,y._input=v,y._fullInput=c,y._expandedIndex=l,y._expandedInput=m,u(y)}else c._fullInput=c,c._expandedInput=c,u(c);Ct.traceIs(c,"carpetAxis")&&(d[c.carpet]=c),Ct.traceIs(c,"carpetDependent")&&h.push(f)}for(f=0;f<h.length;f++)if(c=e[h[f]],!!c.visible){var x=d[c.carpet];if(c._carpet=x,!x||!x.visible){c.visible=!1;continue}c.xaxis=x.xaxis,c.yaxis=x.yaxis}};Ee.supplyAnimationDefaults=function(t){t=t||{};var e,r={};function a(i,n){return Ne.coerce(t||{},r,Zd,i,n)}if(a("mode"),a("direction"),a("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=Ee.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=Ee.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=Ee.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=Ee.supplyAnimationTransitionDefaults(t.transition||{});return r};Ee.supplyAnimationFrameDefaults=function(t){var e={};function r(a,i){return Ne.coerce(t||{},e,Zd.frame,a,i)}return r("duration"),r("redraw"),e};Ee.supplyAnimationTransitionDefaults=function(t){var e={};function r(a,i){return Ne.coerce(t||{},e,Zd.transition,a,i)}return r("duration"),r("easing"),e};Ee.supplyFrameDefaults=function(t){var e={};function r(a,i){return Ne.coerce(t,e,ZA,a,i)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e};Ee.supplyTraceDefaults=function(t,e,r,a,i){var n=a.colorway||Hx.defaults,o=n[r%n.length],l;function s(b,w){return Ne.coerce(t,e,Ee.attributes,b,w)}var f=s("visible");s("type"),s("name",a._traceWord+" "+i),s("uirevision",a.uirevision);var c=Ee.getModule(e);if(e._module=c,c){var v=c.basePlotModule,u=v.attr,d=v.attributes;if(u&&d){var h=a._subplots,p="";if(f||v.name!=="gl2d"){if(Array.isArray(u))for(l=0;l<u.length;l++){var g=u[l],_=Ne.coerce(t,e,d,g);h[g]&&Ne.pushUnique(h[g],_),p+=_}else p=Ne.coerce(t,e,d,u);h[v.name]&&Ne.pushUnique(h[v.name],p)}}}return f&&(s("customdata"),s("ids"),s("meta"),Ct.traceIs(e,"showLegend")?(Ne.coerce(t,e,c.attributes.showlegend?c.attributes:Ee.attributes,"showlegend"),s("legendgroup"),s("legendgrouptitle.text"),s("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,c&&c.supplyDefaults(t,e,o,a),Ct.traceIs(e,"noOpacity")||s("opacity"),Ct.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),Ct.traceIs(e,"noHover")||(e.hovertemplate||Ne.coerceHoverinfo(t,e,a),e.type!=="parcats"&&Ct.getComponentMethod("fx","supplyDefaults")(t,e,o,a)),c&&c.selectPoints&&s("selectedpoints"),Ee.supplyTransformDefaults(t,e,a)),e};function Ox(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var a=e[r],i=a._module||Zf[a.type];if(i&&i.makesData)return!0}return!1}Ee.hasMakesDataTransform=Ox;Ee.supplyTransformDefaults=function(t,e,r){if(!!(e._length||Ox(t))){var a=r._globalTransforms||[],i=r._transformModules||[];if(!(!Array.isArray(t.transforms)&&a.length===0))for(var n=t.transforms||[],o=a.concat(n),l=e.transforms=[],s=0;s<o.length;s++){var f=o[s],c=f.type,v=Zf[c],u,d=!(f._module&&f._module===v),h=v&&typeof v.transform=="function";v||Ne.warn("Unrecognized transform type "+c+"."),v&&v.supplyDefaults&&(d||h)?(u=v.supplyDefaults(f,e,r,t),u.type=c,u._module=v,Ne.pushUnique(i,v)):u=Ne.extendFlat({},f),l.push(u)}}};function oM(t,e,r,a){for(var i=t.transforms,n=[t],o=0;o<i.length;o++){var l=i[o],s=Zf[l.type];s&&s.transform&&(n=s.transform(n,{transform:l,fullTrace:t,fullData:e,layout:r,fullLayout:a,transformIndex:o}))}return n}Ee.supplyLayoutGlobalDefaults=function(t,e,r){function a(f,c){return Ne.coerce(t,e,Ee.layoutAttributes,f,c)}var i=t.template;Ne.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),a("autotypenumbers");var n=Ne.coerceFont(a,"font"),o=n.size;Ne.coerceFont(a,"title.font",Ne.extendFlat({},n,{size:Math.round(o*1.4)})),a("title.text",e._dfltTitle.plot),a("title.xref"),a("title.yref"),a("title.x"),a("title.y"),a("title.xanchor"),a("title.yanchor"),a("title.pad.t"),a("title.pad.r"),a("title.pad.b"),a("title.pad.l");var l=a("uniformtext.mode");l&&a("uniformtext.minsize"),a("autosize",!(t.width&&t.height)),a("width"),a("height"),a("margin.l"),a("margin.r"),a("margin.t"),a("margin.b"),a("margin.pad"),a("margin.autoexpand"),t.width&&t.height&&Ee.sanitizeMargins(e),Ct.getComponentMethod("grid","sizeDefaults")(t,e),a("paper_bgcolor"),a("separators",r.decimal+r.thousands),a("hidesources"),a("colorway"),a("datarevision");var s=a("uirevision");a("editrevision",s),a("selectionrevision",s),Ct.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),Ct.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,a),a("meta"),Ne.isPlainObject(t.transition)&&(a("transition.duration"),a("transition.easing"),a("transition.ordering")),Ct.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),Ct.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,a)};function es(t){return typeof t=="string"&&t.substr(t.length-2)==="px"&&parseFloat(t)}Ee.plotAutoSize=function(e,r,a){var i=e._context||{},n=i.frameMargins,o,l,s=Ne.isPlotDiv(e);if(s&&e.emit("plotly_autosize"),i.fillFrame)o=window.innerWidth,l=window.innerHeight,document.body.style.overflow="hidden";else{var f=s?window.getComputedStyle(e):{};if(o=es(f.width)||es(f.maxWidth)||a.width,l=es(f.height)||es(f.maxHeight)||a.height,sf(n)&&n>0){var c=1-2*n;o=Math.round(c*o),l=Math.round(c*l)}}var v=Ee.layoutAttributes.width.min,u=Ee.layoutAttributes.height.min;o<v&&(o=v),l<u&&(l=u);var d=!r.width&&Math.abs(a.width-o)>1,h=!r.height&&Math.abs(a.height-l)>1;(h||d)&&(d&&(a.width=o),h&&(a.height=l)),e._initialAutoSize||(e._initialAutoSize={width:o,height:l}),Ee.sanitizeMargins(a)};Ee.supplyLayoutModuleDefaults=function(t,e,r,a){var i=Ct.componentsRegistry,n=e._basePlotModules,o,l,s,f=Ct.subplotsRegistry.cartesian;for(o in i)s=i[o],s.includeBasePlot&&s.includeBasePlot(t,e);n.length||n.push(f),e._has("cartesian")&&(Ct.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e));for(var c in e._subplots)e._subplots[c].sort(Ne.subplotSort);for(l=0;l<n.length;l++)s=n[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var v=e._modules;for(l=0;l<v.length;l++)s=v[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r);var u=e._transformModules;for(l=0;l<u.length;l++)s=u[l],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r,a);for(o in i)s=i[o],s.supplyLayoutDefaults&&s.supplyLayoutDefaults(t,e,r)};Ee.purge=function(t){var e=t._fullLayout||{};e._glcontainer!==void 0&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),Ne.clearThrottle(),Ne.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()};Ee.style=function(t){var e=t._fullLayout._visibleModules,r=[],a;for(a=0;a<e.length;a++){var i=e[a];i.style&&Ne.pushUnique(r,i.style)}for(a=0;a<r.length;a++)r[a](t)};Ee.sanitizeMargins=function(t){if(!(!t||!t.margin)){var e=t.width,r=t.height,a=t.margin,i=e-(a.l+a.r),n=r-(a.t+a.b),o;i<0&&(o=(e-1)/(a.l+a.r),a.l=Math.floor(o*a.l),a.r=Math.floor(o*a.r)),n<0&&(o=(r-1)/(a.t+a.b),a.t=Math.floor(o*a.t),a.b=Math.floor(o*a.b))}};Ee.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}};Ee.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1};function Bx(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={})}var jx=2,Gx=2,Ux=64,Vx=64;Ee.autoMargin=function(t,e,r){var a=t._fullLayout,i=a.width,n=a.height,o=a.margin,l=Ne.constrain(i-o.l-o.r,jx,Ux),s=Ne.constrain(n-o.t-o.b,Gx,Vx),f=Math.max(0,i-l),c=Math.max(0,n-s),v=a._pushmargin,u=a._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete v[e],delete u[e];else{var d=r.pad;if(d===void 0&&(d=Math.min(12,o.l,o.r,o.t,o.b)),f){var h=(r.l+r.r)/f;h>1&&(r.l/=h,r.r/=h)}if(c){var p=(r.t+r.b)/c;p>1&&(r.t/=p,r.b/=p)}var g=r.xl!==void 0?r.xl:r.x,_=r.xr!==void 0?r.xr:r.x,b=r.yt!==void 0?r.yt:r.y,w=r.yb!==void 0?r.yb:r.y;v[e]={l:{val:g,size:r.l+d},r:{val:_,size:r.r+d},b:{val:w,size:r.b+d},t:{val:b,size:r.t+d}},u[e]=1}if(!a._replotting)return Ee.doAutoMargin(t)}};Ee.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,a=e.height;e._size||(e._size={}),Bx(e);var i=e._size,n=e.margin,o=Ne.extendFlat({},i),l=n.l,s=n.r,f=n.t,c=n.b,v=e._pushmargin,u=e._pushmarginIds;if(e.margin.autoexpand!==!1){for(var d in v)u[d]||delete v[d];v.base={l:{val:0,size:l},r:{val:1,size:s},t:{val:1,size:f},b:{val:0,size:c}};for(var h in v){var p=v[h].l||{},g=v[h].b||{},_=p.val,b=p.size,w=g.val,m=g.size;for(var y in v){if(sf(b)&&v[y].r){var x=v[y].r.val,T=v[y].r.size;if(x>_){var k=(b*x+(T-r)*_)/(x-_),S=(T*(1-_)+(b-r)*(1-x))/(x-_);k+S>l+s&&(l=k,s=S)}}if(sf(m)&&v[y].t){var A=v[y].t.val,E=v[y].t.size;if(A>w){var M=(m*A+(E-a)*w)/(A-w),D=(E*(1-w)+(m-a)*(1-A))/(A-w);M+D>c+f&&(c=M,f=D)}}}}}var $=Ne.constrain(r-n.l-n.r,jx,Ux),I=Ne.constrain(a-n.t-n.b,Gx,Vx),P=Math.max(0,r-$),R=Math.max(0,a-I);if(P){var L=(l+s)/P;L>1&&(l/=L,s/=L)}if(R){var C=(c+f)/R;C>1&&(c/=C,f/=C)}if(i.l=Math.round(l),i.r=Math.round(s),i.t=Math.round(f),i.b=Math.round(c),i.p=Math.round(n.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(a)-i.t-i.b,!e._replotting&&Ee.didMarginChange(o,i)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var z=3*(1+Object.keys(u).length);if(e._redrawFromAutoMarginCount<z)return Ct.call("_doPlot",t);e._size=o,Ne.warn("Too many auto-margin redraws.")}lM(t)};function lM(t){var e=Wr.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var a=0;a<e.length;a++){var i=e[a][r];i&&i()}})}var Rp=["l","r","t","b","p","w","h"];Ee.didMarginChange=function(t,e){for(var r=0;r<Rp.length;r++){var a=Rp[r],i=t[a],n=e[a];if(!sf(i)||Math.abs(n-i)>1)return!0}return!1};Ee.graphJson=function(t,e,r,a,i,n){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&Ee.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,s=(t._transitionData||{})._frames;function f(u,d){if(typeof u=="function")return d?"_function_":null;if(Ne.isPlainObject(u)){var h={},p;return Object.keys(u).sort().forEach(function(g){if(["_","["].indexOf(g.charAt(0))===-1){if(typeof u[g]=="function"){d&&(h[g]="_function");return}if(r==="keepdata"){if(g.substr(g.length-3)==="src")return}else if(r==="keepstream"){if(p=u[g+"src"],typeof p=="string"&&p.indexOf(":")>0&&!Ne.isPlainObject(u.stream))return}else if(r!=="keepall"&&(p=u[g+"src"],typeof p=="string"&&p.indexOf(":")>0))return;h[g]=f(u[g],d)}}),h}return Array.isArray(u)?u.map(function(g){return f(g,d)}):Ne.isTypedArray(u)?Ne.simpleMap(u,Ne.identity):Ne.isJSDate(u)?Ne.ms2DateTimeLocal(+u):u}var c={data:(o||[]).map(function(u){var d=f(u);return e&&delete d.fit,d})};if(!e&&(c.layout=f(l),i)){var v=l._size;c.layout.computed={margin:{b:v.b,l:v.l,r:v.r,t:v.t}}}return s&&(c.frames=f(s)),n&&(c.config=f(t._context,!0)),a==="object"?c:JSON.stringify(c)};Ee.modifyFrames=function(t,e){var r,a,i,n=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch(a=e[r],a.type){case"replace":i=a.value;var l=(n[a.index]||{}).name,s=i.name;n[a.index]=o[s]=i,s!==l&&(delete o[l],o[s]=i);break;case"insert":i=a.value,o[i.name]=i,n.splice(a.index,0,i);break;case"delete":i=n[a.index],delete o[i.name],n.splice(a.index,1);break}return Promise.resolve()};Ee.computeFrame=function(t,e){var r=t._transitionData._frameHash,a,i,n,o;if(!e)throw new Error("computeFrame must be given a string frame name");var l=r[e.toString()];if(!l)return!1;for(var s=[l],f=[l.name];l.baseframe&&(l=r[l.baseframe.toString()])&&f.indexOf(l.name)===-1;)s.push(l),f.push(l.name);for(var c={};l=s.pop();)if(l.layout&&(c.layout=Ee.extendLayout(c.layout,l.layout)),l.data){if(c.data||(c.data=[]),i=l.traces,!i)for(i=[],a=0;a<l.data.length;a++)i[a]=a;for(c.traces||(c.traces=[]),a=0;a<l.data.length;a++)n=i[a],n!=null&&(o=c.traces.indexOf(n),o===-1&&(o=c.data.length,c.traces[o]=n),c.data[o]=Ee.extendTrace(c.data[o],l.data[a]))}return c};Ee.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,a=0;a<r.length;a++){var i=r[a];i&&i.name&&(e[i.name]=i)}};Ee.extendObjectWithContainers=function(t,e,r){var a,i,n,o,l,s,f,c,v=Ne.extendDeepNoArrays({},e||{}),u=Ne.expandObjectPaths(v),d={};if(r&&r.length)for(n=0;n<r.length;n++)a=Ne.nestedProperty(u,r[n]),i=a.get(),i===void 0?Ne.nestedProperty(d,r[n]).set(null):(a.set(null),Ne.nestedProperty(d,r[n]).set(i));if(t=Ne.extendDeepNoArrays(t||{},u),r&&r.length){for(n=0;n<r.length;n++)if(l=Ne.nestedProperty(d,r[n]),f=l.get(),!!f){for(s=Ne.nestedProperty(t,r[n]),c=s.get(),Array.isArray(c)||(c=[],s.set(c)),o=0;o<f.length;o++){var h=f[o];h===null?c[o]=null:c[o]=Ee.extendObjectWithContainers(c[o],h)}s.set(c)}}return t};Ee.dataArrayContainers=["transforms","dimensions"];Ee.layoutArrayContainers=Ct.layoutArrayContainers;Ee.extendTrace=function(t,e){return Ee.extendObjectWithContainers(t,e,Ee.dataArrayContainers)};Ee.extendLayout=function(t,e){return Ee.extendObjectWithContainers(t,e,Ee.layoutArrayContainers)};Ee.transition=function(t,e,r,a,i,n){var o={redraw:i.redraw},l={},s=[];return o.prepareFn=function(){for(var f=Array.isArray(e)?e.length:0,c=a.slice(0,f),v=0;v<c.length;v++){var u=c[v],d=t._fullData[u],h=d._module;if(!!h){if(h.animatable){var p=h.basePlotModule.name;l[p]||(l[p]=[]),l[p].push(u)}t.data[c[v]]=Ee.extendTrace(t.data[c[v]],e[v])}}var g=Ne.expandObjectPaths(Ne.extendDeepNoArrays({},r)),_=/^[xy]axis[0-9]*$/;for(var b in g)!_.test(b)||delete g[b].range;Ee.extendLayout(t.layout,g),delete t.calcdata,Ee.supplyDefaults(t),Ee.doCalcdata(t);var w=Ne.expandObjectPaths(r);if(w){var m=t._fullLayout._plots;for(var y in m){var x=m[y],T=x.xaxis,k=x.yaxis,S=T.range.slice(),A=k.range.slice(),E=null,M=null,D=null,$=null;Array.isArray(w[T._name+".range"])?E=w[T._name+".range"].slice():Array.isArray((w[T._name]||{}).range)&&(E=w[T._name].range.slice()),Array.isArray(w[k._name+".range"])?M=w[k._name+".range"].slice():Array.isArray((w[k._name]||{}).range)&&(M=w[k._name].range.slice()),S&&E&&(T.r2l(S[0])!==T.r2l(E[0])||T.r2l(S[1])!==T.r2l(E[1]))&&(D={xr0:S,xr1:E}),A&&M&&(k.r2l(A[0])!==k.r2l(M[0])||k.r2l(A[1])!==k.r2l(M[1]))&&($={yr0:A,yr1:M}),(D||$)&&s.push(Ne.extendFlat({plotinfo:x},D,$))}}return Promise.resolve()},o.runFn=function(f){var c,v=t._fullLayout._basePlotModules,u=s.length,d;if(r)for(d=0;d<v.length;d++)v[d].transitionAxes&&v[d].transitionAxes(t,s,n,f);u?(c=Ne.extendFlat({},n),c.duration=0,delete l.cartesian):c=n;for(var h in l){var p=l[h],g=t._fullData[p[0]]._module;g.basePlotModule.plot(t,p,c,f)}},qx(t,n,o)};Ee.transitionFromReact=function(t,e,r,a){var i=t._fullLayout,n=i.transition,o={},l=[];return o.prepareFn=function(){var s=i._plots;o.redraw=!1,e.anim==="some"&&(o.redraw=!0),r.anim==="some"&&(o.redraw=!0);for(var f in s){var c=s[f],v=c.xaxis,u=c.yaxis,d=a[v._name].range.slice(),h=a[u._name].range.slice(),p=v.range.slice(),g=u.range.slice();v.setScale(),u.setScale();var _=null,b=null;(v.r2l(d[0])!==v.r2l(p[0])||v.r2l(d[1])!==v.r2l(p[1]))&&(_={xr0:d,xr1:p}),(u.r2l(h[0])!==u.r2l(g[0])||u.r2l(h[1])!==u.r2l(g[1]))&&(b={yr0:h,yr1:g}),(_||b)&&l.push(Ne.extendFlat({plotinfo:c},_,b))}return Promise.resolve()},o.runFn=function(s){for(var f=t._fullData,c=t._fullLayout,v=c._basePlotModules,u,d,h,p=[],g=0;g<f.length;g++)p.push(g);function _(){if(!!t._fullLayout)for(var w=0;w<v.length;w++)v[w].transitionAxes&&v[w].transitionAxes(t,l,u,s)}function b(){if(!!t._fullLayout)for(var w=0;w<v.length;w++)v[w].plot(t,h,d,s)}l.length&&e.anim?n.ordering==="traces first"?(u=Ne.extendFlat({},n,{duration:0}),h=p,d=n,setTimeout(_,n.duration),b()):(u=n,h=null,d=Ne.extendFlat({},n,{duration:0}),setTimeout(b,u.duration),_()):l.length?(u=n,_()):e.anim&&(h=p,d=n,b())},qx(t,n,o)};function qx(t,e,r){var a=!1;function i(v){var u=Promise.resolve();if(!v)return u;for(;v.length;)u=u.then(v.shift());return u}function n(v){if(!!v)for(;v.length;)v.shift()}function o(){return t.emit("plotly_transitioning",[]),new Promise(function(v){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push(function(){a=!0}),r.redraw&&t._transitionData._interruptCallbacks.push(function(){return Ct.call("redraw",t)}),t._transitionData._interruptCallbacks.push(function(){t.emit("plotly_transitioninterrupted",[])});var u=0,d=0;function h(){return u++,function(){d++,!a&&d===u&&l(v)}}r.runFn(h),setTimeout(h())})}function l(v){if(!!t._transitionData)return n(t._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Ct.call("redraw",t)}).then(function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])}).then(v)}function s(){if(!!t._transitionData)return t._transitioning=!1,i(t._transitionData._interruptCallbacks)}var f=[Ee.previousPromises,s,r.prepareFn,Ee.rehover,o],c=Ne.syncOrAsync(f,t);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return t})}Ee.doCalcdata=function(t,e){var r=Wr.list(t),a=t._fullData,i=t._fullLayout,n,o,l,s,f=new Array(a.length),c=(t.calcdata||[]).slice();for(t.calcdata=f,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},l=0;l<a.length;l++)if(Array.isArray(e)&&e.indexOf(l)===-1){f[l]=c[l];continue}for(l=0;l<a.length;l++)n=a[l],n._arrayAttrs=Fx.findArrayAttributes(n),n._extremes={};var v=i._subplots.polar||[];for(l=0;l<v.length;l++)r.push(i[v[l]].radialaxis,i[v[l]].angularaxis);for(var u in i._colorAxes){var d=i[u];d.cauto!==!1&&(delete d.cmin,delete d.cmax)}var h=!1;function p(b){if(n=a[b],o=n._module,n.visible===!0&&n.transforms){if(o&&o.calc){var w=o.calc(t,n);w[0]&&w[0].t&&w[0].t._scene&&delete w[0].t._scene.dirty}for(s=0;s<n.transforms.length;s++){var m=n.transforms[s];o=Zf[m.type],o&&o.calcTransform&&(n._hasCalcTransform=!0,h=!0,o.calcTransform(t,n,m))}}}function g(b,w){if(n=a[b],o=n._module,!!o.isContainer===w){var m=[];if(n.visible===!0&&n._length!==0){delete n._indexToPoints;var y=n.transforms||[];for(s=y.length-1;s>=0;s--)if(y[s].enabled){n._indexToPoints=y[s]._indexToPoints;break}o&&o.calc&&(m=o.calc(t,n))}(!Array.isArray(m)||!m[0])&&(m=[{x:Ep,y:Ep}]),m[0].t||(m[0].t={}),m[0].trace=n,f[b]=m}}for(Pp(r,a,i),l=0;l<a.length;l++)g(l,!0);for(l=0;l<a.length;l++)p(l);for(h&&Pp(r,a,i),l=0;l<a.length;l++)g(l,!0);for(l=0;l<a.length;l++)g(l,!1);zp(t);var _=fM(r,t);if(_.length){for(i._numBoxes=0,i._numViolins=0,l=0;l<_.length;l++)g(_[l],!0);for(l=0;l<_.length;l++)g(_[l],!1);zp(t)}Ct.getComponentMethod("fx","calc")(t),Ct.getComponentMethod("errorbars","calc")(t)};var sM=/(total|sum|min|max|mean|median) (ascending|descending)/;function fM(t,e){var r=[],a,i,n,o,l;function s(P,R,L){var C=R._id.charAt(0);if(P==="histogram2dcontour"){var z=R._counterAxes[0],F=Wr.getFromId(e,z),H=C==="x"||z==="x"&&F.type==="category",B=C==="y"||z==="y"&&F.type==="category";return function(O,W){return O===0||W===0||H&&O===L[W].length-1||B&&W===L.length-1?-1:(C==="y"?W:O)-1}}else return function(O,W){return C==="y"?W:O}}var f={min:function(P){return Ne.aggNums(Math.min,null,P)},max:function(P){return Ne.aggNums(Math.max,null,P)},sum:function(P){return Ne.aggNums(function(R,L){return R+L},null,P)},total:function(P){return Ne.aggNums(function(R,L){return R+L},null,P)},mean:function(P){return Ne.mean(P)},median:function(P){return Ne.median(P)}};for(a=0;a<t.length;a++){var c=t[a];if(c.type==="category"){var v=c.categoryorder.match(sM);if(v){var u=v[1],d=v[2],h=c._id.charAt(0),p=h==="x",g=[];for(i=0;i<c._categories.length;i++)g.push([c._categories[i],[]]);for(i=0;i<c._traceIndices.length;i++){var _=c._traceIndices[i],b=e._fullData[_];if(b.visible===!0){var w=b.type;Ct.traceIs(b,"histogram")&&(delete b._xautoBinFinished,delete b._yautoBinFinished);var m=w==="splom",y=w==="scattergl",x=e.calcdata[_];for(n=0;n<x.length;n++){var T=x[n],k,S;if(m){var A=b._axesDim[c._id];if(!p){var E=b._diag[A][0];E&&(c=e._fullLayout[Wr.id2name(E)])}var M=T.trace.dimensions[A].values;for(o=0;o<M.length;o++)for(k=c._categoriesMap[M[o]],l=0;l<T.trace.dimensions.length;l++)if(l!==A){var D=T.trace.dimensions[l];g[k][1].push(D.values[o])}}else if(y){for(o=0;o<T.t.x.length;o++)p?(k=T.t.x[o],S=T.t.y[o]):(k=T.t.y[o],S=T.t.x[o]),g[k][1].push(S);T.t&&T.t._scene&&delete T.t._scene.dirty}else if(T.hasOwnProperty("z")){S=T.z;var $=s(b.type,c,S);for(o=0;o<S.length;o++)for(l=0;l<S[o].length;l++)k=$(l,o),k+1&&g[k][1].push(S[o][l])}else for(k=T.p,k===void 0&&(k=T[h]),S=T.s,S===void 0&&(S=T.v),S===void 0&&(S=p?T.y:T.x),Array.isArray(S)||(S===void 0?S=[]:S=[S]),o=0;o<S.length;o++)g[k][1].push(S[o])}}}c._categoriesValue=g;var I=[];for(i=0;i<g.length;i++)I.push([g[i][0],f[u](g[i][1])]);I.sort(function(P,R){return P[1]-R[1]}),c._categoriesAggregatedValue=I,c._initialCategories=I.map(function(P){return P[0]}),d==="descending"&&c._initialCategories.reverse(),r=r.concat(c.sortByInitialCategories())}}}return r}function Pp(t,e,r){var a={};function i(s){s.clearCalc(),s.type==="multicategory"&&s.setupMultiCategory(e),a[s._id]=1}Ne.simpleMap(t,i);for(var n=r._axisMatchGroups||[],o=0;o<n.length;o++)for(var l in n[o])a[l]||i(r[Wr.id2name(l)])}function zp(t){var e=t._fullLayout,r=e._visibleModules,a={},i,n,o;for(n=0;n<r.length;n++){var l=r[n],s=l.crossTraceCalc;if(s){var f=l.basePlotModule.name;a[f]?Ne.pushUnique(a[f],s):a[f]=[s]}}for(o in a){var c=a[o],v=e._subplots[o];if(Array.isArray(v))for(i=0;i<v.length;i++){var u=v[i],d=o==="cartesian"?e._plots[u]:e[u];for(n=0;n<c.length;n++)c[n](t,d,u)}else for(n=0;n<c.length;n++)c[n](t)}}Ee.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()};Ee.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()};Ee.generalUpdatePerTraceModule=function(t,e,r,a){var i=e.traceHash,n={},o;for(o=0;o<r.length;o++){var l=r[o],s=l[0].trace;s.visible&&(n[s.type]=n[s.type]||[],n[s.type].push(l))}for(var f in i)if(!n[f]){var c=i[f][0],v=c[0].trace;v.visible=!1,n[f]=[c]}for(var u in n){var d=n[u],h=d[0][0].trace._module;h.plot(t,e,Ne.filterVisible(d),a)}e.traceHash=n};Ee.plotBasePlot=function(t,e,r,a,i){var n=Ct.getModule(t),o=KA(e.calcdata,n)[0];n.plot(e,o,a,i)};Ee.cleanBasePlot=function(t,e,r,a,i){var n=i._has&&i._has(t),o=r._has&&r._has(t);n&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()};var jt={exports:{}},xr={},dn={};(function(t){t.xmlns="http://www.w3.org/2000/xmlns/",t.svg="http://www.w3.org/2000/svg",t.xlink="http://www.w3.org/1999/xlink",t.svgAttrs={xmlns:t.svg,"xmlns:xlink":t.xlink}})(dn);var Vr={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}};(function(t){var e=ct.exports,r=me.exports,a=r.strTranslate,i=dn,n=Vr.LINE_SPACING,o=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;t.convertToTspans=function(C,z,F){var H=C.text(),B=!C.attr("data-notex")&&z&&z._context.typesetMath&&typeof MathJax<"u"&&H.match(o),O=e.select(C.node().parentNode);if(O.empty())return;var W=C.attr("class")?C.attr("class").split(" ")[0]:"text";W+="-math",O.selectAll("svg."+W).remove(),O.selectAll("g."+W+"-group").remove(),C.style("display",null).attr({"data-unformatted":H,"data-math":"N"});function j(){O.empty()||(W=C.attr("class")+"-math",O.select("svg."+W).remove()),C.text("").style("white-space","pre");var Z=I(C.node(),H);Z&&C.style("pointer-events","all"),t.positionText(C),F&&F.call(C)}return B?(z&&z._promises||[]).push(new Promise(function(Z){C.style("display","none");var K=parseInt(C.node().style.fontSize,10),Q={fontSize:K};v(B[2],Q,function(ee,ne,le){O.selectAll("svg."+W).remove(),O.selectAll("g."+W+"-group").remove();var se=ee&&ee.select("svg");if(!se||!se.node()){j(),Z();return}var oe=O.append("g").classed(W+"-group",!0).attr({"pointer-events":"none","data-unformatted":H,"data-math":"Y"});oe.node().appendChild(se.node()),ne&&ne.node()&&se.node().insertBefore(ne.node().cloneNode(!0),se.node().firstChild);var V=le.width,ie=le.height;se.attr({class:W,height:ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ge=C.node().style.fill||"black",de=se.select("g");de.attr({fill:ge,stroke:ge});var ke=de.node().getBoundingClientRect(),ue=ke.width,Y=ke.height;(ue>V||Y>ie)&&(se.style("overflow","hidden"),ke=se.node().getBoundingClientRect(),ue=ke.width,Y=ke.height);var fe=+C.attr("x"),Ae=+C.attr("y"),be=K||C.node().getBoundingClientRect().height,Ce=-be/4;if(W[0]==="y")oe.attr({transform:"rotate("+[-90,fe,Ae]+")"+a(-ue/2,Ce-Y/2)});else if(W[0]==="l")Ae=Ce-Y/2;else if(W[0]==="a"&&W.indexOf("atitle")!==0)fe=0,Ae=Ce;else{var Me=C.attr("text-anchor");fe=fe-ue*(Me==="middle"?.5:Me==="end"?1:0),Ae=Ae+Ce-Y/2}se.attr({x:fe,y:Ae}),F&&F.call(C,oe),Z(oe)})})):j(),C};var l=/(<|<|<)/g,s=/(>|>|>)/g;function f(C){return C.replace(l,"\\lt ").replace(s,"\\gt ")}var c=[["$","$"],["\\(","\\)"]];function v(C,z,F){var H=parseInt((MathJax.version||"").split(".")[0]);if(H!==2&&H!==3){r.warn("No MathJax version:",MathJax.version);return}var B,O,W,j,Z=function(){return O=r.extendDeepAll({},MathJax.Hub.config),W=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:c},displayAlign:"left"})},K=function(){O=r.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=c},Q=function(){if(B=MathJax.Hub.config.menuSettings.renderer,B!=="SVG")return MathJax.Hub.setRenderer("SVG")},ee=function(){B=MathJax.config.startup.output,B!=="svg"&&(MathJax.config.startup.output="svg")},ne=function(){var ge="math-output-"+r.randstr({},64);j=e.select("body").append("div").attr({id:ge}).style({visibility:"hidden",position:"absolute","font-size":z.fontSize+"px"}).text(f(C));var de=j.node();return H===2?MathJax.Hub.Typeset(de):MathJax.typeset([de])},le=function(){var ge=j.select(H===2?".MathJax_SVG":".MathJax"),de=!ge.empty()&&j.select("svg").node();if(!de)r.log("There was an error in the tex syntax.",C),F();else{var ke=de.getBoundingClientRect(),ue;H===2?ue=e.select("body").select("#MathJax_SVG_glyphs"):ue=ge.select("defs"),F(ge,ue,ke)}j.remove()},se=function(){if(B!=="SVG")return MathJax.Hub.setRenderer(B)},oe=function(){B!=="svg"&&(MathJax.config.startup.output=B)},V=function(){return W!==void 0&&(MathJax.Hub.processSectionDelay=W),MathJax.Hub.Config(O)},ie=function(){MathJax.config=O};H===2?MathJax.Hub.Queue(Z,Q,ne,le,se,V):H===3&&(K(),ee(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ne(),le(),oe(),ie()}))}var u={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},d={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},p="\u200B",g=["http:","https:","mailto:","",void 0,":"],_=t.NEWLINES=/(\r\n?|\n)/g,b=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,m=/<br(\s+.*)?>/i;t.BR_TAG_ALL=/<br(\s+.*)?>/gi;var y=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(C,z){if(!C)return null;var F=C.match(z),H=F&&(F[3]||F[4]);return H&&D(H)}var A=/(^|;)\s*color:/;t.plainText=function(C,z){z=z||{};for(var F=z.len!==void 0&&z.len!==-1?z.len:1/0,H=z.allowedTags!==void 0?z.allowedTags:["br"],B="...",O=B.length,W=C.split(b),j=[],Z="",K=0,Q=0;Q<W.length;Q++){var ee=W[Q],ne=ee.match(w),le=ne&&ne[2].toLowerCase();if(le)H.indexOf(le)!==-1&&(j.push(ee),Z=le);else{var se=ee.length;if(K+se<F)j.push(ee),K+=se;else if(K<F){var oe=F-K;Z&&(Z!=="br"||oe<=O||se<=O)&&j.pop(),F>O?j.push(ee.substr(0,oe-O)+B):j.push(ee.substr(0,oe));break}Z=""}}return j.join("")};var E={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},M=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function D(C){return C.replace(M,function(z,F){var H;return F.charAt(0)==="#"?H=$(F.charAt(1)==="x"?parseInt(F.substr(2),16):parseInt(F.substr(1),10)):H=E[F],H||z})}t.convertEntities=D;function $(C){if(!(C>1114111)){var z=String.fromCodePoint;if(z)return z(C);var F=String.fromCharCode;return C<=65535?F(C):F((C>>10)+55232,C%1024+56320)}}function I(C,z){z=z.replace(_," ");var F=!1,H=[],B,O=-1;function W(){O++;var Y=document.createElementNS(i.svg,"tspan");e.select(Y).attr({class:"line",dy:O*n+"em"}),C.appendChild(Y),B=Y;var fe=H;if(H=[{node:Y}],fe.length>1)for(var Ae=1;Ae<fe.length;Ae++)j(fe[Ae])}function j(Y){var fe=Y.type,Ae={},be;if(fe==="a"){be="a";var Ce=Y.target,Me=Y.href,Te=Y.popup;Me&&(Ae={"xlink:xlink:show":Ce==="_blank"||Ce.charAt(0)!=="_"?"new":"replace",target:Ce,"xlink:xlink:href":Me},Te&&(Ae.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Te+'");return false;'))}else be="tspan";Y.style&&(Ae.style=Y.style);var X=document.createElementNS(i.svg,be);if(fe==="sup"||fe==="sub"){Z(B,p),B.appendChild(X);var pe=document.createElementNS(i.svg,"tspan");Z(pe,p),e.select(pe).attr("dy",h[fe]),Ae.dy=d[fe],B.appendChild(X),B.appendChild(pe)}else B.appendChild(X);e.select(X).attr(Ae),B=Y.node=X,H.push(Y)}function Z(Y,fe){Y.appendChild(document.createTextNode(fe))}function K(Y){if(H.length===1){r.log("Ignoring unexpected end tag </"+Y+">.",z);return}var fe=H.pop();Y!==fe.type&&r.log("Start tag <"+fe.type+"> doesnt match end tag <"+Y+">. Pretending it did match.",z),B=H[H.length-1].node}var Q=m.test(z);Q?W():(B=C,H=[{node:C}]);for(var ee=z.split(b),ne=0;ne<ee.length;ne++){var le=ee[ne],se=le.match(w),oe=se&&se[2].toLowerCase(),V=u[oe];if(oe==="br")W();else if(V===void 0)Z(B,D(le));else if(se[1])K(oe);else{var ie=se[4],ge={type:oe},de=S(ie,y);if(de?(de=de.replace(A,"$1 fill:"),V&&(de+=";"+V)):V&&(de=V),de&&(ge.style=de),oe==="a"){F=!0;var ke=S(ie,x);if(ke){var ue=P(ke);ue&&(ge.href=ue,ge.target=S(ie,T)||"_blank",ge.popup=S(ie,k))}}j(ge)}}return F}function P(C){var z=encodeURI(decodeURI(C)),F=document.createElement("a"),H=document.createElement("a");F.href=C,H.href=z;var B=F.protocol,O=H.protocol;return g.indexOf(B)!==-1&&g.indexOf(O)!==-1?z:""}t.sanitizeHTML=function(z){z=z.replace(_," ");for(var F=document.createElement("p"),H=F,B=[],O=z.split(b),W=0;W<O.length;W++){var j=O[W],Z=j.match(w),K=Z&&Z[2].toLowerCase();if(K in u)if(Z[1])B.length&&(H=B.pop());else{var Q=Z[4],ee=S(Q,y),ne=ee?{style:ee}:{};if(K==="a"){var le=S(Q,x);if(le){var se=P(le);if(se){ne.href=se;var oe=S(Q,T);oe&&(ne.target=oe)}}}var V=document.createElement(K);H.appendChild(V),e.select(V).attr(ne),H=V,B.push(V)}else H.appendChild(document.createTextNode(D(j)))}var ie="innerHTML";return F[ie]},t.lineCount=function(z){return z.selectAll("tspan.line").size()||1},t.positionText=function(z,F,H){return z.each(function(){var B=e.select(this);function O(Z,K){return K===void 0?(K=B.attr(Z),K===null&&(B.attr(Z,0),K=0)):B.attr(Z,K),K}var W=O("x",F),j=O("y",H);this.nodeName==="text"&&B.selectAll("tspan.line").attr({x:W,y:j})})};function R(C,z,F){var H=F.horizontalAlign,B=F.verticalAlign||"top",O=C.node().getBoundingClientRect(),W=z.node().getBoundingClientRect(),j,Z,K;return B==="bottom"?Z=function(){return O.bottom-j.height}:B==="middle"?Z=function(){return O.top+(O.height-j.height)/2}:Z=function(){return O.top},H==="right"?K=function(){return O.right-j.width}:H==="center"?K=function(){return O.left+(O.width-j.width)/2}:K=function(){return O.left},function(){j=this.node().getBoundingClientRect();var Q=K()-W.left,ee=Z()-W.top,ne=F.gd||{};if(F.gd){ne._fullLayout._calcInverseTransform(ne);var le=r.apply3DTransform(ne._fullLayout._invTransform)(Q,ee);Q=le[0],ee=le[1]}return this.style({top:ee+"px",left:Q+"px","z-index":1e3}),this}}var L="1px ";t.makeTextShadow=function(C){var z=L,F=L,H=L;return z+F+H+C+", -"+z+"-"+F+H+C+", "+z+"-"+F+H+C+", -"+z+F+H+C},t.makeEditable=function(C,z){var F=z.gd,H=z.delegate,B=e.dispatch("edit","input","cancel"),O=H||C;if(C.style({"pointer-events":H?"none":"all"}),C.size()!==1)throw new Error("boo");function W(){Z(),C.style({opacity:0});var K=O.attr("class"),Q;K?Q="."+K.split(" ")[0]+"-math-group":Q="[class*=-math-group]",Q&&e.select(C.node().parentNode).select(Q).style({opacity:0})}function j(K){var Q=K.node(),ee=document.createRange();ee.selectNodeContents(Q);var ne=window.getSelection();ne.removeAllRanges(),ne.addRange(ee),Q.focus()}function Z(){var K=e.select(F),Q=K.select(".svg-container"),ee=Q.append("div"),ne=C.node().style,le=parseFloat(ne.fontSize||12),se=z.text;se===void 0&&(se=C.attr("data-unformatted")),ee.classed("plugin-editable editable",!0).style({position:"absolute","font-family":ne.fontFamily||"Arial","font-size":le,color:z.fill||ne.fill||"black",opacity:1,"background-color":z.background||"transparent",outline:"#ffffff33 1px solid",margin:[-le/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(se).call(R(C,Q,z)).on("blur",function(){F._editing=!1,C.text(this.textContent).style({opacity:1});var oe=e.select(this).attr("class"),V;oe?V="."+oe.split(" ")[0]+"-math-group":V="[class*=-math-group]",V&&e.select(C.node().parentNode).select(V).style({opacity:0});var ie=this.textContent;e.select(this).transition().duration(0).remove(),e.select(document).on("mouseup",null),B.edit.call(C,ie)}).on("focus",function(){var oe=this;F._editing=!0,e.select(document).on("mouseup",function(){if(e.event.target===oe)return!1;document.activeElement===ee.node()&&ee.node().blur()})}).on("keyup",function(){e.event.which===27?(F._editing=!1,C.style({opacity:1}),e.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),B.cancel.call(C,this.textContent)):(B.input.call(C,this.textContent),e.select(this).call(R(C,Q,z)))}).on("keydown",function(){e.event.which===13&&this.blur()}).call(j)}return z.immediate?W():O.on("click",W),e.rebind(C,B,"on")}})(xr);var Pt={exports:{}},cM=ct.exports,Gs=ca.exports,al=gt,ts=me.exports,Ip=ft.exports,uM=vo.isValid;function vM(t,e,r){var a=e?ts.nestedProperty(t,e).get()||{}:t,i=a[r||"color"],n=!1;if(ts.isArrayOrTypedArray(i)){for(var o=0;o<i.length;o++)if(al(i[o])){n=!0;break}}return ts.isPlainObject(a)&&(n||a.showscale===!0||al(a.cmin)&&al(a.cmax)||uM(a.colorscale)||ts.isPlainObject(a.colorbar))}var Np=["showscale","autocolorscale","colorscale","reversescale","colorbar"],Do=["min","max","mid","auto"];function Xx(t){var e=t._colorAx,r=e||t,a={},i,n,o;for(n=0;n<Np.length;n++)o=Np[n],a[o]=r[o];if(e)for(i="c",n=0;n<Do.length;n++)o=Do[n],a[o]=r["c"+o];else{var l;for(n=0;n<Do.length;n++){if(o=Do[n],l="c"+o,l in r){a[o]=r[l];continue}l="z"+o,l in r&&(a[o]=r[l])}i=l.charAt(0)}return a._sync=function(s,f){var c=Do.indexOf(s)!==-1?i+s:s;r[c]=r["_"+c]=f},a}function Yx(t){for(var e=Xx(t),r=e.min,a=e.max,i=e.reversescale?Wx(e.colorscale):e.colorscale,n=i.length,o=new Array(n),l=new Array(n),s=0;s<n;s++){var f=i[s];o[s]=r+f[0]*(a-r),l[s]=f[1]}return{domain:o,range:l}}function Wx(t){for(var e=t.length,r=new Array(e),a=e-1,i=0;a>=0;a--,i++){var n=t[a];r[i]=[1-n[0],n[1]]}return r}function Zx(t,e){e=e||{};for(var r=t.domain,a=t.range,i=a.length,n=new Array(i),o=0;o<i;o++){var l=Gs(a[o]).toRgb();n[o]=[l.r,l.g,l.b,l.a]}var s=cM.scale.linear().domain(r).range(n).clamp(!0),f=e.noNumericCheck,c=e.returnArray,v;return f&&c?v=s:f?v=function(u){return Fp(s(u))}:c?v=function(u){return al(u)?s(u):Gs(u).isValid()?u:Ip.defaultLine}:v=function(u){return al(u)?Fp(s(u)):Gs(u).isValid()?u:Ip.defaultLine},v.domain=s.domain,v.range=function(){return a},v}function dM(t,e){return Zx(Yx(t),e)}function Fp(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return Gs(e).toRgbString()}var La={hasColorscale:vM,extractOpts:Xx,extractScale:Yx,flipScale:Wx,makeColorScaleFunc:Zx,makeColorScaleFuncFromTrace:dM},Kx={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"},Qx=Kx,hM=Qx.FORMAT_LINK,pM=Qx.DATE_FORMAT_LINK;function mM(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?Kd:Jx)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}}function Kd(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: "+hM+"."].join(" ")}function Jx(t,e){return Kd(t,e)+[" And for dates see: "+pM+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}var bo={axisHoverFormat:mM,descriptionOnlyNumbers:Kd,descriptionWithDates:Jx},$c=Dr,gn=Er,yM=ei.dash,gM=er.extendFlat,Hp=Ht.templatedArray,Op=bo.descriptionWithDates,bM=Jt.ONEDAY,Ia=$r,Rc=Ia.HOUR_PATTERN,Pc=Ia.WEEKDAY_PATTERN,ti={visible:{valType:"boolean",editType:"plot",description:["A single toggle to hide the axis while preserving interaction like dragging.","Default is true when a cheater plot is present on the axis, otherwise","false"].join(" ")},color:{valType:"color",dflt:gn.defaultLine,editType:"ticks",description:["Sets default for all colors associated with this axis","all at once: line, font, tick, and grid colors.","Grid color is lightened by blending this with the plot background","Individual pieces can override this."].join(" ")},title:{text:{valType:"string",editType:"ticks",description:["Sets the title of this axis.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:$c({editType:"ticks",description:["Sets this axis' title font.","Note that the title's font used to be customized","by the now deprecated `titlefont` attribute."].join(" ")}),standoff:{valType:"number",min:0,editType:"ticks",description:["Sets the standoff distance (in px) between the axis labels and the title text","The default value is a function of the axis tick labels, the title `font.size`","and the axis `linewidth`.","Note that the axis title position is always constrained within the margins,","so the actual standoff distance is always less than the set or default value.","By setting `standoff` and turning on `automargin`, plotly.js will push the","margins to fit the axis title at given standoff distance."].join(" ")},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0,description:["Sets the axis type.","By default, plotly attempts to determined the axis type","by looking into the data of the traces that referenced","the axis in question."].join(" ")},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc",description:["Using *strict* a numeric string in trace data is not converted to a number.","Using *convert types* a numeric string in trace data may be","treated as a number during automatic axis `type` detection.","Defaults to layout.autotypenumbers."].join(" ")},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range of this axis is","computed in relation to the input data.","See `rangemode` for more info.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot",description:["If *normal*, the range is computed in relation to the extrema","of the input data.","If *tozero*`, the range extends to 0,","regardless of the input data","If *nonnegative*, the range is non-negative,","regardless of the input data.","Applies only to linear axes."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0,description:["Sets the range of this axis.","If the axis `type` is *log*, then you must take the log of your","desired range (e.g. to set the range from 1 to 100,","set the range from 0 to 2).","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},fixedrange:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not this axis is zoom-able.","If true, then zoom is disabled."].join(" ")},scaleanchor:{valType:"enumerated",values:[Ia.idRegex.x.toString(),Ia.idRegex.y.toString()],editType:"plot",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","changes together with the range of the corresponding axis","such that the scale of pixels per unit is in a constant ratio.","Both axes are still zoomable, but when you zoom one, the other will","zoom the same amount, keeping a fixed midpoint.","`constrain` and `constraintoward` determine how we enforce the constraint.","You can chain these, ie `yaxis: {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}`","but you can only link axes of the same `type`.","The linked axis can have the opposite letter (to constrain the aspect ratio)","or the same letter (to match scales across subplots).","Loops (`yaxis: {scaleanchor: *x*}, xaxis: {scaleanchor: *y*}` or longer) are redundant","and the last constraint encountered will be ignored to avoid possible","inconsistent constraints via `scaleratio`.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden."].join(" ")},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot",description:["If this axis is linked to another by `scaleanchor`, this determines the pixel","to unit scale ratio. For example, if this value is 10, then every unit on","this axis spans 10 times the number of pixels as a unit on the linked axis.","Use this for example to create an elevation profile where the vertical scale","is exaggerated a fixed amount with respect to the horizontal."].join(" ")},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines how that happens:","by increasing the *range*, or by decreasing the *domain*.","Default is *domain* for axes containing image traces, *range* otherwise."].join(" ")},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot",description:["If this axis needs to be compressed (either due to its own `scaleanchor` and","`scaleratio` or those of the other axis), determines which direction we push","the originally specified plot area. Options are *left*, *center* (default),","and *right* for x axes, and *top*, *middle* (default), and *bottom* for y axes."].join(" ")},matches:{valType:"enumerated",values:[Ia.idRegex.x.toString(),Ia.idRegex.y.toString()],editType:"calc",description:["If set to another axis id (e.g. `x2`, `y`), the range of this axis","will match the range of the corresponding axis in data-coordinates space.","Moreover, matching axes share auto-range values, category lists and","histogram auto-bins.","Note that setting axes simultaneously in both a `scaleanchor` and a `matches` constraint","is currently forbidden.","Moreover, note that matching axes must have the same `type`."].join(" ")},rangebreaks:Hp("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether this axis rangebreak is enabled or disabled.","Please note that `rangebreaks` only work for *date* axis type."].join(" ")},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc",description:["Sets the lower and upper bounds of this axis rangebreak.","Can be used with `pattern`."].join(" ")},pattern:{valType:"enumerated",values:[Pc,Rc,""],editType:"calc",description:["Determines a pattern on the time line that generates breaks.","If *"+Pc+"* - days of the week in English e.g. 'Sunday' or `sun`","(matching is case-insensitive and considers only the first three characters),","as well as Sunday-based integers between 0 and 6.","If *"+Rc+"* - hour (24-hour clock) as decimal numbers between 0 and 24.","for more info.","Examples:","- { pattern: '"+Pc+"', bounds: [6, 1] }"," or simply { bounds: ['sat', 'mon'] }"," breaks from Saturday to Monday (i.e. skips the weekends).","- { pattern: '"+Rc+"', bounds: [17, 8] }"," breaks from 5pm to 8am (i.e. skips non-work hours)."].join(" ")},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"},description:["Sets the coordinate values corresponding to the rangebreaks.","An alternative to `bounds`.","Use `dvalue` to set the size of the values along the axis."].join(" ")},dvalue:{valType:"number",editType:"calc",min:0,dflt:bM,description:["Sets the size of each `values` item.","The default is one day in milliseconds."].join(" ")},editType:"calc"}),tickmode:{valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0},description:["Sets the tick mode for this axis.","If *auto*, the number of ticks is set via `nticks`.","If *linear*, the placement of the ticks is determined by","a starting position `tick0` and a tick step `dtick`","(*linear* is the default value if `tick0` and `dtick` are provided).","If *array*, the placement of the ticks is set via `tickvals`","and the tick text is `ticktext`.","(*array* is the default value if `tickvals` is provided)."].join(" ")},nticks:{valType:"integer",min:0,dflt:0,editType:"ticks",description:["Specifies the maximum number of ticks for the particular axis.","The actual number of ticks will be chosen automatically to be","less than or equal to `nticks`.","Has an effect only if `tickmode` is set to *auto*."].join(" ")},tick0:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the placement of the first tick on this axis.","Use with `dtick`.","If the axis `type` is *log*, then you must take the log of your starting tick","(e.g. to set the starting tick to 100, set the `tick0` to 2)","except when `dtick`=*L<f>* (see `dtick` for more info).","If the axis `type` is *date*, it should be a date string, like date data.","If the axis `type` is *category*, it should be a number, using the scale where","each category is assigned a serial number from zero in the order it appears."].join(" ")},dtick:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"},description:["Sets the step in-between ticks on this axis. Use with `tick0`.","Must be a positive number, or special strings available to *log* and *date* axes.","If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n","is the tick number. For example,","to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.","To set tick marks at 1, 100, 10000, ... set dtick to 2.","To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433.","*log* has several special values; *L<f>*, where `f` is a positive number,","gives ticks linearly spaced in value (but not position).","For example `tick0` = 0.1, `dtick` = *L0.5* will put ticks at 0.1, 0.6, 1.1, 1.6 etc.","To show powers of 10 plus small digits between, use *D1* (all digits) or *D2* (only 2 and 5).","`tick0` is ignored for *D1* and *D2*.","If the axis `type` is *date*, then you must convert the time to milliseconds.","For example, to set the interval between ticks to one day,","set `dtick` to 86400000.0.","*date* also has special values *M<n>* gives ticks spaced by a number of months.","`n` must be a positive integer.","To set ticks on the 15th of every third month, set `tick0` to *2000-01-15* and `dtick` to *M3*.","To set ticks every 4 years, set `dtick` to *M48*"].join(" ")},ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks",description:["Sets the spacing between tick labels as compared to the spacing between ticks.","A value of 1 (default) means each tick gets a label.","A value of 2 means shows every 2nd label.","A larger value n means only every nth tick is labeled.","`tick0` determines which labels are shown.","Not implemented for axes with `type` *log* or *multicategory*, or when `tickmode` is *array*."].join(" ")},tickvals:{valType:"data_array",editType:"ticks",description:["Sets the values at which ticks on this axis appear.","Only has an effect if `tickmode` is set to *array*.","Used with `ticktext`."].join(" ")},ticktext:{valType:"data_array",editType:"ticks",description:["Sets the text displayed at the ticks position via `tickvals`.","Only has an effect if `tickmode` is set to *array*.","Used with `tickvals`."].join(" ")},ticks:{valType:"enumerated",values:["outside","inside",""],editType:"ticks",description:["Determines whether ticks are drawn or not.","If **, this axis' ticks are not drawn.","If *outside* (*inside*), this axis' are drawn outside (inside)","the axis lines."].join(" ")},tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks",description:["Determines where ticks and grid lines are drawn with respect to their","corresponding tick labels.","Only has an effect for axes of `type` *category* or *multicategory*.","When set to *boundaries*, ticks and grid lines are drawn half a category","to the left/bottom of labels."].join(" ")},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks",description:["Determines where tick labels are drawn with respect to their","corresponding ticks and grid lines.","Only has an effect for axes of `type` *date*","When set to *period*, tick labels are drawn in the middle of the period","between ticks."].join(" ")},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc",description:["Determines where tick labels are drawn with respect to the axis","Please note that","top or bottom has no effect on x axes or when `ticklabelmode` is set to *period*.","Similarly","left or right has no effect on y axes or when `ticklabelmode` is set to *period*.","Has no effect on *multicategory* axes or when `tickson` is set to *boundaries*.","When used on axes linked by `matches` or `scaleanchor`,","no extra padding for inside labels would be added by autorange,","so that the scales could match."].join(" ")},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc",description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","Otherwise on *category* and *multicategory* axes the default is *allow*.","In other cases the default is *hide past div*."].join(" ")},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle",description:["Determines if the axis lines or/and ticks are mirrored to","the opposite side of the plotting area.","If *true*, the axis lines are mirrored.","If *ticks*, the axis lines and ticks are mirrored.","If *false*, mirroring is disable.","If *all*, axis lines are mirrored on all shared-axes subplots.","If *allticks*, axis lines and ticks are mirrored","on all shared-axes subplots."].join(" ")},ticklen:{valType:"number",min:0,dflt:5,editType:"ticks",description:"Sets the tick length (in px)."},tickwidth:{valType:"number",min:0,dflt:1,editType:"ticks",description:"Sets the tick width (in px)."},tickcolor:{valType:"color",dflt:gn.defaultLine,editType:"ticks",description:"Sets the tick color."},showticklabels:{valType:"boolean",dflt:!0,editType:"ticks",description:"Determines whether or not the tick labels are drawn."},automargin:{valType:"boolean",dflt:!1,editType:"ticks",description:["Determines whether long tick labels automatically grow the figure","margins."].join(" ")},showspikes:{valType:"boolean",dflt:!1,editType:"modebar",description:["Determines whether or not spikes (aka droplines) are drawn for this axis.","Note: This only takes affect when hovermode = closest"].join(" ")},spikecolor:{valType:"color",dflt:null,editType:"none",description:"Sets the spike color. If undefined, will use the series color"},spikethickness:{valType:"number",dflt:3,editType:"none",description:"Sets the width (in px) of the zero line."},spikedash:gM({},yM,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none",description:["Determines the drawing mode for the spike line","If *toaxis*, the line is drawn from the data point to the axis the ","series is plotted on.","If *across*, the line is drawn across the entire plot area, and","supercedes *toaxis*.","If *marker*, then a marker dot is drawn on the axis the series is","plotted on"].join(" ")},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none",description:"Determines whether spikelines are stuck to the cursor or to the closest datapoints."},tickfont:$c({editType:"ticks",description:"Sets the tick font."}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks",description:["Sets the angle of the tick labels with respect to the horizontal.","For example, a `tickangle` of -90 draws the tick labels","vertically."].join(" ")},tickprefix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label prefix."},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all tick labels are displayed with a prefix.","If *first*, only the first tick is displayed with a prefix.","If *last*, only the last tick is displayed with a suffix.","If *none*, tick prefixes are hidden."].join(" ")},ticksuffix:{valType:"string",dflt:"",editType:"ticks",description:"Sets a tick label suffix."},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:"Same as `showtickprefix` but for tick suffixes."},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks",description:["If *all*, all exponents are shown besides their significands.","If *first*, only the exponent of the first tick is shown.","If *last*, only the exponent of the last tick is shown.","If *none*, no exponents appear."].join(" ")},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks",description:["Determines a formatting rule for the tick exponents.","For example, consider the number 1,000,000,000.","If *none*, it appears as 1,000,000,000.","If *e*, 1e+9.","If *E*, 1E+9.","If *power*, 1x10^9 (with 9 in a super script).","If *SI*, 1G.","If *B*, 1B."].join(" ")},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks",description:["Hide SI prefix for 10^n if |n| is below this number.","This only has an effect when `tickformat` is *SI* or *B*."].join(" ")},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks",description:['If "true", even 4-digit integers are separated'].join(" ")},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Op("tick label")},tickformatstops:Hp("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not this stop is used.","If `false`, this stop is ignored even within its `dtickrange`."].join(" ")},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks",description:["range [*min*, *max*], where *min*, *max* - dtick values","which describe some zoom level, it is possible to omit *min*","or *max* value by passing *null*"].join(" ")},value:{valType:"string",dflt:"",editType:"ticks",description:["string - dtickformat for described zoom level, the same as *tickformat*"].join(" ")},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Op("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle",description:["Determines whether or not a line bounding this axis is drawn."].join(" ")},linecolor:{valType:"color",dflt:gn.defaultLine,editType:"layoutstyle",description:"Sets the axis line color."},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle",description:"Sets the width (in px) of the axis line."},showgrid:{valType:"boolean",editType:"ticks",description:["Determines whether or not grid lines are drawn.","If *true*, the grid lines are drawn at every tick mark."].join(" ")},gridcolor:{valType:"color",dflt:gn.lightLine,editType:"ticks",description:"Sets the color of the grid lines."},gridwidth:{valType:"number",min:0,dflt:1,editType:"ticks",description:"Sets the width (in px) of the grid lines."},zeroline:{valType:"boolean",editType:"ticks",description:["Determines whether or not a line is drawn at along the 0 value","of this axis.","If *true*, the zero line is drawn on top of the grid lines."].join(" ")},zerolinecolor:{valType:"color",dflt:gn.defaultLine,editType:"ticks",description:"Sets the line color of the zero line."},zerolinewidth:{valType:"number",dflt:1,editType:"ticks",description:"Sets the width (in px) of the zero line."},showdividers:{valType:"boolean",dflt:!0,editType:"ticks",description:["Determines whether or not a dividers are drawn","between the category levels of this axis.","Only has an effect on *multicategory* axes."].join(" ")},dividercolor:{valType:"color",dflt:gn.defaultLine,editType:"ticks",description:["Sets the color of the dividers","Only has an effect on *multicategory* axes."].join(" ")},dividerwidth:{valType:"number",dflt:1,editType:"ticks",description:["Sets the width (in px) of the dividers","Only has an effect on *multicategory* axes."].join(" ")},anchor:{valType:"enumerated",values:["free",Ia.idRegex.x.toString(),Ia.idRegex.y.toString()],editType:"plot",description:["If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to","the corresponding opposite-letter axis.","If set to *free*, this axis' position is determined by `position`."].join(" ")},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot",description:["Determines whether a x (y) axis is positioned","at the *bottom* (*left*) or *top* (*right*)","of the plotting area."].join(" ")},overlaying:{valType:"enumerated",values:["free",Ia.idRegex.x.toString(),Ia.idRegex.y.toString()],editType:"plot",description:["If set a same-letter axis id, this axis is overlaid on top of","the corresponding same-letter axis, with traces and axes visible for both","axes.","If *false*, this axis does not overlay any same-letter axes.","In this case, for axes with overlapping domains only the highest-numbered","axis will be visible."].join(" ")},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot",description:["Sets the layer on which this axis is displayed.","If *above traces*, this axis is displayed above all the subplot's traces","If *below traces*, this axis is displayed below all the subplot's traces,","but above the grid lines.","Useful when used together with scatter-like traces with `cliponaxis`","set to *false* to show markers and/or text nodes above this axis."].join(" ")},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot",description:["Sets the domain of this axis (in plot fraction)."].join(" ")},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot",description:["Sets the position of this axis in the plotting space","(in normalized coordinates).","Only has an effect if `anchor` is set to *free*."].join(" ")},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc",description:["Specifies the ordering logic for the case of categorical variables.","By default, plotly uses *trace*, which specifies the order that is present in the data supplied.","Set `categoryorder` to *category ascending* or *category descending* if order should be determined by","the alphanumerical order of the category names.","Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category","is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to","the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.","Set `categoryorder` to *total ascending* or *total descending* if order should be determined by the","numerical order of the values.","Similarly, the order can be determined by the min, max, sum, mean or median of all the values."].join(" ")},categoryarray:{valType:"data_array",editType:"calc",description:["Sets the order in which categories on this axis appear.","Only has an effect if `categoryorder` is set to *array*.","Used with `categoryorder`."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes in axis `range`,","`autorange`, and `title` if in `editable: true` configuration.","Defaults to `layout.uirevision`."].join(" ")},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks",description:["Obsolete.","Set `tickmode` to *auto* for old `autotick` *true* behavior.","Set `tickmode` to *linear* for `autotick` *false*."].join(" ")},title:{valType:"string",editType:"ticks",description:["Value of `title` is no longer a simple *string* but a set of sub-attributes.","To set the axis' title, please use `title.text` now."].join(" ")},titlefont:$c({editType:"ticks",description:["Former `titlefont` is now the sub-attribute `font` of `title`.","To customize title font properties, please use `title.font` now."].join(" ")})}},qt=ti,zc=Dr,Bp=er.extendFlat,xM=Li.overrideAll,Qd=xM({orientation:{valType:"enumerated",values:["h","v"],dflt:"v",description:"Sets the orientation of the colorbar."},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",description:["Determines whether this color bar's thickness","(i.e. the measure in the constant color direction)","is set in units of plot *fraction* or in *pixels*.","Use `thickness` to set the value."].join(" ")},thickness:{valType:"number",min:0,dflt:30,description:["Sets the thickness of the color bar","This measure excludes the size of the padding, ticks and labels."].join(" ")},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this color bar's length","(i.e. the measure in the color variation direction)","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the color bar","This measure excludes the padding of both ends.","That is, the color bar length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,description:["Sets the x position of the color bar (in plot fraction).","Defaults to 1.02 when `orientation` is *v* and","0.5 when `orientation` is *h*."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],description:["Sets this color bar's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the color bar.","Defaults to *left* when `orientation` is *v* and","*center* when `orientation` is *h*."].join(" ")},xpad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the x direction."},y:{valType:"number",min:-2,max:3,description:["Sets the y position of the color bar (in plot fraction).","Defaults to 0.5 when `orientation` is *v* and","1.02 when `orientation` is *h*."].join(" ")},yanchor:{valType:"enumerated",values:["top","middle","bottom"],description:["Sets this color bar's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the color bar.","Defaults to *middle* when `orientation` is *v* and","*bottom* when `orientation` is *h*."].join(" ")},ypad:{valType:"number",min:0,dflt:10,description:"Sets the amount of padding (in px) along the y direction."},outlinecolor:qt.linecolor,outlinewidth:qt.linewidth,bordercolor:qt.linecolor,borderwidth:{valType:"number",min:0,dflt:0,description:["Sets the width (in px) or the border enclosing this color bar."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",description:"Sets the color of padded area."},tickmode:qt.tickmode,nticks:qt.nticks,tick0:qt.tick0,dtick:qt.dtick,tickvals:qt.tickvals,ticktext:qt.ticktext,ticks:Bp({},qt.ticks,{dflt:""}),ticklabeloverflow:Bp({},qt.ticklabeloverflow,{description:["Determines how we handle tick labels that would overflow either the graph div or the domain of the axis.","The default value for inside tick labels is *hide past domain*.","In other cases the default is *hide past div*."].join(" ")}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",description:["Determines where tick labels are drawn relative to the ticks.","Left and right options are used when `orientation` is *h*,","top and bottom when `orientation` is *v*."].join(" ")},ticklen:qt.ticklen,tickwidth:qt.tickwidth,tickcolor:qt.tickcolor,ticklabelstep:qt.ticklabelstep,showticklabels:qt.showticklabels,tickfont:zc({description:"Sets the color bar's tick label font"}),tickangle:qt.tickangle,tickformat:qt.tickformat,tickformatstops:qt.tickformatstops,tickprefix:qt.tickprefix,showtickprefix:qt.showtickprefix,ticksuffix:qt.ticksuffix,showticksuffix:qt.showticksuffix,separatethousands:qt.separatethousands,exponentformat:qt.exponentformat,minexponent:qt.minexponent,showexponent:qt.showexponent,title:{text:{valType:"string",description:["Sets the title of the color bar.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:zc({description:["Sets this color bar's title font.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),side:{valType:"enumerated",values:["right","top","bottom"],description:["Determines the location of color bar's title","with respect to the color bar.","Defaults to *top* when `orientation` if *v* and ","defaults to *right* when `orientation` if *h*.","Note that the title's location used to be set","by the now deprecated `titleside` attribute."].join(" ")}},_deprecated:{title:{valType:"string",description:["Deprecated in favor of color bar's `title.text`.","Note that value of color bar's `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:zc({description:"Deprecated in favor of color bar's `title.font`."}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top",description:"Deprecated in favor of color bar's `title.side`."}}},"colorbars","from-root"),_M=Qd,wM=ho.counter,TM=Ud,e1=vo.scales,kM=TM(e1);function Eo(t){return"`"+t+"`"}var hn=function(e,r){e=e||"",r=r||{};var a=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:Boolean(e),n="noScale"in r?r.noScale:e==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:a==="z",l=typeof r.colorscaleDflt=="string"?e1[r.colorscaleDflt]:null,s=r.editTypeOverride||"",f=e?e+".":"",c,v;"colorAttr"in r?(c=r.colorAttr,v=r.colorAttr):(c={z:"z",c:"color"}[a],v="in "+Eo(f+c));var u=i?" Has an effect only if "+v+"is set to a numerical array.":"",d=a+"auto",h=a+"min",p=a+"max",g=a+"mid",_=Eo(f+d),b=Eo(f+h),w=Eo(f+p),m=b+" and "+w,y={};y[h]=y[p]=void 0;var x={};x[d]=!1;var T={};return c==="color"&&(T.color={valType:"color",arrayOk:!0,editType:s||"style",description:["Sets the",e,"color."," It accepts either a specific color"," or an array of numbers that are mapped to the colorscale"," relative to the max and min values of the array or relative to"," "+m+" if set."].join("")},r.anim&&(T.color.anim=!0)),T[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:y,description:["Determines whether or not the color domain is computed"," with respect to the input data (here "+v+") or the bounds set in"," ",m," ",u," Defaults to `false` when ",m," are set by the user."].join("")},T[h]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:x,description:["Sets the lower bound of the color domain.",u," Value should have the same units as ",v," and if set, ",w," must be set as well."].join("")},T[p]={valType:"number",dflt:null,editType:s||"plot",impliedEdits:x,description:["Sets the upper bound of the color domain.",u," Value should have the same units as ",v," and if set, ",b," must be set as well."].join("")},T[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y,description:["Sets the mid-point of the color domain by scaling ",b," and/or ",w," to be equidistant to this point.",u," Value should have the same units as ",v,". ","Has no effect when ",_," is `false`."].join("")},T.colorscale={valType:"colorscale",editType:"calc",dflt:l,impliedEdits:{autocolorscale:!1},description:["Sets the colorscale.",u," The colorscale must be an array containing"," arrays mapping a normalized value to an"," rgb, rgba, hex, hsl, hsv, or named color string."," At minimum, a mapping for the lowest (0) and highest (1)"," values are required. For example,"," `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`."," To control the bounds of the colorscale in color space,"," use",m,"."," Alternatively, `colorscale` may be a palette name string"," of the following list: "+kM+"."].join("")},T.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0},description:["Determines whether the colorscale is a default palette (`autocolorscale: true`)"," or the palette determined by ",Eo(f+"colorscale"),".",u," In case `colorscale` is unspecified or `autocolorscale` is true, the default "," palette will be chosen according to whether numbers in the `color` array are"," all positive, all negative or mixed."].join("")},T.reversescale={valType:"boolean",dflt:!1,editType:"plot",description:["Reverses the color mapping if true.",u," If true, ",b," will correspond to the last color"," in the array and ",w," will correspond to the first color."].join("")},n||(T.showscale={valType:"boolean",dflt:o,editType:"calc",description:["Determines whether or not a colorbar is displayed for this trace.",u].join("")},T.colorbar=_M),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:wM("coloraxis"),dflt:null,editType:"calc",description:["Sets a reference to a shared color axis.","References to these shared color axes are *coloraxis*, *coloraxis2*, *coloraxis3*, etc.","Settings for these shared color axes are set in the layout, under","`layout.coloraxis`, `layout.coloraxis2`, etc.","Note that multiple color scales can be linked to the same color axis."].join(" ")}),T},AM=er.extendFlat,MM=hn,Ic=vo.scales,Nc="Note that `autocolorscale` must be true for this attribute to work.",t1={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Ic.Reds,editType:"calc",description:["Sets the default sequential colorscale for positive values.",Nc].join(" ")},sequentialminus:{valType:"colorscale",dflt:Ic.Blues,editType:"calc",description:["Sets the default sequential colorscale for negative values.",Nc].join(" ")},diverging:{valType:"colorscale",dflt:Ic.RdBu,editType:"calc",description:["Sets the default diverging colorscale.",Nc].join(" ")}},coloraxis:AM({_isSubplotObj:!0,editType:"calc",description:[""].join(" ")},MM("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))},SM=me.exports,r1=function(e){return SM.isPlainObject(e.colorbar)},Qf={},Nv=gt,jp=me.exports,a1=Jt,LM=a1.ONEDAY,CM=a1.ONEWEEK;Qf.dtick=function(t,e){var r=e==="log",a=e==="date",i=e==="category",n=a?LM:1;if(!t)return n;if(Nv(t))return t=Number(t),t<=0?n:i?Math.max(1,Math.round(t)):a?Math.max(.1,t):t;if(typeof t!="string"||!(a||r))return n;var o=t.charAt(0),l=t.substr(1);return l=Nv(l)?Number(l):0,l<=0||!(a&&o==="M"&&l===Math.round(l)||r&&o==="L"||r&&o==="D"&&(l===1||l===2))?n:t};Qf.tick0=function(t,e,r,a){if(e==="date")return jp.cleanDate(t,jp.dateTick0(r,a%CM===0?1:0));if(!(a==="D1"||a==="D2"))return Nv(t)?Number(t):0};var Gp=Qf,DM=me.exports.isArrayOrTypedArray,i1=function(e,r,a,i){function n(d){var h=e[d];return h!==void 0?h:(r._template||{})[d]}var o=n("tick0"),l=n("dtick"),s=n("tickvals"),f=DM(s)?"array":l?"linear":"auto",c=a("tickmode",f);if(c==="auto")a("nticks");else if(c==="linear"){var v=r.dtick=Gp.dtick(l,i);r.tick0=Gp.tick0(o,i,r.calendar,v)}else if(i!=="multicategory"){var u=a("tickvals");u===void 0?r.tickmode="auto":a("ticktext")}},Fc=me.exports,Hc=ti,n1=function(e,r,a,i){var n=Fc.coerce2(e,r,Hc,"ticklen"),o=Fc.coerce2(e,r,Hc,"tickwidth"),l=Fc.coerce2(e,r,Hc,"tickcolor",r.color),s=a("ticks",i.outerTicks||n||o||l?"outside":"");s||(delete r.ticklen,delete r.tickwidth,delete r.tickcolor)},o1=function(e){var r=["showexponent","showtickprefix","showticksuffix"],a=r.filter(function(n){return e[n]!==void 0}),i=function(n){return e[n]===e[a[0]]};if(a.every(i)||a.length===1)return e[a[0]]},rs=me.exports,EM=Ht,ri=function(e,r,a){var i=a.name,n=a.inclusionAttr||"visible",o=r[i],l=rs.isArrayOrTypedArray(e[i])?e[i]:[],s=r[i]=[],f=EM.arrayTemplater(r,i,n),c,v;for(c=0;c<l.length;c++){var u=l[c];rs.isPlainObject(u)?v=f.newItem(u):(v=f.newItem({}),v[n]=!1),v._index=c,v[n]!==!1&&a.handleItemDefaults(u,v,r,a),s.push(v)}var d=f.defaultItems();for(c=0;c<d.length;c++)v=d[c],v._index=s.length,a.handleItemDefaults({},v,r,a,{}),s.push(v);if(rs.isArrayOrTypedArray(o)){var h=Math.min(o.length,s.length);for(c=0;c<h;c++)rs.relinkPrivateKeys(s[c],o[c])}return s},l1=me.exports,$M=ft.exports.contrast,s1=ti,RM=o1,PM=ri,f1=function(e,r,a,i,n){n||(n={});var o=RM(e),l=a("showticklabels");if(l){var s=n.font||{},f=r.color,c=r.ticklabelposition||"",v=c.indexOf("inside")!==-1?$M(n.bgColor):f&&f!==s1.color.dflt?f:s.color;if(l1.coerceFont(a,"tickfont",{family:s.family,size:s.size,color:v}),!n.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&a("ticklabelstep"),n.noAng||a("tickangle"),i!=="category"){var u=a("tickformat");PM(e,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:zM}),r.tickformatstops.length||delete r.tickformatstops,!n.noExp&&!u&&i!=="date"&&(a("showexponent",o),a("exponentformat"),a("minexponent"),a("separatethousands"))}}};function zM(t,e){function r(i,n){return l1.coerce(t,e,s1.tickformatstops,i,n)}var a=r("enabled");a&&(r("dtickrange"),r("value"))}var IM=o1,c1=function(e,r,a,i,n){n||(n={});var o=n.tickSuffixDflt,l=IM(e),s=a("tickprefix");s&&a("showtickprefix",l);var f=a("ticksuffix",o);f&&a("showticksuffix",l)},bn=me.exports,NM=Ht,FM=i1,HM=n1,OM=f1,BM=c1,jM=Qd,u1=function(e,r,a){var i=NM.newContainer(r,"colorbar"),n=e.colorbar||{};function o(w,m){return bn.coerce(n,i,jM,w,m)}var l=a.margin||{t:0,b:0,l:0,r:0},s=a.width-l.l-l.r,f=a.height-l.t-l.b,c=o("orientation"),v=c==="v",u=o("thicknessmode");o("thickness",u==="fraction"?30/(v?s:f):30);var d=o("lenmode");o("len",d==="fraction"?1:v?f:s),o("x",v?1.02:.5),o("xanchor",v?"left":"center"),o("xpad"),o("y",v?.5:1.02),o("yanchor",v?"middle":"bottom"),o("ypad"),bn.noneOrAll(n,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var h=bn.coerce(n,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",h.indexOf("inside")!==-1?"hide past domain":"hide past div"),FM(n,i,o,"linear");var p=a.font,g={outerTicks:!1,font:p};h.indexOf("inside")!==-1&&(g.bgColor="black"),BM(n,i,o,"linear",g),OM(n,i,o,"linear",g),HM(n,i,o,"linear"),o("title.text",a._dfltTitle.colorbar);var _=i.tickfont,b=bn.extendFlat({},_,{color:p.color,size:bn.bigFont(_.size)});bn.coerceFont(o,"title.font",b),o("title.side",v?"top":"right")},Up=gt,Fv=me.exports,GM=r1,UM=u1,Vp=vo.isValid,VM=We.traceIs;function Oc(t,e){var r=e.slice(0,e.length-1);return e?Fv.nestedProperty(t,r).get()||{}:t}var Nl=function t(e,r,a,i,n){var o=n.prefix,l=n.cLetter,s="_module"in r,f=Oc(e,o),c=Oc(r,o),v=Oc(r._template||{},o)||{},u=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,a,i,n)};if(s){var d=a._colorAxes||{},h=i(o+"coloraxis");if(h){var p=VM(r,"contour")&&Fv.nestedProperty(r,"contours.coloring").get()||"heatmap",g=d[h];g?(g[2].push(u),g[0]!==p&&(g[0]=!1,Fv.warn(["Ignoring coloraxis:",h,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[h]=[p,r,[u]];return}}var _=f[l+"min"],b=f[l+"max"],w=Up(_)&&Up(b)&&_<b,m=i(o+l+"auto",!w);m?i(o+l+"mid"):(i(o+l+"min"),i(o+l+"max"));var y=f.colorscale,x=v.colorscale,T;if(y!==void 0&&(T=!Vp(y)),x!==void 0&&(T=!Vp(x)),i(o+"autocolorscale",T),i(o+"colorscale"),i(o+"reversescale"),o!=="marker.line."){var k;o&&s&&(k=GM(f));var S=i(o+"showscale",k);S&&(o&&v&&(c._template=v),UM(f,c,a))}},qp=me.exports,qM=Ht,Xp=t1,XM=Nl,YM=function(e,r){function a(v,u){return qp.coerce(e,r,Xp,v,u)}a("colorscale.sequential"),a("colorscale.sequentialminus"),a("colorscale.diverging");var i=r._colorAxes,n,o;function l(v,u){return qp.coerce(n,o,Xp.coloraxis,v,u)}for(var s in i){var f=i[s];if(f[0])n=e[s]||{},o=qM.newContainer(r,s,"coloraxis"),o._name=s,XM(n,o,r,l,{prefix:"",cLetter:"c"});else{for(var c=0;c<f[2].length;c++)f[2][c]();delete r._colorAxes[s]}}},WM=me.exports,ZM=La.hasColorscale,KM=La.extractOpts,QM=function(e,r){function a(c,v){var u=c["_"+v];u!==void 0&&(c[v]=u)}function i(c,v){var u=v.container?WM.nestedProperty(c,v.container).get():c;if(u)if(u.coloraxis)u._colorAx=r[u.coloraxis];else{var d=KM(u),h=d.auto;(h||d.min===void 0)&&a(u,v.min),(h||d.max===void 0)&&a(u,v.max),d.autocolorscale&&a(u,"colorscale")}}for(var n=0;n<e.length;n++){var o=e[n],l=o._module.colorbar;if(l)if(Array.isArray(l))for(var s=0;s<l.length;s++)i(o,l[s]);else i(o,l);ZM(o,"marker.line")&&i(o,{container:"marker.line",min:"cmin",max:"cmax"})}for(var f in r._colorAxes)i(r[f],{min:"cmin",max:"cmax"})},Yp=gt,Bc=me.exports,JM=La.extractOpts,Jd=function(e,r,a){var i=e._fullLayout,n=a.vals,o=a.containerStr,l=o?Bc.nestedProperty(r,o).get():r,s=JM(l),f=s.auto!==!1,c=s.min,v=s.max,u=s.mid,d=function(){return Bc.aggNums(Math.min,null,n)},h=function(){return Bc.aggNums(Math.max,null,n)};if(c===void 0?c=d():f&&(l._colorAx&&Yp(c)?c=Math.min(c,d()):c=d()),v===void 0?v=h():f&&(l._colorAx&&Yp(v)?v=Math.max(v,h()):v=h()),f&&u!==void 0&&(v-u>u-c?c=u-(v-u):v-u<u-c&&(v=u+(u-c))),c===v&&(c-=.5,v+=.5),s._sync("min",c),s._sync("max",v),s.autocolorscale){var p;c*v<0?p=i.colorscale.diverging:c>=0?p=i.colorscale.sequential:p=i.colorscale.sequentialminus,s._sync("colorscale",p)}},as=vo,xn=La,eo={moduleType:"component",name:"colorscale",attributes:hn,layoutAttributes:t1,supplyLayoutDefaults:YM,handleDefaults:Nl,crossTraceDefaults:QM,calc:Jd,scales:as.scales,defaultScale:as.defaultScale,getScale:as.get,isValidScale:as.isValid,hasColorscale:xn.hasColorscale,extractOpts:xn.extractOpts,extractScale:xn.extractScale,flipScale:xn.flipScale,makeColorScaleFunc:xn.makeColorScaleFunc,makeColorScaleFuncFromTrace:xn.makeColorScaleFuncFromTrace},Wp=me.exports,Rr={hasLines:function(t){return t.visible&&t.mode&&t.mode.indexOf("lines")!==-1},hasMarkers:function(t){return t.visible&&(t.mode&&t.mode.indexOf("markers")!==-1||t.type==="splom")},hasText:function(t){return t.visible&&t.mode&&t.mode.indexOf("text")!==-1},isBubble:function(t){return Wp.isPlainObject(t.marker)&&Wp.isArrayOrTypedArray(t.marker.size)}},eS=gt,v1=function(e,r){r||(r=2);var a=e.marker,i=a.sizeref||1,n=a.sizemin||0,o=a.sizemode==="area"?function(l){return Math.sqrt(l/i)}:function(l){return l/i};return function(l){var s=o(l/r);return eS(s)&&s>0?Math.max(s,n):0}},ua={};(function(t){var e=me.exports;t.getSubplot=function(l){return l.subplot||l.xaxis+l.yaxis||l.geo},t.isTraceInSubplots=function(l,s){if(l.type==="splom"){for(var f=l.xaxes||[],c=l.yaxes||[],v=0;v<f.length;v++)for(var u=0;u<c.length;u++)if(s.indexOf(f[v]+c[u])!==-1)return!0;return!1}return s.indexOf(t.getSubplot(l))!==-1},t.flat=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=s;return f},t.p2c=function(l,s){for(var f=new Array(l.length),c=0;c<l.length;c++)f[c]=l[c].p2c(s);return f},t.getDistanceFunction=function(l,s,f,c){return l==="closest"?c||t.quadrature(s,f):l.charAt(0)==="x"?s:f},t.getClosest=function(l,s,f){if(f.index!==!1)f.index>=0&&f.index<l.length?f.distance=0:f.index=!1;else for(var c=0;c<l.length;c++){var v=s(l[c]);v<=f.distance&&(f.index=c,f.distance=v)}return f},t.inbox=function(l,s,f){return l*s<0||l===0?f:1/0},t.quadrature=function(l,s){return function(f){var c=l(f),v=s(f);return Math.sqrt(c*c+v*v)}},t.makeEventData=function(l,s,f){var c="index"in l?l.index:l.pointNumber,v={data:s._input,fullData:s,curveNumber:s.index,pointNumber:c};if(s._indexToPoints){var u=s._indexToPoints[c];u.length===1?v.pointIndex=u[0]:v.pointIndices=u}else v.pointIndex=c;return s._module.eventData?v=s._module.eventData(v,l,s,f,c):("xVal"in l?v.x=l.xVal:"x"in l&&(v.x=l.x),"yVal"in l?v.y=l.yVal:"y"in l&&(v.y=l.y),l.xa&&(v.xaxis=l.xa),l.ya&&(v.yaxis=l.ya),l.zLabelVal!==void 0&&(v.z=l.zLabelVal)),t.appendArrayPointValue(v,s,c),v},t.appendArrayPointValue=function(l,s,f){var c=s._arrayAttrs;if(!!c)for(var v=0;v<c.length;v++){var u=c[v],d=a(u);if(l[d]===void 0){var h=e.nestedProperty(s,u).get(),p=i(h,f);p!==void 0&&(l[d]=p)}}},t.appendArrayMultiPointValues=function(l,s,f){var c=s._arrayAttrs;if(!!c)for(var v=0;v<c.length;v++){var u=c[v],d=a(u);if(l[d]===void 0){for(var h=e.nestedProperty(s,u).get(),p=new Array(f.length),g=0;g<f.length;g++)p[g]=i(h,f[g]);l[d]=p}}};var r={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(l){return r[l]||l}function i(l,s){if(Array.isArray(s)){if(Array.isArray(l)&&Array.isArray(l[s[0]]))return l[s[0]][s[1]]}else return l[s]}var n={x:!0,y:!0},o={"x unified":!0,"y unified":!0};t.isUnifiedHover=function(l){return typeof l!="string"?!1:!!o[l]},t.isXYhover=function(l){return typeof l!="string"?!1:!!n[l]}})(ua);var jc,Zp;function tS(){if(Zp)return jc;Zp=1;var t=ct.exports;return jc={circle:{n:0,f:function(e){var r=t.round(e,2);return"M"+r+",0A"+r+","+r+" 0 1,1 0,-"+r+"A"+r+","+r+" 0 0,1 "+r+",0Z"}},square:{n:1,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"H-"+r+"V-"+r+"H"+r+"Z"}},diamond:{n:2,f:function(e){var r=t.round(e*1.3,2);return"M"+r+",0L0,"+r+"L-"+r+",0L0,-"+r+"Z"}},cross:{n:3,f:function(e){var r=t.round(e*.4,2),a=t.round(e*1.2,2);return"M"+a+","+r+"H"+r+"V"+a+"H-"+r+"V"+r+"H-"+a+"V-"+r+"H-"+r+"V-"+a+"H"+r+"V-"+r+"H"+a+"Z"}},x:{n:4,f:function(e){var r=t.round(e*.8/Math.sqrt(2),2),a="l"+r+","+r,i="l"+r+",-"+r,n="l-"+r+",-"+r,o="l-"+r+","+r;return"M0,"+r+a+i+n+i+n+o+n+o+a+o+a+"Z"}},"triangle-up":{n:5,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M-"+r+","+a+"H"+r+"L0,-"+i+"Z"}},"triangle-down":{n:6,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M-"+r+",-"+a+"H"+r+"L0,"+i+"Z"}},"triangle-left":{n:7,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M"+a+",-"+r+"V"+r+"L-"+i+",0Z"}},"triangle-right":{n:8,f:function(e){var r=t.round(e*2/Math.sqrt(3),2),a=t.round(e/2,2),i=t.round(e,2);return"M-"+a+",-"+r+"V"+r+"L"+i+",0Z"}},"triangle-ne":{n:9,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M-"+a+",-"+r+"H"+r+"V"+a+"Z"}},"triangle-se":{n:10,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M"+r+",-"+a+"V"+r+"H-"+a+"Z"}},"triangle-sw":{n:11,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M"+a+","+r+"H-"+r+"V-"+a+"Z"}},"triangle-nw":{n:12,f:function(e){var r=t.round(e*.6,2),a=t.round(e*1.2,2);return"M-"+r+","+a+"V-"+r+"H"+a+"Z"}},pentagon:{n:13,f:function(e){var r=t.round(e*.951,2),a=t.round(e*.588,2),i=t.round(-e,2),n=t.round(e*-.309,2),o=t.round(e*.809,2);return"M"+r+","+n+"L"+a+","+o+"H-"+a+"L-"+r+","+n+"L0,"+i+"Z"}},hexagon:{n:14,f:function(e){var r=t.round(e,2),a=t.round(e/2,2),i=t.round(e*Math.sqrt(3)/2,2);return"M"+i+",-"+a+"V"+a+"L0,"+r+"L-"+i+","+a+"V-"+a+"L0,-"+r+"Z"}},hexagon2:{n:15,f:function(e){var r=t.round(e,2),a=t.round(e/2,2),i=t.round(e*Math.sqrt(3)/2,2);return"M-"+a+","+i+"H"+a+"L"+r+",0L"+a+",-"+i+"H-"+a+"L-"+r+",0Z"}},octagon:{n:16,f:function(e){var r=t.round(e*.924,2),a=t.round(e*.383,2);return"M-"+a+",-"+r+"H"+a+"L"+r+",-"+a+"V"+a+"L"+a+","+r+"H-"+a+"L-"+r+","+a+"V-"+a+"Z"}},star:{n:17,f:function(e){var r=e*1.4,a=t.round(r*.225,2),i=t.round(r*.951,2),n=t.round(r*.363,2),o=t.round(r*.588,2),l=t.round(-r,2),s=t.round(r*-.309,2),f=t.round(r*.118,2),c=t.round(r*.809,2),v=t.round(r*.382,2);return"M"+a+","+s+"H"+i+"L"+n+","+f+"L"+o+","+c+"L0,"+v+"L-"+o+","+c+"L-"+n+","+f+"L-"+i+","+s+"H-"+a+"L0,"+l+"Z"}},hexagram:{n:18,f:function(e){var r=t.round(e*.66,2),a=t.round(e*.38,2),i=t.round(e*.76,2);return"M-"+i+",0l-"+a+",-"+r+"h"+i+"l"+a+",-"+r+"l"+a+","+r+"h"+i+"l-"+a+","+r+"l"+a+","+r+"h-"+i+"l-"+a+","+r+"l-"+a+",-"+r+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(e){var r=t.round(e*Math.sqrt(3)*.8,2),a=t.round(e*.8,2),i=t.round(e*1.6,2),n=t.round(e*4,2),o="A "+n+","+n+" 0 0 1 ";return"M-"+r+","+a+o+r+","+a+o+"0,-"+i+o+"-"+r+","+a+"Z"}},"star-triangle-down":{n:20,f:function(e){var r=t.round(e*Math.sqrt(3)*.8,2),a=t.round(e*.8,2),i=t.round(e*1.6,2),n=t.round(e*4,2),o="A "+n+","+n+" 0 0 1 ";return"M"+r+",-"+a+o+"-"+r+",-"+a+o+"0,"+i+o+r+",-"+a+"Z"}},"star-square":{n:21,f:function(e){var r=t.round(e*1.1,2),a=t.round(e*2,2),i="A "+a+","+a+" 0 0 1 ";return"M-"+r+",-"+r+i+"-"+r+","+r+i+r+","+r+i+r+",-"+r+i+"-"+r+",-"+r+"Z"}},"star-diamond":{n:22,f:function(e){var r=t.round(e*1.4,2),a=t.round(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return"M-"+r+",0"+i+"0,"+r+i+r+",0"+i+"0,-"+r+i+"-"+r+",0Z"}},"diamond-tall":{n:23,f:function(e){var r=t.round(e*.7,2),a=t.round(e*1.4,2);return"M0,"+a+"L"+r+",0L0,-"+a+"L-"+r+",0Z"}},"diamond-wide":{n:24,f:function(e){var r=t.round(e*1.4,2),a=t.round(e*.7,2);return"M0,"+a+"L"+r+",0L0,-"+a+"L-"+r+",0Z"}},hourglass:{n:25,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"H-"+r+"L"+r+",-"+r+"H-"+r+"Z"},noDot:!0},bowtie:{n:26,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"V-"+r+"L-"+r+","+r+"V-"+r+"Z"},noDot:!0},"circle-cross":{n:27,f:function(e){var r=t.round(e,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r+"M"+r+",0A"+r+","+r+" 0 1,1 0,-"+r+"A"+r+","+r+" 0 0,1 "+r+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e){var r=t.round(e,2),a=t.round(e/Math.sqrt(2),2);return"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+r+",0A"+r+","+r+" 0 1,1 0,-"+r+"A"+r+","+r+" 0 0,1 "+r+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e){var r=t.round(e,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r+"M"+r+","+r+"H-"+r+"V-"+r+"H"+r+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+r+","+r+"H-"+r+"V-"+r+"H"+r+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e){var r=t.round(e*1.3,2);return"M"+r+",0L0,"+r+"L-"+r+",0L0,-"+r+"ZM0,-"+r+"V"+r+"M-"+r+",0H"+r},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e){var r=t.round(e*1.3,2),a=t.round(e*.65,2);return"M"+r+",0L0,"+r+"L-"+r+",0L0,-"+r+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var r=t.round(e*1.4,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*.85,2);return"M0,"+r+"V-"+r+"M"+r+",0H-"+r+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var r=t.round(e/2,2),a=t.round(e,2);return"M"+r+","+a+"V-"+a+"m-"+a+",0V"+a+"M"+a+","+r+"H-"+a+"m0,-"+a+"H"+a},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M-"+r+","+i+"L0,0M"+r+","+i+"L0,0M0,-"+a+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M-"+r+",-"+i+"L0,0M"+r+",-"+i+"L0,0M0,"+a+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M"+i+","+r+"L0,0M"+i+",-"+r+"L0,0M-"+a+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var r=t.round(e*1.2,2),a=t.round(e*1.6,2),i=t.round(e*.8,2);return"M-"+i+","+r+"L0,0M-"+i+",-"+r+"L0,0M"+a+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var r=t.round(e*1.4,2);return"M"+r+",0H-"+r},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e){var r=t.round(e*1.4,2);return"M0,"+r+"V-"+r},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e){var r=t.round(e,2);return"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e){var r=t.round(e,2);return"M"+r+","+r+"L-"+r+",-"+r},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M0,0L-"+r+","+a+"H"+r+"Z"},noDot:!0},"arrow-down":{n:46,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M0,0L-"+r+",-"+a+"H"+r+"Z"},noDot:!0},"arrow-left":{n:47,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,0L"+r+",-"+a+"V"+a+"Z"},noDot:!0},"arrow-right":{n:48,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,0L-"+r+",-"+a+"V"+a+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M-"+r+",0H"+r+"M0,0L-"+r+","+a+"H"+r+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e){var r=t.round(e,2),a=t.round(e*2,2);return"M-"+r+",0H"+r+"M0,0L-"+r+",-"+a+"H"+r+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,-"+a+"V"+a+"M0,0L"+r+",-"+a+"V"+a+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e){var r=t.round(e*2,2),a=t.round(e,2);return"M0,-"+a+"V"+a+"M0,0L-"+r+",-"+a+"V"+a+"Z"},needLine:!0,noDot:!0}},jc}var Et=ct.exports,Vt=me.exports,rS=Vt.numberFormat,dl=gt,aS=ca.exports,Jf=We,Gr=ft.exports,iS=eo,hl=Vt.strTranslate,eh=xr,nS=dn,oS=Vr,lS=oS.LINE_SPACING,d1=$l.DESELECTDIM,sS=Rr,fS=v1,cS=ua.appendArrayPointValue,Re=Pt.exports={};Re.font=function(t,e,r,a){Vt.isPlainObject(e)&&(a=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),a&&t.call(Gr.fill,a)};Re.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)};Re.setSize=function(t,e,r){t.attr("width",e).attr("height",r)};Re.setRect=function(t,e,r,a,i){t.call(Re.setPosition,e,r).call(Re.setSize,a,i)};Re.translatePoint=function(t,e,r,a){var i=r.c2p(t.x),n=a.c2p(t.y);if(dl(i)&&dl(n)&&e.node())e.node().nodeName==="text"?e.attr("x",i).attr("y",n):e.attr("transform",hl(i,n));else return!1;return!0};Re.translatePoints=function(t,e,r){t.each(function(a){var i=Et.select(this);Re.translatePoint(a,i,e,r)})};Re.hideOutsideRangePoint=function(t,e,r,a,i,n){e.attr("display",r.isPtWithinRange(t,i)&&a.isPtWithinRange(t,n)?null:"none")};Re.hideOutsideRangePoints=function(t,e){if(!!e._hasClipOnAxisFalse){var r=e.xaxis,a=e.yaxis;t.each(function(i){var n=i[0].trace,o=n.xcalendar,l=n.ycalendar,s=Jf.traceIs(n,"bar-like")?".bartext":".point,.textpoint";t.selectAll(s).each(function(f){Re.hideOutsideRangePoint(f,Et.select(this),r,a,o,l)})})}};Re.crispRound=function(t,e,r){return!e||!dl(e)?r||0:t._context.staticPlot?e:e<1?1:Math.round(e)};Re.singleLineStyle=function(t,e,r,a,i){e.style("fill","none");var n=(((t||[])[0]||{}).trace||{}).line||{},o=r||n.width||0,l=i||n.dash||"";Gr.stroke(e,a||n.color),Re.dashLine(e,l,o)};Re.lineGroupStyle=function(t,e,r,a){t.style("fill","none").each(function(i){var n=(((i||[])[0]||{}).trace||{}).line||{},o=e||n.width||0,l=a||n.dash||"";Et.select(this).call(Gr.stroke,r||n.color).call(Re.dashLine,l,o)})};Re.dashLine=function(t,e,r){r=+r||0,e=Re.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})};Re.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return t==="solid"?t="":t==="dot"?t=r+"px,"+r+"px":t==="dash"?t=3*r+"px,"+3*r+"px":t==="longdash"?t=5*r+"px,"+5*r+"px":t==="dashdot"?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":t==="longdashdot"&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t};function h1(t,e,r){var a=e.fillpattern,i=a&&Re.getPatternAttr(a.shape,0,"");if(i){var n=Re.getPatternAttr(a.bgcolor,0,null),o=Re.getPatternAttr(a.fgcolor,0,null),l=a.fgopacity,s=Re.getPatternAttr(a.size,0,8),f=Re.getPatternAttr(a.solidity,0,.3),c=e.uid;Re.pattern(t,"point",r,c,i,s,f,void 0,a.fillmode,n,o,l)}else e.fillcolor&&t.call(Gr.fill,e.fillcolor)}Re.singleFillStyle=function(t,e){var r=Et.select(t.node()),a=r.data(),i=((a[0]||[])[0]||{}).trace||{};h1(t,i,e)};Re.fillGroupStyle=function(t,e){t.style("stroke-width",0).each(function(r){var a=Et.select(this);r[0].trace&&h1(a,r[0].trace,e)})};var Kp=tS();Re.symbolNames=[];Re.symbolFuncs=[];Re.symbolNeedLines={};Re.symbolNoDot={};Re.symbolNoFill={};Re.symbolList=[];Object.keys(Kp).forEach(function(t){var e=Kp[t],r=e.n;Re.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),Re.symbolNames[r]=t,Re.symbolFuncs[r]=e.f,e.needLine&&(Re.symbolNeedLines[r]=!0),e.noDot?Re.symbolNoDot[r]=!0:Re.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(Re.symbolNoFill[r]=!0)});var uS=Re.symbolNames.length,vS="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Re.symbolNumber=function(t){if(dl(t))t=+t;else if(typeof t=="string"){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),t=Re.symbolNames.indexOf(t),t>=0&&(t+=e)}return t%100>=uS||t>=400?0:Math.floor(Math.max(t,0))};function p1(t,e){var r=t%100;return Re.symbolFuncs[r](e)+(t>=200?vS:"")}var Qp={x1:1,x2:0,y1:0,y2:0},Jp={x1:0,x2:0,y1:1,y2:0},em=rS("~f"),m1={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:Qp},horizontalreversed:{node:"linearGradient",attrs:Qp,reversed:!0},vertical:{node:"linearGradient",attrs:Jp},verticalreversed:{node:"linearGradient",attrs:Jp,reversed:!0}};Re.gradient=function(t,e,r,a,i,n){for(var o=i.length,l=m1[a],s=new Array(o),f=0;f<o;f++)l.reversed?s[o-1-f]=[em((1-i[f][0])*100),i[f][1]]:s[f]=[em(i[f][0]*100),i[f][1]];var c=e._fullLayout,v="g"+c._uid+"-"+r,u=c._defs.select(".gradients").selectAll("#"+v).data([a+s.join(";")],Vt.identity);u.exit().remove(),u.enter().append(l.node).each(function(){var d=Et.select(this);l.attrs&&d.attr(l.attrs),d.attr("id",v);var h=d.selectAll("stop").data(s);h.exit().remove(),h.enter().append("stop"),h.each(function(p){var g=aS(p[1]);Et.select(this).attr({offset:p[0]+"%","stop-color":Gr.tinyRGB(g),"stop-opacity":g.getAlpha()})})}),t.style(n,th(v,e)).style(n+"-opacity",null),t.classed("gradient_filled",!0)};Re.pattern=function(t,e,r,a,i,n,o,l,s,f,c,v){var u=e==="legend";l&&(s==="overlay"?(f=l,c=Gr.contrast(f)):(f=void 0,c=l));var d=r._fullLayout,h="p"+d._uid+"-"+a,p,g,_=function(S,A,E,M,D){return M+(D-M)*(S-A)/(E-A)},b,w,m,y,x={};switch(i){case"/":p=n*Math.sqrt(2),g=n*Math.sqrt(2),b="M-"+p/4+","+g/4+"l"+p/2+",-"+g/2+"M0,"+g+"L"+p+",0M"+p/4*3+","+g/4*5+"l"+p/2+",-"+g/2,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"\\":p=n*Math.sqrt(2),g=n*Math.sqrt(2),b="M"+p/4*3+",-"+g/4+"l"+p/2+","+g/2+"M0,0L"+p+","+g+"M-"+p/4+","+g/4*3+"l"+p/2+","+g/2,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"x":p=n*Math.sqrt(2),g=n*Math.sqrt(2),b="M-"+p/4+","+g/4+"l"+p/2+",-"+g/2+"M0,"+g+"L"+p+",0M"+p/4*3+","+g/4*5+"l"+p/2+",-"+g/2+"M"+p/4*3+",-"+g/4+"l"+p/2+","+g/2+"M0,0L"+p+","+g+"M-"+p/4+","+g/4*3+"l"+p/2+","+g/2,w=n-n*Math.sqrt(1-o),y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"|":p=n,g=n,y="path",b="M"+p/2+",0L"+p/2+","+g,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"-":p=n,g=n,y="path",b="M0,"+g/2+"L"+p+","+g/2,w=o*n,y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case"+":p=n,g=n,y="path",b="M"+p/2+",0L"+p/2+","+g+"M0,"+g/2+"L"+p+","+g/2,w=n-n*Math.sqrt(1-o),y="path",x={d:b,opacity:v,stroke:c,"stroke-width":w+"px"};break;case".":p=n,g=n,o<Math.PI/4?m=Math.sqrt(o*n*n/Math.PI):m=_(o,Math.PI/4,1,n/2,n/Math.sqrt(2)),y="circle",x={cx:p/2,cy:g/2,r:m,opacity:v,fill:c};break}var T=[i||"noSh",f||"noBg",c||"noFg",n,o].join(";"),k=d._defs.select(".patterns").selectAll("#"+h).data([T],Vt.identity);k.exit().remove(),k.enter().append("pattern").each(function(){var S=Et.select(this);if(S.attr({id:h,width:p+"px",height:g+"px",patternUnits:"userSpaceOnUse",patternTransform:u?"scale(0.8)":""}),f){var A=S.selectAll("rect").data([0]);A.exit().remove(),A.enter().append("rect").attr({width:p+"px",height:g+"px",fill:f})}var E=S.selectAll(y).data([0]);E.exit().remove(),E.enter().append(y).attr(x)}),t.style("fill",th(h,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)};Re.initGradients=function(t){var e=t._fullLayout,r=Vt.ensureSingle(e._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),Et.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)};Re.initPatterns=function(t){var e=t._fullLayout,r=Vt.ensureSingle(e._defs,"g","patterns");r.selectAll("pattern").remove(),Et.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)};Re.getPatternAttr=function(t,e,r){return t&&Vt.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t};Re.pointStyle=function(t,e,r){if(!!t.size()){var a=Re.makePointStyleFns(e);t.each(function(i){Re.singlePointStyle(i,Et.select(this),e,a,r)})}};Re.singlePointStyle=function(t,e,r,a,i){var n=r.marker,o=n.line;if(e.style("opacity",a.selectedOpacityFn?a.selectedOpacityFn(t):t.mo===void 0?n.opacity:t.mo),a.ms2mrc){var l;t.ms==="various"||n.size==="various"?l=3:l=a.ms2mrc(t.ms),t.mrc=l,a.selectedSizeFn&&(l=t.mrc=a.selectedSizeFn(t));var s=Re.symbolNumber(t.mx||n.symbol)||0;t.om=s%200>=100,e.attr("d",p1(s,l))}var f=!1,c,v,u;if(t.so)u=o.outlierwidth,v=o.outliercolor,c=n.outliercolor;else{var d=(o||{}).width;u=(t.mlw+1||d+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in t?v=t.mlcc=a.lineScale(t.mlc):Vt.isArrayOrTypedArray(o.color)?v=Gr.defaultLine:v=o.color,Vt.isArrayOrTypedArray(n.color)&&(c=Gr.defaultLine,f=!0),"mc"in t?c=t.mcc=a.markerScale(t.mc):c=n.color||"rgba(0,0,0,0)",a.selectedColorFn&&(c=a.selectedColorFn(t))}if(t.om)e.call(Gr.stroke,c).style({"stroke-width":(u||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:u)+"px");var h=n.gradient,p=t.mgt;p?f=!0:p=h&&h.type,Vt.isArrayOrTypedArray(p)&&(p=p[0],m1[p]||(p=0));var g=n.pattern,_=g&&Re.getPatternAttr(g.shape,t.i,"");if(p&&p!=="none"){var b=t.mgc;b?f=!0:b=h.color;var w=r.uid;f&&(w+="-"+t.i),Re.gradient(e,i,w,p,[[0,b],[1,c]],"fill")}else if(_){var m=Re.getPatternAttr(g.bgcolor,t.i,null),y=Re.getPatternAttr(g.fgcolor,t.i,null),x=g.fgopacity,T=Re.getPatternAttr(g.size,t.i,8),k=Re.getPatternAttr(g.solidity,t.i,.3),S=t.mcc||Vt.isArrayOrTypedArray(g.shape)||Vt.isArrayOrTypedArray(g.bgcolor)||Vt.isArrayOrTypedArray(g.size)||Vt.isArrayOrTypedArray(g.solidity),A=r.uid;S&&(A+="-"+t.i),Re.pattern(e,"point",i,A,_,T,k,t.mcc,g.fillmode,m,y,x)}else Gr.fill(e,c);u&&Gr.stroke(e,v)}};Re.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=Re.tryColorscale(r,""),e.lineScale=Re.tryColorscale(r,"line"),Jf.traceIs(t,"symbols")&&(e.ms2mrc=sS.isBubble(t)?fS(t):function(){return(r.size||6)/2}),t.selectedpoints&&Vt.extendFlat(e,Re.makeSelectedPointStyleFns(t)),e};Re.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.marker||{},n=r.marker||{},o=a.marker||{},l=i.opacity,s=n.opacity,f=o.opacity,c=s!==void 0,v=f!==void 0;(Vt.isArrayOrTypedArray(l)||c||v)&&(e.selectedOpacityFn=function(m){var y=m.mo===void 0?i.opacity:m.mo;return m.selected?c?s:y:v?f:d1*y});var u=i.color,d=n.color,h=o.color;(d||h)&&(e.selectedColorFn=function(m){var y=m.mcc||u;return m.selected?d||y:h||y});var p=i.size,g=n.size,_=o.size,b=g!==void 0,w=_!==void 0;return Jf.traceIs(t,"symbols")&&(b||w)&&(e.selectedSizeFn=function(m){var y=m.mrc||p/2;return m.selected?b?g/2:y:w?_/2:y}),e};Re.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},a=t.unselected||{},i=t.textfont||{},n=r.textfont||{},o=a.textfont||{},l=i.color,s=n.color,f=o.color;return e.selectedTextColorFn=function(c){var v=c.tc||l;return c.selected?s||v:f||(s?v:Gr.addOpacity(v,d1))},e};Re.selectedPointStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Re.makeSelectedPointStyleFns(e),a=e.marker||{},i=[];r.selectedOpacityFn&&i.push(function(n,o){n.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(n,o){Gr.fill(n,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(n,o){var l=o.mx||a.symbol||0,s=r.selectedSizeFn(o);n.attr("d",p1(Re.symbolNumber(l),s)),o.mrc2=s}),i.length&&t.each(function(n){for(var o=Et.select(this),l=0;l<i.length;l++)i[l](o,n)})}};Re.tryColorscale=function(t,e){var r=e?Vt.nestedProperty(t,e).get():t;if(r){var a=r.color;if((r.colorscale||r._colorAx)&&Vt.isArrayOrTypedArray(a))return iS.makeColorScaleFuncFromTrace(r)}return Vt.identity};var Gc={start:1,end:-1,middle:0,bottom:1,top:-1};function y1(t,e,r,a,i){var n=Et.select(t.node().parentNode),o=e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle",l=e.indexOf("left")!==-1?"end":e.indexOf("right")!==-1?"start":"middle",s=a?a/.8+1:0,f=(eh.lineCount(t)-1)*lS+1,c=Gc[l]*s,v=r*.75+Gc[o]*s+(Gc[o]-1)*f*r/2;t.attr("text-anchor",l),i||n.attr("transform",hl(c,v))}function g1(t,e){var r=t.ts||e.textfont.size;return dl(r)&&r>0?r:0}Re.textPointStyle=function(t,e,r){if(!!t.size()){var a;if(e.selectedpoints){var i=Re.makeSelectedTextStyleFns(e);a=i.selectedTextColorFn}var n=e.texttemplate,o=r._fullLayout;t.each(function(l){var s=Et.select(this),f=n?Vt.extractOption(l,e,"txt","texttemplate"):Vt.extractOption(l,e,"tx","text");if(!f&&f!==0){s.remove();return}if(n){var c=e._module.formatLabels,v=c?c(l,e,o):{},u={};cS(u,e,l.i);var d=e._meta||{};f=Vt.texttemplateString(f,v,o._d3locale,u,l,d)}var h=l.tp||e.textposition,p=g1(l,e),g=a?a(l):l.tc||e.textfont.color;s.call(Re.font,l.tf||e.textfont.family,p,g).text(f).call(eh.convertToTspans,r).call(y1,h,p,l.mrc)})}};Re.selectedTextStyle=function(t,e){if(!(!t.size()||!e.selectedpoints)){var r=Re.makeSelectedTextStyleFns(e);t.each(function(a){var i=Et.select(this),n=r.selectedTextColorFn(a),o=a.tp||e.textposition,l=g1(a,e);Gr.fill(i,n);var s=Jf.traceIs(e,"bar-like");y1(i,o,l,a.mrc2||a.mrc,s)})}};var tm=.5;Re.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r="M"+t[0],a=[],i;for(i=1;i<t.length-1;i++)a.push(Us(t[i-1],t[i],t[i+1],e));for(r+="Q"+a[0][0]+" "+t[1],i=2;i<t.length-1;i++)r+="C"+a[i-2][1]+" "+a[i-1][0]+" "+t[i];return r+="Q"+a[t.length-3][1]+" "+t[t.length-1],r};Re.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r="M"+t[0],a=t.length-1,i=[Us(t[a],t[0],t[1],e)],n;for(n=1;n<a;n++)i.push(Us(t[n-1],t[n],t[n+1],e));for(i.push(Us(t[a-1],t[a],t[0],e)),n=1;n<=a;n++)r+="C"+i[n-1][1]+" "+i[n][0]+" "+t[n];return r+="C"+i[a][1]+" "+i[0][0]+" "+t[0]+"Z",r};function Us(t,e,r,a){var i=t[0]-e[0],n=t[1]-e[1],o=r[0]-e[0],l=r[1]-e[1],s=Math.pow(i*i+n*n,tm/2),f=Math.pow(o*o+l*l,tm/2),c=(f*f*i-s*s*o)*a,v=(f*f*n-s*s*l)*a,u=3*f*(s+f),d=3*s*(s+f);return[[Et.round(e[0]+(u&&c/u),2),Et.round(e[1]+(u&&v/u),2)],[Et.round(e[0]-(d&&c/d),2),Et.round(e[1]-(d&&v/d),2)]]}var dS={hv:function(t,e){return"H"+Et.round(e[0],2)+"V"+Et.round(e[1],2)},vh:function(t,e){return"V"+Et.round(e[1],2)+"H"+Et.round(e[0],2)},hvh:function(t,e){return"H"+Et.round((t[0]+e[0])/2,2)+"V"+Et.round(e[1],2)+"H"+Et.round(e[0],2)},vhv:function(t,e){return"V"+Et.round((t[1]+e[1])/2,2)+"H"+Et.round(e[0],2)+"V"+Et.round(e[1],2)}},hS=function(t,e){return"L"+Et.round(e[0],2)+","+Et.round(e[1],2)};Re.steps=function(t){var e=dS[t]||hS;return function(r){for(var a="M"+Et.round(r[0][0],2)+","+Et.round(r[0][1],2),i=1;i<r.length;i++)a+=e(r[i-1],r[i]);return a}};Re.makeTester=function(){var t=Vt.ensureSingleById(Et.select("body"),"svg","js-plotly-tester",function(r){r.attr(nS.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),e=Vt.ensureSingle(t,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Re.tester=t,Re.testref=e};Re.savedBBoxes={};var Uc=0,pS=1e4;Re.bBox=function(t,e,r){r||(r=rm(t));var a;if(r){if(a=Re.savedBBoxes[r],a)return Vt.extendFlat({},a)}else if(t.childNodes.length===1){var i=t.childNodes[0];if(r=rm(i),r){var n=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,l=i.getAttribute("transform");if(!l){var s=Re.bBox(i,!1,r);return n&&(s.left+=n,s.right+=n),o&&(s.top+=o,s.bottom+=o),s}if(r+="~"+n+"~"+o+"~"+l,a=Re.savedBBoxes[r],a)return Vt.extendFlat({},a)}}var f,c;e?f=t:(c=Re.tester.node(),f=t.cloneNode(!0),c.appendChild(f)),Et.select(f).attr("transform",null).call(eh.positionText,0,0);var v=f.getBoundingClientRect(),u=Re.testref.node().getBoundingClientRect();e||c.removeChild(f);var d={height:v.height,width:v.width,left:v.left-u.left,top:v.top-u.top,right:v.right-u.left,bottom:v.bottom-u.top};return Uc>=pS&&(Re.savedBBoxes={},Uc=0),r&&(Re.savedBBoxes[r]=d),Uc++,Vt.extendFlat({},d)};function rm(t){var e=t.getAttribute("data-unformatted");if(e!==null)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}Re.setClipUrl=function(t,e,r){t.attr("clip-path",th(e,r))};function th(t,e){if(!t)return null;var r=e._context,a=r._exportedPlot?"":r._baseUrl||"";return a?"url('"+a+"#"+t+"')":"url(#"+t+")"}Re.getTranslate=function(t){var e=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",a=t[r]("transform")||"",i=a.replace(e,function(n,o,l){return[o,l].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};Re.setTranslate=function(t,e,r){var a=/(\btranslate\(.*?\);?)/,i=t.attr?"attr":"getAttribute",n=t.attr?"attr":"setAttribute",o=t[i]("transform")||"";return e=e||0,r=r||0,o=o.replace(a,"").trim(),o+=hl(e,r),o=o.trim(),t[n]("transform",o),o};Re.getScale=function(t){var e=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=t.attr?"attr":"getAttribute",a=t[r]("transform")||"",i=a.replace(e,function(n,o,l){return[o,l].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};Re.setScale=function(t,e,r){var a=/(\bscale\(.*?\);?)/,i=t.attr?"attr":"getAttribute",n=t.attr?"attr":"setAttribute",o=t[i]("transform")||"";return e=e||1,r=r||1,o=o.replace(a,"").trim(),o+="scale("+e+","+r+")",o=o.trim(),t[n]("transform",o),o};var mS=/\s*sc.*/;Re.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,!!t){var a=e===1&&r===1?"":"scale("+e+","+r+")";t.each(function(){var i=(this.getAttribute("transform")||"").replace(mS,"");i+=a,i=i.trim(),this.setAttribute("transform",i)})}};var yS=/translate\([^)]*\)\s*$/;Re.setTextPointsScale=function(t,e,r){!t||t.each(function(){var a,i=Et.select(this),n=i.select("text");if(!!n.node()){var o=parseFloat(n.attr("x")||0),l=parseFloat(n.attr("y")||0),s=(i.attr("transform")||"").match(yS);e===1&&r===1?a=[]:a=[hl(o,l),"scale("+e+","+r+")",hl(-o,-l)],s&&a.push(s),i.attr("transform",a.join(""))}})};var is=ct.exports,gS=gt,am=ar.exports,im=We,Hn=me.exports,nm=Hn.strTranslate,om=Pt.exports,lm=ft.exports,Vc=xr,sm=$l,bS=Vr.OPPOSITE_SIDE,fm=/ [XY][0-9]* /;function xS(t,e,r){var a=r.propContainer,i=r.propName,n=r.placeholder,o=r.traceIndex,l=r.avoid||{},s=r.attributes,f=r.transform,c=r.containerGroup,v=t._fullLayout,u=1,d=!1,h=a.title,p=(h&&h.text?h.text:"").trim(),g=h&&h.font?h.font:{},_=g.family,b=g.size,w=g.color,m;i==="title.text"?m="titleText":i.indexOf("axis")!==-1?m="axisTitleText":i.indexOf("colorbar"!==-1)&&(m="colorbarTitleText");var y=t._context.edits[m];p===""?u=0:p.replace(fm," % ")===n.replace(fm," % ")&&(u=.2,d=!0,y||(p="")),r._meta?p=Hn.templateString(p,r._meta):v._meta&&(p=Hn.templateString(p,v._meta));var x=p||y,T;c||(c=Hn.ensureSingle(v._infolayer,"g","g-"+e),T=v._hColorbarMoveTitle);var k=c.selectAll("text").data(x?[0]:[]);if(k.enter().append("text"),k.text(p).attr("class",e),k.exit().remove(),!x)return c;function S(D){Hn.syncOrAsync([A,E],D)}function A(D){var $;return!f&&T&&(f={}),f?($="",f.rotate&&($+="rotate("+[f.rotate,s.x,s.y]+")"),(f.offset||T)&&($+=nm(0,(f.offset||0)-(T||0)))):$=null,D.attr("transform",$),D.style({"font-family":_,"font-size":is.round(b,2)+"px",fill:lm.rgb(w),opacity:u*lm.opacity(w),"font-weight":am.fontWeight}).attr(s).call(Vc.convertToTspans,t),am.previousPromises(t)}function E(D){var $=is.select(D.node().parentNode);if(l&&l.selection&&l.side&&p){$.attr("transform",null);var I=bS[l.side],P=l.side==="left"||l.side==="top"?-1:1,R=gS(l.pad)?l.pad:2,L=om.bBox($.node()),C={left:0,top:0,right:v.width,bottom:v.height},z=l.maxShift||P*(C[l.side]-L[l.side]),F=0;if(z<0)F=z;else{var H=l.offsetLeft||0,B=l.offsetTop||0;L.left-=H,L.right-=H,L.top-=B,L.bottom-=B,l.selection.each(function(){var W=om.bBox(this);Hn.bBoxIntersect(L,W,R)&&(F=Math.max(F,P*(W[l.side]-L[I])+R))}),F=Math.min(z,F)}if(F>0||z<0){var O={left:[-F,0],right:[F,0],top:[0,-F],bottom:[0,F]}[l.side];$.attr("transform",nm(O[0],O[1]))}}}k.call(S);function M(){u=0,d=!0,k.text(n).on("mouseover.opacity",function(){is.select(this).transition().duration(sm.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){is.select(this).transition().duration(sm.HIDE_PLACEHOLDER).style("opacity",0)})}return y&&(p?k.on(".opacity",null):M(),k.call(Vc.makeEditable,{gd:t}).on("edit",function(D){o!==void 0?im.call("_guiRestyle",t,i,D,o):im.call("_guiRelayout",t,i,D)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(S)}).on("input",function(D){this.text(D||" ").call(Vc.positionText,s.x,s.y)})),k.classed("js-placeholder",d),c}var ec={draw:xS},_S=ct.exports,wS=ul.utcFormat,Gt=me.exports,TS=Gt.numberFormat,Da=gt,fi=Gt.cleanNumber,kS=Gt.ms2DateTime,cm=Gt.dateTime2ms,Ea=Gt.ensureNumber,um=Gt.isArrayOrTypedArray,Ci=Jt,ns=Ci.FP_SAFE,da=Ci.BADNUM,AS=Ci.LOG_CLIP,MS=Ci.ONEWEEK,os=Ci.ONEDAY,ls=Ci.ONEHOUR,vm=Ci.ONEMIN,dm=Ci.ONESEC,ss=ir,ff=$r,fs=ff.HOUR_PATTERN,cs=ff.WEEKDAY_PATTERN;function $o(t){return Math.pow(10,t)}function qc(t){return t!=null}var rh=function(e,r){r=r||{};var a=e._id||"x",i=a.charAt(0);function n(m,y){if(m>0)return Math.log(m)/Math.LN10;if(m<=0&&y&&e.range&&e.range.length===2){var x=e.range[0],T=e.range[1];return .5*(x+T-2*AS*Math.abs(x-T))}else return da}function o(m,y,x,T){if((T||{}).msUTC&&Da(m))return+m;var k=cm(m,x||e.calendar);if(k===da)if(Da(m)){m=+m;var S=Math.floor(Gt.mod(m+.05,1)*10),A=Math.round(m-S/10);k=cm(new Date(A))+S/10}else return da;return k}function l(m,y,x){return kS(m,y,x||e.calendar)}function s(m){return e._categories[Math.round(m)]}function f(m){if(qc(m)){if(e._categoriesMap===void 0&&(e._categoriesMap={}),e._categoriesMap[m]!==void 0)return e._categoriesMap[m];e._categories.push(typeof m=="number"?String(m):m);var y=e._categories.length-1;return e._categoriesMap[m]=y,y}return da}function c(m,y){for(var x=new Array(y),T=0;T<y;T++){var k=(m[0]||[])[T],S=(m[1]||[])[T];x[T]=v([k,S])}return x}function v(m){if(e._categoriesMap)return e._categoriesMap[m]}function u(m){var y=v(m);if(y!==void 0)return y;if(Da(m))return+m}function d(m){return Da(m)?+m:v(m)}function h(m,y,x){return _S.round(x+y*m,2)}function p(m,y,x){return(m-x)/y}var g=function(y){return Da(y)?h(y,e._m,e._b):da},_=function(m){return p(m,e._m,e._b)};if(e.rangebreaks){var b=i==="y";g=function(m){if(!Da(m))return da;var y=e._rangebreaks.length;if(!y)return h(m,e._m,e._b);var x=b;e.range[0]>e.range[1]&&(x=!x);for(var T=x?-1:1,k=T*m,S=0,A=0;A<y;A++){var E=T*e._rangebreaks[A].min,M=T*e._rangebreaks[A].max;if(k<E)break;if(k>M)S=A+1;else{S=k<(E+M)/2?A:A+1;break}}var D=e._B[S]||0;return isFinite(D)?h(m,e._m2,D):0},_=function(m){var y=e._rangebreaks.length;if(!y)return p(m,e._m,e._b);for(var x=0,T=0;T<y&&!(m<e._rangebreaks[T].pmin);T++)m>e._rangebreaks[T].pmax&&(x=T+1);return p(m,e._m2,e._B[x])}}e.c2l=e.type==="log"?n:Ea,e.l2c=e.type==="log"?$o:Ea,e.l2p=g,e.p2l=_,e.c2p=e.type==="log"?function(m,y){return g(n(m,y))}:g,e.p2c=e.type==="log"?function(m){return $o(_(m))}:_,["linear","-"].indexOf(e.type)!==-1?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=fi,e.c2d=e.c2r=e.l2d=e.l2r=Ea,e.d2p=e.r2p=function(m){return e.l2p(fi(m))},e.p2d=e.p2r=_,e.cleanPos=Ea):e.type==="log"?(e.d2r=e.d2l=function(m,y){return n(fi(m),y)},e.r2d=e.r2c=function(m){return $o(fi(m))},e.d2c=e.r2l=fi,e.c2d=e.l2r=Ea,e.c2r=n,e.l2d=$o,e.d2p=function(m,y){return e.l2p(e.d2r(m,y))},e.p2d=function(m){return $o(_(m))},e.r2p=function(m){return e.l2p(fi(m))},e.p2r=_,e.cleanPos=Ea):e.type==="date"?(e.d2r=e.r2d=Gt.identity,e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=l,e.d2p=e.r2p=function(m,y,x){return e.l2p(o(m,0,x))},e.p2d=e.p2r=function(m,y,x){return l(_(m),y,x)},e.cleanPos=function(m){return Gt.cleanDate(m,da,e.calendar)}):e.type==="category"?(e.d2c=e.d2l=f,e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=u,e.r2c=function(m){var y=d(m);return y!==void 0?y:e.fraction2r(.5)},e.l2r=e.c2r=Ea,e.r2l=d,e.d2p=function(m){return e.l2p(e.r2c(m))},e.p2d=function(m){return s(_(m))},e.r2p=e.d2p,e.p2r=_,e.cleanPos=function(m){return typeof m=="string"&&m!==""?m:Ea(m)}):e.type==="multicategory"&&(e.r2d=e.c2d=e.l2d=s,e.d2r=e.d2l_noadd=u,e.r2c=function(m){var y=u(m);return y!==void 0?y:e.fraction2r(.5)},e.r2c_just_indices=v,e.l2r=e.c2r=Ea,e.r2l=u,e.d2p=function(m){return e.l2p(e.r2c(m))},e.p2d=function(m){return s(_(m))},e.r2p=e.d2p,e.p2r=_,e.cleanPos=function(m){return Array.isArray(m)||typeof m=="string"&&m!==""?m:Ea(m)},e.setupMultiCategory=function(m){var y=e._traceIndices,x,T,k=e._matchGroup;if(k&&e._categories.length===0){for(var S in k)if(S!==a){var A=r[ss.id2name(S)];y=y.concat(A._traceIndices)}}var E=[[0,{}],[0,{}]],M=[];for(x=0;x<y.length;x++){var D=m[y[x]];if(i in D){var $=D[i],I=D._length||Gt.minRowLength($);if(um($[0])&&um($[1]))for(T=0;T<I;T++){var P=$[0][T],R=$[1][T];qc(P)&&qc(R)&&(M.push([P,R]),P in E[0][1]||(E[0][1][P]=E[0][0]++),R in E[1][1]||(E[1][1][R]=E[1][0]++))}}}for(M.sort(function(L,C){var z=E[0][1],F=z[L[0]]-z[C[0]];if(F)return F;var H=E[1][1];return H[L[1]]-H[C[1]]}),x=0;x<M.length;x++)f(M[x])}),e.fraction2r=function(m){var y=e.r2l(e.range[0]),x=e.r2l(e.range[1]);return e.l2r(y+m*(x-y))},e.r2fraction=function(m){var y=e.r2l(e.range[0]),x=e.r2l(e.range[1]);return(e.r2l(m)-y)/(x-y)},e.cleanRange=function(m,y){y||(y={}),m||(m="range");var x=Gt.nestedProperty(e,m).get(),T,k;if(e.type==="date"?k=Gt.dfltRange(e.calendar):i==="y"?k=ff.DFLTRANGEY:e._name==="realaxis"?k=[0,1]:k=y.dfltRange||ff.DFLTRANGEX,k=k.slice(),(e.rangemode==="tozero"||e.rangemode==="nonnegative")&&(k[0]=0),!x||x.length!==2){Gt.nestedProperty(e,m).set(k);return}for(e.type==="date"&&!e.autorange&&(x[0]=Gt.cleanDate(x[0],da,e.calendar),x[1]=Gt.cleanDate(x[1],da,e.calendar)),T=0;T<2;T++)if(e.type==="date"){if(!Gt.isDateTime(x[T],e.calendar)){e[m]=k;break}if(e.r2l(x[0])===e.r2l(x[1])){var S=Gt.constrain(e.r2l(x[0]),Gt.MIN_MS+1e3,Gt.MAX_MS-1e3);x[0]=e.l2r(S-1e3),x[1]=e.l2r(S+1e3);break}}else{if(!Da(x[T]))if(Da(x[1-T]))x[T]=x[1-T]*(T?10:.1);else{e[m]=k;break}if(x[T]<-ns?x[T]=-ns:x[T]>ns&&(x[T]=ns),x[0]===x[1]){var A=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=A,x[1]+=A}}},e.setScale=function(m){var y=r._size;if(e.overlaying){var x=ss.getFromId({_fullLayout:r},e.overlaying);e.domain=x.domain}var T=m&&e._r?"_r":"range",k=e.calendar;e.cleanRange(T);var S=e.r2l(e[T][0],k),A=e.r2l(e[T][1],k),E=i==="y";if(E?(e._offset=y.t+(1-e.domain[1])*y.h,e._length=y.h*(e.domain[1]-e.domain[0]),e._m=e._length/(S-A),e._b=-e._m*A):(e._offset=y.l+e.domain[0]*y.w,e._length=y.w*(e.domain[1]-e.domain[0]),e._m=e._length/(A-S),e._b=-e._m*S),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks){var M,D;if(e._rangebreaks=e.locateBreaks(Math.min(S,A),Math.max(S,A)),e._rangebreaks.length){for(M=0;M<e._rangebreaks.length;M++)D=e._rangebreaks[M],e._lBreaks+=Math.abs(D.max-D.min);var $=E;S>A&&($=!$),$&&e._rangebreaks.reverse();var I=$?-1:1;for(e._m2=I*e._length/(Math.abs(A-S)-e._lBreaks),e._B.push(-e._m2*(E?A:S)),M=0;M<e._rangebreaks.length;M++)D=e._rangebreaks[M],e._B.push(e._B[e._B.length-1]-I*e._m2*(D.max-D.min));for(M=0;M<e._rangebreaks.length;M++)D=e._rangebreaks[M],D.pmin=g(D.min),D.pmax=g(D.max)}}if(!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw r._replotting=!1,new Error("Something went wrong with axis scaling")},e.maskBreaks=function(m){var y=e.rangebreaks||[],x,T,k,S,A;y._cachedPatterns||(y._cachedPatterns=y.map(function(z){return z.enabled&&z.bounds?Gt.simpleMap(z.bounds,z.pattern?fi:e.d2c):null})),y._cachedValues||(y._cachedValues=y.map(function(z){return z.enabled&&z.values?Gt.simpleMap(z.values,e.d2c).sort(Gt.sorterAsc):null}));for(var E=0;E<y.length;E++){var M=y[E];if(M.enabled){if(M.bounds){var D=M.pattern;switch(x=y._cachedPatterns[E],T=x[0],k=x[1],D){case cs:A=new Date(m),S=A.getUTCDay(),T>k&&(k+=7,S<T&&(S+=7));break;case fs:A=new Date(m);var $=A.getUTCHours(),I=A.getUTCMinutes(),P=A.getUTCSeconds(),R=A.getUTCMilliseconds();S=$+(I/60+P/3600+R/36e5),T>k&&(k+=24,S<T&&(S+=24));break;case"":S=m;break}if(S>=T&&S<k)return da}else for(var L=y._cachedValues[E],C=0;C<L.length;C++)if(T=L[C],k=T+M.dvalue,m>=T&&m<k)return da}}return m},e.locateBreaks=function(m,y){var x,T,k,S,A=[];if(!e.rangebreaks)return A;var E=e.rangebreaks.slice().sort(function(H,B){return H.pattern===cs&&B.pattern===fs?-1:B.pattern===cs&&H.pattern===fs?1:0}),M=function(H,B){if(H=Gt.constrain(H,m,y),B=Gt.constrain(B,m,y),H!==B){for(var O=!0,W=0;W<A.length;W++){var j=A[W];H<j.max&&B>=j.min&&(H<j.min&&(j.min=H),B>j.max&&(j.max=B),O=!1)}O&&A.push({min:H,max:B})}};for(x=0;x<E.length;x++){var D=E[x];if(D.enabled)if(D.bounds){var $=m,I=y;D.pattern&&($=Math.floor($)),T=Gt.simpleMap(D.bounds,D.pattern?fi:e.r2l),k=T[0],S=T[1];var P=new Date($),R,L;switch(D.pattern){case cs:L=MS,R=((S<k?7:0)+(S-k))*os,$+=k*os-(P.getUTCDay()*os+P.getUTCHours()*ls+P.getUTCMinutes()*vm+P.getUTCSeconds()*dm+P.getUTCMilliseconds());break;case fs:L=os,R=((S<k?24:0)+(S-k))*ls,$+=k*ls-(P.getUTCHours()*ls+P.getUTCMinutes()*vm+P.getUTCSeconds()*dm+P.getUTCMilliseconds());break;default:$=Math.min(T[0],T[1]),I=Math.max(T[0],T[1]),L=I-$,R=L}for(var C=$;C<I;C+=L)M(C,C+R)}else for(var z=Gt.simpleMap(D.values,e.d2c),F=0;F<z.length;F++)k=z[F],S=k+D.dvalue,M(k,S)}return A.sort(function(H,B){return H.min-B.min}),A},e.makeCalcdata=function(m,y,x){var T,k,S,A,E=e.type,M=E==="date"&&m[y+"calendar"];if(y in m){if(T=m[y],A=m._length||Gt.minRowLength(T),Gt.isTypedArray(T)&&(E==="linear"||E==="log")){if(A===T.length)return T;if(T.subarray)return T.subarray(0,A)}if(E==="multicategory")return c(T,A);for(k=new Array(A),S=0;S<A;S++)k[S]=e.d2c(T[S],0,M,x)}else{var D=y+"0"in m?e.d2c(m[y+"0"],0,M):0,$=m["d"+y]?Number(m["d"+y]):1;for(T=m[{x:"y",y:"x"}[y]],A=m._length||T.length,k=new Array(A),S=0;S<A;S++)k[S]=D+S*$}if(e.rangebreaks)for(S=0;S<A;S++)k[S]=e.maskBreaks(k[S]);return k},e.isValidRange=function(m){return Array.isArray(m)&&m.length===2&&Da(e.r2l(m[0]))&&Da(e.r2l(m[1]))},e.isPtWithinRange=function(m,y){var x=e.c2l(m[i],null,y),T=e.r2l(e.range[0]),k=e.r2l(e.range[1]);return T<k?T<=x&&x<=k:k<=x&&x<=T},e._emptyCategories=function(){e._categories=[],e._categoriesMap={}},e.clearCalc=function(){var m=e._matchGroup;if(m){var y=null,x=null;for(var T in m){var k=r[ss.id2name(T)];if(k._categories){y=k._categories,x=k._categoriesMap;break}}y&&x?(e._categories=y,e._categoriesMap=x):e._emptyCategories()}else e._emptyCategories();if(e._initialCategories)for(var S=0;S<e._initialCategories.length;S++)f(e._initialCategories[S])},e.sortByInitialCategories=function(){var m=[];if(e._emptyCategories(),e._initialCategories)for(var y=0;y<e._initialCategories.length;y++)f(e._initialCategories[y]);m=m.concat(e._traceIndices);var x=e._matchGroup;for(var T in x)if(a!==T){var k=r[ss.id2name(T)];k._categories=e._categories,k._categoriesMap=e._categoriesMap,m=m.concat(k._traceIndices)}return m};var w=r._d3locale;e.type==="date"&&(e._dateFormat=w?w.timeFormat:wS,e._extraFormat=r._extraFormat),e._separators=r.separators,e._numFormat=w?w.numberFormat:TS,delete e._minDtick,delete e._forceTick0},b1=gt,ah=me.exports,SS=Jt.BADNUM,cf=ah.isArrayOrTypedArray,LS=ah.isDateTime,CS=ah.cleanNumber,x1=Math.round,_1=function(e,r,a){var i=e,n=a.noMultiCategory;if(cf(i)&&!i.length)return"-";if(!n&&PS(i))return"multicategory";if(n&&Array.isArray(i[0])){for(var o=[],l=0;l<i.length;l++)if(cf(i[l]))for(var s=0;s<i[l].length;s++)o.push(i[l][s]);i=o}if($S(i,r))return"date";var f=a.autotypenumbers!=="strict";return RS(i,f)?"category":ES(i,f)?"linear":"-"};function DS(t,e){return e?b1(t):typeof t=="number"}function ES(t,e){for(var r=t.length,a=0;a<r;a++)if(DS(t[a],e))return!0;return!1}function $S(t,e){for(var r=t.length,a=w1(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=x1(l),f=t[s],c=String(f);o[c]||(o[c]=1,LS(f,e)&&i++,b1(f)&&n++)}return i>n*2}function w1(t){return Math.max(1,(t-1)/1e3)}function RS(t,e){for(var r=t.length,a=w1(r),i=0,n=0,o={},l=0;l<r;l+=a){var s=x1(l),f=t[s],c=String(f);if(!o[c]){o[c]=1;var v=typeof f;v==="boolean"?n++:(e?CS(f)!==SS:v==="number")?i++:v==="string"&&n++}}return n>i*2}function PS(t){return cf(t[0])&&cf(t[1])}var zS=ct.exports,T1=gt,Ji=me.exports,Vs=Jt.FP_SAFE,IS=We,NS=Pt.exports,k1=ir,FS=k1.getFromId,HS=k1.isLinked,Fl={getAutoRange:Hv,makePadFn:Ov,doAutoRange:BS,findExtremes:jS,concatExtremes:ih};function Hv(t,e){var r,a,i=[],n=t._fullLayout,o=Ov(n,e,0),l=Ov(n,e,1),s=ih(t,e),f=s.min,c=s.max;if(f.length===0||c.length===0)return Ji.simpleMap(e.range,e.r2l);var v=f[0].val,u=c[0].val;for(r=1;r<f.length&&v===u;r++)v=Math.min(v,f[r].val);for(r=1;r<c.length&&v===u;r++)u=Math.max(u,c[r].val);var d=!1;if(e.range){var h=Ji.simpleMap(e.range,e.r2l);d=h[1]<h[0]}e.autorange==="reversed"&&(d=!0,e.autorange=!0);var p=e.rangemode,g=p==="tozero",_=p==="nonnegative",b=e._length,w=b/10,m=0,y,x,T,k,S,A;for(r=0;r<f.length;r++)for(y=f[r],a=0;a<c.length;a++)x=c[a],A=x.val-y.val-hm(e,y.val,x.val),A>0&&(S=b-o(y)-l(x),S>w?A/S>m&&(T=y,k=x,m=A/S):A/b>m&&(T={val:y.val,nopad:1},k={val:x.val,nopad:1},m=A/b));function E(P,R){return Math.max(P,l(R))}if(v===u){var M=v-1,D=v+1;if(g)if(v===0)i=[0,1];else{var $=(v>0?c:f).reduce(E,0),I=v/(1-Math.min(.5,$/b));i=v>0?[0,I]:[I,0]}else _?i=[Math.max(0,M),Math.max(1,D)]:i=[M,D]}else g?(T.val>=0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):_&&(T.val-m*o(T)<0&&(T={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),m=(k.val-T.val-hm(e,y.val,x.val))/(b-o(T)-l(k)),i=[T.val-m*o(T),k.val+m*l(k)];return d&&i.reverse(),Ji.simpleMap(i,e.l2r||Number)}function hm(t,e,r){var a=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),n=0;n<i.length;n++){var o=i[n];a+=o.max-o.min}return a}function Ov(t,e,r){var a=.05*e._length,i=e._anchorAxis||{};if((e.ticklabelposition||"").indexOf("inside")!==-1||(i.ticklabelposition||"").indexOf("inside")!==-1){var n=e.autorange==="reversed";if(!n){var o=Ji.simpleMap(e.range,e.r2l);n=o[1]<o[0]}n&&(r=!r)}var l=0;return HS(t,e._id)||(l=OS(t,e,r)),a=Math.max(l,a),e.constrain==="domain"&&e._inputDomain&&(a*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(f){return f.nopad?0:f.pad+(f.extrapad?a:l)}}var pm=3;function OS(t,e,r){var a=0,i=e._id.charAt(0)==="x";for(var n in t._plots){var o=t._plots[n];if(!(e._id!==o.xaxis._id&&e._id!==o.yaxis._id)){var l=(i?o.yaxis:o.xaxis)||{};if((l.ticklabelposition||"").indexOf("inside")!==-1&&(!r&&(l.side==="left"||l.side==="bottom")||r&&(l.side==="top"||l.side==="right"))){if(l._vals){var s=Ji.deg2rad(l._tickAngles[l._id+"tick"]||0),f=Math.abs(Math.cos(s)),c=Math.abs(Math.sin(s));if(!l._vals[0].bb){var v=l._id+"tick",u=l._selections[v];u.each(function(b){var w=zS.select(this),m=w.select(".text-math-group");m.empty()&&(b.bb=NS.bBox(w.node()))})}for(var d=0;d<l._vals.length;d++){var h=l._vals[d],p=h.bb;if(p){var g=2*pm+p.width,_=2*pm+p.height;a=Math.max(a,i?Math.max(g*f,_*c):Math.max(_*f,g*c))}}}l.ticks==="inside"&&l.ticklabelposition==="inside"&&(a+=l.ticklen||0)}}}return a}function ih(t,e,r){var a=e._id,i=t._fullData,n=t._fullLayout,o=[],l=[],s,f,c;function v(g,_){for(s=0;s<_.length;s++){var b=g[_[s]],w=(b._extremes||{})[a];if(b.visible===!0&&w){for(f=0;f<w.min.length;f++)c=w.min[f],Bv(o,c.val,c.pad,{extrapad:c.extrapad});for(f=0;f<w.max.length;f++)c=w.max[f],jv(l,c.val,c.pad,{extrapad:c.extrapad})}}}if(v(i,e._traceIndices),v(n.annotations||[],e._annIndices||[]),v(n.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r){for(var u in e._matchGroup)if(u!==e._id){var d=FS(t,u),h=ih(t,d,!0),p=e._length/d._length;for(f=0;f<h.min.length;f++)c=h.min[f],Bv(o,c.val,c.pad*p,{extrapad:c.extrapad});for(f=0;f<h.max.length;f++)c=h.max[f],jv(l,c.val,c.pad*p,{extrapad:c.extrapad})}}return{min:o,max:l}}function BS(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():Hv(t,e),e._r=e.range.slice(),e._rl=Ji.simpleMap(e._r,e.r2l);var a=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,IS.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),a.range=e.range.slice(),a.autorange=e.autorange}var n=e._anchorAxis;if(n&&n.rangeslider){var o=n.rangeslider[e._name];o&&o.rangemode==="auto"&&(o.range=Hv(t,e)),n._input.rangeslider[e._name]=Ji.extendFlat({},o)}}function jS(t,e,r){r||(r={}),t._m||t.setScale();var a=[],i=[],n=e.length,o=r.padded||!1,l=r.tozero&&(t.type==="linear"||t.type==="-"),s=t.type==="log",f=!1,c=r.vpadLinearized||!1,v,u,d,h,p,g,_,b,w;function m(M){if(Array.isArray(M))return f=!0,function($){return Math.max(Number(M[$]||0),0)};var D=Math.max(Number(M||0),0);return function(){return D}}var y=m((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),x=m((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=m(r.vpadplus||r.vpad),k=m(r.vpadminus||r.vpad);if(!f){if(b=1/0,w=-1/0,s)for(v=0;v<n;v++)u=e[v],u<b&&u>0&&(b=u),u>w&&u<Vs&&(w=u);else for(v=0;v<n;v++)u=e[v],u<b&&u>-Vs&&(b=u),u>w&&u<Vs&&(w=u);e=[b,w],n=2}var S={tozero:l,extrapad:o};function A(M){d=e[M],T1(d)&&(g=y(M),_=x(M),c?(h=t.c2l(d)-k(M),p=t.c2l(d)+T(M)):(b=d-k(M),w=d+T(M),s&&b<w/10&&(b=w/10),h=t.c2l(b),p=t.c2l(w)),l&&(h=Math.min(0,h),p=Math.max(0,p)),mm(h)&&Bv(a,h,_,S),mm(p)&&jv(i,p,g,S))}var E=Math.min(6,n);for(v=0;v<E;v++)A(v);for(v=n-1;v>=E;v--)A(v);return{min:a,max:i,opts:r}}function Bv(t,e,r,a){A1(t,e,r,a,GS)}function jv(t,e,r,a){A1(t,e,r,a,US)}function A1(t,e,r,a,i){for(var n=a.tozero,o=a.extrapad,l=!0,s=0;s<t.length&&l;s++){var f=t[s];if(i(f.val,e)&&f.pad>=r&&(f.extrapad||!o)){l=!1;break}else i(e,f.val)&&f.pad<=r&&(o||!f.extrapad)&&(t.splice(s,1),s--)}if(l){var c=n&&e===0;t.push({val:e,pad:c?0:r,extrapad:c?!1:o})}}function mm(t){return T1(t)&&Math.abs(t)<Vs}function GS(t,e){return t<=e}function US(t,e){return t>=e}var Fa=ct.exports,hr=gt,Wn=ar.exports,pl=We,vt=me.exports,to=vt.strTranslate,Qo=xr,VS=ec,ml=ft.exports,xa=Pt.exports,qS=ti,ym=Qf,Pr=Jt,XS=Pr.ONEMAXYEAR,uf=Pr.ONEAVGYEAR,Gv=Pr.ONEMINYEAR,YS=Pr.ONEMAXQUARTER,Uv=Pr.ONEAVGQUARTER,Vv=Pr.ONEMINQUARTER,WS=Pr.ONEMAXMONTH,ro=Pr.ONEAVGMONTH,qv=Pr.ONEMINMONTH,qi=Pr.ONEWEEK,sa=Pr.ONEDAY,en=sa/2,Qa=Pr.ONEHOUR,vf=Pr.ONEMIN,Xv=Pr.ONESEC,tn=Pr.MINUS_SIGN,tc=Pr.BADNUM,Yv={K:"zeroline"},Wv={K:"gridline",L:"path"},M1={K:"tick",L:"path"},gm={K:"tick",L:"text"},rc=Vr,us=rc.MID_SHIFT,rn=rc.CAP_SHIFT,df=rc.LINE_SPACING,ZS=rc.OPPOSITE_SIDE,Zv=3,Le=jt.exports={};Le.setConvert=rh;var KS=_1,ai=ir,QS=ai.idSort,JS=ai.isLinked;Le.id2name=ai.id2name;Le.name2id=ai.name2id;Le.cleanId=ai.cleanId;Le.list=ai.list;Le.listIds=ai.listIds;Le.getFromId=ai.getFromId;Le.getFromTrace=ai.getFromTrace;var S1=Fl;Le.getAutoRange=S1.getAutoRange;Le.findExtremes=S1.findExtremes;var eL=1e-4;function nh(t){var e=(t[1]-t[0])*eL;return[t[0]-e,t[1]+e]}Le.coerceRef=function(t,e,r,a,i,n){var o=a.charAt(a.length-1),l=r._fullLayout._subplots[o+"axis"],s=a+"ref",f={};return i||(i=l[0]||(typeof n=="string"?n:n[0])),n||(n=i),l=l.concat(l.map(function(c){return c+" domain"})),f[s]={valType:"enumerated",values:l.concat(n?typeof n=="string"?[n]:n:[]),dflt:i},vt.coerce(t,e,f,s)};Le.getRefType=function(t){return t===void 0?t:t==="paper"?"paper":t==="pixel"?"pixel":/( domain)$/.test(t)?"domain":"range"};Le.coercePosition=function(t,e,r,a,i,n){var o,l,s=Le.getRefType(a);if(s!=="range")o=vt.ensureNumber,l=r(i,n);else{var f=Le.getFromId(e,a);n=f.fraction2r(n),l=r(i,n),o=f.cleanPos}t[i]=o(l)};Le.cleanPosition=function(t,e,r){var a=r==="paper"||r==="pixel"?vt.ensureNumber:Le.getFromId(e,r).cleanPos;return a(t)};Le.redrawComponents=function(t,e){e=e||Le.listIds(t);var r=t._fullLayout;function a(i,n,o,l){for(var s=pl.getComponentMethod(i,n),f={},c=0;c<e.length;c++)for(var v=r[Le.id2name(e[c])],u=v[o],d=0;d<u.length;d++){var h=u[d];if(!f[h]&&(s(t,h),f[h]=1,l))return}}a("annotations","drawOne","_annIndices"),a("shapes","drawOne","_shapeIndices"),a("images","draw","_imgIndices",!0)};var tL=Le.getDataConversions=function(t,e,r,a){var i,n=r==="x"||r==="y"||r==="z"?r:a;if(Array.isArray(n)){if(i={type:KS(a,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},Le.setConvert(i),i.type==="category")for(var o=0;o<a.length;o++)i.d2c(a[o])}else i=Le.getFromTrace(t,e,n);return i?{d2c:i.d2c,c2d:i.c2d}:n==="ids"?{d2c:xm,c2d:xm}:{d2c:bm,c2d:bm}};function bm(t){return+t}function xm(t){return String(t)}Le.getDataToCoordFunc=function(t,e,r,a){return tL(t,e,r,a).d2c};Le.counterLetter=function(t){var e=t.charAt(0);if(e==="x")return"y";if(e==="y")return"x"};Le.minDtick=function(t,e,r,a){["log","category","multicategory"].indexOf(t.type)!==-1||!a?t._minDtick=0:t._minDtick===void 0?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0))};Le.saveRangeInitial=function(t,e){for(var r=Le.list(t,"",!0),a=!1,i=0;i<r.length;i++){var n=r[i],o=n._rangeInitial===void 0,l=o||!(n.range[0]===n._rangeInitial[0]&&n.range[1]===n._rangeInitial[1]);(o&&n.autorange===!1||e&&l)&&(n._rangeInitial=n.range.slice(),a=!0)}return a};Le.saveShowSpikeInitial=function(t,e){for(var r=Le.list(t,"",!0),a=!1,i="on",n=0;n<r.length;n++){var o=r[n],l=o._showSpikeInitial===void 0,s=l||o.showspikes!==o._showspikes;(l||e&&s)&&(o._showSpikeInitial=o.showspikes,a=!0),i==="on"&&!o.showspikes&&(i="off")}return t._fullLayout._cartesianSpikesEnabled=i,a};Le.autoBin=function(t,e,r,a,i,n){var o=vt.aggNums(Math.min,null,t),l=vt.aggNums(Math.max,null,t);if(e.type==="category"||e.type==="multicategory")return{start:o-.5,end:l+.5,size:Math.max(1,Math.round(n)||1),_dataSpan:l-o};i||(i=e.calendar);var s;if(e.type==="log"?s={type:"linear",range:[o,l]}:s={type:e.type,range:vt.simpleMap([o,l],e.c2r,0,i),calendar:i},Le.setConvert(s),n=n&&ym.dtick(n,s.type),n)s.dtick=n,s.tick0=ym.tick0(void 0,s.type,i);else{var f;if(r)f=(l-o)/r;else{var c=vt.distinctVals(t),v=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),u=v*vt.roundUp(c.minDiff/v,[.9,1.9,4.9,9.9],!0);f=Math.max(u,2*vt.stdev(t)/Math.pow(t.length,a?.25:.4)),hr(f)||(f=1)}Le.autoTicks(s,f)}var d=s.dtick,h=Le.tickIncrement(Le.tickFirst(s),d,"reverse",i),p,g;if(typeof d=="number")h=rL(h,t,s,o,l),g=1+Math.floor((l-h)/d),p=h+g*d;else for(s.dtick.charAt(0)==="M"&&(h=aL(h,t,d,o,i)),p=h,g=0;p<=l;)p=Le.tickIncrement(p,d,!1,i),g++;return{start:e.c2r(h,0,i),end:e.c2r(p,0,i),size:d,_dataSpan:l-o}};function rL(t,e,r,a,i){var n=0,o=0,l=0,s=0;function f(d){return(1+(d-t)*100/r.dtick)%100<2}for(var c=0;c<e.length;c++)e[c]%1===0?l++:hr(e[c])||s++,f(e[c])&&n++,f(e[c]+r.dtick/2)&&o++;var v=e.length-s;if(l===v&&r.type!=="date")r.dtick<1?t=a-.5*r.dtick:(t-=.5,t+r.dtick<a&&(t+=r.dtick));else if(o<v*.1&&(n>v*.3||f(a)||f(i))){var u=r.dtick/2;t+=t+u<a?u:-u}return t}function aL(t,e,r,a,i){var n=vt.findExactDates(e,i),o=.8;if(n.exactDays>o){var l=Number(r.substr(1));n.exactYears>o&&l%12===0?t=Le.tickIncrement(t,"M6","reverse")+sa*1.5:n.exactMonths>o?t=Le.tickIncrement(t,"M1","reverse")+sa*15.5:t-=en;var s=Le.tickIncrement(t,r);if(s<=a)return s}return t}Le.prepTicks=function(t,e){var r=vt.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,t.tickmode==="auto"||!t.dtick){var a=t.nticks,i;a||(t.type==="category"||t.type==="multicategory"?(i=t.tickfont?vt.bigFont(t.tickfont.size||12):15,a=t._length/i):(i=t._id.charAt(0)==="y"?40:80,a=vt.constrain(t._length/i,4,9)+1),t._name==="radialaxis"&&(a*=2)),t.tickmode==="array"&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,Le.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<t._minDtick*2&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}t.ticklabelmode==="period"&&iL(t),t.tick0||(t.tick0=t.type==="date"?"2000-01-01":0),t.type==="date"&&t.dtick<.1&&(t.dtick=.1),D1(t)};function Xc(t){return+t.substring(1)}function iL(t){var e;function r(){return!(hr(t.dtick)||t.dtick.charAt(0)!=="M")}var a=r(),i=Le.getTickFormat(t);if(i){var n=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(i)||(/%[HI]/.test(i)?(e=Qa,n&&!a&&t.dtick<Qa&&(t.dtick=Qa)):/%p/.test(i)?(e=en,n&&!a&&t.dtick<en&&(t.dtick=en)):/%[Aadejuwx]/.test(i)?(e=sa,n&&!a&&t.dtick<sa&&(t.dtick=sa)):/%[UVW]/.test(i)?(e=qi,n&&!a&&t.dtick<qi&&(t.dtick=qi)):/%[Bbm]/.test(i)?(e=ro,n&&(a?Xc(t.dtick)<1:t.dtick<qv)&&(t.dtick="M1")):/%[q]/.test(i)?(e=Uv,n&&(a?Xc(t.dtick)<3:t.dtick<Vv)&&(t.dtick="M3")):/%[Yy]/.test(i)&&(e=uf,n&&(a?Xc(t.dtick)<12:t.dtick<Gv)&&(t.dtick="M12")))}a=r(),a&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}function nL(t,e,r){for(var a=0;a<t.length;a++){var i=t[a].value,n=a,o=a+1;a<t.length-1?(n=a,o=a+1):a>0?(n=a-1,o=a):(n=a,o=a);var l=t[n].value,s=t[o].value,f=Math.abs(s-l),c=r||f,v=0;c>=Gv?f>=Gv&&f<=XS?v=f:v=uf:r===Uv&&c>=Vv?f>=Vv&&f<=YS?v=f:v=Uv:c>=qv?f>=qv&&f<=WS?v=f:v=ro:r===qi&&c>=qi?v=qi:c>=sa?v=sa:r===en&&c>=en?v=en:r===Qa&&c>=Qa&&(v=Qa);var u;v>=f&&(v=f,u=!0);var d=i+v;if(e.rangebreaks&&v>0){for(var h=84,p=0,g=0;g<h;g++){var _=(g+.5)/h;e.maskBreaks(i*(1-_)+_*d)!==tc&&p++}v*=p/h,v||(t[a].drop=!0),u&&f>qi&&(v=f)}(v>0||a===0)&&(t[a].periodX=i+v/2)}}Le.calcTicks=function(e,r){Le.prepTicks(e,r);var a=vt.simpleMap(e.range,e.r2l,void 0,void 0,r);if(e.tickmode==="array")return oL(e);var i=nh(a),n=i[0],o=i[1],l=a[1]<a[0],s=Math.min(a[0],a[1]),f=Math.max(a[0],a[1]),c=hr(e.dtick),v=e.type==="log"&&!(c||e.dtick.charAt(0)==="L"),u=e.ticklabelmode==="period";if(e._tmin=Le.tickFirst(e,r),e._tmin<n!==l)return[];(e.type==="category"||e.type==="multicategory")&&(o=l?Math.max(-.5,o):Math.min(e._categories.length-.5,o));var d=e._tmin;e.rangebreaks&&e._tick0Init!==e.tick0&&(d=Yc(d,e),l||(d=Le.tickIncrement(d,e.dtick,!l,e.calendar))),u&&(d=Le.tickIncrement(d,e.dtick,!l,e.calendar));var h=e.ticklabelstep,p=Math.max(1e3,e._length||0),g=[],_=null,b;c?b=e.dtick:e.type==="date"?typeof e.dtick=="string"&&e.dtick.charAt(0)==="M"&&(b=ro*e.dtick.substring(1)):b=e._roughDTick;for(var w=Math.round((e.r2l(d)-e.r2l(e.tick0))/b)-1;l?d>=o:d<=o;d=Le.tickIncrement(d,e.dtick,l,e.calendar)){if(w++,e.rangebreaks&&!l){if(d<n)continue;if(e.maskBreaks(d)===tc&&Yc(d,e)>=f)break}if(g.length>p||d===_)break;_=d;var m=!1;v&&d!==(d|0)&&(m=!0);var y={minor:m,value:d};h>1&&w%h&&(y.skipLabel=!0),g.push(y)}u&&nL(g,e,e._definedDelta);var x;if(e.rangebreaks){var T=e._id.charAt(0)==="y",k=1;e.tickmode==="auto"&&(k=e.tickfont?e.tickfont.size:12);var S=NaN;for(x=g.length-1;x>-1;x--){if(g[x].drop){g.splice(x,1);continue}g[x].value=Yc(g[x].value,e);var A=e.c2p(g[x].value);(T?S>A-k:S<A+k)?g.splice(l?x+1:x,1):S=A}}fh(e)&&Math.abs(a[1]-a[0])===360&&g.pop(),e._tmax=(g[g.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;var E,M=function(L){L.text=" ",e._prevDateHead=E},D=[],$,I;for(x=0;x<g.length;x++){var P=g[x].minor,R=g[x].value;E=e._prevDateHead,$=Le.tickText(e,R,!1,P),I=g[x].periodX,I!==void 0&&($.periodX=I,(I>f||I<s)&&(I>f&&($.periodX=f),I<s&&($.periodX=s),M($))),g[x].skipLabel&&M($),D.push($)}return e._inCalcTicks=!1,D};function oL(t){var e=t.tickvals,r=t.ticktext,a=new Array(e.length),i=vt.simpleMap(t.range,t.r2l),n=nh(i),o=Math.min(n[0],n[1]),l=Math.max(n[0],n[1]),s=0;Array.isArray(r)||(r=[]);var f=t.type==="category"?t.d2l_noadd:t.d2l;t.type==="log"&&String(t.dtick).charAt(0)!=="L"&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var c=0;c<e.length;c++){var v=f(e[c]);v>o&&v<l&&(r[c]===void 0?a[s]=Le.tickText(t,v):a[s]=oh(t,v,String(r[c])),s++)}return s<e.length&&a.splice(s,e.length-s),t.rangebreaks&&(a=a.filter(function(u){return t.maskBreaks(u.x)!==tc})),a}var vs=[2,5,10],_m=[1,2,3,6,12],wm=[1,2,5,10,15,30],lL=[1,2,3,7,14],L1=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],C1=[-.301,0,.301,.699,1],sL=[15,30,45,90,180];function $a(t,e,r){return e*vt.roundUp(t/e,r)}Le.autoTicks=function(t,e){var r;function a(c){return Math.pow(c,Math.floor(Math.log(e)/Math.LN10))}if(t.type==="date"){t.tick0=vt.dateTick0(t.calendar,0);var i=2*e;if(i>uf)e/=uf,r=a(10),t.dtick="M"+12*$a(e,r,vs);else if(i>ro)e/=ro,t.dtick="M"+$a(e,1,_m);else if(i>sa){t.dtick=$a(e,sa,t._hasDayOfWeekBreaks?[1,2,7,14]:lL);var n=Le.getTickFormat(t),o=t.ticklabelmode==="period";o&&(t._rawTick0=t.tick0),/%[uVW]/.test(n)?t.tick0=vt.dateTick0(t.calendar,2):t.tick0=vt.dateTick0(t.calendar,1),o&&(t._dowTick0=t.tick0)}else i>Qa?t.dtick=$a(e,Qa,_m):i>vf?t.dtick=$a(e,vf,wm):i>Xv?t.dtick=$a(e,Xv,wm):(r=a(10),t.dtick=$a(e,r,vs))}else if(t.type==="log"){t.tick0=0;var l=vt.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(l[1]-l[0])<1){var s=1.5*Math.abs((l[1]-l[0])/e);e=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/s,r=a(10),t.dtick="L"+$a(e,r,vs)}else t.dtick=e>.3?"D2":"D1"}else t.type==="category"||t.type==="multicategory"?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):fh(t)?(t.tick0=0,r=1,t.dtick=$a(e,r,sL)):(t.tick0=0,r=a(10),t.dtick=$a(e,r,vs));if(t.dtick===0&&(t.dtick=1),!hr(t.dtick)&&typeof t.dtick!="string"){var f=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(f)}};function D1(t){var e=t.dtick;if(t._tickexponent=0,!hr(e)&&typeof e!="string"&&(e=1),(t.type==="category"||t.type==="multicategory")&&(t._tickround=null),t.type==="date"){var r=t.r2l(t.tick0),a=t.l2r(r).replace(/(^-|i)/g,""),i=a.length;if(String(e).charAt(0)==="M")i>10||a.substr(5)!=="01-01"?t._tickround="d":t._tickround=+e.substr(1)%12===0?"y":"m";else if(e>=sa&&i<=10||e>=sa*15)t._tickround="d";else if(e>=vf&&i<=16||e>=Qa)t._tickround="M";else if(e>=Xv&&i<=19||e>=vf)t._tickround="S";else{var n=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(i,n)-20,t._tickround<0&&(t._tickround=4)}}else if(hr(e)||e.charAt(0)==="L"){var o=t.range.map(t.r2d||Number);hr(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(o[0]),Math.abs(o[1])),s=Math.floor(Math.log(l)/Math.LN10+.01),f=t.minexponent===void 0?3:t.minexponent;Math.abs(s)>f&&(hf(t.exponentformat)&&!lh(s)?t._tickexponent=3*Math.round((s-1)/3):t._tickexponent=s)}else t._tickround=null}Le.tickIncrement=function(t,e,r,a){var i=r?-1:1;if(hr(e))return vt.increment(t,i*e);var n=e.charAt(0),o=i*Number(e.substr(1));if(n==="M")return vt.incrementMonth(t,o,a);if(n==="L")return Math.log(Math.pow(10,t)+o)/Math.LN10;if(n==="D"){var l=e==="D2"?C1:L1,s=t+i*.01,f=vt.roundUp(vt.mod(s,1),l,r);return Math.floor(s)+Math.log(Fa.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(e)};Le.tickFirst=function(t,e){var r=t.r2l||Number,a=vt.simpleMap(t.range,r,void 0,void 0,e),i=a[1]<a[0],n=i?Math.floor:Math.ceil,o=nh(a)[0],l=t.dtick,s=r(t.tick0);if(hr(l)){var f=n((o-s)/l)*l+s;return(t.type==="category"||t.type==="multicategory")&&(f=vt.constrain(f,0,t._categories.length-1)),f}var c=l.charAt(0),v=Number(l.substr(1));if(c==="M"){for(var u=0,d=s,h,p,g;u<10;){if(h=Le.tickIncrement(d,l,i,t.calendar),(h-o)*(d-o)<=0)return i?Math.min(d,h):Math.max(d,h);p=(o-(d+h)/2)/(h-d),g=c+(Math.abs(Math.round(p))||1)*v,d=Le.tickIncrement(d,g,p<0?!i:i,t.calendar),u++}return vt.error("tickFirst did not converge",t),d}else{if(c==="L")return Math.log(n((Math.pow(10,o)-s)/v)*v+s)/Math.LN10;if(c==="D"){var _=l==="D2"?C1:L1,b=vt.roundUp(vt.mod(o,1),_,i);return Math.floor(o)+Math.log(Fa.round(Math.pow(10,b),1))/Math.LN10}else throw"unrecognized dtick "+String(l)}};Le.tickText=function(t,e,r,a){var i=oh(t,e),n=t.tickmode==="array",o=r||n,l=t.type,s=l==="category"?t.d2l_noadd:t.d2l,f;if(n&&Array.isArray(t.ticktext)){var c=vt.simpleMap(t.range,t.r2l),v=(Math.abs(c[1]-c[0])-(t._lBreaks||0))/1e4;for(f=0;f<t.ticktext.length&&!(Math.abs(e-s(t.tickvals[f]))<v);f++);if(f<t.ticktext.length)return i.text=String(t.ticktext[f]),i}function u(p){if(p===void 0)return!0;if(r)return p==="none";var g={first:t._tmin,last:t._tmax}[p];return p!=="all"&&e!==g}var d=r?"never":t.exponentformat!=="none"&&u(t.showexponent)?"hide":"";if(l==="date"?fL(t,i,r,o):l==="log"?cL(t,i,r,o,d):l==="category"?uL(t,i):l==="multicategory"?vL(t,i,r):fh(t)?hL(t,i,r,o,d):dL(t,i,r,o,d),a||(t.tickprefix&&!u(t.showtickprefix)&&(i.text=t.tickprefix+i.text),t.ticksuffix&&!u(t.showticksuffix)&&(i.text+=t.ticksuffix)),t.tickson==="boundaries"||t.showdividers){var h=function(p){var g=t.l2p(p);return g>=0&&g<=t._length?p:null};i.xbnd=[h(i.x-.5),h(i.x+t.dtick-.5)]}return i};Le.hoverLabelText=function(t,e,r){r&&(t=vt.extendFlat({},t,{hoverformat:r}));var a=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(i!==void 0&&i!==a)return Le.hoverLabelText(t,a,r)+" - "+Le.hoverLabelText(t,i,r);var n=t.type==="log"&&a<=0,o=Le.tickText(t,t.c2l(n?-a:a),"hover").text;return n?a===0?"0":tn+o:o};function oh(t,e,r){var a=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:a.size,font:a.family,fontColor:a.color}}function fL(t,e,r,a){var i=t._tickround,n=r&&t.hoverformat||Le.getTickFormat(t);a&&(hr(i)?i=4:i={y:"m",m:"d",d:"M",M:"S",S:4}[i]);var o=vt.formatDate(e.x,n,i,t._dateFormat,t.calendar,t._extraFormat),l,s=o.indexOf(`
|
|
4
|
-
`);if(s!==-1&&(l=o.substr(s+1),o=o.substr(0,s)),a&&(o==="00:00:00"||o==="00:00"?(o=l,l=""):o.length===8&&(o=o.replace(/:00$/,""))),l)if(r)i==="d"?o+=", "+l:o=l+(o?", "+o:"");else if(!t._inCalcTicks||t._prevDateHead!==l)t._prevDateHead=l,o+="<br>"+l;else{var f=gl(t),c=t._trueSide||t.side;(!f&&c==="top"||f&&c==="bottom")&&(o+="<br> ")}e.text=o}function cL(t,e,r,a,i){var n=t.dtick,o=e.x,l=t.tickformat,s=typeof n=="string"&&n.charAt(0);if(i==="never"&&(i=""),a&&s!=="L"&&(n="L3",s="L"),l||s==="L")e.text=yl(Math.pow(10,o),t,i,a);else if(hr(n)||s==="D"&&vt.mod(o+.01,1)<.1){var f=Math.round(o),c=Math.abs(f),v=t.exponentformat;v==="power"||hf(v)&&lh(f)?(f===0?e.text=1:f===1?e.text="10":e.text="10<sup>"+(f>1?"":tn)+c+"</sup>",e.fontSize*=1.25):(v==="e"||v==="E")&&c>2?e.text="1"+v+(f>0?"+":tn)+c:(e.text=yl(Math.pow(10,o),t,"","fakehover"),n==="D1"&&t._id.charAt(0)==="y"&&(e.dy-=e.fontSize/6))}else if(s==="D")e.text=String(Math.round(Math.pow(10,vt.mod(o,1)))),e.fontSize*=.75;else throw"unrecognized dtick "+String(n);if(t.dtick==="D1"){var u=String(e.text).charAt(0);(u==="0"||u==="1")&&(t._id.charAt(0)==="y"?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(o<0?.5:.25)))}}function uL(t,e){var r=t._categories[Math.round(e.x)];r===void 0&&(r=""),e.text=String(r)}function vL(t,e,r){var a=Math.round(e.x),i=t._categories[a]||[],n=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?e.text=o+" - "+n:(e.text=n,e.text2=o)}function dL(t,e,r,a,i){i==="never"?i="":t.showexponent==="all"&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=yl(e.x,t,i,a)}function hL(t,e,r,a,i){if(t.thetaunit==="radians"&&!r){var n=e.x/180;if(n===0)e.text="0";else{var o=pL(n);if(o[1]>=100)e.text=yl(vt.deg2rad(e.x),t,i,a);else{var l=e.x<0;o[1]===1?o[0]===1?e.text="\u03C0":e.text=o[0]+"\u03C0":e.text=["<sup>",o[0],"</sup>","\u2044","<sub>",o[1],"</sub>","\u03C0"].join(""),l&&(e.text=tn+e.text)}}}else e.text=yl(e.x,t,i,a)}function pL(t){function e(l,s){return Math.abs(l-s)<=1e-6}function r(l,s){return e(s,0)?l:r(s,l%s)}function a(l){for(var s=1;!e(Math.round(l*s)/s,l);)s*=10;return s}var i=a(t),n=t*i,o=Math.abs(r(n,i));return[Math.round(n/o),Math.round(i/o)]}var mL=["f","p","n","\u03BC","m","","k","M","G","T"];function hf(t){return t==="SI"||t==="B"}function lh(t){return t>14||t<-15}function yl(t,e,r,a){var i=t<0,n=e._tickround,o=r||e.exponentformat||"B",l=e._tickexponent,s=Le.getTickFormat(e),f=e.separatethousands;if(a){var c={exponentformat:o,minexponent:e.minexponent,dtick:e.showexponent==="none"?e.dtick:hr(t)&&Math.abs(t)||1,range:e.showexponent==="none"?e.range.map(e.r2d):[0,t||1]};D1(c),n=(Number(c._tickround)||0)+4,l=c._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(t).replace(/-/g,tn);var v=Math.pow(10,-n)/2;if(o==="none"&&(l=0),t=Math.abs(t),t<v)t="0",i=!1;else{if(t+=v,l&&(t*=Math.pow(10,-l),n+=l),n===0)t=String(Math.floor(t));else if(n<0){t=String(Math.round(t)),t=t.substr(0,t.length+n);for(var u=n;u<0;u++)t+="0"}else{t=String(t);var d=t.indexOf(".")+1;d&&(t=t.substr(0,d+n).replace(/\.?0+$/,""))}t=vt.numSeparate(t,e._separators,f)}if(l&&o!=="hide"){hf(o)&&lh(l)&&(o="power");var h;l<0?h=tn+-l:o!=="power"?h="+"+l:h=String(l),o==="e"||o==="E"?t+=o+h:o==="power"?t+="\xD710<sup>"+h+"</sup>":o==="B"&&l===9?t+="B":hf(o)&&(t+=mL[l/3+5])}return i?tn+t:t}Le.getTickFormat=function(t){var e;function r(s){return typeof s!="string"?s:Number(s.replace("M",""))*ro}function a(s,f){var c=["L","D"];if(typeof s==typeof f){if(typeof s=="number")return s-f;var v=c.indexOf(s.charAt(0)),u=c.indexOf(f.charAt(0));return v===u?Number(s.replace(/(L|D)/g,""))-Number(f.replace(/(L|D)/g,"")):v-u}else return typeof s=="number"?1:-1}function i(s,f,c){var v=c||function(h){return h},u=f[0],d=f[1];return(!u&&typeof u!="number"||v(u)<=v(s))&&(!d&&typeof d!="number"||v(d)>=v(s))}function n(s,f){var c=f[0]===null,v=f[1]===null,u=a(s,f[0])>=0,d=a(s,f[1])<=0;return(c||u)&&(v||d)}var o,l;if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&i(t.dtick,l.dtickrange,r)){o=l;break}break}case"log":{for(e=0;e<t.tickformatstops.length;e++)if(l=t.tickformatstops[e],l.enabled&&n(t.dtick,l.dtickrange)){o=l;break}break}}return o?o.value:t.tickformat};Le.getSubplots=function(t,e){var r=t._fullLayout._subplots,a=r.cartesian.concat(r.gl2d||[]),i=e?Le.findSubplotsWithAxis(a,e):a;return i.sort(function(n,o){var l=n.substr(1).split("y"),s=o.substr(1).split("y");return l[0]===s[0]?+l[1]-+s[1]:+l[0]-+s[0]}),i};Le.findSubplotsWithAxis=function(t,e){for(var r=new RegExp(e._id.charAt(0)==="x"?"^"+e._id+"y":e._id+"$"),a=[],i=0;i<t.length;i++){var n=t[i];r.test(n)&&a.push(n)}return a};Le.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r={_offset:0,_length:e.width,_id:""},a={_offset:0,_length:e.height,_id:""},i=Le.list(t,"x",!0),n=Le.list(t,"y",!0),o=[],l,s;for(l=0;l<i.length;l++)for(o.push({x:i[l],y:a}),s=0;s<n.length;s++)l===0&&o.push({x:r,y:n[s]}),o.push({x:i[l],y:n[s]});var f=e._clips.selectAll(".axesclip").data(o,function(c){return c.x._id+c.y._id});f.enter().append("clipPath").classed("axesclip",!0).attr("id",function(c){return"clip"+e._uid+c.x._id+c.y._id}).append("rect"),f.exit().remove(),f.each(function(c){Fa.select(this).select("rect").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};Le.draw=function(t,e,r){var a=t._fullLayout;e==="redraw"&&a._paper.selectAll("g.subplot").each(function(n){var o=n[0],l=a._plots[o];if(l){var s=l.xaxis,f=l.yaxis;l.xaxislayer.selectAll("."+s._id+"tick").remove(),l.yaxislayer.selectAll("."+f._id+"tick").remove(),l.xaxislayer.selectAll("."+s._id+"tick2").remove(),l.yaxislayer.selectAll("."+f._id+"tick2").remove(),l.xaxislayer.selectAll("."+s._id+"divider").remove(),l.yaxislayer.selectAll("."+f._id+"divider").remove(),l.gridlayer&&l.gridlayer.selectAll("path").remove(),l.zerolinelayer&&l.zerolinelayer.selectAll("path").remove(),a._infolayer.select(".g-"+s._id+"title").remove(),a._infolayer.select(".g-"+f._id+"title").remove()}});var i=!e||e==="redraw"?Le.listIds(t):e;return vt.syncOrAsync(i.map(function(n){return function(){if(!!n){var o=Le.getFromId(t,n),l=Le.drawOne(t,o,r);return o._r=o.range.slice(),o._rl=vt.simpleMap(o._r,o.r2l),l}}}))};Le.drawOne=function(t,e,r){r=r||{};var a,i,n;e.setScale();var o=t._fullLayout,l=e._id,s=l.charAt(0),f=Le.counterLetter(l),c=o._plots[e._mainSubplot];if(!c)return;var v=c[s+"axislayer"],u=e._mainLinePosition,d=e._mainMirrorPosition,h=e._vals=Le.calcTicks(e),p=[e.mirror,u,d].join("_");for(a=0;a<h.length;a++)h[a].axInfo=p;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var g={};function _(K){var Q=l+(K||"tick");return g[Q]||(g[Q]=xL(e,Q)),g[Q]}if(!!e.visible){var b=Le.makeTransTickFn(e),w=Le.makeTransTickLabelFn(e),m,y,x=e.ticks==="inside",T=e.ticks==="outside";if(e.tickson==="boundaries"){var k=yL(e,h);y=Le.clipEnds(e,k),m=x?y:k}else y=Le.clipEnds(e,h),m=x&&e.ticklabelmode!=="period"?y:h;var S=e._gridVals=y,A=bL(e,h);if(!o._hasOnlyLargeSploms){var E=e._subplotsWith,M={};for(a=0;a<E.length;a++){i=E[a],n=o._plots[i];var D=n[f+"axis"],$=D._mainAxis._id;if(!M[$]){M[$]=1;var I=s==="x"?"M0,"+D._offset+"v"+D._length:"M"+D._offset+",0h"+D._length;Le.drawGrid(t,e,{vals:S,counterAxis:D,layer:n.gridlayer.select("."+l),path:I,transFn:b}),Le.drawZeroLine(t,e,{counterAxis:D,layer:n.zerolinelayer,path:I,transFn:b})}}}var P=Le.getTickSigns(e),R=[];if(e.ticks){var L=Le.makeTickPath(e,u,P[2]),C,z;e._anchorAxis&&e.mirror&&e.mirror!==!0?(C=Le.makeTickPath(e,d,P[3]),z=L+C):(C="",z=L);var F;if(e.showdividers&&T&&e.tickson==="boundaries"){var H={};for(a=0;a<A.length;a++)H[A[a].x]=1;F=function(K){return H[K.x]?C:z}}else F=z;Le.drawTicks(t,e,{vals:m,layer:v,path:F,transFn:b}),e.mirror==="allticks"&&(R=Object.keys(e._linepositions||{}))}for(a=0;a<R.length;a++){i=R[a],n=o._plots[i];var B=e._linepositions[i]||[],O=Le.makeTickPath(e,B[0],P[0])+Le.makeTickPath(e,B[1],P[1]);Le.drawTicks(t,e,{vals:m,layer:n[s+"axislayer"],path:O,transFn:b})}var W=[];if(W.push(function(){return Le.drawLabels(t,e,{vals:h,layer:v,plotinfo:n,transFn:w,labelFns:Le.makeLabelFns(e,u)})}),e.type==="multicategory"){var j={x:2,y:10}[s];W.push(function(){var K={x:"height",y:"width"}[s],Q=_()[K]+j+(e._tickAngles[l+"tick"]?e.tickfont.size*df:0);return Le.drawLabels(t,e,{vals:gL(e,h),layer:v,cls:l+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:b,labelFns:Le.makeLabelFns(e,u+Q*P[4])})}),W.push(function(){return e._depth=P[4]*(_("tick2")[e.side]-u),wL(t,e,{vals:A,layer:v,path:Le.makeTickPath(e,u,P[4],e._depth),transFn:b})})}else e.title.hasOwnProperty("standoff")&&W.push(function(){e._depth=P[4]*(_()[e.side]-u)});var Z=pl.getComponentMethod("rangeslider","isVisible")(e);return W.push(function(){var K=e.side.charAt(0),Q=ZS[e.side].charAt(0),ee=Le.getPxPosition(t,e),ne=T?e.ticklen:0,le,se,oe,V;if((e.automargin||Z)&&(e.type==="multicategory"?le=_("tick2"):(le=_(),s==="x"&&K==="b"&&(e._depth=Math.max(le.width>0?le.bottom-ee:0,ne)))),e.automargin){se={x:0,y:0,r:0,l:0,t:0,b:0};var ie=[0,1];if(s==="x"){if(K==="b"?se[K]=e._depth:(se[K]=e._depth=Math.max(le.width>0?ee-le.top:0,ne),ie.reverse()),le.width>0){var ge=le.right-(e._offset+e._length);ge>0&&(se.xr=1,se.r=ge);var de=e._offset-le.left;de>0&&(se.xl=0,se.l=de)}}else if(K==="l"?se[K]=e._depth=Math.max(le.height>0?ee-le.left:0,ne):(se[K]=e._depth=Math.max(le.height>0?le.right-ee:0,ne),ie.reverse()),le.height>0){var ke=le.bottom-(e._offset+e._length);ke>0&&(se.yb=0,se.b=ke);var ue=e._offset-le.top;ue>0&&(se.yt=1,se.t=ue)}se[f]=e.anchor==="free"?e.position:e._anchorAxis.domain[ie[0]],e.title.text!==o._dfltTitle[s]&&(se[K]+=E1(e)+(e.title.standoff||0)),e.mirror&&e.anchor!=="free"&&(oe={x:0,y:0,r:0,l:0,t:0,b:0},oe[Q]=e.linewidth,e.mirror&&e.mirror!==!0&&(oe[Q]+=ne),e.mirror===!0||e.mirror==="ticks"?oe[f]=e._anchorAxis.domain[ie[1]]:(e.mirror==="all"||e.mirror==="allticks")&&(oe[f]=[e._counterDomainMin,e._counterDomainMax][ie[1]]))}Z&&(V=pl.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),Wn.autoMargin(t,sh(e),se),Wn.autoMargin(t,R1(e),oe),Wn.autoMargin(t,P1(e),V)}),!r.skipTitle&&!(Z&&e.side==="bottom")&&W.push(function(){return TL(t,e)}),vt.syncOrAsync(W)}};function yL(t,e){var r=[],a,i=function(n,o){var l=n.xbnd[o];l!==null&&r.push(vt.extendFlat({},n,{x:l}))};if(e.length){for(a=0;a<e.length;a++)i(e[a],0);i(e[a-1],1)}return r}function gL(t,e){for(var r=[],a={},i=0;i<e.length;i++){var n=e[i];a[n.text2]?a[n.text2].push(n.x):a[n.text2]=[n.x]}for(var o in a)r.push(oh(t,vt.interp(a[o],.5),o));return r}function bL(t,e){var r=[],a,i,n=e.length&&e[e.length-1].x<e[0].x,o=function(s,f){var c=s.xbnd[f];c!==null&&r.push(vt.extendFlat({},s,{x:c}))};if(t.showdividers&&e.length){for(a=0;a<e.length;a++){var l=e[a];l.text2!==i&&o(l,n?1:0),i=l.text2}o(e[a-1],n?0:1)}return r}function xL(t,e){var r,a,i,n;return t._selections[e].size()?(r=1/0,a=-1/0,i=1/0,n=-1/0,t._selections[e].each(function(){var o=Qv(this),l=xa.bBox(o.node().parentNode);r=Math.min(r,l.top),a=Math.max(a,l.bottom),i=Math.min(i,l.left),n=Math.max(n,l.right)})):(r=0,a=0,i=0,n=0),{top:r,bottom:a,left:i,right:n,height:a-r,width:n-i}}Le.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],a=t.side===r?1:-1,i=[-1,1,a,-a];return t.ticks!=="inside"==(e==="x")&&(i=i.map(function(n){return-n})),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i};Le.makeTransTickFn=function(t){return t._id.charAt(0)==="x"?function(e){return to(t._offset+t.l2p(e.x),0)}:function(e){return to(0,t._offset+t.l2p(e.x))}};Le.makeTransTickLabelFn=function(t){var e=_L(t),r=e[0],a=e[1];return t._id.charAt(0)==="x"?function(i){return to(r+t._offset+t.l2p(Kv(i)),a)}:function(i){return to(a,r+t._offset+t.l2p(Kv(i)))}};function Kv(t){return t.periodX!==void 0?t.periodX:t.x}function _L(t){var e=t.ticklabelposition||"",r=function(d){return e.indexOf(d)!==-1},a=r("top"),i=r("left"),n=r("right"),o=r("bottom"),l=r("inside"),s=o||i||a||n;if(!s&&!l)return[0,0];var f=t.side,c=s?(t.tickwidth||0)/2:0,v=Zv,u=t.tickfont?t.tickfont.size:12;return(o||a)&&(c+=u*rn,v+=(t.linewidth||0)/2),(i||n)&&(c+=(t.linewidth||0)/2,v+=Zv),l&&f==="top"&&(v-=u*(1-rn)),(i||a)&&(c=-c),(f==="bottom"||f==="right")&&(v=-v),[s?c:0,l?v:0]}Le.makeTickPath=function(t,e,r,a){a=a!==void 0?a:t.ticklen;var i=t._id.charAt(0),n=(t.linewidth||1)/2;return i==="x"?"M0,"+(e+n*r)+"v"+a*r:"M"+(e+n*r)+",0h"+a*r};Le.makeLabelFns=function(t,e,r){var a=t.ticklabelposition||"",i=function(M){return a.indexOf(M)!==-1},n=i("top"),o=i("left"),l=i("right"),s=i("bottom"),f=s||o||n||l,c=i("inside"),v=a==="inside"&&t.ticks==="inside"||!c&&t.ticks==="outside"&&t.tickson!=="boundaries",u=0,d=0,h=v?t.ticklen:0;if(c?h*=-1:f&&(h=0),v&&(u+=h,r)){var p=vt.deg2rad(r);u=h*Math.cos(p)+1,d=h*Math.sin(p)}t.showticklabels&&(v||t.showline)&&(u+=.2*t.tickfont.size),u+=(t.linewidth||1)/2*(c?-1:1);var g={labelStandoff:u,labelShift:d},_,b,w,m,y=0,x=t.side,T=t._id.charAt(0),k=t.tickangle,S;if(T==="x")S=!c&&x==="bottom"||c&&x==="top",m=S?1:-1,c&&(m*=-1),_=d*m,b=e+u*m,w=S?1:-.2,Math.abs(k)===90&&(c?w+=us:k===-90&&x==="bottom"?w=rn:k===90&&x==="top"?w=us:w=.5,y=us/2*(k/90)),g.xFn=function(M){return M.dx+_+y*M.fontSize},g.yFn=function(M){return M.dy+b+M.fontSize*w},g.anchorFn=function(M,D){if(f){if(o)return"end";if(l)return"start"}return!hr(D)||D===0||D===180?"middle":D*m<0!==c?"end":"start"},g.heightFn=function(M,D,$){return D<-60||D>60?-.5*$:t.side==="top"!==c?-$:0};else if(T==="y"){if(S=!c&&x==="left"||c&&x==="right",m=S?1:-1,c&&(m*=-1),_=u,b=d*m,w=0,!c&&Math.abs(k)===90&&(k===-90&&x==="left"||k===90&&x==="right"?w=rn:w=.5),c){var A=hr(k)?+k:0;if(A!==0){var E=vt.deg2rad(A);y=Math.abs(Math.sin(E))*rn*m,w=0}}g.xFn=function(M){return M.dx+e-(_+M.fontSize*w)*m+y*M.fontSize},g.yFn=function(M){return M.dy+b+M.fontSize*us},g.anchorFn=function(M,D){return hr(D)&&Math.abs(D)===90?"middle":S?"end":"start"},g.heightFn=function(M,D,$){return t.side==="right"&&(D*=-1),D<-30?-$:D<30?-.5*$:0}}return g};function ac(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}Le.drawTicks=function(t,e,r){r=r||{};var a=e._id+"tick",i=r.vals;e.ticklabelmode==="period"&&(i=i.slice(),i.shift());var n=r.layer.selectAll("path."+a).data(e.ticks?i:[],ac);n.exit().remove(),n.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",r.crisp!==!1).call(ml.stroke,e.tickcolor).style("stroke-width",xa.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path).style("display",null),ic(e,[M1]),n.attr("transform",r.transFn)};Le.drawGrid=function(t,e,r){r=r||{};var a=e._id+"grid",i=r.vals,n=r.counterAxis;if(e.showgrid===!1)i=[];else if(n&&Le.shouldShowZeroLine(t,e,n))for(var o=e.tickmode==="array",l=0;l<i.length;l++){var s=i[l].x;if(o?!s:Math.abs(s)<e.dtick/100)if(i=i.slice(0,l).concat(i.slice(l+1)),o)l--;else break}var f=r.layer.selectAll("path."+a).data(i,ac);f.exit().remove(),f.enter().append("path").classed(a,1).classed("crisp",r.crisp!==!1),e._gw=xa.crispRound(t,e.gridwidth,1),f.attr("transform",r.transFn).attr("d",r.path).call(ml.stroke,e.gridcolor||"#ddd").style("stroke-width",e._gw+"px").style("display",null),ic(e,[Wv]),typeof r.path=="function"&&f.attr("d",r.path)};Le.drawZeroLine=function(t,e,r){r=r||r;var a=e._id+"zl",i=Le.shouldShowZeroLine(t,e,r.counterAxis),n=r.layer.selectAll("path."+a).data(i?[{x:0,id:e._id}]:[]);n.exit().remove(),n.enter().append("path").classed(a,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,l){return QS(o.id,l.id)})}),n.attr("transform",r.transFn).attr("d",r.path).call(ml.stroke,e.zerolinecolor||ml.defaultLine).style("stroke-width",xa.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),ic(e,[Yv])};Le.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,i=e._id,n=i.charAt(0),o=r.cls||i+"tick",l=r.vals,s=r.labelFns,f=r.secondary?0:e.tickangle,c=(e._prevTickAngles||{})[o],v=r.layer.selectAll("g."+o).data(e.showticklabels?l:[],ac),u=[];v.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(m){var y=Fa.select(this),x=t._promises.length;y.call(Qo.positionText,s.xFn(m),s.yFn(m)).call(xa.font,m.font,m.fontSize,m.fontColor).text(m.text).call(Qo.convertToTspans,t),t._promises[x]?u.push(t._promises.pop().then(function(){d(y,f)})):d(y,f)}),ic(e,[gm]),v.exit().remove(),r.repositionOnUpdate&&v.each(function(m){Fa.select(this).select("text").call(Qo.positionText,s.xFn(m),s.yFn(m))});function d(m,y){m.each(function(x){var T=Fa.select(this),k=T.select(".text-math-group"),S=s.anchorFn(x,y),A=r.transFn.call(T.node(),x)+(hr(y)&&+y!=0?" rotate("+y+","+s.xFn(x)+","+(s.yFn(x)-x.fontSize/2)+")":""),E=Qo.lineCount(T),M=df*x.fontSize,D=s.heightFn(x,hr(y)?+y:0,(E-1)*M);if(D&&(A+=to(0,D)),k.empty()){var $=T.select("text");$.attr({transform:A,"text-anchor":S}),$.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var I=xa.bBox(k.node()).width,P=I*{end:-.5,start:.5}[S];k.attr("transform",A+to(P,0))}})}e._adjustTickLabelsOverflow=function(){var m=e.ticklabeloverflow;if(!(!m||m==="allow")){var y=m.indexOf("hide")!==-1,x=e._id.charAt(0)==="x",T=0,k=x?t._fullLayout.width:t._fullLayout.height;if(m.indexOf("domain")!==-1){var S=vt.simpleMap(e.range,e.r2l);T=e.l2p(S[0])+e._offset,k=e.l2p(S[1])+e._offset}var A=Math.min(T,k),E=Math.max(T,k),M=e.side,D=1/0,$=-1/0;v.each(function(L){var C=Fa.select(this),z=C.select(".text-math-group");if(z.empty()){var F=xa.bBox(C.node()),H=0;x?(F.right>E||F.left<A)&&(H=1):(F.bottom>E||F.top+(e.tickangle?0:L.fontSize/4)<A)&&(H=1);var B=C.select("text");H?y&&B.style("opacity",0):(B.style("opacity",1),M==="bottom"||M==="right"?D=Math.min(D,x?F.top:F.left):D=-1/0,M==="top"||M==="left"?$=Math.max($,x?F.bottom:F.right):$=1/0)}});for(var I in a._plots){var P=a._plots[I];if(!(e._id!==P.xaxis._id&&e._id!==P.yaxis._id)){var R=x?P.yaxis:P.xaxis;R&&(R["_visibleLabelMin_"+e._id]=D,R["_visibleLabelMax_"+e._id]=$)}}}},e._hideCounterAxisInsideTickLabels=function(m){var y=e._id.charAt(0)==="x",x=[];for(var T in a._plots){var k=a._plots[T];e._id!==k.xaxis._id&&e._id!==k.yaxis._id||x.push(y?k.yaxis:k.xaxis)}x.forEach(function(S,A){S&&gl(S)&&(m||[Yv,Wv,M1,gm]).forEach(function(E){var M=E.K==="tick"&&E.L==="text"&&e.ticklabelmode==="period",D=a._plots[e._mainSubplot],$;E.K===Yv.K?$=D.zerolinelayer.selectAll("."+e._id+"zl"):E.K===Wv.K?$=D.gridlayer.selectAll("."+e._id):$=D[e._id.charAt(0)+"axislayer"],$.each(function(){var I=Fa.select(this);E.L&&(I=I.selectAll(E.L)),I.each(function(P){var R=e.l2p(M?Kv(P):P.x)+e._offset,L=Fa.select(this);R<e["_visibleLabelMax_"+S._id]&&R>e["_visibleLabelMin_"+S._id]?L.style("display","none"):E.K==="tick"&&!A&&L.style("display",null)})})})})},d(v,c+1?c:f);function h(){return u.length&&Promise.all(u)}var p=null;function g(){if(d(v,f),l.length&&n==="x"&&!hr(f)&&(e.type!=="log"||String(e.dtick).charAt(0)!=="D")){p=0;var m=0,y=[],x;if(v.each(function(F){m=Math.max(m,F.fontSize);var H=e.l2p(F.x),B=Qv(this),O=xa.bBox(B.node());y.push({top:0,bottom:10,height:10,left:H-O.width/2,right:H+O.width/2+2,width:O.width+2})}),(e.tickson==="boundaries"||e.showdividers)&&!r.secondary){var T=2;for(e.ticks&&(T+=e.tickwidth/2),x=0;x<y.length;x++){var k=l[x].xbnd,S=y[x];if(k[0]!==null&&S.left-e.l2p(k[0])<T||k[1]!==null&&e.l2p(k[1])-S.right<T){p=90;break}}}else{var A=l.length,E=Math.abs((l[A-1].x-l[0].x)*e._m)/(A-1),M=e.ticklabelposition||"",D=function(F){return M.indexOf(F)!==-1},$=D("top"),I=D("left"),P=D("right"),R=D("bottom"),L=R||I||$||P,C=L?(e.tickwidth||0)+2*Zv:0,z=E<m*2.5||e.type==="multicategory"||e._name==="realaxis";for(x=0;x<y.length-1;x++)if(vt.bBoxIntersect(y[x],y[x+1],C)){p=z?90:30;break}}p&&d(v,p)}}e._selections&&(e._selections[o]=v);var _=[h];e.automargin&&a._redrawFromAutoMarginCount&&c===90?(p=90,_.push(function(){d(v,c)})):_.push(g),e._tickAngles&&_.push(function(){e._tickAngles[o]=p===null?hr(f)?f:0:p});var b=e._anchorAxis;b&&b.autorange&&gl(e)&&!JS(a,e._id)&&(a._insideTickLabelsAutorange||(a._insideTickLabelsAutorange={}),a._insideTickLabelsAutorange[b._name+".autorange"]=b.autorange,_.push(function(){v.each(function(y,x){var T=Qv(this),k=T.select(".text-math-group");k.empty()&&(e._vals[x].bb=xa.bBox(T.node()))})}));var w=vt.syncOrAsync(_);return w&&w.then&&t._promises.push(w),w};function wL(t,e,r){var a=e._id+"divider",i=r.vals,n=r.layer.selectAll("path."+a).data(i,ac);n.exit().remove(),n.enter().insert("path",":first-child").classed(a,1).classed("crisp",1).call(ml.stroke,e.dividercolor).style("stroke-width",xa.crispRound(t,e.dividerwidth,1)+"px"),n.attr("transform",r.transFn).attr("d",r.path)}Le.getPxPosition=function(t,e){var r=t._fullLayout._size,a=e._id.charAt(0),i=e.side,n;if(e.anchor!=="free"?n=e._anchorAxis:a==="x"?n={_offset:r.t+(1-(e.position||0))*r.h,_length:0}:a==="y"&&(n={_offset:r.l+(e.position||0)*r.w,_length:0}),i==="top"||i==="left")return n._offset;if(i==="bottom"||i==="right")return n._offset+n._length};function E1(t){var e=t.title.font.size,r=(t.title.text.match(Qo.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(rn+r*df):e*rn:r?e*(r+1)*df:e}function TL(t,e){var r=t._fullLayout,a=e._id,i=a.charAt(0),n=e.title.font.size,o;if(e.title.hasOwnProperty("standoff"))o=e._depth+e.title.standoff+E1(e);else{var l=gl(e);if(e.type==="multicategory")o=e._depth;else{var s=1.5*n;l&&(s=.5*n,e.ticks==="outside"&&(s+=e.ticklen)),o=10+s+(e.linewidth?e.linewidth-1:0)}l||(i==="x"?o+=e.side==="top"?n*(e.showticklabels?1:0):n*(e.showticklabels?1.5:.5):o+=e.side==="right"?n*(e.showticklabels?1:.5):n*(e.showticklabels?.5:0))}var f=Le.getPxPosition(t,e),c,v,u;i==="x"?(v=e._offset+e._length/2,u=e.side==="top"?f-o:f+o):(u=e._offset+e._length/2,v=e.side==="right"?f+o:f-o,c={rotate:"-90",offset:0});var d;if(e.type!=="multicategory"){var h=e._selections[e._id+"tick"];if(d={selection:h,side:e.side},h&&h.node()&&h.node().parentNode){var p=xa.getTranslate(h.node().parentNode);d.offsetLeft=p.x,d.offsetTop=p.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return VS.draw(t,a+"title",{propContainer:e,propName:e._name+".title.text",placeholder:r._dfltTitle[i],avoid:d,transform:c,attributes:{x:v,y:u,"text-anchor":"middle"}})}Le.shouldShowZeroLine=function(t,e,r){var a=vt.simpleMap(e.range,e.r2l);return a[0]*a[1]<=0&&e.zeroline&&(e.type==="linear"||e.type==="-")&&!(e.rangebreaks&&e.maskBreaks(0)===tc)&&($1(e,0)||!kL(t,e,r,a)||AL(t,e))};Le.clipEnds=function(t,e){return e.filter(function(r){return $1(t,r.x)})};function $1(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function kL(t,e,r,a){var i=r._mainAxis;if(!i)return;var n=t._fullLayout,o=e._id.charAt(0),l=Le.counterLetter(e._id),s=e._offset+(Math.abs(a[0])<Math.abs(a[1])==(o==="x")?0:e._length);function f(h){if(!h.showline||!h.linewidth)return!1;var p=Math.max((h.linewidth+e.zerolinewidth)/2,1);function g(w){return typeof w=="number"&&Math.abs(w-s)<p}if(g(h._mainLinePosition)||g(h._mainMirrorPosition))return!0;var _=h._linepositions||{};for(var b in _)if(g(_[b][0])||g(_[b][1]))return!0}var c=n._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return f(r);for(var v=Le.list(t,l),u=0;u<v.length;u++){var d=v[u];if(d._mainAxis===i&&f(d))return!0}}function AL(t,e){for(var r=t._fullData,a=e._mainSubplot,i=e._id.charAt(0),n=0;n<r.length;n++){var o=r[n];if(o.visible===!0&&o.xaxis+o.yaxis===a&&(pl.traceIs(o,"bar-like")&&o.orientation==={x:"h",y:"v"}[i]||o.fill&&o.fill.charAt(o.fill.length-1)===i))return!0}return!1}function Qv(t){var e=Fa.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}Le.allowAutoMargin=function(t){for(var e=Le.list(t,"",!0),r=0;r<e.length;r++){var a=e[r];a.automargin&&(Wn.allowAutoMargin(t,sh(a)),a.mirror&&Wn.allowAutoMargin(t,R1(a))),pl.getComponentMethod("rangeslider","isVisible")(a)&&Wn.allowAutoMargin(t,P1(a))}};function sh(t){return t._id+".automargin"}function R1(t){return sh(t)+".mirror"}function P1(t){return t._id+".rangeslider"}Le.swap=function(t,e){for(var r=ML(t,e),a=0;a<r.length;a++)SL(t,r[a].x,r[a].y)};function ML(t,e){var r=[],a,i;for(a=0;a<e.length;a++){var n=[],o=t._fullData[e[a]].xaxis,l=t._fullData[e[a]].yaxis;if(!(!o||!l)){for(i=0;i<r.length;i++)(r[i].x.indexOf(o)!==-1||r[i].y.indexOf(l)!==-1)&&n.push(i);if(!n.length){r.push({x:[o],y:[l]});continue}var s=r[n[0]],f;if(n.length>1)for(i=1;i<n.length;i++)f=r[n[i]],ds(s.x,f.x),ds(s.y,f.y);ds(s.x,[o]),ds(s.y,[l])}}return r}function ds(t,e){for(var r=0;r<e.length;r++)t.indexOf(e[r])===-1&&t.push(e[r])}function SL(t,e,r){var a=[],i=[],n=t.layout,o,l;for(o=0;o<e.length;o++)a.push(Le.getFromId(t,e[o]));for(o=0;o<r.length;o++)i.push(Le.getFromId(t,r[o]));var s=Object.keys(qS),f=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<s.length;o++){var v=s[o],u=a[0][v],d=i[0][v],h=!0,p=!1,g=!1;if(!(v.charAt(0)==="_"||typeof u=="function"||f.indexOf(v)!==-1)){for(l=1;l<a.length&&h;l++){var _=a[l][v];v==="type"&&c.indexOf(u)!==-1&&c.indexOf(_)!==-1&&u!==_?p=!0:_!==u&&(h=!1)}for(l=1;l<i.length&&h;l++){var b=i[l][v];v==="type"&&c.indexOf(d)!==-1&&c.indexOf(b)!==-1&&d!==b?g=!0:i[l][v]!==d&&(h=!1)}h&&(p&&(n[a[0]._name].type="linear"),g&&(n[i[0]._name].type="linear"),LL(n,v,a,i,t._fullLayout._dfltTitle))}}for(o=0;o<t._fullLayout.annotations.length;o++){var w=t._fullLayout.annotations[o];e.indexOf(w.xref)!==-1&&r.indexOf(w.yref)!==-1&&vt.swapAttrs(n.annotations[o],["?"])}}function LL(t,e,r,a,i){var n=vt.nestedProperty,o=n(t[r[0]._name],e).get(),l=n(t[a[0]._name],e).get(),s;for(e==="title"&&(o&&o.text===i.x&&(o.text=i.y),l&&l.text===i.y&&(l.text=i.x)),s=0;s<r.length;s++)n(t,r[s]._name+"."+e).set(l);for(s=0;s<a.length;s++)n(t,a[s]._name+"."+e).set(o)}function fh(t){return t._id==="angularaxis"}function Yc(t,e){for(var r=e._rangebreaks.length,a=0;a<r;a++){var i=e._rangebreaks[a];if(t>=i.min&&t<i.max)return i.max}return t}function gl(t){return(t.ticklabelposition||"").indexOf("inside")!==-1}function ic(t,e){gl(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}var Wc={},Ca={exports:{}},CL=function(e,r,a,i,n){var o=(e-a)/(i-a),l=o+r/(i-a),s=(o+l)/2;return n==="left"||n==="bottom"?o:n==="center"||n==="middle"?s:n==="right"||n==="top"?l:o<2/3-s?o:l>4/3-s?l:s},Tm=me.exports,DL=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]],EL=function(e,r,a,i){return a==="left"?e=0:a==="center"?e=1:a==="right"?e=2:e=Tm.constrain(Math.floor(e*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Tm.constrain(Math.floor(r*3),0,2),DL[r][e]},z1={exports:{}},$L=Pl,RL=Yf,PL=Bd.getGraphDiv,zL=Bf,Jv=z1.exports={};Jv.wrapped=function(t,e,r){t=PL(t),t._fullLayout&&RL.clear(t._fullLayout._uid+zL.HOVERID),Jv.raw(t,e,r)};Jv.raw=function(e,r){var a=e._fullLayout,i=e._hoverdata;r||(r={}),!(r.target&&!e._dragged&&$L.triggerHandler(e,"plotly_beforehover",r)===!1)&&(a._hoverlayer.selectAll("g").remove(),a._hoverlayer.selectAll("line").remove(),a._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,r.target&&i&&e.emit("plotly_unhover",{event:r,points:i}))};var IL=B2,Zc=Gb,NL=Ub,FL=me.exports.removeElement,HL=$r,nn=Ca.exports={};nn.align=CL;nn.getCursor=EL;var I1=z1.exports;nn.unhover=I1.wrapped;nn.unhoverRaw=I1.raw;nn.init=function(e){var r=e.gd,a=1,i=r._context.doubleClickDelay,n=e.element,o,l,s,f,c,v,u,d;r._mouseDownTime||(r._mouseDownTime=0),n.style.pointerEvents="all",n.onmousedown=g,NL?(n._ontouchstart&&n.removeEventListener("touchstart",n._ontouchstart),n._ontouchstart=g,n.addEventListener("touchstart",g,{passive:!1})):n.ontouchstart=g;function h(w,m,y){return Math.abs(w)<y&&(w=0),Math.abs(m)<y&&(m=0),[w,m]}var p=e.clampFn||h;function g(w){r._dragged=!1,r._dragging=!0;var m=Kc(w);o=m[0],l=m[1],u=w.target,v=w,d=w.buttons===2||w.ctrlKey,typeof w.clientX>"u"&&typeof w.clientY>"u"&&(w.clientX=o,w.clientY=l),s=new Date().getTime(),s-r._mouseDownTime<i?a+=1:(a=1,r._mouseDownTime=s),e.prepFn&&e.prepFn(w,o,l),Zc&&!d?(c=N1(),c.style.cursor=window.getComputedStyle(n).cursor):Zc||(c=document,f=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(n).cursor),document.addEventListener("mouseup",b),document.addEventListener("touchend",b),e.dragmode!==!1&&(w.preventDefault(),document.addEventListener("mousemove",_),document.addEventListener("touchmove",_,{passive:!1}))}function _(w){w.preventDefault();var m=Kc(w),y=e.minDrag||HL.MINDRAG,x=p(m[0]-o,m[1]-l,y),T=x[0],k=x[1];(T||k)&&(r._dragged=!0,nn.unhover(r,w)),r._dragged&&e.moveFn&&!d&&(r._dragdata={element:n,dx:T,dy:k},e.moveFn(T,k))}function b(w){if(delete r._dragdata,e.dragmode!==!1&&(w.preventDefault(),document.removeEventListener("mousemove",_),document.removeEventListener("touchmove",_)),document.removeEventListener("mouseup",b),document.removeEventListener("touchend",b),Zc?FL(c):f&&(c.documentElement.style.cursor=f,f=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>i&&(a=Math.max(a-1,1)),r._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(a,v),!d){var m;try{m=new MouseEvent("click",w)}catch{var y=Kc(w);m=document.createEvent("MouseEvents"),m.initMouseEvent("click",w.bubbles,w.cancelable,w.view,w.detail,w.screenX,w.screenY,y[0],y[1],w.ctrlKey,w.altKey,w.shiftKey,w.metaKey,w.button,w.relatedTarget)}u.dispatchEvent(m)}r._dragging=!1,r._dragged=!1}};function N1(){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}nn.coverSlip=N1;function Kc(t){return IL(t.changedTouches?t.changedTouches[0]:t,document.body)}var nc={},Di=function(e,r){(e.attr("class")||"").split(" ").forEach(function(a){a.indexOf("cursor-")===0&&e.classed(a,!1)}),r&&e.classed("cursor-"+r,!0)},Qc=Di,Ro="data-savedcursor",km="!!",OL=function(e,r){var a=e.attr(Ro);if(r){if(!a){for(var i=(e.attr("class")||"").split(" "),n=0;n<i.length;n++){var o=i[n];o.indexOf("cursor-")===0&&e.attr(Ro,o.substr(7)).classed(o,!1)}e.attr(Ro)||e.attr(Ro,km)}Qc(e,r)}else a&&(e.attr(Ro,null),a===km?Qc(e):Qc(e,a))},Jc=Dr,BL=Er,F1={bgcolor:{valType:"color",editType:"legend",description:["Sets the legend background color.","Defaults to `layout.paper_bgcolor`."].join(" ")},bordercolor:{valType:"color",dflt:BL.defaultLine,editType:"legend",description:"Sets the color of the border enclosing the legend."},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend",description:"Sets the width (in px) of the border enclosing the legend."},font:Jc({editType:"legend",description:"Sets the font used to text the legend items."}),grouptitlefont:Jc({editType:"legend",description:["Sets the font for group titles in legend.","Defaults to `legend.font` with its size increased about 10%."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend",description:"Sets the orientation of the legend."},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend",description:["Determines the order at which the legend items are displayed.","If *normal*, the items are displayed top-to-bottom in the same","order as the input data.","If *reversed*, the items are displayed in the opposite order","as *normal*.","If *grouped*, the items are displayed in groups","(when a trace `legendgroup` is provided).","if *grouped+reversed*, the items are displayed in the opposite order","as *grouped*."].join(" ")},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend",description:["Sets the amount of vertical space (in px) between legend groups."].join(" ")},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend",description:["Determines if the legend items symbols scale with their corresponding *trace* attributes","or remain *constant* independent of the symbol size on the graph."].join(" ")},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend",description:"Sets the width (in px) of the legend item symbols (the part other than the title.text)."},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend",description:["Determines the behavior on legend item click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item click interactions."].join(" ")},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend",description:["Determines the behavior on legend item double-click.","*toggle* toggles the visibility of the item clicked on the graph.","*toggleothers* makes the clicked item the sole visible item on the graph.","*false* disables legend item double-click interactions."].join(" ")},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend",description:["Determines the behavior on legend group item click.","*toggleitem* toggles the visibility of the individual item clicked on the graph.","*togglegroup* toggles the visibility of all items in the same legendgroup as the item clicked on the graph."].join(" ")},x:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the x position (in normalized coordinates) of the legend.","Defaults to *1.02* for vertical legends and","defaults to *0* for horizontal legends."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend",description:["Sets the legend's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the legend.","Value *auto* anchors legends to the right for `x` values greater than or equal to 2/3,","anchors legends to the left for `x` values less than or equal to 1/3 and","anchors legends with respect to their center otherwise."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"legend",description:["Sets the y position (in normalized coordinates) of the legend.","Defaults to *1* for vertical legends,","defaults to *-0.1* for horizontal legends on graphs w/o range sliders and","defaults to *1.1* for horizontal legends on graph with one or multiple range sliders."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend",description:["Sets the legend's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the legend.","Value *auto* anchors legends at their bottom for `y` values less than or equal to 1/3,","anchors legends to at their top for `y` values greater than or equal to 2/3 and","anchors legends with respect to their middle otherwise."].join(" ")},uirevision:{valType:"any",editType:"none",description:["Controls persistence of legend-driven changes in trace and pie label","visibility. Defaults to `layout.uirevision`."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend",description:["Sets the vertical alignment of the symbols with respect to their associated text."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"legend",description:["Sets the title of the legend."].join(" ")},font:Jc({editType:"legend",description:["Sets this legend's title font.","Defaults to `legend.font` with its size increased about 20%."].join(" ")}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend",description:["Determines the location of legend's title","with respect to the legend items.","Defaulted to *top* with `orientation` is *h*.","Defaulted to *left* with `orientation` is *v*.","The *top left* options could be used to expand","legend area in both x and y sides."].join(" ")},editType:"legend"},editType:"legend"},xo={};xo.isGrouped=function(e){return(e.traceorder||"").indexOf("grouped")!==-1};xo.isVertical=function(e){return e.orientation!=="h"};xo.isReversed=function(e){return(e.traceorder||"").indexOf("reversed")!==-1};var eu=We,ha=me.exports,jL=Ht,GL=Ba,UL=F1,VL=Rl,tu=xo,H1=function(e,r,a){var i=e.legend||{},n=jL.newContainer(r,"legend");function o(k,S){return ha.coerce(i,n,UL,k,S)}for(var l,s=function(k,S){var A=l._input,E=l;return ha.coerce(A,E,GL,k,S)},f=r.font||{},c=ha.coerceFont(o,"grouptitlefont",ha.extendFlat({},f,{size:Math.round(f.size*1.1)})),v=0,u=!1,d="normal",h=0;h<a.length;h++)l=a[h],l.visible&&((l.showlegend||l._dfltShowLegend&&!(l._module&&l._module.attributes&&l._module.attributes.showlegend&&l._module.attributes.showlegend.dflt===!1))&&(v++,l.showlegend&&(u=!0,(eu.traceIs(l,"pie-like")||l._input.showlegend===!0)&&v++),ha.coerceFont(s,"legendgrouptitle.font",c)),(eu.traceIs(l,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(l.fill)!==-1)&&(d=tu.isGrouped({traceorder:d})?"grouped+reversed":"reversed"),l.legendgroup!==void 0&&l.legendgroup!==""&&(d=tu.isReversed({traceorder:d})?"reversed+grouped":"grouped"));var p=ha.coerce(e,r,VL,"showlegend",u&&v>1);if(p===!1&&(r.legend=void 0),!(p===!1&&!i.uirevision)&&(o("uirevision",r.uirevision),p!==!1)){o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth");var g=ha.coerceFont(o,"font",r.font),_=o("orientation"),b=_==="h",w,m,y;b?(w=0,eu.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(m=1.1,y="bottom"):(m=-.1,y="top")):(w=1.02,m=1,y="auto"),o("traceorder",d),tu.isGrouped(r.legend)&&o("tracegroupgap"),o("itemsizing"),o("itemwidth"),o("itemclick"),o("itemdoubleclick"),o("groupclick"),o("x",w),o("xanchor"),o("y",m),o("yanchor",y),o("valign"),ha.noneOrAll(i,n,["x","y"]);var x=o("title.text");if(x){o("title.side",b?"left":"top");var T=ha.extendFlat({},g,{size:ha.bigFont(g.size)});ha.coerceFont(o,"title.font",T)}}},ru=me.exports,zi=We,au=!0,qL=function(e,r,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var n=i.legend.itemclick,o=i.legend.itemdoubleclick,l=i.legend.groupclick;a===1&&n==="toggle"&&o==="toggleothers"&&au&&r.data&&r._context.showTips&&ru.notifier(ru._(r,"Double-click on legend to isolate one trace"),"long"),au=!1;var s;if(a===1?s=n:a===2&&(s=o),!s)return;var f=l==="togglegroup",c=i.hiddenlabels?i.hiddenlabels.slice():[],v=e.data()[0][0];if(v.groupTitle&&v.noClick)return;var u=r._fullData,d=v.trace,h=d.legendgroup,p,g,_,b,w,m,y={},x=[],T=[],k=[];function S(O,W,j){var Z=x.indexOf(O),K=y[W];return K||(K=y[W]=[]),x.indexOf(O)===-1&&(x.push(O),Z=x.length-1),K[Z]=j,Z}function A(O,W){if(!(v.groupTitle&&!f)){var j=O._fullInput;if(zi.hasTransform(j,"groupby")){var Z=T[j.index];if(!Z){var K=zi.getTransformIndices(j,"groupby"),Q=K[K.length-1];Z=ru.keyedContainer(j,"transforms["+Q+"].styles","target","value.visible"),T[j.index]=Z}var ee=Z.get(O._group);ee===void 0&&(ee=!0),ee!==!1&&Z.set(O._group,W),k[j.index]=S(j.index,"visible",j.visible!==!1)}else{var ne=j.visible===!1?!1:W;S(j.index,"visible",ne)}}}if(zi.traceIs(d,"pie-like")){var E=v.label,M=c.indexOf(E);s==="toggle"?M===-1?c.push(E):c.splice(M,1):s==="toggleothers"&&(c=[],r.calcdata[0].forEach(function(O){E!==O.label&&c.push(O.label)}),r._fullLayout.hiddenlabels&&r._fullLayout.hiddenlabels.length===c.length&&M===-1&&(c=[])),zi.call("_guiRelayout",r,"hiddenlabels",c)}else{var D=h&&h.length,$=[],I;if(D)for(p=0;p<u.length;p++)I=u[p],!!I.visible&&I.legendgroup===h&&$.push(p);if(s==="toggle"){var P;switch(d.visible){case!0:P="legendonly";break;case!1:P=!1;break;case"legendonly":P=!0;break}if(D)if(f)for(p=0;p<u.length;p++)u[p].visible!==!1&&u[p].legendgroup===h&&A(u[p],P);else A(d,P);else A(d,P)}else if(s==="toggleothers"){var R,L,C,z,F=!0;for(p=0;p<u.length;p++)if(R=u[p]===d,C=u[p].showlegend!==!0,!(R||C)&&(L=D&&u[p].legendgroup===h,!L&&u[p].visible===!0&&!zi.traceIs(u[p],"notLegendIsolatable"))){F=!1;break}for(p=0;p<u.length;p++)if(u[p].visible!==!1&&!zi.traceIs(u[p],"notLegendIsolatable"))switch(d.visible){case"legendonly":A(u[p],!0);break;case!0:z=F?!0:"legendonly",R=u[p]===d,C=u[p].showlegend!==!0&&!u[p].legendgroup,L=R||D&&u[p].legendgroup===h,A(u[p],L||C?!0:z);break}}for(p=0;p<T.length;p++)if(_=T[p],!!_){var H=_.constructUpdate(),B=Object.keys(H);for(g=0;g<B.length;g++)b=B[g],m=y[b]=y[b]||[],m[k[p]]=H[b]}for(w=Object.keys(y),p=0;p<w.length;p++)for(b=w[p],g=0;g<x.length;g++)y[b].hasOwnProperty(g)||(y[b][g]=void 0);zi.call("_guiRestyle",r,y,x)}},O1={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5},Am=We,iu=xo,XL=function(e,r){var a=r._inHover,i=iu.isGrouped(r),n=iu.isReversed(r),o={},l=[],s=!1,f={},c=0,v=0,u,d;function h(I,P){if(I===""||!iu.isGrouped(r)){var R="~~i"+c;l.push(R),o[R]=[P],c++}else l.indexOf(I)===-1?(l.push(I),s=!0,o[I]=[P]):o[I].push(P)}for(u=0;u<e.length;u++){var p=e[u],g=p[0],_=g.trace,b=_.legendgroup;if(!(!a&&(!_.visible||!_.showlegend)))if(Am.traceIs(_,"pie-like"))for(f[b]||(f[b]={}),d=0;d<p.length;d++){var w=p[d].label;f[b][w]||(h(b,{label:w,color:p[d].color,i:p[d].i,trace:_,pts:p[d].pts}),f[b][w]=!0,v=Math.max(v,(w||"").length))}else h(b,g),v=Math.max(v,(_.name||"").length)}if(!l.length)return[];var m=!s||!i,y=[];for(u=0;u<l.length;u++){var x=o[l[u]];m?y.push(x[0]):y.push(x)}for(m&&(y=[y]),u=0;u<y.length;u++){var T=1/0;for(d=0;d<y[u].length;d++){var k=y[u][d].trace.legendrank;T>k&&(T=k)}y[u][0]._groupMinRank=T,y[u][0]._preGroupSort=u}var S=function(I,P){return I[0]._groupMinRank-P[0]._groupMinRank||I[0]._preGroupSort-P[0]._preGroupSort},A=function(I,P){return I.trace.legendrank-P.trace.legendrank||I._preSort-P._preSort};for(y.forEach(function(I,P){I[0]._preGroupSort=P}),y.sort(S),u=0;u<y.length;u++){y[u].forEach(function(I,P){I._preSort=P}),y[u].sort(A);var E=y[u][0].trace,M=null;for(d=0;d<y[u].length;d++){var D=y[u][d].trace.legendgrouptitle;if(D&&D.text){M=D,a&&(D.font=r._groupTitleFont);break}}if(n&&y[u].reverse(),M){var $=!1;for(d=0;d<y[u].length;d++)if(Am.traceIs(y[u][d].trace,"pie-like")){$=!0;break}y[u].unshift({i:-1,groupTitle:M,noClick:$,trace:{showlegend:E.showlegend,legendgroup:E.legendgroup,visible:r.groupclick==="toggleitem"?!0:E.visible}})}for(d=0;d<y[u].length;d++)y[u][d]=[y[u][d]]}return r._lgroupsLength=y.length,r._maxNameLength=v,y},pn={};(function(t){var e=me.exports;function r(a){return a.indexOf("e")!==-1?a.replace(/[.]?0+e/,"e"):a.indexOf(".")!==-1?a.replace(/[.]?0+$/,""):a}t.formatPiePercent=function(i,n){var o=r((i*100).toPrecision(3));return e.numSeparate(o,n)+"%"},t.formatPieValue=function(i,n){var o=r(i.toPrecision(10));return e.numSeparate(o,n)},t.getFirstFilled=function(i,n){if(!!Array.isArray(i))for(var o=0;o<n.length;o++){var l=i[n[o]];if(l||l===0||l==="")return l}},t.castOption=function(i,n){if(Array.isArray(i))return t.getFirstFilled(i,n);if(i)return i},t.getRotationAngle=function(a){return(a==="auto"?0:a)*Math.PI/180}})(pn);var nu=ft.exports,Mm=pn.castOption,ch=function(e,r,a){var i=a.marker.line,n=Mm(i.color,r.pts)||nu.defaultLine,o=Mm(i.width,r.pts)||0;e.style("stroke-width",o).call(nu.fill,r.color).call(nu.stroke,n)},Mr=ct.exports,ou=We,wr=me.exports,Sm=wr.strTranslate,Fr=Pt.exports,ea=ft.exports,lu=La.extractOpts,pf=Rr,YL=ch,WL=pn.castOption,ZL=O1,Lm=12,Cm=5,Ii=2,KL=10,_n=5,B1=function(e,r,a){var i=r._fullLayout;a||(a=i.legend);var n=a.itemsizing==="constant",o=a.itemwidth,l=(o+ZL.itemGap*2)/2,s=Sm(l,0),f=function(T,k,S,A){var E;if(T+1)E=T;else if(k&&k.width>0)E=k.width;else return 0;return n?A:Math.min(E,S)};e.each(function(T){var k=Mr.select(this),S=wr.ensureSingle(k,"g","layers");S.style("opacity",T[0].trace.opacity);var A=a.valign,E=T[0].lineHeight,M=T[0].height;if(A==="middle"||!E||!M)S.attr("transform",null);else{var D={top:1,bottom:-1}[A],$=D*(.5*(E-M+3));S.attr("transform",Sm(0,$))}var I=S.selectAll("g.legendfill").data([T]);I.enter().append("g").classed("legendfill",!0);var P=S.selectAll("g.legendlines").data([T]);P.enter().append("g").classed("legendlines",!0);var R=S.selectAll("g.legendsymbols").data([T]);R.enter().append("g").classed("legendsymbols",!0),R.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(x).each(u).each(h).each(d).each(g).each(m).each(w).each(c).each(v).each(_).each(b);function c(T){var k=Dm(T),S=k.showFill,A=k.showLine,E=k.showGradientLine,M=k.showGradientFill,D=k.anyFill,$=k.anyLine,I=T[0],P=I.trace,R,L,C=lu(P),z=C.colorscale,F=C.reversescale,H=function(Q){if(Q.size())if(S)Fr.fillGroupStyle(Q,r);else{var ee="legendfill-"+P.uid;Fr.gradient(Q,r,ee,su(F),z,"fill")}},B=function(Q){if(Q.size()){var ee="legendline-"+P.uid;Fr.lineGroupStyle(Q),Fr.gradient(Q,r,ee,su(F),z,"stroke")}},O=pf.hasMarkers(P)||!D?"M5,0":$?"M5,-2":"M5,-3",W=Mr.select(this),j=W.select(".legendfill").selectAll("path").data(S||M?[T]:[]);if(j.enter().append("path").classed("js-fill",!0),j.exit().remove(),j.attr("d",O+"h"+o+"v6h-"+o+"z").call(H),A||E){var Z=f(void 0,P.line,KL,Cm);L=wr.minExtend(P,{line:{width:Z}}),R=[wr.minExtend(I,{trace:L})]}var K=W.select(".legendlines").selectAll("path").data(A||E?[R]:[]);K.enter().append("path").classed("js-line",!0),K.exit().remove(),K.attr("d",O+(E?"l"+o+",0.0001":"h"+o)).call(A?Fr.lineGroupStyle:B)}function v(T){var k=Dm(T),S=k.anyFill,A=k.anyLine,E=k.showLine,M=k.showMarker,D=T[0],$=D.trace,I=!M&&!A&&!S&&pf.hasText($),P,R;function L(j,Z,K,Q){var ee=wr.nestedProperty($,j).get(),ne=wr.isArrayOrTypedArray(ee)&&Z?Z(ee):ee;if(n&&ne&&Q!==void 0&&(ne=Q),K){if(ne<K[0])return K[0];if(ne>K[1])return K[1]}return ne}function C(j){return D._distinct&&D.index&&j[D.index]?j[D.index]:j[0]}if(M||I||E){var z={},F={};if(M){z.mc=L("marker.color",C),z.mx=L("marker.symbol",C),z.mo=L("marker.opacity",wr.mean,[.2,1]),z.mlc=L("marker.line.color",C),z.mlw=L("marker.line.width",wr.mean,[0,5],Ii),F.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var H=L("marker.size",wr.mean,[2,16],Lm);z.ms=H,F.marker.size=H}E&&(F.line={width:L("line.width",C,[0,10],Cm)}),I&&(z.tx="Aa",z.tp=L("textposition",C),z.ts=10,z.tc=L("textfont.color",C),z.tf=L("textfont.family",C)),P=[wr.minExtend(D,z)],R=wr.minExtend($,F),R.selectedpoints=null,R.texttemplate=null}var B=Mr.select(this).select("g.legendpoints"),O=B.selectAll("path.scatterpts").data(M?P:[]);O.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",s),O.exit().remove(),O.call(Fr.pointStyle,R,r),M&&(P[0].mrc=3);var W=B.selectAll("g.pointtext").data(I?P:[]);W.enter().append("g").classed("pointtext",!0).append("text").attr("transform",s),W.exit().remove(),W.selectAll("text").call(Fr.textPointStyle,R,r)}function u(T){var k=T[0].trace,S=k.type==="waterfall";if(T[0]._distinct&&S){var A=T[0].trace[T[0].dir].marker;return T[0].mc=A.color,T[0].mlw=A.line.width,T[0].mlc=A.line.color,p(T,this,"waterfall")}var E=[];k.visible&&S&&(E=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 M=Mr.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);M.enter().append("path").classed("legendwaterfall",!0).attr("transform",s).style("stroke-miterlimit",1),M.exit().remove(),M.each(function(D){var $=Mr.select(this),I=k[D[0]].marker,P=f(void 0,I.line,_n,Ii);$.attr("d",D[1]).style("stroke-width",P+"px").call(ea.fill,I.color),P&&$.call(ea.stroke,I.line.color)})}function d(T){p(T,this)}function h(T){p(T,this,"funnel")}function p(T,k,S){var A=T[0].trace,E=A.marker||{},M=E.line||{},D=S?A.visible&&A.type===S:ou.traceIs(A,"bar"),$=Mr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(D?[T]:[]);$.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),$.exit().remove(),$.each(function(I){var P=Mr.select(this),R=I[0],L=f(R.mlw,E.line,_n,Ii);P.style("stroke-width",L+"px");var C=R.mcc;if(!a._inHover&&"mc"in R){var z=lu(E),F=z.mid;F===void 0&&(F=(z.max+z.min)/2),C=Fr.tryColorscale(E,"")(F)}var H=C||R.mc||E.color,B=E.pattern,O=B&&Fr.getPatternAttr(B.shape,0,"");if(O){var W=Fr.getPatternAttr(B.bgcolor,0,null),j=Fr.getPatternAttr(B.fgcolor,0,null),Z=B.fgopacity,K=Em(B.size,8,10),Q=Em(B.solidity,.5,1),ee="legend-"+A.uid;P.call(Fr.pattern,"legend",r,ee,O,K,Q,C,B.fillmode,W,j,Z)}else P.call(ea.fill,H);L&&ea.stroke(P,R.mlc||M.color)})}function g(T){var k=T[0].trace,S=Mr.select(this).select("g.legendpoints").selectAll("path.legendbox").data(k.visible&&ou.traceIs(k,"box-violin")?[T]:[]);S.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),S.exit().remove(),S.each(function(){var A=Mr.select(this);if((k.boxpoints==="all"||k.points==="all")&&ea.opacity(k.fillcolor)===0&&ea.opacity((k.line||{}).color)===0){var E=wr.minExtend(k,{marker:{size:n?Lm:wr.constrain(k.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});S.call(Fr.pointStyle,E,r)}else{var M=f(void 0,k.line,_n,Ii);A.style("stroke-width",M+"px").call(ea.fill,k.fillcolor),M&&ea.stroke(A,k.line.color)}})}function _(T){var k=T[0].trace,S=Mr.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(k.visible&&k.type==="candlestick"?[T,T]:[]);S.enter().append("path").classed("legendcandle",!0).attr("d",function(A,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,E){var M=Mr.select(this),D=k[E?"increasing":"decreasing"],$=f(void 0,D.line,_n,Ii);M.style("stroke-width",$+"px").call(ea.fill,D.fillcolor),$&&ea.stroke(M,D.line.color)})}function b(T){var k=T[0].trace,S=Mr.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(k.visible&&k.type==="ohlc"?[T,T]:[]);S.enter().append("path").classed("legendohlc",!0).attr("d",function(A,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",s).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(A,E){var M=Mr.select(this),D=k[E?"increasing":"decreasing"],$=f(void 0,D.line,_n,Ii);M.style("fill","none").call(Fr.dashLine,D.line.dash,$),$&&ea.stroke(M,D.line.color)})}function w(T){y(T,this,"pie")}function m(T){y(T,this,"funnelarea")}function y(T,k,S){var A=T[0],E=A.trace,M=S?E.visible&&E.type===S:ou.traceIs(E,S),D=Mr.select(k).select("g.legendpoints").selectAll("path.legend"+S).data(M?[T]:[]);if(D.enter().append("path").classed("legend"+S,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",s),D.exit().remove(),D.size()){var $=(E.marker||{}).line,I=f(WL($.width,A.pts),$,_n,Ii),P=wr.minExtend(E,{marker:{line:{width:I}}});P.marker.line.color=$.color;var R=wr.minExtend(A,{trace:P});YL(D,R,P)}}function x(T){var k=T[0].trace,S,A=[];if(k.visible)switch(k.type){case"histogram2d":case"heatmap":A=[["M-15,-2V4H15V-2Z"]],S=!0;break;case"choropleth":case"choroplethmapbox":A=[["M-6,-6V6H6V-6Z"]],S=!0;break;case"densitymapbox":A=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],S="radial";break;case"cone":A=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],S=!1;break;case"streamtube":A=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],S=!1;break;case"surface":A=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],S=!0;break;case"mesh3d":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!1;break;case"volume":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],S=!0;break;case"isosurface":A=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],S=!1;break}var E=Mr.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(A);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",s).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(M,D){var $=Mr.select(this),I=lu(k),P=I.colorscale,R=I.reversescale,L=function(H){if(H.size()){var B="legendfill-"+k.uid;Fr.gradient(H,r,B,su(R,S==="radial"),P,"fill")}},C;if(P){if(!S){var F=P.length;C=D===0?P[R?F-1:0][1]:D===1?P[R?0:F-1][1]:P[Math.floor((F-1)/2)][1]}}else{var z=k.vertexcolor||k.facecolor||k.color;C=wr.isArrayOrTypedArray(z)?z[D]||z[0]:z}$.attr("d",M[0]),C?$.call(ea.fill,C):$.call(L)})}};function su(t,e){var r=e?"radial":"horizontal";return r+(t?"":"reversed")}function Dm(t){var e=t[0].trace,r=e.contours,a=pf.hasLines(e),i=pf.hasMarkers(e),n=e.visible&&e.fill&&e.fill!=="none",o=!1,l=!1;if(r){var s=r.coloring;s==="lines"?o=!0:a=s==="none"||s==="heatmap"||r.showlines,r.type==="constraint"?n=r._operation!=="=":(s==="fill"||s==="heatmap")&&(l=!0)}return{showMarker:i,showLine:a,showFill:n,showGradientLine:o,showGradientFill:l,anyLine:a||o,anyFill:n||l}}function Em(t,e,r){return t&&wr.isArrayOrTypedArray(t)?e:t>r?r:t}var Yr=ct.exports,tr=me.exports,ed=ar.exports,Xi=We,$m=Pl,fu=Ca.exports,cr=Pt.exports,qs=ft.exports,Zn=xr,Rm=qL,br=O1,uh=Vr,QL=uh.LINE_SPACING,mf=uh.FROM_TL,Pm=uh.FROM_BR,zm=XL,JL=B1,Im=xo,On=1,j1=function(e,r){return r||(r=e._fullLayout.legend||{}),eC(e,r)};function eC(t,e){var r=t._fullLayout,a="legend"+r._uid,i,n=e._inHover;if(n?(i=e.layer,a+="-hover"):i=r._infolayer,!!i){t._legendMouseDownTime||(t._legendMouseDownTime=0);var o;if(n){if(!e.entries)return;o=zm(e.entries,e)}else{if(!t.calcdata)return;o=r.showlegend&&zm(t.calcdata,e)}var l=r.hiddenlabels||[];if(!n&&(!r.showlegend||!o.length))return i.selectAll(".legend").remove(),r._topdefs.select("#"+a).remove(),ed.autoMargin(t,"legend");var s=tr.ensureSingle(i,"g","legend",function(_){n||_.attr("pointer-events","all")}),f=tr.ensureSingleById(r._topdefs,"clipPath",a,function(_){_.append("rect")}),c=tr.ensureSingle(s,"rect","bg",function(_){_.attr("shape-rendering","crispEdges")});c.call(qs.stroke,e.bordercolor).call(qs.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var v=tr.ensureSingle(s,"g","scrollbox"),u=e.title;if(e._titleWidth=0,e._titleHeight=0,u.text){var d=tr.ensureSingle(v,"text","legendtitletext");d.attr("text-anchor","start").call(cr.font,u.font).text(u.text),Xs(d,v,t,e,On)}else v.selectAll(".legendtitletext").remove();var h=tr.ensureSingle(s,"rect","scrollbar",function(_){_.attr(br.scrollBarEnterAttrs).call(qs.fill,br.scrollBarColor)}),p=v.selectAll("g.groups").data(o);p.enter().append("g").attr("class","groups"),p.exit().remove();var g=p.selectAll("g.traces").data(tr.identity);g.enter().append("g").attr("class","traces"),g.exit().remove(),g.style("opacity",function(_){var b=_[0].trace;return Xi.traceIs(b,"pie-like")?l.indexOf(_[0].label)!==-1?.5:1:b.visible==="legendonly"?.5:1}).each(function(){Yr.select(this).call(tC,t,e)}).call(JL,t,e).each(function(){n||Yr.select(this).call(rC,t)}),tr.syncOrAsync([ed.previousPromises,function(){return nC(t,p,g,e)},function(){var _=r._size,b=e.borderwidth;if(!n){var w=oC(t);if(w)return;var m=_.l+_.w*e.x-mf[vh(e)]*e._width,y=_.t+_.h*(1-e.y)-mf[dh(e)]*e._effHeight;if(r.margin.autoexpand){var x=m,T=y;m=tr.constrain(m,0,r.width-e._width),y=tr.constrain(y,0,r.height-e._effHeight),m!==x&&tr.log("Constrain legend.x to make legend fit inside graph"),y!==T&&tr.log("Constrain legend.y to make legend fit inside graph")}cr.setTranslate(s,m,y)}if(h.on(".drag",null),s.on("wheel",null),n||e._height<=e._maxHeight||t._context.staticPlot){var k=e._effHeight;n&&(k=e._height),c.attr({width:e._width-b,height:k-b,x:b/2,y:b/2}),cr.setTranslate(v,0,0),f.select("rect").attr({width:e._width-2*b,height:k-2*b,x:b,y:b}),cr.setClipUrl(v,a,t),cr.setRect(h,0,0,0,0),delete e._scrollY}else{var S=Math.max(br.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),A=e._effHeight-S-2*br.scrollBarMargin,E=e._height-e._effHeight,M=A/E,D=Math.min(e._scrollY||0,E);c.attr({width:e._width-2*b+br.scrollBarWidth+br.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),f.select("rect").attr({width:e._width-2*b+br.scrollBarWidth+br.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+D}),cr.setClipUrl(v,a,t),F(D,S,M),s.on("wheel",function(){D=tr.constrain(e._scrollY+Yr.event.deltaY/A*E,0,E),F(D,S,M),D!==0&&D!==E&&Yr.event.preventDefault()});var $,I,P,R=function(j,Z,K){var Q=(K-Z)/M+j;return tr.constrain(Q,0,E)},L=function(j,Z,K){var Q=(Z-K)/M+j;return tr.constrain(Q,0,E)},C=Yr.behavior.drag().on("dragstart",function(){var j=Yr.event.sourceEvent;j.type==="touchstart"?$=j.changedTouches[0].clientY:$=j.clientY,P=D}).on("drag",function(){var j=Yr.event.sourceEvent;j.buttons===2||j.ctrlKey||(j.type==="touchmove"?I=j.changedTouches[0].clientY:I=j.clientY,D=R(P,$,I),F(D,S,M))});h.call(C);var z=Yr.behavior.drag().on("dragstart",function(){var j=Yr.event.sourceEvent;j.type==="touchstart"&&($=j.changedTouches[0].clientY,P=D)}).on("drag",function(){var j=Yr.event.sourceEvent;j.type==="touchmove"&&(I=j.changedTouches[0].clientY,D=L(P,$,I),F(D,S,M))});v.call(z)}function F(j,Z,K){e._scrollY=t._fullLayout.legend._scrollY=j,cr.setTranslate(v,0,-j),cr.setRect(h,e._width,br.scrollBarMargin+j*K,br.scrollBarWidth,Z),f.select("rect").attr("y",b+j)}if(t._context.edits.legendPosition){var H,B,O,W;s.classed("cursor-move",!0),fu.init({element:s.node(),gd:t,prepFn:function(){var j=cr.getTranslate(s);O=j.x,W=j.y},moveFn:function(j,Z){var K=O+j,Q=W+Z;cr.setTranslate(s,K,Q),H=fu.align(K,0,_.l,_.l+_.w,e.xanchor),B=fu.align(Q,0,_.t+_.h,_.t,e.yanchor)},doneFn:function(){H!==void 0&&B!==void 0&&Xi.call("_guiRelayout",t,{"legend.x":H,"legend.y":B})},clickFn:function(j,Z){var K=i.selectAll("g.traces").filter(function(){var Q=this.getBoundingClientRect();return Z.clientX>=Q.left&&Z.clientX<=Q.right&&Z.clientY>=Q.top&&Z.clientY<=Q.bottom});K.size()>0&&G1(t,s,K,j,Z)}})}}],t)}}function G1(t,e,r,a,i){var n=r.data()[0][0].trace,o={event:i,node:r.node(),curveNumber:n.index,expandedIndex:n._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};n._group&&(o.group=n._group),Xi.traceIs(n,"pie-like")&&(o.label=r.datum()[0].label);var l=$m.triggerHandler(t,"plotly_legendclick",o);if(l!==!1){if(a===1)e._clickTimeout=setTimeout(function(){!t._fullLayout||Rm(r,t,a)},t._context.doubleClickDelay);else if(a===2){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0;var s=$m.triggerHandler(t,"plotly_legenddoubleclick",o);s!==!1&&Rm(r,t,a)}}}function tC(t,e,r){var a=t.data()[0][0],i=a.trace,n=Xi.traceIs(i,"pie-like"),o=!r._inHover&&e._context.edits.legendText&&!n,l=r._maxNameLength,s,f;a.groupTitle?(s=a.groupTitle.text,f=a.groupTitle.font):(f=r.font,r.entries?s=a.text:(s=n?a.label:i.name,i._meta&&(s=tr.templateString(s,i._meta))));var c=tr.ensureSingle(t,"text","legendtext");c.attr("text-anchor","start").call(cr.font,f).text(o?Nm(s,l):s);var v=r.itemwidth+br.itemGap*2;Zn.positionText(c,v,0),o?c.call(Zn.makeEditable,{gd:e,text:s}).call(Xs,t,e,r).on("edit",function(u){this.text(Nm(u,l)).call(Xs,t,e,r);var d=a.trace._fullInput||{},h={};if(Xi.hasTransform(d,"groupby")){var p=Xi.getTransformIndices(d,"groupby"),g=p[p.length-1],_=tr.keyedContainer(d,"transforms["+g+"].styles","target","value.name");_.set(a.trace._group,u),h=_.constructUpdate()}else h.name=u;return Xi.call("_guiRestyle",e,h,i.index)}):Xs(c,t,e,r)}function Nm(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;t=t||"";for(var a=r-t.length;a>0;a--)t+=" ";return t}function rC(t,e){var r=e._context.doubleClickDelay,a,i=1,n=tr.ensureSingle(t,"rect","legendtoggle",function(o){e._context.staticPlot||o.style("cursor","pointer").attr("pointer-events","all"),o.call(qs.fill,"rgba(0,0,0,0)")});e._context.staticPlot||(n.on("mousedown",function(){a=new Date().getTime(),a-e._legendMouseDownTime<r?i+=1:(i=1,e._legendMouseDownTime=a)}),n.on("mouseup",function(){if(!(e._dragged||e._editing)){var o=e._fullLayout.legend;new Date().getTime()-e._legendMouseDownTime>r&&(i=Math.max(i-1,1)),G1(e,o,t,i,Yr.event)}}))}function Xs(t,e,r,a,i){a._inHover&&t.attr("data-notex",!0),Zn.convertToTspans(t,r,function(){aC(e,r,a,i)})}function aC(t,e,r,a){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend){t.remove();return}var n=t.select("g[class*=math-group]"),o=n.node();r||(r=e._fullLayout.legend);var l=r.borderwidth,s;a===On?s=r.title.font:i.groupTitle?s=i.groupTitle.font:s=r.font;var f=s.size*QL,c,v;if(o){var u=cr.bBox(o);c=u.height,v=u.width,a===On?cr.setTranslate(n,l,l+c*.75):cr.setTranslate(n,0,c*.25)}else{var d=t.select(a===On?".legendtitletext":".legendtext"),h=Zn.lineCount(d),p=d.node();if(c=f*h,v=p?cr.bBox(p).width:0,a===On)r.title.side==="left"&&(v+=br.itemGap*2),Zn.positionText(d,l+br.titlePad,l+f);else{var g=br.itemGap*2+r.itemwidth;i.groupTitle&&(g=br.itemGap,v-=r.itemwidth),Zn.positionText(d,g,-f*((h-1)/2-.3))}}a===On?(r._titleWidth=v,r._titleHeight=c):(i.lineHeight=f,i.height=Math.max(c,16)+3,i.width=v)}function iC(t){var e=0,r=0,a=t.title.side;return a&&(a.indexOf("left")!==-1&&(e=t._titleWidth),a.indexOf("top")!==-1&&(r=t._titleHeight)),[e,r]}function nC(t,e,r,a){var i=t._fullLayout;a||(a=i.legend);var n=i._size,o=Im.isVertical(a),l=Im.isGrouped(a),s=a.borderwidth,f=2*s,c=br.itemGap,v=a.itemwidth+c*2,u=2*(s+c),d=dh(a),h=a.y<0||a.y===0&&d==="top",p=a.y>1||a.y===1&&d==="bottom",g=a.tracegroupgap;a._maxHeight=Math.max(h||p?i.height/2:n.h,30);var _=0;a._width=0,a._height=0;var b=iC(a);if(o)r.each(function(H){var B=H[0].height;cr.setTranslate(this,s+b[0],s+b[1]+a._height+B/2+c),a._height+=B,a._width=Math.max(a._width,H[0].width)}),_=v+a._width,a._width+=c+v+f,a._height+=u,l&&(e.each(function(H,B){cr.setTranslate(this,0,B*a.tracegroupgap)}),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var w=vh(a),m=a.x<0||a.x===0&&w==="right",y=a.x>1||a.x===1&&w==="left",x=p||h,T=i.width/2;a._maxWidth=Math.max(m?x&&w==="left"?n.l+n.w:T:y?x&&w==="right"?n.r+n.w:T:n.w,2*v);var k=0,S=0;r.each(function(H){var B=H[0].width+v;k=Math.max(k,B),S+=B}),_=null;var A=0;if(l){var E=0,M=0,D=0;e.each(function(){var H=0,B=0;Yr.select(this).selectAll("g.traces").each(function(W){var j=W[0].width,Z=W[0].height;cr.setTranslate(this,b[0],b[1]+s+c+Z/2+B),B+=Z,H=Math.max(H,v+j)});var O=H+c;M>0&&O+s+M>a._maxWidth?(A=Math.max(A,M),M=0,D+=E+g,E=B):E=Math.max(E,B),cr.setTranslate(this,M,D),M+=O}),a._width=Math.max(A,M)+s,a._height=D+E+u}else{var $=r.size(),I=S+f+($-1)*c<a._maxWidth,P=0,R=0,L=0,C=0;r.each(function(H){var B=H[0].height,O=v+H[0].width,W=(I?O:k)+c;W+s+R-c>=a._maxWidth&&(A=Math.max(A,C),R=0,L+=P,a._height+=P,P=0),cr.setTranslate(this,b[0]+s+R,b[1]+s+L+B/2+c),C=R+O+c,R+=W,P=Math.max(P,B)}),I?(a._width=R+f,a._height=P+u):(a._width=Math.max(A,C)+f,a._height+=P+u)}}a._width=Math.ceil(Math.max(a._width+b[0],a._titleWidth+2*(s+br.titlePad))),a._height=Math.ceil(Math.max(a._height+b[1],a._titleHeight+2*(s+br.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var z=t._context.edits,F=z.legendText||z.legendPosition;r.each(function(H){var B=Yr.select(this).select(".legendtoggle"),O=H[0].height,W=F?v:_||v+H[0].width;o||(W+=c/2),cr.setRect(B,0,-O/2,W,O)})}function oC(t){var e=t._fullLayout,r=e.legend,a=vh(r),i=dh(r);return ed.autoMargin(t,"legend",{x:r.x,y:r.y,l:r._width*mf[a],r:r._width*Pm[a],b:r._effHeight*Pm[i],t:r._effHeight*mf[i]})}function vh(t){return tr.isRightAnchor(t)?"right":tr.isCenterAnchor(t)?"center":"left"}function dh(t){return tr.isBottomAnchor(t)?"bottom":tr.isMiddleAnchor(t)?"middle":"top"}var Yi=ct.exports,Ya=gt,Fm=ca.exports,rr=me.exports,cu=rr.strTranslate,lC=rr.strRotate,sC=Pl,ra=xr,fC=OL,Na=Pt.exports,dr=ft.exports,hs=Ca.exports,mi=jt.exports,ao=We,ma=ua,on=Bf,cC=H1,uC=j1,U1=on.YANGLE,hh=Math.PI*U1/180,vC=1/Math.sin(hh),dC=Math.cos(hh),hC=Math.sin(hh),Ut=on.HOVERARROWSIZE,Tt=on.HOVERTEXTPAD,Hm={box:!0,ohlc:!0,violin:!0,candlestick:!0},pC={scatter:!0,scattergl:!0,splom:!0};nc.hover=function(e,r,a,i){e=rr.getGraphDiv(e);var n=r.target;rr.throttle(e._fullLayout._uid+on.HOVERID,on.HOVERMINTIME,function(){mC(e,r,a,i,n)})};nc.loneHover=function(e,r){var a=!0;Array.isArray(e)||(a=!1,e=[e]);var i=r.gd,n=Y1(i),o=W1(i),l=e.map(function(p){var g=p._x0||p.x0||p.x||0,_=p._x1||p.x1||p.x||0,b=p._y0||p.y0||p.y||0,w=p._y1||p.y1||p.y||0,m=p.eventData;if(m){var y=Math.min(g,_),x=Math.max(g,_),T=Math.min(b,w),k=Math.max(b,w),S=p.trace;if(ao.traceIs(S,"gl3d")){var A=i._fullLayout[S.scene]._scene.container,E=A.offsetLeft,M=A.offsetTop;y+=E,x+=E,T+=M,k+=M}m.bbox={x0:y+o,x1:x+o,y0:T+n,y1:k+n},r.inOut_bbox&&r.inOut_bbox.push(m.bbox)}else m=!1;return{color:p.color||dr.defaultLine,x0:p.x0||p.x||0,x1:p.x1||p.x||0,y0:p.y0||p.y||0,y1:p.y1||p.y||0,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:p.text,name:p.name,idealAlign:p.idealAlign,borderColor:p.borderColor,fontFamily:p.fontFamily,fontSize:p.fontSize,fontColor:p.fontColor,nameLength:p.nameLength,textAlign:p.textAlign,trace:p.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:p.hovertemplate||!1,hovertemplateLabels:p.hovertemplateLabels||!1,eventData:m}}),s=!1,f=q1(l,{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||dr.background,container:Yi.select(r.container),outerContainer:r.outerContainer||r.container}),c=5,v=0,u=0;f.sort(function(p,g){return p.y0-g.y0}).each(function(p,g){var _=p.y0-p.by/2;_-c<v?p.offset=v-_+c:p.offset=0,v=_+p.by+p.offset,g===r.anchorIndex&&(u=p.offset)}).each(function(p){p.offset-=u});var d=i._fullLayout._invScaleX,h=i._fullLayout._invScaleY;return X1(f,s,d,h),a?f:f.node()};function mC(t,e,r,a,i){r||(r="xy");var n=Array.isArray(r)?r:[r],o=t._fullLayout,l=o._plots||[],s=l[r],f=o._has("cartesian");if(s){var c=s.overlays.map(function(ae){return ae.id});n=n.concat(c)}for(var v=n.length,u=new Array(v),d=new Array(v),h=!1,p=0;p<v;p++){var g=n[p];if(l[g])h=!0,u[p]=l[g].xaxis,d[p]=l[g].yaxis;else if(o[g]&&o[g]._subplot){var _=o[g]._subplot;u[p]=_.xaxis,d[p]=_.yaxis}else{rr.warn("Unrecognized subplot: "+g);return}}var b=e.hovermode||o.hovermode;if(b&&!h&&(b="closest"),["x","y","closest","x unified","y unified"].indexOf(b)===-1||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return hs.unhoverRaw(t,e);var w=o.hoverdistance;w===-1&&(w=1/0);var m=o.spikedistance;m===-1&&(m=1/0);var y=[],x=[],T,k,S,A,E,M,D,$,I,P,R,L,C,z={hLinePoint:null,vLinePoint:null},F=!1;if(Array.isArray(e))for(b="array",S=0;S<e.length;S++)E=t.calcdata[e[S].curveNumber||0],E&&(M=E[0].trace,E[0].trace.hoverinfo!=="skip"&&(x.push(E),M.orientation==="h"&&(F=!0)));else{for(A=0;A<t.calcdata.length;A++)E=t.calcdata[A],M=E[0].trace,M.hoverinfo!=="skip"&&ma.isTraceInSubplots(M,n)&&(x.push(E),M.orientation==="h"&&(F=!0));var H=!i,B,O;if(H)"xpx"in e?B=e.xpx:B=u[0]._length/2,"ypx"in e?O=e.ypx:O=d[0]._length/2;else{if(sC.triggerHandler(t,"plotly_beforehover",e)===!1)return;var W=i.getBoundingClientRect();B=e.clientX-W.left,O=e.clientY-W.top,o._calcInverseTransform(t);var j=rr.apply3DTransform(o._invTransform)(B,O);if(B=j[0],O=j[1],B<0||B>u[0]._length||O<0||O>d[0]._length)return hs.unhoverRaw(t,e)}if(e.pointerX=B+u[0]._offset,e.pointerY=O+d[0]._offset,"xval"in e?T=ma.flat(n,e.xval):T=ma.p2c(u,B),"yval"in e?k=ma.flat(n,e.yval):k=ma.p2c(d,O),!Ya(T[0])||!Ya(k[0]))return rr.warn("Fx.hover failed",e,t),hs.unhoverRaw(t,e)}var Z=1/0;function K(ae,J){for(A=0;A<x.length;A++)if(E=x[A],!(!E||!E[0]||!E[0].trace)&&(M=E[0].trace,!(M.visible!==!0||M._length===0)&&["carpet","contourcarpet"].indexOf(M._module.name)===-1)){if(M.type==="splom"?($=0,D=n[$]):(D=ma.getSubplot(M),$=n.indexOf(D)),I=b,ma.isUnifiedHover(I)&&(I=I.charAt(0)),L={cd:E,trace:M,xa:u[$],ya:d[$],maxHoverDistance:w,maxSpikeDistance:m,index:!1,distance:Math.min(Z,w),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:dr.defaultLine,name:M.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},o[D]&&(L.subplot=o[D]._subplot),o._splomScenes&&o._splomScenes[M.uid]&&(L.scene=o._splomScenes[M.uid]),C=y.length,I==="array"){var ye=e[A];"pointNumber"in ye?(L.index=ye.pointNumber,I="closest"):(I="","xval"in ye&&(P=ye.xval,I="x"),"yval"in ye&&(R=ye.yval,I=I?"closest":"y"))}else ae!==void 0&&J!==void 0?(P=ae,R=J):(P=T[$],R=k[$]);if(w!==0)if(M._module&&M._module.hoverPoints){var _e=M._module.hoverPoints(L,P,R,I,{finiteRange:!0,hoverLayer:o._hoverlayer});if(_e)for(var ve,re=0;re<_e.length;re++)ve=_e[re],Ya(ve.x0)&&Ya(ve.y0)&&y.push(bC(ve,b))}else rr.log("Unrecognized trace type in hover:",M);if(b==="closest"&&y.length>C&&(y.splice(0,C),Z=y[0].distance),f&&m!==0&&y.length===0){L.distance=m,L.index=!1;var xe=M._module.hoverPoints(L,P,R,"closest",{hoverLayer:o._hoverlayer});if(xe&&(xe=xe.filter(function(qe){return qe.spikeDistance<=m})),xe&&xe.length){var we,Fe=xe.filter(function(qe){return qe.xa.showspikes&&qe.xa.spikesnap!=="hovered data"});if(Fe.length){var et=Fe[0];Ya(et.x0)&&Ya(et.y0)&&(we=ee(et),(!z.vLinePoint||z.vLinePoint.spikeDistance>we.spikeDistance)&&(z.vLinePoint=we))}var ot=xe.filter(function(qe){return qe.ya.showspikes&&qe.ya.spikesnap!=="hovered data"});if(ot.length){var at=ot[0];Ya(at.x0)&&Ya(at.y0)&&(we=ee(at),(!z.hLinePoint||z.hLinePoint.spikeDistance>we.spikeDistance)&&(z.hLinePoint=we))}}}}}K();function Q(ae,J,ye){for(var _e=null,ve=1/0,re,xe=0;xe<ae.length;xe++)re=ae[xe].spikeDistance,ye&&xe===0&&(re=-1/0),re<=ve&&re<=J&&(_e=ae[xe],ve=re);return _e}function ee(ae){return ae?{xa:ae.xa,ya:ae.ya,x:ae.xSpike!==void 0?ae.xSpike:(ae.x0+ae.x1)/2,y:ae.ySpike!==void 0?ae.ySpike:(ae.y0+ae.y1)/2,distance:ae.distance,spikeDistance:ae.spikeDistance,curveNumber:ae.trace.index,color:ae.color,pointNumber:ae.index}:null}var ne={fullLayout:o,container:o._hoverlayer,event:e},le=t._spikepoints,se={vLinePoint:z.vLinePoint,hLinePoint:z.hLinePoint};t._spikepoints=se;var oe=function(){y.sort(function(ae,J){return ae.distance-J.distance}),y=_C(y,b)};oe();var V=b.charAt(0),ie=(V==="x"||V==="y")&&y[0]&&pC[y[0].trace.type];if(f&&m!==0&&y.length!==0){var ge=y.filter(function(ae){return ae.ya.showspikes}),de=Q(ge,m,ie);z.hLinePoint=ee(de);var ke=y.filter(function(ae){return ae.xa.showspikes}),ue=Q(ke,m,ie);z.vLinePoint=ee(ue)}if(y.length===0){var Y=hs.unhoverRaw(t,e);return f&&(z.hLinePoint!==null||z.vLinePoint!==null)&&jm(le)&&Bm(t,z,ne),Y}if(f&&jm(le)&&Bm(t,z,ne),ma.isXYhover(I)&&y[0].length!==0&&y[0].trace.type!=="splom"){var fe=y[0];Hm[fe.trace.type]?y=y.filter(function(ae){return ae.trace.index===fe.trace.index}):y=[fe];var Ae=y.length,be=Um("x",fe,o),Ce=Um("y",fe,o);K(be,Ce);var Me=[],Te={},X=0,pe=function(ae){var J=Hm[ae.trace.type]?V1(ae):ae.trace.index;if(!Te[J])X++,Te[J]=X,Me.push(ae);else{var ye=Te[J]-1,_e=Me[ye];ye>0&&Math.abs(ae.distance)<Math.abs(_e.distance)&&(Me[ye]=ae)}},ce;for(ce=0;ce<Ae;ce++)pe(y[ce]);for(ce=y.length-1;ce>Ae-1;ce--)pe(y[ce]);y=Me,oe()}var he=t._hoverdata,De=[],je=Y1(t),$e=W1(t);for(S=0;S<y.length;S++){var Se=y[S],Ge=ma.makeEventData(Se,Se.trace,Se.cd);if(Se.hovertemplate!==!1){var Pe=!1;Se.cd[Se.index]&&Se.cd[Se.index].ht&&(Pe=Se.cd[Se.index].ht),Se.hovertemplate=Pe||Se.trace.hovertemplate||!1}if(Se.xa&&Se.ya){var Ie=Se.x0+Se.xa._offset,Ue=Se.x1+Se.xa._offset,Xe=Se.y0+Se.ya._offset,St=Se.y1+Se.ya._offset,ht=Math.min(Ie,Ue),Ft=Math.max(Ie,Ue),ut=Math.min(Xe,St),_t=Math.max(Xe,St);Ge.bbox={x0:ht+$e,x1:Ft+$e,y0:ut+je,y1:_t+je}}Se.eventData=[Ge],De.push(Ge)}t._hoverdata=De;var N=b==="y"&&(x.length>1||y.length>1)||b==="closest"&&F&&y.length>1,U=dr.combine(o.plot_bgcolor||dr.background,o.paper_bgcolor),G=q1(y,{gd:t,hovermode:b,rotateLabels:N,bgColor:U,container:o._hoverlayer,outerContainer:o._paper.node(),commonLabelOpts:o.hoverlabel,hoverdistance:o.hoverdistance});if(ma.isUnifiedHover(b)||(gC(G,N?"xa":"ya",o),X1(G,N,o._invScaleX,o._invScaleY)),i&&i.tagName){var q=ao.getComponentMethod("annotations","hasClickToShow")(t,De);fC(Yi.select(i),q?"pointer":"")}!i||a||!xC(t,e,he)||(he&&t.emit("plotly_unhover",{event:e,points:he}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:u,yaxes:d,xvals:T,yvals:k}))}function V1(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}var yC=/<extra>([\s\S]*)<\/extra>/;function q1(t,e){var r=e.gd,a=r._fullLayout,i=e.hovermode,n=e.rotateLabels,o=e.bgColor,l=e.container,s=e.outerContainer,f=e.commonLabelOpts||{};if(t.length===0)return[[]];var c=e.fontFamily||on.HOVERFONT,v=e.fontSize||on.HOVERFONTSIZE,u=t[0],d=u.xa,h=u.ya,p=i.charAt(0),g=u[p+"Label"],_=wn(r,s),b=_.top,w=_.width,m=_.height,y=g!==void 0&&u.distance<=e.hoverdistance&&(i==="x"||i==="y");if(y){var x=!0,T,k;for(T=0;T<t.length;T++)if(x&&t[T].zLabel===void 0&&(x=!1),k=t[T].hoverinfo||t[T].trace.hoverinfo,k){var S=Array.isArray(k)?k:k.split("+");if(S.indexOf("all")===-1&&S.indexOf(i)===-1){y=!1;break}}x&&(y=!1)}var A=l.selectAll("g.axistext").data(y?[0]:[]);if(A.enter().append("g").classed("axistext",!0),A.exit().remove(),A.each(function(){var ue=Yi.select(this),Y=rr.ensureSingle(ue,"path","",function(St){St.style({"stroke-width":"1px"})}),fe=rr.ensureSingle(ue,"text","",function(St){St.attr("data-notex",1)}),Ae=f.bgcolor||dr.defaultLine,be=f.bordercolor||dr.contrast(Ae),Ce=dr.contrast(Ae),Me={family:f.font.family||c,size:f.font.size||v,color:f.font.color||Ce};Y.style({fill:Ae,stroke:be}),fe.text(g).call(Na.font,Me).call(ra.positionText,0,0).call(ra.convertToTspans,r),ue.attr("transform","");var Te=wn(r,fe.node()),X,pe;if(i==="x"){var ce=d.side==="top"?"-":"";fe.attr("text-anchor","middle").call(ra.positionText,0,d.side==="top"?b-Te.bottom-Ut-Tt:b-Te.top+Ut+Tt),X=d._offset+(u.x0+u.x1)/2,pe=h._offset+(d.side==="top"?0:h._length);var he=Te.width/2+Tt;X<he?(X=he,Y.attr("d","M-"+(he-Ut)+",0L-"+(he-Ut*2)+","+ce+Ut+"H"+(Tt+Te.width/2)+"v"+ce+(Tt*2+Te.height)+"H-"+he+"V"+ce+Ut+"Z")):X>a.width-he?(X=a.width-he,Y.attr("d","M"+(he-Ut)+",0L"+he+","+ce+Ut+"v"+ce+(Tt*2+Te.height)+"H-"+he+"V"+ce+Ut+"H"+(he-Ut*2)+"Z")):Y.attr("d","M0,0L"+Ut+","+ce+Ut+"H"+(Tt+Te.width/2)+"v"+ce+(Tt*2+Te.height)+"H-"+(Tt+Te.width/2)+"V"+ce+Ut+"H-"+Ut+"Z")}else{var De,je,$e;h.side==="right"?(De="start",je=1,$e="",X=d._offset+d._length):(De="end",je=-1,$e="-",X=d._offset),pe=h._offset+(u.y0+u.y1)/2,fe.attr("text-anchor",De),Y.attr("d","M0,0L"+$e+Ut+","+Ut+"V"+(Tt+Te.height/2)+"h"+$e+(Tt*2+Te.width)+"V-"+(Tt+Te.height/2)+"H"+$e+Ut+"V-"+Ut+"Z");var Se=Te.height/2,Ge=b-Te.top-Se,Pe="clip"+a._uid+"commonlabel"+h._id,Ie;if(X<Te.width+2*Tt+Ut){Ie="M-"+(Ut+Tt)+"-"+Se+"h-"+(Te.width-Tt)+"V"+Se+"h"+(Te.width-Tt)+"Z";var Ue=Te.width-X+Tt;ra.positionText(fe,Ue,Ge),De==="end"&&fe.selectAll("tspan").each(function(){var St=Yi.select(this),ht=Na.tester.append("text").text(St.text()).call(Na.font,Me),Ft=wn(r,ht.node());Math.round(Ft.width)<Math.round(Te.width)&&St.attr("x",Ue-Ft.width),ht.remove()})}else ra.positionText(fe,je*(Tt+Ut),Ge),Ie=null;var Xe=a._topclips.selectAll("#"+Pe).data(Ie?[0]:[]);Xe.enter().append("clipPath").attr("id",Pe).append("path"),Xe.exit().remove(),Xe.select("path").attr("d",Ie),Na.setClipUrl(fe,Ie?Pe:null,r)}ue.attr("transform",cu(X,pe))}),ma.isUnifiedHover(i)){l.selectAll("g.hovertext").remove();var E=t.filter(function(ue){return ue.hoverinfo!=="none"});if(E.length===0)return;var M=a.hoverlabel,D=M.font,$={showlegend:!0,legend:{title:{text:g,font:D},font:D,bgcolor:M.bgcolor,bordercolor:M.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},I={font:D};cC($,I,r._fullData);var P=I.legend;P.entries=[];for(var R=0;R<E.length;R++){var L=E[R];if(L.hoverinfo!=="none"){var C=Om(L,!0,i,a,g),z=C[0],F=C[1];L.name=F,F!==""?L.text=F+" : "+z:L.text=z;var H=L.cd[L.index];H&&(H.mc&&(L.mc=H.mc),H.mcc&&(L.mc=H.mcc),H.mlc&&(L.mlc=H.mlc),H.mlcc&&(L.mlc=H.mlcc),H.mlw&&(L.mlw=H.mlw),H.mrc&&(L.mrc=H.mrc),H.dir&&(L.dir=H.dir)),L._distinct=!0,P.entries.push([L])}}P.entries.sort(function(ue,Y){return ue[0].trace.index-Y[0].trace.index}),P.layer=l,P._inHover=!0,P._groupTitleFont=M.grouptitlefont,uC(r,P);var B=l.select("g.legend"),O=wn(r,B.node()),W=O.width+2*Tt,j=O.height+2*Tt,Z=E[0],K=(Z.x0+Z.x1)/2,Q=(Z.y0+Z.y1)/2,ee=!(ao.traceIs(Z.trace,"bar-like")||ao.traceIs(Z.trace,"box-violin")),ne,le;p==="y"?ee?(le=Q-Tt,ne=Q+Tt):(le=Math.min.apply(null,E.map(function(ue){return Math.min(ue.y0,ue.y1)})),ne=Math.max.apply(null,E.map(function(ue){return Math.max(ue.y0,ue.y1)}))):le=ne=rr.mean(E.map(function(ue){return(ue.y0+ue.y1)/2}))-j/2;var se,oe;p==="x"?ee?(se=K+Tt,oe=K-Tt):(se=Math.max.apply(null,E.map(function(ue){return Math.max(ue.x0,ue.x1)})),oe=Math.min.apply(null,E.map(function(ue){return Math.min(ue.x0,ue.x1)}))):se=oe=rr.mean(E.map(function(ue){return(ue.x0+ue.x1)/2}))-W/2;var V=d._offset,ie=h._offset;ne+=ie,se+=V,oe+=V-W,le+=ie-j;var ge,de;return se+W<w&&se>=0?ge=se:oe+W<w&&oe>=0?ge=oe:V+W<w?ge=V:se-K<K-oe+W?ge=w-W:ge=0,ge+=Tt,ne+j<m&&ne>=0?de=ne:le+j<m&&le>=0?de=le:ie+j<m?de=ie:ne-Q<Q-le+j?de=m-j:de=0,de+=Tt,B.attr("transform",cu(ge-1,de-1)),B}var ke=l.selectAll("g.hovertext").data(t,function(ue){return V1(ue)});return ke.enter().append("g").classed("hovertext",!0).each(function(){var ue=Yi.select(this);ue.append("rect").call(dr.fill,dr.addOpacity(o,.8)),ue.append("text").classed("name",!0),ue.append("path").style("stroke-width","1px"),ue.append("text").classed("nums",!0).call(Na.font,c,v)}),ke.exit().remove(),ke.each(function(ue){var Y=Yi.select(this).attr("transform",""),fe=ue.color;Array.isArray(fe)&&(fe=fe[ue.eventData[0].pointNumber]);var Ae=ue.bgcolor||fe,be=dr.combine(dr.opacity(Ae)?Ae:dr.defaultLine,o),Ce=dr.combine(dr.opacity(fe)?fe:dr.defaultLine,o),Me=ue.borderColor||dr.contrast(be),Te=Om(ue,y,i,a,g,Y),X=Te[0],pe=Te[1],ce=Y.select("text.nums").call(Na.font,ue.fontFamily||c,ue.fontSize||v,ue.fontColor||Me).text(X).attr("data-notex",1).call(ra.positionText,0,0).call(ra.convertToTspans,r),he=Y.select("text.name"),De=0,je=0;if(pe&&pe!==X){he.call(Na.font,ue.fontFamily||c,ue.fontSize||v,Ce).text(pe).attr("data-notex",1).call(ra.positionText,0,0).call(ra.convertToTspans,r);var $e=wn(r,he.node());De=$e.width+2*Tt,je=$e.height+2*Tt}else he.remove(),Y.select("rect").remove();Y.select("path").style({fill:be,stroke:Me});var Se=ue.xa._offset+(ue.x0+ue.x1)/2,Ge=ue.ya._offset+(ue.y0+ue.y1)/2,Pe=Math.abs(ue.x1-ue.x0),Ie=Math.abs(ue.y1-ue.y0),Ue=wn(r,ce.node()),Xe=Ue.width/a._invScaleX,St=Ue.height/a._invScaleY;ue.ty0=(b-Ue.top)/a._invScaleY,ue.bx=Xe+2*Tt,ue.by=Math.max(St+2*Tt,je),ue.anchor="start",ue.txwidth=Xe,ue.tx2width=De,ue.offset=0;var ht=(Xe+Ut+Tt+De)*a._invScaleX,Ft,ut;if(n)ue.pos=Se,Ft=Ge+Ie/2+ht<=m,ut=Ge-Ie/2-ht>=0,(ue.idealAlign==="top"||!Ft)&&ut?(Ge-=Ie/2,ue.anchor="end"):Ft?(Ge+=Ie/2,ue.anchor="start"):ue.anchor="middle";else if(ue.pos=Ge,Ft=Se+Pe/2+ht<=w,ut=Se-Pe/2-ht>=0,(ue.idealAlign==="left"||!Ft)&&ut)Se-=Pe/2,ue.anchor="end";else if(Ft)Se+=Pe/2,ue.anchor="start";else{ue.anchor="middle";var _t=ht/2,N=Se+_t-w,U=Se-_t;N>0&&(Se-=N),U<0&&(Se+=-U)}ce.attr("text-anchor",ue.anchor),De&&he.attr("text-anchor",ue.anchor),Y.attr("transform",cu(Se,Ge)+(n?lC(U1):""))}),ke}function Om(t,e,r,a,i,n){var o="",l="";t.nameOverride!==void 0&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=rr.templateString(t.name,t.trace._meta)),o=Gm(t.name,t.nameLength));var s=r.charAt(0),f=s==="x"?"y":"x";t.zLabel!==void 0?(t.xLabel!==void 0&&(l+="x: "+t.xLabel+"<br>"),t.yLabel!==void 0&&(l+="y: "+t.yLabel+"<br>"),t.trace.type!=="choropleth"&&t.trace.type!=="choroplethmapbox"&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[s+"Label"]===i?l=t[f+"Label"]||"":t.xLabel===void 0?t.yLabel!==void 0&&t.trace.type!=="scattercarpet"&&(l=t.yLabel):t.yLabel===void 0?l=t.xLabel:l="("+t.xLabel+", "+t.yLabel+")",(t.text||t.text===0)&&!Array.isArray(t.text)&&(l+=(l?"<br>":"")+t.text),t.extraText!==void 0&&(l+=(l?"<br>":"")+t.extraText),n&&l===""&&!t.hovertemplate&&(o===""&&n.remove(),l=o);var c=t.hovertemplate||!1;if(c){var v=t.hovertemplateLabels||t;t[s+"Label"]!==i&&(v[s+"other"]=v[s+"Val"],v[s+"otherLabel"]=v[s+"Label"]),l=rr.hovertemplateString(c,v,a._d3locale,t.eventData[0]||{},t.trace._meta),l=l.replace(yC,function(u,d){return o=Gm(d,t.nameLength),""})}return[l,o]}function gC(t,e,r){var a=0,i=1,n=t.size(),o=new Array(n),l=0;t.each(function(T){var k=T[e],S=k._id.charAt(0)==="x",A=k.range;l===0&&A&&A[0]>A[1]!==S&&(i=-1),o[l++]=[{datum:T,traceIndex:T.trace.index,dp:0,pos:T.pos,posref:T.posref,size:T.by*(S?vC:1)/2,pmin:0,pmax:S?r.width:r.height}]}),o.sort(function(T,k){return T[0].posref-k[0].posref||i*(k[0].traceIndex-T[0].traceIndex)});var s,f,c,v,u,d,h;function p(T){var k=T[0],S=T[T.length-1];if(f=k.pmin-k.pos-k.dp+k.size,c=S.pos+S.dp+S.size-k.pmax,f>.01){for(u=T.length-1;u>=0;u--)T[u].dp+=f;s=!1}if(!(c<.01)){if(f<-.01){for(u=T.length-1;u>=0;u--)T[u].dp-=c;s=!1}if(!!s){var A=0;for(v=0;v<T.length;v++)d=T[v],d.pos+d.dp+d.size>k.pmax&&A++;for(v=T.length-1;v>=0&&!(A<=0);v--)d=T[v],d.pos>k.pmax-1&&(d.del=!0,A--);for(v=0;v<T.length&&!(A<=0);v++)if(d=T[v],d.pos<k.pmin+1)for(d.del=!0,A--,c=d.size*2,u=T.length-1;u>=0;u--)T[u].dp-=c;for(v=T.length-1;v>=0&&!(A<=0);v--)d=T[v],d.pos+d.dp+d.size>k.pmax&&(d.del=!0,A--)}}}for(;!s&&a<=n;){for(a++,s=!0,v=0;v<o.length-1;){var g=o[v],_=o[v+1],b=g[g.length-1],w=_[0];if(f=b.pos+b.dp+b.size-w.pos-w.dp+w.size,f>.01&&b.pmin===w.pmin&&b.pmax===w.pmax){for(u=_.length-1;u>=0;u--)_[u].dp+=f;for(g.push.apply(g,_),o.splice(v+1,1),h=0,u=g.length-1;u>=0;u--)h+=g[u].dp;for(c=h/g.length,u=g.length-1;u>=0;u--)g[u].dp-=c;s=!1}else v++}o.forEach(p)}for(v=o.length-1;v>=0;v--){var m=o[v];for(u=m.length-1;u>=0;u--){var y=m[u],x=y.datum;x.offset=y.dp,x.del=y.del}}}function X1(t,e,r,a){var i=function(o){return o*r},n=function(o){return o*a};t.each(function(o){var l=Yi.select(this);if(o.del)return l.remove();var s=l.select("text.nums"),f=o.anchor,c=f==="end"?-1:1,v={start:1,end:-1,middle:0}[f],u=v*(Ut+Tt),d=u+v*(o.txwidth+Tt),h=0,p=o.offset,g=f==="middle";g&&(u-=o.tx2width/2,d+=o.txwidth/2+Tt),e&&(p*=-hC,h=o.offset*dC),l.select("path").attr("d",g?"M-"+i(o.bx/2+o.tx2width/2)+","+n(p-o.by/2)+"h"+i(o.bx)+"v"+n(o.by)+"h-"+i(o.bx)+"Z":"M0,0L"+i(c*Ut+h)+","+n(Ut+p)+"v"+n(o.by/2-Ut)+"h"+i(c*o.bx)+"v-"+n(o.by)+"H"+i(c*Ut+h)+"V"+n(p-Ut)+"Z");var _=h+u,b=p+o.ty0-o.by/2+Tt,w=o.textAlign||"auto";w!=="auto"&&(w==="left"&&f!=="start"?(s.attr("text-anchor","start"),_=g?-o.bx/2-o.tx2width/2+Tt:-o.bx-Tt):w==="right"&&f!=="end"&&(s.attr("text-anchor","end"),_=g?o.bx/2-o.tx2width/2-Tt:o.bx+Tt)),s.call(ra.positionText,i(_),n(b)),o.tx2width&&(l.select("text.name").call(ra.positionText,i(d+v*Tt+h),n(p+o.ty0-o.by/2+Tt)),l.select("rect").call(Na.setRect,i(d+(v-1)*o.tx2width/2+h),n(p-o.by/2-1),i(o.tx2width),n(o.by+2)))})}function bC(t,e){var r=t.index,a=t.trace||{},i=t.cd[0],n=t.cd[r]||{};function o(u){return u||Ya(u)&&u===0}var l=Array.isArray(r)?function(u,d){var h=rr.castOption(i,r,u);return o(h)?h:rr.extractOption({},a,"",d)}:function(u,d){return rr.extractOption(n,a,u,d)};function s(u,d,h){var p=l(d,h);o(p)&&(t[u]=p)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),t.posref=e==="y"||e==="closest"&&a.orientation==="h"?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=rr.constrain(t.x0,0,t.xa._length),t.x1=rr.constrain(t.x1,0,t.xa._length),t.y0=rr.constrain(t.y0,0,t.ya._length),t.y1=rr.constrain(t.y1,0,t.ya._length),t.xLabelVal!==void 0&&(t.xLabel="xLabel"in t?t.xLabel:mi.hoverLabelText(t.xa,t.xLabelVal,a.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),t.yLabelVal!==void 0&&(t.yLabel="yLabel"in t?t.yLabel:mi.hoverLabelText(t.ya,t.yLabelVal,a.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),t.zLabelVal!==void 0&&t.zLabel===void 0&&(t.zLabel=String(t.zLabelVal)),!isNaN(t.xerr)&&!(t.xa.type==="log"&&t.xerr<=0)){var f=mi.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;t.xerrneg!==void 0?t.xLabel+=" +"+f+" / -"+mi.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xB1 "+f,e==="x"&&(t.distance+=1)}if(!isNaN(t.yerr)&&!(t.ya.type==="log"&&t.yerr<=0)){var c=mi.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;t.yerrneg!==void 0?t.yLabel+=" +"+c+" / -"+mi.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xB1 "+c,e==="y"&&(t.distance+=1)}var v=t.hoverinfo||t.trace.hoverinfo;return v&&v!=="all"&&(v=Array.isArray(v)?v:v.split("+"),v.indexOf("x")===-1&&(t.xLabel=void 0),v.indexOf("y")===-1&&(t.yLabel=void 0),v.indexOf("z")===-1&&(t.zLabel=void 0),v.indexOf("text")===-1&&(t.text=void 0),v.indexOf("name")===-1&&(t.name=void 0)),t}function Bm(t,e,r){var a=r.container,i=r.fullLayout,n=i._size,o=r.event,l=!!e.hLinePoint,s=!!e.vLinePoint,f,c;if(a.selectAll(".spikeline").remove(),!!(s||l)){var v=dr.combine(i.plot_bgcolor,i.paper_bgcolor);if(l){var u=e.hLinePoint,d,h;f=u&&u.xa,c=u&&u.ya;var p=c.spikesnap;p==="cursor"?(d=o.pointerX,h=o.pointerY):(d=f._offset+u.x,h=c._offset+u.y);var g=Fm.readability(u.color,v)<1.5?dr.contrast(v):u.color,_=c.spikemode,b=c.spikethickness,w=c.spikecolor||g,m=mi.getPxPosition(t,c),y,x;if(_.indexOf("toaxis")!==-1||_.indexOf("across")!==-1){if(_.indexOf("toaxis")!==-1&&(y=m,x=d),_.indexOf("across")!==-1){var T=c._counterDomainMin,k=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),k=Math.max(k,c.position)),y=n.l+T*n.w,x=n.l+k*n.w}a.insert("line",":first-child").attr({x1:y,x2:x,y1:h,y2:h,"stroke-width":b,stroke:w,"stroke-dasharray":Na.dashStyle(c.spikedash,b)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:y,x2:x,y1:h,y2:h,"stroke-width":b+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}_.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:m+(c.side!=="right"?b:-b),cy:h,r:b,fill:w}).classed("spikeline",!0)}if(s){var S=e.vLinePoint,A,E;f=S&&S.xa,c=S&&S.ya;var M=f.spikesnap;M==="cursor"?(A=o.pointerX,E=o.pointerY):(A=f._offset+S.x,E=c._offset+S.y);var D=Fm.readability(S.color,v)<1.5?dr.contrast(v):S.color,$=f.spikemode,I=f.spikethickness,P=f.spikecolor||D,R=mi.getPxPosition(t,f),L,C;if($.indexOf("toaxis")!==-1||$.indexOf("across")!==-1){if($.indexOf("toaxis")!==-1&&(L=R,C=E),$.indexOf("across")!==-1){var z=f._counterDomainMin,F=f._counterDomainMax;f.anchor==="free"&&(z=Math.min(z,f.position),F=Math.max(F,f.position)),L=n.t+(1-F)*n.h,C=n.t+(1-z)*n.h}a.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:C,"stroke-width":I,stroke:P,"stroke-dasharray":Na.dashStyle(f.spikedash,I)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:A,x2:A,y1:L,y2:C,"stroke-width":I+2,stroke:v}).classed("spikeline",!0).classed("crisp",!0)}$.indexOf("marker")!==-1&&a.insert("circle",":first-child").attr({cx:A,cy:R-(f.side!=="top"?I:-I),r:I,fill:P}).classed("spikeline",!0)}}}function xC(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var a=r.length-1;a>=0;a--){var i=r[a],n=t._hoverdata[a];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers))return!0}return!1}function jm(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function Gm(t,e){return ra.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function _C(t,e){for(var r=e.charAt(0),a=[],i=[],n=[],o=0;o<t.length;o++){var l=t[o];ao.traceIs(l.trace,"bar-like")||ao.traceIs(l.trace,"box-violin")?n.push(l):l.trace[r+"period"]?i.push(l):a.push(l)}return a.concat(i).concat(n)}function Um(t,e,r){var a=e[t+"a"],i=e[t+"Val"],n=e.cd[0];if(a.type==="category")i=a._categoriesMap[i];else if(a.type==="date"){var o=e.trace[t+"periodalignment"];if(o){var l=e.cd[e.index],s=l[t+"Start"];s===void 0&&(s=l[t]);var f=l[t+"End"];f===void 0&&(f=l[t]);var c=f-s;o==="end"?i+=c:o==="middle"&&(i+=c/2)}i=a.d2c(i)}return n&&n.t&&n.t.posLetter===a._id&&(r.boxmode==="group"||r.violinmode==="group")&&(i+=n.t.dPos),i}function Y1(t){return t.offsetTop+t.clientTop}function W1(t){return t.offsetLeft+t.clientLeft}function wn(t,e){var r=t._fullLayout,a=e.getBoundingClientRect(),i=a.x,n=a.y,o=i+a.width,l=n+a.height,s=rr.apply3DTransform(r._invTransform)(i,n),f=rr.apply3DTransform(r._invTransform)(o,l),c=s[0],v=s[1],u=f[0],d=f[1];return{x:c,y:v,width:u-c,height:d-v,top:Math.min(v,d),left:Math.min(c,u),right:Math.max(c,u),bottom:Math.max(v,d)}}var wC=me.exports,TC=ft.exports,kC=ua.isUnifiedHover,ph=function(e,r,a,i){i=i||{};var n=r.legend;function o(l){i.font[l]||(i.font[l]=n?r.legend.font[l]:r.font[l])}r&&kC(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),n?(i.bgcolor||(i.bgcolor=TC.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),a("hoverlabel.bgcolor",i.bgcolor),a("hoverlabel.bordercolor",i.bordercolor),a("hoverlabel.namelength",i.namelength),wC.coerceFont(a,"hoverlabel.font",i.font),a("hoverlabel.align",i.align)},AC=me.exports,MC=ph,SC=Dl,LC=function(e,r){function a(i,n){return AC.coerce(e,r,SC,i,n)}MC(e,r,a)},Vm=me.exports,CC=jf,DC=ph,EC=function(e,r,a,i){function n(l,s){return Vm.coerce(e,r,CC,l,s)}var o=Vm.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),DC(e,r,n,o)},$C=me.exports,RC=Dl,Z1=function(e,r){function a(i,n){return r[i]!==void 0?r[i]:$C.coerce(e,r,RC,i,n)}return a("clickmode"),a("hovermode")},qm=me.exports,PC=Dl,zC=Z1,IC=ph,NC=function(e,r){function a(f,c){return qm.coerce(e,r,PC,f,c)}var i=zC(e,r);i&&(a("hoverdistance"),a("spikedistance"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=r._has("mapbox"),l=r._has("geo"),s=r._basePlotModules.length;r.dragmode==="zoom"&&((o||l)&&s===1||o&&l&&s===2)&&(r.dragmode="pan"),IC(e,r,a),qm.coerceFont(a,"hoverlabel.grouptitlefont",r.hoverlabel.font)},td=me.exports,Xm=We,FC=function(e){var r=e.calcdata,a=e._fullLayout;function i(f){return function(c){return td.coerceHoverinfo({hoverinfo:c},{_module:f._module},a)}}for(var n=0;n<r.length;n++){var o=r[n],l=o[0].trace;if(!Xm.traceIs(l,"pie-like")){var s=Xm.traceIs(l,"2dMap")?HC:td.fillArray;s(l.hoverinfo,o,"hi",i(l)),l.hovertemplate&&s(l.hovertemplate,o,"ht"),l.hoverlabel&&(s(l.hoverlabel.bgcolor,o,"hbg"),s(l.hoverlabel.bordercolor,o,"hbc"),s(l.hoverlabel.font.size,o,"hts"),s(l.hoverlabel.font.color,o,"htc"),s(l.hoverlabel.font.family,o,"htf"),s(l.hoverlabel.namelength,o,"hnl"),s(l.hoverlabel.align,o,"hta"))}}};function HC(t,e,r,a){a=a||td.identity,Array.isArray(t)&&(e[0][r]=a(t))}var OC=We,BC=nc.hover,jC=function(e,r,a){var i=OC.getComponentMethod("annotations","onClick")(e,e._hoverdata);a!==void 0&&BC(e,r,a,!0);function n(){e.emit("plotly_click",{points:e._hoverdata,event:r})}e._hoverdata&&r&&r.target&&(i&&i.then?i.then(n):n(),r.stopImmediatePropagation&&r.stopImmediatePropagation())},GC=ct.exports,yf=me.exports,UC=Ca.exports,Po=ua,Ym=Dl,Wm=nc,Ma={moduleType:"component",name:"fx",constants:Bf,schema:{layout:Ym},attributes:jf,layoutAttributes:Ym,supplyLayoutGlobalDefaults:LC,supplyDefaults:EC,supplyLayoutDefaults:NC,calc:FC,getDistanceFunction:Po.getDistanceFunction,getClosest:Po.getClosest,inbox:Po.inbox,quadrature:Po.quadrature,appendArrayPointValue:Po.appendArrayPointValue,castHoverOption:qC,castHoverinfo:XC,hover:Wm.hover,unhover:UC.unhover,loneHover:Wm.loneHover,loneUnhover:VC,click:jC};function VC(t){var e=yf.isD3Selection(t)?t:GC.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()}function qC(t,e,r){return yf.castOption(t,e,"hoverlabel."+r)}function XC(t,e,r){function a(i){return yf.coerceHoverinfo({hoverinfo:i},{_module:t._module},e)}return yf.castOption(t,r,"hoverinfo",a)}var _o={};(function(t){t.selectMode=function(e){return e==="lasso"||e==="select"},t.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.openMode=function(e){return e==="drawline"||e==="drawopenpath"},t.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},t.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},t.selectingOrDrawing=function(e){return t.freeMode(e)||t.rectMode(e)}})(_o);var mh=function(e){var r=e._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(a){a.regl&&a.regl.clear({color:!0,depth:!0})})},oc={},yh={exports:{}},gh={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-1 {fill: #3f4f75;} .cls-2 {fill: #80cfbe;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' 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-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>"}},Hl={},ps=32,bh={CIRCLE_SIDES:ps,i000:0,i090:ps/4,i180:ps/2,i270:ps/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)},YC=me.exports.strTranslate;function K1(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}function WC(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}}function ZC(t){var e=t._id.charAt(0)==="y"?1:0;return function(r){return K1(t,r[e])}}function KC(t){return YC(t.xaxis._offset,t.yaxis._offset)}var xh={p2r:K1,r2p:WC,axValue:ZC,getTransform:KC};(function(t){var e=j2,r=bh,a=r.CIRCLE_SIDES,i=r.SQRT2,n=xh,o=n.p2r,l=n.r2p,s=[0,3,4,5,6,1,2],f=[0,3,4,1,2];t.writePaths=function(u){var d=u.length;if(!d)return"M0,0Z";for(var h="",p=0;p<d;p++)for(var g=u[p].length,_=0;_<g;_++){var b=u[p][_][0];if(b==="Z")h+="Z";else for(var w=u[p][_].length,m=0;m<w;m++){var y=m;b==="Q"||b==="S"?y=f[m]:b==="C"&&(y=s[m]),h+=u[p][_][y],m>0&&m<w-1&&(h+=",")}}return h},t.readPaths=function(u,d,h,p){var g=e(u),_=[],b=-1,w=function(){b++,_[b]=[]},m,y=0,x=0,T,k,S=function(){T=y,k=x};S();for(var A=0;A<g.length;A++){var E=[],M,D,$,I,P=g[A][0],R=P;switch(P){case"M":w(),y=+g[A][1],x=+g[A][2],E.push([R,y,x]),S();break;case"Q":case"S":M=+g[A][1],$=+g[A][2],y=+g[A][3],x=+g[A][4],E.push([R,y,x,M,$]);break;case"C":M=+g[A][1],$=+g[A][2],D=+g[A][3],I=+g[A][4],y=+g[A][5],x=+g[A][6],E.push([R,y,x,M,$,D,I]);break;case"T":case"L":y=+g[A][1],x=+g[A][2],E.push([R,y,x]);break;case"H":R="L",y=+g[A][1],E.push([R,y,x]);break;case"V":R="L",x=+g[A][1],E.push([R,y,x]);break;case"A":R="L";var L=+g[A][1],C=+g[A][2];+g[A][4]||(L=-L,C=-C);var z=y-L,F=x;for(m=1;m<=a/2;m++){var H=2*Math.PI*m/a;E.push([R,z+L*Math.cos(H),F+C*Math.sin(H)])}break;case"Z":(y!==T||x!==k)&&(y=T,x=k,E.push([R,y,x]));break}for(var B=(h||{}).domain,O=d._fullLayout._size,W=h&&h.xsizemode==="pixel",j=h&&h.ysizemode==="pixel",Z=p===!1,K=0;K<E.length;K++){for(m=0;m+2<7;m+=2){var Q=E[K][m+1],ee=E[K][m+2];Q===void 0||ee===void 0||(y=Q,x=ee,h&&(h.xaxis&&h.xaxis.p2r?(Z&&(Q-=h.xaxis._offset),W?Q=l(h.xaxis,h.xanchor)+Q:Q=o(h.xaxis,Q)):(Z&&(Q-=O.l),B?Q=B.x[0]+Q/O.w:Q=Q/O.w),h.yaxis&&h.yaxis.p2r?(Z&&(ee-=h.yaxis._offset),j?ee=l(h.yaxis,h.yanchor)-ee:ee=o(h.yaxis,ee)):(Z&&(ee-=O.t),B?ee=B.y[1]-ee/O.h:ee=1-ee/O.h)),E[K][m+1]=Q,E[K][m+2]=ee)}_[b].push(E[K].slice())}}return _};function c(u,d){return Math.abs(u-d)<=1e-6}function v(u,d){var h=d[1]-u[1],p=d[2]-u[2];return Math.sqrt(h*h+p*p)}t.pointsShapeRectangle=function(u){var d=u.length;if(d!==5)return!1;for(var h=1;h<3;h++){var p=u[0][h]-u[1][h],g=u[3][h]-u[2][h];if(!c(p,g))return!1;var _=u[0][h]-u[3][h],b=u[1][h]-u[2][h];if(!c(_,b))return!1}return!c(u[0][1],u[1][1])&&!c(u[0][1],u[3][1])?!1:!!(v(u[0],u[1])*v(u[0],u[3]))},t.pointsShapeEllipse=function(u){var d=u.length;if(d!==a+1)return!1;d=a;for(var h=0;h<d;h++){var p=(d*2-h)%d,g=(d/2+p)%d,_=(d/2+h)%d;if(!c(v(u[h],u[_]),v(u[p],u[g])))return!1}return!0},t.handleEllipse=function(u,d,h){if(!u)return[d,h];var p=t.ellipseOver({x0:d[0],y0:d[1],x1:h[0],y1:h[1]}),g=(p.x1+p.x0)/2,_=(p.y1+p.y0)/2,b=(p.x1-p.x0)/2,w=(p.y1-p.y0)/2;b||(b=w=w/i),w||(w=b=b/i);for(var m=[],y=0;y<a;y++){var x=y*2*Math.PI/a;m.push([g+b*Math.cos(x),_+w*Math.sin(x)])}return m},t.ellipseOver=function(u){var d=u.x0,h=u.y0,p=u.x1,g=u.y1,_=p-d,b=g-h;d-=_,h-=b;var w=(d+p)/2,m=(h+g)/2,y=i;return _*=y,b*=y,{x0:w-_,y0:m-b,x1:w+_,y1:m+b}}})(Hl);var Q1=_o,QC=Q1.drawMode,JC=Q1.openMode,wo=bh,Zm=wo.i000,Km=wo.i090,Qm=wo.i180,Jm=wo.i270,eD=wo.cos45,tD=wo.sin45,J1=xh,ms=J1.p2r,ci=J1.r2p,rD=zl,aD=rD.clearSelect,_h=Hl,iD=_h.readPaths,nD=_h.writePaths,oD=_h.ellipseOver,e_=function(e,r){if(!!e.length){var a=e[0][0];if(!!a){var i=a.getAttribute("d"),n=r.gd,o=n._fullLayout.newshape,l=r.plotinfo,s=l.xaxis,f=l.yaxis,c=!!l.domain||!l.xaxis,v=!!l.domain||!l.yaxis,u=r.isActiveShape,d=r.dragmode,h=(n.layout||{}).shapes||[];if(!QC(d)&&u!==void 0){var p=n._fullLayout._activeShapeIndex;if(p<h.length)switch(n._fullLayout.shapes[p].type){case"rect":d="drawrect";break;case"circle":d="drawcircle";break;case"line":d="drawline";break;case"path":var g=h[p].path||"";g[g.length-1]==="Z"?d="drawclosedpath":d="drawopenpath";break}}var _=JC(d),b=iD(i,n,l,u),w={editable:!0,xref:c?"paper":s._id,yref:v?"paper":f._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};_||(w.fillcolor=o.fillcolor,w.fillrule=o.fillrule);var m;if(b.length===1&&(m=b[0]),m&&d==="drawrect")w.type="rect",w.x0=m[0][1],w.y0=m[0][2],w.x1=m[2][1],w.y1=m[2][2];else if(m&&d==="drawline")w.type="line",w.x0=m[0][1],w.y0=m[0][2],w.x1=m[1][1],w.y1=m[1][2];else if(m&&d==="drawcircle"){w.type="circle";var y=m[Zm][1],x=m[Km][1],T=m[Qm][1],k=m[Jm][1],S=m[Zm][2],A=m[Km][2],E=m[Qm][2],M=m[Jm][2],D=l.xaxis&&(l.xaxis.type==="date"||l.xaxis.type==="log"),$=l.yaxis&&(l.yaxis.type==="date"||l.yaxis.type==="log");D&&(y=ci(l.xaxis,y),x=ci(l.xaxis,x),T=ci(l.xaxis,T),k=ci(l.xaxis,k)),$&&(S=ci(l.yaxis,S),A=ci(l.yaxis,A),E=ci(l.yaxis,E),M=ci(l.yaxis,M));var I=(x+k)/2,P=(S+E)/2,R=(k-x+T-y)/2,L=(M-A+E-S)/2,C=oD({x0:I,y0:P,x1:I+R*eD,y1:P+L*tD});D&&(C.x0=ms(l.xaxis,C.x0),C.x1=ms(l.xaxis,C.x1)),$&&(C.y0=ms(l.yaxis,C.y0),C.y1=ms(l.yaxis,C.y1)),w.x0=C.x0,w.y0=C.y0,w.x1=C.x1,w.y1=C.y1}else w.type="path",s&&f&&lD(b,s,f),w.path=nD(b),m=null;aD(n);for(var z=r.editHelpers,F=(z||{}).modifyItem,H=[],B=0;B<h.length;B++){var O=n._fullLayout.shapes[B];if(H[B]=O._input,u!==void 0&&B===n._fullLayout._activeShapeIndex){var W=w;switch(O.type){case"line":case"rect":case"circle":F("x0",W.x0),F("x1",W.x1),F("y0",W.y0),F("y1",W.y1);break;case"path":F("path",W.path);break}}}return u===void 0?(H.push(w),H):z?z.getUpdateObj():{}}}};function lD(t,e,r){var a=e.type==="date",i=r.type==="date";if(!a&&!i)return t;for(var n=0;n<t.length;n++)for(var o=0;o<t[n].length;o++)for(var l=0;l+2<t[n][o].length;l+=2)a&&(t[n][o][l+1]=t[n][o][l+1].replace(" ","_")),i&&(t[n][o][l+2]=t[n][o][l+2].replace(" ","_"));return t}var ey=Ca.exports,sD=_o,fD=sD.drawMode,cD=We,lc=bh,uD=lc.i000,vD=lc.i090,dD=lc.i180,hD=lc.i270,pD=zl,mD=pD.clearOutlineControllers,wh=Hl,ys=wh.pointsShapeRectangle,uu=wh.pointsShapeEllipse,yD=wh.writePaths,gD=e_,t_=function t(e,r,a,i){i||(i=0);var n=a.gd;function o(){t(e,r,a,i++),uu(e[0])&&l({redrawing:!0})}function l($){a.isActiveShape=!1;var I=gD(r,a);Object.keys(I).length&&cD.call(($||{}).redrawing?"relayout":"_guiRelayout",n,I)}var s=a.isActiveShape,f=n._fullLayout,c=f._zoomlayer,v=a.dragmode,u=fD(v);u?n._fullLayout._drawing=!0:n._fullLayout._activeShapeIndex>=0&&mD(n),r.attr("d",yD(e));var d,h,p,g,_;if(s&&!i){_=bD([],e);var b=c.append("g").attr("class","outline-controllers");k(b),D()}function w($){p=+$.srcElement.getAttribute("data-i"),g=+$.srcElement.getAttribute("data-j"),d[p][g].moveFn=m}function m($,I){if(!!e.length){var P=_[p][g][1],R=_[p][g][2],L=e[p],C=L.length;if(ys(L)){for(var z=0;z<C;z++)if(z!==g){var F=L[z];F[1]===L[g][1]&&(F[1]=P+$),F[2]===L[g][2]&&(F[2]=R+I)}if(L[g][1]=P+$,L[g][2]=R+I,!ys(L))for(var H=0;H<C;H++)for(var B=0;B<L[H].length;B++)L[H][B]=_[p][H][B]}else L[g][1]=P+$,L[g][2]=R+I;o()}}function y(){l()}function x(){if(!!e.length&&!!e[p]&&!!e[p].length){for(var $=[],I=0;I<e[p].length;I++)I!==g&&$.push(e[p][I]);$.length>1&&!($.length===2&&$[1][0]==="Z")&&(g===0&&($[0][0]="M"),e[p]=$,o(),l())}}function T($,I){if($===2){p=+I.srcElement.getAttribute("data-i"),g=+I.srcElement.getAttribute("data-j");var P=e[p];!ys(P)&&!uu(P)&&x()}}function k($){d=[];for(var I=0;I<e.length;I++){var P=e[I],R=ys(P),L=!R&&uu(P);d[I]=[];for(var C=0;C<P.length;C++)if(P[C][0]!=="Z"&&!(L&&C!==uD&&C!==vD&&C!==dD&&C!==hD)){var z=P[C][1],F=P[C][2],H=$.append("circle").classed("cursor-grab",!0).attr("data-i",I).attr("data-j",C).attr("cx",z).attr("cy",F).attr("r",4).style({"mix-blend-mode":"luminosity",fill:"black",stroke:"white","stroke-width":1});d[I][C]={element:H.node(),gd:n,prepFn:w,doneFn:y,clickFn:T},ey.init(d[I][C])}}}function S($,I){if(!!e.length)for(var P=0;P<e.length;P++)for(var R=0;R<e[P].length;R++)for(var L=0;L+2<e[P][R].length;L+=2)e[P][R][L+1]=_[P][R][L+1]+$,e[P][R][L+2]=_[P][R][L+2]+I}function A($,I){S($,I),o()}function E($){p=+$.srcElement.getAttribute("data-i"),p||(p=0),h[p].moveFn=A}function M(){l()}function D(){if(h=[],!!e.length){var $=0;h[$]={element:r[0][0],gd:n,prepFn:E,doneFn:M},ey.init(h[$])}}};function bD(t,e){for(var r=0;r<e.length;r++){var a=e[r];t[r]=[];for(var i=0;i<a.length;i++){t[r][i]=[];for(var n=0;n<a[i].length;n++)t[r][i][n]=a[i][n]}}return t}var Th={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}},sc={};(function(t){var e=Th,r=me.exports;t.rangeToShapePosition=function(a){return a.type==="log"?a.r2d:function(i){return i}},t.shapePositionToRange=function(a){return a.type==="log"?a.d2r:function(i){return i}},t.decodeDate=function(a){return function(i){return i.replace&&(i=i.replace("_"," ")),a(i)}},t.encodeDate=function(a){return function(i){return a(i).replace(" ","_")}},t.extractPathCoords=function(a,i){var n=[],o=a.match(e.segmentRE);return o.forEach(function(l){var s=i[l.charAt(0)].drawn;if(s!==void 0){var f=l.substr(1).match(e.paramRE);!f||f.length<s||n.push(r.cleanNumber(f[s]))}}),n},t.getDataToPixel=function(a,i,n,o){var l=a._fullLayout._size,s;if(i)if(o==="domain")s=function(c){return i._length*(n?1-c:c)+i._offset};else{var f=t.shapePositionToRange(i);s=function(c){return i._offset+i.r2p(f(c,!0))},i.type==="date"&&(s=t.decodeDate(s))}else n?s=function(c){return l.t+l.h*(1-c)}:s=function(c){return l.l+l.w*c};return s},t.getPixelToData=function(a,i,n,o){var l=a._fullLayout._size,s;if(i)if(o==="domain")s=function(c){var v=(c-i._offset)/i._length;return n?1-v:v};else{var f=t.rangeToShapePosition(i);s=function(c){return f(i.p2r(c-i._offset))}}else n?s=function(c){return 1-(c-l.t)/l.h}:s=function(c){return(c-l.l)/l.w};return s},t.roundPositionForSharpStrokeRendering=function(a,i){var n=Math.round(i%2)===1,o=Math.round(a);return n?o+.5:o},t.makeOptionsAndPlotinfo=function(a,i){var n=a._fullLayout.shapes[i]||{},o=a._fullLayout._plots[n.xref+n.yref],l=!!o;return l?o._hadPlotinfo=!0:(o={},n.xref&&n.xref!=="paper"&&(o.xaxis=a._fullLayout[n.xref+"axis"]),n.yref&&n.yref!=="paper"&&(o.yaxis=a._fullLayout[n.yref+"axis"])),o.xsizemode=n.xsizemode,o.ysizemode=n.ysizemode,o.xanchor=n.xanchor,o.yanchor=n.yanchor,{options:n,plotinfo:o}}})(sc);var r_=We,rd=me.exports,Ha=jt.exports,xD=Hl.readPaths,_D=t_,a_=zl.clearOutlineControllers,vu=ft.exports,kh=Pt.exports,wD=Ht.arrayEditor,ty=Ca.exports,ry=Di,la=Th,Tr=sc,i_={draw:Ah,drawOne:n_,eraseActiveShape:MD};function Ah(t){var e=t._fullLayout;e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove();for(var r in e._plots){var a=e._plots[r].shapelayer;a&&a.selectAll("path").remove()}for(var i=0;i<e.shapes.length;i++)e.shapes[i].visible&&n_(t,i)}function gs(t){return!!t._fullLayout._drawing}function fc(t){return!t._context.edits.shapePosition}function n_(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=Tr.makeOptionsAndPlotinfo(t,e),a=r.options,i=r.plotinfo;if(!a._input||a.visible===!1)return;if(a.layer!=="below")o(t._fullLayout._shapeUpperLayer);else if(a.xref==="paper"||a.yref==="paper")o(t._fullLayout._shapeLowerLayer);else if(i._hadPlotinfo){var n=i.mainplotinfo||i;o(n.shapelayer)}else o(t._fullLayout._shapeLowerLayer);function o(l){var s=ad(t,a),f={"data-index":e,"fill-rule":a.fillrule,d:s},c=a.opacity,v=a.fillcolor,u=a.line.width?a.line.color:"rgba(0,0,0,0)",d=a.line.width,h=a.line.dash;!d&&a.editable===!0&&(d=5,h="solid");var p=s[s.length-1]!=="Z",g=fc(t)&&a.editable&&t._fullLayout._activeShapeIndex===e;g&&(v=p?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,c=t._fullLayout.activeshape.opacity);var _=l.append("path").attr(f).style("opacity",c).call(vu.stroke,u).call(vu.fill,v).call(kh.dashLine,h,d);o_(_,t,a);var b;if((g||t._context.edits.shapePosition)&&(b=wD(t.layout,"shapes",a)),g){_.style({cursor:"move"});var w={element:_.node(),plotinfo:i,gd:t,editHelpers:b,isActiveShape:!0},m=xD(s,t);_D(m,_,w)}else t._context.edits.shapePosition?TD(t,_,a,e,l,b):a.editable===!0&&_.style("pointer-events",p||vu.opacity(v)*c<=.5?"stroke":"all");_.node().addEventListener("click",function(){return AD(t,_)})}}function o_(t,e,r){var a=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");kh.setClipUrl(t,a?"clip"+e._fullLayout._uid+a:null,e)}function TD(t,e,r,a,i,n){var o=10,l=10,s=r.xsizemode==="pixel",f=r.ysizemode==="pixel",c=r.type==="line",v=r.type==="path",u=n.modifyItem,d,h,p,g,_,b,w,m,y,x,T,k,S,A,E,M=Ha.getFromId(t,r.xref),D=Ha.getRefType(r.xref),$=Ha.getFromId(t,r.yref),I=Ha.getRefType(r.yref),P=Tr.getDataToPixel(t,M,!1,D),R=Tr.getDataToPixel(t,$,!0,I),L=Tr.getPixelToData(t,M,!1,D),C=Tr.getPixelToData(t,$,!0,I),z=B(),F={element:z.node(),gd:t,prepFn:j,doneFn:Z,clickFn:K},H;ty.init(F),z.node().onmousemove=W;function B(){return c?O():e}function O(){var oe=10,V=Math.max(r.line.width,oe),ie=i.append("g").attr("data-index",a);ie.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":V,"stroke-opacity":"0"});var ge={"fill-opacity":"0"},de=Math.max(V/2,oe);return ie.append("circle").attr({"data-line-point":"start-point",cx:s?P(r.xanchor)+r.x0:P(r.x0),cy:f?R(r.yanchor)-r.y0:R(r.y0),r:de}).style(ge).classed("cursor-grab",!0),ie.append("circle").attr({"data-line-point":"end-point",cx:s?P(r.xanchor)+r.x1:P(r.x1),cy:f?R(r.yanchor)-r.y1:R(r.y1),r:de}).style(ge).classed("cursor-grab",!0),ie}function W(oe){if(gs(t)){H=null;return}if(c)oe.target.tagName==="path"?H="move":H=oe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var V=F.element.getBoundingClientRect(),ie=V.right-V.left,ge=V.bottom-V.top,de=oe.clientX-V.left,ke=oe.clientY-V.top,ue=!v&&ie>o&&ge>l&&!oe.shiftKey?ty.getCursor(de/ie,1-ke/ge):"move";ry(e,ue),H=ue.split("-")[0]}}function j(oe){gs(t)||(s&&(_=P(r.xanchor)),f&&(b=R(r.yanchor)),r.type==="path"?E=r.path:(d=s?r.x0:P(r.x0),h=f?r.y0:R(r.y0),p=s?r.x1:P(r.x1),g=f?r.y1:R(r.y1)),d<p?(y=d,S="x0",x=p,A="x1"):(y=p,S="x1",x=d,A="x0"),!f&&h<g||f&&h>g?(w=h,T="y0",m=g,k="y1"):(w=g,T="y1",m=h,k="y0"),W(oe),ne(i,r),se(e,r,t),F.moveFn=H==="move"?Q:ee,F.altKey=oe.altKey)}function Z(){gs(t)||(ry(e),le(i),o_(e,t,r),r_.call("_guiRelayout",t,n.getUpdateObj()))}function K(){gs(t)||le(i)}function Q(oe,V){if(r.type==="path"){var ie=function(ke){return ke},ge=ie,de=ie;s?u("xanchor",r.xanchor=L(_+oe)):(ge=function(ue){return L(P(ue)+oe)},M&&M.type==="date"&&(ge=Tr.encodeDate(ge))),f?u("yanchor",r.yanchor=C(b+V)):(de=function(ue){return C(R(ue)+V)},$&&$.type==="date"&&(de=Tr.encodeDate(de))),u("path",r.path=ay(E,ge,de))}else s?u("xanchor",r.xanchor=L(_+oe)):(u("x0",r.x0=L(d+oe)),u("x1",r.x1=L(p+oe))),f?u("yanchor",r.yanchor=C(b+V)):(u("y0",r.y0=C(h+V)),u("y1",r.y1=C(g+V)));e.attr("d",ad(t,r)),ne(i,r)}function ee(oe,V){if(v){var ie=function(De){return De},ge=ie,de=ie;s?u("xanchor",r.xanchor=L(_+oe)):(ge=function(je){return L(P(je)+oe)},M&&M.type==="date"&&(ge=Tr.encodeDate(ge))),f?u("yanchor",r.yanchor=C(b+V)):(de=function(je){return C(R(je)+V)},$&&$.type==="date"&&(de=Tr.encodeDate(de))),u("path",r.path=ay(E,ge,de))}else if(c){if(H==="resize-over-start-point"){var ke=d+oe,ue=f?h-V:h+V;u("x0",r.x0=s?ke:L(ke)),u("y0",r.y0=f?ue:C(ue))}else if(H==="resize-over-end-point"){var Y=p+oe,fe=f?g-V:g+V;u("x1",r.x1=s?Y:L(Y)),u("y1",r.y1=f?fe:C(fe))}}else{var Ae=function(De){return H.indexOf(De)!==-1},be=Ae("n"),Ce=Ae("s"),Me=Ae("w"),Te=Ae("e"),X=be?w+V:w,pe=Ce?m+V:m,ce=Me?y+oe:y,he=Te?x+oe:x;f&&(be&&(X=w-V),Ce&&(pe=m-V)),(!f&&pe-X>l||f&&X-pe>l)&&(u(T,r[T]=f?X:C(X)),u(k,r[k]=f?pe:C(pe))),he-ce>o&&(u(S,r[S]=s?ce:L(ce)),u(A,r[A]=s?he:L(he)))}e.attr("d",ad(t,r)),ne(i,r)}function ne(oe,V){(s||f)&&ie();function ie(){var ge=V.type!=="path",de=oe.selectAll(".visual-cue").data([0]),ke=1;de.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ke}).classed("visual-cue",!0);var ue=P(s?V.xanchor:rd.midRange(ge?[V.x0,V.x1]:Tr.extractPathCoords(V.path,la.paramIsX))),Y=R(f?V.yanchor:rd.midRange(ge?[V.y0,V.y1]:Tr.extractPathCoords(V.path,la.paramIsY)));if(ue=Tr.roundPositionForSharpStrokeRendering(ue,ke),Y=Tr.roundPositionForSharpStrokeRendering(Y,ke),s&&f){var fe="M"+(ue-1-ke)+","+(Y-1-ke)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";de.attr("d",fe)}else if(s){var Ae="M"+(ue-1-ke)+","+(Y-9-ke)+"v18 h2 v-18 Z";de.attr("d",Ae)}else{var be="M"+(ue-9-ke)+","+(Y-1-ke)+"h18 v2 h-18 Z";de.attr("d",be)}}}function le(oe){oe.selectAll(".visual-cue").remove()}function se(oe,V,ie){var ge=V.xref,de=V.yref,ke=Ha.getFromId(ie,ge),ue=Ha.getFromId(ie,de),Y="";ge!=="paper"&&!ke.autorange&&(Y+=ge),de!=="paper"&&!ue.autorange&&(Y+=de),kh.setClipUrl(oe,Y?"clip"+ie._fullLayout._uid+Y:null,ie)}}function ad(t,e){var r=e.type,a=Ha.getRefType(e.xref),i=Ha.getRefType(e.yref),n=Ha.getFromId(t,e.xref),o=Ha.getFromId(t,e.yref),l=t._fullLayout._size,s,f,c,v,u,d,h,p;if(n?a==="domain"?f=function(S){return n._offset+n._length*S}:(s=Tr.shapePositionToRange(n),f=function(S){return n._offset+n.r2p(s(S,!0))}):f=function(S){return l.l+l.w*S},o?i==="domain"?v=function(S){return o._offset+o._length*(1-S)}:(c=Tr.shapePositionToRange(o),v=function(S){return o._offset+o.r2p(c(S,!0))}):v=function(S){return l.t+l.h*(1-S)},r==="path")return n&&n.type==="date"&&(f=Tr.decodeDate(f)),o&&o.type==="date"&&(v=Tr.decodeDate(v)),kD(e,f,v);if(e.xsizemode==="pixel"){var g=f(e.xanchor);u=g+e.x0,d=g+e.x1}else u=f(e.x0),d=f(e.x1);if(e.ysizemode==="pixel"){var _=v(e.yanchor);h=_-e.y0,p=_-e.y1}else h=v(e.y0),p=v(e.y1);if(r==="line")return"M"+u+","+h+"L"+d+","+p;if(r==="rect")return"M"+u+","+h+"H"+d+"V"+p+"H"+u+"Z";var b=(u+d)/2,w=(h+p)/2,m=Math.abs(b-u),y=Math.abs(w-h),x="A"+m+","+y,T=b+m+","+w,k=b+","+(w-y);return"M"+T+x+" 0 1,1 "+k+x+" 0 0,1 "+T+"Z"}function kD(t,e,r){var a=t.path,i=t.xsizemode,n=t.ysizemode,o=t.xanchor,l=t.yanchor;return a.replace(la.segmentRE,function(s){var f=0,c=s.charAt(0),v=la.paramIsX[c],u=la.paramIsY[c],d=la.numParams[c],h=s.substr(1).replace(la.paramRE,function(p){return v[f]?i==="pixel"?p=e(o)+Number(p):p=e(p):u[f]&&(n==="pixel"?p=r(l)-Number(p):p=r(p)),f++,f>d&&(p="X"),p});return f>d&&(h=h.replace(/[\s,]*X.*/,""),rd.log("Ignoring extra params in segment "+s)),c+h})}function ay(t,e,r){return t.replace(la.segmentRE,function(a){var i=0,n=a.charAt(0),o=la.paramIsX[n],l=la.paramIsY[n],s=la.numParams[n],f=a.substr(1).replace(la.paramRE,function(c){return i>=s||(o[i]?c=e(c):l[i]&&(c=r(c)),i++),c});return n+f})}function AD(t,e){if(!!fc(t)){var r=e.node(),a=+r.getAttribute("data-index");if(a>=0){if(a===t._fullLayout._activeShapeIndex){iy(t);return}t._fullLayout._activeShapeIndex=a,t._fullLayout._deactivateShape=iy,Ah(t)}}}function iy(t){if(!!fc(t)){var e=t._fullLayout._activeShapeIndex;e>=0&&(a_(t),delete t._fullLayout._activeShapeIndex,Ah(t))}}function MD(t){if(!!fc(t)){a_(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var a=[],i=0;i<r.length;i++)i!==e&&a.push(r[i]);delete t._fullLayout._activeShapeIndex,r_.call("_guiRelayout",t,{shapes:a})}}}var va=We,l_=ar.exports,s_=ir,At=gh,SD=i_.eraseActiveShape,Bn=me.exports,xt=Bn._,Mt=yh.exports={};Mt.toImage={name:"toImage",title:function(t){var e=t._context.toImageButtonOptions||{},r=e.format||"png";return r==="png"?xt(t,"Download plot as a png"):xt(t,"Download plot")},icon:At.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};Bn.notifier(xt(t,"Taking snapshot - this may take a few seconds"),"long"),r.format!=="svg"&&Bn.isIE()&&(Bn.notifier(xt(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach(function(a){a in e&&(r[a]=e[a])}),va.call("downloadImage",t,r).then(function(a){Bn.notifier(xt(t,"Snapshot succeeded")+" - "+a,"long")}).catch(function(){Bn.notifier(xt(t,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Mt.sendDataToCloud={name:"sendDataToCloud",title:function(t){return xt(t,"Edit in Chart Studio")},icon:At.disk,click:function(t){l_.sendDataToCloud(t)}};Mt.editInChartStudio={name:"editInChartStudio",title:function(t){return xt(t,"Edit in Chart Studio")},icon:At.pencil,click:function(t){l_.sendDataToCloud(t)}};Mt.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return xt(t,"Zoom")},attr:"dragmode",val:"zoom",icon:At.zoombox,click:zr};Mt.pan2d={name:"pan2d",_cat:"pan",title:function(t){return xt(t,"Pan")},attr:"dragmode",val:"pan",icon:At.pan,click:zr};Mt.select2d={name:"select2d",_cat:"select",title:function(t){return xt(t,"Box Select")},attr:"dragmode",val:"select",icon:At.selectbox,click:zr};Mt.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return xt(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:At.lasso,click:zr};Mt.drawclosedpath={name:"drawclosedpath",title:function(t){return xt(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:At.drawclosedpath,click:zr};Mt.drawopenpath={name:"drawopenpath",title:function(t){return xt(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:At.drawopenpath,click:zr};Mt.drawline={name:"drawline",title:function(t){return xt(t,"Draw line")},attr:"dragmode",val:"drawline",icon:At.drawline,click:zr};Mt.drawrect={name:"drawrect",title:function(t){return xt(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:At.drawrect,click:zr};Mt.drawcircle={name:"drawcircle",title:function(t){return xt(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:At.drawcircle,click:zr};Mt.eraseshape={name:"eraseshape",title:function(t){return xt(t,"Erase active shape")},icon:At.eraseshape,click:SD};Mt.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return xt(t,"Zoom in")},attr:"zoom",val:"in",icon:At.zoom_plus,click:zr};Mt.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return xt(t,"Zoom out")},attr:"zoom",val:"out",icon:At.zoom_minus,click:zr};Mt.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return xt(t,"Autoscale")},attr:"zoom",val:"auto",icon:At.autoscale,click:zr};Mt.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return xt(t,"Reset axes")},attr:"zoom",val:"reset",icon:At.home,click:zr};Mt.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return xt(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:At.tooltip_basic,gravity:"ne",click:zr};Mt.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return xt(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:At.tooltip_compare,gravity:"ne",click:zr};function zr(t,e){var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o={},l=s_.list(t,null,!0),s=n._cartesianSpikesEnabled,f,c;if(a==="zoom"){var v=i==="in"?.5:2,u=(1+v)/2,d=(1-v)/2,h;for(c=0;c<l.length;c++)if(f=l[c],!f.fixedrange)if(h=f._name,i==="auto")o[h+".autorange"]=!0;else if(i==="reset"){if(f._rangeInitial===void 0)o[h+".autorange"]=!0;else{var p=f._rangeInitial.slice();o[h+".range[0]"]=p[0],o[h+".range[1]"]=p[1]}f._showSpikeInitial!==void 0&&(o[h+".showspikes"]=f._showSpikeInitial,s==="on"&&!f._showSpikeInitial&&(s="off"))}else{var g=[f.r2l(f.range[0]),f.r2l(f.range[1])],_=[u*g[0]+d*g[1],u*g[1]+d*g[0]];o[h+".range[0]"]=f.l2r(_[0]),o[h+".range[1]"]=f.l2r(_[1])}}else a==="hovermode"&&(i==="x"||i==="y")&&(i=n._isHoriz?"y":"x",r.setAttribute("data-val",i)),o[a]=i;n._cartesianSpikesEnabled=s,va.call("_guiRelayout",t,o)}Mt.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return xt(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:At.zoombox,click:cc};Mt.pan3d={name:"pan3d",_cat:"pan",title:function(t){return xt(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:At.pan,click:cc};Mt.orbitRotation={name:"orbitRotation",title:function(t){return xt(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:At["3d_rotate"],click:cc};Mt.tableRotation={name:"tableRotation",title:function(t){return xt(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:At["z-axis"],click:cc};function cc(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout._subplots.gl3d||[],o={},l=a.split("."),s=0;s<n.length;s++)o[n[s]+"."+l[1]]=i;var f=i==="pan"?i:"zoom";o.dragmode=f,va.call("_guiRelayout",t,o)}Mt.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return xt(t,"Reset camera to default")},attr:"resetDefault",icon:At.home,click:Mh};Mt.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return xt(t,"Reset camera to last save")},attr:"resetLastSave",icon:At.movie,click:Mh};function Mh(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=a==="resetLastSave",n=a==="resetDefault",o=t._fullLayout,l=o._subplots.gl3d||[],s={},f=0;f<l.length;f++){var c=l[f],v=c+".camera",u=c+".aspectratio",d=c+".aspectmode",h=o[c]._scene,p;i?(s[v+".up"]=h.viewInitial.up,s[v+".eye"]=h.viewInitial.eye,s[v+".center"]=h.viewInitial.center,p=!0):n&&(s[v+".up"]=null,s[v+".eye"]=null,s[v+".center"]=null,p=!0),p&&(s[u+".x"]=h.viewInitial.aspectratio.x,s[u+".y"]=h.viewInitial.aspectratio.y,s[u+".z"]=h.viewInitial.aspectratio.z,s[d]=h.viewInitial.aspectmode)}va.call("_guiRelayout",t,s)}Mt.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return xt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:At.tooltip_basic,gravity:"ne",click:LD};function f_(t,e){var r=e.currentTarget,a=r._previousVal,i=t._fullLayout,n=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],l={},s={};if(a)s=a,r._previousVal=null;else{for(var f=0;f<n.length;f++){var c=n[f],v=i[c],u=c+".hovermode";l[u]=v.hovermode,s[u]=!1;for(var d=0;d<3;d++){var h=o[d],p=c+"."+h+".showspikes";s[p]=!1,l[p]=v[h].showspikes}}r._previousVal=l}return s}function LD(t,e){var r=f_(t,e);va.call("_guiRelayout",t,r)}Mt.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return xt(t,"Zoom in")},attr:"zoom",val:"in",icon:At.zoom_plus,click:Sh};Mt.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return xt(t,"Zoom out")},attr:"zoom",val:"out",icon:At.zoom_minus,click:Sh};Mt.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return xt(t,"Reset")},attr:"reset",val:null,icon:At.autoscale,click:Sh};Mt.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return xt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:At.tooltip_basic,gravity:"ne",click:Lh};function Sh(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,n=t._fullLayout,o=n._subplots.geo||[],l=0;l<o.length;l++){var s=o[l],f=n[s];if(a==="zoom"){var c=f.projection.scale,v=i==="in"?2*c:.5*c;va.call("_guiRelayout",t,s+".projection.scale",v)}}a==="reset"&&gf(t,"geo")}Mt.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return xt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:At.tooltip_basic,gravity:"ne",click:Lh};Mt.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return xt(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:At.tooltip_basic,gravity:"ne",click:Lh};function c_(t){var e=t._fullLayout;return e.hovermode?!1:e._has("cartesian")?e._isHoriz?"y":"x":"closest"}function Lh(t){var e=c_(t);va.call("_guiRelayout",t,"hovermode",e)}Mt.resetViewSankey={name:"resetSankeyGroup",title:function(t){return xt(t,"Reset view")},icon:At.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var a=t._fullData[r]._viewInitial;e["node.groups"].push(a.node.groups.slice()),e["node.x"].push(a.node.x.slice()),e["node.y"].push(a.node.y.slice())}va.call("restyle",t,e)}};Mt.toggleHover={name:"toggleHover",title:function(t){return xt(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:At.tooltip_basic,gravity:"ne",click:function(t,e){var r=f_(t,e);r.hovermode=c_(t),va.call("_guiRelayout",t,r)}};Mt.resetViews={name:"resetViews",title:function(t){return xt(t,"Reset views")},icon:At.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),zr(t,e),r.setAttribute("data-attr","resetLastSave"),Mh(t,e),gf(t,"geo"),gf(t,"mapbox")}};Mt.toggleSpikelines={name:"toggleSpikelines",title:function(t){return xt(t,"Toggle Spike Lines")},icon:At.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled=r==="on"?"off":"on",va.call("_guiRelayout",t,CD(t))}};function CD(t){for(var e=t._fullLayout,r=e._cartesianSpikesEnabled==="on",a=s_.list(t,null,!0),i={},n=0;n<a.length;n++){var o=a[n];i[o._name+".showspikes"]=r?!0:o._showSpikeInitial}return i}Mt.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return xt(t,"Reset view")},attr:"reset",icon:At.home,click:function(t){gf(t,"mapbox")}};Mt.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return xt(t,"Zoom in")},attr:"zoom",val:"in",icon:At.zoom_plus,click:u_};Mt.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return xt(t,"Zoom out")},attr:"zoom",val:"out",icon:At.zoom_minus,click:u_};function u_(t,e){for(var r=e.currentTarget,a=r.getAttribute("data-val"),i=t._fullLayout,n=i._subplots.mapbox||[],o=1.05,l={},s=0;s<n.length;s++){var f=n[s],c=i[f].zoom,v=a==="in"?o*c:c/o;l[f+".zoom"]=v}va.call("_guiRelayout",t,l)}function gf(t,e){for(var r=t._fullLayout,a=r._subplots[e]||[],i={},n=0;n<a.length;n++)for(var o=a[n],l=r[o]._subplot,s=l.viewInitial,f=Object.keys(s),c=0;c<f.length;c++){var v=f[c];i[o+"."+v]=s[v]}va.call("_guiRelayout",t,i)}var v_=yh.exports,DD=Object.keys(v_),d_=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],h_=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(d_),Un=[],ED=function(t){if(h_.indexOf(t._cat||t.name)===-1){var e=t.name,r=(t._cat||t.name).toLowerCase();Un.indexOf(e)===-1&&Un.push(e),Un.indexOf(r)===-1&&Un.push(r)}};DD.forEach(function(t){ED(v_[t])});Un.sort();var p_={DRAW_MODES:d_,backButtons:h_,foreButtons:Un},ny=p_,m_={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.","This may include *"+ny.backButtons.join("*, *")+"*."].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.","This may include *"+ny.foreButtons.join("*, *")+"*."].join(" ")}},$D=me.exports,zo=ft.exports,RD=Ht,PD=m_,zD=function(e,r){var a=e.modebar||{},i=RD.newContainer(r,"modebar");function n(l,s){return $D.coerce(a,i,PD,l,s)}n("orientation"),n("bgcolor",zo.addOpacity(r.paper_bgcolor,.5));var o=zo.contrast(zo.rgb(r.modebar.bgcolor));n("color",zo.addOpacity(o,.3)),n("activecolor",zo.addOpacity(o,.7)),n("uirevision",r.uirevision),n("add"),n("remove")},Ch=ct.exports,ID=gt,Za=me.exports,y_=gh,ND=Of.version,FD=new DOMParser;function g_(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var Ua=g_.prototype;Ua.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,a=this.graphInfo._fullLayout,i="modebar-"+a._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),a.modebar.orientation==="v"&&(this.element.className+=" vertical",e=e.reverse());var n=a.modebar,o=r.displayModeBar==="hover"?".js-plotly-plot .plotly:hover ":"";Za.deleteRelatedStyleRule(i),Za.addRelatedStyleRule(i,o+"#"+i+" .modebar-group","background-color: "+n.bgcolor),Za.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+n.color),Za.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+n.activecolor),Za.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+n.activecolor);var l=!this.hasButtons(e),s=this.hasLogo!==r.displaylogo,f=this.locale!==r.locale;if(this.locale=r.locale,(l||s||f)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),a.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton()};Ua.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var a=e.createGroup();r.forEach(function(i){var n=i.name;if(!n)throw new Error("must provide button 'name' in button config");if(e.buttonsNames.indexOf(n)!==-1)throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var o=e.createButton(i);e.buttonElements.push(o),a.appendChild(o)}),e.element.appendChild(a)})};Ua.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t};Ua.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=t.title;a===void 0?a=t.name:typeof a=="function"&&(a=a(this.graphInfo)),(a||a===0)&&r.setAttribute("data-title",a),t.attr!==void 0&&r.setAttribute("data-attr",t.attr);var i=t.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var n=t.click;if(typeof n!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(l){t.click(e.graphInfo,l),e.updateActiveButton(l.currentTarget)}),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&Ch.select(r).classed("active",!0);var o=t.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||y_.question)),r.setAttribute("data-gravity",t.gravity||"n"),r};Ua.createIcon=function(t){var e=ID(t.height)?Number(t.height):t.ascent-t.descent,r="http://www.w3.org/2000/svg",a;if(t.path){a=document.createElementNS(r,"svg"),a.setAttribute("viewBox",[0,0,t.width,e].join(" ")),a.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",t.path),t.transform?i.setAttribute("transform",t.transform):t.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),a.appendChild(i)}if(t.svg){var n=FD.parseFromString(t.svg,"application/xml");a=n.childNodes[0]}return a.setAttribute("height","1em"),a.setAttribute("width","1em"),a};Ua.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=t!==void 0?t.getAttribute("data-attr"):null;this.buttonElements.forEach(function(a){var i=a.getAttribute("data-val")||!0,n=a.getAttribute("data-attr"),o=a.getAttribute("data-toggle")==="true",l=Ch.select(a);if(o)n===r&&l.classed("active",!l.classed("active"));else{var s=n===null?n:Za.nestedProperty(e,n).get();l.classed("active",s===i)}})};Ua.hasButtons=function(t){var e=this.buttons;if(!e||t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var a=0;a<t[r].length;a++)if(t[r][a].name!==e[r][a].name)return!1}return!0};function HD(t){return t+" (v"+ND+")"}Ua.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",HD(Za._(this.graphInfo,"Produced with Plotly.js"))),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(y_.newplotlylogo)),t.appendChild(e),t};Ua.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};Ua.destroy=function(){Za.removeElement(this.container.querySelector(".modebar")),Za.deleteRelatedStyleRule(this._uid)};function OD(t,e){var r=t._fullLayout,a=new g_({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&Ch.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}var BD=OD,jD=ir,oy=Rr,id=We,GD=ua.isUnifiedHover,UD=BD,bf=yh.exports,VD=p_.DRAW_MODES,qD=function(e){var r=e._fullLayout,a=e._context,i=r._modeBar;if(!a.displayModeBar&&!a.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(a.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(a.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var n=a.modeBarButtons,o;Array.isArray(n)&&n.length?o=QD(n):!a.displayModeBar&&a.watermark?o=[]:o=XD(e),i?i.update(e,o):r._modeBar=UD(e,o)};function XD(t){var e=t._fullLayout,r=t._fullData,a=t._context;function i(L,C){if(typeof C=="string"){if(C.toLowerCase()===L.toLowerCase())return!0}else{var z=C.name,F=C._cat||C.name;if(z===L||F===L.toLowerCase())return!0}return!1}var n=e.modebar.add;typeof n=="string"&&(n=[n]);var o=e.modebar.remove;typeof o=="string"&&(o=[o]);var l=a.modeBarButtonsToAdd.concat(n.filter(function(L){for(var C=0;C<a.modeBarButtonsToRemove.length;C++)if(i(L,a.modeBarButtonsToRemove[C]))return!1;return!0})),s=a.modeBarButtonsToRemove.concat(o.filter(function(L){for(var C=0;C<a.modeBarButtonsToAdd.length;C++)if(i(L,a.modeBarButtonsToAdd[C]))return!1;return!0})),f=e._has("cartesian"),c=e._has("gl3d"),v=e._has("geo"),u=e._has("pie"),d=e._has("funnelarea"),h=e._has("gl2d"),p=e._has("ternary"),g=e._has("mapbox"),_=e._has("polar"),b=e._has("smith"),w=e._has("sankey"),m=YD(e),y=GD(e.hovermode),x=[];function T(L){if(!!L.length){for(var C=[],z=0;z<L.length;z++){for(var F=L[z],H=bf[F],B=H.name.toLowerCase(),O=(H._cat||H.name).toLowerCase(),W=!1,j=0;j<s.length;j++){var Z=s[j].toLowerCase();if(Z===B||Z===O){W=!0;break}}W||C.push(bf[F])}x.push(C)}}var k=["toImage"];a.showEditInChartStudio?k.push("editInChartStudio"):a.showSendToCloud&&k.push("sendDataToCloud"),T(k);var S=[],A=[],E=[],M=[];(f||h||u||d||p)+v+c+g+_+b>1?(A=["toggleHover"],E=["resetViews"]):v?(S=["zoomInGeo","zoomOutGeo"],A=["hoverClosestGeo"],E=["resetGeo"]):c?(A=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):g?(S=["zoomInMapbox","zoomOutMapbox"],A=["toggleHover"],E=["resetViewMapbox"]):h?A=["hoverClosestGl2d"]:u?A=["hoverClosestPie"]:w?(A=["hoverClosestCartesian","hoverCompareCartesian"],E=["resetViewSankey"]):A=["toggleHover"],f&&(A=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(ZD(r)||y)&&(A=[]),(f||h)&&!m&&(S=["zoomIn2d","zoomOut2d","autoScale2d"],E[0]!=="resetViews"&&(E=["resetScale2d"])),c?M=["zoom3d","pan3d","orbitRotation","tableRotation"]:(f||h)&&!m||p?M=["zoom2d","pan2d"]:g||v?M=["pan2d"]:_&&(M=["zoom2d"]),WD(r)&&M.push("select2d","lasso2d");var D=[],$=function(L){D.indexOf(L)===-1&&A.indexOf(L)!==-1&&D.push(L)};if(Array.isArray(l)){for(var I=[],P=0;P<l.length;P++){var R=l[P];typeof R=="string"?(R=R.toLowerCase(),VD.indexOf(R)!==-1?(e._has("mapbox")||e._has("cartesian"))&&M.push(R):R==="togglespikelines"?$("toggleSpikelines"):R==="togglehover"?$("toggleHover"):R==="hovercompare"?$("hoverCompareCartesian"):R==="hoverclosest"?($("hoverClosestCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestGl2d"),$("hoverClosestPie")):R==="v1hovermode"&&($("toggleHover"),$("hoverClosestCartesian"),$("hoverCompareCartesian"),$("hoverClosestGeo"),$("hoverClosest3d"),$("hoverClosestGl2d"),$("hoverClosestPie"))):I.push(R)}l=I}return T(M),T(S.concat(E)),T(D),KD(x,l)}function YD(t){for(var e=jD.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}function WD(t){for(var e=!1,r=0;r<t.length&&!e;r++){var a=t[r];!a._module||!a._module.selectPoints||(id.traceIs(a,"scatter-like")?(oy.hasMarkers(a)||oy.hasText(a))&&(e=!0):id.traceIs(a,"box-violin")?(a.boxpoints==="all"||a.points==="all")&&(e=!0):e=!0)}return e}function ZD(t){for(var e=0;e<t.length;e++)if(!id.traceIs(t[e],"noHover"))return!1;return!0}function KD(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}function QD(t){for(var e=0;e<t.length;e++)for(var r=t[e],a=0;a<r.length;a++){var i=r[a];if(typeof i=="string")if(bf[i]!==void 0)t[e][a]=bf[i];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return t}var b_={moduleType:"component",name:"modebar",layoutAttributes:m_,supplyLayoutDefaults:zD,manage:qD},ii={},JD=Vr.FROM_BL,x_=function(e,r,a){a===void 0&&(a=JD[e.constraintoward||"center"]);var i=[e.r2l(e.range[0]),e.r2l(e.range[1])],n=i[0]+(i[1]-i[0])*a;e.range=e._input.range=[e.l2r(n+(i[0]-n)*r),e.l2r(n+(i[1]-n)*r)],e.setScale()},Ui=me.exports,du=Fl,ga=ir.id2name,e5=ti,ly=x_,t5=rh,r5=Jt.ALMOST_EQUAL,a5=Vr.FROM_BL;ii.handleDefaults=function(t,e,r){var a=r.axIds,i=r.axHasImage,n=e._axisConstraintGroups=[],o=e._axisMatchGroups=[],l,s,f,c,v,u,d,h;for(l=0;l<a.length;l++)c=ga(a[l]),v=t[c],u=e[c],i5(v,u,{axIds:a,layoutOut:e,hasImage:i[c]});function p(k,S){for(l=0;l<k.length;l++){s=k[l];for(f in s)e[ga(f)][S]=s}}for(p(o,"_matchGroup"),l=0;l<n.length;l++){s=n[l];for(f in s)if(u=e[ga(f)],u.fixedrange){for(var g in s){var _=ga(g);(t[_]||{}).fixedrange===!1&&Ui.warn("fixedrange was specified as false for axis "+_+" but was overridden because another axis in its constraint group has fixedrange true"),e[_].fixedrange=!0}break}}for(l=0;l<n.length;){s=n[l];for(f in s){u=e[ga(f)],u._matchGroup&&Object.keys(u._matchGroup).length===Object.keys(s).length&&(n.splice(l,1),l--);break}l++}p(n,"_constraintGroup");var b=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],w=!1,m=!1;function y(){h=u[d],d==="rangebreaks"&&(m=u._hasDayOfWeekBreaks)}for(l=0;l<o.length;l++){s=o[l];for(var x=0;x<b.length;x++){d=b[x],h=null;var T;for(f in s)if(c=ga(f),v=t[c],u=e[c],d in u){if(!u.matches&&(T=u,d in v)){y();break}h===null&&d in v&&y()}if(d==="range"&&h&&(w=!0),d==="autorange"&&h===null&&w&&(h=!1),h===null&&d in T&&(h=T[d]),h!==null)for(f in s)u=e[ga(f)],u[d]=d==="range"?h.slice():h,d==="rangebreaks"&&(u._hasDayOfWeekBreaks=m,t5(u,e))}}};function i5(t,e,r){var a=r.axIds,i=r.layoutOut,n=r.hasImage,o=i._axisConstraintGroups,l=i._axisMatchGroups,s=e._id,f=s.charAt(0),c=((i._splomAxes||{})[f]||{})[s]||{},v=e._id,u=v.charAt(0)==="x";e._matchGroup=null,e._constraintGroup=null;function d(M,D){return Ui.coerce(t,e,e5,M,D)}d("constrain",n?"domain":"range"),Ui.coerce(t,e,{constraintoward:{valType:"enumerated",values:u?["left","center","right"]:["bottom","middle","top"],dflt:u?"center":"middle"}},"constraintoward");var h=e.type,p,g,_=[];for(p=0;p<a.length;p++)if(g=a[p],g!==v){var b=i[ga(g)];b.type===h&&_.push(g)}var w=__(o,v);if(w){var m=[];for(p=0;p<_.length;p++)g=_[p],w[g]||m.push(g);_=m}var y=_.length,x,T;y&&(t.matches||c.matches)&&(x=Ui.coerce(t,e,{matches:{valType:"enumerated",values:_,dflt:_.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var k=n&&!u?e.anchor:void 0;if(y&&!x&&(t.scaleanchor||k)&&(T=Ui.coerce(t,e,{scaleanchor:{valType:"enumerated",values:_}},"scaleanchor",k)),x){e._matchGroup=hu(l,v,x,1);var S=i[ga(x)],A=sy(i,e)/sy(i,S);u!==(x.charAt(0)==="x")&&(A=(u?"x":"y")+A),hu(o,v,x,A)}else t.matches&&a.indexOf(t.matches)!==-1&&Ui.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(T){var E=d("scaleratio");E||(E=e.scaleratio=1),hu(o,v,T,E)}else t.scaleanchor&&a.indexOf(t.scaleanchor)!==-1&&Ui.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 sy(t,e){var r=e.domain;return r||(r=t[ga(e.overlaying)].domain),r[1]-r[0]}function __(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function hu(t,e,r,a){var i,n,o,l,s,f=__(t,e);f===null?(f={},f[e]=1,s=t.length,t.push(f)):s=t.indexOf(f);var c=Object.keys(f);for(i=0;i<t.length;i++)if(o=t[i],i!==s&&o[r]){var v=o[r];for(n=0;n<c.length;n++)l=c[n],o[l]=pu(v,pu(a,f[l]));t.splice(s,1);return}if(a!==1)for(n=0;n<c.length;n++){var u=c[n];f[u]=pu(a,f[u])}f[r]=1}function pu(t,e){var r="",a="",i,n;typeof t=="string"&&(r=t.match(/^[xy]*/)[0],i=r.length,t=+t.substr(i)),typeof e=="string"&&(a=e.match(/^[xy]*/)[0],n=a.length,e=+e.substr(n));var o=t*e;return!i&&!n?o:!i||!n||r.charAt(0)===a.charAt(0)?r+a+t*e:i===n?o:(i>n?r.substr(n):a.substr(i))+o}function n5(t,e){for(var r=e._size,a=r.h/r.w,i={},n=Object.keys(t),o=0;o<n.length;o++){var l=n[o],s=t[l];if(typeof s=="string"){var f=s.match(/^[xy]*/)[0],c=f.length;s=+s.substr(c);for(var v=f.charAt(0)==="y"?a:1/a,u=0;u<c;u++)s*=v}i[l]=s}return i}ii.enforce=function(e){var r=e._fullLayout,a=r._axisConstraintGroups||[],i,n,o,l,s,f,c,v;for(i=0;i<a.length;i++){o=n5(a[i],r);var u=Object.keys(o),d=1/0,h=0,p=1/0,g={},_={},b=!1;for(n=0;n<u.length;n++)l=u[n],_[l]=s=r[ga(l)],s._inputDomain?s.domain=s._inputDomain.slice():s._inputDomain=s.domain.slice(),s._inputRange||(s._inputRange=s.range.slice()),s.setScale(),g[l]=f=Math.abs(s._m)/o[l],d=Math.min(d,f),(s.constrain==="domain"||!s._constraintShrinkable)&&(p=Math.min(p,f)),delete s._constraintShrinkable,h=Math.max(h,f),s.constrain==="domain"&&(b=!0);if(!(d>r5*h&&!b)){for(n=0;n<u.length;n++)if(l=u[n],f=g[l],s=_[l],c=s.constrain,f!==p||c==="domain")if(v=f/p,c==="range")ly(s,v);else{var w=s._inputDomain,m=(s.domain[1]-s.domain[0])/(w[1]-w[0]),y=(s.r2l(s.range[1])-s.r2l(s.range[0]))/(s.r2l(s._inputRange[1])-s.r2l(s._inputRange[0]));if(v/=m,v*y<1){s.domain=s._input.domain=w.slice(),ly(s,v);continue}if(y<1&&(s.range=s._input.range=s._inputRange.slice(),v*=y),s.autorange){var x=s.r2l(s.range[0]),T=s.r2l(s.range[1]),k=(x+T)/2,S=k,A=k,E=Math.abs(T-k),M=k-E*v*1.0001,D=k+E*v*1.0001,$=du.makePadFn(r,s,0),I=du.makePadFn(r,s,1);fy(s,v);var P=Math.abs(s._m),R=du.concatExtremes(e,s),L=R.min,C=R.max,z,F;for(F=0;F<L.length;F++)z=L[F].val-$(L[F])/P,z>M&&z<S&&(S=z);for(F=0;F<C.length;F++)z=C[F].val+I(C[F])/P,z<D&&z>A&&(A=z);var H=(A-S)/(2*E);v/=H,S=s.l2r(S),A=s.l2r(A),s.range=s._input.range=x<T?[S,A]:[A,S]}fy(s,v)}}}};ii.getAxisGroup=function(e,r){for(var a=e._axisMatchGroups,i=0;i<a.length;i++){var n=a[i];if(n[r])return"g"+i}return r};ii.clean=function(e,r){if(r._inputDomain){for(var a=!1,i=r._id,n=e._fullLayout._axisConstraintGroups,o=0;o<n.length;o++)if(n[o][i]){a=!0;break}(!a||r.constrain!=="domain")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function fy(t,e){var r=t._inputDomain,a=a5[t.constraintoward],i=r[0]+(r[1]-r[0])*a;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}(function(t){var e=ct.exports,r=We,a=ar.exports,i=me.exports,n=mh,o=ft.exports,l=Pt.exports,s=ec,f=b_,c=jt.exports,v=Vr,u=ii,d=u.enforce,h=u.clean,p=Fl.doAutoRange,g="start",_="middle",b="end";t.layoutStyles=function(M){return i.syncOrAsync([a.doAutoMargin,m],M)};function w(M,D,$){for(var I=0;I<$.length;I++){var P=$[I][0],R=$[I][1];if(!(P[0]>=M[1]||P[1]<=M[0])&&R[0]<D[1]&&R[1]>D[0])return!0}return!1}function m(M){var D=M._fullLayout,$=D._size,I=$.p,P=c.list(M,"",!0),R,L,C,z,F,H;if(D._paperdiv.style({width:M._context.responsive&&D.autosize&&!M._context._hasZeroWidth&&!M.layout.width?"100%":D.width+"px",height:M._context.responsive&&D.autosize&&!M._context._hasZeroHeight&&!M.layout.height?"100%":D.height+"px"}).selectAll(".main-svg").call(l.setSize,D.width,D.height),M._context.setBackground(M,D.paper_bgcolor),t.drawMainTitle(M),f.manage(M),!D._has("cartesian"))return a.previousPromises(M);function B(Ue,Xe,St){var ht=Ue._lw/2;if(Ue._id.charAt(0)==="x"){if(Xe){if(St==="top")return Xe._offset-I-ht}else return $.t+$.h*(1-(Ue.position||0))+ht%1;return Xe._offset+Xe._length+I+ht}if(Xe){if(St==="right")return Xe._offset+Xe._length+I+ht}else return $.l+$.w*(Ue.position||0)+ht%1;return Xe._offset-I-ht}for(R=0;R<P.length;R++){z=P[R];var O=z._anchorAxis;z._linepositions={},z._lw=l.crispRound(M,z.linewidth,1),z._mainLinePosition=B(z,O,z.side),z._mainMirrorPosition=z.mirror&&O?B(z,O,v.OPPOSITE_SIDE[z.side]):null}var W=[],j=[],Z=[],K=o.opacity(D.paper_bgcolor)===1&&o.opacity(D.plot_bgcolor)===1&&D.paper_bgcolor===D.plot_bgcolor;for(L in D._plots)if(C=D._plots[L],C.mainplot)C.bg&&C.bg.remove(),C.bg=void 0;else{var Q=C.xaxis.domain,ee=C.yaxis.domain,ne=C.plotgroup;if(w(Q,ee,Z)){var le=ne.node(),se=C.bg=i.ensureSingle(ne,"rect","bg");le.insertBefore(se.node(),le.childNodes[0]),j.push(L)}else ne.select("rect.bg").remove(),Z.push([Q,ee]),K||(W.push(L),j.push(L))}var oe=D._bgLayer.selectAll(".bg").data(W);for(oe.enter().append("rect").classed("bg",!0),oe.exit().remove(),oe.each(function(Ue){D._plots[Ue].bg=e.select(this)}),R=0;R<j.length;R++)C=D._plots[j[R]],F=C.xaxis,H=C.yaxis,C.bg&&F._offset!==void 0&&H._offset!==void 0&&C.bg.call(l.setRect,F._offset-I,H._offset-I,F._length+2*I,H._length+2*I).call(o.fill,D.plot_bgcolor).style("stroke-width",0);if(!D._hasOnlyLargeSploms)for(L in D._plots){C=D._plots[L],F=C.xaxis,H=C.yaxis;var V=C.clipId="clip"+D._uid+L+"plot",ie=i.ensureSingleById(D._clips,"clipPath",V,function(Ue){Ue.classed("plotclip",!0).append("rect")});C.clipRect=ie.select("rect").attr({width:F._length,height:H._length}),l.setTranslate(C.plot,F._offset,H._offset);var ge,de;C._hasClipOnAxisFalse?(ge=null,de=V):(ge=V,de=null),l.setClipUrl(C.plot,ge,M),C.layerClipId=de}var ke,ue,Y,fe,Ae,be,Ce,Me,Te,X,pe,ce,he;function De(Ue){return"M"+ke+","+Ue+"H"+ue}function je(Ue){return"M"+F._offset+","+Ue+"h"+F._length}function $e(Ue){return"M"+Ue+","+Me+"V"+Ce}function Se(Ue){return"M"+Ue+","+H._offset+"v"+H._length}function Ge(Ue,Xe,St){if(!Ue.showline||L!==Ue._mainSubplot)return"";if(!Ue._anchorAxis)return St(Ue._mainLinePosition);var ht=Xe(Ue._mainLinePosition);return Ue.mirror&&(ht+=Xe(Ue._mainMirrorPosition)),ht}for(L in D._plots){C=D._plots[L],F=C.xaxis,H=C.yaxis;var Pe="M0,0";y(F,L)&&(Ae=T(F,"left",H,P),ke=F._offset-(Ae?I+Ae:0),be=T(F,"right",H,P),ue=F._offset+F._length+(be?I+be:0),Y=B(F,H,"bottom"),fe=B(F,H,"top"),he=!F._anchorAxis||L!==F._mainSubplot,he&&(F.mirror==="allticks"||F.mirror==="all")&&(F._linepositions[L]=[Y,fe]),Pe=Ge(F,De,je),he&&F.showline&&(F.mirror==="all"||F.mirror==="allticks")&&(Pe+=De(Y)+De(fe)),C.xlines.style("stroke-width",F._lw+"px").call(o.stroke,F.showline?F.linecolor:"rgba(0,0,0,0)")),C.xlines.attr("d",Pe);var Ie="M0,0";y(H,L)&&(pe=T(H,"bottom",F,P),Ce=H._offset+H._length+(pe?I:0),ce=T(H,"top",F,P),Me=H._offset-(ce?I:0),Te=B(H,F,"left"),X=B(H,F,"right"),he=!H._anchorAxis||L!==H._mainSubplot,he&&(H.mirror==="allticks"||H.mirror==="all")&&(H._linepositions[L]=[Te,X]),Ie=Ge(H,$e,Se),he&&H.showline&&(H.mirror==="all"||H.mirror==="allticks")&&(Ie+=$e(Te)+$e(X)),C.ylines.style("stroke-width",H._lw+"px").call(o.stroke,H.showline?H.linecolor:"rgba(0,0,0,0)")),C.ylines.attr("d",Ie)}return c.makeClipPaths(M),a.previousPromises(M)}function y(M,D){return(M.ticks||M.showline)&&(D===M._mainSubplot||M.mirror==="all"||M.mirror==="allticks")}function x(M,D,$){if(!$.showline||!$._lw)return!1;if($.mirror==="all"||$.mirror==="allticks")return!0;var I=$._anchorAxis;if(!I)return!1;var P=v.FROM_BL[D];return $.side===D?I.domain[P]===M.domain[P]:$.mirror&&I.domain[1-P]===M.domain[1-P]}function T(M,D,$,I){if(x(M,D,$))return $._lw;for(var P=0;P<I.length;P++){var R=I[P];if(R._mainAxis===$._mainAxis&&x(M,D,R))return R._lw}return 0}t.drawMainTitle=function(M){var D=M._fullLayout,$=A(D),I=E(D);s.draw(M,"gtitle",{propContainer:D,propName:"title.text",placeholder:D._dfltTitle.plot,attributes:{x:k(D,$),y:S(D,I),"text-anchor":$,dy:I}})};function k(M,D){var $=M.title,I=M._size,P=0;switch(D===g?P=$.pad.l:D===b&&(P=-$.pad.r),$.xref){case"paper":return I.l+I.w*$.x+P;case"container":default:return M.width*$.x+P}}function S(M,D){var $=M.title,I=M._size,P=0;if(D==="0em"||!D?P=-$.pad.b:D===v.CAP_SHIFT+"em"&&(P=$.pad.t),$.y==="auto")return I.t/2;switch($.yref){case"paper":return I.t+I.h-I.h*$.y+P;case"container":default:return M.height-M.height*$.y+P}}function A(M){var D=M.title,$=_;return i.isRightAnchor(D)?$=b:i.isLeftAnchor(D)&&($=g),$}function E(M){var D=M.title,$="0em";return i.isTopAnchor(D)?$=v.CAP_SHIFT+"em":i.isMiddleAnchor(D)&&($=v.MID_SHIFT+"em"),$}t.doTraceStyle=function(M){var D=M.calcdata,$=[],I;for(I=0;I<D.length;I++){var P=D[I],R=P[0]||{},L=R.trace||{},C=L._module||{},z=C.arraysToCalcdata;z&&z(P,L);var F=C.editStyle;F&&$.push({fn:F,cd0:R})}if($.length){for(I=0;I<$.length;I++){var H=$[I];H.fn(M,H.cd0)}n(M),t.redrawReglTraces(M)}return a.style(M),r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doColorBars=function(M){return r.getComponentMethod("colorbar","draw")(M),a.previousPromises(M)},t.layoutReplot=function(M){var D=M.layout;return M.layout=void 0,r.call("_doPlot",M,"",D)},t.doLegend=function(M){return r.getComponentMethod("legend","draw")(M),a.previousPromises(M)},t.doTicksRelayout=function(M){return c.draw(M,"redraw"),M._fullLayout._hasOnlyLargeSploms&&(r.subplotsRegistry.splom.updateGrid(M),n(M),t.redrawReglTraces(M)),t.drawMainTitle(M),a.previousPromises(M)},t.doModeBar=function(M){var D=M._fullLayout;f.manage(M);for(var $=0;$<D._basePlotModules.length;$++){var I=D._basePlotModules[$].updateFx;I&&I(M)}return a.previousPromises(M)},t.doCamera=function(M){for(var D=M._fullLayout,$=D._subplots.gl3d,I=0;I<$.length;I++){var P=D[$[I]],R=P._scene;R.setViewport(P)}},t.drawData=function(M){var D=M._fullLayout;n(M);for(var $=D._basePlotModules,I=0;I<$.length;I++)$[I].plot(M);return t.redrawReglTraces(M),a.style(M),r.getComponentMethod("shapes","draw")(M),r.getComponentMethod("annotations","draw")(M),r.getComponentMethod("images","draw")(M),D._replotting=!1,a.previousPromises(M)},t.redrawReglTraces=function(M){var D=M._fullLayout;if(D._has("regl")){var $=M._fullData,I=[],P=[],R,L;for(D._hasOnlyLargeSploms&&D._splomGrid.draw(),R=0;R<$.length;R++){var C=$[R];C.visible===!0&&C._length!==0&&(C.type==="splom"?D._splomScenes[C.uid].draw():C.type==="scattergl"?i.pushUnique(I,C.xaxis+C.yaxis):C.type==="scatterpolargl"&&i.pushUnique(P,C.subplot))}for(R=0;R<I.length;R++)L=D._plots[I[R]],L._scene&&L._scene.draw();for(R=0;R<P.length;R++)L=D[P[R]]._subplot,L._scene&&L._scene.draw()}},t.doAutoRangeAndConstraints=function(M){for(var D=c.list(M,"",!0),$,I={},P=0;P<D.length;P++)if($=D[P],!I[$._id]){I[$._id]=1,h(M,$),p(M,$);var R=$._matchGroup;if(R)for(var L in R){var C=c.getFromId(M,L);p(M,C,$.range),I[L]=1}}d(M)},t.finalDraw=function(M){r.getComponentMethod("rangeslider","draw")(M),r.getComponentMethod("rangeselector","draw")(M)},t.drawMarginPushers=function(M){r.getComponentMethod("legend","draw")(M),r.getComponentMethod("rangeselector","draw")(M),r.getComponentMethod("sliders","draw")(M),r.getComponentMethod("updatemenus","draw")(M),r.getComponentMethod("colorbar","draw")(M)}})(oc);var Dh={exports:{}},mu=Vf.dot,bs=Jt.BADNUM,xf=Dh.exports={};xf.tester=function(e){var r=e.slice(),a=r[0][0],i=a,n=r[0][1],o=n,l;for(r.push(r[0]),l=1;l<r.length;l++)a=Math.min(a,r[l][0]),i=Math.max(i,r[l][0]),n=Math.min(n,r[l][1]),o=Math.max(o,r[l][1]);var s=!1,f;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(s=!0,f=function(h){return h[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(s=!0,f=function(h){return h[1]===r[0][1]}));function c(h,p){var g=h[0],_=h[1];return!(g===bs||g<a||g>i||_===bs||_<n||_>o||p&&f(h))}function v(h,p){var g=h[0],_=h[1];if(g===bs||g<a||g>i||_===bs||_<n||_>o)return!1;var b=r.length,w=r[0][0],m=r[0][1],y=0,x,T,k,S,A;for(x=1;x<b;x++)if(T=w,k=m,w=r[x][0],m=r[x][1],S=Math.min(T,w),!(g<S||g>Math.max(T,w)||_>Math.max(k,m)))if(_<Math.min(k,m))g!==S&&y++;else{if(w===T?A=_:A=k+(g-T)*(m-k)/(w-T),_===A)return!(x===1&&p);_<=A&&g!==S&&y++}return y%2===1}var u=!0,d=r[0];for(l=1;l<r.length;l++)if(d[0]!==r[l][0]||d[1]!==r[l][1]){u=!1;break}return{xmin:a,xmax:i,ymin:n,ymax:o,pts:r,contains:s?c:v,isRect:s,degenerate:u}};xf.isSegmentBent=function(e,r,a,i){var n=e[r],o=[e[a][0]-n[0],e[a][1]-n[1]],l=mu(o,o),s=Math.sqrt(l),f=[-o[1]/s,o[0]/s],c,v,u;for(c=r+1;c<a;c++)if(v=[e[c][0]-n[0],e[c][1]-n[1]],u=mu(v,o),u<0||u>l||Math.abs(mu(v,f))>i)return!0;return!1};xf.filter=function(e,r){var a=[e[0]],i=0,n=0;function o(s){e.push(s);var f=a.length,c=i;a.splice(n+1);for(var v=c+1;v<e.length;v++)(v===e.length-1||xf.isSegmentBent(e,c,v+1,r))&&(a.push(e[v]),a.length<f-2&&(i=v,n=a.length-1),c=v)}if(e.length>1){var l=e.pop();o(l)}return{addPt:o,raw:e,filtered:a}};var cy=G2,w_=We,o5=Pt.exports.dashStyle,uy=ft.exports,l5=Ma,s5=ua.makeEventData,Ol=_o,f5=Ol.freeMode,c5=Ol.rectMode,_f=Ol.drawMode,Eh=Ol.openMode,u5=Ol.selectMode,T_=t_,yu=Hl.handleEllipse,v5=e_,gu=me.exports,$h=Dh.exports,Io=Yf,vy=ir.getFromId,d5=mh,h5=oc.redrawReglTraces,Ys=$r,Ra=Ys.MINSELECT,p5=$h.filter,m5=$h.tester,k_=zl.clearSelect,Rh=xh,dy=Rh.p2r,y5=Rh.axValue,g5=Rh.getTransform;function b5(t,e,r,a,i){var n=f5(i),o=c5(i),l=Eh(i),s=_f(i),f=u5(i),c=i==="drawline",v=i==="drawcircle",u=c||v,d=a.gd,h=d._fullLayout,p=h._zoomlayer,g=a.element.getBoundingClientRect(),_=a.plotinfo,b=g5(_),w=e-g.left,m=r-g.top;h._calcInverseTransform(d);var y=gu.apply3DTransform(h._invTransform)(w,m);w=y[0],m=y[1];var x=h._invScaleX,T=h._invScaleY,k=w,S=m,A="M"+w+","+m,E=a.xaxes[0]._length,M=a.yaxes[0]._length,D=a.xaxes.concat(a.yaxes),$=t.altKey&&!(_f(i)&&l),I,P,R,L,C,z,F;S_(t,d,a),n&&(I=p5([[w,m]],Ys.BENDPX));var H=p.selectAll("path.select-outline-"+_.id).data(s?[0]:[1,2]),B=h.newshape;H.enter().append("path").attr("class",function(ee){return"select-outline select-outline-"+ee+" select-outline-"+_.id}).style(s?{opacity:B.opacity/2,fill:l?void 0:B.fillcolor,stroke:B.line.color,"stroke-dasharray":o5(B.line.dash,B.line.width),"stroke-width":B.line.width+"px"}:{}).attr("fill-rule",B.fillrule).classed("cursor-move",!!s).attr("transform",b).attr("d",A+"Z");var O=p.append("path").attr("class","zoombox-corners").style({fill:uy.background,stroke:uy.defaultLine,"stroke-width":1}).attr("transform",b).attr("d","M0,0Z"),W=h._uid+Ys.SELECTID,j=[],Z=L_(d,a.xaxes,a.yaxes,a.subplot);function K(ee,ne){return ee-ne}var Q;_.fillRangeItems?Q=_.fillRangeItems:o?Q=function(ee,ne){var le=ee.range={};for(C=0;C<D.length;C++){var se=D[C],oe=se._id.charAt(0);le[se._id]=[dy(se,ne[oe+"min"]),dy(se,ne[oe+"max"])].sort(K)}}:Q=function(ee,ne,le){var se=ee.lassoPoints={};for(C=0;C<D.length;C++){var oe=D[C];se[oe._id]=le.filtered.map(y5(oe))}},a.moveFn=function(ee,ne){k=Math.max(0,Math.min(E,x*ee+w)),S=Math.max(0,Math.min(M,T*ne+m));var le=Math.abs(k-w),se=Math.abs(S-m);if(o){var oe,V,ie;if(f){var ge=h.selectdirection;switch(ge==="any"?se<Math.min(le*.6,Ra)?oe="h":le<Math.min(se*.6,Ra)?oe="v":oe="d":oe=ge,oe){case"h":V=v?M/2:0,ie=M;break;case"v":V=v?E/2:0,ie=E;break}}if(s)switch(h.newshape.drawdirection){case"vertical":oe="h",V=v?M/2:0,ie=M;break;case"horizontal":oe="v",V=v?E/2:0,ie=E;break;case"ortho":le<se?(oe="h",V=m,ie=S):(oe="v",V=w,ie=k);break;default:oe="d"}oe==="h"?(L=u?yu(v,[k,V],[k,ie]):[[w,V],[w,ie],[k,ie],[k,V]],L.xmin=u?k:Math.min(w,k),L.xmax=u?k:Math.max(w,k),L.ymin=Math.min(V,ie),L.ymax=Math.max(V,ie),O.attr("d","M"+L.xmin+","+(m-Ra)+"h-4v"+2*Ra+"h4ZM"+(L.xmax-1)+","+(m-Ra)+"h4v"+2*Ra+"h-4Z")):oe==="v"?(L=u?yu(v,[V,S],[ie,S]):[[V,m],[V,S],[ie,S],[ie,m]],L.xmin=Math.min(V,ie),L.xmax=Math.max(V,ie),L.ymin=u?S:Math.min(m,S),L.ymax=u?S:Math.max(m,S),O.attr("d","M"+(w-Ra)+","+L.ymin+"v-4h"+2*Ra+"v4ZM"+(w-Ra)+","+(L.ymax-1)+"v4h"+2*Ra+"v-4Z")):oe==="d"&&(L=u?yu(v,[w,m],[k,S]):[[w,m],[w,S],[k,S],[k,m]],L.xmin=Math.min(w,k),L.xmax=Math.max(w,k),L.ymin=Math.min(m,S),L.ymax=Math.max(m,S),O.attr("d","M0,0Z"))}else n&&(I.addPt([k,S]),L=I.filtered);a.selectionDefs&&a.selectionDefs.length?(R=M5(a.mergedPolygons,L,$),L.subtract=$,P=M_(a.selectionDefs.concat([L]))):(R=[L],P=m5(L)),T_(D_(R,l),H,a),f&&Io.throttle(W,Ys.SELECTDELAY,function(){j=[];var de,ke;for(C=0;C<Z.length;C++)if(z=Z[C],ke=z._module.selectPoints(z,P),de=C_(ke,z),j.length)for(var ue=0;ue<de.length;ue++)j.push(de[ue]);else j=de;F={points:j},wf(d,Z,F),Q(F,L,I),a.gd.emit("plotly_selecting",F)})},a.clickFn=function(ee,ne){if(O.remove(),d._fullLayout._activeShapeIndex>=0){d._fullLayout._deactivateShape(d);return}if(!s){var le=h.clickmode;Io.done(W).then(function(){if(Io.clear(W),ee===2){for(H.remove(),C=0;C<Z.length;C++)z=Z[C],z._module.selectPoints(z,!1);wf(d,Z),bl(a),d.emit("plotly_deselect",null)}else le.indexOf("select")>-1&&A_(ne,d,a.xaxes,a.yaxes,a.subplot,a,H),le==="event"&&d.emit("plotly_selected",void 0);l5.click(d,ne)}).catch(gu.error)}},a.doneFn=function(){O.remove(),Io.done(W).then(function(){Io.clear(W),a.gd.emit("plotly_selected",F),L&&a.selectionDefs&&(L.subtract=$,a.selectionDefs.push(L),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,R)),a.doneFnCompleted&&a.doneFnCompleted(j)}).catch(gu.error),s&&bl(a)}}function A_(t,e,r,a,i,n,o){var l=e._hoverdata,s=e._fullLayout,f=s.clickmode,c=f.indexOf("event")>-1,v=[],u,d,h,p,g,_,b,w,m,y;if(w5(l)){S_(t,e,n),u=L_(e,r,a,i);var x=T5(l,u),T=x.pointNumbers.length>0;if(T?k5(u,x):A5(u)&&(b=hy(x))){for(o&&o.remove(),y=0;y<u.length;y++)d=u[y],d._module.selectPoints(d,!1);wf(e,u),bl(n),c&&e.emit("plotly_deselect",null)}else{w=t.shiftKey&&(b!==void 0?b:hy(x)),h=x5(x.pointNumber,x.searchInfo,w);var k=n.selectionDefs.concat([h]);for(p=M_(k),y=0;y<u.length;y++)if(g=u[y]._module.selectPoints(u[y],p),_=C_(g,u[y]),v.length)for(var S=0;S<_.length;S++)v.push(_[S]);else v=_;if(m={points:v},wf(e,u,m),h&&n&&n.selectionDefs.push(h),o){var A=n.mergedPolygons,E=Eh(n.dragmode);T_(D_(A,E),o,n)}c&&e.emit("plotly_selected",m)}}}function x5(t,e,r){return{pointNumber:t,searchInfo:e,subtract:r}}function bu(t){return"pointNumber"in t&&"searchInfo"in t}function _5(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,a,i){var n=t.searchInfo.cd[0].trace._expandedIndex,o=i.cd[0].trace._expandedIndex;return o===n&&a===t.pointNumber},isRect:!1,degenerate:!1,subtract:t.subtract}}function M_(t){for(var e=[],r=bu(t[0])?0:t[0][0][0],a=r,i=bu(t[0])?0:t[0][0][1],n=i,o=0;o<t.length;o++)if(bu(t[o]))e.push(_5(t[o]));else{var l=$h.tester(t[o]);l.subtract=t[o].subtract,e.push(l),r=Math.min(r,l.xmin),a=Math.max(a,l.xmax),i=Math.min(i,l.ymin),n=Math.max(n,l.ymax)}function s(f,c,v,u){for(var d=!1,h=0;h<e.length;h++)e[h].contains(f,c,v,u)&&(d=e[h].subtract===!1);return d}return{xmin:r,xmax:a,ymin:i,ymax:n,pts:[],contains:s,isRect:!1,degenerate:!1}}function S_(t,e,r){e._fullLayout._drawing=!1;var a=e._fullLayout,i=r.plotinfo,n=r.dragmode,o=a._lastSelectedSubplot&&a._lastSelectedSubplot===i.id,l=(t.shiftKey||t.altKey)&&!(_f(n)&&Eh(n));o&&l&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):(!l||!i.selection)&&bl(r),o||(k_(e),a._lastSelectedSubplot=i.id)}function bl(t){var e=t.dragmode,r=t.plotinfo,a=t.gd;if(a._fullLayout._activeShapeIndex>=0&&a._fullLayout._deactivateShape(a),_f(e)){var i=a._fullLayout,n=i._zoomlayer,o=n.selectAll(".select-outline-"+r.id);if(o&&a._fullLayout._drawing){var l=v5(o,t);l&&w_.call("_guiRelayout",a,{shapes:l}),a._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function L_(t,e,r,a){var i=[],n=e.map(function(d){return d._id}),o=r.map(function(d){return d._id}),l,s,f;for(f=0;f<t.calcdata.length;f++)if(l=t.calcdata[f],s=l[0].trace,!(s.visible!==!0||!s._module||!s._module.selectPoints))if(a&&(s.subplot===a||s.geo===a))i.push(u(s._module,l,e[0],r[0]));else if(s.type==="splom"&&s._xaxes[n[0]]&&s._yaxes[o[0]]){var c=u(s._module,l,e[0],r[0]);c.scene=t._fullLayout._splomScenes[s.uid],i.push(c)}else if(s.type==="sankey"){var v=u(s._module,l,e[0],r[0]);i.push(v)}else{if(n.indexOf(s.xaxis)===-1||o.indexOf(s.yaxis)===-1)continue;i.push(u(s._module,l,vy(t,s.xaxis),vy(t,s.yaxis)))}return i;function u(d,h,p,g){return{_module:d,cd:h,xaxis:p,yaxis:g}}}function w5(t){return t&&Array.isArray(t)&&t[0].hoverOnBox!==!0}function T5(t,e){var r=t[0],a=-1,i=[],n,o;for(o=0;o<e.length;o++)if(n=e[o],r.fullData._expandedIndex===n.cd[0].trace._expandedIndex){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?a=r.pointNumber:r.binNumber!==void 0&&(a=r.binNumber,i=r.pointNumbers);break}return{pointNumber:a,pointNumbers:i,searchInfo:n}}function hy(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,a=t.pointNumbers,i=a.length>0,n=i?a[0]:r;return e.selectedpoints?e.selectedpoints.indexOf(n)>-1:!1}function k5(t,e){var r=[],a,i,n,o;for(o=0;o<t.length;o++)a=t[o],a.cd[0].trace.selectedpoints&&a.cd[0].trace.selectedpoints.length>0&&r.push(a);if(r.length===1&&(n=r[0]===e.searchInfo,n&&(i=e.searchInfo.cd[0].trace,i.selectedpoints.length===e.pointNumbers.length))){for(o=0;o<e.pointNumbers.length;o++)if(i.selectedpoints.indexOf(e.pointNumbers[o])<0)return!1;return!0}return!1}function A5(t){var e=0,r,a,i;for(i=0;i<t.length;i++)if(r=t[i],a=r.cd[0].trace,a.selectedpoints&&(a.selectedpoints.length>1||(e+=a.selectedpoints.length,e>1)))return!1;return e===1}function wf(t,e,r){var a,i,n,o;for(a=0;a<e.length;a++){var l=e[a].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[l.uid]||{};s.selectedpoints===void 0&&(s.selectedpoints=l._input.selectedpoints||null)}if(r){var f=r.points||[];for(a=0;a<e.length;a++)o=e[a].cd[0].trace,o._input.selectedpoints=o._fullInput.selectedpoints=[],o._fullInput!==o&&(o.selectedpoints=[]);for(a=0;a<f.length;a++){var c=f[a],v=c.data,u=c.fullData;c.pointIndices?([].push.apply(v.selectedpoints,c.pointIndices),o._fullInput!==o&&[].push.apply(u.selectedpoints,c.pointIndices)):(v.selectedpoints.push(c.pointIndex),o._fullInput!==o&&u.selectedpoints.push(c.pointIndex))}}else for(a=0;a<e.length;a++)o=e[a].cd[0].trace,delete o.selectedpoints,delete o._input.selectedpoints,o._fullInput!==o&&delete o._fullInput.selectedpoints;var d=!1;for(a=0;a<e.length;a++){i=e[a],n=i.cd,o=n[0].trace,w_.traceIs(o,"regl")&&(d=!0);var h=i._module,p=h.styleOnSelect||h.style;p&&(p(t,n,n[0].node3),n[0].nodeRangePlot3&&p(t,n,n[0].nodeRangePlot3))}d&&(d5(t),h5(t))}function M5(t,e,r){var a;return r?(a=cy.difference({regions:t,inverted:!1},{regions:[e],inverted:!1}),a.regions):(a=cy.union({regions:t,inverted:!1},{regions:[e],inverted:!1}),a.regions)}function C_(t,e){if(Array.isArray(t))for(var r=e.cd,a=e.cd[0].trace,i=0;i<t.length;i++)t[i]=s5(t[i],a,r);return t}function D_(t,e){for(var r=[],a=0;a<t.length;a++){r[a]=[];for(var i=0;i<t[a].length;i++){r[a][i]=[],r[a][i][0]=i?"L":"M";for(var n=0;n<t[a][i].length;n++)r[a][i].push(t[a][i][n])}e||r[a].push(["Z",r[a][0][1],r[a][0][2]])}return r}var Ws={prepSelect:b5,clearSelect:k_,clearSelectionsCache:bl,selectOnClick:A_},xu,py;function S5(){if(py)return xu;py=1;var t=ct.exports,e=me.exports,r=e.numberFormat,a=ca.exports,i=Ub,n=We,o=e.strTranslate,l=xr,s=ft.exports,f=Pt.exports,c=Ma,v=jt.exports,u=Di,d=Ca.exports,h=_o,p=h.selectingOrDrawing,g=h.freeMode,_=Vr.FROM_TL,b=mh,w=oc.redrawReglTraces,m=ar.exports,y=ir.getFromId,x=Ws.prepSelect,T=Ws.clearSelect,k=Ws.selectOnClick,S=x_,A=$r,E=A.MINDRAG,M=A.MINZOOM,D=!0;function $(V,ie,ge,de,ke,ue,Y,fe){var Ae=V._fullLayout._zoomlayer,be=Y+fe==="nsew",Ce=(Y+fe).length===1,Me,Te,X,pe,ce,he,De,je,$e,Se,Ge,Pe,Ie,Ue,Xe,St,ht,Ft,ut,_t,N,U,G;function q(){if(Me=ie.xaxis,Te=ie.yaxis,$e=Me._length,Se=Te._length,De=Me._offset,je=Te._offset,X={},X[Me._id]=Me,pe={},pe[Te._id]=Te,Y&&fe)for(var He=ie.overlays,ze=0;ze<He.length;ze++){var Qe=He[ze].xaxis;X[Qe._id]=Qe;var Je=He[ze].yaxis;pe[Je._id]=Je}ce=oe(X),he=oe(pe),Ie=R(ce,fe),Ue=R(he,Y),Xe=!Ue&&!Ie,Pe=le(V,V._fullLayout._axisMatchGroups,X,pe),Ge=le(V,V._fullLayout._axisConstraintGroups,X,pe,Pe);var Oe=Ge.isSubplotConstrained||Pe.isSubplotConstrained;St=fe||Oe,ht=Y||Oe;var Ze=V._fullLayout;Ft=Ze._has("scattergl"),ut=Ze._has("splom"),_t=Ze._has("svg")}q();var ae=H(Ue+Ie,V._fullLayout.dragmode,be),J=P(ie,Y+fe+"drag",ae,ge,de,ke,ue);if(Xe&&!be)return J.onmousedown=null,J.style.pointerEvents="none",J;var ye={element:J,gd:V,plotinfo:ie};ye.prepFn=function(He,ze,Qe){var Je=ye.dragmode,Oe=V._fullLayout.dragmode;Oe!==Je&&(ye.dragmode=Oe),q(),U=V._fullLayout._invScaleX,G=V._fullLayout._invScaleY,Xe||(be?He.shiftKey?Oe==="pan"?Oe="zoom":p(Oe)||(Oe="pan"):He.ctrlKey&&(Oe="pan"):Oe="pan"),g(Oe)?ye.minDrag=1:ye.minDrag=void 0,p(Oe)?(ye.xaxes=ce,ye.yaxes=he,x(He,ze,Qe,ye,Oe)):(ye.clickFn=ve,p(Je)&&_e(),Xe||(Oe==="zoom"?(ye.moveFn=wt,ye.doneFn=nt,ye.minDrag=1,Ye(He,ze,Qe)):Oe==="pan"&&(ye.moveFn=Be,ye.doneFn=nr))),V._fullLayout._redrag=function(){var Ze=V._dragdata;if(Ze&&Ze.element===J){var yt=V._fullLayout.dragmode;p(yt)||(q(),kr([0,0,$e,Se]),ye.moveFn(Ze.dx,Ze.dy))}}};function _e(){ye.plotinfo.selection=!1,T(V)}function ve(He,ze){var Qe=ye.gd;if(Qe._fullLayout._activeShapeIndex>=0){Qe._fullLayout._deactivateShape(Qe);return}var Je=Qe._fullLayout.clickmode;if(Z(Qe),He===2&&!Ce&&pr(),be)Je.indexOf("select")>-1&&k(ze,Qe,ce,he,ie.id,ye),Je.indexOf("event")>-1&&c.click(Qe,ze,ie.id);else if(He===1&&Ce){var Oe=Y?Te:Me,Ze=Y==="s"||fe==="w"?0:1,yt=Oe._name+".range["+Ze+"]",Dt=L(Oe,Ze),$t="left",vr="middle";if(Oe.fixedrange)return;Y?(vr=Y==="n"?"top":"bottom",Oe.side==="right"&&($t="right")):fe==="e"&&($t="right"),Qe._context.showAxisRangeEntryBoxes&&t.select(J).call(l.makeEditable,{gd:Qe,immediate:!0,background:Qe._fullLayout.paper_bgcolor,text:String(Dt),fill:Oe.tickfont?Oe.tickfont.color:"#444",horizontalAlign:$t,verticalAlign:vr}).on("edit",function(Ot){var bt=Oe.d2r(Ot);bt!==void 0&&n.call("_guiRelayout",Qe,yt,bt)})}}d.init(ye);var re,xe,we,Fe,et,ot,at,qe,kt,it;function Ye(He,ze,Qe){var Je=J.getBoundingClientRect();re=ze-Je.left,xe=Qe-Je.top,V._fullLayout._calcInverseTransform(V);var Oe=e.apply3DTransform(V._fullLayout._invTransform)(re,xe);re=Oe[0],xe=Oe[1],we={l:re,r:re,w:0,t:xe,b:xe,h:0},Fe=V._hmpixcount?V._hmlumcount/V._hmpixcount:a(V._fullLayout.plot_bgcolor).getLuminance(),et="M0,0H"+$e+"V"+Se+"H0V0",ot=!1,at="xy",it=!1,qe=B(Ae,Fe,De,je,et),kt=O(Ae,De,je)}function wt(He,ze){if(V._transitioningWithDuration)return!1;var Qe=Math.max(0,Math.min($e,U*He+re)),Je=Math.max(0,Math.min(Se,G*ze+xe)),Oe=Math.abs(Qe-re),Ze=Math.abs(Je-xe);we.l=Math.min(re,Qe),we.r=Math.max(re,Qe),we.t=Math.min(xe,Je),we.b=Math.max(xe,Je);function yt(){at="",we.r=we.l,we.t=we.b,kt.attr("d","M0,0Z")}if(Ge.isSubplotConstrained)Oe>M||Ze>M?(at="xy",Oe/$e>Ze/Se?(Ze=Oe*Se/$e,xe>Je?we.t=xe-Ze:we.b=xe+Ze):(Oe=Ze*$e/Se,re>Qe?we.l=re-Oe:we.r=re+Oe),kt.attr("d",ne(we))):yt();else if(Pe.isSubplotConstrained)if(Oe>M||Ze>M){at="xy";var Dt=Math.min(we.l/$e,(Se-we.b)/Se),$t=Math.max(we.r/$e,(Se-we.t)/Se);we.l=Dt*$e,we.r=$t*$e,we.b=(1-Dt)*Se,we.t=(1-$t)*Se,kt.attr("d",ne(we))}else yt();else!Ue||Ze<Math.min(Math.max(Oe*.6,E),M)?Oe<E||!Ie?yt():(we.t=0,we.b=Se,at="x",kt.attr("d",Q(we,xe))):!Ie||Oe<Math.min(Ze*.6,M)?(we.l=0,we.r=$e,at="y",kt.attr("d",ee(we,re))):(at="xy",kt.attr("d",ne(we)));we.w=we.r-we.l,we.h=we.b-we.t,at&&(it=!0),V._dragged=it,W(qe,kt,we,et,ot,Fe),mt(),V.emit("plotly_relayouting",N),ot=!0}function mt(){N={},(at==="xy"||at==="x")&&(C(ce,we.l/$e,we.r/$e,N,Ge.xaxes),st("x",N)),(at==="xy"||at==="y")&&(C(he,(Se-we.b)/Se,(Se-we.t)/Se,N,Ge.yaxes),st("y",N))}function nt(){mt(),Z(V),nr(),K(V)}var Ke=[0,0,$e,Se],Ve=null,tt=A.REDRAWDELAY,pt=ie.mainplot?V._fullLayout._plots[ie.mainplot]:ie;function lt(He){if(!V._context._scrollZoom.cartesian&&!V._fullLayout._enablescrollzoom)return;if(_e(),V._transitioningWithDuration){He.preventDefault(),He.stopPropagation();return}q(),clearTimeout(Ve);var ze=-He.deltaY;if(isFinite(ze)||(ze=He.wheelDelta/10),!isFinite(ze)){e.log("Did not find wheel motion attributes: ",He);return}var Qe=Math.exp(-Math.min(Math.max(ze,-20),20)/200),Je=pt.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Oe=(He.clientX-Je.left)/Je.width,Ze=(Je.bottom-He.clientY)/Je.height,yt;function Dt($t,vr,Ot){if($t.fixedrange)return;var bt=e.simpleMap($t.range,$t.r2l),Zt=bt[0]+(bt[1]-bt[0])*vr;function Ar(zt){return $t.l2r(Zt+(zt-Zt)*Ot)}$t.range=bt.map(Ar)}if(St){for(fe||(Oe=.5),yt=0;yt<ce.length;yt++)Dt(ce[yt],Oe,Qe);st("x"),Ke[2]*=Qe,Ke[0]+=Ke[2]*Oe*(1/Qe-1)}if(ht){for(Y||(Ze=.5),yt=0;yt<he.length;yt++)Dt(he[yt],Ze,Qe);st("y"),Ke[3]*=Qe,Ke[1]+=Ke[3]*(1-Ze)*(1/Qe-1)}kr(Ke),Lt(),V.emit("plotly_relayouting",N),Ve=setTimeout(function(){!V._fullLayout||(Ke=[0,0,$e,Se],nr())},tt),He.preventDefault()}Y.length*fe.length!==1&&se(J,lt);function Be(He,ze){if(He=He*U,ze=ze*G,V._transitioningWithDuration)return;if(V._fullLayout._replotting=!0,Ie==="ew"||Ue==="ns"){var Qe=Ie?-He:0,Je=Ue?-ze:0;if(Pe.isSubplotConstrained){if(Ie&&Ue){var Oe=(He/$e-ze/Se)/2;He=Oe*$e,ze=-Oe*Se,Qe=-He,Je=-ze}Ue?Qe=-Je*$e/Se:Je=-Qe*Se/$e}Ie&&(z(ce,He),st("x")),Ue&&(z(he,ze),st("y")),kr([Qe,Je,$e,Se]),Lt(),V.emit("plotly_relayouting",N);return}function Ze(Ar,zt,Nt){for(var mr=1-zt,_r,Ri,Ao=0;Ao<Ar.length;Ao++){var si=Ar[Ao];if(!si.fixedrange){_r=si,Ri=si._rl[mr]+(si._rl[zt]-si._rl[mr])/F(Nt/si._length);var Ac=si.l2r(Ri);Ac!==!1&&Ac!==void 0&&(si.range[zt]=Ac)}}return _r._length*(_r._rl[zt]-Ri)/(_r._rl[zt]-_r._rl[mr])}var yt=Ie==="w"==(Ue==="n")?1:-1;if(Ie&&Ue&&(Ge.isSubplotConstrained||Pe.isSubplotConstrained)){var Dt=(He/$e+yt*ze/Se)/2;He=Dt*$e,ze=yt*Dt*Se}var $t,vr;if(Ie==="w"?He=Ze(ce,0,He):Ie==="e"?He=Ze(ce,1,-He):Ie||(He=0),Ue==="n"?ze=Ze(he,1,ze):Ue==="s"?ze=Ze(he,0,-ze):Ue||(ze=0),$t=Ie==="w"?He:0,vr=Ue==="n"?ze:0,Ge.isSubplotConstrained&&!Pe.isSubplotConstrained||Pe.isSubplotConstrained&&Ie&&Ue&&yt>0){var Ot;if(Pe.isSubplotConstrained||!Ie&&Ue.length===1){for(Ot=0;Ot<ce.length;Ot++)ce[Ot].range=ce[Ot]._r.slice(),S(ce[Ot],1-ze/Se);He=ze*$e/Se,$t=He/2}if(Pe.isSubplotConstrained||!Ue&&Ie.length===1){for(Ot=0;Ot<he.length;Ot++)he[Ot].range=he[Ot]._r.slice(),S(he[Ot],1-He/$e);ze=He*Se/$e,vr=ze/2}}(!Pe.isSubplotConstrained||!Ue)&&st("x"),(!Pe.isSubplotConstrained||!Ie)&&st("y");var bt=$e-He,Zt=Se-ze;Pe.isSubplotConstrained&&!(Ie&&Ue)&&(Ie?(vr=$t?0:He*Se/$e,Zt=bt*Se/$e):($t=vr?0:ze*$e/Se,bt=Zt*$e/Se)),kr([$t,vr,bt,Zt]),Lt(),V.emit("plotly_relayouting",N)}function st(He,ze){for(var Qe=Pe.isSubplotConstrained?{x:he,y:ce}[He]:Pe[He+"axes"],Je=Pe.isSubplotConstrained?{x:ce,y:he}[He]:[],Oe=0;Oe<Qe.length;Oe++){var Ze=Qe[Oe],yt=Ze._id,Dt=Pe.xLinks[yt]||Pe.yLinks[yt],$t=Je[0]||X[Dt]||pe[Dt];$t&&(ze?(ze[Ze._name+".range[0]"]=ze[$t._name+".range[0]"],ze[Ze._name+".range[1]"]=ze[$t._name+".range[1]"]):Ze.range=$t.range.slice())}}function Lt(){var He=[],ze;function Qe(Ze){for(ze=0;ze<Ze.length;ze++)Ze[ze].fixedrange||He.push(Ze[ze]._id)}for(St&&(Qe(ce),Qe(Ge.xaxes),Qe(Pe.xaxes)),ht&&(Qe(he),Qe(Ge.yaxes),Qe(Pe.yaxes)),N={},ze=0;ze<He.length;ze++){var Je=He[ze],Oe=y(V,Je);v.drawOne(V,Oe,{skipTitle:!0}),N[Oe._name+".range[0]"]=Oe.range[0],N[Oe._name+".range[1]"]=Oe.range[1]}v.redrawComponents(V,He)}function pr(){if(!V._transitioningWithDuration){var He=V._context.doubleClick,ze=[];Ie&&(ze=ze.concat(ce)),Ue&&(ze=ze.concat(he)),Pe.xaxes&&(ze=ze.concat(Pe.xaxes)),Pe.yaxes&&(ze=ze.concat(Pe.yaxes));var Qe={},Je,Oe,Ze;if(He==="reset+autosize"){for(He="autosize",Oe=0;Oe<ze.length;Oe++)if(Je=ze[Oe],Je._rangeInitial&&(Je.range[0]!==Je._rangeInitial[0]||Je.range[1]!==Je._rangeInitial[1])||!Je._rangeInitial&&!Je.autorange){He="reset";break}}if(He==="autosize")for(Oe=0;Oe<ze.length;Oe++)Je=ze[Oe],Je.fixedrange||(Qe[Je._name+".autorange"]=!0);else if(He==="reset")for((Ie||Ge.isSubplotConstrained)&&(ze=ze.concat(Ge.xaxes)),Ue&&!Ge.isSubplotConstrained&&(ze=ze.concat(Ge.yaxes)),Ge.isSubplotConstrained&&(Ie?Ue||(ze=ze.concat(he)):ze=ze.concat(ce)),Oe=0;Oe<ze.length;Oe++)Je=ze[Oe],Je.fixedrange||(Je._rangeInitial?(Ze=Je._rangeInitial,Qe[Je._name+".range[0]"]=Ze[0],Qe[Je._name+".range[1]"]=Ze[1]):Qe[Je._name+".autorange"]=!0);V.emit("plotly_doubleclick",null),n.call("_guiRelayout",V,Qe)}}function nr(){kr([0,0,$e,Se]),e.syncOrAsync([m.previousPromises,function(){V._fullLayout._replotting=!1,n.call("_guiRelayout",V,N)}],V)}function kr(He){var ze=V._fullLayout,Qe=ze._plots,Je=ze._subplots.cartesian,Oe,Ze,yt,Dt;if(ut&&n.subplotsRegistry.splom.drag(V),Ft){for(Oe=0;Oe<Je.length;Oe++)if(Ze=Qe[Je[Oe]],yt=Ze.xaxis,Dt=Ze.yaxis,Ze._scene){var $t=e.simpleMap(yt.range,yt.r2l),vr=e.simpleMap(Dt.range,Dt.r2l);Ze._scene.update({range:[$t[0],vr[0],$t[1],vr[1]]})}}if((ut||Ft)&&(b(V),w(V)),_t){var Ot=He[2]/Me._length,bt=He[3]/Te._length;for(Oe=0;Oe<Je.length;Oe++){Ze=Qe[Je[Oe]],yt=Ze.xaxis,Dt=Ze.yaxis;var Zt=(St||Pe.isSubplotConstrained)&&!yt.fixedrange&&X[yt._id],Ar=(ht||Pe.isSubplotConstrained)&&!Dt.fixedrange&&pe[Dt._id],zt,Nt,mr,_r;if(Zt?(zt=Ot,mr=fe||Pe.isSubplotConstrained?He[0]:Xr(yt,zt)):Pe.xaHash[yt._id]?(zt=Ot,mr=He[0]*yt._length/Me._length):Pe.yaHash[yt._id]?(zt=bt,mr=Ue==="ns"?-He[1]*yt._length/Te._length:Xr(yt,zt,{n:"top",s:"bottom"}[Ue])):(zt=Nr(yt,Ot,bt),mr=li(yt,zt)),Ar?(Nt=bt,_r=Y||Pe.isSubplotConstrained?He[1]:Xr(Dt,Nt)):Pe.yaHash[Dt._id]?(Nt=bt,_r=He[1]*Dt._length/Te._length):Pe.xaHash[Dt._id]?(Nt=Ot,_r=Ie==="ew"?-He[0]*Dt._length/Me._length:Xr(Dt,Nt,{e:"right",w:"left"}[Ie])):(Nt=Nr(Dt,Ot,bt),_r=li(Dt,Nt)),!(!zt&&!Nt)){zt||(zt=1),Nt||(Nt=1);var Ri=yt._offset-mr/zt,Ao=Dt._offset-_r/Nt;Ze.clipRect.call(f.setTranslate,mr,_r).call(f.setScale,zt,Nt),Ze.plot.call(f.setTranslate,Ri,Ao).call(f.setScale,1/zt,1/Nt),(zt!==Ze.xScaleFactor||Nt!==Ze.yScaleFactor)&&(f.setPointGroupScale(Ze.zoomScalePts,zt,Nt),f.setTextPointsScale(Ze.zoomScaleTxt,zt,Nt)),f.hideOutsideRangePoints(Ze.clipOnAxisFalseTraces,Ze),Ze.xScaleFactor=zt,Ze.yScaleFactor=Nt}}}}function Nr(He,ze,Qe){return He.fixedrange?0:St&&Ge.xaHash[He._id]?ze:ht&&(Ge.isSubplotConstrained?Ge.xaHash:Ge.yaHash)[He._id]?Qe:0}function li(He,ze){return ze?(He.range=He._r.slice(),S(He,ze),Xr(He,ze)):0}function Xr(He,ze,Qe){return He._length*(1-ze)*_[Qe||He.constraintoward||"middle"]}return J}function I(V,ie,ge,de){var ke=e.ensureSingle(V.draglayer,ie,ge,function(ue){ue.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",V.id)});return ke.call(u,de),ke.node()}function P(V,ie,ge,de,ke,ue,Y){var fe=I(V,"rect",ie,ge);return t.select(fe).call(f.setRect,de,ke,ue,Y),fe}function R(V,ie){for(var ge=0;ge<V.length;ge++)if(!V[ge].fixedrange)return ie;return""}function L(V,ie){var ge=V.range[ie],de=Math.abs(ge-V.range[1-ie]),ke;return V.type==="date"?ge:V.type==="log"?(ke=Math.ceil(Math.max(0,-Math.log(de)/Math.LN10))+3,r("."+ke+"g")(Math.pow(10,ge))):(ke=Math.floor(Math.log(Math.abs(ge))/Math.LN10)-Math.floor(Math.log(de)/Math.LN10)+4,r("."+String(ke)+"g")(ge))}function C(V,ie,ge,de,ke){for(var ue=0;ue<V.length;ue++){var Y=V[ue];if(!Y.fixedrange)if(Y.rangebreaks){var fe=Y._id.charAt(0)==="y",Ae=fe?1-ie:ie,be=fe?1-ge:ge;de[Y._name+".range[0]"]=Y.l2r(Y.p2l(Ae*Y._length)),de[Y._name+".range[1]"]=Y.l2r(Y.p2l(be*Y._length))}else{var Ce=Y._rl[0],Me=Y._rl[1]-Ce;de[Y._name+".range[0]"]=Y.l2r(Ce+Me*ie),de[Y._name+".range[1]"]=Y.l2r(Ce+Me*ge)}}if(ke&&ke.length){var Te=(ie+(1-ge))/2;C(ke,Te,1-Te,de,[])}}function z(V,ie){for(var ge=0;ge<V.length;ge++){var de=V[ge];if(!de.fixedrange)if(de.rangebreaks){var ke=0,ue=de._length,Y=de.p2l(ke+ie)-de.p2l(ke),fe=de.p2l(ue+ie)-de.p2l(ue),Ae=(Y+fe)/2;de.range=[de.l2r(de._rl[0]-Ae),de.l2r(de._rl[1]-Ae)]}else de.range=[de.l2r(de._rl[0]-ie/de._m),de.l2r(de._rl[1]-ie/de._m)]}}function F(V){return 1-(V>=0?Math.min(V,.9):1/(1/Math.max(V,-.3)+3.222))}function H(V,ie,ge){return V?V==="nsew"?ge?"":ie==="pan"?"move":"crosshair":V.toLowerCase()+"-resize":"pointer"}function B(V,ie,ge,de,ke){return V.append("path").attr("class","zoombox").style({fill:ie>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",o(ge,de)).attr("d",ke+"Z")}function O(V,ie,ge){return V.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("transform",o(ie,ge)).attr("d","M0,0Z")}function W(V,ie,ge,de,ke,ue){V.attr("d",de+"M"+ge.l+","+ge.t+"v"+ge.h+"h"+ge.w+"v-"+ge.h+"h-"+ge.w+"Z"),j(V,ie,ke,ue)}function j(V,ie,ge,de){ge||(V.transition().style("fill",de>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ie.transition().style("opacity",1).duration(200))}function Z(V){t.select(V).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function K(V){D&&V.data&&V._context.showTips&&(e.notifier(e._(V,"Double-click to zoom back out"),"long"),D=!1)}function Q(V,ie){return"M"+(V.l-.5)+","+(ie-M-.5)+"h-3v"+(2*M+1)+"h3ZM"+(V.r+.5)+","+(ie-M-.5)+"h3v"+(2*M+1)+"h-3Z"}function ee(V,ie){return"M"+(ie-M-.5)+","+(V.t-.5)+"v-3h"+(2*M+1)+"v3ZM"+(ie-M-.5)+","+(V.b+.5)+"v3h"+(2*M+1)+"v-3Z"}function ne(V){var ie=Math.floor(Math.min(V.b-V.t,V.r-V.l,M)/2);return"M"+(V.l-3.5)+","+(V.t-.5+ie)+"h3v"+-ie+"h"+ie+"v-3h-"+(ie+3)+"ZM"+(V.r+3.5)+","+(V.t-.5+ie)+"h-3v"+-ie+"h"+-ie+"v-3h"+(ie+3)+"ZM"+(V.r+3.5)+","+(V.b+.5-ie)+"h-3v"+ie+"h"+-ie+"v3h"+(ie+3)+"ZM"+(V.l-3.5)+","+(V.b+.5-ie)+"h3v"+ie+"h"+ie+"v3h-"+(ie+3)+"Z"}function le(V,ie,ge,de,ke){for(var ue=!1,Y={},fe={},Ae,be,Ce,Me,Te=(ke||{}).xaHash,X=(ke||{}).yaHash,pe=0;pe<ie.length;pe++){var ce=ie[pe];for(Ae in ge)if(ce[Ae]){for(Ce in ce)!(ke&&(Te[Ce]||X[Ce]))&&!(Ce.charAt(0)==="x"?ge:de)[Ce]&&(Y[Ce]=Ae);for(be in de)!(ke&&(Te[be]||X[be]))&&ce[be]&&(ue=!0)}for(be in de)if(ce[be])for(Me in ce)!(ke&&(Te[Me]||X[Me]))&&!(Me.charAt(0)==="x"?ge:de)[Me]&&(fe[Me]=be)}ue&&(e.extendFlat(Y,fe),fe={});var he={},De=[];for(Ce in Y){var je=y(V,Ce);De.push(je),he[je._id]=je}var $e={},Se=[];for(Me in fe){var Ge=y(V,Me);Se.push(Ge),$e[Ge._id]=Ge}return{xaHash:he,yaHash:$e,xaxes:De,yaxes:Se,xLinks:Y,yLinks:fe,isSubplotConstrained:ue}}function se(V,ie){if(!i)V.onwheel!==void 0?V.onwheel=ie:V.onmousewheel!==void 0?V.onmousewheel=ie:V.isAddedWheelEvent||(V.isAddedWheelEvent=!0,V.addEventListener("wheel",ie,{passive:!1}));else{var ge=V.onwheel!==void 0?"wheel":"mousewheel";V._onwheel&&V.removeEventListener(ge,V._onwheel),V._onwheel=ie,V.addEventListener(ge,ie,{passive:!1})}}function oe(V){var ie=[];for(var ge in V)ie.push(V[ge]);return ie}return xu={makeDragBox:$,makeDragger:I,makeRectDragger:P,makeZoombox:B,makeCorners:O,updateZoombox:W,xyCorners:ne,transitionZoombox:j,removeZoombox:Z,showDoubleClickNotifier:K,attachWheelEventHandler:se},xu}var my;function E_(){return my||(my=1,function(t){var e=ct.exports,r=Ma,a=Ca.exports,i=Di,n=S5().makeDragBox,o=$r.DRAGGERSIZE;t.initInteractions=function(s){var f=s._fullLayout;if(s._context.staticPlot){e.select(s).selectAll(".drag").remove();return}if(!(!f._has("cartesian")&&!f._has("splom"))){var c=Object.keys(f._plots||{}).sort(function(u,d){if((f._plots[u].mainplot&&!0)===(f._plots[d].mainplot&&!0)){var h=u.split("y"),p=d.split("y");return h[0]===p[0]?Number(h[1]||1)-Number(p[1]||1):Number(h[0]||1)-Number(p[0]||1)}return f._plots[u].mainplot?1:-1});c.forEach(function(u){var d=f._plots[u],h=d.xaxis,p=d.yaxis;if(!d.mainplot){var g=n(s,d,h._offset,p._offset,h._length,p._length,"ns","ew");g.onmousemove=function(w){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===u&&s._fullLayout._plots[u]&&r.hover(s,w,u)},r.hover(s,w,u),s._fullLayout._lasthover=g,s._fullLayout._hoversubplot=u},g.onmouseout=function(w){s._dragging||(s._fullLayout._hoversubplot=null,a.unhover(s,w))},s._context.showAxisDragHandles&&(n(s,d,h._offset-o,p._offset-o,o,o,"n","w"),n(s,d,h._offset+h._length,p._offset-o,o,o,"n","e"),n(s,d,h._offset-o,p._offset+p._length,o,o,"s","w"),n(s,d,h._offset+h._length,p._offset+p._length,o,o,"s","e"))}if(s._context.showAxisDragHandles){if(u===h._mainSubplot){var _=h._mainLinePosition;h.side==="top"&&(_-=o),n(s,d,h._offset+h._length*.1,_,h._length*.8,o,"","ew"),n(s,d,h._offset,_,h._length*.1,o,"","w"),n(s,d,h._offset+h._length*.9,_,h._length*.1,o,"","e")}if(u===p._mainSubplot){var b=p._mainLinePosition;p.side!=="right"&&(b-=o),n(s,d,b,p._offset+p._length*.1,o,p._length*.8,"ns",""),n(s,d,b,p._offset+p._length*.9,o,p._length*.1,"s",""),n(s,d,b,p._offset,o,p._length*.1,"n","")}}});var v=f._hoverlayer.node();v.onmousemove=function(u){u.target=s._fullLayout._lasthover,r.hover(s,u,f._hoversubplot)},v.onclick=function(u){u.target=s._fullLayout._lasthover,r.click(s,u)},v.onmousedown=function(u){s._fullLayout._lasthover.onmousedown(u)},t.updateFx(s)}},t.updateFx=function(l){var s=l._fullLayout,f=s.dragmode==="pan"?"move":"crosshair";i(s._draggers,f)}}(Wc)),Wc}var Bl={},yy=We,L5=function(e){for(var r=yy.layoutArrayContainers,a=yy.layoutArrayRegexes,i=e.split("[")[0],n,o,l=0;l<a.length;l++)if(o=e.match(a[l]),o&&o.index===0){n=o[0];break}if(n||(n=r[r.indexOf(i)]),!n)return!1;var s=e.substr(n.length);return s?(o=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:n,index:Number(o[1]),property:o[3]||""}:!1):{array:n,index:"",property:""}},C5=Ll,_u=Od,No=sn.exports,D5=Gd.sorterAsc,wu=We;Bl.containerArrayMatch=L5;var E5=Bl.isAddVal=function(e){return e==="add"||C5(e)},gy=Bl.isRemoveVal=function(e){return e===null||e==="remove"};Bl.applyContainerArrayChanges=function(e,r,a,i,n){var o=r.astr,l=wu.getComponentMethod(o,"supplyLayoutDefaults"),s=wu.getComponentMethod(o,"draw"),f=wu.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||l===_u||s===_u,v=e.layout,u=e._fullLayout;if(a[""]){Object.keys(a).length>1&&No.warn("Full array edits are incompatible with other edits",o);var d=a[""][""];if(gy(d))r.set(null);else if(Array.isArray(d))r.set(d);else return No.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(l(v,u),s(e),!0)}var h=Object.keys(a).map(Number).sort(D5),p=r.get(),g=p||[],_=n(u,o).get(),b=[],w=-1,m=g.length,y,x,T,k,S,A,E,M;for(y=0;y<h.length;y++){if(T=h[y],k=a[T],S=Object.keys(k),A=k[""],E=E5(A),T<0||T>g.length-(E?0:1)){No.warn("index out of range",o,T);continue}if(A!==void 0)S.length>1&&No.warn("Insertion & removal are incompatible with edits to the same index.",o,T),gy(A)?b.push(T):E?(A==="add"&&(A={}),g.splice(T,0,A),_&&_.splice(T,0,{})):No.warn("Unrecognized full object edit value",o,T,A),w===-1&&(w=T);else for(x=0;x<S.length;x++)M=o+"["+T+"].",n(g[T],S[x],M).set(k[S[x]])}for(y=b.length-1;y>=0;y--)g.splice(b[y],1),_&&_.splice(b[y],1);if(g.length?p||r.set(g):r.set(null),c)return!1;if(l(v,u),f!==_u){var D;if(w===-1)D=h;else{for(m=Math.max(g.length,m),D=[],y=0;y<h.length&&(T=h[y],!(T>=w));y++)D.push(T);for(y=w;y<m;y++)D.push(y)}for(y=0;y<D.length;y++)f(e,D[y])}else s(e);return!0};var $_={};(function(t){var e=gt,r=U2,a=We,i=me.exports,n=ar.exports,o=ir,l=ft.exports,s=o.cleanId,f=o.getFromTrace,c=a.traceIs;t.clearPromiseQueue=function(m){Array.isArray(m._promises)&&m._promises.length>0&&i.log("Clearing previous rejected promises from queue."),m._promises=[]},t.cleanLayout=function(m){var y,x;m||(m={}),m.xaxis1&&(m.xaxis||(m.xaxis=m.xaxis1),delete m.xaxis1),m.yaxis1&&(m.yaxis||(m.yaxis=m.yaxis1),delete m.yaxis1),m.scene1&&(m.scene||(m.scene=m.scene1),delete m.scene1);var T=(n.subplotsRegistry.cartesian||{}).attrRegex,k=(n.subplotsRegistry.polar||{}).attrRegex,S=(n.subplotsRegistry.ternary||{}).attrRegex,A=(n.subplotsRegistry.gl3d||{}).attrRegex,E=Object.keys(m);for(y=0;y<E.length;y++){var M=E[y];if(T&&T.test(M)){var D=m[M];D.anchor&&D.anchor!=="free"&&(D.anchor=s(D.anchor)),D.overlaying&&(D.overlaying=s(D.overlaying)),D.type||(D.isdate?D.type="date":D.islog?D.type="log":D.isdate===!1&&D.islog===!1&&(D.type="linear")),(D.autorange==="withzero"||D.autorange==="tozero")&&(D.autorange=!0,D.rangemode="tozero"),delete D.islog,delete D.isdate,delete D.categories,g(D,"domain")&&delete D.domain,D.autotick!==void 0&&(D.tickmode===void 0&&(D.tickmode=D.autotick?"auto":"linear"),delete D.autotick),u(D)}else if(k&&k.test(M)){var $=m[M];u($.radialaxis)}else if(S&&S.test(M)){var I=m[M];u(I.aaxis),u(I.baxis),u(I.caxis)}else if(A&&A.test(M)){var P=m[M],R=P.cameraposition;if(Array.isArray(R)&&R[0].length===4){var L=R[0],C=R[1],z=R[2],F=r([],L),H=[];for(x=0;x<3;++x)H[x]=C[x]+z*F[2+4*x];P.camera={eye:{x:H[0],y:H[1],z:H[2]},center:{x:C[0],y:C[1],z:C[2]},up:{x:0,y:0,z:1}},delete P.cameraposition}u(P.xaxis),u(P.yaxis),u(P.zaxis)}}var B=Array.isArray(m.annotations)?m.annotations.length:0;for(y=0;y<B;y++){var O=m.annotations[y];!i.isPlainObject(O)||(O.ref&&(O.ref==="paper"?(O.xref="paper",O.yref="paper"):O.ref==="data"&&(O.xref="x",O.yref="y"),delete O.ref),v(O,"xref"),v(O,"yref"))}var W=Array.isArray(m.shapes)?m.shapes.length:0;for(y=0;y<W;y++){var j=m.shapes[y];!i.isPlainObject(j)||(v(j,"xref"),v(j,"yref"))}var Z=Array.isArray(m.images)?m.images.length:0;for(y=0;y<Z;y++){var K=m.images[y];!i.isPlainObject(K)||(v(K,"xref"),v(K,"yref"))}var Q=m.legend;return Q&&(Q.x>3?(Q.x=1.02,Q.xanchor="left"):Q.x<-2&&(Q.x=-.02,Q.xanchor="right"),Q.y>3?(Q.y=1.02,Q.yanchor="bottom"):Q.y<-2&&(Q.y=-.02,Q.yanchor="top")),u(m),m.dragmode==="rotate"&&(m.dragmode="orbit"),l.clean(m),m.template&&m.template.layout&&t.cleanLayout(m.template.layout),m};function v(m,y){var x=m[y],T=y.charAt(0);x&&x!=="paper"&&(m[y]=s(x,T,!0))}function u(m){m&&((typeof m.title=="string"||typeof m.title=="number")&&(m.title={text:m.title}),y("titlefont","font"),y("titleposition","position"),y("titleside","side"),y("titleoffset","offset"));function y(x,T){var k=m[x],S=m.title&&m.title[T];k&&!S&&(m.title||(m.title={}),m.title[T]=m[x],delete m[x])}}t.cleanData=function(m){for(var y=0;y<m.length;y++){var x=m[y],T;if(x.type==="histogramy"&&"xbins"in x&&!("ybins"in x)&&(x.ybins=x.xbins,delete x.xbins),x.error_y&&"opacity"in x.error_y){var k=l.defaults,S=x.error_y.color||(c(x,"bar")?l.defaultLine:k[y%k.length]);x.error_y.color=l.addOpacity(l.rgb(S),l.opacity(S)*x.error_y.opacity),delete x.error_y.opacity}if("bardir"in x&&(x.bardir==="h"&&(c(x,"bar")||x.type.substr(0,9)==="histogram")&&(x.orientation="h",t.swapXYData(x)),delete x.bardir),x.type==="histogramy"&&t.swapXYData(x),(x.type==="histogramx"||x.type==="histogramy")&&(x.type="histogram"),"scl"in x&&!("colorscale"in x)&&(x.colorscale=x.scl,delete x.scl),"reversescl"in x&&!("reversescale"in x)&&(x.reversescale=x.reversescl,delete x.reversescl),x.xaxis&&(x.xaxis=s(x.xaxis,"x")),x.yaxis&&(x.yaxis=s(x.yaxis,"y")),c(x,"gl3d")&&x.scene&&(x.scene=n.subplotsRegistry.gl3d.cleanId(x.scene)),!c(x,"pie-like")&&!c(x,"bar-like"))if(Array.isArray(x.textposition))for(T=0;T<x.textposition.length;T++)x.textposition[T]=p(x.textposition[T]);else x.textposition&&(x.textposition=p(x.textposition));var A=a.getModule(x);if(A&&A.colorbar){var E=A.colorbar.container,M=E?x[E]:x;M&&M.colorscale&&(M.colorscale==="YIGnBu"&&(M.colorscale="YlGnBu"),M.colorscale==="YIOrRd"&&(M.colorscale="YlOrRd"))}if(x.type==="surface"&&i.isPlainObject(x.contours)){var D=["x","y","z"];for(T=0;T<D.length;T++){var $=x.contours[D[T]];!i.isPlainObject($)||($.highlightColor&&($.highlightcolor=$.highlightColor,delete $.highlightColor),$.highlightWidth&&($.highlightwidth=$.highlightWidth,delete $.highlightWidth))}}if(x.type==="candlestick"||x.type==="ohlc"){var I=(x.increasing||{}).showlegend!==!1,P=(x.decreasing||{}).showlegend!==!1,R=d(x.increasing),L=d(x.decreasing);if(R!==!1&&L!==!1){var C=h(R,L,I,P);C&&(x.name=C)}else(R||L)&&!x.name&&(x.name=R||L)}if(Array.isArray(x.transforms)){var z=x.transforms;for(T=0;T<z.length;T++){var F=z[T];if(!!i.isPlainObject(F))switch(F.type){case"filter":F.filtersrc&&(F.target=F.filtersrc,delete F.filtersrc),F.calendar&&(F.valuecalendar||(F.valuecalendar=F.calendar),delete F.calendar);break;case"groupby":if(F.styles=F.styles||F.style,F.styles&&!Array.isArray(F.styles)){var H=F.styles,B=Object.keys(H);F.styles=[];for(var O=0;O<B.length;O++)F.styles.push({target:B[O],value:H[B[O]]})}break}}}g(x,"line")&&delete x.line,"marker"in x&&(g(x.marker,"line")&&delete x.marker.line,g(x,"marker")&&delete x.marker),l.clean(x),x.autobinx&&(delete x.autobinx,delete x.xbins),x.autobiny&&(delete x.autobiny,delete x.ybins),u(x),x.colorbar&&u(x.colorbar),x.marker&&x.marker.colorbar&&u(x.marker.colorbar),x.line&&x.line.colorbar&&u(x.line.colorbar),x.aaxis&&u(x.aaxis),x.baxis&&u(x.baxis)}};function d(m){if(!i.isPlainObject(m))return!1;var y=m.name;return delete m.name,delete m.showlegend,(typeof y=="string"||typeof y=="number")&&String(y)}function h(m,y,x,T){if(x&&!T)return m;if(T&&!x||!m.trim())return y;if(!y.trim())return m;var k=Math.min(m.length,y.length),S;for(S=0;S<k&&m.charAt(S)===y.charAt(S);S++);var A=m.substr(0,S);return A.trim()}function p(m){var y="middle",x="center";return typeof m=="string"&&(m.indexOf("top")!==-1?y="top":m.indexOf("bottom")!==-1&&(y="bottom"),m.indexOf("left")!==-1?x="left":m.indexOf("right")!==-1&&(x="right")),y+" "+x}function g(m,y){return y in m&&typeof m[y]=="object"&&Object.keys(m[y]).length===0}t.swapXYData=function(m){var y;if(i.swapAttrs(m,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(m.z)&&Array.isArray(m.z[0])&&(m.transpose?delete m.transpose:m.transpose=!0),m.error_x&&m.error_y){var x=m.error_y,T="copy_ystyle"in x?x.copy_ystyle:!(x.color||x.thickness||x.width);i.swapAttrs(m,["error_?.copy_ystyle"]),T&&i.swapAttrs(m,["error_?.color","error_?.thickness","error_?.width"])}if(typeof m.hoverinfo=="string"){var k=m.hoverinfo.split("+");for(y=0;y<k.length;y++)k[y]==="x"?k[y]="y":k[y]==="y"&&(k[y]="x");m.hoverinfo=k.join("+")}},t.coerceTraceIndices=function(m,y){if(e(y))return[y];if(!Array.isArray(y)||!y.length)return m.data.map(function(k,S){return S});if(Array.isArray(y)){for(var x=[],T=0;T<y.length;T++)i.isIndex(y[T],m.data.length)?x.push(y[T]):i.warn("trace index (",y[T],") is not a number or is out of bounds");return x}return y},t.manageArrayContainers=function(m,y,x){var T=m.obj,k=m.parts,S=k.length,A=k[S-1],E=e(A);if(E&&y===null){var M=k.slice(0,S-1).join("."),D=i.nestedProperty(T,M).get();D.splice(A,1)}else E&&m.get()===void 0&&m.get()===void 0&&(x[m.astr]=null),m.set(y)};var _=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function b(m){var y=m.search(_);if(y>0)return m.substr(0,y)}t.hasParent=function(m,y){for(var x=b(y);x;){if(x in m)return!0;x=b(x)}return!1};var w=["x","y","z"];t.clearAxisTypes=function(m,y,x){for(var T=0;T<y.length;T++)for(var k=m._fullData[T],S=0;S<3;S++){var A=f(m,k,w[S]);if(A&&A.type!=="log"){var E=A._name,M=A._id.substr(1);if(M.substr(0,5)==="scene"){if(x[M]!==void 0)continue;E=M+"."+E}var D=E+".type";x[E]===void 0&&x[D]===void 0&&i.nestedProperty(m.layout,D).set(null)}}}})($_);(function(t){var e=ct.exports,r=gt,a=Gb,i=me.exports,n=i.nestedProperty,o=Pl,l=NA,s=We,f=go,c=ar.exports,v=jt.exports,u=Pt.exports,d=ft.exports,h=E_().initInteractions,p=dn,g=Ws.clearSelect,_=po.dfltConfig,b=Bl,w=$_,m=oc,y=Li,x=$r.AX_NAME_PATTERN,T=0,k=5;function S(N,U,G,q){var ae;if(N=i.getGraphDiv(N),o.init(N),i.isPlainObject(U)){var J=U;U=J.data,G=J.layout,q=J.config,ae=J.frames}var ye=o.triggerHandler(N,"plotly_beforeplot",[U,G,q]);if(ye===!1)return Promise.reject();!U&&!G&&!i.isPlotDiv(N)&&i.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",N);function _e(){if(ae)return t.addFrames(N,ae)}$(N,q),G||(G={}),e.select(N).classed("js-plotly-plot",!0),u.makeTester(),Array.isArray(N._promises)||(N._promises=[]);var ve=(N.data||[]).length===0&&Array.isArray(U);Array.isArray(U)&&(w.cleanData(U),ve?N.data=U:N.data.push.apply(N.data,U),N.empty=!1),(!N.layout||ve)&&(N.layout=w.cleanLayout(G)),c.supplyDefaults(N);var re=N._fullLayout,xe=re._has("cartesian");re._replotting=!0,(ve||re._shouldCreateBgLayer)&&(_t(N),re._shouldCreateBgLayer&&delete re._shouldCreateBgLayer),u.initGradients(N),u.initPatterns(N),ve&&v.saveShowSpikeInitial(N);var we=!N.calcdata||N.calcdata.length!==(N._fullData||[]).length;we&&c.doCalcdata(N);for(var Fe=0;Fe<N.calcdata.length;Fe++)N.calcdata[Fe][0].trace=N._fullData[Fe];N._context.responsive?N._responsiveChartHandler||(N._responsiveChartHandler=function(){i.isHidden(N)||c.resize(N)},window.addEventListener("resize",N._responsiveChartHandler)):i.clearResponsive(N);var et=i.extendFlat({},re._size),ot=0;function at(){for(var Ve=re._basePlotModules,tt=0;tt<Ve.length;tt++)Ve[tt].drawFramework&&Ve[tt].drawFramework(N);!re._glcanvas&&re._has("gl")&&(re._glcanvas=re._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(st){return st.key}),re._glcanvas.enter().append("canvas").attr("class",function(st){return"gl-canvas gl-canvas-"+st.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var pt=N._context.plotGlPixelRatio;if(re._glcanvas){re._glcanvas.attr("width",re.width*pt).attr("height",re.height*pt).style("width",re.width+"px").style("height",re.height+"px");var lt=re._glcanvas.data()[0].regl;if(lt&&(Math.floor(re.width*pt)!==lt._gl.drawingBufferWidth||Math.floor(re.height*pt)!==lt._gl.drawingBufferHeight)){var Be="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(ot)i.error(Be);else return i.log(Be+" Clearing graph and plotting again."),c.cleanPlot([],{},N._fullData,re),c.supplyDefaults(N),re=N._fullLayout,c.doCalcdata(N),ot++,at()}}return re.modebar.orientation==="h"?re._modebardiv.style("height",null).style("width","100%"):re._modebardiv.style("width",null).style("height",re.height+"px"),c.previousPromises(N)}function qe(){if(c.clearAutoMarginIds(N),m.drawMarginPushers(N),v.allowAutoMargin(N),re._has("pie"))for(var Ve=N._fullData,tt=0;tt<Ve.length;tt++){var pt=Ve[tt];pt.type==="pie"&&pt.automargin&&c.allowAutoMargin(N,"pie."+pt.uid+".automargin")}return c.doAutoMargin(N),c.previousPromises(N)}function kt(){if(!!c.didMarginChange(et,re._size))return i.syncOrAsync([qe,m.layoutStyles],N)}function it(){if(!we){Ye();return}return i.syncOrAsync([s.getComponentMethod("shapes","calcAutorange"),s.getComponentMethod("annotations","calcAutorange"),Ye],N)}function Ye(){N._transitioning||(m.doAutoRangeAndConstraints(N),ve&&v.saveRangeInitial(N),s.getComponentMethod("rangeslider","calcAutorange")(N))}function wt(){return v.draw(N,ve?"":"redraw")}var mt=[c.previousPromises,_e,at,qe,kt];xe&&mt.push(it),mt.push(m.layoutStyles),xe&&mt.push(wt,function(tt){tt._fullLayout._insideTickLabelsAutorange&&ge(tt,tt._fullLayout._insideTickLabelsAutorange).then(function(){tt._fullLayout._insideTickLabelsAutorange=void 0})}),mt.push(m.drawData,m.finalDraw,h,c.addLinks,c.rehover,c.redrag,c.doAutoMargin,nt,c.previousPromises);function nt(Ve){Ve._fullLayout._insideTickLabelsAutorange&&ve&&v.saveRangeInitial(Ve,!0)}var Ke=i.syncOrAsync(mt,N);return(!Ke||!Ke.then)&&(Ke=Promise.resolve()),Ke.then(function(){return A(N),N})}function A(N){var U=N._fullLayout;U._redrawFromAutoMarginCount?U._redrawFromAutoMarginCount--:N.emit("plotly_afterplot")}function E(N){return i.extendFlat(_,N)}function M(N,U){try{N._fullLayout._paper.style("background",U)}catch(G){i.error(G)}}function D(N,U){var G=d.combine(U,"white");M(N,G)}function $(N,U){if(!N._context){N._context=i.extendDeep({},_);var G=e.select("base");N._context._baseUrl=G.size()&&G.attr("href")?window.location.href.split("#")[0]:""}var q=N._context,ae,J,ye;if(U){for(J=Object.keys(U),ae=0;ae<J.length;ae++)ye=J[ae],!(ye==="editable"||ye==="edits")&&ye in q&&(ye==="setBackground"&&U[ye]==="opaque"?q[ye]=D:q[ye]=U[ye]);U.plot3dPixelRatio&&!q.plotGlPixelRatio&&(q.plotGlPixelRatio=q.plot3dPixelRatio);var _e=U.editable;if(_e!==void 0)for(q.editable=_e,J=Object.keys(q.edits),ae=0;ae<J.length;ae++)q.edits[J[ae]]=_e;if(U.edits)for(J=Object.keys(U.edits),ae=0;ae<J.length;ae++)ye=J[ae],ye in q.edits&&(q.edits[ye]=U.edits[ye]);q._exportedPlot=U._exportedPlot}q.staticPlot&&(q.editable=!1,q.edits={},q.autosizable=!1,q.scrollZoom=!1,q.doubleClick=!1,q.showTips=!1,q.showLink=!1,q.displayModeBar=!1),q.displayModeBar==="hover"&&!a&&(q.displayModeBar=!0),(q.setBackground==="transparent"||typeof q.setBackground!="function")&&(q.setBackground=M),q._hasZeroHeight=q._hasZeroHeight||N.clientHeight===0,q._hasZeroWidth=q._hasZeroWidth||N.clientWidth===0;var ve=q.scrollZoom,re=q._scrollZoom={};if(ve===!0)re.cartesian=1,re.gl3d=1,re.geo=1,re.mapbox=1;else if(typeof ve=="string"){var xe=ve.split("+");for(ae=0;ae<xe.length;ae++)re[xe[ae]]=1}else ve!==!1&&(re.gl3d=1,re.geo=1,re.mapbox=1)}function I(N){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N);return w.cleanData(N.data),w.cleanLayout(N.layout),N.calcdata=void 0,t._doPlot(N).then(function(){return N.emit("plotly_redraw"),N})}function P(N,U,G,q){return N=i.getGraphDiv(N),c.cleanPlot([],{},N._fullData||[],N._fullLayout||{}),c.purge(N),t._doPlot(N,U,G,q)}function R(N,U){var G=U+1,q=[],ae,J;for(ae=0;ae<N.length;ae++)J=N[ae],J<0?q.push(G+J):q.push(J);return q}function L(N,U,G){var q,ae;for(q=0;q<U.length;q++){if(ae=U[q],ae!==parseInt(ae,10))throw new Error("all values in "+G+" must be integers");if(ae>=N.data.length||ae<-N.data.length)throw new Error(G+" must be valid indices for gd.data.");if(U.indexOf(ae,q+1)>-1||ae>=0&&U.indexOf(-N.data.length+ae)>-1||ae<0&&U.indexOf(N.data.length+ae)>-1)throw new Error("each index in "+G+" must be unique.")}}function C(N,U,G){if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof U>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(U)||(U=[U]),L(N,U,"currentIndices"),typeof G<"u"&&!Array.isArray(G)&&(G=[G]),typeof G<"u"&&L(N,G,"newIndices"),typeof G<"u"&&U.length!==G.length)throw new Error("current and new indices must be of equal length.")}function z(N,U,G){var q,ae;if(!Array.isArray(N.data))throw new Error("gd.data must be an array.");if(typeof U>"u")throw new Error("traces must be defined.");for(Array.isArray(U)||(U=[U]),q=0;q<U.length;q++)if(ae=U[q],typeof ae!="object"||Array.isArray(ae)||ae===null)throw new Error("all values in traces array must be non-array objects");if(typeof G<"u"&&!Array.isArray(G)&&(G=[G]),typeof G<"u"&&G.length!==U.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function F(N,U,G,q){var ae=i.isPlainObject(q);if(!Array.isArray(N.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(U))throw new Error("update must be a key:value object");if(typeof G>"u")throw new Error("indices must be an integer or array of integers");L(N,G,"indices");for(var J in U){if(!Array.isArray(U[J])||U[J].length!==G.length)throw new Error("attribute "+J+" must be an array of length equal to indices array length");if(ae&&(!(J in q)||!Array.isArray(q[J])||q[J].length!==U[J].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function H(N,U,G,q){var ae=i.isPlainObject(q),J=[],ye,_e,ve,re,xe;Array.isArray(G)||(G=[G]),G=R(G,N.data.length-1);for(var we in U)for(var Fe=0;Fe<G.length;Fe++){if(ye=N.data[G[Fe]],ve=n(ye,we),_e=ve.get(),re=U[we][Fe],!i.isArrayOrTypedArray(re))throw new Error("attribute: "+we+" index: "+Fe+" must be an array");if(!i.isArrayOrTypedArray(_e))throw new Error("cannot extend missing or non-array attribute: "+we);if(_e.constructor!==re.constructor)throw new Error("cannot extend array with an array of a different type: "+we);xe=ae?q[we][Fe]:q,r(xe)||(xe=-1),J.push({prop:ve,target:_e,insert:re,maxp:Math.floor(xe)})}return J}function B(N,U,G,q,ae){F(N,U,G,q);for(var J=H(N,U,G,q),ye={},_e={},ve=0;ve<J.length;ve++){var re=J[ve].prop,xe=J[ve].maxp,we=ae(J[ve].target,J[ve].insert,xe);re.set(we[0]),Array.isArray(ye[re.astr])||(ye[re.astr]=[]),ye[re.astr].push(we[1]),Array.isArray(_e[re.astr])||(_e[re.astr]=[]),_e[re.astr].push(J[ve].target.length)}return{update:ye,maxPoints:_e}}function O(N,U){var G=new N.constructor(N.length+U.length);return G.set(N),G.set(U,N.length),G}function W(N,U,G,q){N=i.getGraphDiv(N);function ae(ve,re,xe){var we,Fe;if(i.isTypedArray(ve))if(xe<0){var et=new ve.constructor(0),ot=O(ve,re);xe<0?(we=ot,Fe=et):(we=et,Fe=ot)}else if(we=new ve.constructor(xe),Fe=new ve.constructor(ve.length+re.length-xe),xe===re.length)we.set(re),Fe.set(ve);else if(xe<re.length){var at=re.length-xe;we.set(re.subarray(at)),Fe.set(ve),Fe.set(re.subarray(0,at),ve.length)}else{var qe=xe-re.length,kt=ve.length-qe;we.set(ve.subarray(kt)),we.set(re,qe),Fe.set(ve.subarray(0,kt))}else we=ve.concat(re),Fe=xe>=0&&xe<we.length?we.splice(0,we.length-xe):[];return[we,Fe]}var J=B(N,U,G,q,ae),ye=t.redraw(N),_e=[N,J.update,G,J.maxPoints];return l.add(N,t.prependTraces,_e,W,arguments),ye}function j(N,U,G,q){N=i.getGraphDiv(N);function ae(ve,re,xe){var we,Fe;if(i.isTypedArray(ve))if(xe<=0){var et=new ve.constructor(0),ot=O(re,ve);xe<0?(we=ot,Fe=et):(we=et,Fe=ot)}else if(we=new ve.constructor(xe),Fe=new ve.constructor(ve.length+re.length-xe),xe===re.length)we.set(re),Fe.set(ve);else if(xe<re.length){var at=re.length-xe;we.set(re.subarray(0,at)),Fe.set(re.subarray(at)),Fe.set(ve,at)}else{var qe=xe-re.length;we.set(re),we.set(ve.subarray(0,qe),re.length),Fe.set(ve.subarray(qe))}else we=re.concat(ve),Fe=xe>=0&&xe<we.length?we.splice(xe,we.length):[];return[we,Fe]}var J=B(N,U,G,q,ae),ye=t.redraw(N),_e=[N,J.update,G,J.maxPoints];return l.add(N,t.extendTraces,_e,j,arguments),ye}function Z(N,U,G){N=i.getGraphDiv(N);var q=[],ae=t.deleteTraces,J=Z,ye=[N,q],_e=[N,U],ve,re;for(z(N,U,G),Array.isArray(U)||(U=[U]),U=U.map(function(xe){return i.extendFlat({},xe)}),w.cleanData(U),ve=0;ve<U.length;ve++)N.data.push(U[ve]);for(ve=0;ve<U.length;ve++)q.push(-U.length+ve);if(typeof G>"u")return re=t.redraw(N),l.add(N,ae,ye,J,_e),re;Array.isArray(G)||(G=[G]);try{C(N,q,G)}catch(xe){throw N.data.splice(N.data.length-U.length,U.length),xe}return l.startSequence(N),l.add(N,ae,ye,J,_e),re=t.moveTraces(N,q,G),l.stopSequence(N),re}function K(N,U){N=i.getGraphDiv(N);var G=[],q=t.addTraces,ae=K,J=[N,G,U],ye=[N,U],_e,ve;if(typeof U>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(U)||(U=[U]),L(N,U,"indices"),U=R(U,N.data.length-1),U.sort(i.sorterDes),_e=0;_e<U.length;_e+=1)ve=N.data.splice(U[_e],1)[0],G.push(ve);var re=t.redraw(N);return l.add(N,q,J,ae,ye),re}function Q(N,U,G){N=i.getGraphDiv(N);var q=[],ae=[],J=Q,ye=Q,_e=[N,G,U],ve=[N,U,G],re;if(C(N,U,G),U=Array.isArray(U)?U:[U],typeof G>"u")for(G=[],re=0;re<U.length;re++)G.push(-U.length+re);for(G=Array.isArray(G)?G:[G],U=R(U,N.data.length-1),G=R(G,N.data.length-1),re=0;re<N.data.length;re++)U.indexOf(re)===-1&&q.push(N.data[re]);for(re=0;re<U.length;re++)ae.push({newIndex:G[re],trace:N.data[U[re]]});for(ae.sort(function(we,Fe){return we.newIndex-Fe.newIndex}),re=0;re<ae.length;re+=1)q.splice(ae[re].newIndex,0,ae[re].trace);N.data=q;var xe=t.redraw(N);return l.add(N,J,_e,ye,ve),xe}function ee(N,U,G,q){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var ae={};if(typeof U=="string")ae[U]=G;else if(i.isPlainObject(U))ae=i.extendFlat({},U),q===void 0&&(q=G);else return i.warn("Restyle fail.",U,G,q),Promise.reject();Object.keys(ae).length&&(N.changed=!0);var J=w.coerceTraceIndices(N,q),ye=V(N,ae,J),_e=ye.flags;_e.calc&&(N.calcdata=void 0),_e.clearAxisTypes&&w.clearAxisTypes(N,J,{});var ve=[];_e.fullReplot?ve.push(t._doPlot):(ve.push(c.previousPromises),c.supplyDefaults(N),_e.markerSize&&(c.doCalcdata(N),ke(ve)),_e.style&&ve.push(m.doTraceStyle),_e.colorbars&&ve.push(m.doColorBars),ve.push(A)),ve.push(c.rehover,c.redrag),l.add(N,ee,[N,ye.undoit,ye.traces],ee,[N,ye.redoit,ye.traces]);var re=i.syncOrAsync(ve,N);return(!re||!re.then)&&(re=Promise.resolve()),re.then(function(){return N.emit("plotly_restyle",ye.eventData),N})}function ne(N){return N===void 0?null:N}function le(N,U){return U?function(G,q,ae){var J=n(G,q),ye=J.set;return J.set=function(_e){var ve=(ae||"")+q;se(ve,J.get(),_e,N),ye(_e)},J}:n}function se(N,U,G,q){if(Array.isArray(U)||Array.isArray(G))for(var ae=Array.isArray(U)?U:[],J=Array.isArray(G)?G:[],ye=Math.max(ae.length,J.length),_e=0;_e<ye;_e++)se(N+"["+_e+"]",ae[_e],J[_e],q);else if(i.isPlainObject(U)||i.isPlainObject(G)){var ve=i.isPlainObject(U)?U:{},re=i.isPlainObject(G)?G:{},xe=i.extendFlat({},ve,re);for(var we in xe)se(N+"."+we,ve[we],re[we],q)}else q[N]===void 0&&(q[N]=ne(U))}function oe(N,U,G){for(var q in G){var ae=n(N,q);se(q,ae.get(),G[q],U)}}function V(N,U,G){var q=N._fullLayout,ae=N._fullData,J=N.data,ye=q._guiEditing,_e=le(q._preGUI,ye),ve=i.extendDeepAll({},U),re;ie(U);var xe=y.traceFlags(),we={},Fe={},et;function ot(){return G.map(function(){})}function at(bt){var Zt=v.id2name(bt);et.indexOf(Zt)===-1&&et.push(Zt)}function qe(bt){return"LAYOUT"+bt+".autorange"}function kt(bt){return"LAYOUT"+bt+".range"}function it(bt){for(var Zt=bt;Zt<ae.length;Zt++)if(ae[Zt]._input===J[bt])return ae[Zt]}function Ye(bt,Zt,Ar){if(Array.isArray(bt)){bt.forEach(function(_r){Ye(_r,Zt,Ar)});return}if(!(bt in U||w.hasParent(U,bt))){var zt;if(bt.substr(0,6)==="LAYOUT")zt=_e(N.layout,bt.replace("LAYOUT",""));else{var Nt=G[Ar],mr=q._tracePreGUI[it(Nt)._fullInput.uid];zt=le(mr,ye)(J[Nt],bt)}bt in Fe||(Fe[bt]=ot()),Fe[bt][Ar]===void 0&&(Fe[bt][Ar]=ne(zt.get())),Zt!==void 0&&zt.set(Zt)}}function wt(bt){return function(Zt){return ae[Zt][bt]}}function mt(bt){return function(Zt,Ar){return Zt===!1?ae[G[Ar]][bt]:null}}for(var nt in U){if(w.hasParent(U,nt))throw new Error("cannot set "+nt+" and a parent attribute simultaneously");var Ke=U[nt],Ve,tt,pt,lt,Be,st;if((nt==="autobinx"||nt==="autobiny")&&(nt=nt.charAt(nt.length-1)+"bins",Array.isArray(Ke)?Ke=Ke.map(mt(nt)):Ke===!1?Ke=G.map(wt(nt)):Ke=null),we[nt]=Ke,nt.substr(0,6)==="LAYOUT"){pt=_e(N.layout,nt.replace("LAYOUT","")),Fe[nt]=[ne(pt.get())],pt.set(Array.isArray(Ke)?Ke[0]:Ke),xe.calc=!0;continue}for(Fe[nt]=ot(),re=0;re<G.length;re++){Ve=J[G[re]],tt=it(G[re]);var Lt=q._tracePreGUI[tt._fullInput.uid];if(pt=le(Lt,ye)(Ve,nt),lt=pt.get(),Be=Array.isArray(Ke)?Ke[re%Ke.length]:Ke,Be!==void 0){var pr=pt.parts[pt.parts.length-1],nr=nt.substr(0,nt.length-pr.length-1),kr=nr?nr+".":"",Nr=nr?n(tt,nr).get():tt;if(st=f.getTraceValObject(tt,pt.parts),st&&st.impliedEdits&&Be!==null)for(var li in st.impliedEdits)Ye(i.relativeAttr(nt,li),st.impliedEdits[li],re);else if((pr==="thicknessmode"||pr==="lenmode")&<!==Be&&(Be==="fraction"||Be==="pixels")&&Nr){var Xr=q._size,He=Nr.orient,ze=He==="top"||He==="bottom";if(pr==="thicknessmode"){var Qe=ze?Xr.h:Xr.w;Ye(kr+"thickness",Nr.thickness*(Be==="fraction"?1/Qe:Qe),re)}else{var Je=ze?Xr.w:Xr.h;Ye(kr+"len",Nr.len*(Be==="fraction"?1/Je:Je),re)}}else if(nt==="type"&&(Be==="pie"!=(lt==="pie")||Be==="funnelarea"!=(lt==="funnelarea"))){var Oe="x",Ze="y";(Be==="bar"||lt==="bar")&&Ve.orientation==="h"&&(Oe="y",Ze="x"),i.swapAttrs(Ve,["?","?src"],"labels",Oe),i.swapAttrs(Ve,["d?","?0"],"label",Oe),i.swapAttrs(Ve,["?","?src"],"values",Ze),lt==="pie"||lt==="funnelarea"?(n(Ve,"marker.color").set(n(Ve,"marker.colors").get()),q._pielayer.selectAll("g.trace").remove()):s.traceIs(Ve,"cartesian")&&n(Ve,"marker.colors").set(n(Ve,"marker.color").get())}Fe[nt][re]=ne(lt);var yt=["swapxy","swapxyaxes","orientation","orientationaxes"];if(yt.indexOf(nt)!==-1){if(nt==="orientation"){pt.set(Be);var Dt=Ve.x&&!Ve.y?"h":"v";if((pt.get()||Dt)===tt.orientation)continue}else nt==="orientationaxes"&&(Ve.orientation={v:"h",h:"v"}[tt.orientation]);w.swapXYData(Ve),xe.calc=xe.clearAxisTypes=!0}else c.dataArrayContainers.indexOf(pt.parts[0])!==-1?(w.manageArrayContainers(pt,Be,Fe),xe.calc=!0):(st?st.arrayOk&&!s.traceIs(tt,"regl")&&(i.isArrayOrTypedArray(Be)||i.isArrayOrTypedArray(lt))?xe.calc=!0:y.update(xe,st):xe.calc=!0,pt.set(Be))}}if(["swapxyaxes","orientationaxes"].indexOf(nt)!==-1&&v.swap(N,G),nt==="orientationaxes"){var $t=n(N.layout,"hovermode"),vr=$t.get();vr==="x"?$t.set("y"):vr==="y"?$t.set("x"):vr==="x unified"?$t.set("y unified"):vr==="y unified"&&$t.set("x unified")}if(["orientation","type"].indexOf(nt)!==-1){for(et=[],re=0;re<G.length;re++){var Ot=J[G[re]];s.traceIs(Ot,"cartesian")&&(at(Ot.xaxis||"x"),at(Ot.yaxis||"y"))}Ye(et.map(qe),!0,0),Ye(et.map(kt),[0,1],0)}}return(xe.calc||xe.plot)&&(xe.fullReplot=!0),{flags:xe,undoit:Fe,redoit:we,traces:G,eventData:i.extendDeepNoArrays([],[ve,G])}}function ie(N){var U=i.counterRegex("axis",".title",!1,!1),G=/colorbar\.title$/,q=Object.keys(N),ae,J,ye;for(ae=0;ae<q.length;ae++)J=q[ae],ye=N[J],(J==="title"||U.test(J)||G.test(J))&&(typeof ye=="string"||typeof ye=="number")?_e(J,J.replace("title","title.text")):J.indexOf("titlefont")>-1&&J.indexOf("grouptitlefont")===-1?_e(J,J.replace("titlefont","title.font")):J.indexOf("titleposition")>-1?_e(J,J.replace("titleposition","title.position")):J.indexOf("titleside")>-1?_e(J,J.replace("titleside","title.side")):J.indexOf("titleoffset")>-1&&_e(J,J.replace("titleoffset","title.offset"));function _e(ve,re){N[re]=N[ve],delete N[ve]}}function ge(N,U,G){N=i.getGraphDiv(N),w.clearPromiseQueue(N);var q={};if(typeof U=="string")q[U]=G;else if(i.isPlainObject(U))q=i.extendFlat({},U);else return i.warn("Relayout fail.",U,G),Promise.reject();Object.keys(q).length&&(N.changed=!0);var ae=Ae(N,q),J=ae.flags;J.calc&&(N.calcdata=void 0);var ye=[c.previousPromises];J.layoutReplot?ye.push(m.layoutReplot):Object.keys(q).length&&(de(N,J,ae)||c.supplyDefaults(N),J.legend&&ye.push(m.doLegend),J.layoutstyle&&ye.push(m.layoutStyles),J.axrange&&ke(ye,ae.rangesAltered),J.ticks&&ye.push(m.doTicksRelayout),J.modebar&&ye.push(m.doModeBar),J.camera&&ye.push(m.doCamera),J.colorbars&&ye.push(m.doColorBars),ye.push(A)),ye.push(c.rehover,c.redrag),l.add(N,ge,[N,ae.undoit],ge,[N,ae.redoit]);var _e=i.syncOrAsync(ye,N);return(!_e||!_e.then)&&(_e=Promise.resolve(N)),_e.then(function(){return N.emit("plotly_relayout",ae.eventData),N})}function de(N,U,G){var q=N._fullLayout;if(!U.axrange)return!1;for(var ae in U)if(ae!=="axrange"&&U[ae])return!1;for(var J in G.rangesAltered){var ye=v.id2name(J),_e=N.layout[ye],ve=q[ye];if(ve.autorange=_e.autorange,_e.range&&(ve.range=_e.range.slice()),ve.cleanRange(),ve._matchGroup){for(var re in ve._matchGroup)if(re!==J){var xe=q[v.id2name(re)];xe.autorange=ve.autorange,xe.range=ve.range.slice(),xe._input.range=ve.range.slice()}}}return!0}function ke(N,U){var G=U?function(q){var ae=[],J=!0;for(var ye in U){var _e=v.getFromId(q,ye);if(ae.push(ye),(_e.ticklabelposition||"").indexOf("inside")!==-1&&_e._anchorAxis&&ae.push(_e._anchorAxis._id),_e._matchGroup)for(var ve in _e._matchGroup)U[ve]||ae.push(ve);_e.automargin&&(J=!1)}return v.draw(q,ae,{skipTitle:J})}:function(q){return v.draw(q,"redraw")};N.push(g,m.doAutoRangeAndConstraints,G,m.drawData,m.finalDraw)}var ue=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,fe=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Ae(N,U){var G=N.layout,q=N._fullLayout,ae=q._guiEditing,J=le(q._preGUI,ae),ye=Object.keys(U),_e=v.list(N),ve=i.extendDeepAll({},U),re={},xe,we,Fe;for(ie(U),ye=Object.keys(U),we=0;we<ye.length;we++)if(ye[we].indexOf("allaxes")===0){for(Fe=0;Fe<_e.length;Fe++){var et=_e[Fe]._id.substr(1),ot=et.indexOf("scene")!==-1?et+".":"",at=ye[we].replace("allaxes",ot+_e[Fe]._name);U[at]||(U[at]=U[ye[we]])}delete U[ye[we]]}var qe=y.layoutFlags(),kt={},it={};function Ye(Nt,mr){if(Array.isArray(Nt)){Nt.forEach(function(Ri){Ye(Ri,mr)});return}if(!(Nt in U||w.hasParent(U,Nt))){var _r=J(G,Nt);Nt in it||(it[Nt]=ne(_r.get())),mr!==void 0&&_r.set(mr)}}var wt={},mt;function nt(Nt){var mr=v.name2id(Nt.split(".")[0]);return wt[mr]=1,mr}for(var Ke in U){if(w.hasParent(U,Ke))throw new Error("cannot set "+Ke+" and a parent attribute simultaneously");for(var Ve=J(G,Ke),tt=U[Ke],pt=Ve.parts.length,lt=pt-1;lt>0&&typeof Ve.parts[lt]!="string";)lt--;var Be=Ve.parts[lt],st=Ve.parts[lt-1]+"."+Be,Lt=Ve.parts.slice(0,lt).join("."),pr=n(N.layout,Lt).get(),nr=n(q,Lt).get(),kr=Ve.get();if(tt!==void 0){kt[Ke]=tt,it[Ke]=Be==="reverse"?tt:ne(kr);var Nr=f.getLayoutValObject(q,Ve.parts);if(Nr&&Nr.impliedEdits&&tt!==null)for(var li in Nr.impliedEdits)Ye(i.relativeAttr(Ke,li),Nr.impliedEdits[li]);if(["width","height"].indexOf(Ke)!==-1)if(tt){Ye("autosize",null);var Xr=Ke==="height"?"width":"height";Ye(Xr,q[Xr])}else q[Ke]=N._initialAutoSize[Ke];else if(Ke==="autosize")Ye("width",tt?null:q.width),Ye("height",tt?null:q.height);else if(st.match(ue))nt(st),n(q,Lt+"._inputRange").set(null);else if(st.match(Y)){nt(st),n(q,Lt+"._inputRange").set(null);var He=n(q,Lt).get();He._inputDomain&&(He._input.domain=He._inputDomain.slice())}else st.match(fe)&&n(q,Lt+"._inputDomain").set(null);if(Be==="type"){mt=pr;var ze=nr.type==="linear"&&tt==="log",Qe=nr.type==="log"&&tt==="linear";if(ze||Qe){if(!mt||!mt.range)Ye(Lt+".autorange",!0);else if(nr.autorange)ze&&(mt.range=mt.range[1]>mt.range[0]?[1,2]:[2,1]);else{var Je=mt.range[0],Oe=mt.range[1];ze?(Je<=0&&Oe<=0&&Ye(Lt+".autorange",!0),Je<=0?Je=Oe/1e6:Oe<=0&&(Oe=Je/1e6),Ye(Lt+".range[0]",Math.log(Je)/Math.LN10),Ye(Lt+".range[1]",Math.log(Oe)/Math.LN10)):(Ye(Lt+".range[0]",Math.pow(10,Je)),Ye(Lt+".range[1]",Math.pow(10,Oe)))}Array.isArray(q._subplots.polar)&&q._subplots.polar.length&&q[Ve.parts[0]]&&Ve.parts[1]==="radialaxis"&&delete q[Ve.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(N,nr,tt,Ye),s.getComponentMethod("images","convertCoords")(N,nr,tt,Ye)}else Ye(Lt+".autorange",!0),Ye(Lt+".range",null);n(q,Lt+"._inputRange").set(null)}else if(Be.match(x)){var Ze=n(q,Ke).get(),yt=(tt||{}).type;(!yt||yt==="-")&&(yt="linear"),s.getComponentMethod("annotations","convertCoords")(N,Ze,yt,Ye),s.getComponentMethod("images","convertCoords")(N,Ze,yt,Ye)}var Dt=b.containerArrayMatch(Ke);if(Dt){xe=Dt.array,we=Dt.index;var $t=Dt.property,vr=Nr||{editType:"calc"};we!==""&&$t===""&&(b.isAddVal(tt)?it[Ke]=null:b.isRemoveVal(tt)?it[Ke]=(n(G,xe).get()||[])[we]:i.warn("unrecognized full object value",U)),y.update(qe,vr),re[xe]||(re[xe]={});var Ot=re[xe][we];Ot||(Ot=re[xe][we]={}),Ot[$t]=tt,delete U[Ke]}else Be==="reverse"?(pr.range?pr.range.reverse():(Ye(Lt+".autorange",!0),pr.range=[1,0]),nr.autorange?qe.calc=!0:qe.plot=!0):(q._has("scatter-like")&&q._has("regl")&&Ke==="dragmode"&&(tt==="lasso"||tt==="select")&&!(kr==="lasso"||kr==="select")||q._has("gl2d")?qe.plot=!0:Nr?y.update(qe,Nr):qe.calc=!0,Ve.set(tt))}}for(xe in re){var bt=b.applyContainerArrayChanges(N,J(G,xe),re[xe],qe,J);bt||(qe.plot=!0)}for(var Zt in wt){mt=v.getFromId(N,Zt);var Ar=mt&&mt._constraintGroup;if(Ar){qe.calc=!0;for(var zt in Ar)wt[zt]||(v.getFromId(N,zt)._constraintShrinkable=!0)}}return(be(N)||U.height||U.width)&&(qe.plot=!0),(qe.plot||qe.calc)&&(qe.layoutReplot=!0),{flags:qe,rangesAltered:wt,undoit:it,redoit:kt,eventData:ve}}function be(N){var U=N._fullLayout,G=U.width,q=U.height;return N.layout.autosize&&c.plotAutoSize(N,N.layout,U),U.width!==G||U.height!==q}function Ce(N,U,G,q){N=i.getGraphDiv(N),w.clearPromiseQueue(N),i.isPlainObject(U)||(U={}),i.isPlainObject(G)||(G={}),Object.keys(U).length&&(N.changed=!0),Object.keys(G).length&&(N.changed=!0);var ae=w.coerceTraceIndices(N,q),J=V(N,i.extendFlat({},U),ae),ye=J.flags,_e=Ae(N,i.extendFlat({},G)),ve=_e.flags;(ye.calc||ve.calc)&&(N.calcdata=void 0),ye.clearAxisTypes&&w.clearAxisTypes(N,ae,G);var re=[];ve.layoutReplot?re.push(m.layoutReplot):ye.fullReplot?re.push(t._doPlot):(re.push(c.previousPromises),de(N,ve,_e)||c.supplyDefaults(N),ye.style&&re.push(m.doTraceStyle),(ye.colorbars||ve.colorbars)&&re.push(m.doColorBars),ve.legend&&re.push(m.doLegend),ve.layoutstyle&&re.push(m.layoutStyles),ve.axrange&&ke(re,_e.rangesAltered),ve.ticks&&re.push(m.doTicksRelayout),ve.modebar&&re.push(m.doModeBar),ve.camera&&re.push(m.doCamera),re.push(A)),re.push(c.rehover,c.redrag),l.add(N,Ce,[N,J.undoit,_e.undoit,J.traces],Ce,[N,J.redoit,_e.redoit,J.traces]);var xe=i.syncOrAsync(re,N);return(!xe||!xe.then)&&(xe=Promise.resolve(N)),xe.then(function(){return N.emit("plotly_update",{data:J.eventData,layout:_e.eventData}),N})}function Me(N){return function(G){G._fullLayout._guiEditing=!0;var q=N.apply(null,arguments);return G._fullLayout._guiEditing=!1,q}}var Te=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],X=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function pe(N,U){for(var G=0;G<U.length;G++){var q=U[G],ae=N.match(q.pattern);if(ae){var J=ae[1]||"";return{head:J,tail:N.substr(J.length+1),attr:q.attr}}}}function ce(N,U){var G=n(U,N).get();if(G!==void 0)return G;var q=N.split(".");for(q.pop();q.length>1;)if(q.pop(),G=n(U,q.join(".")+".uirevision").get(),G!==void 0)return G;return U.uirevision}function he(N,U){for(var G=0;G<U.length;G++)if(U[G]._fullInput.uid===N)return G;return-1}function De(N,U,G){for(var q=0;q<U.length;q++)if(U[q].uid===N)return q;return!U[G]||U[G].uid?-1:G}function je(N,U){var G=i.isPlainObject(N),q=Array.isArray(N);return G||q?(G&&i.isPlainObject(U)||q&&Array.isArray(U))&&JSON.stringify(N)===JSON.stringify(U):N===U}function $e(N,U,G,q){var ae=q._preGUI,J,ye,_e,ve,re,xe,we,Fe,et,ot,at=[],qe={},kt={};for(J in ae){if(re=pe(J,Te),re){if(et=re.head,ot=re.tail,ye=re.attr||et+".uirevision",_e=n(q,ye).get(),ve=_e&&ce(ye,U),ve&&ve===_e){if(xe=ae[J],xe===null&&(xe=void 0),we=n(U,J),Fe=we.get(),je(Fe,xe)){Fe===void 0&&ot==="autorange"&&at.push(et),we.set(ne(n(q,J).get()));continue}else if(ot==="autorange"||ot.substr(0,6)==="range["){var it=ae[et+".range[0]"],Ye=ae[et+".range[1]"],wt=ae[et+".autorange"];if(wt||wt===null&&it===null&&Ye===null){if(!(et in qe)){var mt=n(U,et).get();qe[et]=mt&&(mt.autorange||mt.autorange!==!1&&(!mt.range||mt.range.length!==2))}if(qe[et]){we.set(ne(n(q,J).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+J);delete ae[J],re&&re.tail.substr(0,6)==="range["&&(kt[re.head]=1)}for(var nt=0;nt<at.length;nt++){var Ke=at[nt];if(kt[Ke]){var Ve=n(U,Ke).get();Ve&&delete Ve.autorange}}var tt=q._tracePreGUI;for(var pt in tt){var lt=tt[pt],Be=null,st;for(J in lt){if(!Be){var Lt=he(pt,G);if(Lt<0){delete tt[pt];break}var pr=G[Lt];st=pr._fullInput;var nr=De(pt,N,st.index);if(nr<0){delete tt[pt];break}Be=N[nr]}if(re=pe(J,X),re){if(re.attr?(_e=n(q,re.attr).get(),ve=_e&&ce(re.attr,U)):(_e=st.uirevision,ve=Be.uirevision,ve===void 0&&(ve=U.uirevision)),ve&&ve===_e&&(xe=lt[J],xe===null&&(xe=void 0),we=n(Be,J),Fe=we.get(),je(Fe,xe))){we.set(ne(n(st,J).get()));continue}}else i.warn("unrecognized GUI edit: "+J+" in trace uid "+pt);delete lt[J]}}}function Se(N,U,G,q){var ae,J;function ye(){return t.addFrames(N,ae)}N=i.getGraphDiv(N),w.clearPromiseQueue(N);var _e=N._fullData,ve=N._fullLayout;if(!i.isPlotDiv(N)||!_e||!ve)J=t.newPlot(N,U,G,q);else{if(i.isPlainObject(U)){var re=U;U=re.data,G=re.layout,q=re.config,ae=re.frames}var xe=!1;if(q){var we=i.extendDeep({},N._context);N._context=void 0,$(N,q),xe=Ue(we,N._context)}N.data=U||[],w.cleanData(N.data),N.layout=G||{},w.cleanLayout(N.layout),$e(N.data,N.layout,_e,ve),c.supplyDefaults(N,{skipUpdateCalc:!0});var Fe=N._fullData,et=N._fullLayout,ot=et.datarevision===void 0,at=et.transition,qe=Pe(N,ve,et,ot,at),kt=qe.newDataRevision,it=Ge(N,_e,Fe,ot,at,kt);if(be(N)&&(qe.layoutReplot=!0),it.calc||qe.calc){N.calcdata=void 0;for(var Ye=Object.getOwnPropertyNames(et),wt=0;wt<Ye.length;wt++){var mt=Ye[wt],nt=mt.substring(0,5);if(nt==="xaxis"||nt==="yaxis"){var Ke=et[mt]._emptyCategories;Ke&&Ke()}}}else c.supplyDefaultsUpdateCalc(N.calcdata,Fe);var Ve=[];if(ae&&(N._transitionData={},c.createTransitionData(N),Ve.push(ye)),et.transition&&!xe&&(it.anim||qe.anim))qe.ticks&&Ve.push(m.doTicksRelayout),c.doCalcdata(N),m.doAutoRangeAndConstraints(N),Ve.push(function(){return c.transitionFromReact(N,it,qe,ve)});else if(it.fullReplot||qe.layoutReplot||xe)N._fullLayout._skipDefaults=!0,Ve.push(t._doPlot);else{for(var tt in qe.arrays){var pt=qe.arrays[tt];if(pt.length){var lt=s.getComponentMethod(tt,"drawOne");if(lt!==i.noop)for(var Be=0;Be<pt.length;Be++)lt(N,pt[Be]);else{var st=s.getComponentMethod(tt,"draw");if(st===i.noop)throw new Error("cannot draw components: "+tt);st(N)}}}Ve.push(c.previousPromises),it.style&&Ve.push(m.doTraceStyle),(it.colorbars||qe.colorbars)&&Ve.push(m.doColorBars),qe.legend&&Ve.push(m.doLegend),qe.layoutstyle&&Ve.push(m.layoutStyles),qe.axrange&&ke(Ve),qe.ticks&&Ve.push(m.doTicksRelayout),qe.modebar&&Ve.push(m.doModeBar),qe.camera&&Ve.push(m.doCamera),Ve.push(A)}Ve.push(c.rehover,c.redrag),J=i.syncOrAsync(Ve,N),(!J||!J.then)&&(J=Promise.resolve(N))}return J.then(function(){return N.emit("plotly_react",{data:U,layout:G}),N})}function Ge(N,U,G,q,ae,J){var ye=U.length===G.length;if(!ae&&!ye)return{fullReplot:!0,calc:!0};var _e=y.traceFlags();_e.arrays={},_e.nChanges=0,_e.nChangesAnim=0;var ve,re;function xe(et){var ot=f.getTraceValObject(re,et);return!re._module.animatable&&ot.anim&&(ot.anim=!1),ot}var we={getValObject:xe,flags:_e,immutable:q,transition:ae,newDataRevision:J,gd:N},Fe={};for(ve=0;ve<U.length;ve++)if(G[ve]){if(re=G[ve]._fullInput,c.hasMakesDataTransform(re)&&(re=G[ve]),Fe[re.uid])continue;Fe[re.uid]=1,Ie(U[ve]._fullInput,re,[],we)}return(_e.calc||_e.plot)&&(_e.fullReplot=!0),ae&&_e.nChanges&&_e.nChangesAnim&&(_e.anim=_e.nChanges===_e.nChangesAnim&&ye?"all":"some"),_e}function Pe(N,U,G,q,ae){var J=y.layoutFlags();J.arrays={},J.rangesAltered={},J.nChanges=0,J.nChangesAnim=0;function ye(ve){return f.getLayoutValObject(G,ve)}var _e={getValObject:ye,flags:J,immutable:q,transition:ae,gd:N};return Ie(U,G,[],_e),(J.plot||J.calc)&&(J.layoutReplot=!0),ae&&J.nChanges&&J.nChangesAnim&&(J.anim=J.nChanges===J.nChangesAnim?"all":"some"),J}function Ie(N,U,G,q){var ae,J,ye,_e=q.getValObject,ve=q.flags,re=q.immutable,xe=q.inArray,we=q.arrayIndex;function Fe(){var Lt=ae.editType;if(xe&&Lt.indexOf("arraydraw")!==-1){i.pushUnique(ve.arrays[xe],we);return}y.update(ve,ae),Lt!=="none"&&ve.nChanges++,q.transition&&ae.anim&&ve.nChangesAnim++,(ue.test(ye)||Y.test(ye))&&(ve.rangesAltered[G[0]]=1),fe.test(ye)&&n(U,"_inputDomain").set(null),J==="datarevision"&&(ve.newDataRevision=1)}function et(Lt){return Lt.valType==="data_array"||Lt.arrayOk}for(J in N){if(ve.calc&&!q.transition)return;var ot=N[J],at=U[J],qe=G.concat(J);if(ye=qe.join("."),!(J.charAt(0)==="_"||typeof ot=="function"||ot===at)){if((J==="tick0"||J==="dtick")&&G[0]!=="geo"){var kt=U.tickmode;if(kt==="auto"||kt==="array"||!kt)continue}if(!(J==="range"&&U.autorange)&&!((J==="zmin"||J==="zmax")&&U.type==="contourcarpet")&&(ae=_e(qe),!!ae&&!(ae._compareAsJSON&&JSON.stringify(ot)===JSON.stringify(at)))){var it=ae.valType,Ye,wt=et(ae),mt=Array.isArray(ot),nt=Array.isArray(at);if(mt&&nt){var Ke="_input_"+J,Ve=N[Ke],tt=U[Ke];if(Array.isArray(Ve)&&Ve===tt)continue}if(at===void 0)wt&&mt?ve.calc=!0:Fe();else if(ae._isLinkedToArray){var pt=[],lt=!1;xe||(ve.arrays[J]=pt);var Be=Math.min(ot.length,at.length),st=Math.max(ot.length,at.length);if(Be!==st)if(ae.editType==="arraydraw")lt=!0;else{Fe();continue}for(Ye=0;Ye<Be;Ye++)Ie(ot[Ye],at[Ye],qe.concat(Ye),i.extendFlat({inArray:J,arrayIndex:Ye},q));if(lt)for(Ye=Be;Ye<st;Ye++)pt.push(Ye)}else!it&&i.isPlainObject(ot)?Ie(ot,at,qe,q):wt?mt&&nt?(re&&(ve.calc=!0),(re||q.newDataRevision)&&Fe()):mt!==nt?ve.calc=!0:Fe():mt&&nt?(ot.length!==at.length||String(ot)!==String(at))&&Fe():Fe()}}}for(J in U)if(!(J in N||J.charAt(0)==="_"||typeof U[J]=="function"))if(ae=_e(G.concat(J)),et(ae)&&Array.isArray(U[J])){ve.calc=!0;return}else Fe()}function Ue(N,U){var G;for(G in N)if(G.charAt(0)!=="_"){var q=N[G],ae=U[G];if(q!==ae)if(i.isPlainObject(q)&&i.isPlainObject(ae)){if(Ue(q,ae))return!0}else if(Array.isArray(q)&&Array.isArray(ae)){if(q.length!==ae.length)return!0;for(var J=0;J<q.length;J++)if(q[J]!==ae[J])if(i.isPlainObject(q[J])&&i.isPlainObject(ae[J])){if(Ue(q[J],ae[J]))return!0}else return!0}else return!0}}function Xe(N,U,G){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var q=N._transitionData;q._frameQueue||(q._frameQueue=[]),G=c.supplyAnimationDefaults(G);var ae=G.transition,J=G.frame;q._frameWaitingCnt===void 0&&(q._frameWaitingCnt=0);function ye(re){return Array.isArray(ae)?re>=ae.length?ae[0]:ae[re]:ae}function _e(re){return Array.isArray(J)?re>=J.length?J[0]:J[re]:J}function ve(re,xe){var we=0;return function(){if(re&&++we===xe)return re()}}return new Promise(function(re,xe){function we(){if(q._frameQueue.length!==0){for(;q._frameQueue.length;){var Be=q._frameQueue.pop();Be.onInterrupt&&Be.onInterrupt()}N.emit("plotly_animationinterrupted",[])}}function Fe(Be){if(Be.length!==0){for(var st=0;st<Be.length;st++){var Lt;Be[st].type==="byname"?Lt=c.computeFrame(N,Be[st].name):Lt=Be[st].data;var pr=_e(st),nr=ye(st);nr.duration=Math.min(nr.duration,pr.duration);var kr={frame:Lt,name:Be[st].name,frameOpts:pr,transitionOpts:nr};st===Be.length-1&&(kr.onComplete=ve(re,2),kr.onInterrupt=xe),q._frameQueue.push(kr)}G.mode==="immediate"&&(q._lastFrameAt=-1/0),q._animationRaf||at()}}function et(){N.emit("plotly_animated"),window.cancelAnimationFrame(q._animationRaf),q._animationRaf=null}function ot(){q._currentFrame&&q._currentFrame.onComplete&&q._currentFrame.onComplete();var Be=q._currentFrame=q._frameQueue.shift();if(Be){var st=Be.name?Be.name.toString():null;N._fullLayout._currentFrame=st,q._lastFrameAt=Date.now(),q._timeToNext=Be.frameOpts.duration,c.transition(N,Be.frame.data,Be.frame.layout,w.coerceTraceIndices(N,Be.frame.traces),Be.frameOpts,Be.transitionOpts).then(function(){Be.onComplete&&Be.onComplete()}),N.emit("plotly_animatingframe",{name:st,frame:Be.frame,animation:{frame:Be.frameOpts,transition:Be.transitionOpts}})}else et()}function at(){N.emit("plotly_animating"),q._lastFrameAt=-1/0,q._timeToNext=0,q._runningTransitions=0,q._currentFrame=null;var Be=function(){q._animationRaf=window.requestAnimationFrame(Be),Date.now()-q._lastFrameAt>q._timeToNext&&ot()};Be()}var qe=0;function kt(Be){return Array.isArray(ae)?qe>=ae.length?Be.transitionOpts=ae[qe]:Be.transitionOpts=ae[0]:Be.transitionOpts=ae,qe++,Be}var it,Ye,wt=[],mt=U==null,nt=Array.isArray(U),Ke=!mt&&!nt&&i.isPlainObject(U);if(Ke)wt.push({type:"object",data:kt(i.extendFlat({},U))});else if(mt||["string","number"].indexOf(typeof U)!==-1)for(it=0;it<q._frames.length;it++)Ye=q._frames[it],!!Ye&&(mt||String(Ye.group)===String(U))&&wt.push({type:"byname",name:String(Ye.name),data:kt({name:Ye.name})});else if(nt)for(it=0;it<U.length;it++){var Ve=U[it];["number","string"].indexOf(typeof Ve)!==-1?(Ve=String(Ve),wt.push({type:"byname",name:Ve,data:kt({name:Ve})})):i.isPlainObject(Ve)&&wt.push({type:"object",data:kt(i.extendFlat({},Ve))})}for(it=0;it<wt.length;it++)if(Ye=wt[it],Ye.type==="byname"&&!q._frameHash[Ye.data.name]){i.warn('animate failure: frame not found: "'+Ye.data.name+'"'),xe();return}["next","immediate"].indexOf(G.mode)!==-1&&we(),G.direction==="reverse"&&wt.reverse();var tt=N._fullLayout._currentFrame;if(tt&&G.fromcurrent){var pt=-1;for(it=0;it<wt.length;it++)if(Ye=wt[it],Ye.type==="byname"&&Ye.name===tt){pt=it;break}if(pt>0&&pt<wt.length-1){var lt=[];for(it=0;it<wt.length;it++)Ye=wt[it],(wt[it].type!=="byname"||it>pt)&<.push(Ye);wt=lt}}wt.length>0?Fe(wt):(N.emit("plotly_animated"),re())})}function St(N,U,G){if(N=i.getGraphDiv(N),U==null)return Promise.resolve();if(!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var q,ae,J,ye,_e=N._transitionData._frames,ve=N._transitionData._frameHash;if(!Array.isArray(U))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+U);var re=_e.length+U.length*2,xe=[],we={};for(q=U.length-1;q>=0;q--)if(!!i.isPlainObject(U[q])){var Fe=U[q].name,et=(ve[Fe]||we[Fe]||{}).name,ot=U[q].name,at=ve[et]||we[et];et&&ot&&typeof ot=="number"&&at&&T<k&&(T++,i.warn('addFrames: overwriting frame "'+(ve[et]||we[et]).name+'" with a frame whose name of type "number" also equates to "'+et+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),T===k&&i.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),we[Fe]={name:Fe},xe.push({frame:c.supplyFrameDefaults(U[q]),index:G&&G[q]!==void 0&&G[q]!==null?G[q]:re+q})}xe.sort(function(Ke,Ve){return Ke.index>Ve.index?-1:Ke.index<Ve.index?1:0});var qe=[],kt=[],it=_e.length;for(q=xe.length-1;q>=0;q--){if(ae=xe[q].frame,typeof ae.name=="number"&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ae.name)for(;ve[ae.name="frame "+N._transitionData._counter++];);if(ve[ae.name]){for(J=0;J<_e.length&&(_e[J]||{}).name!==ae.name;J++);qe.push({type:"replace",index:J,value:ae}),kt.unshift({type:"replace",index:J,value:_e[J]})}else ye=Math.max(0,Math.min(xe[q].index,it)),qe.push({type:"insert",index:ye,value:ae}),kt.unshift({type:"delete",index:ye}),it++}var Ye=c.modifyFrames,wt=c.modifyFrames,mt=[N,kt],nt=[N,qe];return l&&l.add(N,Ye,mt,wt,nt),c.modifyFrames(N,qe)}function ht(N,U){if(N=i.getGraphDiv(N),!i.isPlotDiv(N))throw new Error("This element is not a Plotly plot: "+N);var G,q,ae=N._transitionData._frames,J=[],ye=[];if(!U)for(U=[],G=0;G<ae.length;G++)U.push(G);for(U=U.slice(),U.sort(),G=U.length-1;G>=0;G--)q=U[G],J.push({type:"delete",index:q}),ye.unshift({type:"insert",index:q,value:ae[q]});var _e=c.modifyFrames,ve=c.modifyFrames,re=[N,ye],xe=[N,J];return l&&l.add(N,_e,re,ve,xe),c.modifyFrames(N,J)}function Ft(N){N=i.getGraphDiv(N);var U=N._fullLayout||{},G=N._fullData||[];return c.cleanPlot([],{},G,U),c.purge(N),o.purge(N),U._container&&U._container.remove(),delete N._context,N}function ut(N){var U=N._fullLayout,G=N.getBoundingClientRect();if(!i.equalDomRects(G,U._lastBBox)){var q=U._invTransform=i.inverseTransformMatrix(i.getFullTransformMatrix(N));U._invScaleX=Math.sqrt(q[0][0]*q[0][0]+q[0][1]*q[0][1]+q[0][2]*q[0][2]),U._invScaleY=Math.sqrt(q[1][0]*q[1][0]+q[1][1]*q[1][1]+q[1][2]*q[1][2]),U._lastBBox=G}}function _t(N){var U=e.select(N),G=N._fullLayout;if(G._calcInverseTransform=ut,G._calcInverseTransform(N),G._container=U.selectAll(".plot-container").data([0]),G._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),G._paperdiv=G._container.selectAll(".svg-container").data([0]),G._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),G._glcontainer=G._paperdiv.selectAll(".gl-container").data([{}]),G._glcontainer.enter().append("div").classed("gl-container",!0),G._paperdiv.selectAll(".main-svg").remove(),G._paperdiv.select(".modebar-container").remove(),G._paper=G._paperdiv.insert("svg",":first-child").classed("main-svg",!0),G._toppaper=G._paperdiv.append("svg").classed("main-svg",!0),G._modebardiv=G._paperdiv.append("div"),delete G._modeBar,G._hoverpaper=G._paperdiv.append("svg").classed("main-svg",!0),!G._uid){var q={};e.selectAll("defs").each(function(){this.id&&(q[this.id.split("-")[1]]=1)}),G._uid=i.randstr(q)}G._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),G._defs=G._paper.append("defs").attr("id","defs-"+G._uid),G._clips=G._defs.append("g").classed("clips",!0),G._topdefs=G._toppaper.append("defs").attr("id","topdefs-"+G._uid),G._topclips=G._topdefs.append("g").classed("clips",!0),G._bgLayer=G._paper.append("g").classed("bglayer",!0),G._draggers=G._paper.append("g").classed("draglayer",!0);var ae=G._paper.append("g").classed("layer-below",!0);G._imageLowerLayer=ae.append("g").classed("imagelayer",!0),G._shapeLowerLayer=ae.append("g").classed("shapelayer",!0),G._cartesianlayer=G._paper.append("g").classed("cartesianlayer",!0),G._polarlayer=G._paper.append("g").classed("polarlayer",!0),G._smithlayer=G._paper.append("g").classed("smithlayer",!0),G._ternarylayer=G._paper.append("g").classed("ternarylayer",!0),G._geolayer=G._paper.append("g").classed("geolayer",!0),G._funnelarealayer=G._paper.append("g").classed("funnelarealayer",!0),G._pielayer=G._paper.append("g").classed("pielayer",!0),G._iciclelayer=G._paper.append("g").classed("iciclelayer",!0),G._treemaplayer=G._paper.append("g").classed("treemaplayer",!0),G._sunburstlayer=G._paper.append("g").classed("sunburstlayer",!0),G._indicatorlayer=G._toppaper.append("g").classed("indicatorlayer",!0),G._glimages=G._paper.append("g").classed("glimages",!0);var J=G._toppaper.append("g").classed("layer-above",!0);G._imageUpperLayer=J.append("g").classed("imagelayer",!0),G._shapeUpperLayer=J.append("g").classed("shapelayer",!0),G._infolayer=G._toppaper.append("g").classed("infolayer",!0),G._menulayer=G._toppaper.append("g").classed("menulayer",!0),G._zoomlayer=G._toppaper.append("g").classed("zoomlayer",!0),G._hoverlayer=G._hoverpaper.append("g").classed("hoverlayer",!0),G._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),N.emit("plotly_framework")}t.animate=Xe,t.addFrames=St,t.deleteFrames=ht,t.addTraces=Z,t.deleteTraces=K,t.extendTraces=W,t.moveTraces=Q,t.prependTraces=j,t.newPlot=P,t._doPlot=S,t.purge=Ft,t.react=Se,t.redraw=I,t.relayout=ge,t.restyle=ee,t.setPlotConfig=E,t.update=Ce,t._guiRelayout=Me(ge),t._guiRestyle=Me(ee),t._guiUpdate=Me(Ce),t._storeDirectGUIEdit=oe})(Wd);var Ir={},$5=We;Ir.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0};Ir.getRedrawFunc=function(t){return function(){$5.getComponentMethod("colorbar","draw")(t)}};Ir.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)};Ir.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var R_=window.URL||window.webkitURL;Ir.createObjectURL=function(t){return R_.createObjectURL(t)};Ir.revokeObjectURL=function(t){return R_.revokeObjectURL(t)};Ir.createBlob=function(t,e){if(e==="svg")return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if(e==="full-json")return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=R5(window.atob(t));return new window.Blob([r],{type:"image/"+e})};Ir.octetStream=function(t){document.location.href="data:application/octet-stream"+t};function R5(t){for(var e=t.length,r=new ArrayBuffer(e),a=new Uint8Array(r),i=0;i<e;i++)a[i]=t.charCodeAt(i);return r}Ir.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/;Ir.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead.";var nd=ct.exports,P5=me.exports,z5=Pt.exports,I5=ft.exports,xs=dn,Tu=/"/g,il="TOBESTRIPPED",N5=new RegExp('("'+il+")|("+il+'")',"g");function F5(t){var e=nd.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,function(a){return a==="<"?"<":a==="&rt;"?">":a.indexOf("<")!==-1||a.indexOf(">")!==-1?"":e.html(a).text()});return e.remove(),r}function H5(t){return t.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}var Ph=function(e,r,a){var i=e._fullLayout,n=i._paper,o=i._toppaper,l=i.width,s=i.height,f;n.insert("rect",":first-child").call(z5.setRect,0,0,l,s).call(I5.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(f=0;f<c.length;f++){var v=c[f];v.toSVG&&v.toSVG(e)}if(o){var u=o.node().childNodes,d=Array.prototype.slice.call(u);for(f=0;f<d.length;f++){var h=d[f];h.childNodes.length&&n.node().appendChild(h)}}i._draggers&&i._draggers.remove(),n.node().style.background="",n.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var g=nd.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){g.remove();return}else g.style({visibility:null,display:null});var _=this.style.fontFamily;_&&_.indexOf('"')!==-1&&g.style("font-family",_.replace(Tu,il))}),n.selectAll(".gradient_filled,.pattern_filled").each(function(){var g=nd.select(this),_=this.style.fill;_&&_.indexOf("url(")!==-1&&g.style("fill",_.replace(Tu,il));var b=this.style.stroke;b&&b.indexOf("url(")!==-1&&g.style("stroke",b.replace(Tu,il))}),(r==="pdf"||r==="eps")&&n.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),n.node().setAttributeNS(xs.xmlns,"xmlns",xs.svg),n.node().setAttributeNS(xs.xmlns,"xmlns:xlink",xs.xlink),r==="svg"&&a&&(n.attr("width",a*l),n.attr("height",a*s),n.attr("viewBox","0 0 "+l+" "+s));var p=new window.XMLSerializer().serializeToString(n.node());return p=F5(p),p=H5(p),p=p.replace(N5,"'"),P5.isIE()&&(p=p.replace(/"/gi,"'"),p=p.replace(/(\('#)([^']*)('\))/gi,'("#$2")'),p=p.replace(/(\\')/gi,'"')),p},by=me.exports,O5=Ed.exports.EventEmitter,Tn=Ir;function B5(t){var e=t.emitter||new O5,r=new Promise(function(a,i){var n=window.Image,o=t.svg,l=t.format||"png";if(by.isIE()&&l!=="svg"){var s=new Error(Tn.MSG_IE_BAD_FORMAT);return i(s),t.promise?r:e.emit("error",s)}var f=t.canvas,c=t.scale||1,v=t.width||300,u=t.height||150,d=c*v,h=c*u,p=f.getContext("2d"),g=new n,_,b;l==="svg"||by.isSafari()?b=Tn.encodeSVG(o):(_=Tn.createBlob(o,"svg"),b=Tn.createObjectURL(_)),f.width=d,f.height=h,g.onload=function(){var w;switch(_=null,Tn.revokeObjectURL(b),l!=="svg"&&p.drawImage(g,0,0,d,h),l){case"jpeg":w=f.toDataURL("image/jpeg");break;case"png":w=f.toDataURL("image/png");break;case"webp":w=f.toDataURL("image/webp");break;case"svg":w=b;break;default:var m="Image format is not jpeg, png, svg or webp.";if(i(new Error(m)),!t.promise)return e.emit("error",m)}a(w),t.promise||e.emit("success",w)},g.onerror=function(w){if(_=null,Tn.revokeObjectURL(b),i(w),!t.promise)return e.emit("error",w)},g.src=b});return t.promise?r:e}var zh=B5,xy=gt,_y=Wd,j5=ar.exports,Pa=me.exports,Fo=Ir,G5=Ph,U5=zh,V5=Of.version,ku={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png",description:"Sets the format of exported image."},width:{valType:"number",min:1,description:["Sets the exported image width.","Defaults to the value found in `layout.width`","If set to *null*, the exported image width will match the current graph width."].join(" ")},height:{valType:"number",min:1,description:["Sets the exported image height.","Defaults to the value found in `layout.height`","If set to *null*, the exported image height will match the current graph height."].join(" ")},scale:{valType:"number",min:0,dflt:1,description:["Sets a scaling for the generated image.","If set, all features of a graphs (e.g. text, line width)","are scaled, unlike simply setting","a bigger *width* and *height*."].join(" ")},setBackground:{valType:"any",dflt:!1,description:["Sets the image background mode.","By default, the image background is determined by `layout.paper_bgcolor`,","the *transparent* mode.","One might consider setting `setBackground` to *opaque*","when exporting a *jpeg* image as JPEGs do not support opacity."].join(" ")},imageDataOnly:{valType:"boolean",dflt:!1,description:["Determines whether or not the return value is prefixed by","the image format's corresponding 'data:image;' spec."].join(" ")}};function q5(t,e){e=e||{};var r,a,i,n;Pa.isPlainObject(t)?(r=t.data||[],a=t.layout||{},i=t.config||{},n={}):(t=Pa.getGraphDiv(t),r=Pa.extendDeep([],t.data),a=Pa.extendDeep({},t.layout),i=t._context,n=t._fullLayout||{});function o(x){return!(x in e)||Pa.validate(e[x],ku[x])}if(!o("width")&&e.width!==null||!o("height")&&e.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Pa.join2(ku.format.values,", "," or ")+".");var l={};function s(x,T){return Pa.coerce(e,l,ku,x,T)}var f=s("format"),c=s("width"),v=s("height"),u=s("scale"),d=s("setBackground"),h=s("imageDataOnly"),p=document.createElement("div");p.style.position="absolute",p.style.left="-5000px",document.body.appendChild(p);var g=Pa.extendFlat({},a);c?g.width=c:e.width===null&&xy(n.width)&&(g.width=n.width),v?g.height=v:e.height===null&&xy(n.height)&&(g.height=n.height);var _=Pa.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),b=Fo.getRedrawFunc(p);function w(){return new Promise(function(x){setTimeout(x,Fo.getDelay(p._fullLayout))})}function m(){return new Promise(function(x,T){var k=G5(p,f,u),S=p._fullLayout.width,A=p._fullLayout.height;function E(){_y.purge(p),document.body.removeChild(p)}if(f==="full-json"){var M=j5.graphJson(p,!1,"keepdata","object",!0,!0);return M.version=V5,M=JSON.stringify(M),E(),x(h?M:Fo.encodeJSON(M))}if(E(),f==="svg")return x(h?k:Fo.encodeSVG(k));var D=document.createElement("canvas");D.id=Pa.randstr(),U5({format:f,width:S,height:A,scale:u,canvas:D,svg:k,promise:!0}).then(x).catch(T)})}function y(x){return h?x.replace(Fo.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,T){_y.newPlot(p,r,g,_).then(b).then(w).then(m).then(function(k){x(y(k))}).catch(function(k){T(k)})})}var P_=q5,fa=me.exports,X5=ar.exports,Y5=go,W5=po.dfltConfig,aa=fa.isPlainObject,wi=Array.isArray,wy=fa.isArrayOrTypedArray,Z5=function(e,r){e===void 0&&(e=[]),r===void 0&&(r={});var a=Y5.get(),i=[],n={_context:fa.extendFlat({},W5)},o,l;wi(e)?(n.data=fa.extendDeep([],e),o=e):(n.data=[],o=[],i.push(lr("array","data"))),aa(r)?(n.layout=fa.extendDeep({},r),l=r):(n.layout={},l={},arguments.length>1&&i.push(lr("object","layout"))),X5.supplyDefaults(n);for(var s=n._fullData,f=o.length,c=0;c<f;c++){var v=o[c],u=["data",c];if(!aa(v)){i.push(lr("object",u));continue}var d=s[c],h=d.type,p=a.traces[h].attributes;p.type={valType:"enumerated",values:[h]},d.visible===!1&&v.visible!==!1&&i.push(lr("invisible",u)),nl(v,d,p,i,u);var g=v.transforms,_=d.transforms;if(g){wi(g)||i.push(lr("array",u,["transforms"])),u.push("transforms");for(var b=0;b<g.length;b++){var w=["transforms",b],m=g[b].type;if(!aa(g[b])){i.push(lr("object",u,w));continue}var y=a.transforms[m]?a.transforms[m].attributes:{};y.type={valType:"enumerated",values:Object.keys(a.transforms)},nl(g[b],_[b],y,i,u,w)}}}var x=n._fullLayout,T=K5(a,s);return nl(l,x,T,i,"layout"),i.length===0?void 0:i};function nl(t,e,r,a,i,n){n=n||[];for(var o=Object.keys(t),l=0;l<o.length;l++){var s=o[l];if(s!=="transforms"){var f=n.slice();f.push(s);var c=t[s],v=e[s],u=e3(r,s),d=(u||{}).valType,h=d==="info_array",p=d==="colorscale",g=(u||{}).items;if(!J5(r,s))a.push(lr("schema",i,f));else if(aa(c)&&aa(v)&&d!=="any")nl(c,v,u,a,i,f);else if(h&&wi(c)){c.length>v.length&&a.push(lr("unused",i,f.concat(v.length)));var _=v.length,b=Array.isArray(g);b&&(_=Math.min(_,g.length));var w,m,y,x,T;if(u.dimensions===2)for(m=0;m<_;m++)if(wi(c[m])){c[m].length>v[m].length&&a.push(lr("unused",i,f.concat(m,v[m].length)));var k=v[m].length;for(w=0;w<(b?Math.min(k,g[m].length):k);w++)y=b?g[m][w]:g,x=c[m][w],T=v[m][w],fa.validate(x,y)?T!==x&&T!==+x&&a.push(lr("dynamic",i,f.concat(m,w),x,T)):a.push(lr("value",i,f.concat(m,w),x))}else a.push(lr("array",i,f.concat(m),c[m]));else for(m=0;m<_;m++)y=b?g[m]:g,x=c[m],T=v[m],fa.validate(x,y)?T!==x&&T!==+x&&a.push(lr("dynamic",i,f.concat(m),x,T)):a.push(lr("value",i,f.concat(m),x))}else if(u.items&&!h&&wi(c)){var S=g[Object.keys(g)[0]],A=[],E,M;for(E=0;E<v.length;E++){var D=v[E]._index||E;if(M=f.slice(),M.push(D),aa(c[D])&&aa(v[E])){A.push(D);var $=c[D],I=v[E];aa($)&&$.visible!==!1&&I.visible===!1?a.push(lr("invisible",i,M)):nl($,I,S,a,i,M)}}for(E=0;E<c.length;E++)M=f.slice(),M.push(E),aa(c[E])?A.indexOf(E)===-1&&a.push(lr("unused",i,M)):a.push(lr("object",i,M,c[E]))}else!aa(c)&&aa(v)?a.push(lr("object",i,f,c)):!wy(c)&&wy(v)&&!h&&!p?a.push(lr("array",i,f,c)):s in e?fa.validate(c,u)?u.valType==="enumerated"&&(u.coerceNumber&&c!==+v||c!==v)&&a.push(lr("dynamic",i,f,c,v)):a.push(lr("value",i,f,c)):a.push(lr("unused",i,f,c))}}return a}function K5(t,e){for(var r=t.layout.layoutAttributes,a=0;a<e.length;a++){var i=e[a],n=t.traces[i.type],o=n.layoutAttributes;o&&(i.subplot?fa.extendFlat(r[n.attributes.subplot.dflt],o):fa.extendFlat(r,o))}return r}var Q5={object:function(t,e){var r;return t==="layout"&&e===""?r="The layout argument":t[0]==="data"&&e===""?r="Trace "+t[1]+" in the data argument":r=Ni(t)+"key "+e,r+" must be linked to an object container"},array:function(t,e){var r;return t==="data"?r="The data argument":r=Ni(t)+"key "+e,r+" must be linked to an array container"},schema:function(t,e){return Ni(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var a=aa(r)?"container":"key";return Ni(t)+a+" "+e+" did not get coerced"},dynamic:function(t,e,r,a){return[Ni(t)+"key",e,"(set to '"+r+"')","got reset to","'"+a+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?Ni(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[Ni(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function Ni(t){return wi(t)?"In data trace "+t[1]+", ":"In "+t+", "}function lr(t,e,r,a,i){r=r||"";var n,o;wi(e)?(n=e[0],o=e[1]):(n=e,o=null);var l=r3(r),s=Q5[t](e,l,a,i);return fa.log(s),{code:t,container:n,trace:o,path:r,astr:l,msg:s}}function J5(t,e){var r=z_(e),a=r.keyMinusId,i=r.id;return a in t&&t[a]._isSubplotObj&&i?!0:e in t}function e3(t,e){if(e in t)return t[e];var r=z_(e);return t[r.keyMinusId]}var t3=fa.counterRegex("([a-z]+)");function z_(t){var e=t.match(t3);return{keyMinusId:e&&e[1],id:e&&e[2]}}function r3(t){if(!wi(t))return String(t);for(var e="",r=0;r<t.length;r++){var a=t[r];typeof a=="number"?e=e.substr(0,e.length-1)+"["+a+"]":e+=a,r<t.length-1&&(e+=".")}return e}var Ty=me.exports,Ho=Ir;function a3(t,e,r){var a=document.createElement("a"),i="download"in a,n=new Promise(function(o,l){var s,f;if(Ty.isIE())return s=Ho.createBlob(t,"svg"),window.navigator.msSaveBlob(s,e),s=null,o(e);if(i)return s=Ho.createBlob(t,r),f=Ho.createObjectURL(s),a.href=f,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),Ho.revokeObjectURL(f),s=null,o(e);if(Ty.isSafari()){var c=r==="svg"?",":";base64,";return Ho.octetStream(c+encodeURIComponent(t)),o(e)}l(new Error("download error"))});return n}var i3=a3,Au=me.exports,n3=P_,o3=i3,l3=Ir;function s3(t,e){var r;return Au.isPlainObject(t)||(r=Au.getGraphDiv(t)),e=e||{},e.format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise(function(a,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),Au.isIE()&&e.format!=="svg"&&i(new Error(l3.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var n=n3(t,e),o=e.filename||t.fn||"newplot";o+="."+e.format.replace("-","."),n.then(function(l){return r&&(r._snapshotInProgress=!1),o3(l,o,e.format)}).then(function(l){a(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),i(l)})})}var I_=s3,Ih={},Br=me.exports,jr=Br.isPlainObject,N_=go,F_=ar.exports,f3=Ba,H_=Ht,O_=po.dfltConfig;Ih.makeTemplate=function(t){t=Br.isPlainObject(t)?t:Br.getGraphDiv(t),t=Br.extendDeep({_context:O_},{data:t.data,layout:t.layout}),F_.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(d){var h={};ol(d,h,u3.bind(null,d));var p=Br.coerce(d,{},f3,"type"),g=a.data[p];g||(g=a.data[p]=[]),g.push(h)}),ol(r,a.layout,c3.bind(null,r)),delete a.layout.template;var i=r.template;if(jr(i)){var n=i.layout,o,l,s,f,c,v;jr(n)&&Tf(n,a.layout);var u=i.data;if(jr(u)){for(l in a.data)if(s=u[l],Array.isArray(s)){for(c=a.data[l],v=c.length,f=s.length,o=0;o<v;o++)Tf(s[o%f],c[o]);for(o=v;o<f;o++)c.push(Br.extendDeep({},s[o]))}for(l in u)l in a.data||(a.data[l]=Br.extendDeep([],u[l]))}}return a};function Tf(t,e){t=Br.extendDeep({},t);var r=Object.keys(t).sort(),a,i;function n(c,v,u){if(jr(v)&&jr(c))Tf(c,v);else if(Array.isArray(v)&&Array.isArray(c)){var d=H_.arrayTemplater({_template:t},u);for(i=0;i<v.length;i++){var h=v[i],p=d.newItem(h)._template;p&&Tf(p,h)}var g=d.defaultItems();for(i=0;i<g.length;i++)v.push(g[i]._template);for(i=0;i<v.length;i++)delete v[i].templateitemname}}for(a=0;a<r.length;a++){var o=r[a],l=t[o];if(o in e?n(l,e[o],o):e[o]=l,kf(o)===o)for(var s in e){var f=kf(s);s!==f&&f===o&&!(s in t)&&n(l,e[s],o)}}}function kf(t){return t.replace(/[0-9]+$/,"")}function ol(t,e,r,a,i){var n=i&&r(i);for(var o in t){var l=t[o],s=ia(t,o,a),f=ia(t,o,i),c=r(f);if(!c){var v=kf(o);v!==o&&(f=ia(t,v,i),c=r(f))}if(!(n&&n===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(l)))if(!c.valType&&jr(l))ol(l,e,r,s,f);else if(c._isLinkedToArray&&Array.isArray(l))for(var u=!1,d=0,h={},p=0;p<l.length;p++){var g=l[p];if(jr(g)){var _=g.name;if(_)h[_]||(ol(g,e,r,ia(l,d,s),ia(l,d,f)),d++,h[_]=1);else if(!u){var b=H_.arrayDefaultKey(o),w=ia(t,b,a),m=ia(l,d,s);ol(g,e,r,m,ia(l,d,f));var y=Br.nestedProperty(e,m),x=Br.nestedProperty(e,w);x.set(y.get()),y.set(null),u=!0}}}else{var T=Br.nestedProperty(e,s);T.set(l)}}}function c3(t,e){return N_.getLayoutValObject(t,Br.nestedProperty({},e).parts)}function u3(t,e){return N_.getTraceValObject(t,Br.nestedProperty({},e).parts)}function ia(t,e,r){var a;return r?Array.isArray(t)?a=r+"["+e+"]":a=r+"."+e:a=e,a}Ih.validateTemplate=function(t,e){var r=Br.extendDeep({},{_context:O_,data:t.data,layout:t.layout}),a=r.layout||{};jr(e)||(e=a.template||{});var i=e.layout,n=e.data,o=[];r.layout=a,r.layout.template=e,F_.supplyDefaults(r);var l=r._fullLayout,s=r._fullData,f={};function c(w,m){for(var y in w)if(y.charAt(0)!=="_"&&jr(w[y])){var x=kf(y),T=[],k;for(k=0;k<m.length;k++)T.push(ia(w,y,m[k])),x!==y&&T.push(ia(w,x,m[k]));for(k=0;k<T.length;k++)f[T[k]]=1;c(w[y],T)}}function v(w,m){for(var y in w)if(y.indexOf("defaults")===-1&&jr(w[y])){var x=ia(w,y,m);f[x]?v(w[y],x):o.push({code:"unused",path:x})}}if(jr(i)?(c(l,["layout"]),v(i,"layout")):o.push({code:"layout"}),!jr(n))o.push({code:"data"});else{for(var u={},d,h=0;h<s.length;h++){var p=s[h];d=p.type,u[d]=(u[d]||0)+1,p._fullInput._template||o.push({code:"missing",index:p._fullInput.index,traceType:d})}for(d in n){var g=n[d].length,_=u[d]||0;g>_?o.push({code:"unused",traceType:d,templateCount:g,dataCount:_}):_>g&&o.push({code:"reused",traceType:d,templateCount:g,dataCount:_})}}function b(w,m){for(var y in w)if(y.charAt(0)!=="_"){var x=w[y],T=ia(w,y,m);jr(x)?(Array.isArray(w)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:T,templateitemname:x.templateitemname}),b(x,T)):Array.isArray(x)&&v3(x)&&b(x,T)}}if(b({data:s,layout:l},""),o.length)return o.map(d3)};function v3(t){for(var e=0;e<t.length;e++)if(jr(t[e]))return!0}function d3(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":t.path?e="There are no templates for item "+t.path+" with name "+t.templateitemname:e="There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":t.path?e="The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?e="Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":e="The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type.";break}return t.msg=e,t}var ur=Wd;Wt._doPlot=ur._doPlot;Wt.newPlot=ur.newPlot;Wt.restyle=ur.restyle;Wt.relayout=ur.relayout;Wt.redraw=ur.redraw;Wt.update=ur.update;Wt._guiRestyle=ur._guiRestyle;Wt._guiRelayout=ur._guiRelayout;Wt._guiUpdate=ur._guiUpdate;Wt._storeDirectGUIEdit=ur._storeDirectGUIEdit;Wt.react=ur.react;Wt.extendTraces=ur.extendTraces;Wt.prependTraces=ur.prependTraces;Wt.addTraces=ur.addTraces;Wt.deleteTraces=ur.deleteTraces;Wt.moveTraces=ur.moveTraces;Wt.purge=ur.purge;Wt.addFrames=ur.addFrames;Wt.deleteFrames=ur.deleteFrames;Wt.animate=ur.animate;Wt.setPlotConfig=ur.setPlotConfig;Wt.toImage=P_;Wt.validate=Z5;Wt.downloadImage=I_;var B_=Ih;Wt.makeTemplate=B_.makeTemplate;Wt.validateTemplate=B_.validateTemplate;var qr={},j_=Kx,h3=j_.FORMAT_LINK,p3=j_.DATE_FORMAT_LINK;function G_(t){var e=t&&t.supportOther;return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,h3,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,p3,"for details on the date formatting syntax."].join(" ")}function U_(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var a=[],i=0;i<r.length;i++)a[i]="`"+r[i]+"`";e=e+"Finally, the template string has access to ",r.length===1?e="variable "+a[0]:e="variables "+a.slice(0,-1).join(", ")+" and "+a.slice(-1)+"."}return e}qr.hovertemplateAttrs=function(t,e){t=t||{},e=e||{};var r=U_(e),a={valType:"string",dflt:"",editType:t.editType||"none",description:["Template string used for rendering the information that appear on hover box.","Note that this will override `hoverinfo`.",G_({supportOther:!0}),"The variables available in `hovertemplate` are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data.","Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r,'Anything contained in tag `<extra>` is displayed in the secondary box, for example "<extra>{fullData.name}</extra>".',"To hide the secondary box completely, use an empty tag `<extra></extra>`."].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};qr.texttemplateAttrs=function(t,e){t=t||{},e=e||{};var r=U_(e),a={valType:"string",dflt:"",editType:t.editType||"calc",description:["Template string used for rendering the information text that appear on points.","Note that this will override `textinfo`.",G_(),"Every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available.",r].join(" ")};return t.arrayOk!==!1&&(a.arrayOk=!0),a};var uc={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]},ky=bo.axisHoverFormat,m3=qr.texttemplateAttrs,y3=qr.hovertemplateAttrs,Ay=hn,g3=Dr,b3=ei.dash,x3=ei.pattern,_3=Pt.exports,My=uc,Mu=er.extendFlat;function Sy(t){return{valType:"any",dflt:0,editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the period positioning in milliseconds or *M<n>* on the "+t+" axis.","Special values in the form of *M<n>* could be used to declare","the number of months. In this case `n` must be a positive integer."].join(" ")}}function Ly(t){return{valType:"any",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the base for period positioning in milliseconds or date string on the "+t+" axis.","When `"+t+"period` is round number of weeks,","the `"+t+"period0` by default would be on a Sunday i.e. 2000-01-02,","otherwise it would be at 2000-01-01."].join(" ")}}function Cy(t){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc",description:["Only relevant when the axis `type` is *date*.","Sets the alignment of data points on the "+t+" axis."].join(" ")}}var To={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the x coordinates."},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `x`.","Builds a linear space of x coordinates.","Use with `dx`","where `x0` is the starting coordinate and `dx` the step."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the x coordinate step.","See `x0` for more info."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0,description:"Sets the y coordinates."},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0,description:["Alternate to `y`.","Builds a linear space of y coordinates.","Use with `dy`","where `y0` is the starting coordinate and `dy` the step."].join(" ")},dy:{valType:"number",dflt:1,editType:"calc",anim:!0,description:["Sets the y coordinate step.","See `y0` for more info."].join(" ")},xperiod:Sy("x"),yperiod:Sy("y"),xperiod0:Ly("x0"),yperiod0:Ly("y0"),xperiodalignment:Cy("x"),yperiodalignment:Cy("y"),xhoverformat:ky("x"),yhoverformat:ky("y"),stackgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several scatter traces (on the same subplot) to the same","stackgroup in order to add their y values (or their x values if","`orientation` is *h*). If blank or omitted this trace will not be","stacked. Stacking also turns `fill` on by default, using *tonexty*","(*tonextx*) if `orientation` is *h* (*v*) and sets the default","`mode` to *lines* irrespective of point count.","You can only stack on a numeric (linear or log) axis.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},orientation:{valType:"enumerated",values:["v","h"],editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`orientation` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`. Sets the","stacking direction. With *v* (*h*), the y (x) values of subsequent","traces are added. Also affects the default value of `fill`."].join(" ")},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`groupnorm` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Sets the normalization for the sum of this `stackgroup`.","With *fraction*, the value of each trace at each location is","divided by the sum of all trace values at that location.","*percent* is the same but multiplied by 100 to show percentages.","If there are multiple subplots, or multiple `stackgroup`s on one","subplot, each will be normalized within its own set."].join(" ")},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc",description:["Only relevant when `stackgroup` is used, and only the first","`stackgaps` found in the `stackgroup` will be used - including","if `visible` is *legendonly* but not if it is `false`.","Determines how we handle locations at which other traces in this","group have data but this one does not.","With *infer zero* we insert a zero at these locations.","With *interpolate* we linearly interpolate between existing","values, and extrapolate a constant beyond the existing values."].join(" ")},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},texttemplate:m3({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each (x,y) pair.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to the","this trace's (x,y) coordinates.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc",description:["Determines the drawing mode for this scatter trace.","If the provided `mode` includes *text* then the `text` elements","appear at the coordinates. Otherwise, the `text` elements","appear on hover.","If there are less than "+My.PTS_LINESONLY+" points","and the trace is not stacked","then the default is *lines+markers*. Otherwise, *lines*."].join(" ")},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style",description:["Do the hover effects highlight individual points (markers or","line points) or do they highlight filled regions?","If the fill is *toself* or *tonext* and there are no markers","or text, then the default is *fills*, otherwise it is *points*."].join(" ")},hovertemplate:y3({},{keys:My.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0,description:"Sets the line color."},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0,description:"Sets the line width (in px)."},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","With *spline* the lines are drawn using spline interpolation.","The other available values correspond to step-wise line shapes."].join(" ")},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot",description:["Has an effect only if `shape` is set to *spline*","Sets the amount of smoothing.","*0* corresponds to no smoothing (equivalent to a *linear* shape)."].join(" ")},dash:Mu({},b3,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,editType:"plot",description:["Simplifies lines by removing nearly-collinear points. When transitioning","lines, it may be desirable to disable this so that the number of points","along the resulting SVG path is unaffected."].join(" ")},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc",description:["Determines whether or not gaps","(i.e. {nan} or missing values)","in the provided data arrays are connected."].join(" ")},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines whether or not markers and text nodes","are clipped about the subplot axes.","To show markers and text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc",description:["Sets the area to fill with a solid color.","Defaults to *none* unless this trace is stacked, then it gets","*tonexty* (*tonextx*) if `orientation` is *v* (*h*)","Use with `fillcolor` if not *none*.","*tozerox* and *tozeroy* fill to x=0 and y=0 respectively.","*tonextx* and *tonexty* fill between the endpoints of this","trace and the endpoints of the trace before it, connecting those","endpoints with straight lines (to make a stacked area graph);","if there is no trace before it, they behave like *tozerox* and","*tozeroy*.","*toself* connects the endpoints of the trace (or each segment","of the trace if it has gaps) into a closed shape.","*tonext* fills the space between two traces if one completely","encloses the other (eg consecutive contour lines), and behaves like","*toself* if there is no trace before it. *tonext* should not be","used if one trace does not enclose the other.","Traces in a `stackgroup` will only fill to (or be filled to) other","traces in the same group. With multiple `stackgroup`s or some","traces stacked and some not, if fill-linked traces are not already","consecutive, the later ones will be pushed down in the drawing order."].join(" ")},fillcolor:{valType:"color",editType:"style",anim:!0,description:["Sets the fill color.","Defaults to a half-transparent variant of the line color,","marker color, or marker line color, whichever is available."].join(" ")},fillpattern:x3,marker:Mu({symbol:{valType:"enumerated",values:_3.symbolList,dflt:"circle",arrayOk:!0,editType:"style",description:["Sets the marker symbol type.","Adding 100 is equivalent to appending *-open* to a symbol name.","Adding 200 is equivalent to appending *-dot* to a symbol name.","Adding 300 is equivalent to appending *-open-dot*","or *dot-open* to a symbol name."].join(" ")},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0,description:"Sets the marker opacity."},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0,description:"Sets the marker size (in px)."},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot",description:["Sets a maximum number of points to be drawn on the graph.","*0* corresponds to no limit."].join(" ")},sizeref:{valType:"number",dflt:1,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the scale factor used to determine the rendered size of","marker points. Use with `sizemin` and `sizemode`."].join(" ")},sizemin:{valType:"number",min:0,dflt:0,editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the minimum size (in px) of the rendered marker points."].join(" ")},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc",description:["Has an effect only if `marker.size` is set to a numerical array.","Sets the rule for which the data in `size` is converted","to pixels."].join(" ")},line:Mu({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0,description:"Sets the width (in px) of the lines bounding the marker points."},editType:"calc"},Ay("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc",description:["Sets the type of gradient used to fill the markers"].join(" ")},color:{valType:"color",arrayOk:!0,editType:"calc",description:["Sets the final color of the gradient fill:","the center color for radial, the right for horizontal,","or the bottom for vertical."].join(" ")},editType:"calc"},editType:"calc"},Ay("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of selected points."},color:{valType:"color",editType:"style",description:"Sets the marker color of selected points."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of selected points."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of selected points."},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style",description:"Sets the marker opacity of unselected points, applied only when a selection exists."},color:{valType:"color",editType:"style",description:"Sets the marker color of unselected points, applied only when a selection exists."},size:{valType:"number",min:0,editType:"style",description:"Sets the marker size of unselected points, applied only when a selection exists."},editType:"style"},textfont:{color:{valType:"color",editType:"style",description:"Sets the text font color of unselected points, applied only when a selection exists."},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc",description:["Sets the positions of the `text` elements","with respects to the (x,y) coordinates."].join(" ")},textfont:g3({editType:"calc",colorEditType:"style",arrayOk:!0,description:"Sets the text font."})},Su=me.exports,w3=We,Nh=function(e,r,a,i){var n=i("x"),o=i("y"),l,s=w3.getComponentMethod("calendars","handleTraceDefaults");if(s(e,r,["x","y"],a),n){var f=Su.minRowLength(n);o?l=Math.min(f,Su.minRowLength(o)):(l=f,i("y0"),i("dy"))}else{if(!o)return 0;l=Su.minRowLength(o),i("x0"),i("dx")}return r._length=l,l},Dy=me.exports.dateTick0,T3=Jt,k3=T3.ONEWEEK;function Ey(t,e){return t%k3===0?Dy(e,1):Dy(e,0)}var vc=function(e,r,a,i,n){if(n||(n={x:!0,y:!0}),n.x){var o=i("xperiod");o&&(i("xperiod0",Ey(o,r.xcalendar)),i("xperiodalignment"))}if(n.y){var l=i("yperiod");l&&(i("yperiod0",Ey(l,r.ycalendar)),i("yperiodalignment"))}},$y=["orientation","groupnorm","stackgaps"],A3=function(e,r,a,i){var n=a._scatterStackOpts,o=i("stackgroup");if(o){var l=r.xaxis+r.yaxis,s=n[l];s||(s=n[l]={});var f=s[o],c=!1;f?f.traces.push(r):(f=s[o]={traceIndices:[],traces:[r]},c=!0);for(var v={orientation:r.x&&!r.y?"h":"v"},u=0;u<$y.length;u++){var d=$y[u],h=d+"Found";if(!f[h]){var p=e[d]!==void 0,g=d==="orientation";if((p||c)&&(f[d]=i(d,v[d]),g&&(f.fillDflt=f[d]==="h"?"tonextx":"tonexty"),p&&(f[h]=!0,!c&&(delete f.traces[0][d],g))))for(var _=0;_<f.traces.length-1;_++){var b=f.traces[_];b._input.fill!==b.fill&&(b.fill=f.fillDflt)}}}return f}},Ry=ft.exports,Py=La.hasColorscale,zy=Nl,M3=Rr,V_=function(e,r,a,i,n,o){var l=M3.isBubble(e),s=(e.line||{}).color,f;if(o=o||{},s&&(a=s),n("marker.symbol"),n("marker.opacity",l?.7:1),n("marker.size"),n("marker.color",a),Py(e,"marker")&&zy(e,r,i,n,{prefix:"marker.",cLetter:"c"}),o.noSelect||(n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size")),o.noLine||(s&&!Array.isArray(s)&&r.marker.color!==s?f=s:l?f=Ry.background:f=Ry.defaultLine,n("marker.line.color",f),Py(e,"marker.line")&&zy(e,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width",l?1:0)),l&&(n("marker.sizeref"),n("marker.sizemin"),n("marker.sizemode")),o.gradient){var c=n("marker.gradient.type");c!=="none"&&n("marker.gradient.color")}},S3=me.exports.isArrayOrTypedArray,L3=La.hasColorscale,C3=Nl,q_=function(e,r,a,i,n,o){var l=(e.marker||{}).color;if(n("line.color",a),L3(e,"line"))C3(e,r,i,n,{prefix:"line.",cLetter:"c"});else{var s=(S3(l)?!1:l)||a;n("line.color",s)}n("line.width"),(o||{}).noDash||n("line.dash")},D3=function(e,r,a){var i=a("line.shape");i==="spline"&&a("line.smoothing")},E3=me.exports,X_=function(t,e,r,a,i){i=i||{},a("textposition"),E3.coerceFont(a,"textfont",r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))},$3=ft.exports,Iy=me.exports.isArrayOrTypedArray,Y_=function(e,r,a,i){var n=!1;if(r.marker){var o=r.marker.color,l=(r.marker.line||{}).color;o&&!Iy(o)?n=o:l&&!Iy(l)&&(n=l)}i("fillcolor",$3.addOpacity((r.line||{}).color||n||a,.5))},Ny=me.exports,R3=We,P3=To,z3=uc,kn=Rr,I3=Nh,N3=vc,F3=A3,H3=V_,O3=q_,Fy=D3,B3=X_,j3=Y_,G3=me.exports.coercePattern,U3=function(e,r,a,i){function n(d,h){return Ny.coerce(e,r,P3,d,h)}var o=I3(e,r,i,n);if(o||(r.visible=!1),!!r.visible){N3(e,r,i,n),n("xhoverformat"),n("yhoverformat");var l=F3(e,r,i,n),s=!l&&o<z3.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("mode",s),kn.hasLines(r)&&(O3(e,r,a,i,n),Fy(e,r,n),n("connectgaps"),n("line.simplify")),kn.hasMarkers(r)&&H3(e,r,a,i,n,{gradient:!0}),kn.hasText(r)&&(n("texttemplate"),B3(e,r,i,n));var f=[];(kn.hasMarkers(r)||kn.hasText(r))&&(n("cliponaxis"),n("marker.maxdisplayed"),f.push("points")),n("fill",l?l.fillDflt:"none"),r.fill!=="none"&&(j3(e,r,a,n),kn.hasLines(r)||Fy(e,r,n),G3(n,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,v=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),n("hoveron",f.join("+")||"points"),r.hoveron!=="fills"&&n("hovertemplate");var u=R3.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),Ny.coerceSelectionMarkerOpacity(r,n)}},W_=function(e){for(var r=0;r<e.length;r++){var a=e[r];if(a.type==="scatter"){var i=a.fill;if(!(i==="none"||i==="toself")&&(a.opacity=void 0,i==="tonexty"||i==="tonextx"))for(var n=r-1;n>=0;n--){var o=e[n];if(o.type==="scatter"&&o.xaxis===a.xaxis&&o.yaxis===a.yaxis){o.opacity=void 0;break}}}}},V3=gt,Z_=me.exports,q3=Z_.dateTime2ms,_s=Z_.incrementMonth,X3=Jt,Y3=X3.ONEAVGMONTH,dc=function(e,r,a,i){if(r.type!=="date")return{vals:i};var n=e[a+"periodalignment"];if(!n)return{vals:i};var o=e[a+"period"],l;if(V3(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var s=+o.substring(1);if(s>0&&Math.round(s)===s)l=s;else return{vals:i}}for(var f=r.calendar,c=n==="start",v=n==="end",u=e[a+"period0"],d=q3(u,f)||0,h=[],p=[],g=[],_=i.length,b=0;b<_;b++){var w=i[b],m,y,x;if(l){for(m=Math.round((w-d)/(l*Y3)),x=_s(d,l*m,f);x>w;)x=_s(x,-l,f);for(;x<=w;)x=_s(x,l,f);y=_s(x,-l,f)}else{for(m=Math.round((w-d)/o),x=d+m*o;x>w;)x-=o;for(;x<=w;)x+=o;y=x-o}h[b]=c?y:v?x:(y+x)/2,p[b]=y,g[b]=x}return{vals:h,starts:p,ends:g}},Lu=La.hasColorscale,Cu=Jd,Hy=Rr,K_=function(e,r){Hy.hasLines(r)&&Lu(r,"line")&&Cu(e,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),Hy.hasMarkers(r)&&(Lu(r,"marker")&&Cu(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Lu(r,"marker.line")&&Cu(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))},Sr=me.exports,Q_=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Sr.mergeArray(r.text,e,"tx"),Sr.mergeArray(r.texttemplate,e,"txt"),Sr.mergeArray(r.hovertext,e,"htx"),Sr.mergeArray(r.customdata,e,"data"),Sr.mergeArray(r.textposition,e,"tp"),r.textfont&&(Sr.mergeArrayCastPositive(r.textfont.size,e,"ts"),Sr.mergeArray(r.textfont.color,e,"tc"),Sr.mergeArray(r.textfont.family,e,"tf"));var i=r.marker;if(i){Sr.mergeArrayCastPositive(i.size,e,"ms"),Sr.mergeArrayCastPositive(i.opacity,e,"mo"),Sr.mergeArray(i.symbol,e,"mx"),Sr.mergeArray(i.color,e,"mc");var n=i.line;i.line&&(Sr.mergeArray(n.color,e,"mlc"),Sr.mergeArrayCastPositive(n.width,e,"mlw"));var o=i.gradient;o&&o.type!=="none"&&(Sr.mergeArray(o.type,e,"mgt"),Sr.mergeArray(o.color,e,"mgc"))}},Oy=me.exports,J_=function(e,r){Oy.isArrayOrTypedArray(r.selectedpoints)&&Oy.tagSelected(e,r)},By=gt,od=me.exports,xl=jt.exports,jy=dc,Du=Jt.BADNUM,ld=Rr,W3=K_,Z3=Q_,K3=J_;function Q3(t,e){var r=t._fullLayout,a=xl.getFromId(t,e.xaxis||"x"),i=xl.getFromId(t,e.yaxis||"y"),n=a.makeCalcdata(e,"x"),o=i.makeCalcdata(e,"y"),l=jy(e,a,"x",n),s=jy(e,i,"y",o),f=l.vals,c=s.vals,v=e._length,u=new Array(v),d=e.ids,h=Fh(e,r,a,i),p=!1,g,_,b,w,m,y;rw(r,e);var x="x",T="y",k;if(h)od.pushUnique(h.traceIndices,e._expandedIndex),g=h.orientation==="v",g?(T="s",k="x"):(x="s",k="y"),m=h.stackgaps==="interpolate";else{var S=tw(e,v);ew(t,e,a,i,f,c,S)}var A=!!e.xperiodalignment,E=!!e.yperiodalignment;for(_=0;_<v;_++){var M=u[_]={},D=By(f[_]),$=By(c[_]);D&&$?(M[x]=f[_],M[T]=c[_],A&&(M.orig_x=n[_],M.xEnd=l.ends[_],M.xStart=l.starts[_]),E&&(M.orig_y=o[_],M.yEnd=s.ends[_],M.yStart=s.starts[_])):h&&(g?D:$)?(M[k]=g?f[_]:c[_],M.gap=!0,m?(M.s=Du,p=!0):M.s=0):M[x]=M[T]=Du,d&&(M.id=String(d[_]))}if(Z3(u,e),W3(t,e),K3(u,e),h){for(_=0;_<u.length;)u[_][k]===Du?u.splice(_,1):_++;if(od.sort(u,function(L,C){return L[k]-C[k]||L.i-C.i}),p){for(_=0;_<u.length-1&&u[_].gap;)_++;for(y=u[_].s,y||(y=u[_].s=0),b=0;b<_;b++)u[b].s=y;for(w=u.length-1;w>_&&u[w].gap;)w--;for(y=u[w].s,b=u.length-1;b>w;b--)u[b].s=y;for(;_<w;)if(_++,u[_].gap){for(b=_+1;u[b].gap;)b++;for(var I=u[_-1][k],P=u[_-1].s,R=(u[b].s-P)/(u[b][k]-I);_<b;)u[_].s=P+(u[_][k]-I)*R,_++}}}return u}function ew(t,e,r,a,i,n,o){var l=e._length,s=t._fullLayout,f=r._id,c=a._id,v=s._firstScatter[aw(e)]===e.uid,u=(Fh(e,s,r,a)||{}).orientation,d=e.fill;r._minDtick=0,a._minDtick=0;var h={padded:!0},p={padded:!0};o&&(h.ppad=p.ppad=o);var g=l<2||i[0]!==i[l-1]||n[0]!==n[l-1];g&&(d==="tozerox"||d==="tonextx"&&(v||u==="h"))?h.tozero=!0:!(e.error_y||{}).visible&&(d==="tonexty"||d==="tozeroy"||!ld.hasMarkers(e)&&!ld.hasText(e))&&(h.padded=!1,h.ppad=0),g&&(d==="tozeroy"||d==="tonexty"&&(v||u==="v"))?p.tozero=!0:(d==="tonextx"||d==="tozerox")&&(p.padded=!1),f&&(e._extremes[f]=xl.findExtremes(r,i,h)),c&&(e._extremes[c]=xl.findExtremes(a,n,p))}function tw(t,e){if(!!ld.hasMarkers(t)){var r=t.marker,a=1.6*(t.marker.sizeref||1),i;if(t.marker.sizemode==="area"?i=function(f){return Math.max(Math.sqrt((f||0)/a),3)}:i=function(f){return Math.max((f||0)/a,3)},od.isArrayOrTypedArray(r.size)){var n={type:"linear"};xl.setConvert(n);for(var o=n.makeCalcdata(t.marker,"size"),l=new Array(e),s=0;s<e;s++)l[s]=i(o[s]);return l}else return i(r.size)}}function rw(t,e){var r=aw(e),a=t._firstScatter;a[r]||(a[r]=e.uid)}function aw(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function Fh(t,e,r,a){var i=t.stackgroup;if(!!i){var n=e._scatterStackOpts[r._id+a._id][i],o=n.orientation==="v"?a:r;if(o.type==="linear"||o.type==="log")return n}}var Hh={calc:Q3,calcMarkerSize:tw,calcAxisExpansion:ew,setFirstScatter:rw,getStackOpts:Fh},Gy=Hh,J3=function(e,r){var a=r.xaxis,i=r.yaxis,n=a._id+i._id,o=e._fullLayout._scatterStackOpts[n];if(!!o){var l=e.calcdata,s,f,c,v,u,d,h,p,g,_,b,w,m,y,x;for(var T in o){_=o[T];var k=_.traceIndices;if(!!k.length){for(b=_.stackgaps==="interpolate",w=_.groupnorm,_.orientation==="v"?(m="x",y="y"):(m="y",y="x"),x=new Array(k.length),s=0;s<x.length;s++)x[s]=!1;d=l[k[0]];var S=new Array(d.length);for(s=0;s<d.length;s++)S[s]=d[s][m];for(s=1;s<k.length;s++){for(u=l[k[s]],f=c=0;f<u.length;f++){for(h=u[f][m];h>S[c]&&c<S.length;c++)Eu(u,f,S[c],s,x,b,m),f++;if(h!==S[c]){for(v=0;v<s;v++)Eu(l[k[v]],c,h,v,x,b,m);S.splice(c,0,h)}c++}for(;c<S.length;c++)Eu(u,f,S[c],s,x,b,m),f++}var A=S.length;for(f=0;f<d.length;f++){for(p=d[f][y]=d[f].s,s=1;s<k.length;s++)u=l[k[s]],u[0].trace._rawLength=u[0].trace._length,u[0].trace._length=A,p+=u[f].s,u[f][y]=p;if(w)for(g=(w==="fraction"?p:p/100)||1,s=0;s<k.length;s++){var E=l[k[s]][f];E[y]/=g,E.sNorm=E.s/g}}for(s=0;s<k.length;s++){u=l[k[s]];var M=u[0].trace,D=Gy.calcMarkerSize(M,M._rawLength),$=Array.isArray(D);if(D&&x[s]||$){var I=D;for(D=new Array(A),f=0;f<A;f++)D[f]=u[f].gap?0:$?I[u[f].i]:I}var P=new Array(A),R=new Array(A);for(f=0;f<A;f++)P[f]=u[f].x,R[f]=u[f].y;Gy.calcAxisExpansion(e,M,a,i,P,R,D),u[0].t.orientation=_.orientation}}}}};function Eu(t,e,r,a,i,n,o){i[a]=!0;var l={i:null,gap:!0,s:0};if(l[o]=r,t.splice(e,0,l),e&&r===t[e-1][o]){var s=t[e-1];l.s=s.s,l.i=s.i,l.gap=s.gap}else n&&(l.s=eE(t,e,r,o));e||(t[0].t=t[1].t,t[0].trace=t[1].trace,delete t[1].t,delete t[1].trace)}function eE(t,e,r,a){var i=t[e-1],n=t[e+1];return n?i?i.s+(n.s-i.s)*(r-i[a])/(n[a]-i[a]):n.s:i.s}var iw=Jt,Oo=iw.BADNUM,nw=iw.LOG_CLIP,Uy=nw+.5,Vy=nw-.5,Oh=me.exports,tE=Oh.segmentsIntersect,qy=Oh.constrain,$u=uc,rE=function(e,r){var a=r.xaxis,i=r.yaxis,n=a.type==="log",o=i.type==="log",l=a._length,s=i._length,f=r.connectGaps,c=r.baseTolerance,v=r.shape,u=v==="linear",d=r.fill&&r.fill!=="none",h=[],p=$u.minTolerance,g=e.length,_=new Array(g),b=0,w,m,y,x,T,k,S,A,E,M,D,$,I,P,R,L;function C(X){var pe=e[X];if(!pe)return!1;var ce=r.linearized?a.l2p(pe.x):a.c2p(pe.x),he=r.linearized?i.l2p(pe.y):i.c2p(pe.y);if(ce===Oo){if(n&&(ce=a.c2p(pe.x,!0)),ce===Oo)return!1;o&&he===Oo&&(ce*=Math.abs(a._m*s*(a._m>0?Uy:Vy)/(i._m*l*(i._m>0?Uy:Vy)))),ce*=1e3}if(he===Oo){if(o&&(he=i.c2p(pe.y,!0)),he===Oo)return!1;he*=1e3}return[ce,he]}function z(X,pe,ce,he){var De=ce-X,je=he-pe,$e=.5-X,Se=.5-pe,Ge=De*De+je*je,Pe=De*$e+je*Se;if(Pe>0&&Pe<Ge){var Ie=$e*je-Se*De;if(Ie*Ie<Ge)return!0}}var F,H;function B(X,pe){var ce=X[0]/l,he=X[1]/s,De=Math.max(0,-ce,ce-1,-he,he-1);return De&&F!==void 0&&z(ce,he,F,H)&&(De=0),De&&pe&&z(ce,he,pe[0]/l,pe[1]/s)&&(De=0),(1+$u.toleranceGrowth*De)*c}function O(X,pe){var ce=X[0]-pe[0],he=X[1]-pe[1];return Math.sqrt(ce*ce+he*he)}var W=$u.maxScreensAway,j=-l*W,Z=l*(1+W),K=-s*W,Q=s*(1+W),ee=[[j,K,Z,K],[Z,K,Z,Q],[Z,Q,j,Q],[j,Q,j,K]],ne,le,se,oe,V,ie;function ge(X,pe){for(var ce=[],he=0,De=0;De<4;De++){var je=ee[De],$e=tE(X[0],X[1],pe[0],pe[1],je[0],je[1],je[2],je[3]);$e&&(!he||Math.abs($e.x-ce[0][0])>1||Math.abs($e.y-ce[0][1])>1)&&($e=[$e.x,$e.y],he&&O($e,X)<O(ce[0],X)?ce.unshift($e):ce.push($e),he++)}return ce}function de(X){if(X[0]<j||X[0]>Z||X[1]<K||X[1]>Q)return[qy(X[0],j,Z),qy(X[1],K,Q)]}function ke(X,pe){if(X[0]===pe[0]&&(X[0]===j||X[0]===Z)||X[1]===pe[1]&&(X[1]===K||X[1]===Q))return!0}function ue(X,pe){var ce=[],he=de(X),De=de(pe);return he&&De&&ke(he,De)||(he&&ce.push(he),De&&ce.push(De)),ce}function Y(X,pe,ce){return function(he,De){var je=de(he),$e=de(De),Se=[];if(je&&$e&&ke(je,$e))return Se;je&&Se.push(je),$e&&Se.push($e);var Ge=2*Oh.constrain((he[X]+De[X])/2,pe,ce)-((je||he)[X]+($e||De)[X]);if(Ge){var Pe;je&&$e?Pe=Ge>0==je[X]>$e[X]?je:$e:Pe=je||$e,Pe[X]+=Ge}return Se}}var fe;v==="linear"||v==="spline"?fe=ge:v==="hv"||v==="vh"?fe=ue:v==="hvh"?fe=Y(0,j,Z):v==="vhv"&&(fe=Y(1,K,Q));function Ae(X,pe){var ce=pe[0]-X[0],he=(pe[1]-X[1])/ce,De=(X[1]*pe[0]-pe[1]*X[0])/ce;return De>0?[he>0?j:Z,Q]:[he>0?Z:j,K]}function be(X){var pe=X[0],ce=X[1],he=pe===_[b-1][0],De=ce===_[b-1][1];if(!(he&&De))if(b>1){var je=pe===_[b-2][0],$e=ce===_[b-2][1];he&&(pe===j||pe===Z)&&je?$e?b--:_[b-1]=X:De&&(ce===K||ce===Q)&&$e?je?b--:_[b-1]=X:_[b++]=X}else _[b++]=X}function Ce(X){_[b-1][0]!==X[0]&&_[b-1][1]!==X[1]&&be([se,oe]),be(X),V=null,se=oe=0}function Me(X){if(F=X[0]/l,H=X[1]/s,ne=X[0]<j?j:X[0]>Z?Z:0,le=X[1]<K?K:X[1]>Q?Q:0,ne||le){if(!b)_[b++]=[ne||X[0],le||X[1]];else if(V){var pe=fe(V,X);pe.length>1&&(Ce(pe[0]),_[b++]=pe[1])}else ie=fe(_[b-1],X)[0],_[b++]=ie;var ce=_[b-1];ne&&le&&(ce[0]!==ne||ce[1]!==le)?(V&&(se!==ne&&oe!==le?be(se&&oe?Ae(V,X):[se||ne,oe||le]):se&&oe&&be([se,oe])),be([ne,le])):se-ne&&oe-le&&be([ne||se,le||oe]),V=X,se=ne,oe=le}else V&&Ce(fe(V,X)[0]),_[b++]=X}for(w=0;w<g;w++)if(m=C(w),!!m){for(b=0,V=null,Me(m),w++;w<g;w++){if(x=C(w),!x){if(f)continue;break}if(!u||!r.simplify){Me(x);continue}var Te=C(w+1);if(M=O(x,m),!(!(d&&(b===0||b===g-1))&&M<B(x,Te)*p)){for(A=[(x[0]-m[0])/M,(x[1]-m[1])/M],T=m,D=M,$=P=R=0,S=!1,y=x,w++;w<e.length;w++){if(k=Te,Te=C(w+1),!k){if(f)continue;break}if(E=[k[0]-m[0],k[1]-m[1]],L=E[0]*A[1]-E[1]*A[0],P=Math.min(P,L),R=Math.max(R,L),R-P>B(k,Te))break;y=k,I=E[0]*A[0]+E[1]*A[1],I>D?(D=I,x=k,S=!1):I<$&&($=I,T=k,S=!0)}if(S?(Me(x),y!==T&&Me(T)):(T!==m&&Me(T),y!==x&&Me(x)),Me(y),w>=e.length||!k)break;Me(k),m=k}}V&&be([se||V[0],oe||V[1]]),h.push(_.slice(0,b))}return h},Xy={tonextx:1,tonexty:1,tonext:1},ow=function(e,r,a){var i,n,o,l,s,f={},c=!1,v=-1,u=0,d=-1;for(n=0;n<a.length;n++)i=a[n][0].trace,o=i.stackgroup||"",o?o in f?s=f[o]:(s=f[o]=u,u++):i.fill in Xy&&d>=0?s=d:(s=d=u,u++),s<v&&(c=!0),i._groupIndex=v=s;var h=a.slice();c&&h.sort(function(g,_){var b=g[0].trace,w=_[0].trace;return b._groupIndex-w._groupIndex||b.index-w.index});var p={};for(n=0;n<h.length;n++)i=h[n][0].trace,o=i.stackgroup||"",i.visible===!0?(i._nexttrace=null,i.fill in Xy&&(l=p[o],i._prevtrace=l||null,l&&(l._nexttrace=i)),i._ownfill=i.fill&&(i.fill.substr(0,6)==="tozero"||i.fill==="toself"||i.fill.substr(0,2)==="to"&&!i._prevtrace),p[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return h},ba=ct.exports,aE=We,_l=me.exports,Vn=_l.ensureSingle,lw=_l.identity,Qt=Pt.exports,qn=Rr,iE=rE,nE=ow,oE=Dh.exports.tester,lE=function(e,r,a,i,n,o){var l,s,f=!n,c=!!n&&n.duration>0,v=nE(e,r,a);if(l=i.selectAll("g.trace").data(v,function(d){return d[0].trace.uid}),l.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),l.order(),sE(e,l,r),c){o&&(s=o());var u=ba.transition().duration(n.duration).ease(n.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});u.each(function(){i.selectAll("g.trace").each(function(d,h){Yy(e,h,r,d,v,this,n)})})}else l.each(function(d,h){Yy(e,h,r,d,v,this,n)});f&&l.exit().remove(),i.selectAll("path:not([d])").remove()};function sE(t,e,r){e.each(function(a){var i=Vn(ba.select(this),"g","fills");Qt.setClipUrl(i,r.layerClipId,t);var n=a[0].trace,o=[];n._ownfill&&o.push("_ownFill"),n._nexttrace&&o.push("_nextFill");var l=i.selectAll("g").data(o,lw);l.enter().append("g"),l.exit().each(function(s){n[s]=null}).remove(),l.order().each(function(s){n[s]=Vn(ba.select(this),"path","js-fill")})})}function Yy(t,e,r,a,i,n,o){var l;fE(t,e,r,a,i);var s=!!o&&o.duration>0;function f(se){return s?se.transition():se}var c=r.xaxis,v=r.yaxis,u=a[0].trace,d=u.line,h=ba.select(n),p=Vn(h,"g","errorbars"),g=Vn(h,"g","lines"),_=Vn(h,"g","points"),b=Vn(h,"g","text");if(aE.getComponentMethod("errorbars","plot")(t,p,r,o),u.visible!==!0)return;f(h).style("opacity",u.opacity);var w,m,y=u.fill.charAt(u.fill.length-1);y!=="x"&&y!=="y"&&(y=""),a[0][r.isRangePlot?"nodeRangePlot3":"node3"]=h;var x="",T=[],k=u._prevtrace;k&&(x=k._prevRevpath||"",m=k._nextFill,T=k._polygons);var S,A,E="",M="",D,$,I,P,R,L,C,z=[],F=_l.noop;if(w=u._ownFill,qn.hasLines(u)||u.fill!=="none"){for(m&&m.datum(a),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(D=Qt.steps(d.shape),$=Qt.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?D=$=function(se){var oe=se[se.length-1];return se.length>1&&se[0][0]===oe[0]&&se[0][1]===oe[1]?Qt.smoothclosed(se.slice(1),d.smoothing):Qt.smoothopen(se,d.smoothing)}:D=$=function(se){return"M"+se.join("L")},I=function(se){return $(se.reverse())},z=iE(a,{xaxis:c,yaxis:v,connectGaps:u.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,simplify:d.simplify,fill:u.fill}),C=u._polygons=new Array(z.length),l=0;l<z.length;l++)u._polygons[l]=oE(z[l]);z.length&&(P=z[0][0],R=z[z.length-1],L=R[R.length-1]),F=function(se){return function(oe){if(S=D(oe),A=I(oe),E?y?(E+="L"+S.substr(1),M=A+("L"+M.substr(1))):(E+="Z"+S,M=A+"Z"+M):(E=S,M=A),qn.hasLines(u)&&oe.length>1){var V=ba.select(this);if(V.datum(a),se)f(V.style("opacity",0).attr("d",S).call(Qt.lineGroupStyle)).style("opacity",1);else{var ie=f(V);ie.attr("d",S),Qt.singleLineStyle(a,ie)}}}}}var H=g.selectAll(".js-line").data(z);f(H.exit()).style("opacity",0).remove(),H.each(F(!1)),H.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(Qt.lineGroupStyle).each(F(!0)),Qt.setClipUrl(H,r.layerClipId,t);function B(se){f(se).attr("d","M0,0Z")}z.length?(w?(w.datum(a),P&&L&&(y?(y==="y"?P[1]=L[1]=v.c2p(0,!0):y==="x"&&(P[0]=L[0]=c.c2p(0,!0)),f(w).attr("d","M"+L+"L"+P+"L"+E.substr(1)).call(Qt.singleFillStyle,t)):f(w).attr("d",E+"Z").call(Qt.singleFillStyle,t))):m&&(u.fill.substr(0,6)==="tonext"&&E&&x?(u.fill==="tonext"?f(m).attr("d",E+"Z"+x+"Z").call(Qt.singleFillStyle,t):f(m).attr("d",E+"L"+x.substr(1)+"Z").call(Qt.singleFillStyle,t),u._polygons=u._polygons.concat(T)):(B(m),u._polygons=null)),u._prevRevpath=M,u._prevPolygons=C):(w?B(w):m&&B(m),u._polygons=u._prevRevpath=u._prevPolygons=null);function O(se){return se.filter(function(oe){return!oe.gap&&oe.vis})}function W(se){return se.filter(function(oe){return oe.vis})}function j(se){return se.filter(function(oe){return!oe.gap})}function Z(se){return se.id}function K(se){if(se.ids)return Z}function Q(){return!1}function ee(se,oe,V){var ie,ge,de,ke=V[0].trace,ue=qn.hasMarkers(ke),Y=qn.hasText(ke),fe=K(ke),Ae=Q,be=Q;if(ue||Y){var Ce=lw,Me=ke.stackgroup,Te=Me&&t._fullLayout._scatterStackOpts[c._id+v._id][Me].stackgaps==="infer zero";ke.marker.maxdisplayed||ke._needsCull?Ce=Te?W:O:Me&&!Te&&(Ce=j),ue&&(Ae=Ce),Y&&(be=Ce)}ge=se.selectAll("path.point"),ie=ge.data(Ae,fe);var X=ie.enter().append("path").classed("point",!0);s&&X.call(Qt.pointStyle,ke,t).call(Qt.translatePoints,c,v).style("opacity",0).transition().style("opacity",1),ie.order();var pe;ue&&(pe=Qt.makePointStyleFns(ke)),ie.each(function(ce){var he=ba.select(this),De=f(he);de=Qt.translatePoint(ce,De,c,v),de?(Qt.singlePointStyle(ce,De,ke,pe,t),r.layerClipId&&Qt.hideOutsideRangePoint(ce,De,c,v,ke.xcalendar,ke.ycalendar),ke.customdata&&he.classed("plotly-customdata",ce.data!==null&&ce.data!==void 0)):De.remove()}),s?ie.exit().transition().style("opacity",0).remove():ie.exit().remove(),ge=oe.selectAll("g"),ie=ge.data(be,fe),ie.enter().append("g").classed("textpoint",!0).append("text"),ie.order(),ie.each(function(ce){var he=ba.select(this),De=f(he.select("text"));de=Qt.translatePoint(ce,De,c,v),de?r.layerClipId&&Qt.hideOutsideRangePoint(ce,he,c,v,ke.xcalendar,ke.ycalendar):he.remove()}),ie.selectAll("text").call(Qt.textPointStyle,ke,t).each(function(ce){var he=c.c2p(ce.x),De=v.c2p(ce.y);ba.select(this).selectAll("tspan.line").each(function(){f(ba.select(this)).attr({x:he,y:De})})}),ie.exit().remove()}_.datum(a),b.datum(a),ee(_,b,a);var ne=u.cliponaxis===!1,le=ne?null:r.layerClipId;Qt.setClipUrl(_,le,t),Qt.setClipUrl(b,le,t)}function fE(t,e,r,a,i){var n=r.xaxis,o=r.yaxis,l=ba.extent(_l.simpleMap(n.range,n.r2c)),s=ba.extent(_l.simpleMap(o.range,o.r2c)),f=a[0].trace;if(!!qn.hasMarkers(f)){var c=f.marker.maxdisplayed;if(c!==0){var v=a.filter(function(p){return p.x>=l[0]&&p.x<=l[1]&&p.y>=s[0]&&p.y<=s[1]}),u=Math.ceil(v.length/c),d=0;i.forEach(function(p,g){var _=p[0].trace;qn.hasMarkers(_)&&_.marker.maxdisplayed>0&&g<e&&d++});var h=Math.round(d*u/3+Math.floor(d/3)*u/7.1);a.forEach(function(p){delete p.vis}),v.forEach(function(p,g){Math.round((g+h)%u)===0&&(p.vis=!0)})}}}var jl={container:"marker",min:"cmin",max:"cmax"},ws=jt.exports,sw=function(e,r,a){var i={},n={_fullLayout:a},o=ws.getFromTrace(n,r,"x"),l=ws.getFromTrace(n,r,"y");return i.xLabel=ws.tickText(o,o.c2l(e.x),!0).text,i.yLabel=ws.tickText(l,l.c2l(e.y),!0).text,i},Ru=ct.exports,io=Pt.exports,cE=We;function uE(t){var e=Ru.select(t).selectAll("g.trace.scatter");e.style("opacity",function(r){return r[0].trace.opacity}),e.selectAll("g.points").each(function(r){var a=Ru.select(this),i=r.trace||r[0].trace;Bh(a,i,t)}),e.selectAll("g.text").each(function(r){var a=Ru.select(this),i=r.trace||r[0].trace;jh(a,i,t)}),e.selectAll("g.trace path.js-line").call(io.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(io.fillGroupStyle,t),cE.getComponentMethod("errorbars","style")(e)}function Bh(t,e,r){io.pointStyle(t.selectAll("path.point"),e,r)}function jh(t,e,r){io.textPointStyle(t.selectAll("text"),e,r)}function vE(t,e,r){var a=e[0].trace;a.selectedpoints?(io.selectedPointStyle(r.selectAll("path.point"),a),io.selectedTextStyle(r.selectAll("text"),a)):(Bh(r,a,t),jh(r,a,t))}var Wy={style:uE,stylePoints:Bh,styleText:jh,styleOnSelect:vE},An=ft.exports,dE=Rr,fw=function(e,r){var a,i;if(e.mode==="lines")return a=e.line.color,a&&An.opacity(a)?a:e.fillcolor;if(e.mode==="none")return e.fill?e.fillcolor:"";var n=r.mcc||(e.marker||{}).color,o=r.mlcc||((e.marker||{}).line||{}).color;return i=n&&An.opacity(n)?n:o&&An.opacity(o)&&(r.mlw||((e.marker||{}).line||{}).width)?o:"",i?An.opacity(i)<.3?An.addOpacity(i,.3):i:(a=(e.line||{}).color,a&&An.opacity(a)&&dE.hasLines(e)&&e.line.width?a:e.fillcolor)},sd=me.exports,Zy=Ma,hE=We,pE=fw,Pu=ft.exports,mE=sd.fillText,yE=function(e,r,a,i){var n=e.cd,o=n[0].trace,l=e.xa,s=e.ya,f=l.c2p(r),c=s.c2p(a),v=[f,c],u=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,h=!!o.xperiodalignment,p=!!o.yperiodalignment;if(u.indexOf("points")!==-1){var g=function(ee){if(h){var ne=l.c2p(ee.xStart),le=l.c2p(ee.xEnd);return f>=Math.min(ne,le)&&f<=Math.max(ne,le)?0:1/0}var se=Math.max(3,ee.mrc||0),oe=1-1/se,V=Math.abs(l.c2p(ee.x)-f);return V<se?oe*V/se:V-se+oe},_=function(ee){if(p){var ne=s.c2p(ee.yStart),le=s.c2p(ee.yEnd);return c>=Math.min(ne,le)&&c<=Math.max(ne,le)?0:1/0}var se=Math.max(3,ee.mrc||0),oe=1-1/se,V=Math.abs(s.c2p(ee.y)-c);return V<se?oe*V/se:V-se+oe},b=function(ee){var ne=Math.max(d,ee.mrc||0),le=l.c2p(ee.x)-f,se=s.c2p(ee.y)-c;return Math.max(Math.sqrt(le*le+se*se)-ne,1-d/ne)},w=Zy.getDistanceFunction(i,g,_,b);if(Zy.getClosest(n,w,e),e.index!==!1){var m=n[e.index],y=l.c2p(m.x,!0),x=s.c2p(m.y,!0),T=m.mrc||1;e.index=m.i;var k=n[0].t.orientation,S=k&&(m.sNorm||m.s),A=k==="h"?S:m.orig_x!==void 0?m.orig_x:m.x,E=k==="v"?S:m.orig_y!==void 0?m.orig_y:m.y;return sd.extendFlat(e,{color:pE(o,m),x0:y-T,x1:y+T,xLabelVal:A,y0:x-T,y1:x+T,yLabelVal:E,spikeDistance:b(m),hovertemplate:o.hovertemplate}),mE(m,o,e),hE.getComponentMethod("errorbars","hoverInfo")(m,o,e),[e]}}if(u.indexOf("fills")!==-1&&o._polygons){var M=o._polygons,D=[],$=!1,I=1/0,P=-1/0,R=1/0,L=-1/0,C,z,F,H,B,O,W,j,Z;for(C=0;C<M.length;C++)F=M[C],F.contains(v)&&($=!$,D.push(F),R=Math.min(R,F.ymin),L=Math.max(L,F.ymax));if($){R=Math.max(R,0),L=Math.min(L,s._length);var K=(R+L)/2;for(C=0;C<D.length;C++)for(H=D[C].pts,z=1;z<H.length;z++)j=H[z-1][1],Z=H[z][1],j>K!=Z>=K&&(O=H[z-1][0],W=H[z][0],Z-j&&(B=O+(W-O)*(K-j)/(Z-j),I=Math.min(I,B),P=Math.max(P,B)));I=Math.max(I,0),P=Math.min(P,l._length);var Q=Pu.defaultLine;return Pu.opacity(o.fillcolor)?Q=o.fillcolor:Pu.opacity((o.line||{}).color)&&(Q=o.line.color),sd.extendFlat(e,{distance:e.maxHoverDistance,x0:I,x1:P,y0:K,y1:K,color:Q,hovertemplate:!1}),delete e.index,o.text&&!Array.isArray(o.text)?e.text=String(o.text):e.text=o.name,[e]}}},Ky=Rr,gE=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s,f,c,v,u=!Ky.hasMarkers(l)&&!Ky.hasText(l);if(u)return[];if(r===!1)for(s=0;s<a.length;s++)a[s].selected=0;else for(s=0;s<a.length;s++)f=a[s],c=i.c2p(f.x),v=n.c2p(f.y),f.i!==null&&r.contains([c,v],!1,s,e)?(o.push({pointNumber:f.i,x:i.c2d(f.x),y:n.c2d(f.y)}),f.selected=1):f.selected=0;return o},sr={},zu,Qy;function bE(){return Qy||(Qy=1,zu={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's x coordinates and","a 2D cartesian x axis.","If *x* (the default value), the x coordinates refer to","`layout.xaxis`.","If *x2*, the x coordinates refer to `layout.xaxis2`, and so on."].join(" ")},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes",description:["Sets a reference between this trace's y coordinates and","a 2D cartesian y axis.","If *y* (the default value), the y coordinates refer to","`layout.yaxis`.","If *y2*, the y coordinates refer to `layout.yaxis2`, and so on."].join(" ")}}),zu}var Iu,Jy;function xE(){if(Jy)return Iu;Jy=1;var t=We.traceIs,e=_1;Iu=function(l,s,f,c){f("autotypenumbers",c.autotypenumbersDflt);var v=f("type",(c.splomStash||{}).type);v==="-"&&(r(s,c.data),s.type==="-"?s.type="linear":l.type=s.type)};function r(o,l){if(o.type==="-"){var s=o._id,f=s.charAt(0),c;s.indexOf("scene")!==-1&&(s=f);var v=a(l,s,f);if(!!v){if(v.type==="histogram"&&f==={v:"y",h:"x"}[v.orientation||"v"]){o.type="linear";return}var u=f+"calendar",d=v[u],h={noMultiCategory:!t(v,"cartesian")||t(v,"noMultiCategory")};if(v.type==="box"&&v._hasPreCompStats&&f==={h:"x",v:"y"}[v.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=o.autotypenumbers,n(v,f)){var p=i(v),g=[];for(c=0;c<l.length;c++){var _=l[c];!t(_,"box-violin")||(_[f+"axis"]||f)!==s||(_[p]!==void 0?g.push(_[p][0]):_.name!==void 0?g.push(_.name):g.push("text"),_[u]!==d&&(d=void 0))}o.type=e(g,d,h)}else if(v.type==="splom"){var b=v.dimensions,w=b[v._axesDim[s]];w.visible&&(o.type=e(w.values,d,h))}else o.type=e(v[f]||[v[f+"0"]],d,h)}}}function a(o,l,s){for(var f=0;f<o.length;f++){var c=o[f];if(c.type==="splom"&&c._length>0&&(c["_"+s+"axes"]||{})[l])return c;if((c[s+"axis"]||s)===l){if(n(c,s))return c;if((c[s]||[]).length||c[s+"0"])return c}}}function i(o){return{v:"x",h:"y"}[o.orientation||"v"]}function n(o,l){var s=i(o),f=t(o,"box-violin"),c=t(o._fullInput||{},"candlestick");return f&&!c&&l===s&&o[s]===void 0&&o[s+"0"]===void 0}return Iu}function _E(t,e){var r=e.dataAttr||t._id.charAt(0),a={},i,n,o;if(e.axData)i=e.axData;else for(i=[],n=0;n<e.data.length;n++){var l=e.data[n];l[r+"axis"]===t._id&&i.push(l)}for(n=0;n<i.length;n++){var s=i[n][r];for(o=0;o<s.length;o++){var f=s[o];f!=null&&(a[f]=1)}}return Object.keys(a)}var wE=function(e,r,a,i){if(r.type==="category"){var n=e.categoryarray,o=Array.isArray(n)&&n.length>0,l;o&&(l="array");var s=a("categoryorder",l),f;s==="array"&&(f=a("categoryarray")),!o&&s==="array"&&(s=r.categoryorder="trace"),s==="trace"?r._initialCategories=[]:s==="array"?r._initialCategories=f.slice():(f=_E(r,i).sort(),s==="category ascending"?r._initialCategories=f:s==="category descending"&&(r._initialCategories=f.reverse()))}},TE=ca.exports.mix,kE=Er.lightFraction,AE=me.exports,ME=function(e,r,a,i){i=i||{};var n=i.dfltColor;function o(_,b){return AE.coerce2(e,r,i.attributes,_,b)}var l=o("linecolor",n),s=o("linewidth"),f=a("showline",i.showLine||!!l||!!s);f||(delete r.linecolor,delete r.linewidth);var c=TE(n,i.bgColor,i.blend||kE).toRgbString(),v=o("gridcolor",c),u=o("gridwidth"),d=a("showgrid",i.showGrid||!!v||!!u);if(d||(delete r.gridcolor,delete r.gridwidth),!i.noZeroLine){var h=o("zerolinecolor",n),p=o("zerolinewidth"),g=a("zeroline",i.showGrid||!!h||!!p);g||(delete r.zerolinecolor,delete r.zerolinewidth)}},eg=gt,SE=We,Jo=me.exports,LE=ri,fd=ti,CE=i1,DE=n1,EE=f1,$E=c1,RE=wE,PE=ME,tg=rh,Zs=$r.WEEKDAY_PATTERN,zE=$r.HOUR_PATTERN,cw=function(e,r,a,i,n){var o=i.letter,l=i.font||{},s=i.splomStash||{},f=a("visible",!i.visibleDflt),c=r._template||{},v=r.type||c.type||"-",u;if(v==="date"){var d=SE.getComponentMethod("calendars","handleDefaults");d(e,r,"calendar",i.calendar),i.noTicklabelmode||(u=a("ticklabelmode"))}var h="";(!i.noTicklabelposition||v==="multicategory")&&(h=Jo.coerce(e,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:u==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||a("ticklabeloverflow",h.indexOf("inside")!==-1?"hide past domain":v==="category"||v==="multicategory"?"allow":"hide past div"),tg(r,n);var p=!r.isValidRange(e.range);p&&i.reverseDflt&&(p="reversed");var g=a("autorange",p);g&&(v==="linear"||v==="-")&&a("rangemode"),a("range"),r.cleanRange(),RE(e,r,a,i),v!=="category"&&!i.noHover&&a("hoverformat");var _=a("color"),b=_!==fd.color.dflt?_:l.color,w=s.label||n._dfltTitle[o];if($E(e,r,a,v,i),!f)return r;a("title.text",w),Jo.coerceFont(a,"title.font",{family:l.family,size:Jo.bigFont(l.size),color:b}),CE(e,r,a,v),EE(e,r,a,v,i),DE(e,r,a,i),PE(e,r,a,{dfltColor:_,bgColor:i.bgColor,showGrid:i.showGrid,attributes:fd}),(r.showline||r.ticks)&&a("mirror"),i.automargin&&a("automargin");var m=v==="multicategory";if(!i.noTickson&&(v==="category"||m)&&(r.ticks||r.showgrid)){var y;m&&(y="boundaries");var x=a("tickson",y);x==="boundaries"&&delete r.ticklabelposition}if(m){var T=a("showdividers");T&&(a("dividercolor"),a("dividerwidth"))}if(v==="date")if(LE(e,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:IE}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var k=0;k<r.rangebreaks.length;k++)if(r.rangebreaks[k].pattern===Zs){r._hasDayOfWeekBreaks=!0;break}if(tg(r,n),n._has("scattergl")||n._has("splom"))for(var S=0;S<i.data.length;S++){var A=i.data[S];(A.type==="scattergl"||A.type==="splom")&&(A.visible=!1,Jo.warn(A.type+" traces do not work on axes with rangebreaks. Setting trace "+A.index+" to `visible: false`."))}}return r};function IE(t,e,r){function a(u,d){return Jo.coerce(t,e,fd.rangebreaks,u,d)}var i=a("enabled");if(i){var n=a("bounds");if(n&&n.length>=2){var o="",l,s;if(n.length===2){for(l=0;l<2;l++)if(s=rg(n[l]),s){o=Zs;break}}var f=a("pattern",o);if(f===Zs)for(l=0;l<2;l++)s=rg(n[l]),s&&(e.bounds[l]=n[l]=s-1);if(f)for(l=0;l<2;l++)switch(s=n[l],f){case Zs:if(!eg(s)){e.enabled=!1;return}if(s=+s,s!==Math.floor(s)||s<0||s>=7){e.enabled=!1;return}e.bounds[l]=n[l]=s;break;case zE:if(!eg(s)){e.enabled=!1;return}if(s=+s,s<0||s>24){e.enabled=!1;return}e.bounds[l]=n[l]=s;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(n[0]<c[0]&&n[1]>c[1]){e.enabled=!1;return}}else if(n[0]>c[0]&&n[1]<c[1]){e.enabled=!1;return}}}else{var v=a("values");if(v&&v.length)a("dvalue");else{e.enabled=!1;return}}}}var NE={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function rg(t){if(typeof t=="string")return NE[t.substr(0,3).toLowerCase()]}var FE=gt,Ts=me.exports,uw=function(e,r,a,i){var n=i.counterAxes||[],o=i.overlayableAxes||[],l=i.letter,s=i.grid,f,c,v,u;s&&(c=s._domains[l][s._axisMap[r._id]],f=s._anchors[r._id],c&&(v=s[l+"side"].split(" ")[0],u=s.domain[l][v==="right"||v==="top"?1:0])),c=c||[0,1],f=f||(FE(e.position)?"free":n[0]||"free"),v=v||(l==="x"?"bottom":"left"),u=u||0;var d=Ts.coerce(e,r,{anchor:{valType:"enumerated",values:["free"].concat(n),dflt:f}},"anchor");d==="free"&&a("position",u),Ts.coerce(e,r,{side:{valType:"enumerated",values:l==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");var h=!1;if(o.length&&(h=Ts.coerce(e,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!h){var p=a("domain",c);p[0]>p[1]-1/4096&&(r.domain=c),Ts.noneOrAll(e.domain,r.domain,c)}return a("layer"),r},Nu,ag;function HE(){if(ag)return Nu;ag=1;var t=me.exports,e=ft.exports,r=ua.isUnifiedHover,a=Z1,i=Ht,n=Rl,o=ti,l=xE(),s=cw,f=ii,c=uw,v=ir,u=v.id2name,d=v.name2id,h=$r.AX_ID_PATTERN,p=We,g=p.traceIs,_=p.getComponentMethod;function b(w,m,y){Array.isArray(w[m])?w[m].push(y):w[m]=[y]}return Nu=function(m,y,x){var T=y.autotypenumbers,k={},S={},A={},E={},M={},D={},$={},I={},P={},R={},L,C;for(L=0;L<x.length;L++){var z=x[L];if(!(!g(z,"cartesian")&&!g(z,"gl2d"))){var F;if(z.xaxis)F=u(z.xaxis),b(k,F,z);else if(z.xaxes)for(C=0;C<z.xaxes.length;C++)b(k,u(z.xaxes[C]),z);var H;if(z.yaxis)H=u(z.yaxis),b(k,H,z);else if(z.yaxes)for(C=0;C<z.yaxes.length;C++)b(k,u(z.yaxes[C]),z);if(z.type==="funnel"?z.orientation==="h"?(F&&(S[F]=!0),H&&($[H]=!0)):H&&(A[H]=!0):z.type==="image"?(H&&(I[H]=!0),F&&(I[F]=!0)):(H&&(M[H]=!0,D[H]=!0),(!g(z,"carpet")||z.type==="carpet"&&!z._cheater)&&F&&(E[F]=!0)),z.type==="carpet"&&z._cheater&&F&&(S[F]=!0),g(z,"2dMap")&&(P[F]=!0,P[H]=!0),g(z,"oriented")){var B=z.orientation==="h"?H:F;R[B]=!0}}}var O=y._subplots,W=O.xaxis,j=O.yaxis,Z=t.simpleMap(W,u),K=t.simpleMap(j,u),Q=Z.concat(K),ee=e.background;W.length&&j.length&&(ee=t.coerce(m,y,n,"plot_bgcolor"));var ne=e.combine(ee,y.paper_bgcolor),le,se,oe,V,ie;function ge(){var ut=k[le]||[];ie._traceIndices=ut.map(function(_t){return _t._expandedIndex}),ie._annIndices=[],ie._shapeIndices=[],ie._imgIndices=[],ie._subplotsWith=[],ie._counterAxes=[],ie._name=ie._attr=le,ie._id=se}function de(ut,_t){return t.coerce(V,ie,o,ut,_t)}function ke(ut,_t){return t.coerce2(V,ie,o,ut,_t)}function ue(ut){return ut==="x"?j:W}function Y(ut,_t){for(var N=ut==="x"?Z:K,U=[],G=0;G<N.length;G++){var q=N[G];q!==_t&&!(m[q]||{}).overlaying&&U.push(d(q))}return U}var fe={x:ue("x"),y:ue("y")},Ae=fe.x.concat(fe.y),be={},Ce=[];function Me(){var ut=V.matches;h.test(ut)&&Ae.indexOf(ut)===-1&&(be[ut]=V.type,Ce=Object.keys(be))}var Te=a(m,y),X=r(Te);for(L=0;L<Q.length;L++){le=Q[L],se=d(le),oe=le.charAt(0),t.isPlainObject(m[le])||(m[le]={}),V=m[le],ie=i.newContainer(y,le,oe+"axis"),ge();var pe=oe==="x"&&!E[le]&&S[le]||oe==="y"&&!M[le]&&A[le],ce=oe==="y"&&(!D[le]&&$[le]||I[le]),he={letter:oe,font:y.font,outerTicks:P[le],showGrid:!R[le],data:k[le]||[],bgColor:ne,calendar:y.calendar,automargin:!0,visibleDflt:pe,reverseDflt:ce,autotypenumbersDflt:T,splomStash:((y._splomAxes||{})[oe]||{})[se]};de("uirevision",y.uirevision),l(V,ie,de,he),s(V,ie,de,he,y);var De=X&&oe===Te.charAt(0),je=ke("spikecolor",X?ie.color:void 0),$e=ke("spikethickness",X?1.5:void 0),Se=ke("spikedash",X?"dot":void 0),Ge=ke("spikemode",X?"across":void 0),Pe=ke("spikesnap"),Ie=de("showspikes",!!De||!!je||!!$e||!!Se||!!Ge||!!Pe);Ie||(delete ie.spikecolor,delete ie.spikethickness,delete ie.spikedash,delete ie.spikemode,delete ie.spikesnap),c(V,ie,de,{letter:oe,counterAxes:fe[oe],overlayableAxes:Y(oe,le),grid:y.grid}),de("title.standoff"),Me(),ie._input=V}for(L=0;L<Ce.length;){se=Ce[L++],le=u(se),oe=le.charAt(0),t.isPlainObject(m[le])||(m[le]={}),V=m[le],ie=i.newContainer(y,le,oe+"axis"),ge();var Ue={letter:oe,font:y.font,outerTicks:P[le],showGrid:!R[le],data:[],bgColor:ne,calendar:y.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((y._splomAxes||{})[oe]||{})[se]};de("uirevision",y.uirevision),ie.type=be[se]||"linear",s(V,ie,de,Ue,y),c(V,ie,de,{letter:oe,counterAxes:fe[oe],overlayableAxes:Y(oe,le),grid:y.grid}),de("fixedrange"),Me(),ie._input=V}var Xe=_("rangeslider","handleDefaults"),St=_("rangeselector","handleDefaults");for(L=0;L<Z.length;L++)le=Z[L],V=m[le],ie=y[le],Xe(m,y,le),ie.type==="date"&&St(V,ie,y,K,ie.calendar),de("fixedrange");for(L=0;L<K.length;L++){le=K[L],V=m[le],ie=y[le];var ht=y[u(ie.anchor)],Ft=_("rangeslider","isVisible")(ht);de("fixedrange",Ft)}f.handleDefaults(m,y,{axIds:Ae.concat(Ce).sort(v.idSort),axHasImage:I})},Nu}var Fu,ig;function OE(){if(ig)return Fu;ig=1;var t=ct.exports,e=We,r=me.exports,a=Pt.exports,i=jt.exports;return Fu=function(o,l,s,f){var c=o._fullLayout;if(l.length===0){i.redrawComponents(o);return}function v(y){var x=y.xaxis,T=y.yaxis;c._defs.select("#"+y.clipId+"> rect").call(a.setTranslate,0,0).call(a.setScale,1,1),y.plot.call(a.setTranslate,x._offset,T._offset).call(a.setScale,1,1);var k=y.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(a.setPointGroupScale,1,1),k.selectAll(".textpoint").call(a.setTextPointsScale,1,1),k.call(a.hideOutsideRangePoints,y)}function u(y,x){var T=y.plotinfo,k=T.xaxis,S=T.yaxis,A=k._length,E=S._length,M=!!y.xr1,D=!!y.yr1,$=[];if(M){var I=r.simpleMap(y.xr0,k.r2l),P=r.simpleMap(y.xr1,k.r2l),R=I[1]-I[0],L=P[1]-P[0];$[0]=(I[0]*(1-x)+x*P[0]-I[0])/(I[1]-I[0])*A,$[2]=A*(1-x+x*L/R),k.range[0]=k.l2r(I[0]*(1-x)+x*P[0]),k.range[1]=k.l2r(I[1]*(1-x)+x*P[1])}else $[0]=0,$[2]=A;if(D){var C=r.simpleMap(y.yr0,S.r2l),z=r.simpleMap(y.yr1,S.r2l),F=C[1]-C[0],H=z[1]-z[0];$[1]=(C[1]*(1-x)+x*z[1]-C[1])/(C[0]-C[1])*E,$[3]=E*(1-x+x*H/F),S.range[0]=k.l2r(C[0]*(1-x)+x*z[0]),S.range[1]=S.l2r(C[1]*(1-x)+x*z[1])}else $[1]=0,$[3]=E;i.drawOne(o,k,{skipTitle:!0}),i.drawOne(o,S,{skipTitle:!0}),i.redrawComponents(o,[k._id,S._id]);var B=M?A/$[2]:1,O=D?E/$[3]:1,W=M?$[0]:0,j=D?$[1]:0,Z=M?$[0]/$[2]*A:0,K=D?$[1]/$[3]*E:0,Q=k._offset-Z,ee=S._offset-K;T.clipRect.call(a.setTranslate,W,j).call(a.setScale,1/B,1/O),T.plot.call(a.setTranslate,Q,ee).call(a.setScale,B,O),a.setPointGroupScale(T.zoomScalePts,1/B,1/O),a.setTextPointsScale(T.zoomScaleTxt,1/B,1/O)}var d;f&&(d=f());function h(){for(var y={},x=0;x<l.length;x++){var T=l[x],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr1&&(y[k._name+".range"]=T.xr1.slice()),T.yr1&&(y[S._name+".range"]=T.yr1.slice())}return d&&d(),e.call("relayout",o,y).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}function p(){for(var y={},x=0;x<l.length;x++){var T=l[x],k=T.plotinfo.xaxis,S=T.plotinfo.yaxis;T.xr0&&(y[k._name+".range"]=T.xr0.slice()),T.yr0&&(y[S._name+".range"]=T.yr0.slice())}return e.call("relayout",o,y).then(function(){for(var A=0;A<l.length;A++)v(l[A].plotinfo)})}var g,_,b,w=t.ease(s.easing);o._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(b),b=null,p()});function m(){_=Date.now();for(var y=Math.min(1,(_-g)/s.duration),x=w(y),T=0;T<l.length;T++)u(l[T],x);_-g>s.duration?(h(),b=window.cancelAnimationFrame(m)):b=window.requestAnimationFrame(m)}return g=Date.now(),b=window.requestAnimationFrame(m),Promise.resolve()},Fu}var hc=ct.exports,ng=We,Af=me.exports,BE=ar.exports,jE=Pt.exports,og=Il.getModuleCalcData,Wi=ir,Oa=$r,GE=dn,It=Af.ensureSingle;function lg(t,e,r){return Af.ensureSingle(t,e,r,function(a){a.datum(r)})}sr.name="cartesian";sr.attr=["xaxis","yaxis"];sr.idRoot=["x","y"];sr.idRegex=Oa.idRegex;sr.attrRegex=Oa.attrRegex;sr.attributes=bE();sr.layoutAttributes=ti;sr.supplyLayoutDefaults=HE();sr.transitionAxes=OE();sr.finalizeSubplots=function(t,e){var r=e._subplots,a=r.xaxis,i=r.yaxis,n=r.cartesian,o=n.concat(r.gl2d||[]),l={},s={},f,c,v;for(f=0;f<o.length;f++){var u=o[f].split("y");l[u[0]]=1,s["y"+u[1]]=1}for(f=0;f<a.length;f++)c=a[f],l[c]||(v=(t[Wi.id2name(c)]||{}).anchor,Oa.idRegex.y.test(v)||(v="y"),n.push(c+v),o.push(c+v),s[v]||(s[v]=1,Af.pushUnique(i,v)));for(f=0;f<i.length;f++)v=i[f],s[v]||(c=(t[Wi.id2name(v)]||{}).anchor,Oa.idRegex.x.test(c)||(c="x"),n.push(c+v),o.push(c+v),l[c]||(l[c]=1,Af.pushUnique(a,c)));if(!o.length){c="",v="";for(var d in t)if(Oa.attrRegex.test(d)){var h=d.charAt(0);h==="x"?(!c||+d.substr(5)<+c.substr(5))&&(c=d):(!v||+d.substr(5)<+v.substr(5))&&(v=d)}c=c?Wi.name2id(c):"x",v=v?Wi.name2id(v):"y",a.push(c),i.push(v),n.push(c+v)}};sr.plot=function(t,e,r,a){var i=t._fullLayout,n=i._subplots.cartesian,o=t.calcdata,l;if(!Array.isArray(e))for(e=[],l=0;l<o.length;l++)e.push(l);for(l=0;l<n.length;l++){for(var s=n[l],f=i._plots[s],c=[],v,u=0;u<o.length;u++){var d=o[u],h=d[0].trace;h.xaxis+h.yaxis===s&&((e.indexOf(h.index)!==-1||h.carpet)&&(v&&v[0].trace.xaxis+v[0].trace.yaxis===s&&["tonextx","tonexty","tonext"].indexOf(h.fill)!==-1&&c.indexOf(v)===-1&&c.push(v),c.push(d)),v=d)}vw(t,f,c,r,a)}};function vw(t,e,r,a,i){for(var n=Oa.traceLayerClasses,o=t._fullLayout,l=o._modules,s,f,c,v=[],u=[],d=0;d<l.length;d++){s=l[d];var h=s.name,p=ng.modules[h].categories;if(p.svg){var g=s.layerName||h+"layer",_=s.plot;f=og(r,_),c=f[0],r=f[1],c.length&&v.push({i:n.indexOf(g),className:g,plotMethod:_,cdModule:c}),p.zoomScale&&u.push("."+g)}}v.sort(function(m,y){return m.i-y.i});var b=e.plot.selectAll("g.mlayer").data(v,function(m){return m.className});if(b.enter().append("g").attr("class",function(m){return m.className}).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),b.exit().remove(),b.order(),b.each(function(m){var y=hc.select(this),x=m.className;m.plotMethod(t,e,m.cdModule,y,a,i),Oa.clipOnAxisFalseQuery.indexOf("."+x)===-1&&jE.setClipUrl(y,e.layerClipId,t)}),o._has("scattergl")&&(s=ng.getModule("scattergl"),c=og(r,s)[0],s.plot(t,e,c)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(Oa.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),u.length)){var w=e.plot.selectAll(u.join(",")).selectAll(".trace");e.zoomScalePts=w.selectAll("path.point"),e.zoomScaleTxt=w.selectAll(".textpoint")}}sr.clean=function(t,e,r,a){var i=a._plots||{},n=e._plots||{},o=a._subplots||{},l,s,f;if(a._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(f in i)l=i[f],l.plotgroup&&l.plotgroup.remove();var c=a._has&&a._has("gl"),v=e._has&&e._has("gl");if(c&&!v)for(f in i)l=i[f],l._scene&&l._scene.destroy();if(o.xaxis&&o.yaxis){var u=Wi.listIds({_fullLayout:a});for(s=0;s<u.length;s++){var d=u[s];e[Wi.id2name(d)]||a._infolayer.selectAll(".g-"+d+"title").remove()}}var h=a._has&&a._has("cartesian"),p=e._has&&e._has("cartesian");if(h&&!p)hw(a._cartesianlayer.selectAll(".subplot"),a),a._defs.selectAll(".axesclip").remove(),delete a._axisConstraintGroups,delete a._axisMatchGroups;else if(o.cartesian)for(s=0;s<o.cartesian.length;s++){var g=o.cartesian[s];if(!n[g]){var _="."+g+",."+g+"-x,."+g+"-y";a._cartesianlayer.selectAll(_).remove(),pw(g,a)}}};sr.drawFramework=function(t){var e=t._fullLayout,r=UE(t),a=e._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",function(i){return"subplot "+i[0]}),a.order(),a.exit().call(hw,e),a.each(function(i){var n=i[0],o=e._plots[n];o.plotgroup=hc.select(this),dw(t,o),o.draglayer=It(e._draggers,"g",n)})};sr.rangePlot=function(t,e,r){dw(t,e),vw(t,e,r),BE.style(t)};function UE(t){var e=t._fullLayout,r=e._subplots.cartesian,a=r.length,i,n,o,l,s,f,c=[],v=[];for(i=0;i<a;i++){o=r[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var u=s._mainAxis,d=f._mainAxis,h=u._id+d._id,p=e._plots[h];l.overlays=[],h!==o&&p?(l.mainplot=h,l.mainplotinfo=p,v.push(o)):(l.mainplot=void 0,l.mainplotinfo=void 0,c.push(o))}for(i=0;i<v.length;i++)o=v[i],l=e._plots[o],l.mainplotinfo.overlays.push(l);var g=c.concat(v),_=new Array(a);for(i=0;i<a;i++){o=g[i],l=e._plots[o],s=l.xaxis,f=l.yaxis;var b=[o,s.layer,f.layer,s.overlaying||"",f.overlaying||""];for(n=0;n<l.overlays.length;n++)b.push(l.overlays[n].id);_[i]=b}return _}function dw(t,e){var r=e.plotgroup,a=e.id,i=Oa.layerValue2layerClass[e.xaxis.layer],n=Oa.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,f=s.plotgroup,c=a+"-x",v=a+"-y";e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,It(s.overlinesBelow,"path",c),It(s.overlinesBelow,"path",v),It(s.overaxesBelow,"g",c),It(s.overaxesBelow,"g",v),e.plot=It(s.overplot,"g",a),It(s.overlinesAbove,"path",c),It(s.overlinesAbove,"path",v),It(s.overaxesAbove,"g",c),It(s.overaxesAbove,"g",v),e.xlines=f.select(".overlines-"+i).select("."+c),e.ylines=f.select(".overlines-"+n).select("."+v),e.xaxislayer=f.select(".overaxes-"+i).select("."+c),e.yaxislayer=f.select(".overaxes-"+n).select("."+v)}else if(o)e.xlines=It(r,"path","xlines-above"),e.ylines=It(r,"path","ylines-above"),e.xaxislayer=It(r,"g","xaxislayer-above"),e.yaxislayer=It(r,"g","yaxislayer-above");else{var l=It(r,"g","layer-subplot");e.shapelayer=It(l,"g","shapelayer"),e.imagelayer=It(l,"g","imagelayer"),e.gridlayer=It(r,"g","gridlayer"),e.zerolinelayer=It(r,"g","zerolinelayer"),It(r,"path","xlines-below"),It(r,"path","ylines-below"),e.overlinesBelow=It(r,"g","overlines-below"),It(r,"g","xaxislayer-below"),It(r,"g","yaxislayer-below"),e.overaxesBelow=It(r,"g","overaxes-below"),e.plot=It(r,"g","plot"),e.overplot=It(r,"g","overplot"),e.xlines=It(r,"path","xlines-above"),e.ylines=It(r,"path","ylines-above"),e.overlinesAbove=It(r,"g","overlines-above"),It(r,"g","xaxislayer-above"),It(r,"g","yaxislayer-above"),e.overaxesAbove=It(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+i),e.ylines=r.select(".ylines-"+n),e.xaxislayer=r.select(".xaxislayer-"+i),e.yaxislayer=r.select(".yaxislayer-"+n)}o||(lg(e.gridlayer,"g",e.xaxis._id),lg(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map(function(u){return u[0]}).sort(Wi.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function hw(t,e){if(!!t){var r={};t.each(function(s){var f=s[0],c=hc.select(this);c.remove(),pw(f,e),r[f]=!0});for(var a in e._plots)for(var i=e._plots[a],n=i.overlays||[],o=0;o<n.length;o++){var l=n[o];r[l.id]&&l.plot.selectAll(".trace").remove()}}}function pw(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}sr.toSVG=function(t){var e=t._fullLayout._glimages,r=hc.select(t).selectAll(".svg-container"),a=r.filter(function(n,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var n=this,o=n.toDataURL("image/png"),l=e.append("svg:image");l.attr({xmlns:GE.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:n.style.width,height:n.style.height})}a.each(i)};sr.updateFx=E_().updateFx;var ks=Rr,VE={hasLines:ks.hasLines,hasMarkers:ks.hasMarkers,hasText:ks.hasText,isBubble:ks.isBubble,attributes:To,supplyDefaults:U3,crossTraceDefaults:W_,calc:Hh.calc,crossTraceCalc:J3,arraysToCalcdata:Q_,plot:lE,colorbar:jl,formatLabels:sw,style:Wy.style,styleOnSelect:Wy.styleOnSelect,hoverPoints:yE,selectPoints:gE,animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:sr,categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{description:["The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts.","The data visualized as scatter point or lines is set in `x` and `y`.","Text (appearing either on the chart or on hover only) is via `text`.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to numerical arrays."].join(" ")}},qE={moduleType:"component",name:"legend",layoutAttributes:F1,supplyLayoutDefaults:H1,draw:j1,style:B1},mw=[{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}],XE=ct.exports,YE=ft.exports,sg=mw,Gh=me.exports,WE=Gh.strScale,ZE=Gh.strRotate,KE=Gh.strTranslate,QE=function(e,r,a){var i=e.node(),n=sg[a.arrowhead||0],o=sg[a.startarrowhead||0],l=(a.arrowwidth||1)*(a.arrowsize||1),s=(a.arrowwidth||1)*(a.startarrowsize||1),f=r.indexOf("start")>=0,c=r.indexOf("end")>=0,v=n.backoff*l+a.standoff,u=o.backoff*s+a.startstandoff,d,h,p,g;if(i.nodeName==="line"){d={x:+e.attr("x1"),y:+e.attr("y1")},h={x:+e.attr("x2"),y:+e.attr("y2")};var _=d.x-h.x,b=d.y-h.y;if(p=Math.atan2(b,_),g=p+Math.PI,v&&u&&v+u>Math.sqrt(_*_+b*b)){$();return}if(v){if(v*v>_*_+b*b){$();return}var w=v*Math.cos(p),m=v*Math.sin(p);h.x+=w,h.y+=m,e.attr({x2:h.x,y2:h.y})}if(u){if(u*u>_*_+b*b){$();return}var y=u*Math.cos(p),x=u*Math.sin(p);d.x-=y,d.y-=x,e.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var T=i.getTotalLength(),k="";if(T<v+u){$();return}var S=i.getPointAtLength(0),A=i.getPointAtLength(.1);p=Math.atan2(S.y-A.y,S.x-A.x),d=i.getPointAtLength(Math.min(u,T)),k="0px,"+u+"px,";var E=i.getPointAtLength(T),M=i.getPointAtLength(T-.1);g=Math.atan2(E.y-M.y,E.x-M.x),h=i.getPointAtLength(Math.max(0,T-v));var D=k?u+v:v;k+=T-D+"px,"+T+"px",e.style("stroke-dasharray",k)}function $(){e.style("stroke-dasharray","0px,100px")}function I(P,R,L,C){!P.path||(P.noRotate&&(L=0),XE.select(i.parentNode).append("path").attr({class:e.attr("class"),d:P.path,transform:KE(R.x,R.y)+ZE(L*180/Math.PI)+WE(C)}).style({fill:YE.rgb(a.arrowcolor),"stroke-width":0}))}f&&I(o,d,p,s),c&&I(n,h,g,l)},fg=ct.exports,Hu=We,JE=ar.exports,di=me.exports,Ou=di.strTranslate,wl=jt.exports,Fi=ft.exports,Va=Pt.exports,cg=Ma,Bu=xr,ju=Di,Bo=Ca.exports,e$=Ht.arrayEditor,t$=QE,Uh={draw:r$,drawOne:yw,drawRaw:gw};function r$(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&yw(t,r);return JE.previousPromises(t)}function yw(t,e){var r=t._fullLayout,a=r.annotations[e]||{},i=wl.getFromId(t,a.xref),n=wl.getFromId(t,a.yref);i&&i.setScale(),n&&n.setScale(),gw(t,a,e,!1,i,n)}function ui(t,e,r,a,i){var n=i[r],o=i[r+"ref"],l=r.indexOf("y")!==-1,s=wl.getRefType(o)==="domain",f=l?a.h:a.w;return t?s?n+(l?-e:e)/t._length:t.p2r(t.r2p(n)+e):n+(l?-e:e)/f}function gw(t,e,r,a,i,n){var o=t._fullLayout,l=t._fullLayout._size,s=t._context.edits,f,c;a?(f="annotation-"+a,c=a+".annotations"):(f="annotation",c="annotations");var v=e$(t.layout,c,e),u=v.modifyBase,d=v.modifyItem,h=v.getUpdateObj;o._infolayer.selectAll("."+f+'[data-index="'+r+'"]').remove();var p="clip"+o._uid+"_ann"+r;if(!e._input||e.visible===!1){fg.selectAll("#"+p).remove();return}var g={x:{},y:{}},_=+e.textangle||0,b=o._infolayer.append("g").classed(f,!0).attr("data-index",String(r)).style("opacity",e.opacity),w=b.append("g").classed("annotation-text-g",!0),m=s[e.showarrow?"annotationTail":"annotationPosition"],y=e.captureevents||s.annotationText||m;function x(C){var z={index:r,annotation:e._input,fullAnnotation:e,event:C};return a&&(z.subplotId=a),z}var T=w.append("g").style("pointer-events",y?"all":null).call(ju,"pointer").on("click",function(){t._dragging=!1,t.emit("plotly_clickannotation",x(fg.event))});e.hovertext&&T.on("mouseover",function(){var C=e.hoverlabel,z=C.font,F=this.getBoundingClientRect(),H=t.getBoundingClientRect();cg.loneHover({x0:F.left-H.left,x1:F.right-H.left,y:(F.top+F.bottom)/2-H.top,text:e.hovertext,color:C.bgcolor,borderColor:C.bordercolor,fontFamily:z.family,fontSize:z.size,fontColor:z.color},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:t})}).on("mouseout",function(){cg.loneUnhover(o._hoverlayer.node())});var k=e.borderwidth,S=e.borderpad,A=k+S,E=T.append("rect").attr("class","bg").style("stroke-width",k+"px").call(Fi.stroke,e.bordercolor).call(Fi.fill,e.bgcolor),M=e.width||e.height,D=o._topclips.selectAll("#"+p).data(M?[0]:[]);D.enter().append("clipPath").classed("annclip",!0).attr("id",p).append("rect"),D.exit().remove();var $=e.font,I=o._meta?di.templateString(e.text,o._meta):e.text,P=T.append("text").classed("annotation-text",!0).text(I);function R(C){return C.call(Va.font,$).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),Bu.convertToTspans(C,t,L),C}function L(){var C=P.selectAll("a");if(C.size()===1&&C.text()===P.text()){var z=T.insert("a",":first-child").attr({"xlink:xlink:href":C.attr("xlink:href"),"xlink:xlink:show":C.attr("xlink:show")}).style({cursor:"pointer"});z.node().appendChild(E.node())}var F=T.select(".annotation-text-math-group"),H=!F.empty(),B=Va.bBox((H?F:P).node()),O=B.width,W=B.height,j=e.width||O,Z=e.height||W,K=Math.round(j+2*A),Q=Math.round(Z+2*A);function ee(ut,_t){return _t==="auto"&&(ut<1/3?_t="left":ut>2/3?_t="right":_t="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[_t]}for(var ne=!1,le=["x","y"],se=0;se<le.length;se++){var oe=le[se],V=e[oe+"ref"]||oe,ie=e["a"+oe+"ref"],ge={x:i,y:n}[oe],de=(_+(oe==="x"?0:-90))*Math.PI/180,ke=K*Math.cos(de),ue=Q*Math.sin(de),Y=Math.abs(ke)+Math.abs(ue),fe=e[oe+"anchor"],Ae=e[oe+"shift"]*(oe==="x"?1:-1),be=g[oe],Ce,Me,Te,X,pe,ce=wl.getRefType(V);if(ge&&ce!=="domain"){var he=ge.r2fraction(e[oe]);(he<0||he>1)&&(ie===V?(he=ge.r2fraction(e["a"+oe]),(he<0||he>1)&&(ne=!0)):ne=!0),Ce=ge._offset+ge.r2p(e[oe]),X=.5}else{var De=ce==="domain";oe==="x"?(Te=e[oe],Ce=De?ge._offset+ge._length*Te:Ce=l.l+l.w*Te):(Te=1-e[oe],Ce=De?ge._offset+ge._length*Te:Ce=l.t+l.h*Te),X=e.showarrow?.5:Te}if(e.showarrow){be.head=Ce;var je=e["a"+oe];if(pe=ke*ee(.5,e.xanchor)-ue*ee(.5,e.yanchor),ie===V){var $e=wl.getRefType(ie);$e==="domain"?(oe==="y"&&(je=1-je),be.tail=ge._offset+ge._length*je):$e==="paper"?oe==="y"?(je=1-je,be.tail=l.t+l.h*je):be.tail=l.l+l.w*je:be.tail=ge._offset+ge.r2p(je),Me=pe}else be.tail=Ce+je,Me=pe+je;be.text=be.tail+pe;var Se=o[oe==="x"?"width":"height"];if(V==="paper"&&(be.head=di.constrain(be.head,1,Se-1)),ie==="pixel"){var Ge=-Math.max(be.tail-3,be.text),Pe=Math.min(be.tail+3,be.text)-Se;Ge>0?(be.tail+=Ge,be.text+=Ge):Pe>0&&(be.tail-=Pe,be.text-=Pe)}be.tail+=Ae,be.head+=Ae}else pe=Y*ee(X,fe),Me=pe,be.text=Ce+pe;be.text+=Ae,pe+=Ae,Me+=Ae,e["_"+oe+"padplus"]=Y/2+Me,e["_"+oe+"padminus"]=Y/2-Me,e["_"+oe+"size"]=Y,e["_"+oe+"shift"]=pe}if(ne){T.remove();return}var Ie=0,Ue=0;if(e.align!=="left"&&(Ie=(j-O)*(e.align==="center"?.5:1)),e.valign!=="top"&&(Ue=(Z-W)*(e.valign==="middle"?.5:1)),H)F.select("svg").attr({x:A+Ie-1,y:A+Ue}).call(Va.setClipUrl,M?p:null,t);else{var Xe=A+Ue-B.top,St=A+Ie-B.left;P.call(Bu.positionText,St,Xe).call(Va.setClipUrl,M?p:null,t)}D.select("rect").call(Va.setRect,A,A,j,Z),E.call(Va.setRect,k/2,k/2,K-k,Q-k),T.call(Va.setTranslate,Math.round(g.x.text-K/2),Math.round(g.y.text-Q/2)),w.attr({transform:"rotate("+_+","+g.x.text+","+g.y.text+")"});var ht=function(ut,_t){b.selectAll(".annotation-arrow-g").remove();var N=g.x.head,U=g.y.head,G=g.x.tail+ut,q=g.y.tail+_t,ae=g.x.text+ut,J=g.y.text+_t,ye=di.rotationXYMatrix(_,ae,J),_e=di.apply2DTransform(ye),ve=di.apply2DTransform2(ye),re=+E.attr("width"),xe=+E.attr("height"),we=ae-.5*re,Fe=we+re,et=J-.5*xe,ot=et+xe,at=[[we,et,we,ot],[we,ot,Fe,ot],[Fe,ot,Fe,et],[Fe,et,we,et]].map(ve);if(!at.reduce(function(lt,Be){return lt^!!di.segmentsIntersect(N,U,N+1e6,U+1e6,Be[0],Be[1],Be[2],Be[3])},!1)){at.forEach(function(lt){var Be=di.segmentsIntersect(G,q,N,U,lt[0],lt[1],lt[2],lt[3]);Be&&(G=Be.x,q=Be.y)});var qe=e.arrowwidth,kt=e.arrowcolor,it=e.arrowside,Ye=b.append("g").style({opacity:Fi.opacity(kt)}).classed("annotation-arrow-g",!0),wt=Ye.append("path").attr("d","M"+G+","+q+"L"+N+","+U).style("stroke-width",qe+"px").call(Fi.stroke,Fi.rgb(kt));if(t$(wt,it,e),s.annotationPosition&&wt.node().parentNode&&!a){var mt=N,nt=U;if(e.standoff){var Ke=Math.sqrt(Math.pow(N-G,2)+Math.pow(U-q,2));mt+=e.standoff*(G-N)/Ke,nt+=e.standoff*(q-U)/Ke}var Ve=Ye.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(G-mt)+","+(q-nt),transform:Ou(mt,nt)}).style("stroke-width",qe+6+"px").call(Fi.stroke,"rgba(0,0,0,0)").call(Fi.fill,"rgba(0,0,0,0)"),tt,pt;Bo.init({element:Ve.node(),gd:t,prepFn:function(){var lt=Va.getTranslate(T);tt=lt.x,pt=lt.y,i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0)},moveFn:function(lt,Be){var st=_e(tt,pt),Lt=st[0]+lt,pr=st[1]+Be;T.call(Va.setTranslate,Lt,pr),d("x",ui(i,lt,"x",l,e)),d("y",ui(n,Be,"y",l,e)),e.axref===e.xref&&d("ax",ui(i,lt,"ax",l,e)),e.ayref===e.yref&&d("ay",ui(n,Be,"ay",l,e)),Ye.attr("transform",Ou(lt,Be)),w.attr({transform:"rotate("+_+","+Lt+","+pr+")"})},doneFn:function(){Hu.call("_guiRelayout",t,h());var lt=document.querySelector(".js-notes-box-panel");lt&<.redraw(lt.selectedObj)}})}}};if(e.showarrow&&ht(0,0),m){var Ft;Bo.init({element:T.node(),gd:t,prepFn:function(){Ft=w.attr("transform")},moveFn:function(ut,_t){var N="pointer";if(e.showarrow)e.axref===e.xref?d("ax",ui(i,ut,"ax",l,e)):d("ax",e.ax+ut),e.ayref===e.yref?d("ay",ui(n,_t,"ay",l.w,e)):d("ay",e.ay+_t),ht(ut,_t);else{if(a)return;var U,G;if(i)U=ui(i,ut,"x",l,e);else{var q=e._xsize/l.w,ae=e.x+(e._xshift-e.xshift)/l.w-q/2;U=Bo.align(ae+ut/l.w,q,0,1,e.xanchor)}if(n)G=ui(n,_t,"y",l,e);else{var J=e._ysize/l.h,ye=e.y-(e._yshift+e.yshift)/l.h-J/2;G=Bo.align(ye-_t/l.h,J,0,1,e.yanchor)}d("x",U),d("y",G),(!i||!n)&&(N=Bo.getCursor(i?.5:U,n?.5:G,e.xanchor,e.yanchor))}w.attr({transform:Ou(ut,_t)+Ft}),ju(T,N)},clickFn:function(ut,_t){e.captureevents&&t.emit("plotly_clickannotation",x(_t))},doneFn:function(){ju(T),Hu.call("_guiRelayout",t,h());var ut=document.querySelector(".js-notes-box-panel");ut&&ut.redraw(ut.selectedObj)}})}}s.annotationText?P.call(Bu.makeEditable,{delegate:T,gd:t}).call(R).on("edit",function(C){e.text=C,this.call(R),d("text",C),i&&i.autorange&&u(i._name+".autorange",!0),n&&n.autorange&&u(n._name+".autorange",!0),Hu.call("_guiRelayout",t,h())}):P.call(R)}var ug=me.exports,a$=We,vg=Ht.arrayEditor,i$={hasClickToShow:n$,onClick:o$};function n$(t,e){var r=bw(t,e);return r.on.length>0||r.explicitOff.length>0}function o$(t,e){var r=bw(t,e),a=r.on,i=r.off.concat(r.explicitOff),n={},o=t._fullLayout.annotations,l,s;if(!!(a.length||i.length)){for(l=0;l<a.length;l++)s=vg(t.layout,"annotations",o[a[l]]),s.modifyItem("visible",!0),ug.extendFlat(n,s.getUpdateObj());for(l=0;l<i.length;l++)s=vg(t.layout,"annotations",o[i[l]]),s.modifyItem("visible",!1),ug.extendFlat(n,s.getUpdateObj());return a$.call("update",t,{},n)}}function bw(t,e){var r=t._fullLayout.annotations,a=[],i=[],n=[],o=(e||[]).length,l,s,f,c,v,u,d,h;for(l=0;l<r.length;l++)if(f=r[l],c=f.clicktoshow,c){for(s=0;s<o;s++)if(v=e[s],u=v.xaxis,d=v.yaxis,u._id===f.xref&&d._id===f.yref&&u.d2r(v.x)===dg(f._xclick,u)&&d.d2r(v.y)===dg(f._yclick,d)){f.visible?c==="onout"?h=i:h=n:h=a,h.push(l);break}s===o&&f.visible&&c==="onout"&&i.push(l)}return{on:a,off:i,explicitOff:n}}function dg(t,e){return e.type==="log"?e.l2r(t):e.d2r(t)}var Vh={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(" ")}},hg=mw,pg=Dr,As=$r,l$=Ht.templatedArray,Ms=Vh;function mg(t){return["In order for absolute positioning of the arrow to work, *a"+t+"ref* must be exactly the same as *"+t+"ref*, otherwise *a"+t+"ref* will revert to *pixel* (explained next).","For relative positioning, *a"+t+"ref* can be set to *pixel*,","in which case the *a"+t+"* value is specified in pixels","relative to *"+t+"*.","Absolute positioning is useful","for trendline annotations which should continue to indicate","the correct trend when zoomed. Relative positioning is useful","for specifying the text offset for an annotated point."].join(" ")}function yg(t,e,r){return["Sets the",t,"component of the arrow tail about the arrow head.","If `a"+t+"ref` is `pixel`, a positive (negative)","component corresponds to an arrow pointing","from",r,"to",e,"("+e,"to",r+").","If `a"+t+"ref` is not `pixel` and is exactly the same as `"+t+"ref`,","this is an absolute value on that axis,","like `"+t+"`, specified in the same coordinates as `"+t+"ref`."].join(" ")}var pc=l$("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this annotation is visible."].join(" ")},text:{valType:"string",editType:"calc+arraydraw",description:["Sets the text associated with this annotation.","Plotly uses a subset of HTML tags to do things like","newline (<br>), bold (<b></b>), italics (<i></i>),","hyperlinks (<a href='...'></a>). Tags <em>, <sup>, <sub>","<span> are also supported."].join(" ")},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw",description:["Sets the angle at which the `text` is drawn","with respect to the horizontal."].join(" ")},font:pg({editType:"calc+arraydraw",colorEditType:"arraydraw",description:"Sets the annotation text font."}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit width for the text box. null (default) lets the","text set the box width. Wider text will be clipped.","There is no automatic wrapping; use <br> to start a new line."].join(" ")},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw",description:["Sets an explicit height for the text box. null (default) lets the","text set the box height. Taller text will be clipped."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the annotation (text + arrow)."},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw",description:["Sets the horizontal alignment of the `text` within the box.","Has an effect only if `text` spans two or more lines","(i.e. `text` contains one or more <br> HTML tags) or if an","explicit width is set to override the text width."].join(" ")},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw",description:["Sets the vertical alignment of the `text` within the box.","Has an effect only if an explicit height is set to override","the text height."].join(" ")},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:"Sets the background color of the annotation."},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color of the border enclosing the annotation `text`."].join(" ")},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the padding (in px) between the `text`","and the enclosing border."].join(" ")},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw",description:["Sets the width (in px) of the border enclosing","the annotation `text`."].join(" ")},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not the annotation is drawn with an arrow.","If *true*, `text` is placed near the arrow's tail.","If *false*, `text` lines up with the `x` and `y` provided."].join(" ")},arrowcolor:{valType:"color",editType:"arraydraw",description:"Sets the color of the annotation arrow."},arrowhead:{valType:"integer",min:0,max:hg.length,dflt:1,editType:"arraydraw",description:"Sets the end annotation arrow head style."},startarrowhead:{valType:"integer",min:0,max:hg.length,dflt:1,editType:"arraydraw",description:"Sets the start annotation arrow head style."},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw",description:"Sets the annotation arrow head position."},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the end annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw",description:["Sets the size of the start annotation arrow head, relative to `arrowwidth`.","A value of 1 (default) gives a head about 3x as wide as the line."].join(" ")},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw",description:"Sets the width (in px) of annotation arrow line."},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the end arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw",description:["Sets a distance, in pixels, to move the start arrowhead away from the","position it is pointing at, for example to point at the edge of","a marker independent of zoom. Note that this shortens the arrow","from the `ax` / `ay` vector, in contrast to `xshift` / `yshift`","which moves everything by this amount."].join(" ")},ax:{valType:"any",editType:"calc+arraydraw",description:[yg("x","left","right")].join(" ")},ay:{valType:"any",editType:"calc+arraydraw",description:[yg("y","top","bottom")].join(" ")},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",As.idRegex.x.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Ms.axisRefDescription("ax","left","right"),mg("x")].join(" ")},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",As.idRegex.y.toString()],editType:"calc",description:["Indicates in what coordinates the tail of the","annotation (ax,ay) is specified.",Ms.axisRefDescription("ay","bottom","top"),mg("y")].join(" ")},xref:{valType:"enumerated",values:["paper",As.idRegex.x.toString()],editType:"calc",description:["Sets the annotation's x coordinate axis.",Ms.axisRefDescription("x","left","right")].join(" ")},x:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's x position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's horizontal position anchor","This anchor binds the `x` position to the *left*, *center*","or *right* of the annotation.","For example, if `x` is set to 1, `xref` to *paper* and","`xanchor` to *right* then the right-most portion of the","annotation lines up with the right-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *center* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow to the","right (positive) or left (negative) by this many pixels."].join(" ")},yref:{valType:"enumerated",values:["paper",As.idRegex.y.toString()],editType:"calc",description:["Sets the annotation's y coordinate axis.",Ms.axisRefDescription("y","bottom","top")].join(" ")},y:{valType:"any",editType:"calc+arraydraw",description:["Sets the annotation's y position.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw",description:["Sets the text box's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the annotation.","For example, if `y` is set to 1, `yref` to *paper* and","`yanchor` to *top* then the top-most portion of the","annotation lines up with the top-most edge of the","plotting area.","If *auto*, the anchor is equivalent to *middle* for","data-referenced annotations or if there is an arrow,","whereas for paper-referenced with no arrow, the anchor picked","corresponds to the closest side."].join(" ")},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw",description:["Shifts the position of the whole annotation and arrow up","(positive) or down (negative) by this many pixels."].join(" ")},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw",description:["Makes this annotation respond to clicks on the plot.","If you click a data point that exactly matches the `x` and `y`","values of this annotation, and it is hidden (visible: false),","it will appear. In *onoff* mode, you must click the same point","again to make it disappear, so if you click multiple points,","you can show multiple annotations. In *onout* mode, a click","anywhere else in the plot (on another data point or not) will","hide this annotation.","If you need to show/hide this annotation in response to different","`x` or `y` values, you can set `xclick` and/or `yclick`. This is","useful for example to label the side of a bar. To label markers","though, `standoff` is preferred over `xclick` and `yclick`."].join(" ")},xclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `x` value","is `xclick` rather than the annotation's `x` value."].join(" ")},yclick:{valType:"any",editType:"arraydraw",description:["Toggle this annotation when clicking a data point whose `y` value","is `yclick` rather than the annotation's `y` value."].join(" ")},hovertext:{valType:"string",editType:"arraydraw",description:["Sets text to appear when hovering over this annotation.","If omitted or blank, no hover label will appear."].join(" ")},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw",description:["Sets the background color of the hover label.","By default uses the annotation's `bgcolor` made opaque,","or white if it was transparent."].join(" ")},bordercolor:{valType:"color",editType:"arraydraw",description:["Sets the border color of the hover label.","By default uses either dark grey or white, for maximum","contrast with `hoverlabel.bgcolor`."].join(" ")},font:pg({editType:"arraydraw",description:["Sets the hover label text font.","By default uses the global hover font and size,","with color from `hoverlabel.bordercolor`."].join(" ")}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw",description:["Determines whether the annotation text box captures mouse move","and click events, or allows those events to pass through to data","points in the plot that may be behind the annotation. By default","`captureevents` is *false* unless `hovertext` is provided.","If you use the event `plotly_clickannotation` without `hovertext`","you must explicitly enable `captureevents`."].join(" ")},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc",description:["Obsolete. Set `xref` and `yref` separately instead."].join(" ")}}}),gg=me.exports,Mn=ft.exports,xw=function(e,r,a,i){i("opacity");var n=i("bgcolor"),o=i("bordercolor"),l=Mn.opacity(o);i("borderpad");var s=i("borderwidth"),f=i("showarrow");i("text",f?" ":a._dfltTitle.annotation),i("textangle"),gg.coerceFont(i,"font",a.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),f){var v=i("arrowside"),u,d;v.indexOf("end")!==-1&&(u=i("arrowhead"),d=i("arrowsize")),v.indexOf("start")!==-1&&(i("startarrowhead",u),i("startarrowsize",d)),i("arrowcolor",l?r.bordercolor:Mn.defaultLine),i("arrowwidth",(l&&s||1)*2),i("standoff"),i("startstandoff")}var h=i("hovertext"),p=a.hoverlabel||{};if(h){var g=i("hoverlabel.bgcolor",p.bgcolor||(Mn.opacity(n)?Mn.rgb(n):Mn.defaultLine)),_=i("hoverlabel.bordercolor",p.bordercolor||Mn.contrast(g));gg.coerceFont(i,"hoverlabel.font",{family:p.font.family,size:p.font.size,color:p.font.color||_})}i("captureevents",!!h)},Gu=me.exports,Hi=jt.exports,s$=ri,f$=xw,c$=pc,u$=function(e,r){s$(e,r,{name:"annotations",handleItemDefaults:v$})};function v$(t,e,r){function a(w,m){return Gu.coerce(t,e,c$,w,m)}var i=a("visible"),n=a("clicktoshow");if(!!(i||n)){f$(t,e,r,a);for(var o=e.showarrow,l=["x","y"],s=[-10,-30],f={_fullLayout:r},c=0;c<2;c++){var v=l[c],u=Hi.coerceRef(t,e,f,v,"","paper");if(u!=="paper"){var d=Hi.getFromId(f,u);d._annIndices.push(e._index)}if(Hi.coercePosition(e,f,a,u,v,.5),o){var h="a"+v,p=Hi.coerceRef(t,e,f,h,"pixel",["pixel","paper"]);p!=="pixel"&&p!==u&&(p=e[h]="pixel");var g=p==="pixel"?s[c]:.4;Hi.coercePosition(e,f,a,p,h,g)}a(v+"anchor"),a(v+"shift")}if(Gu.noneOrAll(t,e,["x","y"]),o&&Gu.noneOrAll(t,e,["ax","ay"]),n){var _=a("xclick"),b=a("yclick");e._xclick=_===void 0?e.x:Hi.cleanPosition(_,f,e.xref),e._yclick=b===void 0?e.y:Hi.cleanPosition(b,f,e.yref)}}}var d$=We,bg=me.exports,xg=ir,qh=function(e){return function(a,i){var n=a[e];if(!!Array.isArray(n))for(var o=d$.subplotsRegistry.cartesian,l=o.idRegex,s=i._subplots,f=s.xaxis,c=s.yaxis,v=s.cartesian,u=i._has("cartesian")||i._has("gl2d"),d=0;d<n.length;d++){var h=n[d];if(!!bg.isPlainObject(h)){var p=xg.cleanId(h.xref,"x",!1),g=xg.cleanId(h.yref,"y",!1),_=l.x.test(p),b=l.y.test(g);if(_||b){u||bg.pushUnique(i._basePlotModules,o);var w=!1;_&&f.indexOf(p)===-1&&(f.push(p),w=!0),b&&c.indexOf(g)===-1&&(c.push(g),w=!0),w&&_&&b&&v.push(p+g)}}}}},cd=me.exports,Zi=jt.exports,h$=Uh.draw,p$=function(e){var r=e._fullLayout,a=cd.filterVisible(r.annotations);if(a.length&&e._fullData.length)return cd.syncOrAsync([h$,m$],e)};function m$(t){var e=t._fullLayout;cd.filterVisible(e.annotations).forEach(function(r){var a=Zi.getFromId(t,r.xref),i=Zi.getFromId(t,r.yref),n=Zi.getRefType(r.xref),o=Zi.getRefType(r.yref);r._extremes={},n==="range"&&_g(r,a),o==="range"&&_g(r,i)})}function _g(t,e){var r=e._id,a=r.charAt(0),i=t[a],n=t["a"+a],o=t[a+"ref"],l=t["a"+a+"ref"],s=t["_"+a+"padplus"],f=t["_"+a+"padminus"],c={x:1,y:-1}[a]*t[a+"shift"],v=3*t.arrowsize*t.arrowwidth||0,u=v+c,d=v-c,h=3*t.startarrowsize*t.arrowwidth||0,p=h+c,g=h-c,_;if(l===o){var b=Zi.findExtremes(e,[e.r2c(i)],{ppadplus:u,ppadminus:d}),w=Zi.findExtremes(e,[e.r2c(n)],{ppadplus:Math.max(s,p),ppadminus:Math.max(f,g)});_={min:[b.min[0],w.min[0]],max:[b.max[0],w.max[0]]}}else p=n?p+n:p,g=n?g-n:g,_=Zi.findExtremes(e,[e.r2c(i)],{ppadplus:Math.max(s,u,p),ppadminus:Math.max(f,d,g)});t._extremes[r]=_}var y$=gt,g$=Id,b$=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!(n||o))return;var l=e._fullLayout.annotations,s=r._id.charAt(0),f,c;function v(d){var h=f[d],p=null;n?p=g$(h,r.range):p=Math.pow(10,h),y$(p)||(p=null),i(c+d,p)}for(var u=0;u<l.length;u++)f=l[u],c="annotations["+u+"].",f[s+"ref"]===r._id&&v(s),f["a"+s+"ref"]===r._id&&v("a"+s)},Uu=Uh,wg=i$,x$={moduleType:"component",name:"annotations",layoutAttributes:pc,supplyLayoutDefaults:u$,includeBasePlot:qh("annotations"),calcAutorange:p$,draw:Uu.draw,drawOne:Uu.drawOne,drawRaw:Uu.drawRaw,hasClickToShow:wg.hasClickToShow,onClick:wg.onClick,convertCoords:b$},Bt=pc,_$=Li.overrideAll,w$=Ht.templatedArray,ud=_$(w$("annotation",{visible:Bt.visible,x:{valType:"any",description:["Sets the annotation's x position."].join(" ")},y:{valType:"any",description:["Sets the annotation's y position."].join(" ")},z:{valType:"any",description:["Sets the annotation's z position."].join(" ")},ax:{valType:"number",description:["Sets the x component of the arrow tail about the arrow head (in pixels)."].join(" ")},ay:{valType:"number",description:["Sets the y component of the arrow tail about the arrow head (in pixels)."].join(" ")},xanchor:Bt.xanchor,xshift:Bt.xshift,yanchor:Bt.yanchor,yshift:Bt.yshift,text:Bt.text,textangle:Bt.textangle,font:Bt.font,width:Bt.width,height:Bt.height,opacity:Bt.opacity,align:Bt.align,valign:Bt.valign,bgcolor:Bt.bgcolor,bordercolor:Bt.bordercolor,borderpad:Bt.borderpad,borderwidth:Bt.borderwidth,showarrow:Bt.showarrow,arrowcolor:Bt.arrowcolor,arrowhead:Bt.arrowhead,startarrowhead:Bt.startarrowhead,arrowside:Bt.arrowside,arrowsize:Bt.arrowsize,startarrowsize:Bt.startarrowsize,arrowwidth:Bt.arrowwidth,standoff:Bt.standoff,startstandoff:Bt.startstandoff,hovertext:Bt.hovertext,hoverlabel:Bt.hoverlabel,captureevents:Bt.captureevents}),"calc","from-root"),Vu=me.exports,T$=jt.exports,k$=ri,A$=xw,M$=ud,S$=function(e,r,a){k$(e,r,{name:"annotations",handleItemDefaults:L$,fullLayout:a.fullLayout})};function L$(t,e,r,a){function i(l,s){return Vu.coerce(t,e,M$,l,s)}function n(l){var s=l+"axis",f={_fullLayout:{}};return f._fullLayout[s]=r[s],T$.coercePosition(e,f,i,l,l,.5)}var o=i("visible");!o||(A$(t,e,a.fullLayout,i),n("x"),n("y"),n("z"),Vu.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",i("ax",-10),i("ay",-30),Vu.noneOrAll(t,e,["ax","ay"])))}var Tg=me.exports,kg=jt.exports,C$=function(e){for(var r=e.fullSceneLayout,a=r.annotations,i=0;i<a.length;i++)D$(a[i],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()};function D$(t,e){var r=e.fullSceneLayout,a=r.domain,i=e.fullLayout._size,n={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},Tg.extendFlat(t._xa,n),kg.setConvert(t._xa),t._xa._offset=i.l+a.x[0]*i.w,t._xa.l2p=function(){return .5*(1+t._pdata[0]/t._pdata[3])*i.w*(a.x[1]-a.x[0])},t._ya={},Tg.extendFlat(t._ya,n),kg.setConvert(t._ya),t._ya._offset=i.t+(1-a.y[1])*i.h,t._ya.l2p=function(){return .5*(1-t._pdata[1]/t._pdata[3])*i.h*(a.y[1]-a.y[0])}}function qu(t,e){var r=[0,0,0,0],a,i;for(a=0;a<4;++a)for(i=0;i<4;++i)r[i]+=t[4*a+i]*e[a];return r}function E$(t,e){var r=qu(t.projection,qu(t.view,qu(t.model,[e[0],e[1],e[2],1])));return r}var $$=E$,R$=Uh.drawRaw,P$=$$,z$=["x","y","z"],I$=function(e){for(var r=e.fullSceneLayout,a=e.dataScale,i=r.annotations,n=0;n<i.length;n++){for(var o=i[n],l=!1,s=0;s<3;s++){var f=z$[s],c=o[f],v=r[f+"axis"],u=v.r2fraction(c);if(u<0||u>1){l=!0;break}}l?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+n+'"]').remove():(o._pdata=P$(e.glplot.cameraParams,[r.xaxis.r2l(o.x)*a[0],r.yaxis.r2l(o.y)*a[1],r.zaxis.r2l(o.z)*a[2]]),R$(e.graphDiv,o,n,e.id,o._xa,o._ya))}},N$=We,Ag=me.exports,F$={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:ud}}},layoutAttributes:ud,handleDefaults:S$,includeBasePlot:H$,convert:C$,draw:I$};function H$(t,e){var r=N$.subplotsRegistry.gl3d;if(!!r)for(var a=r.attrRegex,i=Object.keys(t),n=0;n<i.length;n++){var o=i[n];a.test(o)&&(t[o].annotations||[]).length&&(Ag.pushUnique(e._basePlotModules,r),Ag.pushUnique(e._subplots.gl3d,o))}}var Mg=pc,Sg=To.line,O$=ei.dash,jo=er.extendFlat,B$=Ht.templatedArray,Lg=Vh,_w=B$("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw",description:["Determines whether or not this shape is visible."].join(" ")},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw",description:["Specifies the shape type to be drawn.","If *line*, a line is drawn from (`x0`,`y0`) to (`x1`,`y1`)","with respect to the axes' sizing mode.","If *circle*, a circle is drawn from","((`x0`+`x1`)/2, (`y0`+`y1`)/2))","with radius","(|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|)","with respect to the axes' sizing mode.","If *rect*, a rectangle is drawn linking","(`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`)","with respect to the axes' sizing mode.","If *path*, draw a custom SVG path using `path`.","with respect to the axes' sizing mode."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:"Specifies whether shapes are drawn below or above traces."},xref:jo({},Mg.xref,{description:["Sets the shape's x coordinate axis.",Lg.axisRefDescription("x","left","right"),"If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, then you must convert","the date to unix time in milliseconds."].join(" ")}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the x axis.","If set to *scaled*, `x0`, `x1` and x coordinates within `path` refer to","data values on the x axis or a fraction of the plot area's width","(`xref` set to *paper*).","If set to *pixel*, `xanchor` specifies the x position in terms","of data or plot fraction but `x0`, `x1` and x coordinates within `path`","are pixels relative to `xanchor`. This way, the shape can have","a fixed width while maintaining a position relative to data or","plot fraction."].join(" ")},xanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `xsizemode` set to *pixel*.","Specifies the anchor point on the x axis to which `x0`, `x1`","and x coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `xsizemode` not set to *pixel*."].join(" ")},x0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting x position.","See `type` and `xsizemode` for more info."].join(" ")},x1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end x position.","See `type` and `xsizemode` for more info."].join(" ")},yref:jo({},Mg.yref,{description:["Sets the annotation's y coordinate axis.",Lg.axisRefDescription("y","bottom","top")].join(" ")}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw",description:["Sets the shapes's sizing mode along the y axis.","If set to *scaled*, `y0`, `y1` and y coordinates within `path` refer to","data values on the y axis or a fraction of the plot area's height","(`yref` set to *paper*).","If set to *pixel*, `yanchor` specifies the y position in terms","of data or plot fraction but `y0`, `y1` and y coordinates within `path`","are pixels relative to `yanchor`. This way, the shape can have","a fixed height while maintaining a position relative to data or","plot fraction."].join(" ")},yanchor:{valType:"any",editType:"calc+arraydraw",description:["Only relevant in conjunction with `ysizemode` set to *pixel*.","Specifies the anchor point on the y axis to which `y0`, `y1`","and y coordinates within `path` are relative to.","E.g. useful to attach a pixel sized shape to a certain data value.","No effect when `ysizemode` not set to *pixel*."].join(" ")},y0:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's starting y position.","See `type` and `ysizemode` for more info."].join(" ")},y1:{valType:"any",editType:"calc+arraydraw",description:["Sets the shape's end y position.","See `type` and `ysizemode` for more info."].join(" ")},path:{valType:"string",editType:"calc+arraydraw",description:["For `type` *path* - a valid SVG path with the pixel values","replaced by data values in `xsizemode`/`ysizemode` being *scaled*","and taken unmodified as pixels relative to `xanchor` and `yanchor`","in case of *pixel* size mode.","There are a few restrictions / quirks","only absolute instructions, not relative. So the allowed segments","are: M, L, H, V, Q, C, T, S, and Z","arcs (A) are not allowed because radius rx and ry are relative.","In the future we could consider supporting relative commands,","but we would have to decide on how to handle date and log axes.","Note that even as is, Q and C Bezier paths that are smooth on","linear axes may not be smooth on log, and vice versa.",'no chained "polybezier" commands - specify the segment type for',"each one.","On category axes, values are numbers scaled to the serial numbers","of categories because using the categories themselves there would","be no way to describe fractional positions","On data axes: because space and T are both normal components of path","strings, we can't use either to separate date from time parts.","Therefore we'll use underscore for this purpose:","2015-02-21_13:45:56.789"].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the shape."},line:{color:jo({},Sg.color,{editType:"arraydraw"}),width:jo({},Sg.width,{editType:"calc+arraydraw"}),dash:jo({},O$,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw",description:["Sets the color filling the shape's interior. Only applies to closed shapes."].join(" ")},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw",description:["Determines which regions of complex paths constitute the interior.","For more info please visit https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule"].join(" ")},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw",description:["Determines whether the shape could be activated for edit or not.","Has no effect when the older editable shapes mode is enabled via","`config.editable` or `config.edits.shapePosition`."].join(" ")},editType:"arraydraw"}),Xu=me.exports,Sn=jt.exports,j$=ri,G$=_w,Cg=sc,U$=function(e,r){j$(e,r,{name:"shapes",handleItemDefaults:V$})};function V$(t,e,r){function a(D,$){return Xu.coerce(t,e,G$,D,$)}var i=a("visible");if(!!i){var n=a("path"),o=n?"path":"rect",l=a("type",o);e.type!=="path"&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var s=a("line.width");s&&(a("line.color"),a("line.dash"));for(var f=a("xsizemode"),c=a("ysizemode"),v=["x","y"],u=0;u<2;u++){var d=v[u],h=d+"anchor",p=d==="x"?f:c,g={_fullLayout:r},_,b,w,m=Sn.coerceRef(t,e,g,d,void 0,"paper"),y=Sn.getRefType(m);if(y==="range"?(_=Sn.getFromId(g,m),_._shapeIndices.push(e._index),w=Cg.rangeToShapePosition(_),b=Cg.shapePositionToRange(_)):b=w=Xu.identity,l!=="path"){var x=.25,T=.75,k=d+"0",S=d+"1",A=t[k],E=t[S];t[k]=b(t[k],!0),t[S]=b(t[S],!0),p==="pixel"?(a(k,0),a(S,10)):(Sn.coercePosition(e,g,a,m,k,x),Sn.coercePosition(e,g,a,m,S,T)),e[k]=w(e[k]),e[S]=w(e[S]),t[k]=A,t[S]=E}if(p==="pixel"){var M=t[h];t[h]=b(t[h],!0),Sn.coercePosition(e,g,a,m,h,.25),e[h]=w(e[h]),t[h]=M}}l==="path"?a("path"):Xu.noneOrAll(t,e,["x0","x1","y0","y1"])}}var q$=ft.exports,X$=function(e,r,a){a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var i=a("newshape.line.width");if(i){var n=(e||{}).plot_bgcolor||"#FFF";a("newshape.line.color",q$.contrast(n)),a("newshape.line.dash")}a("activeshape.fillcolor"),a("activeshape.opacity")},vd=me.exports,Ln=jt.exports,no=Th,ww=sc,Y$=function(e){var r=e._fullLayout,a=vd.filterVisible(r.shapes);if(!(!a.length||!e._fullData.length))for(var i=0;i<a.length;i++){var n=a[i];n._extremes={};var o,l,s=Ln.getRefType(n.xref),f=Ln.getRefType(n.yref);if(n.xref!=="paper"&&s!=="domain"){var c=n.xsizemode==="pixel"?n.xanchor:n.x0,v=n.xsizemode==="pixel"?n.xanchor:n.x1;o=Ln.getFromId(e,n.xref),l=Dg(o,c,v,n.path,no.paramIsX),l&&(n._extremes[o._id]=Ln.findExtremes(o,l,W$(n)))}if(n.yref!=="paper"&&f!=="domain"){var u=n.ysizemode==="pixel"?n.yanchor:n.y0,d=n.ysizemode==="pixel"?n.yanchor:n.y1;o=Ln.getFromId(e,n.yref),l=Dg(o,u,d,n.path,no.paramIsY),l&&(n._extremes[o._id]=Ln.findExtremes(o,l,Z$(n)))}}};function W$(t){return Tw(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function Z$(t){return Tw(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function Tw(t,e,r,a,i,n){var o=t/2,l=n;if(e==="pixel"){var s=i?ww.extractPathCoords(i,n?no.paramIsY:no.paramIsX):[r,a],f=vd.aggNums(Math.max,null,s),c=vd.aggNums(Math.min,null,s),v=c<0?Math.abs(c)+o:o,u=f>0?f+o:o;return{ppad:o,ppadplus:l?v:u,ppadminus:l?u:v}}else return{ppad:o}}function Dg(t,e,r,a,i){var n=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(e!==void 0)return[n(e),n(r)];if(!!a){var o=1/0,l=-1/0,s=a.match(no.segmentRE),f,c,v,u,d;for(t.type==="date"&&(n=ww.decodeDate(n)),f=0;f<s.length;f++)c=s[f],v=i[c.charAt(0)].drawn,v!==void 0&&(u=s[f].substr(1).match(no.paramRE),!(!u||u.length<v)&&(d=n(u[v]),d<o&&(o=d),d>l&&(l=d)));if(l>=o)return[o,l]}}var Eg=i_,K$={moduleType:"component",name:"shapes",layoutAttributes:_w,supplyLayoutDefaults:U$,supplyDrawNewShapeDefaults:X$,includeBasePlot:qh("shapes"),calcAutorange:Y$,draw:Eg.draw,drawOne:Eg.drawOne},$g=$r,Q$=Ht.templatedArray,Rg=Vh,kw=Q$("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw",description:["Determines whether or not this image is visible."].join(" ")},source:{valType:"string",editType:"arraydraw",description:["Specifies the URL of the image to be used.","The URL must be accessible from the domain where the","plot code is run, and can be either relative or absolute."].join(" ")},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw",description:["Specifies whether images are drawn below or above traces.","When `xref` and `yref` are both set to `paper`,","image is drawn below the entire plot area."].join(" ")},sizex:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size horizontally.","The image will be sized based on the `position` value.","When `xref` is set to `paper`, units are sized relative","to the plot width.","When `xref` ends with ` domain`, units are sized relative","to the axis width."].join(" ")},sizey:{valType:"number",dflt:0,editType:"arraydraw",description:["Sets the image container size vertically.","The image will be sized based on the `position` value.","When `yref` is set to `paper`, units are sized relative","to the plot height.","When `yref` ends with ` domain`, units are sized relative","to the axis height."].join(" ")},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw",description:["Specifies which dimension of the image to constrain."].join(" ")},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw",description:"Sets the opacity of the image."},x:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's x position.","When `xref` is set to `paper`, units are sized relative","to the plot height.","See `xref` for more info"].join(" ")},y:{valType:"any",dflt:0,editType:"arraydraw",description:["Sets the image's y position.","When `yref` is set to `paper`, units are sized relative","to the plot height.","See `yref` for more info"].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw",description:"Sets the anchor for the x position"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw",description:"Sets the anchor for the y position."},xref:{valType:"enumerated",values:["paper",$g.idRegex.x.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's x coordinate axis.",Rg.axisRefDescription("x","left","right")].join(" ")},yref:{valType:"enumerated",values:["paper",$g.idRegex.y.toString()],dflt:"paper",editType:"arraydraw",description:["Sets the images's y coordinate axis.",Rg.axisRefDescription("y","bottom","top")].join(" ")},editType:"arraydraw"}),J$=me.exports,Yu=jt.exports,eR=ri,tR=kw,rR="images",aR=function(e,r){var a={name:rR,handleItemDefaults:iR};eR(e,r,a)};function iR(t,e,r){function a(u,d){return J$.coerce(t,e,tR,u,d)}var i=a("source"),n=a("visible",!!i);if(!n)return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var o={_fullLayout:r},l=["x","y"],s=0;s<2;s++){var f=l[s],c=Yu.coerceRef(t,e,o,f,"paper",void 0);if(c!=="paper"){var v=Yu.getFromId(o,c);v._imgIndices.push(e._index)}Yu.coercePosition(e,o,a,c,f,0)}return e}var Pg=ct.exports,nR=Pt.exports,Cn=jt.exports,zg=ir,oR=dn,lR=function(e){var r=e._fullLayout,a=[],i={},n=[],o,l;for(l=0;l<r.images.length;l++){var s=r.images[l];if(s.visible)if(s.layer==="below"&&s.xref!=="paper"&&s.yref!=="paper"){o=zg.ref2id(s.xref)+zg.ref2id(s.yref);var f=r._plots[o];if(!f){n.push(s);continue}f.mainplot&&(o=f.mainplot.id),i[o]||(i[o]=[]),i[o].push(s)}else s.layer==="above"?a.push(s):n.push(s)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function v(b){var w=Pg.select(this);if(this._imgSrc!==b.source)if(w.attr("xmlns",oR.svg),b.source&&b.source.slice(0,5)==="data:")w.attr("xlink:href",b.source),this._imgSrc=b.source;else{var m=new Promise(function(y){var x=new Image;this.img=x,x.setAttribute("crossOrigin","anonymous"),x.onerror=T,x.onload=function(){var k=document.createElement("canvas");k.width=this.width,k.height=this.height;var S=k.getContext("2d");S.drawImage(this,0,0);var A=k.toDataURL("image/png");w.attr("xlink:href",A),y()},w.on("error",T),x.src=b.source,this._imgSrc=b.source;function T(){w.remove(),y()}}.bind(this));e._promises.push(m)}}function u(b){var w=Pg.select(this),m=Cn.getFromId(e,b.xref),y=Cn.getFromId(e,b.yref),x=Cn.getRefType(b.xref)==="domain",T=Cn.getRefType(b.yref)==="domain",k=r._size,S,A;m!==void 0?S=typeof b.xref=="string"&&x?m._length*b.sizex:Math.abs(m.l2p(b.sizex)-m.l2p(0)):S=b.sizex*k.w,y!==void 0?A=typeof b.yref=="string"&&T?y._length*b.sizey:Math.abs(y.l2p(b.sizey)-y.l2p(0)):A=b.sizey*k.h;var E=S*c.x[b.xanchor].offset,M=A*c.y[b.yanchor].offset,D=c.x[b.xanchor].sizing+c.y[b.yanchor].sizing,$,I;switch(m!==void 0?$=typeof b.xref=="string"&&x?m._length*b.x+m._offset:m.r2p(b.x)+m._offset:$=b.x*k.w+k.l,$+=E,y!==void 0?I=typeof b.yref=="string"&&T?y._length*(1-b.y)+y._offset:y.r2p(b.y)+y._offset:I=k.h-b.y*k.h+k.t,I+=M,b.sizing){case"fill":D+=" slice";break;case"stretch":D="none";break}w.attr({x:$,y:I,width:S,height:A,preserveAspectRatio:D,opacity:b.opacity});var P=m&&Cn.getRefType(b.xref)!=="domain"?m._id:"",R=y&&Cn.getRefType(b.yref)!=="domain"?y._id:"",L=P+R;nR.setClipUrl(w,L?"clip"+r._uid+L:null,e)}var d=r._imageLowerLayer.selectAll("image").data(n),h=r._imageUpperLayer.selectAll("image").data(a);d.enter().append("image"),h.enter().append("image"),d.exit().remove(),h.exit().remove(),d.each(function(b){v.bind(this)(b),u.bind(this)(b)}),h.each(function(b){v.bind(this)(b),u.bind(this)(b)});var p=Object.keys(r._plots);for(l=0;l<p.length;l++){o=p[l];var g=r._plots[o];if(!!g.imagelayer){var _=g.imagelayer.selectAll("image").data(i[o]||[]);_.enter().append("image"),_.exit().remove(),_.each(function(b){v.bind(this)(b),u.bind(this)(b)})}}},Ig=gt,sR=Id,fR=function(e,r,a,i){r=r||{};var n=a==="log"&&r.type==="linear",o=a==="linear"&&r.type==="log";if(!!(n||o)){for(var l=e._fullLayout.images,s=r._id.charAt(0),f,c,v=0;v<l.length;v++)if(f=l[v],c="images["+v+"].",f[s+"ref"]===r._id){var u=f[s],d=f["size"+s],h=null,p=null;if(n){h=sR(u,r.range);var g=d/Math.pow(10,h)/2;p=2*Math.log(g+Math.sqrt(1+g*g))/Math.LN10}else h=Math.pow(10,u),p=h*(Math.pow(10,d/2)-Math.pow(10,-d/2));Ig(h)?Ig(p)||(p=null):(h=null,p=null),i(c+s,h),i(c+"size"+s,p)}}},cR={moduleType:"component",name:"images",layoutAttributes:kw,supplyLayoutDefaults:aR,includeBasePlot:qh("images"),draw:lR,convertCoords:fR},Xh={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:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}},uR=Dr,vR=Er,dR=er.extendFlat,hR=Li.overrideAll,pR=jd,Aw=Ht.templatedArray,mR=Aw("button",{visible:{valType:"boolean",description:"Determines whether or not this button is visible."},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called on click.","If the `skip` method is used, the API updatemenu will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","updatemenu events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on click."].join(" ")},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets a 2nd set of `args`,","these arguments values are passed to the Plotly","method set in `method` when clicking this button while in the active state.","Use this to create toggle buttons."].join(" ")},label:{valType:"string",dflt:"",description:"Sets the text label to appear on the button."},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_buttonclicked` method and executing the API command manually without losing","the benefit of the updatemenu automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),Mw=hR(Aw("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean",description:["Determines whether or not the update menu is visible."].join(" ")},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown",description:["Determines whether the buttons are accessible via a dropdown menu","or whether the buttons are stacked horizontally or vertically"].join(" ")},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down",description:["Determines the direction in which the buttons are laid out, whether","in a dropdown menu or a row/column of buttons. For `left` and `up`,","the buttons will still appear in left-to-right or top-to-bottom order","respectively."].join(" ")},active:{valType:"integer",min:-1,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},showactive:{valType:"boolean",dflt:!0,description:"Highlights active dropdown item or active button if true."},buttons:mR,x:{valType:"number",min:-2,max:3,dflt:-.05,description:"Sets the x position (in normalized coordinates) of the update menu."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right",description:["Sets the update menu's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:1,description:"Sets the y position (in normalized coordinates) of the update menu."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the update menu's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},pad:dR(pR({editType:"arraydraw"}),{description:"Sets the padding around the buttons or dropdown menu."}),font:uR({description:"Sets the font of the update menu button text."}),bgcolor:{valType:"color",description:"Sets the background color of the update menu buttons."},bordercolor:{valType:"color",dflt:vR.borderLine,description:"Sets the color of the border enclosing the update menu."},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw",description:"Sets the width (in px) of the border enclosing the update menu."}}),"arraydraw","from-root"),Ks=me.exports,Sw=ri,Lw=Mw,yR=Xh,gR=yR.name,bR=Lw.buttons,xR=function(e,r){var a={name:gR,handleItemDefaults:_R};Sw(e,r,a)};function _R(t,e,r){function a(o,l){return Ks.coerce(t,e,Lw,o,l)}var i=Sw(t,e,{name:"buttons",handleItemDefaults:wR}),n=a("visible",i.length>0);!n||(a("active"),a("direction"),a("type"),a("showactive"),a("x"),a("y"),Ks.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),Ks.coerceFont(a,"font",r.font),a("bgcolor",r.paper_bgcolor),a("bordercolor"),a("borderwidth"))}function wR(t,e){function r(i,n){return Ks.coerce(t,e,bR,i,n)}var a=r("visible",t.method==="skip"||Array.isArray(t.args));a&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}var TR=Kt,_a=ct.exports,Ng=ft.exports,Kn=Pt.exports,Mf=me.exports;function Kt(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})}Kt.barWidth=2;Kt.barLength=20;Kt.barRadius=2;Kt.barPad=1;Kt.barColor="#808BA4";Kt.prototype.enable=function(e,r,a){var i=this.gd._fullLayout,n=i.width,o=i.height;this.position=e;var l=this.position.l,s=this.position.w,f=this.position.t,c=this.position.h,v=this.position.direction,u=v==="down",d=v==="left",h=v==="right",p=v==="up",g=s,_=c,b,w,m,y;!u&&!d&&!h&&!p&&(this.position.direction="down",u=!0);var x=u||p;x?(b=l,w=b+g,u?(m=f,y=Math.min(m+_,o),_=y-m):(y=f+_,m=Math.max(y-_,0),_=y-m)):(m=f,y=m+_,d?(w=l+g,b=Math.max(w-g,0),g=w-b):(b=l,w=Math.min(b+g,n),g=w-b)),this._box={l:b,t:m,w:g,h:_};var T=s>g,k=Kt.barLength+2*Kt.barPad,S=Kt.barWidth+2*Kt.barPad,A=l,E=f+c;E+S>o&&(E=o-S);var M=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);M.exit().on(".drag",null).remove(),M.enter().append("rect").classed("scrollbar-horizontal",!0).call(Ng.fill,Kt.barColor),T?(this.hbar=M.attr({rx:Kt.barRadius,ry:Kt.barRadius,x:A,y:E,width:k,height:S}),this._hbarXMin=A+k/2,this._hbarTranslateMax=g-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var D=c>_,$=Kt.barWidth+2*Kt.barPad,I=Kt.barLength+2*Kt.barPad,P=l+s,R=f;P+$>n&&(P=n-$);var L=this.container.selectAll("rect.scrollbar-vertical").data(D?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(Ng.fill,Kt.barColor),D?(this.vbar=L.attr({rx:Kt.barRadius,ry:Kt.barRadius,x:P,y:R,width:$,height:I}),this._vbarYMin=R+I/2,this._vbarTranslateMax=_-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var C=this.id,z=b-.5,F=D?w+$+.5:w+.5,H=m-.5,B=T?y+S+.5:y+.5,O=i._topdefs.selectAll("#"+C).data(T||D?[0]:[]);if(O.exit().remove(),O.enter().append("clipPath").attr("id",C).append("rect"),T||D?(this._clipRect=O.select("rect").attr({x:Math.floor(z),y:Math.floor(H),width:Math.ceil(F)-Math.floor(z),height:Math.ceil(B)-Math.floor(H)}),this.container.call(Kn.setClipUrl,C,this.gd),this.bg.attr({x:l,y:f,width:s,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Kn.setClipUrl,null),delete this._clipRect),T||D){var W=_a.behavior.drag().on("dragstart",function(){_a.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(W);var j=_a.behavior.drag().on("dragstart",function(){_a.event.sourceEvent.preventDefault(),_a.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(j),D&&this.vbar.on(".drag",null).call(j)}this.setTranslate(r,a)};Kt.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(Kn.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)};Kt.prototype._onBoxDrag=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e-=_a.event.dx),this.vbar&&(r-=_a.event.dy),this.setTranslate(e,r)};Kt.prototype._onBoxWheel=function(){var e=this.translateX,r=this.translateY;this.hbar&&(e+=_a.event.deltaY),this.vbar&&(r+=_a.event.deltaY),this.setTranslate(e,r)};Kt.prototype._onBarDrag=function(){var e=this.translateX,r=this.translateY;if(this.hbar){var a=e+this._hbarXMin,i=a+this._hbarTranslateMax,n=Mf.constrain(_a.event.x,a,i),o=(n-a)/(i-a),l=this.position.w-this._box.w;e=o*l}if(this.vbar){var s=r+this._vbarYMin,f=s+this._vbarTranslateMax,c=Mf.constrain(_a.event.y,s,f),v=(c-s)/(f-s),u=this.position.h-this._box.h;r=v*u}this.setTranslate(e,r)};Kt.prototype.setTranslate=function(e,r){var a=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=Mf.constrain(e||0,0,a),r=Mf.constrain(r||0,0,i),this.translateX=e,this.translateY=r,this.container.call(Kn.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=e/a;this.hbar.call(Kn.setTranslate,e+n*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(Kn.setTranslate,e,r+o*this._vbarTranslateMax)}};var oo=ct.exports,Tl=ar.exports,kl=ft.exports,lo=Pt.exports,Kr=me.exports,Sf=xr,kR=Ht.arrayEditor,Cw=Vr.LINE_SPACING,rt=Xh,AR=TR,MR=function(e){var r=e._fullLayout,a=Kr.filterVisible(r[rt.name]);function i(u){Tl.autoMargin(e,Pw(u))}var n=r._menulayer.selectAll("g."+rt.containerClassName).data(a.length>0?[0]:[]);if(n.enter().append("g").classed(rt.containerClassName,!0).style("cursor","pointer"),n.exit().each(function(){oo.select(this).selectAll("g."+rt.headerGroupClassName).each(i)}).remove(),a.length!==0){var o=n.selectAll("g."+rt.headerGroupClassName).data(a,SR);o.enter().append("g").classed(rt.headerGroupClassName,!0);for(var l=Kr.ensureSingle(n,"g",rt.dropdownButtonGroupClassName,function(u){u.style("pointer-events","all")}),s=0;s<a.length;s++){var f=a[s];RR(e,f)}var c="updatemenus"+r._uid,v=new AR(e,l,c);o.enter().size()&&(l.node().parentNode.appendChild(l.node()),l.call(hd)),o.exit().each(function(u){l.call(hd),i(u)}).remove(),o.each(function(u){var d=oo.select(this),h=u.type==="dropdown"?l:null;Tl.manageCommandObserver(e,u,u.buttons,function(p){dd(e,u,u.buttons[p.index],d,h,v,p.index,!0)}),u.type==="dropdown"?(Ew(e,d,l,v,u),Dw(l,u)&&Al(e,d,l,v,u)):Al(e,d,null,null,u)})}};function SR(t){return t._index}function LR(t){return+t.attr(rt.menuIndexAttrName)==-1}function Dw(t,e){return+t.attr(rt.menuIndexAttrName)===e._index}function dd(t,e,r,a,i,n,o,l){e.active=o,kR(t.layout,rt.name,e).applyUpdate("active",o),e.type==="buttons"?Al(t,a,null,null,e):e.type==="dropdown"&&(i.attr(rt.menuIndexAttrName,"-1"),Ew(t,a,i,n,e),l||Al(t,a,i,n,e))}function Ew(t,e,r,a,i){var n=Kr.ensureSingle(e,"g",rt.headerClassName,function(u){u.style("pointer-events","all")}),o=i._dims,l=i.active,s=i.buttons[l]||rt.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};n.call(Yh,i,s,t).call(zw,i,f,c);var v=Kr.ensureSingle(e,"text",rt.headerArrowClassName,function(u){u.attr("text-anchor","end").call(lo.font,i.font).text(rt.arrowSymbol[i.direction])});v.attr({x:o.headerWidth-rt.arrowOffsetX+i.pad.l,y:o.headerHeight/2+rt.textOffsetY+i.pad.t}),n.on("click",function(){r.call(hd,String(Dw(r,i)?-1:i._index)),Al(t,e,r,a,i)}),n.on("mouseover",function(){n.call($w)}),n.on("mouseout",function(){n.call(Rw,i)}),lo.setTranslate(e,o.lx,o.ly)}function Al(t,e,r,a,i){r||(r=e,r.attr("pointer-events","all"));var n=!LR(r)||i.type==="buttons"?i.buttons:[],o=i.type==="dropdown"?rt.dropdownButtonClassName:rt.buttonClassName,l=r.selectAll("g."+o).data(Kr.filterVisible(n)),s=l.enter().append("g").classed(o,!0),f=l.exit();i.type==="dropdown"?(s.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var c=0,v=0,u=i._dims,d=["up","down"].indexOf(i.direction)!==-1;i.type==="dropdown"&&(d?v=u.headerHeight+rt.gapButtonHeader:c=u.headerWidth+rt.gapButtonHeader),i.type==="dropdown"&&i.direction==="up"&&(v=-rt.gapButtonHeader+rt.gapButton-u.openHeight),i.type==="dropdown"&&i.direction==="left"&&(c=-rt.gapButtonHeader+rt.gapButton-u.openWidth);var h={x:u.lx+c+i.pad.l,y:u.ly+v+i.pad.t,yPad:rt.gapButton,xPad:rt.gapButton,index:0},p={l:h.x+i.borderwidth,t:h.y+i.borderwidth};l.each(function(g,_){var b=oo.select(this);b.call(Yh,i,g,t).call(zw,i,h),b.on("click",function(){oo.event.defaultPrevented||(g.execute&&(g.args2&&i.active===_?(dd(t,i,g,e,r,a,-1),Tl.executeAPICommand(t,g.method,g.args2)):(dd(t,i,g,e,r,a,_),Tl.executeAPICommand(t,g.method,g.args))),t.emit("plotly_buttonclicked",{menu:i,button:g,active:i.active}))}),b.on("mouseover",function(){b.call($w)}),b.on("mouseout",function(){b.call(Rw,i),l.call(Fg,i)})}),l.call(Fg,i),d?(p.w=Math.max(u.openWidth,u.headerWidth),p.h=h.y-p.t):(p.w=h.x-p.l,p.h=Math.max(u.openHeight,u.headerHeight)),p.direction=i.direction,a&&(l.size()?CR(t,e,r,a,i,p):DR(a))}function CR(t,e,r,a,i,n){var o=i.direction,l=o==="up"||o==="down",s=i._dims,f=i.active,c,v,u;if(l)for(v=0,u=0;u<f;u++)v+=s.heights[u]+rt.gapButton;else for(c=0,u=0;u<f;u++)c+=s.widths[u]+rt.gapButton;a.enable(n,c,v),a.hbar&&a.hbar.attr("opacity","0").transition().attr("opacity","1"),a.vbar&&a.vbar.attr("opacity","0").transition().attr("opacity","1")}function DR(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",function(){e=!1,r||t.disable()}),r&&t.vbar.transition().attr("opacity","0").each("end",function(){r=!1,e||t.disable()})}function Yh(t,e,r,a){t.call(ER,e).call($R,e,r,a)}function ER(t,e){var r=Kr.ensureSingle(t,"rect",rt.itemRectClassName,function(a){a.attr({rx:rt.rx,ry:rt.ry,"shape-rendering":"crispEdges"})});r.call(kl.stroke,e.bordercolor).call(kl.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function $R(t,e,r,a){var i=Kr.ensureSingle(t,"text",rt.itemTextClassName,function(l){l.attr({"text-anchor":"start","data-notex":1})}),n=r.label,o=a._fullLayout._meta;o&&(n=Kr.templateString(n,o)),i.call(lo.font,e.font).text(n).call(Sf.convertToTspans,a)}function Fg(t,e){var r=e.active;t.each(function(a,i){var n=oo.select(this);i===r&&e.showactive&&n.select("rect."+rt.itemRectClassName).call(kl.fill,rt.activeColor)})}function $w(t){t.select("rect."+rt.itemRectClassName).call(kl.fill,rt.hoverColor)}function Rw(t,e){t.select("rect."+rt.itemRectClassName).call(kl.fill,e.bgcolor)}function RR(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=lo.tester.selectAll("g."+rt.dropdownButtonClassName).data(Kr.filterVisible(e.buttons));a.enter().append("g").classed(rt.dropdownButtonClassName,!0);var i=["up","down"].indexOf(e.direction)!==-1;a.each(function(c,v){var u=oo.select(this);u.call(Yh,e,c,t);var d=u.select("."+rt.itemTextClassName),h=d.node()&&lo.bBox(d.node()).width,p=Math.max(h+rt.textPadX,rt.minWidth),g=e.font.size*Cw,_=Sf.lineCount(d),b=Math.max(g*_,rt.minHeight)+rt.textOffsetY;b=Math.ceil(b),p=Math.ceil(p),r.widths[v]=p,r.heights[v]=b,r.height1=Math.max(r.height1,b),r.width1=Math.max(r.width1,p),i?(r.totalWidth=Math.max(r.totalWidth,p),r.openWidth=r.totalWidth,r.totalHeight+=b+rt.gapButton,r.openHeight+=b+rt.gapButton):(r.totalWidth+=p+rt.gapButton,r.openWidth+=p+rt.gapButton,r.totalHeight=Math.max(r.totalHeight,b),r.openHeight=r.totalHeight)}),i?r.totalHeight-=rt.gapButton:r.totalWidth-=rt.gapButton,r.headerWidth=r.width1+rt.arrowPadX,r.headerHeight=r.height1,e.type==="dropdown"&&(i?(r.width1+=rt.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=rt.arrowPadX),a.remove();var n=r.totalWidth+e.pad.l+e.pad.r,o=r.totalHeight+e.pad.t+e.pad.b,l=t._fullLayout._size;r.lx=l.l+l.w*e.x,r.ly=l.t+l.h*(1-e.y);var s="left";Kr.isRightAnchor(e)&&(r.lx-=n,s="right"),Kr.isCenterAnchor(e)&&(r.lx-=n/2,s="center");var f="top";Kr.isBottomAnchor(e)&&(r.ly-=o,f="bottom"),Kr.isMiddleAnchor(e)&&(r.ly-=o/2,f="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),Tl.autoMargin(t,Pw(e),{x:e.x,y:e.y,l:n*({right:1,center:.5}[s]||0),r:n*({left:1,center:.5}[s]||0),b:o*({top:1,middle:.5}[f]||0),t:o*({bottom:1,middle:.5}[f]||0)})}function Pw(t){return rt.autoMarginIdRoot+t._index}function zw(t,e,r,a){a=a||{};var i=t.select("."+rt.itemRectClassName),n=t.select("."+rt.itemTextClassName),o=e.borderwidth,l=r.index,s=e._dims;lo.setTranslate(t,o+r.x,o+r.y);var f=["up","down"].indexOf(e.direction)!==-1,c=a.height||(f?s.heights[l]:s.height1);i.attr({x:0,y:0,width:a.width||(f?s.width1:s.widths[l]),height:c});var v=e.font.size*Cw,u=Sf.lineCount(n),d=(u-1)*v/2;Sf.positionText(n,rt.textOffsetX,c/2-d+rt.textOffsetY),f?r.y+=s.heights[l]+r.yPad:r.x+=s.widths[l]+r.xPad,r.index++}function hd(t,e){t.attr(rt.menuIndexAttrName,e||"-1").selectAll("g."+rt.dropdownButtonClassName).remove()}var PR=Xh,zR={moduleType:"component",name:PR.name,layoutAttributes:Mw,supplyLayoutDefaults:xR,draw:MR},mc={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},Hg=Dr,IR=jd,NR=er.extendDeepAll,FR=Li.overrideAll,HR=qf,Iw=Ht.templatedArray,Oi=mc,OR=Iw("step",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not this step is included in the slider."].join(" ")},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle",description:["Sets the Plotly method to be called when the slider value is changed.","If the `skip` method is used, the API slider will function as normal","but will perform no API calls and will not bind automatically to state","updates. This may be used to create a component interface and attach to","slider events manually via JavaScript."].join(" ")},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}],description:["Sets the arguments values to be passed to the Plotly","method set in `method` on slide."].join(" ")},label:{valType:"string",description:"Sets the text label to appear on the slider"},value:{valType:"string",description:["Sets the value of the slider step, used to refer to the step programatically.","Defaults to the slider label if not provided."].join(" ")},execute:{valType:"boolean",dflt:!0,description:["When true, the API method is executed. When false, all other behaviors are the same","and command execution is skipped. This may be useful when hooking into, for example,","the `plotly_sliderchange` method and executing the API command manually without losing","the benefit of the slider automatically binding to the state of the plot through the","specification of `method` and `args`."].join(" ")}}),Nw=FR(Iw("slider",{visible:{valType:"boolean",dflt:!0,description:["Determines whether or not the slider is visible."].join(" ")},active:{valType:"number",min:0,dflt:0,description:["Determines which button (by index starting from 0) is","considered active."].join(" ")},steps:OR,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction",description:["Determines whether this slider length","is set in units of plot *fraction* or in *pixels.","Use `len` to set the value."].join(" ")},len:{valType:"number",min:0,dflt:1,description:["Sets the length of the slider","This measure excludes the padding of both ends.","That is, the slider's length is this length minus the","padding on both ends."].join(" ")},x:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the x position (in normalized coordinates) of the slider."},pad:NR(IR({editType:"arraydraw"}),{description:"Set the padding of the slider component along each side."},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",description:["Sets the slider's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,dflt:0,description:"Sets the y position (in normalized coordinates) of the slider."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top",description:["Sets the slider's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},transition:{duration:{valType:"number",min:0,dflt:150,description:"Sets the duration of the slider transition"},easing:{valType:"enumerated",values:HR.transition.easing.values,dflt:"cubic-in-out",description:"Sets the easing function of the slider transition"}},currentvalue:{visible:{valType:"boolean",dflt:!0,description:["Shows the currently-selected value above the slider."].join(" ")},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",description:["The alignment of the value readout relative to the length of the slider."].join(" ")},offset:{valType:"number",dflt:10,description:["The amount of space, in pixels, between the current value label","and the slider."].join(" ")},prefix:{valType:"string",description:"When currentvalue.visible is true, this sets the prefix of the label."},suffix:{valType:"string",description:"When currentvalue.visible is true, this sets the suffix of the label."},font:Hg({description:"Sets the font of the current value label text."})},font:Hg({description:"Sets the font of the slider step labels."}),activebgcolor:{valType:"color",dflt:Oi.gripBgActiveColor,description:["Sets the background color of the slider grip","while dragging."].join(" ")},bgcolor:{valType:"color",dflt:Oi.railBgColor,description:"Sets the background color of the slider."},bordercolor:{valType:"color",dflt:Oi.railBorderColor,description:"Sets the color of the border enclosing the slider."},borderwidth:{valType:"number",min:0,dflt:Oi.railBorderWidth,description:"Sets the width (in px) of the border enclosing the slider."},ticklen:{valType:"number",min:0,dflt:Oi.tickLength,description:"Sets the length in pixels of step tick marks"},tickcolor:{valType:"color",dflt:Oi.tickColor,description:"Sets the color of the border enclosing the slider."},tickwidth:{valType:"number",min:0,dflt:1,description:"Sets the tick width (in px)."},minorticklen:{valType:"number",min:0,dflt:Oi.minorTickLength,description:"Sets the length in pixels of minor step tick marks"}}),"arraydraw","from-root"),jn=me.exports,Fw=ri,Hw=Nw,BR=mc,jR=BR.name,GR=Hw.steps,UR=function(e,r){Fw(e,r,{name:jR,handleItemDefaults:VR})};function VR(t,e,r){function a(v,u){return jn.coerce(t,e,Hw,v,u)}for(var i=Fw(t,e,{name:"steps",handleItemDefaults:qR}),n=0,o=0;o<i.length;o++)i[o].visible&&n++;var l;if(n<2?l=e.visible=!1:l=a("visible"),!!l){e._stepCount=n;var s=e._visibleSteps=jn.filterVisible(i),f=a("active");(i[f]||{}).visible||(e.active=s[0]._index),a("x"),a("y"),jn.noneOrAll(t,e,["x","y"]),a("xanchor"),a("yanchor"),a("len"),a("lenmode"),a("pad.t"),a("pad.r"),a("pad.b"),a("pad.l"),jn.coerceFont(a,"font",r.font);var c=a("currentvalue.visible");c&&(a("currentvalue.xanchor"),a("currentvalue.prefix"),a("currentvalue.suffix"),a("currentvalue.offset"),jn.coerceFont(a,"currentvalue.font",e.font)),a("transition.duration"),a("transition.easing"),a("bgcolor"),a("activebgcolor"),a("bordercolor"),a("borderwidth"),a("ticklen"),a("tickwidth"),a("tickcolor"),a("minorticklen")}}function qR(t,e){function r(n,o){return jn.coerce(t,e,GR,n,o)}var a;if(t.method!=="skip"&&!Array.isArray(t.args)?a=e.visible=!1:a=r("visible"),a){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}var wa=ct.exports,Lf=ar.exports,Ti=ft.exports,Aa=Pt.exports,Qr=me.exports,XR=Qr.strTranslate,ll=xr,YR=Ht.arrayEditor,dt=mc,Wh=Vr,Ow=Wh.LINE_SPACING,Wu=Wh.FROM_TL,Zu=Wh.FROM_BR,WR=function(e){var r=e._fullLayout,a=ZR(r,e),i=r._infolayer.selectAll("g."+dt.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(dt.containerClassName,!0).style("cursor","ew-resize");function n(f){f._commandObserver&&(f._commandObserver.remove(),delete f._commandObserver),Lf.autoMargin(e,Bw(f))}if(i.exit().each(function(){wa.select(this).selectAll("g."+dt.groupClassName).each(n)}).remove(),a.length!==0){var o=i.selectAll("g."+dt.groupClassName).data(a,KR);o.enter().append("g").classed(dt.groupClassName,!0),o.exit().each(n).remove();for(var l=0;l<a.length;l++){var s=a[l];QR(e,s)}o.each(function(f){var c=wa.select(this);aP(f),Lf.manageCommandObserver(e,f,f._visibleSteps,function(v){var u=c.data()[0];u.active!==v.index&&(u._dragging||Gw(e,c,u,v.index,!1,!0))}),JR(e,wa.select(this),f)})}};function Bw(t){return dt.autoMarginIdRoot+t._index}function ZR(t,e){for(var r=t[dt.name],a=[],i=0;i<r.length;i++){var n=r[i];!n.visible||(n._gd=e,a.push(n))}return a}function KR(t){return t._index}function QR(t,e){var r=Aa.tester.selectAll("g."+dt.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(dt.labelGroupClass,!0);var a=0,i=0;r.each(function(h){var p=wa.select(this),g=jw(p,{step:h},e),_=g.node();if(_){var b=Aa.bBox(_);i=Math.max(i,b.height),a=Math.max(a,b.width)}}),r.remove();var n=e._dims={};n.inputAreaWidth=Math.max(dt.railWidth,dt.gripHeight);var o=t._fullLayout._size;n.lx=o.l+o.w*e.x,n.ly=o.t+o.h*(1-e.y),e.lenmode==="fraction"?n.outerLength=Math.round(o.w*e.len):n.outerLength=e.len,n.inputAreaStart=0,n.inputAreaLength=Math.round(n.outerLength-e.pad.l-e.pad.r);var l=n.inputAreaLength-2*dt.stepInset,s=l/(e._stepCount-1),f=a+dt.labelPadding;if(n.labelStride=Math.max(1,Math.ceil(f/s)),n.labelHeight=i,n.currentValueMaxWidth=0,n.currentValueHeight=0,n.currentValueTotalHeight=0,n.currentValueMaxLines=1,e.currentvalue.visible){var c=Aa.tester.append("g");r.each(function(h){var p=Cf(c,e,h.label),g=p.node()&&Aa.bBox(p.node())||{width:0,height:0},_=ll.lineCount(p);n.currentValueMaxWidth=Math.max(n.currentValueMaxWidth,Math.ceil(g.width)),n.currentValueHeight=Math.max(n.currentValueHeight,Math.ceil(g.height)),n.currentValueMaxLines=Math.max(n.currentValueMaxLines,_)}),n.currentValueTotalHeight=n.currentValueHeight+e.currentvalue.offset,c.remove()}n.height=n.currentValueTotalHeight+dt.tickOffset+e.ticklen+dt.labelOffset+n.labelHeight+e.pad.t+e.pad.b;var v="left";Qr.isRightAnchor(e)&&(n.lx-=n.outerLength,v="right"),Qr.isCenterAnchor(e)&&(n.lx-=n.outerLength/2,v="center");var u="top";Qr.isBottomAnchor(e)&&(n.ly-=n.height,u="bottom"),Qr.isMiddleAnchor(e)&&(n.ly-=n.height/2,u="middle"),n.outerLength=Math.ceil(n.outerLength),n.height=Math.ceil(n.height),n.lx=Math.round(n.lx),n.ly=Math.round(n.ly);var d={y:e.y,b:n.height*Zu[u],t:n.height*Wu[u]};e.lenmode==="fraction"?(d.l=0,d.xl=e.x-e.len*Wu[v],d.r=0,d.xr=e.x+e.len*Zu[v]):(d.x=e.x,d.l=n.outerLength*Wu[v],d.r=n.outerLength*Zu[v]),Lf.autoMargin(t,Bw(e),d)}function JR(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(Cf,r).call(nP,r).call(tP,r).call(rP,r).call(iP,t,r).call(eP,t,r);var a=r._dims;Aa.setTranslate(e,a.lx+r.pad.l,a.ly+r.pad.t),e.call(Vw,r,!1),e.call(Cf,r)}function Cf(t,e,r){if(!!e.currentvalue.visible){var a=e._dims,i,n;switch(e.currentvalue.xanchor){case"right":i=a.inputAreaLength-dt.currentValueInset-a.currentValueMaxWidth,n="left";break;case"center":i=a.inputAreaLength*.5,n="middle";break;default:i=dt.currentValueInset,n="left"}var o=Qr.ensureSingle(t,"text",dt.labelClass,function(u){u.attr({"text-anchor":n,"data-notex":1})}),l=e.currentvalue.prefix?e.currentvalue.prefix:"";if(typeof r=="string")l+=r;else{var s=e.steps[e.active].label,f=e._gd._fullLayout._meta;f&&(s=Qr.templateString(s,f)),l+=s}e.currentvalue.suffix&&(l+=e.currentvalue.suffix),o.call(Aa.font,e.currentvalue.font).text(l).call(ll.convertToTspans,e._gd);var c=ll.lineCount(o),v=(a.currentValueMaxLines+1-c)*e.currentvalue.font.size*Ow;return ll.positionText(o,i,v),o}}function eP(t,e,r){var a=Qr.ensureSingle(t,"rect",dt.gripRectClass,function(i){i.call(Uw,e,t,r).style("pointer-events","all")});a.attr({width:dt.gripWidth,height:dt.gripHeight,rx:dt.gripRadius,ry:dt.gripRadius}).call(Ti.stroke,r.bordercolor).call(Ti.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function jw(t,e,r){var a=Qr.ensureSingle(t,"text",dt.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),i=e.step.label,n=r._gd._fullLayout._meta;return n&&(i=Qr.templateString(i,n)),a.call(Aa.font,r.font).text(i).call(ll.convertToTspans,r._gd),a}function tP(t,e){var r=Qr.ensureSingle(t,"g",dt.labelsClass),a=e._dims,i=r.selectAll("g."+dt.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(dt.labelGroupClass,!0),i.exit().remove(),i.each(function(n){var o=wa.select(this);o.call(jw,n,e),Aa.setTranslate(o,Zh(e,n.fraction),dt.tickOffset+e.ticklen+e.font.size*Ow+dt.labelOffset+a.currentValueTotalHeight)})}function Og(t,e,r,a,i){var n=Math.round(a*(r._stepCount-1)),o=r._visibleSteps[n]._index;o!==r.active&&Gw(t,e,r,o,!0,i)}function Gw(t,e,r,a,i,n){var o=r.active;r.active=a,YR(t.layout,dt.name,r).applyUpdate("active",a);var l=r.steps[r.active];e.call(Vw,r,n),e.call(Cf,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:o}),l&&l.method&&i&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=i,e._nextMethod.doTransition=n):(e._nextMethod={step:l,doCallback:i,doTransition:n},e._nextMethodRaf=window.requestAnimationFrame(function(){var s=e._nextMethod.step;!s.method||(s.execute&&Lf.executeAPICommand(t,s.method,s.args),e._nextMethod=null,e._nextMethodRaf=null)})))}function Uw(t,e,r){var a=r.node(),i=wa.select(e);function n(){return r.data()[0]}function o(){var l=n();e.emit("plotly_sliderstart",{slider:l});var s=r.select("."+dt.gripRectClass);wa.event.stopPropagation(),wa.event.preventDefault(),s.call(Ti.fill,l.activebgcolor);var f=Bg(l,wa.mouse(a)[0]);Og(e,r,l,f,!0),l._dragging=!0;function c(){var u=n(),d=Bg(u,wa.mouse(a)[0]);Og(e,r,u,d,!1)}i.on("mousemove",c),i.on("touchmove",c);function v(){var u=n();u._dragging=!1,s.call(Ti.fill,u.bgcolor),i.on("mouseup",null),i.on("mousemove",null),i.on("touchend",null),i.on("touchmove",null),e.emit("plotly_sliderend",{slider:u,step:u.steps[u.active]})}i.on("mouseup",v),i.on("touchend",v)}t.on("mousedown",o),t.on("touchstart",o)}function rP(t,e){var r=t.selectAll("rect."+dt.tickRectClass).data(e._visibleSteps),a=e._dims;r.enter().append("rect").classed(dt.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(i,n){var o=n%a.labelStride===0,l=wa.select(this);l.attr({height:o?e.ticklen:e.minorticklen}).call(Ti.fill,e.tickcolor),Aa.setTranslate(l,Zh(e,n/(e._stepCount-1))-.5*e.tickwidth,(o?dt.tickOffset:dt.minorTickOffset)+a.currentValueTotalHeight)})}function aP(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,a=0;a<r;a+=e.labelStride)e.labelSteps.push({fraction:a/(r-1),step:t._visibleSteps[a]})}function Vw(t,e,r){for(var a=t.select("rect."+dt.gripRectClass),i=0,n=0;n<e._stepCount;n++)if(e._visibleSteps[n]._index===e.active){i=n;break}var o=Zh(e,i/(e._stepCount-1));if(!e._invokingCommand){var l=a;r&&e.transition.duration>0&&(l=l.transition().duration(e.transition.duration).ease(e.transition.easing)),l.attr("transform",XR(o-dt.gripWidth*.5,e._dims.currentValueTotalHeight))}}function Zh(t,e){var r=t._dims;return r.inputAreaStart+dt.stepInset+(r.inputAreaLength-2*dt.stepInset)*Math.min(1,Math.max(0,e))}function Bg(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-dt.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*dt.stepInset-2*r.inputAreaStart)))}function iP(t,e,r){var a=r._dims,i=Qr.ensureSingle(t,"rect",dt.railTouchRectClass,function(n){n.call(Uw,e,t,r).style("pointer-events","all")});i.attr({width:a.inputAreaLength,height:Math.max(a.inputAreaWidth,dt.tickOffset+r.ticklen+a.labelHeight)}).call(Ti.fill,r.bgcolor).attr("opacity",0),Aa.setTranslate(i,0,a.currentValueTotalHeight)}function nP(t,e){var r=e._dims,a=r.inputAreaLength-dt.railInset*2,i=Qr.ensureSingle(t,"rect",dt.railRectClass);i.attr({width:a,height:dt.railWidth,rx:dt.railRadius,ry:dt.railRadius,"shape-rendering":"crispEdges"}).call(Ti.stroke,e.bordercolor).call(Ti.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),Aa.setTranslate(i,dt.railInset,(r.inputAreaWidth-dt.railWidth)*.5+r.currentValueTotalHeight)}var oP=mc,lP={moduleType:"component",name:oP.name,layoutAttributes:Nw,supplyLayoutDefaults:UR,draw:WR},jg=Er,Kh={bgcolor:{valType:"color",dflt:jg.background,editType:"plot",description:"Sets the background color of the range slider."},bordercolor:{valType:"color",dflt:jg.defaultLine,editType:"plot",description:"Sets the border color of the range slider."},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot",description:"Sets the border width of the range slider."},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0},description:["Determines whether or not the range slider range is","computed in relation to the input data.","If `range` is provided, then `autorange` is set to *false*."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1},description:["Sets the range of the range slider.","If not set, defaults to the full xaxis range.","If the axis `type` is *log*, then you must take the","log of your desired range.","If the axis `type` is *date*, it should be date strings,","like date data, though Date objects and unix milliseconds","will be accepted and converted to strings.","If the axis `type` is *category*, it should be numbers,","using the scale where each category is assigned a serial","number from zero in the order it appears."].join(" ")},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot",description:["The height of the range slider as a fraction of the","total plot area height."].join(" ")},visible:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the range slider will be visible.","If visible, perpendicular axes will be set to `fixedrange`"].join(" ")},editType:"calc"},qw={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc",description:["Determines whether or not the range of this axis in","the rangeslider use the same value than in the main plot","when zooming in/out.","If *auto*, the autorange will be used.","If *fixed*, the `range` is used.","If *match*, the current range of the corresponding y-axis on the main subplot is used."].join(" ")},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot",description:["Sets the range of this axis for the rangeslider."].join(" ")},editType:"calc"},yc={},Qh={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},sP=ir,fP=xr,Xw=Qh,cP=Vr.LINE_SPACING,Df=Xw.name;function Yw(t){var e=t&&t[Df];return e&&e.visible}yc.isVisible=Yw;yc.makeData=function(t){var e=sP.list({_fullLayout:t},"x",!0),r=t.margin,a=[];if(!t._has("gl2d"))for(var i=0;i<e.length;i++){var n=e[i];if(Yw(n)){a.push(n);var o=n[Df];o._id=Df+n._id,o._height=(t.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}t._rangeSliderData=a};yc.autoMarginOpts=function(t,e){var r=t._fullLayout,a=e[Df],i=e._id.charAt(0),n=0,o=0;if(e.side==="bottom"&&(n=e._depth,e.title.text!==r._dfltTitle[i])){o=1.5*e.title.font.size+10+a._offsetShift;var l=(e.title.text.match(fP.BR_TAG_ALL)||[]).length;o+=l*e.title.font.size*cP}return{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:a._height+n+Math.max(r.margin.b,o),pad:Xw.extraPad+a._offsetShift*2}};var Ku,Gg;function uP(){if(Gg)return Ku;Gg=1;var t=me.exports,e=Ht,r=ir,a=Kh,i=qw;return Ku=function(o,l,s){var f=o[s],c=l[s];if(!(f.rangeslider||l._requestRangeslider[c._id]))return;t.isPlainObject(f.rangeslider)||(f.rangeslider={});var v=f.rangeslider,u=e.newContainer(c,"rangeslider");function d(A,E){return t.coerce(v,u,a,A,E)}var h,p;function g(A,E){return t.coerce(h,p,i,A,E)}var _=d("visible");if(!!_){d("bgcolor",l.plot_bgcolor),d("bordercolor"),d("borderwidth"),d("thickness"),d("autorange",!c.isValidRange(v.range)),d("range");var b=l._subplots;if(b)for(var w=b.cartesian.filter(function(A){return A.substr(0,A.indexOf("y"))===r.name2id(s)}).map(function(A){return A.substr(A.indexOf("y"),A.length)}),m=t.simpleMap(w,r.id2name),y=0;y<m.length;y++){var x=m[y];h=v[x]||{},p=e.newContainer(u,x,"yaxis");var T=l[x],k;h.range&&T.isValidRange(h.range)&&(k="fixed");var S=g("rangemode",k);S!=="match"&&g("range",T.range.slice())}u._input=v}},Ku}var Qu,Ug;function vP(){if(Ug)return Qu;Ug=1;var t=ir.list,e=Fl.getAutoRange,r=Qh;return Qu=function(i){for(var n=t(i,"x",!0),o=0;o<n.length;o++){var l=n[o],s=l[r.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=e(i,l))}},Qu}var Ju,Vg;function dP(){if(Vg)return Ju;Vg=1;var t=ct.exports,e=We,r=ar.exports,a=me.exports,i=a.strTranslate,n=Pt.exports,o=ft.exports,l=ec,s=sr,f=ir,c=Ca.exports,v=Di,u=Qh;Ju=function(T){for(var k=T._fullLayout,S=k._rangeSliderData,A=0;A<S.length;A++){var E=S[A][u.name];E._clipId=E._id+"-"+k._uid}function M($){return $._name}var D=k._infolayer.selectAll("g."+u.containerClassName).data(S,M);D.exit().each(function($){var I=$[u.name];k._topdefs.select("#"+I._clipId).remove()}).remove(),S.length!==0&&(D.enter().append("g").classed(u.containerClassName,!0).attr("pointer-events","all"),D.each(function($){var I=t.select(this),P=$[u.name],R=k[f.id2name($.anchor)],L=P[f.id2name($.anchor)];if(P.range){var C=a.simpleMap(P.range,$.r2l),z=a.simpleMap($.range,$.r2l),F;z[0]<z[1]?F=[Math.min(C[0],z[0]),Math.max(C[1],z[1])]:F=[Math.max(C[0],z[0]),Math.min(C[1],z[1])],P.range=P._input.range=a.simpleMap(F,$.l2r)}$.cleanRange("rangeslider.range");var H=k._size,B=$.domain;P._width=H.w*(B[1]-B[0]);var O=Math.round(H.l+H.w*B[0]),W=Math.round(H.t+H.h*(1-$._counterDomainMin)+($.side==="bottom"?$._depth:0)+P._offsetShift+u.extraPad);I.attr("transform",i(O,W)),P._rl=a.simpleMap(P.range,$.r2l);var j=P._rl[0],Z=P._rl[1],K=Z-j;if(P.p2d=function(de){return de/P._width*K+j},P.d2p=function(de){return(de-j)/K*P._width},$.rangebreaks){var Q=$.locateBreaks(j,Z);if(Q.length){var ee,ne,le=0;for(ee=0;ee<Q.length;ee++)ne=Q[ee],le+=ne.max-ne.min;var se=P._width/(Z-j-le),oe=[-se*j];for(ee=0;ee<Q.length;ee++)ne=Q[ee],oe.push(oe[oe.length-1]-se*(ne.max-ne.min));for(P.d2p=function(de){for(var ke=oe[0],ue=0;ue<Q.length;ue++){var Y=Q[ue];if(de>=Y.max)ke=oe[ue+1];else if(de<Y.min)break}return ke+se*de},ee=0;ee<Q.length;ee++)ne=Q[ee],ne.pmin=P.d2p(ne.min),ne.pmax=P.d2p(ne.max);P.p2d=function(de){for(var ke=oe[0],ue=0;ue<Q.length;ue++){var Y=Q[ue];if(de>=Y.pmax)ke=oe[ue+1];else if(de<Y.pmin)break}return(de-ke)/se}}}if(L.rangemode!=="match"){var V=R.r2l(L.range[0]),ie=R.r2l(L.range[1]),ge=ie-V;P.d2pOppAxis=function(de){return(de-V)/ge*P._height}}I.call(g,T,$,P).call(_,T,$,P).call(b,T,$,P).call(m,T,$,P,L).call(y,T,$,P).call(x,T,$,P),d(I,T,$,P),p(I,T,$,P,R,L),$.side==="bottom"&&l.draw(T,$._id+"title",{propContainer:$,propName:$._name+".title",placeholder:k._dfltTitle.x,attributes:{x:$._offset+$._length/2,y:W+P._height+P._offsetShift+10+1.5*$.title.font.size,"text-anchor":"middle"}})}))};function d(T,k,S,A){if(k._context.staticPlot)return;var E=T.select("rect."+u.slideBoxClassName).node(),M=T.select("rect."+u.grabAreaMinClassName).node(),D=T.select("rect."+u.grabAreaMaxClassName).node();function $(){var I=t.event,P=I.target,R=I.clientX||I.touches[0].clientX,L=R-T.node().getBoundingClientRect().left,C=A.d2p(S._rl[0]),z=A.d2p(S._rl[1]),F=c.coverSlip();this.addEventListener("touchmove",H),this.addEventListener("touchend",B),F.addEventListener("mousemove",H),F.addEventListener("mouseup",B);function H(O){var W=O.clientX||O.touches[0].clientX,j=+W-R,Z,K,Q;switch(P){case E:Q="ew-resize",Z=C+j,K=z+j;break;case M:Q="col-resize",Z=C+j,K=z;break;case D:Q="col-resize",Z=C,K=z+j;break;default:Q="ew-resize",Z=L,K=L+j;break}if(K<Z){var ee=K;K=Z,Z=ee}A._pixelMin=Z,A._pixelMax=K,v(t.select(F),Q),h(T,k,S,A)}function B(){F.removeEventListener("mousemove",H),F.removeEventListener("mouseup",B),this.removeEventListener("touchmove",H),this.removeEventListener("touchend",B),a.removeElement(F)}}T.on("mousedown",$),T.on("touchstart",$)}function h(T,k,S,A){function E($){return S.l2r(a.constrain($,A._rl[0],A._rl[1]))}var M=E(A.p2d(A._pixelMin)),D=E(A.p2d(A._pixelMax));window.requestAnimationFrame(function(){e.call("_guiRelayout",k,S._name+".range",[M,D])})}function p(T,k,S,A,E,M){var D=u.handleWidth/2;function $(O){return a.constrain(O,0,A._width)}function I(O){return a.constrain(O,0,A._height)}function P(O){return a.constrain(O,-D,A._width+D)}var R=$(A.d2p(S._rl[0])),L=$(A.d2p(S._rl[1]));if(T.select("rect."+u.slideBoxClassName).attr("x",R).attr("width",L-R),T.select("rect."+u.maskMinClassName).attr("width",R),T.select("rect."+u.maskMaxClassName).attr("x",L).attr("width",A._width-L),M.rangemode!=="match"){var C=A._height-I(A.d2pOppAxis(E._rl[1])),z=A._height-I(A.d2pOppAxis(E._rl[0]));T.select("rect."+u.maskMinOppAxisClassName).attr("x",R).attr("height",C).attr("width",L-R),T.select("rect."+u.maskMaxOppAxisClassName).attr("x",R).attr("y",z).attr("height",A._height-z).attr("width",L-R),T.select("rect."+u.slideBoxClassName).attr("y",C).attr("height",z-C)}var F=.5,H=Math.round(P(R-D))-F,B=Math.round(P(L-D))+F;T.select("g."+u.grabberMinClassName).attr("transform",i(H,F)),T.select("g."+u.grabberMaxClassName).attr("transform",i(B,F))}function g(T,k,S,A){var E=a.ensureSingle(T,"rect",u.bgClassName,function(I){I.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),M=A.borderwidth%2===0?A.borderwidth:A.borderwidth-1,D=-A._offsetShift,$=n.crispRound(k,A.borderwidth);E.attr({width:A._width+M,height:A._height+M,transform:i(D,D),fill:A.bgcolor,stroke:A.bordercolor,"stroke-width":$})}function _(T,k,S,A){var E=k._fullLayout,M=a.ensureSingleById(E._topdefs,"clipPath",A._clipId,function(D){D.append("rect").attr({x:0,y:0})});M.select("rect").attr({width:A._width,height:A._height})}function b(T,k,S,A){var E=k.calcdata,M=T.selectAll("g."+u.rangePlotClassName).data(S._subplotsWith,a.identity);M.enter().append("g").attr("class",function($){return u.rangePlotClassName+" "+$}).call(n.setClipUrl,A._clipId,k),M.order(),M.exit().remove();var D;M.each(function($,I){var P=t.select(this),R=I===0,L=f.getFromId(k,$,"y"),C=L._name,z=A[C],F={data:[],layout:{xaxis:{type:S.type,domain:[0,1],range:A.range.slice(),calendar:S.calendar},width:A._width,height:A._height,margin:{t:0,b:0,l:0,r:0}},_context:k._context};S.rangebreaks&&(F.layout.xaxis.rangebreaks=S.rangebreaks),F.layout[C]={type:L.type,domain:[0,1],range:z.rangemode!=="match"?z.range.slice():L.range.slice(),calendar:L.calendar},L.rangebreaks&&(F.layout[C].rangebreaks=L.rangebreaks),r.supplyDefaults(F);var H=F._fullLayout.xaxis,B=F._fullLayout[C];H.clearCalc(),H.setScale(),B.clearCalc(),B.setScale();var O={id:$,plotgroup:P,xaxis:H,yaxis:B,isRangePlot:!0};R?D=O:(O.mainplot="xy",O.mainplotinfo=D),s.rangePlot(k,O,w(E,$))})}function w(T,k){for(var S=[],A=0;A<T.length;A++){var E=T[A],M=E[0].trace;M.xaxis+M.yaxis===k&&S.push(E)}return S}function m(T,k,S,A,E){var M=a.ensureSingle(T,"rect",u.maskMinClassName,function(P){P.attr({x:0,y:0,"shape-rendering":"crispEdges"})});M.attr("height",A._height).call(o.fill,u.maskColor);var D=a.ensureSingle(T,"rect",u.maskMaxClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});if(D.attr("height",A._height).call(o.fill,u.maskColor),E.rangemode!=="match"){var $=a.ensureSingle(T,"rect",u.maskMinOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});$.attr("width",A._width).call(o.fill,u.maskOppAxisColor);var I=a.ensureSingle(T,"rect",u.maskMaxOppAxisClassName,function(P){P.attr({y:0,"shape-rendering":"crispEdges"})});I.attr("width",A._width).style("border-top",u.maskOppBorder).call(o.fill,u.maskOppAxisColor)}}function y(T,k,S,A){if(!k._context.staticPlot){var E=a.ensureSingle(T,"rect",u.slideBoxClassName,function(M){M.attr({y:0,cursor:u.slideBoxCursor,"shape-rendering":"crispEdges"})});E.attr({height:A._height,fill:u.slideBoxFill})}}function x(T,k,S,A){var E=a.ensureSingle(T,"g",u.grabberMinClassName),M=a.ensureSingle(T,"g",u.grabberMaxClassName),D={x:0,width:u.handleWidth,rx:u.handleRadius,fill:o.background,stroke:o.defaultLine,"stroke-width":u.handleStrokeWidth,"shape-rendering":"crispEdges"},$={y:Math.round(A._height/4),height:Math.round(A._height/2)},I=a.ensureSingle(E,"rect",u.handleMinClassName,function(z){z.attr(D)});I.attr($);var P=a.ensureSingle(M,"rect",u.handleMaxClassName,function(z){z.attr(D)});P.attr($);var R={width:u.grabAreaWidth,x:0,y:0,fill:u.grabAreaFill,cursor:k._context.staticPlot?void 0:u.grabAreaCursor},L=a.ensureSingle(E,"rect",u.grabAreaMinClassName,function(z){z.attr(R)});L.attr("height",A._height);var C=a.ensureSingle(M,"rect",u.grabAreaMaxClassName,function(z){z.attr(R)});C.attr("height",A._height)}return Ju}var hP=me.exports,pP=Kh,mP=qw,ev=yc,yP={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:hP.extendFlat({},pP,{yaxis:mP})}}},layoutAttributes:Kh,handleDefaults:uP(),calcAutorange:vP(),draw:dP(),isVisible:ev.isVisible,makeData:ev.makeData,autoMarginOpts:ev.autoMarginOpts},gP=Dr,qg=Er,bP=Ht.templatedArray,xP=bP("button",{visible:{valType:"boolean",dflt:!0,editType:"plot",description:"Determines whether or not this button is visible."},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot",description:["The unit of measurement that the `count` value will set the range by."].join(" ")},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot",description:["Sets the range update mode.","If *backward*, the range update shifts the start of range","back *count* times *step* milliseconds.","If *todate*, the range update shifts the start of range","back to the first timestamp from *count* times","*step* milliseconds back.","For example, with `step` set to *year* and `count` set to *1*","the range update shifts the start of the range back to","January 01 of the current year.","Month and year *todate* are currently available only","for the built-in (Gregorian) calendar."].join(" ")},count:{valType:"number",min:0,dflt:1,editType:"plot",description:["Sets the number of steps to take to update the range.","Use with `step` to specify the update interval."].join(" ")},label:{valType:"string",editType:"plot",description:"Sets the text label to appear on the button."},editType:"plot",description:["Sets the specifications for each buttons.","By default, a range selector comes with no buttons."].join(" ")}),pd={visible:{valType:"boolean",editType:"plot",description:["Determines whether or not this range selector is visible.","Note that range selectors are only available for x axes of","`type` set to or auto-typed to *date*."].join(" ")},buttons:xP,x:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the x position (in normalized coordinates) of the range selector."},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot",description:["Sets the range selector's horizontal position anchor.","This anchor binds the `x` position to the *left*, *center*","or *right* of the range selector."].join(" ")},y:{valType:"number",min:-2,max:3,editType:"plot",description:"Sets the y position (in normalized coordinates) of the range selector."},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot",description:["Sets the range selector's vertical position anchor","This anchor binds the `y` position to the *top*, *middle*","or *bottom* of the range selector."].join(" ")},font:gP({editType:"plot",description:"Sets the font of the range selector button text."}),bgcolor:{valType:"color",dflt:qg.lightLine,editType:"plot",description:"Sets the background color of the range selector buttons."},activecolor:{valType:"color",editType:"plot",description:"Sets the background color of the active range selector button."},bordercolor:{valType:"color",dflt:qg.defaultLine,editType:"plot",description:"Sets the color of the border enclosing the range selector."},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot",description:"Sets the width (in px) of the border enclosing the range selector."},editType:"plot"},Ww={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10},Qs=me.exports,_P=ft.exports,wP=Ht,TP=ri,Zw=pd,md=Ww,kP=function(e,r,a,i,n){var o=e.rangeselector||{},l=wP.newContainer(r,"rangeselector");function s(d,h){return Qs.coerce(o,l,Zw,d,h)}var f=TP(o,l,{name:"buttons",handleItemDefaults:AP,calendar:n}),c=s("visible",f.length>0);if(c){var v=MP(r,a,i);s("x",v[0]),s("y",v[1]),Qs.noneOrAll(e,r,["x","y"]),s("xanchor"),s("yanchor"),Qs.coerceFont(s,"font",a.font);var u=s("bgcolor");s("activecolor",_P.contrast(u,md.lightAmount,md.darkAmount)),s("bordercolor"),s("borderwidth")}};function AP(t,e,r,a){var i=a.calendar;function n(s,f){return Qs.coerce(t,e,Zw.buttons,s,f)}var o=n("visible");if(o){var l=n("step");l!=="all"&&(i&&i!=="gregorian"&&(l==="month"||l==="year")?e.stepmode="backward":n("stepmode"),n("count")),n("label")}}function MP(t,e,r){for(var a=r.filter(function(l){return e[l].anchor===t._id}),i=0,n=0;n<a.length;n++){var o=e[a[n]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+md.yPad]}var SP=V2,LP=me.exports.titleCase,CP=function(e,r){var a=e._name,i={};if(r.step==="all")i[a+".autorange"]=!0;else{var n=DP(e,r);i[a+".range[0]"]=n[0],i[a+".range[1]"]=n[1]}return i};function DP(t,e){var r=t.range,a=new Date(t.r2l(r[1])),i=e.step,n=SP["utc"+LP(i)],o=e.count,l;switch(e.stepmode){case"backward":l=t.l2r(+n.offset(a,-o));break;case"todate":var s=n.offset(a,-o);l=t.l2r(+n.ceil(s));break}var f=r[1];return[l,f]}var Ef=ct.exports,EP=We,$P=ar.exports,Xg=ft.exports,Kw=Pt.exports,Ka=me.exports,Yg=Ka.strTranslate,Js=xr,RP=ir,Jh=Vr,Wg=Jh.LINE_SPACING,Zg=Jh.FROM_TL,Kg=Jh.FROM_BR,yd=Ww,PP=CP,zP=function(e){var r=e._fullLayout,a=r._infolayer.selectAll(".rangeselector").data(IP(e),NP);a.enter().append("g").classed("rangeselector",!0),a.exit().remove(),a.style({cursor:"pointer","pointer-events":"all"}),a.each(function(i){var n=Ef.select(this),o=i,l=o.rangeselector,s=n.selectAll("g.button").data(Ka.filterVisible(l.buttons));s.enter().append("g").classed("button",!0),s.exit().remove(),s.each(function(f){var c=Ef.select(this),v=PP(o,f);f._isActive=FP(o,f,v),c.call(tv,l,f),c.call(OP,l,f,e),c.on("click",function(){e._dragged||EP.call("_guiRelayout",e,v)}),c.on("mouseover",function(){f._isHovered=!0,c.call(tv,l,f)}),c.on("mouseout",function(){f._isHovered=!1,c.call(tv,l,f)})}),jP(e,s,l,o._name,n)})};function IP(t){for(var e=RP.list(t,"x",!0),r=[],a=0;a<e.length;a++){var i=e[a];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}function NP(t){return t._id}function FP(t,e,r){if(e.step==="all")return t.autorange===!0;var a=Object.keys(r);return t.range[0]===r[a[0]]&&t.range[1]===r[a[1]]}function tv(t,e,r){var a=Ka.ensureSingle(t,"rect","selector-rect",function(i){i.attr("shape-rendering","crispEdges")});a.attr({rx:yd.rx,ry:yd.ry}),a.call(Xg.stroke,e.bordercolor).call(Xg.fill,HP(e,r)).style("stroke-width",e.borderwidth+"px")}function HP(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}function OP(t,e,r,a){function i(o){Js.convertToTspans(o,a)}var n=Ka.ensureSingle(t,"text","selector-text",function(o){o.attr("text-anchor","middle")});n.call(Kw.font,e.font).text(BP(r,a._fullLayout._meta)).call(i)}function BP(t,e){return t.label?e?Ka.templateString(t.label,e):t.label:t.step==="all"?"all":t.count+t.step.charAt(0)}function jP(t,e,r,a,i){var n=0,o=0,l=r.borderwidth;e.each(function(){var d=Ef.select(this),h=d.select(".selector-text"),p=r.font.size*Wg,g=Math.max(p*Js.lineCount(h),16)+3;o=Math.max(o,g)}),e.each(function(){var d=Ef.select(this),h=d.select(".selector-rect"),p=d.select(".selector-text"),g=p.node()&&Kw.bBox(p.node()).width,_=r.font.size*Wg,b=Js.lineCount(p),w=Math.max(g+10,yd.minButtonWidth);d.attr("transform",Yg(l+n,l)),h.attr({x:0,y:0,width:w,height:o}),Js.positionText(p,w/2,o/2-(b-1)*_/2+3),n+=w+5});var s=t._fullLayout._size,f=s.l+s.w*r.x,c=s.t+s.h*(1-r.y),v="left";Ka.isRightAnchor(r)&&(f-=n,v="right"),Ka.isCenterAnchor(r)&&(f-=n/2,v="center");var u="top";Ka.isBottomAnchor(r)&&(c-=o,u="bottom"),Ka.isMiddleAnchor(r)&&(c-=o/2,u="middle"),n=Math.ceil(n),o=Math.ceil(o),f=Math.round(f),c=Math.round(c),$P.autoMargin(t,a+"-range-selector",{x:r.x,y:r.y,l:n*Zg[v],r:n*Kg[v],b:o*Kg[u],t:o*Zg[u]}),i.attr("transform",Yg(f,c))}var GP={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:pd}}},layoutAttributes:pd,handleDefaults:kP,draw:zP},Ei={},Qg=er.extendFlat;Ei.attributes=function(t,e){t=t||{},e=e||{};var r={valType:"info_array",editType:t.editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},a=t.name?t.name+" ":"",i=t.trace?"trace ":"subplot ",n=e.description?" "+e.description:"",o={x:Qg({},r,{description:["Sets the horizontal domain of this ",a,i,"(in plot fraction).",n].join("")}),y:Qg({},r,{description:["Sets the vertical domain of this ",a,i,"(in plot fraction).",n].join("")}),editType:t.editType};return t.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this row in the grid for this ",a,i,".",n].join("")},o.column={valType:"integer",min:0,dflt:0,editType:t.editType,description:["If there is a layout grid, use the domain ","for this column in the grid for this ",a,i,".",n].join("")}),o};Ei.defaults=function(t,e,r,a){var i=a&&a.x||[0,1],n=a&&a.y||[0,1],o=e.grid;if(o){var l=r("domain.column");l!==void 0&&(l<o.columns?i=o._domains.x[l]:delete t.domain.column);var s=r("domain.row");s!==void 0&&(s<o.rows?n=o._domains.y[s]:delete t.domain.row)}var f=r("domain.x",i),c=r("domain.y",n);f[0]<f[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=n.slice())};var UP=me.exports,VP=ho.counter,qP=Ei.attributes,Jg=$r.idRegex,XP=Ht,gd={rows:{valType:"integer",min:1,editType:"plot",description:["The number of rows in the grid. If you provide a 2D `subplots`","array or a `yaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot",description:["Is the first row the top or the bottom? Note that columns","are always enumerated from left to right."].join(" ")},columns:{valType:"integer",min:1,editType:"plot",description:["The number of columns in the grid. If you provide a 2D `subplots`","array, the length of its longest row is used as the default.","If you give an `xaxes` array, its length is used as the default.","But it's also possible to have a different length, if you","want to leave a row at the end for non-cartesian subplots."].join(" ")},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[VP("xy").toString(),""],editType:"plot"},editType:"plot",description:["Used for freeform grids, where some axes may be shared across subplots","but others are not. Each entry should be a cartesian subplot id, like","*xy* or *x3y2*, or ** to leave that cell empty. You may reuse x axes","within the same column, and y axes within the same row.","Non-cartesian subplots and traces that support `domain` can place themselves","in this grid separately using the `gridcell` attribute."].join(" ")},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Jg.x.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an x axis id like *x*, *x2*, etc., or ** to","not put an x axis in that column. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `yaxes` is present,","will generate consecutive IDs."].join(" ")},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Jg.y.toString(),""],editType:"plot"},editType:"plot",description:["Used with `yaxes` when the x and y axes are shared across columns and rows.","Each entry should be an y axis id like *y*, *y2*, etc., or ** to","not put a y axis in that row. Entries other than ** must be unique.","Ignored if `subplots` is present. If missing but `xaxes` is present,","will generate consecutive IDs."].join(" ")},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot",description:["If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,","we can generate defaults using consecutive axis IDs, in two ways:","*coupled* gives one x axis per column and one y axis per row.","*independent* uses a new xy pair for each cell, left-to-right across each row","then iterating rows according to `roworder`."].join(" ")},xgap:{valType:"number",min:0,max:1,editType:"plot",description:["Horizontal space between grid cells, expressed as a fraction","of the total width available to one cell. Defaults to 0.1","for coupled-axes grids and 0.2 for independent grids."].join(" ")},ygap:{valType:"number",min:0,max:1,editType:"plot",description:["Vertical space between grid cells, expressed as a fraction","of the total height available to one cell. Defaults to 0.1","for coupled-axes grids and 0.3 for independent grids."].join(" ")},domain:qP({name:"grid",editType:"plot",noGridCell:!0},{description:["The first and last cells end exactly at the domain","edges, with no grout around the edges."].join(" ")}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot",description:["Sets where the x axis labels and titles go. *bottom* means","the very bottom of the grid. *bottom plot* is the lowest plot","that each x axis is used in. *top* and *top plot* are similar."].join(" ")},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot",description:["Sets where the y axis labels and titles go. *left* means","the very left edge of the grid. *left plot* is the leftmost plot","that each y axis is used in. *right* and *right plot* are similar."].join(" ")},editType:"plot"};function $f(t,e,r){var a=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});if(Array.isArray(a))return a;if(i.length)return i}function YP(t,e){var r=t.grid||{},a=$f(e,r,"x"),i=$f(e,r,"y");if(!t.grid&&!a&&!i)return;var n=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(a),l=Array.isArray(i),s=o&&a!==r.xaxes&&l&&i!==r.yaxes,f,c;n?(f=r.subplots.length,c=r.subplots[0].length):(l&&(f=i.length),o&&(c=a.length));var v=XP.newContainer(e,"grid");function u(x,T){return UP.coerce(r,v,gd,x,T)}var d=u("rows",f),h=u("columns",c);if(!(d*h>1)){delete e.grid;return}if(!n&&!o&&!l){var p=u("pattern")==="independent";p&&(n=!0)}v._hasSubplotGrid=n;var g=u("roworder"),_=g==="top to bottom",b=n?.2:.1,w=n?.3:.1,m,y;s&&e._splomGridDflt&&(m=e._splomGridDflt.xside,y=e._splomGridDflt.yside),v._domains={x:e0("x",u,b,m,h),y:e0("y",u,w,y,d,_)}}function e0(t,e,r,a,i,n){var o=e(t+"gap",r),l=e("domain."+t);e(t+"side",a);for(var s=new Array(i),f=l[0],c=(l[1]-f)/(i-o),v=c*(1-o),u=0;u<i;u++){var d=f+c*u;s[n?i-1-u:u]=[d,d+v]}return s}function WP(t,e){var r=e.grid;if(!(!r||!r._domains)){var a=t.grid||{},i=e._subplots,n=r._hasSubplotGrid,o=r.rows,l=r.columns,s=r.pattern==="independent",f,c,v,u,d,h,p,g=r._axisMap={};if(n){var _=a.subplots||[];h=r.subplots=new Array(o);var b=1;for(f=0;f<o;f++){var w=h[f]=new Array(l),m=_[f]||[];for(c=0;c<l;c++)if(s?(d=b===1?"xy":"x"+b+"y"+b,b++):d=m[c],w[c]="",i.cartesian.indexOf(d)!==-1){if(p=d.indexOf("y"),v=d.slice(0,p),u=d.slice(p),g[v]!==void 0&&g[v]!==c||g[u]!==void 0&&g[u]!==f)continue;w[c]=d,g[v]=c,g[u]=f}}}else{var y=$f(e,a,"x"),x=$f(e,a,"y");r.xaxes=t0(y,i.xaxis,l,g,"x"),r.yaxes=t0(x,i.yaxis,o,g,"y")}var T=r._anchors={},k=r.roworder==="top to bottom";for(var S in g){var A=S.charAt(0),E=r[A+"side"],M,D,$;if(E.length<8)T[S]="free";else if(A==="x"){if(E.charAt(0)==="t"===k?(M=0,D=1,$=o):(M=o-1,D=-1,$=-1),n){var I=g[S];for(f=M;f!==$;f+=D)if(d=h[f][I],!!d&&(p=d.indexOf("y"),d.slice(0,p)===S)){T[S]=d.slice(p);break}}else for(f=M;f!==$;f+=D)if(u=r.yaxes[f],i.cartesian.indexOf(S+u)!==-1){T[S]=u;break}}else if(E.charAt(0)==="l"?(M=0,D=1,$=l):(M=l-1,D=-1,$=-1),n){var P=g[S];for(f=M;f!==$;f+=D)if(d=h[P][f],!!d&&(p=d.indexOf("y"),d.slice(p)===S)){T[S]=d.slice(0,p);break}}else for(f=M;f!==$;f+=D)if(v=r.xaxes[f],i.cartesian.indexOf(v+S)!==-1){T[S]=v;break}}}}function t0(t,e,r,a,i){var n=new Array(r),o;function l(s,f){e.indexOf(f)!==-1&&a[f]===void 0?(n[s]=f,a[f]=s):n[s]=""}if(Array.isArray(t))for(o=0;o<r;o++)l(o,t[o]);else for(l(0,i),o=1;o<r;o++)l(o,i+(o+1));return n}var ZP={moduleType:"component",name:"grid",schema:{layout:{grid:gd}},layoutAttributes:gd,sizeDefaults:YP,contentDefaults:WP},Qw={visible:{valType:"boolean",editType:"calc",description:["Determines whether or not this set of error bars is visible."].join(" ")},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc",description:["Determines the rule used to generate the error bars.","If *constant`, the bar lengths are of a constant value.","Set this constant in `value`.","If *percent*, the bar lengths correspond to a percentage of","underlying data. Set this percentage in `value`.","If *sqrt*, the bar lengths correspond to the square of the","underlying data.","If *data*, the bar lengths are set with data set `array`."].join(" ")},symmetric:{valType:"boolean",editType:"calc",description:["Determines whether or not the error bars have the same length","in both direction","(top/bottom for vertical bars, left/right for horizontal bars."].join(" ")},array:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar.","Values are plotted relative to the underlying data."].join(" ")},arrayminus:{valType:"data_array",editType:"calc",description:["Sets the data corresponding the length of each error bar in the","bottom (left) direction for vertical (horizontal) bars","Values are plotted relative to the underlying data."].join(" ")},value:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars."].join(" ")},valueminus:{valType:"number",min:0,dflt:10,editType:"calc",description:["Sets the value of either the percentage","(if `type` is set to *percent*) or the constant","(if `type` is set to *constant*) corresponding to the lengths of","the error bars in the","bottom (left) direction for vertical (horizontal) bars"].join(" ")},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style",description:"Sets the stoke color of the error bars."},thickness:{valType:"number",min:0,dflt:2,editType:"style",description:"Sets the thickness (in px) of the error bars."},width:{valType:"number",min:0,editType:"plot",description:["Sets the width (in px) of the cross-bar at both ends","of the error bars."].join(" ")},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style",description:["Obsolete.","Use the alpha channel in error bar `color` to set the opacity."].join(" ")}}},rv,r0;function KP(){if(r0)return rv;r0=1;var t=gt,e=We,r=me.exports,a=Ht,i=Qw;return rv=function(n,o,l,s){var f="error_"+s.axis,c=a.newContainer(o,f),v=n[f]||{};function u(w,m){return r.coerce(v,c,i,w,m)}var d=v.array!==void 0||v.value!==void 0||v.type==="sqrt",h=u("visible",d);if(h!==!1){var p=u("type","array"in v?"data":"percent"),g=!0;p!=="sqrt"&&(g=u("symmetric",!((p==="data"?"arrayminus":"valueminus")in v))),p==="data"?(u("array"),u("traceref"),g||(u("arrayminus"),u("tracerefminus"))):(p==="percent"||p==="constant")&&(u("value"),g||u("valueminus"));var _="copy_"+s.inherit+"style";if(s.inherit){var b=o["error_"+s.inherit];(b||{}).visible&&u(_,!(v.color||t(v.thickness)||t(v.width)))}(!s.inherit||!c[_])&&(u("color",l),u("thickness"),u("width",e.traceIs(o,"gl3d")?0:4))}},rv}var av,a0;function Jw(){if(a0)return av;a0=1,av=function(r){var a=r.type,i=r.symmetric;if(a==="data"){var n=r.array||[];if(i)return function(c,v){var u=+n[v];return[u,u]};var o=r.arrayminus||[];return function(c,v){var u=+n[v],d=+o[v];return!isNaN(u)||!isNaN(d)?[d||0,u||0]:[NaN,NaN]}}else{var l=t(a,r.value),s=t(a,r.valueminus);return i||r.valueminus===void 0?function(c){var v=l(c);return[v,v]}:function(c){return[s(c),l(c)]}}};function t(e,r){if(e==="percent")return function(a){return Math.abs(a*r/100)};if(e==="constant")return function(){return Math.abs(r)};if(e==="sqrt")return function(a){return Math.sqrt(Math.abs(a))}}return av}var iv,i0;function QP(){if(i0)return iv;i0=1;var t=gt,e=We,r=jt.exports,a=me.exports,i=Jw();iv=function(l){for(var s=l.calcdata,f=0;f<s.length;f++){var c=s[f],v=c[0].trace;if(v.visible===!0&&e.traceIs(v,"errorBarsOK")){var u=r.getFromId(l,v.xaxis),d=r.getFromId(l,v.yaxis);n(c,v,u,"x"),n(c,v,d,"y")}}};function n(o,l,s,f){var c=l["error_"+f]||{},v=c.visible&&["linear","log"].indexOf(s.type)!==-1,u=[];if(!!v){for(var d=i(c),h=0;h<o.length;h++){var p=o[h],g=p.i;if(g===void 0)g=h;else if(g===null)continue;var _=p[f];if(!!t(s.c2l(_))){var b=d(_,g);if(t(b[0])&&t(b[1])){var w=p[f+"s"]=_-b[0],m=p[f+"h"]=_+b[1];u.push(w,m)}}}var y=s._id,x=l._extremes[y],T=r.findExtremes(s,u,a.extendFlat({tozero:x.opts.tozero},{padded:!0}));x.min=x.min.concat(T.min),x.max=x.max.concat(T.max)}}return iv}var nv,n0;function JP(){if(n0)return nv;n0=1;var t=ct.exports,e=gt,r=Pt.exports,a=Rr;nv=function(o,l,s,f){var c,v=s.xaxis,u=s.yaxis,d=f&&f.duration>0;l.each(function(h){var p=h[0].trace,g=p.error_x||{},_=p.error_y||{},b;p.ids&&(b=function(x){return x.id});var w=a.hasMarkers(p)&&p.marker.maxdisplayed>0;!_.visible&&!g.visible&&(h=[]);var m=t.select(this).selectAll("g.errorbar").data(h,b);if(m.exit().remove(),!!h.length){g.visible||m.selectAll("path.xerror").remove(),_.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var y=m.enter().append("g").classed("errorbar",!0);d&&y.style("opacity",0).transition().duration(f.duration).style("opacity",1),r.setClipUrl(m,s.layerClipId,o),m.each(function(x){var T=t.select(this),k=i(x,v,u);if(!(w&&!x.vis)){var S,A=T.select("path.yerror");if(_.visible&&e(k.x)&&e(k.yh)&&e(k.ys)){var E=_.width;S="M"+(k.x-E)+","+k.yh+"h"+2*E+"m-"+E+",0V"+k.ys,k.noYS||(S+="m-"+E+",0h"+2*E),c=!A.size(),c?A=T.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):d&&(A=A.transition().duration(f.duration).ease(f.easing)),A.attr("d",S)}else A.remove();var M=T.select("path.xerror");if(g.visible&&e(k.y)&&e(k.xh)&&e(k.xs)){var D=(g.copy_ystyle?_:g).width;S="M"+k.xh+","+(k.y-D)+"v"+2*D+"m0,-"+D+"H"+k.xs,k.noXS||(S+="m0,-"+D+"v"+2*D),c=!M.size(),c?M=T.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):d&&(M=M.transition().duration(f.duration).ease(f.easing)),M.attr("d",S)}else M.remove()}})}})};function i(n,o,l){var s={x:o.c2p(n.x),y:l.c2p(n.y)};return n.yh!==void 0&&(s.yh=l.c2p(n.yh),s.ys=l.c2p(n.ys),e(s.ys)||(s.noYS=!0,s.ys=l.c2p(n.ys,!0))),n.xh!==void 0&&(s.xh=o.c2p(n.xh),s.xs=o.c2p(n.xs),e(s.xs)||(s.noXS=!0,s.xs=o.c2p(n.xs,!0))),s}return nv}var ov,o0;function ez(){if(o0)return ov;o0=1;var t=ct.exports,e=ft.exports;return ov=function(a){a.each(function(i){var n=i[0].trace,o=n.error_y||{},l=n.error_x||{},s=t.select(this);s.selectAll("path.yerror").style("stroke-width",o.thickness+"px").call(e.stroke,o.color),l.copy_ystyle&&(l=o),s.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(e.stroke,l.color)})},ov}var sl=me.exports,l0=Li.overrideAll,fl=Qw,Ki={error_x:sl.extendFlat({},fl),error_y:sl.extendFlat({},fl)};delete Ki.error_x.copy_zstyle;delete Ki.error_y.copy_zstyle;delete Ki.error_y.copy_ystyle;var Gl={error_x:sl.extendFlat({},fl),error_y:sl.extendFlat({},fl),error_z:sl.extendFlat({},fl)};delete Gl.error_x.copy_ystyle;delete Gl.error_y.copy_ystyle;delete Gl.error_z.copy_ystyle;delete Gl.error_z.copy_zstyle;var tz={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Ki,bar:Ki,histogram:Ki,scatter3d:l0(Gl,"calc","nested"),scattergl:l0(Ki,"calc","nested")}},supplyDefaults:KP(),calc:QP(),makeComputeError:Jw(),plot:JP(),style:ez(),hoverInfo:rz};function rz(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}var az={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"}},hi=ct.exports,lv=ca.exports,ef=ar.exports,s0=We,qa=jt.exports,Ss=Ca.exports,oa=me.exports,ya=oa.strTranslate,eT=er.extendFlat,sv=Di,pa=Pt.exports,fv=ft.exports,iz=ec,nz=xr,oz=La.flipScale,lz=cw,sz=uw,fz=ti,ep=Vr,f0=ep.LINE_SPACING,c0=ep.FROM_TL,u0=ep.FROM_BR,Yt=az.cn;function cz(t){var e=t._fullLayout,r=e._infolayer.selectAll("g."+Yt.colorbar).data(uz(t),function(a){return a._id});r.enter().append("g").attr("class",function(a){return a._id}).classed(Yt.colorbar,!0),r.each(function(a){var i=hi.select(this);oa.ensureSingle(i,"rect",Yt.cbbg),oa.ensureSingle(i,"g",Yt.cbfills),oa.ensureSingle(i,"g",Yt.cblines),oa.ensureSingle(i,"g",Yt.cbaxis,function(o){o.classed(Yt.crisp,!0)}),oa.ensureSingle(i,"g",Yt.cbtitleunshift,function(o){o.append("g").classed(Yt.cbtitle,!0)}),oa.ensureSingle(i,"rect",Yt.cboutline);var n=vz(i,a,t);n&&n.then&&(t._promises||[]).push(n),t._context.edits.colorbarPosition&&dz(i,a,t)}),r.exit().each(function(a){ef.autoMargin(t,a._id)}).remove(),r.order()}function uz(t){var e=t._fullLayout,r=t.calcdata,a=[],i,n,o,l;function s(w){return eT(w,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function f(){typeof l.calc=="function"?l.calc(t,o,i):(i._fillgradient=n.reversescale?oz(n.colorscale):n.colorscale,i._zrange=[n[l.min],n[l.max]])}for(var c=0;c<r.length;c++){var v=r[c];o=v[0].trace;var u=o._module.colorbar;if(o.visible===!0&&u)for(var d=Array.isArray(u),h=d?u:[u],p=0;p<h.length;p++){l=h[p];var g=l.container;n=g?o[g]:o,n&&n.showscale&&(i=s(n.colorbar),i._id="cb"+o.uid+(d&&g?"-"+g:""),i._traceIndex=o.index,i._propPrefix=(g?g+".":"")+"colorbar.",i._meta=o._meta,f(),a.push(i))}}for(var _ in e._colorAxes)if(n=e[_],n.showscale){var b=e._colorAxes[_];i=s(n.colorbar),i._id="cb"+_,i._propPrefix=_+".colorbar.",i._meta=e._meta,l={min:"cmin",max:"cmax"},b[0]!=="heatmap"&&(o=b[1],l.calc=o._module.colorbar.calc),f(),a.push(i)}return a}function vz(t,e,r){var a=e.orientation==="v",i=e.len,n=e.lenmode,o=e.thickness,l=e.thicknessmode,s=e.outlinewidth,f=e.borderwidth,c=e.bgcolor,v=e.xanchor,u=e.yanchor,d=e.xpad,h=e.ypad,p=e.x,g=a?e.y:1-e.y,_=r._fullLayout,b=_._size,w=e._fillcolor,m=e._line,y=e.title,x=y.side,T=e._zrange||hi.extent((typeof w=="function"?w:m.color).domain()),k=typeof m.color=="function"?m.color:function(){return m.color},S=typeof w=="function"?w:function(){return w},A=e._levels,E=hz(r,e,T),M=E.fill,D=E.line,$=Math.round(o*(l==="fraction"?a?b.w:b.h:1)),I=$/(a?b.w:b.h),P=Math.round(i*(n==="fraction"?a?b.h:b.w:1)),R=P/(a?b.h:b.w),L=Math.round(a?p*b.w+d:g*b.h+h),C={center:.5,right:1}[v]||0,z={top:1,middle:.5}[u]||0,F=a?p-C*I:g-z*I,H=a?g-z*R:p-C*R,B=Math.round(a?b.h*(1-H):b.w*H);e._lenFrac=R,e._thickFrac=I,e._uFrac=F,e._vFrac=H;var O=e._axis=pz(r,e,T);O.position=I+(a?p+d/b.w:g+h/b.h);var W=["top","bottom"].indexOf(x)!==-1;if(a&&W&&(O.title.side=x,O.titlex=p+d/b.w,O.titley=H+(y.side==="top"?R-h/b.h:h/b.h)),!a&&!W&&(O.title.side=x,O.titley=g+h/b.h,O.titlex=H+d/b.w),m.color&&e.tickmode==="auto"){O.tickmode="linear",O.tick0=A.start;var j=A.size,Z=oa.constrain(P/50,4,15)+1,K=(T[1]-T[0])/((e.nticks||Z)*j);if(K>1){var Q=Math.pow(10,Math.floor(Math.log(K)/Math.LN10));j*=Q*oa.roundUp(K/Q,[2,5,10]),(Math.abs(A.start)/A.size+1e-6)%1<2e-6&&(O.tick0=0)}O.dtick=j}O.domain=a?[H+h/b.h,H+R-h/b.h]:[H+d/b.w,H+R-d/b.w],O.setScale(),t.attr("transform",ya(Math.round(b.l),Math.round(b.t)));var ee=t.select("."+Yt.cbtitleunshift).attr("transform",ya(-Math.round(b.l),-Math.round(b.t))),ne=O.ticklabelposition,le=O.title.font.size,se=t.select("."+Yt.cbaxis),oe,V=0,ie=0;function ge(fe,Ae){var be={propContainer:O,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:_._dfltTitle.colorbar,containerGroup:t.select("."+Yt.cbtitle)},Ce=fe.charAt(0)==="h"?fe.substr(1):"h"+fe;t.selectAll("."+Ce+",."+Ce+"-math-group").remove(),iz.draw(r,fe,eT(be,Ae||{}))}function de(){if(a&&W||!a&&!W){var fe,Ae;x==="top"&&(fe=d+b.l+b.w*p,Ae=h+b.t+b.h*(1-H-R)+3+le*.75),x==="bottom"&&(fe=d+b.l+b.w*p,Ae=h+b.t+b.h*(1-H)-3-le*.25),x==="right"&&(Ae=h+b.t+b.h*g+3+le*.75,fe=d+b.l+b.w*H),ge(O._id+"title",{attributes:{x:fe,y:Ae,"text-anchor":a?"start":"middle"}})}}function ke(){if(a&&!W||!a&&W){var fe=O.position||0,Ae=O._offset+O._length/2,be,Ce;if(x==="right")Ce=Ae,be=b.l+b.w*fe+10+le*(O.showticklabels?1:.5);else if(be=Ae,x==="bottom"&&(Ce=b.t+b.h*fe+10+(ne.indexOf("inside")===-1?O.tickfont.size:0)+(O.ticks!=="intside"&&e.ticklen||0)),x==="top"){var Me=y.text.split("<br>").length;Ce=b.t+b.h*fe+10-$-f0*le*Me}ge((a?"h":"v")+O._id+"title",{avoid:{selection:hi.select(r).selectAll("g."+O._id+"tick"),side:x,offsetTop:a?0:b.t,offsetLeft:a?b.l:0,maxShift:a?_.width:_.height},attributes:{x:be,y:Ce,"text-anchor":"middle"},transform:{rotate:a?-90:0,offset:0}})}}function ue(){if(!a&&!W||a&&W){var fe=t.select("."+Yt.cbtitle),Ae=fe.select("text"),be=[-s/2,s/2],Ce=fe.select(".h"+O._id+"title-math-group").node(),Me=15.6;Ae.node()&&(Me=parseInt(Ae.node().style.fontSize,10)*f0);var Te;if(Ce?(Te=pa.bBox(Ce),ie=Te.width,V=Te.height,V>Me&&(be[1]-=(V-Me)/2)):Ae.node()&&!Ae.classed(Yt.jsPlaceholder)&&(Te=pa.bBox(Ae.node()),ie=Te.width,V=Te.height),a){if(V){if(V+=5,x==="top")O.domain[1]-=V/b.h,be[1]*=-1;else{O.domain[0]+=V/b.h;var X=nz.lineCount(Ae);be[1]+=(1-X)*Me}fe.attr("transform",ya(be[0],be[1])),O.setScale()}}else ie&&(x==="right"&&(O.domain[0]+=(ie+le/2)/b.w),fe.attr("transform",ya(be[0],be[1])),O.setScale())}t.selectAll("."+Yt.cbfills+",."+Yt.cblines).attr("transform",a?ya(0,Math.round(b.h*(1-O.domain[1]))):ya(Math.round(b.w*O.domain[0]),0)),se.attr("transform",a?ya(0,Math.round(-b.t)):ya(Math.round(-b.l),0));var pe=t.select("."+Yt.cbfills).selectAll("rect."+Yt.cbfill).attr("style","").data(M);pe.enter().append("rect").classed(Yt.cbfill,!0).style("stroke","none"),pe.exit().remove();var ce=T.map(O.c2p).map(Math.round).sort(function(Se,Ge){return Se-Ge});pe.each(function(Se,Ge){var Pe=[Ge===0?T[0]:(M[Ge]+M[Ge-1])/2,Ge===M.length-1?T[1]:(M[Ge]+M[Ge+1])/2].map(O.c2p).map(Math.round);a&&(Pe[1]=oa.constrain(Pe[1]+(Pe[1]>Pe[0])?1:-1,ce[0],ce[1]));var Ie=hi.select(this).attr(a?"x":"y",L).attr(a?"y":"x",hi.min(Pe)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(hi.max(Pe)-hi.min(Pe),2));if(e._fillgradient)pa.gradient(Ie,r,e._id,a?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var Ue=S(Se).replace("e-","");Ie.attr("fill",lv(Ue).toHexString())}});var he=t.select("."+Yt.cblines).selectAll("path."+Yt.cbline).data(m.color&&m.width?D:[]);he.enter().append("path").classed(Yt.cbline,!0),he.exit().remove(),he.each(function(Se){var Ge=L,Pe=Math.round(O.c2p(Se))+m.width/2%1;hi.select(this).attr("d","M"+(a?Ge+","+Pe:Pe+","+Ge)+(a?"h":"v")+$).call(pa.lineGroupStyle,m.width,k(Se),m.dash)}),se.selectAll("g."+O._id+"tick,path").remove();var De=L+$+(s||0)/2-(e.ticks==="outside"?1:0),je=qa.calcTicks(O),$e=qa.getTickSigns(O)[2];return qa.drawTicks(r,O,{vals:O.ticks==="inside"?qa.clipEnds(O,je):je,layer:se,path:qa.makeTickPath(O,De,$e),transFn:qa.makeTransTickFn(O)}),qa.drawLabels(r,O,{vals:je,layer:se,transFn:qa.makeTransTickLabelFn(O),labelFns:qa.makeLabelFns(O,De)})}function Y(){var fe,Ae=$+s/2;ne.indexOf("inside")===-1&&(fe=pa.bBox(se.node()),Ae+=a?fe.width:fe.height),oe=ee.select("text");var be=0,Ce=a&&x==="top",Me=!a&&x==="right",Te=0;if(oe.node()&&!oe.classed(Yt.jsPlaceholder)){var X,pe=ee.select(".h"+O._id+"title-math-group").node();pe&&(a&&W||!a&&!W)?(fe=pa.bBox(pe),be=fe.width,X=fe.height):(fe=pa.bBox(ee.node()),be=fe.right-b.l-(a?L:B),X=fe.bottom-b.t-(a?B:L),!a&&x==="top"&&(Ae+=fe.height,Te=fe.height)),Me&&(oe.attr("transform",ya(be/2+le/2,0)),be*=2),Ae=Math.max(Ae,a?be:X)}var ce=(a?d:h)*2+Ae+f+s/2,he=0;!a&&y.text&&u==="bottom"&&g<=0&&(he=ce/2,ce+=he,Te+=he),_._hColorbarMoveTitle=he,_._hColorbarMoveCBTitle=Te;var De=f+s;t.select("."+Yt.cbbg).attr("x",(a?L:B)-De/2-(a?d:0)).attr("y",(a?B:L)-(a?P:h+Te-he)).attr(a?"width":"height",Math.max(ce-he,2)).attr(a?"height":"width",Math.max(P+De,2)).call(fv.fill,c).call(fv.stroke,e.bordercolor).style("stroke-width",f);var je=Me?Math.max(be-10,0):0;if(t.selectAll("."+Yt.cboutline).attr("x",(a?L:B+d)+je).attr("y",(a?B+h-P:L)+(Ce?V:0)).attr(a?"width":"height",Math.max($,2)).attr(a?"height":"width",Math.max(P-(a?2*h+V:2*d+je),2)).call(fv.stroke,e.outlinecolor).style({fill:"none","stroke-width":s}),t.attr("transform",ya(b.l-(a?C*ce:0),b.t-(a?0:(1-z)*ce-Te))),!a&&(f||lv(c).getAlpha()&&!lv.equals(_.paper_bgcolor,c))){var $e=se.selectAll("text"),Se=$e[0].length,Ge=t.select("."+Yt.cbbg).node(),Pe=pa.bBox(Ge),Ie=pa.getTranslate(t),Ue=2;$e.each(function(N,U){var G=0,q=Se-1;if(U===G||U===q){var ae=pa.bBox(this),J=pa.getTranslate(this),ye;if(U===q){var _e=ae.right+J.x,ve=Pe.right+Ie.x+B-f-Ue+p;ye=ve-_e,ye>0&&(ye=0)}else if(U===G){var re=ae.left+J.x,xe=Pe.left+Ie.x+B+f+Ue;ye=xe-re,ye<0&&(ye=0)}ye&&(Se<3?this.setAttribute("transform","translate("+ye+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Xe={},St=c0[v],ht=u0[v],Ft=c0[u],ut=u0[u],_t=ce-$;a?(n==="pixels"?(Xe.y=g,Xe.t=P*Ft,Xe.b=P*ut):(Xe.t=Xe.b=0,Xe.yt=g+i*Ft,Xe.yb=g-i*ut),l==="pixels"?(Xe.x=p,Xe.l=ce*St,Xe.r=ce*ht):(Xe.l=_t*St,Xe.r=_t*ht,Xe.xl=p-o*St,Xe.xr=p+o*ht)):(n==="pixels"?(Xe.x=p,Xe.l=P*St,Xe.r=P*ht):(Xe.l=Xe.r=0,Xe.xl=p+i*St,Xe.xr=p-i*ht),l==="pixels"?(Xe.y=1-g,Xe.t=ce*Ft,Xe.b=ce*ut):(Xe.t=_t*Ft,Xe.b=_t*ut,Xe.yt=g-o*Ft,Xe.yb=g+o*ut)),ef.autoMargin(r,e._id,Xe)}return oa.syncOrAsync([ef.previousPromises,de,ue,ke,ef.previousPromises,Y],r)}function dz(t,e,r){var a=e.orientation==="v",i=r._fullLayout,n=i._size,o,l,s;Ss.init({element:t.node(),gd:r,prepFn:function(){o=t.attr("transform"),sv(t)},moveFn:function(f,c){t.attr("transform",o+ya(f,c)),l=Ss.align((a?e._uFrac:e._vFrac)+f/n.w,a?e._thickFrac:e._lenFrac,0,1,e.xanchor),s=Ss.align((a?e._vFrac:1-e._uFrac)-c/n.h,a?e._lenFrac:e._thickFrac,0,1,e.yanchor);var v=Ss.getCursor(l,s,e.xanchor,e.yanchor);sv(t,v)},doneFn:function(){if(sv(t),l!==void 0&&s!==void 0){var f={};f[e._propPrefix+"x"]=l,f[e._propPrefix+"y"]=s,e._traceIndex!==void 0?s0.call("_guiRestyle",r,f,e._traceIndex):s0.call("_guiRelayout",r,f)}}})}function hz(t,e,r){var a=e._levels,i=[],n=[],o,l,s=a.end+a.size/100,f=a.size,c=1.001*r[0]-.001*r[1],v=1.001*r[1]-.001*r[0];for(l=0;l<1e5&&(o=a.start+l*f,!(f>0?o>=s:o<=s));l++)o>c&&o<v&&i.push(o);if(e._fillgradient)n=[0];else if(typeof e._fillcolor=="function"){var u=e._filllevels;if(u)for(s=u.end+u.size/100,f=u.size,l=0;l<1e5&&(o=u.start+l*f,!(f>0?o>=s:o<=s));l++)o>r[0]&&o<r[1]&&n.push(o);else n=i.map(function(d){return d-a.size/2}),n.push(n[n.length-1]+a.size)}else e._fillcolor&&typeof e._fillcolor=="string"&&(n=[0]);return a.size<0&&(i.reverse(),n.reverse()),{line:i,fill:n}}function pz(t,e,r){var a=t._fullLayout,i=e.orientation==="v",n={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",l={type:"linear",_id:o+e._id},s={letter:o,font:a.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:a.calendar};function f(c,v){return oa.coerce(n,l,fz,c,v)}return lz(n,l,f,s,a),sz(n,l,f,s),l}var mz={draw:cz},yz={moduleType:"component",name:"colorbar",attributes:Qd,supplyDefaults:u1,draw:mz.draw,hasColorbar:r1},gz={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"}},bz={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}},xz=We,tT=me.exports,cv=tT.extendFlat,v0=tT.extendDeep;function d0(t){var e;switch(t){case"themes__thumb":e={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":e={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:e={}}return e}function _z(t){var e=["xaxis","yaxis","zaxis"];return e.indexOf(t.slice(0,5))>-1}var rT=function(e,r){var a,i=e.data,n=e.layout,o=v0([],i),l=v0({},n,d0(r.tileClass)),s=e._context||{};if(r.width&&(l.width=r.width),r.height&&(l.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){l.annotations=[];var f=Object.keys(l);for(a=0;a<f.length;a++)_z(f[a])&&(l[f[a]].title={text:""});for(a=0;a<o.length;a++){var c=o[a];c.showscale=!1,c.marker&&(c.marker.showscale=!1),xz.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(a=0;a<r.annotations.length;a++)l.annotations.push(r.annotations[a]);var v=Object.keys(l).filter(function(g){return g.match(/^scene\d*$/)});if(v.length){var u={};for(r.tileClass==="thumbnail"&&(u={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),a=0;a<v.length;a++){var d=l[v[a]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),cv(d.xaxis,u),cv(d.yaxis,u),cv(d.zaxis,u),d._scene=null}}var h=document.createElement("div");r.tileClass&&(h.className=r.tileClass);var p={gd:h,td:h,layout:l,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showLink:r.showLink||!1,showTips:r.showTips||!1,mapboxAccessToken:s.mapboxAccessToken}};return r.setBackground!=="transparent"&&(p.config.setBackground=r.setBackground||"opaque"),p.gd.defaultLayout=d0(r.tileClass),p},wz=Ed.exports.EventEmitter,Tz=We,kz=me.exports,h0=Ir,Az=rT,Mz=Ph,Sz=zh;function Lz(t,e){var r=new wz,a=Az(t,{format:"png"}),i=a.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function n(){var l=h0.getDelay(i._fullLayout);setTimeout(function(){var s=Mz(i),f=document.createElement("canvas");f.id=kz.randstr(),r=Sz({format:e.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:f,emitter:r,svg:s}),r.clean=function(){i&&document.body.removeChild(i)}},l)}var o=h0.getRedrawFunc(i);return Tz.call("_doPlot",i,a.data,a.layout,a.config).then(o).then(n).catch(function(l){r.emit("error",l)}),r}var Cz=Lz,p0=Ir,Dz={getDelay:p0.getDelay,getRedrawFunc:p0.getRedrawFunc,clone:rT,toSVG:Ph,svgToImg:zh,toImage:Cz,downloadImage:I_},Ez=Dz;(function(t){t.version=Of.version;for(var e=We,r=t.register=e.register,a=Wt,i=Object.keys(a),n=0;n<i.length;n++){var o=i[n];o.charAt(0)!=="_"&&(t[o]=a[o]),r({moduleType:"apiMethod",name:o,fn:a[o]})}r(VE),r([qE,Ma,x$,F$,K$,cR,zR,lP,yP,GP,ZP,tz,eo,yz,b_]),r([gz,bz]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(r(window.PlotlyLocales),delete window.PlotlyLocales),t.Icons=gh;var l=Ma,s=ar.exports;t.Plots={resize:s.resize,graphJson:s.graphJson,sendDataToCloud:s.sendDataToCloud},t.Fx={hover:l.hover,unhover:l.unhover,loneHover:l.loneHover,loneUnhover:l.loneUnhover},t.Snapshot=Ez,t.PlotSchema=go})(Yb);(function(t){t.exports=Yb})(Xb);const w8=Ai(Xb.exports);var aT={exports:{}},Ul={TEXTPAD:3,eventDataKeys:["value","label"]},or=To,m0=bo.axisHoverFormat,$z=qr.hovertemplateAttrs,Rz=qr.texttemplateAttrs,iT=hn,Pz=Dr,y0=Ul,zz=ei.pattern,Qi=er.extendFlat,uv=Pz({editType:"calc",arrayOk:!0,colorEditType:"style",description:""}),Iz=or.marker,Nz=Iz.line,Fz=Qi({},Nz.width,{dflt:0}),Hz=Qi({width:Fz,editType:"calc"},iT("marker.line")),Oz=Qi({line:Hz,editType:"calc"},iT("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style",description:"Sets the opacity of the bars."},pattern:zz}),Vl={x:or.x,x0:or.x0,dx:or.dx,y:or.y,y0:or.y0,dy:or.dy,xperiod:or.xperiod,yperiod:or.yperiod,xperiod0:or.xperiod0,yperiod0:or.yperiod0,xperiodalignment:or.xperiodalignment,yperiodalignment:or.yperiodalignment,xhoverformat:m0("x"),yhoverformat:m0("y"),text:or.text,texttemplate:Rz({editType:"plot"},{keys:y0.eventDataKeys}),hovertext:or.hovertext,hovertemplate:$z({},{keys:y0.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc",description:["Specifies the location of the `text`.","*inside* positions `text` inside, next to the bar end","(rotated and scaled if needed).","*outside* positions `text` outside, next to the bar end","(scaled if needed), unless there is another bar stacked on","this one, then the text gets pushed inside.","*auto* tries to position `text` inside the bar, but if","the bar is too small and no bar is stacked on this one","the text is moved outside.","If *none*, no text appears."].join(" ")},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot",description:["Determines if texts are kept at center or start/end points in `textposition` *inside* mode."].join(" ")},textangle:{valType:"angle",dflt:"auto",editType:"plot",description:["Sets the angle of the tick labels with respect to the bar.","For example, a `tickangle` of -90 draws the tick labels","vertically. With *auto* the texts may automatically be","rotated to fit with the maximum size in bars."].join(" ")},textfont:Qi({},uv,{description:"Sets the font used for `text`."}),insidetextfont:Qi({},uv,{description:"Sets the font used for `text` lying inside the bar."}),outsidetextfont:Qi({},uv,{description:"Sets the font used for `text` lying outside the bar."}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc",description:["Constrain the size of text inside or outside a bar to be no","larger than the bar itself."].join(" ")},cliponaxis:Qi({},or.cliponaxis,{description:["Determines whether the text nodes","are clipped about the subplot axes.","To show the text nodes above axis lines and tick labels,","make sure to set `xaxis.layer` and `yaxis.layer` to *below traces*."].join(" ")}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes",description:["Sets the orientation of the bars.","With *v* (*h*), the value of the each bar spans","along the vertical (horizontal)."].join(" ")},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc",description:["Sets where the bar base is drawn (in position axis units).","In *stack* or *relative* barmode,","traces that set *base* will be excluded","and drawn in *overlay* mode instead."].join(" ")},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc",description:["Shifts the position where the bar is drawn","(in position axis units).","In *group* barmode,","traces that set *offset* will be excluded","and drawn in *overlay* mode instead."].join(" ")},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc",description:["Sets the bar width (in position axis units)."].join(" ")},marker:Oz,offsetgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","offsetgroup where bars of the same position coordinate will line up."].join(" ")},alignmentgroup:{valType:"string",dflt:"",editType:"calc",description:["Set several traces linked to the same position axis","or matching axes to the same","alignmentgroup. This controls whether bars compute their positional","range dependently or independently."].join(" ")},selected:{marker:{opacity:or.selected.marker.opacity,color:or.selected.marker.color,editType:"style"},textfont:or.selected.textfont,editType:"style"},unselected:{marker:{opacity:or.unselected.marker.opacity,color:or.unselected.marker.color,editType:"style"},textfont:or.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"],description:"Renamed to `orientation`."}}},tp={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc",description:["Determines how bars at the same location coordinate","are displayed on the graph.","With *stack*, the bars are stacked on top of one another","With *relative*, the bars are stacked on top of one another,","with negative values below the axis, positive values above","With *group*, the bars are plotted next to one another","centered around the shared location.","With *overlay*, the bars are plotted over one another,","you might need to an *opacity* to see multiple bars."].join(" ")},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc",description:["Sets the normalization for bar traces on the graph.","With *fraction*, the value of each bar is divided by the sum of all","values at that location coordinate.","*percent* is the same but multiplied by 100 to show percentages."].join(" ")},bargap:{valType:"number",min:0,max:1,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","adjacent location coordinates."].join(" ")},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the gap (in plot fraction) between bars of","the same location coordinate."].join(" ")}},Bz=ft.exports,g0=La.hasColorscale,b0=Nl,jz=me.exports.coercePattern,nT=function(e,r,a,i,n){var o=a("marker.color",i),l=g0(e,"marker");l&&b0(e,r,n,a,{prefix:"marker.",cLetter:"c"}),a("marker.line.color",Bz.defaultLine),g0(e,"marker.line")&&b0(e,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width"),a("marker.opacity"),jz(a,"marker.pattern",o,l),a("selected.marker.color"),a("unselected.marker.color")},so=me.exports,x0=ft.exports,Gz=We,Uz=Nh,Vz=vc,qz=nT,Xz=ii.getAxisGroup,oT=Vl,Ls=so.coerceFont;function Yz(t,e,r,a){function i(f,c){return so.coerce(t,e,oT,f,c)}var n=Uz(t,e,a,i);if(!n){e.visible=!1;return}Vz(t,e,a,i),i("xhoverformat"),i("yhoverformat"),i("orientation",e.x&&!e.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate");var o=i("textposition");sT(t,e,a,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),qz(t,e,i,r,a);var l=(e.marker.line||{}).color,s=Gz.getComponentMethod("errorbars","supplyDefaults");s(t,e,l||x0.defaultLine,{axis:"y"}),s(t,e,l||x0.defaultLine,{axis:"x",inherit:"y"}),so.coerceSelectionMarkerOpacity(e,i)}function lT(t,e,r,a){var i=e.orientation,n=e[{v:"x",h:"y"}[i]+"axis"],o=Xz(r,n)+i,l=r._alignmentOpts||{},s=a("alignmentgroup"),f=l[o];f||(f=l[o]={});var c=f[s];c?c.traces.push(e):c=f[s]={traces:[e],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var v=a("offsetgroup"),u=c.offsetGroups,d=u[v];v&&(d||(d=u[v]={offsetIndex:Object.keys(u).length}),e._offsetIndex=d.offsetIndex)}function Wz(t,e){var r,a;function i(o){return so.coerce(a._input,a,oT,o)}if(e.barmode==="group")for(var n=0;n<t.length;n++)a=t[n],a.type==="bar"&&(r=a._input,lT(r,a,e,i))}function sT(t,e,r,a,i,n){n=n||{};var o=n.moduleHasSelected!==!1,l=n.moduleHasUnselected!==!1,s=n.moduleHasConstrain!==!1,f=n.moduleHasCliponaxis!==!1,c=n.moduleHasTextangle!==!1,v=n.moduleHasInsideanchor!==!1,u=!!n.hasPathbar,d=Array.isArray(i)||i==="auto",h=d||i==="inside",p=d||i==="outside";if(h||p){var g=Ls(a,"textfont",r.font),_=so.extendFlat({},g),b=t.textfont&&t.textfont.color,w=!b;if(w&&delete _.color,Ls(a,"insidetextfont",_),u){var m=so.extendFlat({},g);w&&delete m.color,Ls(a,"pathbar.textfont",m)}p&&Ls(a,"outsidetextfont",g),o&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),s&&a("constraintext"),f&&a("cliponaxis"),c&&a("textangle"),a("texttemplate")}h&&v&&a("insidetextanchor")}var fo={supplyDefaults:Yz,crossTraceDefaults:Wz,handleGroupingDefaults:lT,handleText:sT},Zz=We,Kz=jt.exports,Qz=me.exports,Jz=tp,fT=function(t,e,r){function a(d,h){return Qz.coerce(t,e,Jz,d,h)}for(var i=!1,n=!1,o=!1,l={},s=a("barmode"),f=0;f<r.length;f++){var c=r[f];if(Zz.traceIs(c,"bar")&&c.visible)i=!0;else continue;if(s==="group"){var v=c.xaxis+c.yaxis;l[v]&&(o=!0),l[v]=!0}if(c.visible&&c.type==="histogram"){var u=Kz.getFromId({_fullLayout:e},c[c.orientation==="v"?"xaxis":"yaxis"]);u.type!=="category"&&(n=!0)}}if(!i){delete e.barmode;return}s!=="overlay"&&a("barnorm"),a("bargap",n&&!o?0:.2),a("bargroupgap")},Dn=me.exports,rp=function(e,r){for(var a=0;a<e.length;a++)e[a].i=a;Dn.mergeArray(r.text,e,"tx"),Dn.mergeArray(r.hovertext,e,"htx");var i=r.marker;if(i){Dn.mergeArray(i.opacity,e,"mo",!0),Dn.mergeArray(i.color,e,"mc");var n=i.line;n&&(Dn.mergeArray(n.color,e,"mlc"),Dn.mergeArrayCastPositive(n.width,e,"mlw"))}},_0=jt.exports,w0=dc,T0=La.hasColorscale,k0=Jd,eI=rp,tI=J_,rI=function(e,r){var a=_0.getFromId(e,r.xaxis||"x"),i=_0.getFromId(e,r.yaxis||"y"),n,o,l,s,f,c,v={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(n=a.makeCalcdata(r,"x",v),l=i.makeCalcdata(r,"y"),s=w0(r,i,"y",l),f=!!r.yperiodalignment,c="y"):(n=i.makeCalcdata(r,"y",v),l=a.makeCalcdata(r,"x"),s=w0(r,a,"x",l),f=!!r.xperiodalignment,c="x"),o=s.vals;for(var u=Math.min(o.length,n.length),d=new Array(u),h=0;h<u;h++)d[h]={p:o[h],s:n[h]},f&&(d[h].orig_p=l[h],d[h][c+"End"]=s.ends[h],d[h][c+"Start"]=s.starts[h]),r.ids&&(d[h].id=String(r.ids[h]));return T0(r,"marker")&&k0(e,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),T0(r,"marker.line")&&k0(e,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),eI(d,r),tI(d,r),d},aI=gc,iI=me.exports.distinctVals,nI=Jt.BADNUM;function gc(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,a=[],i=0;i<t.length;i++){for(var n=t[i],o=0;o<n.length;o++){var l=n[o];l.p!==nI&&a.push(l.p)}n[0]&&n[0].width1&&(r=Math.min(n[0].width1,r))}this.positions=a;var s=iI(a);this.distinctPositions=s.vals,s.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(s.minDiff,r);var f=(e.posAxis||{}).type;(f==="category"||f==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}gc.prototype.put=function(e,r){var a=this.getLabel(e,r),i=this.bins[a]||0;return this.bins[a]=i+r,i};gc.prototype.get=function(e,r){var a=this.getLabel(e,r);return this.bins[a]||0};gc.prototype.getLabel=function(e,r){var a=r<0&&this.sepNegVal?"v":"^",i=this.overlapNoMerge?e:Math.round(e/this.binWidth);return a+i};var ki=gt,bd=me.exports.isArrayOrTypedArray,co=Jt.BADNUM,oI=We,Ml=jt.exports,lI=ii.getAxisGroup,bc=aI;function sI(t,e){for(var r=e.xaxis,a=e.yaxis,i=t._fullLayout,n=t._fullData,o=t.calcdata,l=[],s=[],f=0;f<n.length;f++){var c=n[f];if(c.visible===!0&&oI.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===a._id&&(c.orientation==="h"?l.push(o[f]):s.push(o[f]),c._computePh))for(var v=t.calcdata[f],u=0;u<v.length;u++)typeof v[u].ph0=="function"&&(v[u].ph0=v[u].ph0()),typeof v[u].ph1=="function"&&(v[u].ph1=v[u].ph1())}var d={xCat:r.type==="category"||r.type==="multicategory",yCat:a.type==="category"||a.type==="multicategory",mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};xd(t,r,a,s,d),xd(t,a,r,l,d)}function xd(t,e,r,a,i){if(!!a.length){var n,o,l,s,f;switch(fI(r,a),i.mode){case"overlay":vv(e,r,a,i);break;case"group":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.offset===void 0?o.push(s):n.push(s);o.length&&cI(t,e,r,o,i),n.length&&vv(e,r,n,i);break;case"stack":case"relative":for(n=[],o=[],l=0;l<a.length;l++)s=a[l],f=s[0].trace,f.base===void 0?o.push(s):n.push(s);o.length&&uI(t,e,r,o,i),n.length&&vv(e,r,n,i);break}pI(a,e)}}function fI(t,e){var r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0].trace,o=n.type==="funnel"?n._base:n.base,l,s=n.orientation==="h"?n.xcalendar:n.ycalendar,f=t.type==="category"||t.type==="multicategory"?function(){return null}:t.d2c;if(bd(o)){for(a=0;a<Math.min(o.length,i.length);a++)l=f(o[a],0,s),ki(l)?(i[a].b=+l,i[a].hasB=1):i[a].b=0;for(;a<i.length;a++)i[a].b=0}else{l=f(o,0,s);var c=ki(l);for(l=c?l:0,a=0;a<i.length;a++)i[a].b=l,c&&(i[a].hasB=1)}}}function vv(t,e,r,a){for(var i=0;i<r.length;i++){var n=r[i],o=new bc([n],{posAxis:t,sepNegVal:!1,overlapNoMerge:!a.norm});cT(t,o,a),a.norm?(pT(o),ap(e,o,a)):hT(e,o)}}function cI(t,e,r,a,i){var n=new bc(a,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});vI(t,e,n,i),hI(n,e),i.norm?(pT(n),ap(r,n,i)):hT(r,n)}function uI(t,e,r,a,i){var n=new bc(a,{posAxis:e,sepNegVal:i.mode==="relative",overlapNoMerge:!(i.norm||i.mode==="stack"||i.mode==="relative")});cT(e,n,i),dI(r,n,i);for(var o=0;o<a.length;o++)for(var l=a[o],s=0;s<l.length;s++){var f=l[s];if(f.s!==co){var c=f.b+f.s===n.get(f.p,f.s);c&&(f._outmost=!0)}}i.norm&&ap(r,n,i)}function cT(t,e,r){for(var a=e.minDiff,i=e.traces,n=a*(1-r.gap),o=n,l=o*(1-(r.groupgap||0)),s=-l/2,f=0;f<i.length;f++){var c=i[f],v=c[0].t;v.barwidth=l,v.poffset=s,v.bargroupwidth=n,v.bardelta=a}e.binWidth=i[0][0].t.barwidth/100,uT(e),vT(t,e),dT(t,e)}function vI(t,e,r,a){for(var i=t._fullLayout,n=r.positions,o=r.distinctPositions,l=r.minDiff,s=r.traces,f=s.length,c=n.length!==o.length,v=l*(1-a.gap),u=lI(i,e._id)+s[0][0].trace.orientation,d=i._alignmentOpts[u]||{},h=0;h<f;h++){var p=s[h],g=p[0].trace,_=d[g.alignmentgroup]||{},b=Object.keys(_.offsetGroups||{}).length,w;b?w=v/b:w=c?v/f:v;var m=w*(1-(a.groupgap||0)),y;b?y=((2*g._offsetIndex+1-b)*w-m)/2:y=c?((2*h+1-f)*w-m)/2:-m/2;var x=p[0].t;x.barwidth=m,x.poffset=y,x.bargroupwidth=v,x.bardelta=l}r.binWidth=s[0][0].t.barwidth/100,uT(r),vT(e,r),dT(e,r,c)}function uT(t){var e=t.traces,r,a;for(r=0;r<e.length;r++){var i=e[r],n=i[0],o=n.trace,l=n.t,s=o._offset||o.offset,f=l.poffset,c;if(bd(s)){for(c=Array.prototype.slice.call(s,0,i.length),a=0;a<c.length;a++)ki(c[a])||(c[a]=f);for(a=c.length;a<i.length;a++)c.push(f);l.poffset=c}else s!==void 0&&(l.poffset=s);var v=o._width||o.width,u=l.barwidth;if(bd(v)){var d=Array.prototype.slice.call(v,0,i.length);for(a=0;a<d.length;a++)ki(d[a])||(d[a]=u);for(a=d.length;a<i.length;a++)d.push(u);if(l.barwidth=d,s===void 0){for(c=[],a=0;a<i.length;a++)c.push(f+(u-d[a])/2);l.poffset=c}}else v!==void 0&&(l.barwidth=v,s===void 0&&(l.poffset=f+(u-v)/2))}}function vT(t,e){for(var r=e.traces,a=ql(t),i=0;i<r.length;i++)for(var n=r[i],o=n[0].t,l=o.poffset,s=Array.isArray(l),f=o.barwidth,c=Array.isArray(f),v=0;v<n.length;v++){var u=n[v],d=u.w=c?f[v]:f;u[a]=u.p+(s?l[v]:l)+d/2}}function dT(t,e,r){var a=e.traces,i=e.minDiff,n=i/2;Ml.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<a.length;o++){var l=a[o],s=l[0],f=s.trace,c=[],v,u,d,h;for(h=0;h<l.length;h++)v=l[h],u=v.p-n,d=v.p+n,c.push(u,d);if(f.width||f.offset){var p=s.t,g=p.poffset,_=p.barwidth,b=Array.isArray(g),w=Array.isArray(_);for(h=0;h<l.length;h++){v=l[h];var m=b?g[h]:g,y=w?_[h]:_;u=v.p+m,d=u+y,c.push(u,d)}}f._extremes[t._id]=Ml.findExtremes(t,c,{padded:!1})}}function hT(t,e){for(var r=e.traces,a=ql(t),i=0;i<r.length;i++){for(var n=r[i],o=n[0].trace,l=[],s=!1,f=0;f<n.length;f++){var c=n[f],v=c.b,u=v+c.s;c[a]=u,l.push(u),c.hasB&&l.push(v),(!c.hasB||!c.b)&&(s=!0)}o._extremes[t._id]=Ml.findExtremes(t,l,{tozero:s,padded:!0})}}function dI(t,e,r){var a=ql(t),i=e.traces,n,o,l,s,f,c;for(s=0;s<i.length;s++)if(n=i[s],o=n[0].trace,o.type==="funnel")for(f=0;f<n.length;f++)c=n[f],c.s!==co&&e.put(c.p,-.5*c.s);for(s=0;s<i.length;s++){n=i[s],o=n[0].trace,l=o.type==="funnel";var v=[];for(f=0;f<n.length;f++)if(c=n[f],c.s!==co){var u;l?u=c.s:u=c.s+c.b;var d=e.put(c.p,u),h=d+u;c.b=d,c[a]=h,r.norm||(v.push(h),c.hasB&&v.push(d))}r.norm||(o._extremes[t._id]=Ml.findExtremes(t,v,{tozero:!0,padded:!0}))}}function pT(t){for(var e=t.traces,r=0;r<e.length;r++)for(var a=e[r],i=0;i<a.length;i++){var n=a[i];n.s!==co&&t.put(n.p,n.b+n.s)}}function hI(t,e){for(var r=t.traces,a=0;a<r.length;a++){var i=r[a],n=i[0].trace;if(n.base===void 0)for(var o=new bc([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<i.length;l++){var s=i[l];if(s.p!==co){var f=o.put(s.p,s.b+s.s);f&&(s.b=f)}}}}function ap(t,e,r){var a=e.traces,i=ql(t),n=r.norm==="fraction"?1:100,o=n/1e9,l=t.l2c(t.c2l(0)),s=r.mode==="stack"?n:l;function f(y){return ki(t.c2l(y))&&(y<l-o||y>s+o||!ki(l))}for(var c=0;c<a.length;c++){for(var v=a[c],u=v[0].trace,d=[],h=!1,p=!1,g=0;g<v.length;g++){var _=v[g];if(_.s!==co){var b=Math.abs(n/e.get(_.p,_.s));_.b*=b,_.s*=b;var w=_.b,m=w+_.s;_[i]=m,d.push(m),p=p||f(m),_.hasB&&(d.push(w),p=p||f(w)),(!_.hasB||!_.b)&&(h=!0)}}u._extremes[t._id]=Ml.findExtremes(t,d,{tozero:h,padded:p})}}function pI(t,e){var r=ql(e),a={},i,n,o,l=1/0,s=-1/0;for(i=0;i<t.length;i++)for(o=t[i],n=0;n<o.length;n++){var f=o[n].p;ki(f)&&(l=Math.min(l,f),s=Math.max(s,f))}var c=1e4/(s-l),v=a.round=function(b){return String(Math.round(c*(b-l)))};for(i=0;i<t.length;i++){o=t[i],o[0].t.extents=a;var u=o[0].t.poffset,d=Array.isArray(u);for(n=0;n<o.length;n++){var h=o[n],p=h[r]-h.w/2;if(ki(p)){var g=h[r]+h.w/2,_=v(h.p);a[_]?a[_]=[Math.min(p,a[_][0]),Math.max(g,a[_][1])]:a[_]=[p,g]}h.p0=h.p+(d?u[n]:u),h.p1=h.p0+h.w,h.s0=h.b,h.s1=h.s0+h.s}}}function ql(t){return t._id.charAt(0)}var mT={crossTraceCalc:sI,setGroupPositions:xd},mI=ct.exports,yI=me.exports;function gI(t,e,r){var a=t._fullLayout,i=a["_"+r+"Text_minsize"];if(i){var n=a.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}e.selectAll(o).each(function(l){var s=l.transform;if(s){s.scale=n&&s.hide?0:i/s.fontSize;var f=mI.select(this).select("text");f.attr("transform",yI.getTextTransform(s))}})}}function bI(t,e,r){if(r.uniformtext.mode){var a=yT(t),i=r.uniformtext.minsize,n=e.scale*e.fontSize;e.hide=n<i,r[a]=r[a]||1/0,e.hide||(r[a]=Math.min(r[a],Math.max(n,i)))}}function xI(t,e){var r=yT(t);e[r]=void 0}function yT(t){return"_"+t+"Text_minsize"}var ni={recordMinTextSize:bI,clearMinTextSize:xI,resizeText:gI},oi={},_I=gt,wI=ca.exports,TI=me.exports.isArrayOrTypedArray;oi.coerceString=function(t,e,r){if(typeof e=="string"){if(e||!t.noBlank)return e}else if((typeof e=="number"||e===!0)&&!t.strict)return String(e);return r!==void 0?r:t.dflt};oi.coerceNumber=function(t,e,r){if(_I(e)){e=+e;var a=t.min,i=t.max,n=a!==void 0&&e<a||i!==void 0&&e>i;if(!n)return e}return r!==void 0?r:t.dflt};oi.coerceColor=function(t,e,r){return wI(e).isValid()?e:r!==void 0?r:t.dflt};oi.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),t.values.indexOf(e)!==-1?e:r!==void 0?r:t.dflt};oi.getValue=function(t,e){var r;return Array.isArray(t)?e<t.length&&(r=t[e]):r=t,r};oi.getLineWidth=function(t,e){var r=0<e.mlw?e.mlw:TI(t.marker.line.width)?0:t.marker.line.width;return r};var cl=ct.exports,kI=ft.exports,Sl=Pt.exports,gT=me.exports,bT=We,xT=ni.resizeText,ip=Vl,AI=ip.textfont,MI=ip.insidetextfont,SI=ip.outsidetextfont,En=oi;function LI(t){var e=cl.select(t).selectAll("g.barlayer").selectAll("g.trace");xT(t,e,"bar");var r=e.size(),a=t._fullLayout;e.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(a.barmode==="stack"&&r>1||a.bargap===0&&a.bargroupgap===0&&!i[0].trace.marker.line.width)&&cl.select(this).attr("shape-rendering","crispEdges")}),e.selectAll("g.points").each(function(i){var n=cl.select(this),o=i[0].trace;_T(n,o,t)}),bT.getComponentMethod("errorbars","style")(e)}function _T(t,e,r){Sl.pointStyle(t.selectAll("path"),e,r),wT(t,e,r)}function wT(t,e,r){t.selectAll("text").each(function(a){var i=cl.select(this),n=gT.ensureUniformFontSize(r,TT(i,a,e,r));Sl.font(i,n)})}function CI(t,e,r){var a=e[0].trace;a.selectedpoints?DI(r,a,t):(_T(r,a,t),bT.getComponentMethod("errorbars","style")(r))}function DI(t,e,r){Sl.selectedPointStyle(t.selectAll("path"),e),EI(t.selectAll("text"),e,r)}function EI(t,e,r){t.each(function(a){var i=cl.select(this),n;if(a.selected){n=gT.ensureUniformFontSize(r,TT(i,a,e,r));var o=e.selected.textfont&&e.selected.textfont.color;o&&(n.color=o),Sl.font(i,n)}else Sl.selectedTextStyle(i,e)})}function TT(t,e,r,a){var i=a._fullLayout.font,n=r.textfont;if(t.classed("bartext-inside")){var o=ST(e,r);n=AT(r,e.i,i,o)}else t.classed("bartext-outside")&&(n=MT(r,e.i,i));return n}function kT(t,e,r){return np(AI,t.textfont,e,r)}function AT(t,e,r,a){var i=kT(t,e,r),n=t._input.textfont===void 0||t._input.textfont.color===void 0||Array.isArray(t.textfont.color)&&t.textfont.color[e]===void 0;return n&&(i={color:kI.contrast(a),family:i.family,size:i.size}),np(MI,t.insidetextfont,e,i)}function MT(t,e,r){var a=kT(t,e,r);return np(SI,t.outsidetextfont,e,a)}function np(t,e,r,a){e=e||{};var i=En.getValue(e.family,r),n=En.getValue(e.size,r),o=En.getValue(e.color,r);return{family:En.coerceString(t.family,i,a.family),size:En.coerceNumber(t.size,n,a.size),color:En.coerceColor(t.color,o,a.color)}}function ST(t,e){return e.type==="waterfall"?e[t.dir].marker.color:t.mcc||t.mc||e.marker.color}var ln={style:LI,styleTextPoints:wT,styleOnSelect:CI,getInsideTextFont:AT,getOutsideTextFont:MT,getBarColor:ST,resizeText:xT},Cs=ct.exports,Ds=gt,yr=me.exports,$I=xr,RI=ft.exports,bi=Pt.exports,PI=We,Rf=jt.exports.tickText,LT=ni,zI=LT.recordMinTextSize,II=LT.clearMinTextSize,dv=ln,uo=oi,NI=Ul,CT=Vl,FI=CT.text,HI=CT.textposition,OI=ua.appendArrayPointValue,Ta=NI.TEXTPAD;function BI(t){return t.id}function jI(t){if(t.ids)return BI}function _i(t,e){return t<e?1:-1}function GI(t,e,r,a){var i=[],n=[],o=a?e:r,l=a?r:e;return i[0]=o.c2p(t.s0,!0),n[0]=l.c2p(t.p0,!0),i[1]=o.c2p(t.s1,!0),n[1]=l.c2p(t.p1,!0),a?[i,n]:[n,i]}function DT(t,e,r,a){if(!e.uniformtext.mode&&ET(r)){var i;return a&&(i=a()),t.transition().duration(r.duration).ease(r.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()})}else return t}function ET(t){return t&&t.duration>0}function UI(t,e,r,a,i,n){var o=e.xaxis,l=e.yaxis,s=t._fullLayout;i||(i={mode:s.barmode,norm:s.barmode,gap:s.bargap,groupgap:s.bargroupgap},II("bar",s));var f=yr.makeTraceGroups(a,r,"trace bars").each(function(c){var v=Cs.select(this),u=c[0].trace,d=u.type==="waterfall",h=u.type==="funnel",p=u.type==="bar",g=p||h,_=0;d&&u.connector.visible&&u.connector.mode==="between"&&(_=u.connector.line.width/2);var b=u.orientation==="h",w=ET(i),m=yr.ensureSingle(v,"g","points"),y=jI(u),x=m.selectAll("g.point").data(yr.identity,y);x.enter().append("g").classed("point",!0),x.exit().remove(),x.each(function(k,S){var A=Cs.select(this),E=GI(k,o,l,b),M=E[0][0],D=E[0][1],$=E[1][0],I=E[1][1],P=(b?D-M:I-$)===0;P&&g&&uo.getLineWidth(u,k)&&(P=!1),P||(P=!Ds(M)||!Ds(D)||!Ds($)||!Ds(I)),k.isBlank=P,P&&(b?D=M:I=$),_&&!P&&(b?(M-=_i(M,D)*_,D+=_i(M,D)*_):($-=_i($,I)*_,I+=_i($,I)*_));var R,L;if(u.type==="waterfall"){if(!P){var C=u[k.dir].marker;R=C.line.width,L=C.color}}else R=uo.getLineWidth(u,k),L=k.mc||u.marker.color;function z(j){var Z=Cs.round(R/2%1,2);return i.gap===0&&i.groupgap===0?Cs.round(Math.round(j)-Z,2):j}function F(j,Z,K){return K&&j===Z?j:Math.abs(j-Z)>=2?z(j):j>Z?Math.ceil(j):Math.floor(j)}if(!t._context.staticPlot){var H=RI.opacity(L),B=H<1||R>.01?z:F;M=B(M,D,b),D=B(D,M,b),$=B($,I,!b),I=B(I,$,!b)}var O=DT(yr.ensureSingle(A,"path"),s,i,n);if(O.style("vector-effect","non-scaling-stroke").attr("d",isNaN((D-M)*(I-$))||P&&t._context.staticPlot?"M0,0Z":"M"+M+","+$+"V"+I+"H"+D+"V"+$+"Z").call(bi.setClipUrl,e.layerClipId,t),!s.uniformtext.mode&&w){var W=bi.makePointStyleFns(u);bi.singlePointStyle(k,O,u,W,t)}VI(t,e,A,c,S,M,D,$,I,i,n),e.layerClipId&&bi.hideOutsideRangePoint(k,A.select("text"),o,l,u.xcalendar,u.ycalendar)});var T=u.cliponaxis===!1;bi.setClipUrl(v,T?null:e.layerClipId,t)});PI.getComponentMethod("errorbars","plot")(t,f,e,i)}function VI(t,e,r,a,i,n,o,l,s,f,c){var v=e.xaxis,u=e.yaxis,d=t._fullLayout,h;function p(j,Z,K){var Q=yr.ensureSingle(j,"text").text(Z).attr({class:"bartext bartext-"+h,"text-anchor":"middle","data-notex":1}).call(bi.font,K).call($I.convertToTspans,t);return Q}var g=a[0].trace,_=g.orientation==="h",b=XI(d,a,i,v,u);h=YI(g,i);var w=f.mode==="stack"||f.mode==="relative",m=a[i],y=!w||m._outmost;if(!b||h==="none"||(m.isBlank||n===o||l===s)&&(h==="auto"||h==="inside")){r.select("text").remove();return}var x=d.font,T=dv.getBarColor(a[i],g),k=dv.getInsideTextFont(g,i,x,T),S=dv.getOutsideTextFont(g,i,x),A=r.datum();_?v.type==="log"&&A.s0<=0&&(v.range[0]<v.range[1]?n=0:n=v._length):u.type==="log"&&A.s0<=0&&(u.range[0]<u.range[1]?l=u._length:l=0);var E=Math.abs(o-n)-2*Ta,M=Math.abs(s-l)-2*Ta,D,$,I,P,R;if(h==="outside"&&!y&&!m.hasB&&(h="inside"),h==="auto")if(y){h="inside",R=yr.ensureUniformFontSize(t,k),D=p(r,b,R),$=bi.bBox(D.node()),I=$.width,P=$.height;var L=I>0&&P>0,C=I<=E&&P<=M,z=I<=M&&P<=E,F=_?E>=I*(M/P):M>=P*(E/I);L&&(C||z||F)?h="inside":(h="outside",D.remove(),D=null)}else h="inside";if(!D){R=yr.ensureUniformFontSize(t,h==="outside"?S:k),D=p(r,b,R);var H=D.attr("transform");if(D.attr("transform",""),$=bi.bBox(D.node()),I=$.width,P=$.height,D.attr("transform",H),I<=0||P<=0){D.remove();return}}var B=g.textangle,O,W;h==="outside"?(W=g.constraintext==="both"||g.constraintext==="outside",O=qI(n,o,l,s,$,{isHorizontal:_,constrained:W,angle:B})):(W=g.constraintext==="both"||g.constraintext==="inside",O=PT(n,o,l,s,$,{isHorizontal:_,constrained:W,angle:B,anchor:g.insidetextanchor})),O.fontSize=R.size,zI(g.type==="histogram"?"bar":g.type,O,d),m.transform=O,DT(D,d,f,c).attr("transform",yr.getTextTransform(O))}function $T(t){return t==="auto"?0:t}function RT(t,e){var r=Math.PI/180*e,a=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*a,y:t.width*a+t.height*i}}function PT(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=n.anchor||"end",c=f==="end",v=f==="start",u=n.leftToRight||0,d=(u+1)/2,h=1-d,p=i.width,g=i.height,_=Math.abs(e-t),b=Math.abs(a-r),w=_>2*Ta&&b>2*Ta?Ta:0;_-=2*w,b-=2*w;var m=$T(s);s==="auto"&&!(p<=_&&g<=b)&&(p>_||g>b)&&(!(p>b||g>_)||p<g!=_<b)&&(m+=90);var y=RT(i,m),x=1;l&&(x=Math.min(1,_/y.x,b/y.y));var T=i.left*h+i.right*d,k=(i.top+i.bottom)/2,S=(t+Ta)*h+(e-Ta)*d,A=(r+a)/2,E=0,M=0;if(v||c){var D=(o?y.x:y.y)/2,$=o?_i(t,e):_i(r,a);o?v?(S=t+$*w,E=-$*D):(S=e-$*w,E=$*D):v?(A=r+$*w,M=-$*D):(A=a-$*w,M=$*D)}return{textX:T,textY:k,targetX:S,targetY:A,anchorX:E,anchorY:M,scale:x,rotate:m}}function qI(t,e,r,a,i,n){var o=!!n.isHorizontal,l=!!n.constrained,s=n.angle||0,f=i.width,c=i.height,v=Math.abs(e-t),u=Math.abs(a-r),d;o?d=u>2*Ta?Ta:0:d=v>2*Ta?Ta:0;var h=1;l&&(h=o?Math.min(1,u/c):Math.min(1,v/f));var p=$T(s),g=RT(i,p),_=(o?g.x:g.y)/2,b=(i.left+i.right)/2,w=(i.top+i.bottom)/2,m=(t+e)/2,y=(r+a)/2,x=0,T=0,k=o?_i(e,t):_i(r,a);return o?(m=e-k*d,x=k*_):(y=a+k*d,T=-k*_),{textX:b,textY:w,targetX:m,targetY:y,anchorX:x,anchorY:T,scale:h,rotate:p}}function XI(t,e,r,a,i){var n=e[0].trace,o=n.texttemplate,l;return o?l=WI(t,e,r,a,i):n.textinfo?l=ZI(e,r,a,i):l=uo.getValue(n.text,r),uo.coerceString(FI,l)}function YI(t,e){var r=uo.getValue(t.textposition,e);return uo.coerceEnumerated(HI,r)}function WI(t,e,r,a,i){var n=e[0].trace,o=yr.castOption(n,r,"texttemplate");if(!o)return"";var l=n.type==="histogram",s=n.type==="waterfall",f=n.type==="funnel",c=n.orientation==="h",v,u,d,h;c?(v="y",u=i,d="x",h=a):(v="x",u=a,d="y",h=i);function p(x){return Rf(u,u.c2l(x),!0).text}function g(x){return Rf(h,h.c2l(x),!0).text}var _=e[r],b={};b.label=_.p,b.labelLabel=b[v+"Label"]=p(_.p);var w=yr.castOption(n,_.i,"text");(w===0||w)&&(b.text=w),b.value=_.s,b.valueLabel=b[d+"Label"]=g(_.s);var m={};OI(m,n,_.i),(l||m.x===void 0)&&(m.x=c?b.value:b.label),(l||m.y===void 0)&&(m.y=c?b.label:b.value),(l||m.xLabel===void 0)&&(m.xLabel=c?b.valueLabel:b.labelLabel),(l||m.yLabel===void 0)&&(m.yLabel=c?b.labelLabel:b.valueLabel),s&&(b.delta=+_.rawS||_.s,b.deltaLabel=g(b.delta),b.final=_.v,b.finalLabel=g(b.final),b.initial=b.final-b.delta,b.initialLabel=g(b.initial)),f&&(b.value=_.s,b.valueLabel=g(b.value),b.percentInitial=_.begR,b.percentInitialLabel=yr.formatPercent(_.begR),b.percentPrevious=_.difR,b.percentPreviousLabel=yr.formatPercent(_.difR),b.percentTotal=_.sumR,b.percenTotalLabel=yr.formatPercent(_.sumR));var y=yr.castOption(n,_.i,"customdata");return y&&(b.customdata=y),yr.texttemplateString(o,b,t._d3locale,m,b,n._meta||{})}function ZI(t,e,r,a){var i=t[0].trace,n=i.orientation==="h",o=i.type==="waterfall",l=i.type==="funnel";function s(y){var x=n?a:r;return Rf(x,y,!0).text}function f(y){var x=n?r:a;return Rf(x,+y,!0).text}var c=i.textinfo,v=t[e],u=c.split("+"),d=[],h,p=function(y){return u.indexOf(y)!==-1};if(p("label")&&d.push(s(t[e].p)),p("text")&&(h=yr.castOption(i,v.i,"text"),(h===0||h)&&d.push(h)),o){var g=+v.rawS||v.s,_=v.v,b=_-g;p("initial")&&d.push(f(b)),p("delta")&&d.push(f(g)),p("final")&&d.push(f(_))}if(l){p("value")&&d.push(f(v.s));var w=0;p("percent initial")&&w++,p("percent previous")&&w++,p("percent total")&&w++;var m=w>1;p("percent initial")&&(h=yr.formatPercent(v.begR),m&&(h+=" of initial"),d.push(h)),p("percent previous")&&(h=yr.formatPercent(v.difR),m&&(h+=" of previous"),d.push(h)),p("percent total")&&(h=yr.formatPercent(v.sumR),m&&(h+=" of total"),d.push(h))}return d.join("<br>")}var op={plot:UI,toMoveInsideBar:PT},Go=Ma,KI=We,A0=ft.exports,QI=me.exports.fillText,JI=oi.getLineWidth,hv=jt.exports.hoverLabelText,eN=Jt.BADNUM;function tN(t,e,r,a,i){var n=zT(t,e,r,a,i);if(n){var o=n.cd,l=o[0].trace,s=o[n.index];return n.color=IT(l,s),KI.getComponentMethod("errorbars","hoverInfo")(s,l,n),[n]}}function zT(t,e,r,a,i){var n=t.cd,o=n[0].trace,l=n[0].t,s=a==="closest",f=o.type==="waterfall",c=t.maxHoverDistance,v=t.maxSpikeDistance,u,d,h,p,g,_,b;o.orientation==="h"?(u=r,d=e,h="y",p="x",g=I,_=M):(u=e,d=r,h="x",p="y",_=I,g=M);var w=o[h+"period"],m=s||w;function y(j){return T(j,-1)}function x(j){return T(j,1)}function T(j,Z){var K=j.w;return j[h]+Z*K/2}function k(j){return j[h+"End"]-j[h+"Start"]}var S=s?y:w?function(j){return j.p-k(j)/2}:function(j){return Math.min(y(j),j.p-l.bardelta/2)},A=s?x:w?function(j){return j.p+k(j)/2}:function(j){return Math.max(x(j),j.p+l.bardelta/2)};function E(j,Z,K){return i.finiteRange&&(K=0),Go.inbox(j-u,Z-u,K+Math.min(1,Math.abs(Z-j)/b)-1)}function M(j){return E(S(j),A(j),c)}function D(j){return E(y(j),x(j),v)}function $(j){var Z=j[p];if(f){var K=Math.abs(j.rawS)||0;d>0?Z+=K:d<0&&(Z-=K)}return Z}function I(j){var Z=d,K=j.b,Q=$(j);return Go.inbox(K-Z,Q-Z,c+(Q-Z)/(Q-K)-1)}function P(j){var Z=d,K=j.b,Q=$(j);return Go.inbox(K-Z,Q-Z,v+(Q-Z)/(Q-K)-1)}var R=t[h+"a"],L=t[p+"a"];b=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));function C(j){return(g(j)+_(j))/2}var z=Go.getDistanceFunction(a,g,_,C);if(Go.getClosest(n,z,t),t.index!==!1&&n[t.index].p!==eN){m||(S=function(j){return Math.min(y(j),j.p-l.bargroupwidth/2)},A=function(j){return Math.max(x(j),j.p+l.bargroupwidth/2)});var F=t.index,H=n[F],B=o.base?H.b+H.s:H.s;t[p+"0"]=t[p+"1"]=L.c2p(H[p],!0),t[p+"LabelVal"]=B;var O=l.extents[l.extents.round(H.p)];t[h+"0"]=R.c2p(s?S(H):O[0],!0),t[h+"1"]=R.c2p(s?A(H):O[1],!0);var W=H.orig_p!==void 0;return t[h+"LabelVal"]=W?H.orig_p:H.p,t.labelLabel=hv(R,t[h+"LabelVal"],o[h+"hoverformat"]),t.valueLabel=hv(L,t[p+"LabelVal"],o[p+"hoverformat"]),t.baseLabel=hv(L,H.b,o[p+"hoverformat"]),t.spikeDistance=(P(H)+D(H))/2,t[h+"Spike"]=R.c2p(H.p,!0),QI(H,o,t),t.hovertemplate=o.hovertemplate,t}}function IT(t,e){var r=e.mcc||t.marker.color,a=e.mlcc||t.marker.line.color,i=JI(t,e);if(A0.opacity(r))return r;if(A0.opacity(a)&&i)return a}var NT={hoverPoints:tN,hoverOnBars:zT,getTraceColor:IT},rN=function(e,r,a){return e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),a.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e},FT=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=a[0].trace,l=o.type==="funnel",s=o.orientation==="h",f=[],c;if(r===!1)for(c=0;c<a.length;c++)a[c].selected=0;else for(c=0;c<a.length;c++){var v=a[c],u="ct"in v?v.ct:aN(v,i,n,s,l);r.contains(u,!1,c,e)?(f.push({pointNumber:c,x:i.c2d(v.x),y:n.c2d(v.y)}),v.selected=1):v.selected=0}return f};function aN(t,e,r,a,i){var n=e.c2p(a?t.s0:t.p0,!0),o=e.c2p(a?t.s1:t.p1,!0),l=r.c2p(a?t.p0:t.s0,!0),s=r.c2p(a?t.p1:t.s1,!0);return i?[(n+o)/2,(l+s)/2]:a?[o,(l+s)/2]:[(n+o)/2,s]}var iN={attributes:Vl,layoutAttributes:tp,supplyDefaults:fo.supplyDefaults,crossTraceDefaults:fo.crossTraceDefaults,supplyLayoutDefaults:fT,calc:rI,crossTraceCalc:mT.crossTraceCalc,colorbar:jl,arraysToCalcdata:rp,plot:op.plot,style:ln.style,styleOnSelect:ln.styleOnSelect,hoverPoints:NT.hoverPoints,eventData:rN,selectPoints:FT,moduleType:"trace",name:"bar",basePlotModule:sr,categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{description:["The data visualized by the span of the bars is set in `y`","if `orientation` is set th *v* (the default)","and the labels are set in `x`.","By setting `orientation` to *h*, the roles are interchanged."].join(" ")}};(function(t){t.exports=iN})(aT);const T8=Ai(aT.exports);var HT={exports:{}},nN=function(e,r){return{start:{valType:"any",editType:"calc",description:["Sets the starting value for the",e,"axis bins. Defaults to the minimum data value,","shifted down if necessary to make nice round values","and to remove ambiguous bin edges. For example, if most of the","data is integers we shift the bin edges 0.5 down, so a `size`","of 5 would have a default `start` of -0.5, so it is clear","that 0-4 are in the first bin, 5-9 in the second, but","continuous data gets a start of 0 and bins [0,5), [5,10) etc.","Dates behave similarly, and `start` should be a date string.","For category data, `start` is based on the category serial","numbers, and defaults to -0.5.",r?"If multiple non-overlaying histograms share a subplot, the first explicit `start` is used exactly and all others are shifted down (if necessary) to differ from that one by an integer number of bins.":""].join(" ")},end:{valType:"any",editType:"calc",description:["Sets the end value for the",e,"axis bins. The last bin may not end exactly at this value,","we increment the bin edge by `size` from `start` until we","reach or exceed `end`. Defaults to the maximum data value.","Like `start`, for dates use a date string, and for category","data `end` is based on the category serial numbers."].join(" ")},size:{valType:"any",editType:"calc",description:["Sets the size of each",e,"axis bin.","Default behavior: If `nbins"+e+"` is 0 or omitted,","we choose a nice round bin size such that the number of bins","is about the same as the typical number of samples in each bin.","If `nbins"+e+"` is provided, we choose a nice round","bin size giving no more than that many bins.","For date data, use milliseconds or *M<n>* for months, as in","`axis.dtick`. For category data, the number of categories to","bin together (always defaults to 1).",r?"If multiple non-overlaying histograms share a subplot, the first explicit `size` is used and all others discarded. If no `size` is provided,the sample data from all traces is combined to determine `size` as described above.":""].join(" ")},editType:"calc"}},oN={eventDataKeys:["binNumber"]},Hr=Vl,M0=bo.axisHoverFormat,lN=qr.hovertemplateAttrs,sN=qr.texttemplateAttrs,pv=Dr,S0=nN,fN=oN,mv=er.extendFlat,OT={x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the x axis."].join(" ")},y:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the sample data to be binned on the y axis."].join(" ")},xhoverformat:M0("x"),yhoverformat:M0("y"),text:mv({},Hr.text,{description:["Sets hover text elements associated with each bar.","If a single string, the same string appears over all bars.","If an array of string, the items are mapped in order to the","this trace's coordinates."].join(" ")}),hovertext:mv({},Hr.hovertext,{description:"Same as `text`."}),orientation:Hr.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc",description:["Specifies the binning function used for this histogram trace.","If *count*, the histogram values are computed by counting the","number of values lying inside each bin.","If *sum*, *avg*, *min*, *max*,","the histogram values are computed using","the sum, the average, the minimum or the maximum","of the values lying inside each bin respectively."].join(" ")},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc",description:["Specifies the type of normalization used for this histogram trace.","If **, the span of each bar corresponds to the number of","occurrences (i.e. the number of data points lying inside the bins).","If *percent* / *probability*, the span of each bar corresponds to","the percentage / fraction of occurrences with respect to the total","number of sample points","(here, the sum of all bin HEIGHTS equals 100% / 1).","If *density*, the span of each bar corresponds to the number of","occurrences in a bin divided by the size of the bin interval","(here, the sum of all bin AREAS equals the","total number of sample points).","If *probability density*, the area of each bar corresponds to the","probability that an event will fall into the corresponding bin","(here, the sum of all bin AREAS equals 1)."].join(" ")},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc",description:["If true, display the cumulative distribution by summing the","binned values. Use the `direction` and `centralbin` attributes","to tune the accumulation method.","Note: in this mode, the *density* `histnorm` settings behave","the same as their equivalents without *density*:","** and *density* both rise to the number of data points, and","*probability* and *probability density* both rise to the","number of sample points."].join(" ")},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc",description:["Only applies if cumulative is enabled.","If *increasing* (default) we sum all prior bins, so the result","increases from left to right. If *decreasing* we sum later bins","so the result decreases from left to right."].join(" ")},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc",description:["Only applies if cumulative is enabled.","Sets whether the current bin is included, excluded, or has half","of its value included in the current cumulative value.","*include* is the default for compatibility with various other","tools, however it introduces a half-bin bias to the results.","*exclude* makes the opposite half-bin bias, and *half* removes","it."].join(" ")},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `xbins.size` is provided."].join(" ")},xbins:S0("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc",description:["Specifies the maximum number of desired bins. This value will be used","in an algorithm that will decide the optimal bin size such that the","histogram best visualizes the distribution of the data.","Ignored if `ybins.size` is provided."].join(" ")},ybins:S0("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobinx` is not needed. However, we accept","`autobinx: true` or `false` and will update `xbins` accordingly","before deleting `autobinx` from the trace."].join(" ")},autobiny:{valType:"boolean",dflt:null,editType:"calc",description:["Obsolete: since v1.42 each bin attribute is auto-determined","separately and `autobiny` is not needed. However, we accept","`autobiny: true` or `false` and will update `ybins` accordingly","before deleting `autobiny` from the trace."].join(" ")},bingroup:{valType:"string",dflt:"",editType:"calc",description:["Set a group of histogram traces which will have compatible bin settings.","Note that traces on the same subplot and with the same *orientation*","under `barmode` *stack*, *relative* and *group* are forced into the same bingroup,","Using `bingroup`, traces under `barmode` *overlay* and on different axes","(of the same axis type) can have compatible bin settings.","Note that histogram and histogram2d* trace can share the same `bingroup`"].join(" ")},hovertemplate:lN({},{keys:fN.eventDataKeys}),texttemplate:sN({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:mv({},Hr.textposition,{arrayOk:!1}),textfont:pv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the text font."}),outsidetextfont:pv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying outside the bar."}),insidetextfont:pv({arrayOk:!1,editType:"plot",colorEditType:"style",description:"Sets the font used for `text` lying inside the bar."}),insidetextanchor:Hr.insidetextanchor,textangle:Hr.textangle,cliponaxis:Hr.cliponaxis,constraintext:Hr.constraintext,marker:Hr.marker,offsetgroup:Hr.offsetgroup,alignmentgroup:Hr.alignmentgroup,selected:Hr.selected,unselected:Hr.unselected,_deprecated:{bardir:Hr._deprecated.bardir}},L0=We,Uo=me.exports,C0=ft.exports,cN=fo.handleText,uN=nT,vN=OT,dN=function(e,r,a,i){function n(b,w){return Uo.coerce(e,r,vN,b,w)}var o=n("x"),l=n("y"),s=n("cumulative.enabled");s&&(n("cumulative.direction"),n("cumulative.currentbin")),n("text");var f=n("textposition");cN(e,r,i,n,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n("hovertext"),n("hovertemplate"),n("xhoverformat"),n("yhoverformat");var c=n("orientation",l&&!o?"h":"v"),v=c==="v"?"x":"y",u=c==="v"?"y":"x",d=o&&l?Math.min(Uo.minRowLength(o)&&Uo.minRowLength(l)):Uo.minRowLength(r[v]||[]);if(!d){r.visible=!1;return}r._length=d;var h=L0.getComponentMethod("calendars","handleTraceDefaults");h(e,r,["x","y"],i);var p=r[u];p&&n("histfunc"),n("histnorm"),n("autobin"+v),uN(e,r,n,a,i),Uo.coerceSelectionMarkerOpacity(r,n);var g=(r.marker.line||{}).color,_=L0.getComponentMethod("errorbars","supplyDefaults");_(e,r,g||C0.defaultLine,{axis:"y"}),_(e,r,g||C0.defaultLine,{axis:"x",inherit:"y"})},el=me.exports,hN=ir,Es=We.traceIs,pN=fo.handleGroupingDefaults,D0=el.nestedProperty,yv=ii.getAxisGroup,E0=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],mN=["x","y"],yN=function(e,r){var a=r._histogramBinOpts={},i=[],n={},o=[],l,s,f,c,v,u,d;function h($,I){return el.coerce(l._input,l,l._module.attributes,$,I)}function p($){return $.orientation==="v"?"x":"y"}function g($,I){var P=hN.getFromTrace({_fullLayout:r},$,I);return P.type}function _($,I,P){var R=$.uid+"__"+P;I||(I=R);var L=g($,P),C=$[P+"calendar"]||"",z=a[I],F=!0;z&&(L===z.axType&&C===z.calendar?(F=!1,z.traces.push($),z.dirs.push(P)):(I=R,L!==z.axType&&el.warn(["Attempted to group the bins of trace",$.index,"set on a","type:"+L,"axis","with bins on","type:"+z.axType,"axis."].join(" ")),C!==z.calendar&&el.warn(["Attempted to group the bins of trace",$.index,"set with a",C,"calendar","with bins",z.calendar?"on a "+z.calendar+" calendar":"w/o a set calendar"].join(" ")))),F&&(a[I]={traces:[$],dirs:[P],axType:L,calendar:$[P+"calendar"]||""}),$["_"+P+"bingroup"]=I}for(v=0;v<e.length;v++)l=e[v],Es(l,"histogram")&&(i.push(l),delete l._xautoBinFinished,delete l._yautoBinFinished,Es(l,"2dMap")||pN(l._input,l,r,h));var b=r._alignmentOpts||{};for(v=0;v<i.length;v++){if(l=i[v],f="",!Es(l,"2dMap")){if(c=p(l),r.barmode==="group"&&l.alignmentgroup){var w=l[c+"axis"],m=yv(r,w)+l.orientation;(b[m]||{})[l.alignmentgroup]&&(f=m)}!f&&r.barmode!=="overlay"&&(f=yv(r,l.xaxis)+yv(r,l.yaxis)+p(l))}f?(n[f]||(n[f]=[]),n[f].push(l)):o.push(l)}for(f in n){if(s=n[f],s.length===1){o.push(s[0]);continue}var y=!1;for(s.length&&(l=s[0],y=h("bingroup")),f=y||f,v=0;v<s.length;v++){l=s[v];var x=l._input.bingroup;x&&x!==f&&el.warn(["Trace",l.index,"must match","within bingroup",f+".","Ignoring its bingroup:",x,"setting."].join(" ")),l.bingroup=f,_(l,f,p(l))}}for(v=0;v<o.length;v++){l=o[v];var T=h("bingroup");if(Es(l,"2dMap"))for(d=0;d<2;d++){c=mN[d];var k=h(c+"bingroup",T?T+"__"+c:null);_(l,k,c)}else _(l,T,p(l))}for(f in a){var S=a[f];for(s=S.traces,u=0;u<E0.length;u++){var A=E0[u],E=A.name,M,D;if(!(E==="nbins"&&S.sizeFound)){for(v=0;v<s.length;v++){if(l=s[v],c=S.dirs[v],M=A.aStr[c],D0(l._input,M).get()!==void 0){S[E]=h(M),S[E+"Found"]=!0;break}D=(l._autoBin||{})[c]||{},D[E]&&D0(l,M).set(D[E])}if(E==="start"||E==="end")for(;v<s.length;v++)l=s[v],l["_"+c+"bingroup"]&&(D=(l._autoBin||{})[c]||{},h(M,D[E]));E==="nbins"&&!S.sizeFound&&!S.nbinsFound&&(l=s[0],S[E]=h(M))}}}},$n=gt,gN={count:function(t,e,r){return r[t]++,1},sum:function(t,e,r,a){var i=a[e];return $n(i)?(i=Number(i),r[t]+=i,i):0},avg:function(t,e,r,a,i){var n=a[e];return $n(n)&&(n=Number(n),r[t]+=n,i[t]++),0},min:function(t,e,r,a){var i=a[e];if($n(i))if(i=Number(i),$n(r[t])){if(r[t]>i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0},max:function(t,e,r,a){var i=a[e];if($n(i))if(i=Number(i),$n(r[t])){if(r[t]<i){var n=i-r[t];return r[t]=i,n}}else return r[t]=i,i;return 0}},bN={percent:function(t,e){for(var r=t.length,a=100/e,i=0;i<r;i++)t[i]*=a},probability:function(t,e){for(var r=t.length,a=0;a<r;a++)t[a]/=e},density:function(t,e,r,a){var i=t.length;a=a||1;for(var n=0;n<i;n++)t[n]*=r[n]*a},"probability density":function(t,e,r,a){var i=t.length;a&&(e/=a);for(var n=0;n<i;n++)t[n]*=r[n]/e}},xN=function(e,r){for(var a=e.length,i=0,n=0;n<a;n++)r[n]?(e[n]/=r[n],i+=e[n]):e[n]=null;return i},ko=Jt,an=ko.ONEAVGYEAR,$0=ko.ONEAVGMONTH,Pf=ko.ONEDAY,R0=ko.ONEHOUR,P0=ko.ONEMIN,z0=ko.ONESEC,I0=jt.exports.tickIncrement,_N=function(e,r,a,i,n){var o=-1.1*r,l=-.1*r,s=e-l,f=a[0],c=a[1],v=Math.min($s(f+l,f+s,i,n),$s(c+l,c+s,i,n)),u=Math.min($s(f+o,f+l,i,n),$s(c+o,c+l,i,n)),d,h;if(v>u&&u<Math.abs(c-f)/4e3?(d=v,h=!1):(d=Math.min(v,u),h=!0),i.type==="date"&&d>Pf){var p=d===an?1:6,g=d===an?"M12":"M1";return function(_,b){var w=i.c2d(_,an,n),m=w.indexOf("-",p);m>0&&(w=w.substr(0,m));var y=i.d2c(w,0,n);if(y<_){var x=I0(y,g,!1,n);(y+x)/2<_+e&&(y=x)}return b&&h?I0(y,g,!0,n):y}}return function(_,b){var w=d*Math.round(_/d);return w+d/10<_&&w+d*.9<_+e&&(w+=d),b&&h&&(w-=d),w}};function $s(t,e,r,a){if(t*e<=0)return 1/0;for(var i=Math.abs(e-t),n=r.type==="date",o=N0(i,n),l=0;l<10;l++){var s=N0(o*80,n);if(o===s)break;if(wN(s,t,e,n,r,a))o=s;else break}return o}function N0(t,e){return e&&t>z0?t>Pf?t>an*1.1?an:t>$0*1.1?$0:Pf:t>R0?R0:t>P0?P0:z0:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function wN(t,e,r,a,i,n){if(a&&t>Pf){var o=F0(e,i,n),l=F0(r,i,n),s=t===an?0:1;return o[s]!==l[s]}return Math.floor(r/t)-Math.floor(e/t)>.1}function F0(t,e,r){var a=e.c2d(t,an,r).split("-");return a[0]===""&&(a.unshift(),a[0]="-"+a[0]),a}var _d=gt,Lr=me.exports,H0=We,na=jt.exports,TN=rp,O0=gN,kN=bN,AN=xN,MN=_N;function SN(t,e){var r=[],a=[],i=e.orientation==="h",n=na.getFromId(t,i?e.yaxis:e.xaxis),o=i?"y":"x",l={x:"y",y:"x"}[o],s=e[o+"calendar"],f=e.cumulative,c,v=lp(t,e,n,o),u=v[0],d=v[1],h=typeof u.size=="string",p=[],g=h?p:u,_=[],b=[],w=[],m=0,y=e.histnorm,x=e.histfunc,T=y.indexOf("density")!==-1,k,S,A;f.enabled&&T&&(y=y.replace(/ ?density$/,""),T=!1);var E=x==="max"||x==="min",M=E?null:0,D=O0.count,$=kN[y],I=!1,P=function(le){return n.r2c(le,0,s)},R;for(Lr.isArrayOrTypedArray(e[l])&&x!=="count"&&(R=e[l],I=x==="avg",D=O0[x]),c=P(u.start),S=P(u.end)+(c-na.tickIncrement(c,u.size,!1,s))/1e6;c<S&&r.length<1e6&&(k=na.tickIncrement(c,u.size,!1,s),r.push((c+k)/2),a.push(M),w.push([]),p.push(c),T&&_.push(1/(k-c)),I&&b.push(0),!(k<=c));)c=k;p.push(c),!h&&n.type==="date"&&(g={start:P(g.start),end:P(g.end),size:g.size}),t._fullLayout._roundFnOpts||(t._fullLayout._roundFnOpts={});var L=e["_"+o+"bingroup"],C={leftGap:1/0,rightGap:1/0};L&&(t._fullLayout._roundFnOpts[L]||(t._fullLayout._roundFnOpts[L]=C),C=t._fullLayout._roundFnOpts[L]);var z=a.length,F=!0,H=C.leftGap,B=C.rightGap,O={};for(c=0;c<d.length;c++){var W=d[c];A=Lr.findBin(W,g),A>=0&&A<z&&(m+=D(A,c,a,R,b),F&&w[A].length&&W!==d[w[A][0]]&&(F=!1),w[A].push(c),O[c]=A,H=Math.min(H,W-p[A]),B=Math.min(B,p[A+1]-W))}C.leftGap=H,C.rightGap=B;var j;F||(j=function(le,se){return function(){var oe=t._fullLayout._roundFnOpts[L];return MN(oe.leftGap,oe.rightGap,p,n,s)(le,se)}}),I&&(m=AN(a,b)),$&&$(a,m,_),f.enabled&&DN(a,f.direction,f.currentbin);var Z=Math.min(r.length,a.length),K=[],Q=0,ee=Z-1;for(c=0;c<Z;c++)if(a[c]){Q=c;break}for(c=Z-1;c>=Q;c--)if(a[c]){ee=c;break}for(c=Q;c<=ee;c++)if(_d(r[c])&&_d(a[c])){var ne={p:r[c],s:a[c],b:0};f.enabled||(ne.pts=w[c],F?ne.ph0=ne.ph1=w[c].length?d[w[c][0]]:r[c]:(e._computePh=!0,ne.ph0=j(p[c]),ne.ph1=j(p[c+1],!0))),K.push(ne)}return K.length===1&&(K[0].width1=na.tickIncrement(K[0].p,u.size,!1,s)-K[0].p),TN(K,e),Lr.isArrayOrTypedArray(e.selectedpoints)&&Lr.tagSelected(K,e,O),K}function lp(t,e,r,a,i){var n=a+"bins",o=t._fullLayout,l=e["_"+a+"bingroup"],s=o._histogramBinOpts[l],f=o.barmode==="overlay",c,v,u,d,h,p,g,_=function(W){return r.r2c(W,0,d)},b=function(W){return r.c2r(W,0,d)},w=r.type==="date"?function(W){return W||W===0?Lr.cleanDate(W,null,d):null}:function(W){return _d(W)?Number(W):null};function m(W,j,Z){j[W+"Found"]?(j[W]=w(j[W]),j[W]===null&&(j[W]=Z[W])):(p[W]=j[W]=Z[W],Lr.nestedProperty(v[0],n+"."+W).set(Z[W]))}if(e["_"+a+"autoBinFinished"])delete e["_"+a+"autoBinFinished"];else{v=s.traces;var y=[],x=!0,T=!1,k=!1;for(c=0;c<v.length;c++)if(u=v[c],u.visible){var S=s.dirs[c];h=u["_"+S+"pos0"]=r.makeCalcdata(u,S),y=Lr.concat(y,h),delete u["_"+a+"autoBinFinished"],e.visible===!0&&(x?x=!1:(delete u._autoBin,u["_"+a+"autoBinFinished"]=1),H0.traceIs(u,"2dMap")&&(T=!0),u.type==="histogram2dcontour"&&(k=!0))}d=v[0][a+"calendar"];var A=na.autoBin(y,r,s.nbins,T,d,s.sizeFound&&s.size),E=v[0]._autoBin={};if(p=E[s.dirs[0]]={},k&&(s.size||(A.start=b(na.tickIncrement(_(A.start),A.size,!0,d))),s.end===void 0&&(A.end=b(na.tickIncrement(_(A.end),A.size,!1,d)))),f&&!H0.traceIs(e,"2dMap")&&A._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"){if(i)return[A,h,!0];A=LN(t,e,r,a,n)}g=u.cumulative||{},g.enabled&&g.currentbin!=="include"&&(g.direction==="decreasing"?A.start=b(na.tickIncrement(_(A.start),A.size,!0,d)):A.end=b(na.tickIncrement(_(A.end),A.size,!1,d))),s.size=A.size,s.sizeFound||(p.size=A.size,Lr.nestedProperty(v[0],n+".size").set(A.size)),m("start",s,A),m("end",s,A)}h=e["_"+a+"pos0"],delete e["_"+a+"pos0"];var M=e._input[n]||{},D=Lr.extendFlat({},s),$=s.start,I=r.r2l(M.start),P=I!==void 0;if((s.startFound||P)&&I!==r.r2l($)){var R=P?I:Lr.aggNums(Math.min,null,h),L={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:s.size,tick0:$,calendar:d,range:[R,na.tickIncrement(R,s.size,!1,d)].map(r.l2r)},C=na.tickFirst(L);C>r.r2l(R)&&(C=na.tickIncrement(C,s.size,!0,d)),D.start=r.l2r(C),P||Lr.nestedProperty(e,n+".start").set(D.start)}var z=s.end,F=r.r2l(M.end),H=F!==void 0;if((s.endFound||H)&&F!==r.r2l(z)){var B=H?F:Lr.aggNums(Math.max,null,h);D.end=r.l2r(B),H||Lr.nestedProperty(e,n+".start").set(D.end)}var O="autobin"+a;return e._input[O]===!1&&(e._input[n]=Lr.extendFlat({},e[n]||{}),delete e._input[O],delete e[O]),[D,h]}function LN(t,e,r,a,i){var n=t._fullLayout,o=CN(t,e),l=!1,s=1/0,f=[e],c,v,u;for(c=0;c<o.length;c++)if(v=o[c],v===e)l=!0;else if(!l)u=n._histogramBinOpts[v["_"+a+"bingroup"]],s=Math.min(s,u.size||v[i].size);else{var d=lp(t,v,r,a,!0),h=d[0],p=d[2];v["_"+a+"autoBinFinished"]=1,v["_"+a+"pos0"]=d[1],p?f.push(v):s=Math.min(s,h.size)}var g=new Array(f.length);for(c=0;c<f.length;c++)for(var _=f[c]["_"+a+"pos0"],b=0;b<_.length;b++)if(_[b]!==void 0){g[c]=_[b];break}for(isFinite(s)||(s=Lr.distinctVals(g).minDiff),c=0;c<f.length;c++){v=f[c];var w=v[a+"calendar"],m={start:r.c2r(g[c]-s/2,0,w),end:r.c2r(g[c]+s/2,0,w),size:s};v._input[i]=v[i]=m,u=n._histogramBinOpts[v["_"+a+"bingroup"]],u&&Lr.extendFlat(u,m)}return e[i]}function CN(t,e){for(var r=e.xaxis,a=e.yaxis,i=e.orientation,n=[],o=t._fullData,l=0;l<o.length;l++){var s=o[l];s.type==="histogram"&&s.visible===!0&&s.orientation===i&&s.xaxis===r&&s.yaxis===a&&n.push(s)}return n}function DN(t,e,r){var a,i,n;function o(s){n=t[s],t[s]/=2}function l(s){i=t[s],t[s]=n+i/2,n+=i}if(r==="half")if(e==="increasing")for(o(0),a=1;a<t.length;a++)l(a);else for(o(t.length-1),a=t.length-2;a>=0;a--)l(a);else if(e==="increasing"){for(a=1;a<t.length;a++)t[a]+=t[a-1];r==="exclude"&&(t.unshift(0),t.pop())}else{for(a=t.length-2;a>=0;a--)t[a]+=t[a+1];r==="exclude"&&(t.push(0),t.shift())}}var EN={calc:SN,calcAllAutoBins:lp},$N=NT.hoverPoints,RN=jt.exports.hoverLabelText,PN=function(e,r,a,i,n){var o=$N(e,r,a,i,n);if(!!o){e=o[0];var l=e.cd[e.index],s=e.cd[0].trace;if(!s.cumulative.enabled){var f=s.orientation==="h"?"y":"x";e[f+"Label"]=RN(e[f+"a"],[l.ph0,l.ph1],s[f+"hoverformat"])}return o}},zN=function(e,r,a,i,n){if(e.x="xVal"in r?r.xVal:r.x,e.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(e.z=r.zLabelVal),r.xa&&(e.xaxis=r.xa),r.ya&&(e.yaxis=r.ya),!(a.cumulative||{}).enabled){var o=Array.isArray(n)?i[0].pts[n[0]][n[1]]:i[n].pts;e.pointNumbers=o,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex;var l;if(a._indexToPoints){l=[];for(var s=0;s<o.length;s++)l=l.concat(a._indexToPoints[o[s]])}else l=o;e.pointIndices=l}return e},IN={attributes:OT,layoutAttributes:tp,supplyDefaults:dN,crossTraceDefaults:yN,supplyLayoutDefaults:fT,calc:EN.calc,crossTraceCalc:mT.crossTraceCalc,plot:op.plot,layerName:"barlayer",style:ln.style,styleOnSelect:ln.styleOnSelect,colorbar:jl,hoverPoints:PN,selectPoints:FT,eventData:zN,moduleType:"trace",name:"histogram",basePlotModule:sr,categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{description:["The sample data from which statistics are computed is set in `x`","for vertically spanning histograms and","in `y` for horizontally spanning histograms.","Binning options are set `xbins` and `ybins` respectively","if no aggregation data is provided."].join(" ")}};(function(t){t.exports=IN})(HT);const k8=Ai(HT.exports);var BT={exports:{}},NN=Ba,FN=Ei.attributes,HN=Dr,ON=Er,BN=qr.hovertemplateAttrs,jN=qr.texttemplateAttrs,Rn=er.extendFlat,Vo=HN({editType:"plot",arrayOk:!0,colorEditType:"plot",description:"Sets the font used for `textinfo`."}),xc={labels:{valType:"data_array",editType:"calc",description:["Sets the sector labels.","If `labels` entries are duplicated, we sum associated `values`","or simply count occurrences if `values` is not provided.","For other array attributes (including color) we use the first","non-empty entry among all occurrences of the label."].join(" ")},label0:{valType:"number",dflt:0,editType:"calc",description:["Alternate to `labels`.","Builds a numeric set of labels.","Use with `dlabel`","where `label0` is the starting label and `dlabel` the step."].join(" ")},dlabel:{valType:"number",dflt:1,editType:"calc",description:"Sets the label step. See `label0` for more info."},values:{valType:"data_array",editType:"calc",description:["Sets the values of the sectors.","If omitted, we count occurrences of each label."].join(" ")},marker:{colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:{valType:"color",dflt:ON.defaultLine,arrayOk:!0,editType:"style",description:["Sets the color of the line enclosing each sector."].join(" ")},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style",description:["Sets the width (in px) of the line enclosing each sector."].join(" ")},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot",description:["Sets text elements associated with each sector.","If trace `textinfo` contains a *text* flag, these elements will be seen","on the chart.","If trace `hoverinfo` contains a *text* flag and *hovertext* is not set,","these elements will be seen in the hover labels."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style",description:["Sets hover text elements associated with each sector.","If a single string, the same string appears for","all data points.","If an array of string, the items are mapped in order of","this trace's sectors.","To be seen, trace `hoverinfo` must contain a *text* flag."].join(" ")},scalegroup:{valType:"string",dflt:"",editType:"calc",description:["If there are multiple pie charts that should be sized according to","their totals, link them by providing a non-empty group id here","shared by every trace in the same group."].join(" ")},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc",description:["Determines which trace information appear on the graph."].join(" ")},hoverinfo:Rn({},NN.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:BN({},{keys:["label","color","value","percent","text"]}),texttemplate:jN({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot",description:["Specifies the location of the `textinfo`."].join(" ")},textfont:Rn({},Vo,{description:"Sets the font used for `textinfo`."}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot",description:["Controls the orientation of the text inside chart sectors.","When set to *auto*, text may be oriented in any direction in order","to be as big as possible in the middle of a sector.","The *horizontal* option orients text to be parallel with the bottom","of the chart, and may make text smaller in order to achieve that goal.","The *radial* option orients text along the radius of the sector.","The *tangential* option orients text perpendicular to the radius of the sector."].join(" ")},insidetextfont:Rn({},Vo,{description:"Sets the font used for `textinfo` lying inside the sector."}),outsidetextfont:Rn({},Vo,{description:"Sets the font used for `textinfo` lying outside the sector."}),automargin:{valType:"boolean",dflt:!1,editType:"plot",description:["Determines whether outside text labels can push the margins."].join(" ")},title:{text:{valType:"string",dflt:"",editType:"plot",description:["Sets the title of the chart.","If it is empty, no title is displayed.","Note that before the existence of `title.text`, the title's","contents used to be defined as the `title` attribute itself.","This behavior has been deprecated."].join(" ")},font:Rn({},Vo,{description:["Sets the font used for `title`.","Note that the title's font used to be set","by the now deprecated `titlefont` attribute."].join(" ")}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot",description:["Specifies the location of the `title`.","Note that the title's position used to be set","by the now deprecated `titleposition` attribute."].join(" ")},editType:"plot"},domain:FN({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc",description:["Sets the fraction of the radius to cut out of the pie.","Use this to make a donut chart."].join(" ")},sort:{valType:"boolean",dflt:!0,editType:"calc",description:["Determines whether or not the sectors are reordered","from largest to smallest."].join(" ")},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc",description:["Specifies the direction at which succeeding sectors follow","one another."].join(" ")},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc",description:["Instead of the first slice starting at 12 o'clock,","rotate to some other angle."].join(" ")},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc",description:["Sets the fraction of larger radius to pull the sectors","out from the center. This can be a constant","to pull all slices apart from each other equally","or an array to highlight one or more slices."].join(" ")},_deprecated:{title:{valType:"string",dflt:"",editType:"calc",description:["Deprecated in favor of `title.text`.","Note that value of `title` is no longer a simple","*string* but a set of sub-attributes."].join(" ")},titlefont:Rn({},Vo,{description:"Deprecated in favor of `title.font`."}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc",description:"Deprecated in favor of `title.position`."}}},GN=gt,wd=me.exports,UN=xc,VN=Ei.defaults,qN=fo.handleText;function jT(t,e){var r=Array.isArray(t),a=wd.isArrayOrTypedArray(e),i=Math.min(r?t.length:1/0,a?e.length:1/0);if(isFinite(i)||(i=0),i&&a){for(var n,o=0;o<i;o++){var l=e[o];if(GN(l)&&l>0){n=!0;break}}n||(i=0)}return{hasLabels:r,hasValues:a,len:i}}function XN(t,e,r,a){function i(w,m){return wd.coerce(t,e,UN,w,m)}var n=i("labels"),o=i("values"),l=jT(n,o),s=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(i("label0"),i("dlabel")),!s){e.visible=!1;return}e._length=s;var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.colors"),i("scalegroup");var c=i("text"),v=i("texttemplate"),u;if(v||(u=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),v||u&&u!=="none"){var d=i("textposition");qN(t,e,a,i,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var h=Array.isArray(d)||d==="auto",p=h||d==="outside";p&&i("automargin"),(d==="inside"||d==="auto"||Array.isArray(d))&&i("insidetextorientation")}VN(e,a,i);var g=i("hole"),_=i("title.text");if(_){var b=i("title.position",g?"middle center":"top center");!g&&b==="middle center"&&(e.title.position="top center"),wd.coerceFont(i,"title.font",a.font)}i("sort"),i("direction"),i("rotation"),i("pull")}var YN={handleLabelsAndValues:jT,supplyDefaults:XN},GT={hiddenlabels:{valType:"data_array",editType:"calc",description:["hiddenlabels is the funnelarea & pie chart analog of","visible:'legendonly'","but it can contain many labels, and can simultaneously","hide slices from several pies/funnelarea charts"].join(" ")},piecolorway:{valType:"colorlist",editType:"calc",description:["Sets the default pie slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendpiecolors`."].join(" ")},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the pie slice colors (whether given by `piecolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},WN=me.exports,ZN=GT,KN=function(e,r){function a(i,n){return WN.coerce(e,r,ZN,i,n)}a("hiddenlabels"),a("piecolorway",r.colorway),a("extendpiecolors")},QN=gt,Td=ca.exports,JN=ft.exports,eF={};function tF(t,e){var r=[],a=t._fullLayout,i=a.hiddenlabels||[],n=e.labels,o=e.marker.colors||[],l=e.values,s=e._length,f=e._hasValues&&s,c,v;if(e.dlabel)for(n=new Array(s),c=0;c<s;c++)n[c]=String(e.label0+c*e.dlabel);var u={},d=UT(a["_"+e.type+"colormap"]),h=0,p=!1;for(c=0;c<s;c++){var g,_,b;if(f){if(g=l[c],!QN(g))continue;g=+g}else g=1;_=n[c],(_===void 0||_==="")&&(_=c),_=String(_);var w=u[_];w===void 0?(u[_]=r.length,b=i.indexOf(_)!==-1,b||(h+=g),r.push({v:g,label:_,color:d(o[c],_),i:c,pts:[c],hidden:b})):(p=!0,v=r[w],v.v+=g,v.pts.push(c),v.hidden||(h+=g),v.color===!1&&o[c]&&(v.color=d(o[c],_)))}r=r.filter(function(y){return y.v>=0});var m=e.type==="funnelarea"?p:e.sort;return m&&r.sort(function(y,x){return x.v-y.v}),r[0]&&(r[0].vTotal=h),r}function UT(t){return function(r,a){return!r||(r=Td(r),!r.isValid())?!1:(r=JN.addOpacity(r,r.getAlpha()),t[a]||(t[a]=r),r)}}function rF(t,e){var r=(e||{}).type;r||(r="pie");var a=t._fullLayout,i=t.calcdata,n=a[r+"colorway"],o=a["_"+r+"colormap"];a["extend"+r+"colors"]&&(n=VT(n,eF));for(var l=0,s=0;s<i.length;s++){var f=i[s],c=f[0].trace.type;if(c===r)for(var v=0;v<f.length;v++){var u=f[v];u.color===!1&&(o[u.label]?u.color=o[u.label]:(o[u.label]=u.color=n[l%n.length],l++))}}}function VT(t,e){var r,a=JSON.stringify(t),i=e[a];if(!i){for(i=t.slice(),r=0;r<t.length;r++)i.push(Td(t[r]).lighten(20).toHexString());for(r=0;r<t.length;r++)i.push(Td(t[r]).darken(20).toHexString());e[a]=i}return i}var zf={calc:tF,crossTraceCalc:rF,makePullColorFn:UT,generateExtendedColors:VT},aF=ua.appendArrayMultiPointValues,iF=function(e,r){var a={curveNumber:r.index,pointNumbers:e.pts,data:r._input,fullData:r,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,bbox:e.bbox,v:e.v};return e.pts.length===1&&(a.pointNumber=a.i=e.pts[0]),aF(a,r,e.pts),r.type==="funnelarea"&&(delete a.v,delete a.i),a},Or=ct.exports,nF=ar.exports,Rs=Ma,qT=ft.exports,Wa=Pt.exports,Cr=me.exports,oF=Cr.strScale,B0=Cr.strTranslate,kd=xr,XT=ni,lF=XT.recordMinTextSize,sF=XT.clearMinTextSize,YT=Ul.TEXTPAD,Rt=pn,Ps=iF,j0=me.exports.isValidTextValue;function fF(t,e){var r=t._fullLayout,a=r._size;sF("pie",r),KT(e,t),i2(e,a);var i=Cr.makeTraceGroups(r._pielayer,e,"trace").each(function(n){var o=Or.select(this),l=n[0],s=l.trace;gF(n),o.attr("stroke-linejoin","round"),o.each(function(){var f=Or.select(this).selectAll("g.slice").data(n);f.enter().append("g").classed("slice",!0),f.exit().remove();var c=[[[],[]],[[],[]]],v=!1;f.each(function(w,m){if(w.hidden){Or.select(this).selectAll("path,g").remove();return}w.pointNumber=w.i,w.curveNumber=s.index,c[w.pxmid[1]<0?0:1][w.pxmid[0]<0?0:1].push(w);var y=l.cx,x=l.cy,T=Or.select(this),k=T.selectAll("path.surface").data([w]);if(k.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),T.call(WT,t,n),s.pull){var S=+Rt.castOption(s.pull,w.pts)||0;S>0&&(y+=S*w.pxmid[0],x+=S*w.pxmid[1])}w.cxFinal=y,w.cyFinal=x;function A(R,L,C,z){var F=z*(L[0]-R[0]),H=z*(L[1]-R[1]);return"a"+z*l.r+","+z*l.r+" 0 "+w.largeArc+(C?" 1 ":" 0 ")+F+","+H}var E=s.hole;if(w.v===l.vTotal){var M="M"+(y+w.px0[0])+","+(x+w.px0[1])+A(w.px0,w.pxmid,!0,1)+A(w.pxmid,w.px0,!0,1)+"Z";E?k.attr("d","M"+(y+E*w.px0[0])+","+(x+E*w.px0[1])+A(w.px0,w.pxmid,!1,E)+A(w.pxmid,w.px0,!1,E)+"Z"+M):k.attr("d",M)}else{var D=A(w.px0,w.px1,!0,1);if(E){var $=1-E;k.attr("d","M"+(y+E*w.px1[0])+","+(x+E*w.px1[1])+A(w.px1,w.px0,!1,E)+"l"+$*w.px0[0]+","+$*w.px0[1]+D+"Z")}else k.attr("d","M"+y+","+x+"l"+w.px0[0]+","+w.px0[1]+D+"Z")}n2(t,w,l);var I=Rt.castOption(s.textposition,w.pts),P=T.selectAll("g.slicetext").data(w.text&&I!=="none"?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var R=Cr.ensureSingle(Or.select(this),"text","",function(W){W.attr("data-notex",1)}),L=Cr.ensureUniformFontSize(t,I==="outside"?uF(s,w,r.font):ZT(s,w,r.font));R.text(w.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Wa.font,L).call(kd.convertToTspans,t);var C=Wa.bBox(R.node()),z;if(I==="outside")z=V0(C,w);else if(z=QT(C,w,l),I==="auto"&&z.scale<1){var F=Cr.ensureUniformFontSize(t,s.outsidetextfont);R.call(Wa.font,F),C=Wa.bBox(R.node()),z=V0(C,w)}var H=z.textPosAngle,B=H===void 0?w.pxmid:tf(l.r,H);if(z.targetX=y+B[0]*z.rCenter+(z.x||0),z.targetY=x+B[1]*z.rCenter+(z.y||0),o2(z,C),z.outside){var O=z.targetY;w.yLabelMin=O-C.height/2,w.yLabelMid=O,w.yLabelMax=O+C.height/2,w.labelExtraX=0,w.labelExtraY=0,v=!0}z.fontSize=L.size,lF(s.type,z,r),n[m].transform=z,R.attr("transform",Cr.getTextTransform(z))})});var u=Or.select(this).selectAll("g.titletext").data(s.title.text?[0]:[]);if(u.enter().append("g").classed("titletext",!0),u.exit().remove(),u.each(function(){var w=Cr.ensureSingle(Or.select(this),"text","",function(x){x.attr("data-notex",1)}),m=s.title.text;s._meta&&(m=Cr.templateString(m,s._meta)),w.text(m).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Wa.font,s.title.font).call(kd.convertToTspans,t);var y;s.title.position==="middle center"?y=hF(l):y=r2(l,a),w.attr("transform",B0(y.x,y.y)+oF(Math.min(1,y.scale))+B0(y.tx,y.ty))}),v&&mF(c,s),cF(f,s),v&&s.automargin){var d=Wa.bBox(o.node()),h=s.domain,p=a.w*(h.x[1]-h.x[0]),g=a.h*(h.y[1]-h.y[0]),_=(.5*p-l.r)/a.w,b=(.5*g-l.r)/a.h;nF.autoMargin(t,"pie."+s.uid+".automargin",{xl:h.x[0]-_,xr:h.x[1]+_,yb:h.y[0]-b,yt:h.y[1]+b,l:Math.max(l.cx-l.r-d.left,0),r:Math.max(d.right-(l.cx+l.r),0),b:Math.max(d.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-d.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var n=Or.select(this);n.attr("dy")&&n.attr("dy",n.attr("dy"))})},0)}function cF(t,e){t.each(function(r){var a=Or.select(this);if(!r.labelExtraX&&!r.labelExtraY){a.select("path.textline").remove();return}var i=a.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,i.attr("transform",Cr.getTextTransform(r.transform));var n=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],l="M"+n+","+o,s=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var f=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(f)>Math.abs(c)?l+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(n+r.labelExtraX+s):l+="l"+r.labelExtraX+","+f+"v"+(c-f)+"h"+s}else l+="V"+(r.yLabelMid+r.labelExtraY)+"h"+s;Cr.ensureSingle(a,"path","textline").call(qT.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:l,fill:"none"})})}function WT(t,e,r){var a=r[0],i=a.cx,n=a.cy,o=a.trace,l=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),t.on("mouseover",function(s){var f=e._fullLayout,c=e._fullData[o.index];if(!(e._dragging||f.hovermode===!1)){var v=c.hoverinfo;if(Array.isArray(v)&&(v=Rs.castHoverinfo({hoverinfo:[Rt.castOption(v,s.pts)],_module:o._module},f,0)),v==="all"&&(v="label+text+value+percent+name"),c.hovertemplate||v!=="none"&&v!=="skip"&&v){var u=s.rInscribed||0,d=i+s.pxmid[0]*(1-u),h=n+s.pxmid[1]*(1-u),p=f.separators,g=[];if(v&&v.indexOf("label")!==-1&&g.push(s.label),s.text=Rt.castOption(c.hovertext||c.text,s.pts),v&&v.indexOf("text")!==-1){var _=s.text;Cr.isValidTextValue(_)&&g.push(_)}s.value=s.v,s.valueLabel=Rt.formatPieValue(s.v,p),v&&v.indexOf("value")!==-1&&g.push(s.valueLabel),s.percent=s.v/a.vTotal,s.percentLabel=Rt.formatPiePercent(s.percent,p),v&&v.indexOf("percent")!==-1&&g.push(s.percentLabel);var b=c.hoverlabel,w=b.font,m=[];Rs.loneHover({trace:o,x0:d-u*a.r,x1:d+u*a.r,y:h,_x0:l?i+s.TL[0]:d-u*a.r,_x1:l?i+s.TR[0]:d+u*a.r,_y0:l?n+s.TL[1]:h-u*a.r,_y1:l?n+s.BL[1]:h+u*a.r,text:g.join("<br>"),name:c.hovertemplate||v.indexOf("name")!==-1?c.name:void 0,idealAlign:s.pxmid[0]<0?"left":"right",color:Rt.castOption(b.bgcolor,s.pts)||s.color,borderColor:Rt.castOption(b.bordercolor,s.pts),fontFamily:Rt.castOption(w.family,s.pts),fontSize:Rt.castOption(w.size,s.pts),fontColor:Rt.castOption(w.color,s.pts),nameLength:Rt.castOption(b.namelength,s.pts),textAlign:Rt.castOption(b.align,s.pts),hovertemplate:Rt.castOption(c.hovertemplate,s.pts),hovertemplateLabels:s,eventData:[Ps(s,c)]},{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:e,inOut_bbox:m}),s.bbox=m[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[Ps(s,c)],event:Or.event})}}),t.on("mouseout",function(s){var f=e._fullLayout,c=e._fullData[o.index],v=Or.select(this).datum();o._hasHoverEvent&&(s.originalEvent=Or.event,e.emit("plotly_unhover",{points:[Ps(v,c)],event:Or.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(Rs.loneUnhover(f._hoverlayer.node()),o._hasHoverLabel=!1)}),t.on("click",function(s){var f=e._fullLayout,c=e._fullData[o.index];e._dragging||f.hovermode===!1||(e._hoverdata=[Ps(s,c)],Rs.click(e,Or.event))})}function uF(t,e,r){var a=Rt.castOption(t.outsidetextfont.color,e.pts)||Rt.castOption(t.textfont.color,e.pts)||r.color,i=Rt.castOption(t.outsidetextfont.family,e.pts)||Rt.castOption(t.textfont.family,e.pts)||r.family,n=Rt.castOption(t.outsidetextfont.size,e.pts)||Rt.castOption(t.textfont.size,e.pts)||r.size;return{color:a,family:i,size:n}}function ZT(t,e,r){var a=Rt.castOption(t.insidetextfont.color,e.pts);!a&&t._input.textfont&&(a=Rt.castOption(t._input.textfont.color,e.pts));var i=Rt.castOption(t.insidetextfont.family,e.pts)||Rt.castOption(t.textfont.family,e.pts)||r.family,n=Rt.castOption(t.insidetextfont.size,e.pts)||Rt.castOption(t.textfont.size,e.pts)||r.size;return{color:a||qT.contrast(e.color),family:i,size:n}}function KT(t,e){for(var r,a,i=0;i<t.length;i++)if(r=t[i][0],a=r.trace,a.title.text){var n=a.title.text;a._meta&&(n=Cr.templateString(n,a._meta));var o=Wa.tester.append("text").attr("data-notex",1).text(n).call(Wa.font,a.title.font).call(kd.convertToTspans,e),l=Wa.bBox(o.node(),!0);r.titleBox={width:l.width,height:l.height},o.remove()}}function QT(t,e,r){var a=r.r||e.rpx1,i=e.rInscribed,n=e.startangle===e.stopangle;if(n)return{rCenter:1-i,scale:0,rotate:0,textPosAngle:0};var o=e.ring,l=o===1&&Math.abs(e.startangle-e.stopangle)===Math.PI*2,s=e.halfangle,f=e.midangle,c=r.trace.insidetextorientation,v=c==="horizontal",u=c==="tangential",d=c==="radial",h=c==="auto",p=[],g;if(!h){var _=function(k,S){if(vF(e,k)){var A=Math.abs(k-e.startangle),E=Math.abs(k-e.stopangle),M=A<E?A:E;S==="tan"?g=U0(t,a,o,M,0):g=G0(t,a,o,M,Math.PI/2),g.textPosAngle=k,p.push(g)}},b;if(v||u){for(b=4;b>=-4;b-=2)_(Math.PI*b,"tan");for(b=4;b>=-4;b-=2)_(Math.PI*(b+1),"tan")}if(v||d){for(b=4;b>=-4;b-=2)_(Math.PI*(b+1.5),"rad");for(b=4;b>=-4;b-=2)_(Math.PI*(b+.5),"rad")}}if(l||h||v){var w=Math.sqrt(t.width*t.width+t.height*t.height);if(g={scale:i*a*2/w,rCenter:1-i,rotate:0},g.textPosAngle=(e.startangle+e.stopangle)/2,g.scale>=1)return g;p.push(g)}(h||d)&&(g=G0(t,a,o,s,f),g.textPosAngle=(e.startangle+e.stopangle)/2,p.push(g)),(h||u)&&(g=U0(t,a,o,s,f),g.textPosAngle=(e.startangle+e.stopangle)/2,p.push(g));for(var m=0,y=0,x=0;x<p.length;x++){var T=p[x].scale;if(y<T&&(y=T,m=x),!h&&y>=1)break}return p[m]}function vF(t,e){var r=t.startangle,a=t.stopangle;return r>e&&e>a||r<e&&e<a}function G0(t,e,r,a,i){e=Math.max(0,e-2*YT);var n=t.width/t.height,o=t2(n,a,e,r);return{scale:o*2/t.height,rCenter:JT(n,o/e),rotate:e2(i)}}function U0(t,e,r,a,i){e=Math.max(0,e-2*YT);var n=t.height/t.width,o=t2(n,a,e,r);return{scale:o*2/t.width,rCenter:JT(n,o/e),rotate:e2(i+Math.PI/2)}}function JT(t,e){return Math.cos(e)-t*e}function e2(t){return(180/Math.PI*t+720)%180-90}function t2(t,e,r,a){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),a/(Math.sqrt(t*t+a/2)+t))}function dF(t,e){return t.v===e.vTotal&&!e.trace.hole?1:Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2)}function V0(t,e){var r=e.pxmid[0],a=e.pxmid[1],i=t.width/2,n=t.height/2;return r<0&&(i*=-1),a<0&&(n*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(n)*(i>0?1:-1)/2,y:n/(1+r*r/(a*a)),outside:!0}}function hF(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}function r2(t,e){var r=1,a=1,i,n=t.trace,o={x:t.cx,y:t.cy},l={tx:0,ty:0};l.ty+=n.title.font.size,i=a2(n),n.title.position.indexOf("top")!==-1?(o.y-=(1+i)*t.r,l.ty-=t.titleBox.height):n.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*t.r);var s=pF(t.r,t.trace.aspectratio),f=e.w*(n.domain.x[1]-n.domain.x[0])/2;return n.title.position.indexOf("left")!==-1?(f=f+s,o.x-=(1+i)*s,l.tx+=t.titleBox.width/2):n.title.position.indexOf("center")!==-1?f*=2:n.title.position.indexOf("right")!==-1&&(f=f+s,o.x+=(1+i)*s,l.tx-=t.titleBox.width/2),r=f/t.titleBox.width,a=Ad(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,a),tx:l.tx,ty:l.ty}}function pF(t,e){return t/(e===void 0?1:e)}function Ad(t,e){var r=t.trace,a=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,a/2)}function a2(t){var e=t.pull;if(!e)return 0;var r;if(Array.isArray(e))for(e=0,r=0;r<t.pull.length;r++)t.pull[r]>e&&(e=t.pull[r]);return e}function mF(t,e){var r,a,i,n,o,l,s,f,c,v,u,d,h;function p(w,m){return w.pxmid[1]-m.pxmid[1]}function g(w,m){return m.pxmid[1]-w.pxmid[1]}function _(w,m){m||(m={});var y=m.labelExtraY+(a?m.yLabelMax:m.yLabelMin),x=a?w.yLabelMin:w.yLabelMax,T=a?w.yLabelMax:w.yLabelMin,k=w.cyFinal+o(w.px0[1],w.px1[1]),S=y-x,A,E,M,D,$,I;if(S*s>0&&(w.labelExtraY=S),!!Array.isArray(e.pull))for(E=0;E<v.length;E++)M=v[E],!(M===w||(Rt.castOption(e.pull,w.pts)||0)>=(Rt.castOption(e.pull,M.pts)||0))&&((w.pxmid[1]-M.pxmid[1])*s>0?(D=M.cyFinal+o(M.px0[1],M.px1[1]),S=D-x-w.labelExtraY,S*s>0&&(w.labelExtraY+=S)):(T+w.labelExtraY-k)*s>0&&(A=3*l*Math.abs(E-v.indexOf(w)),$=M.cxFinal+n(M.px0[0],M.px1[0]),I=$+A-(w.cxFinal+w.pxmid[0])-w.labelExtraX,I*l>0&&(w.labelExtraX+=I)))}for(a=0;a<2;a++)for(i=a?p:g,o=a?Math.max:Math.min,s=a?1:-1,r=0;r<2;r++){for(n=r?Math.max:Math.min,l=r?1:-1,f=t[a][r],f.sort(i),c=t[1-a][r],v=c.concat(f),d=[],u=0;u<f.length;u++)f[u].yLabelMid!==void 0&&d.push(f[u]);for(h=!1,u=0;a&&u<c.length;u++)if(c[u].yLabelMid!==void 0){h=c[u];break}for(u=0;u<d.length;u++){var b=u&&d[u-1];h&&!u&&(b=h),_(d[u],b)}}}function i2(t,e){for(var r=[],a=0;a<t.length;a++){var i=t[a][0],n=i.trace,o=n.domain,l=e.w*(o.x[1]-o.x[0]),s=e.h*(o.y[1]-o.y[0]);n.title.text&&n.title.position!=="middle center"&&(s-=Ad(i,e));var f=l/2,c=s/2;n.type==="funnelarea"&&!n.scalegroup&&(c/=n.aspectratio),i.r=Math.min(f,c)/(1+a2(n)),i.cx=e.l+e.w*(n.domain.x[1]+n.domain.x[0])/2,i.cy=e.t+e.h*(1-n.domain.y[0])-s/2,n.title.text&&n.title.position.indexOf("bottom")!==-1&&(i.cy-=Ad(i,e)),n.scalegroup&&r.indexOf(n.scalegroup)===-1&&r.push(n.scalegroup)}yF(t,r)}function yF(t,e){for(var r,a,i,n=0;n<e.length;n++){var o=1/0,l=e[n];for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var s;if(i.type==="pie")s=r.r*r.r;else if(i.type==="funnelarea"){var f,c;i.aspectratio>1?(f=r.r,c=f/i.aspectratio):(c=r.r,f=c*i.aspectratio),f*=(1+i.baseratio)/2,s=f*c}o=Math.min(o,s/r.vTotal)}for(a=0;a<t.length;a++)if(r=t[a][0],i=r.trace,i.scalegroup===l){var v=o*r.vTotal;i.type==="funnelarea"&&(v/=(1+i.baseratio)/2,v/=i.aspectratio),r.r=Math.sqrt(v)}}}function gF(t){var e=t[0],r=e.r,a=e.trace,i=Rt.getRotationAngle(a.rotation),n=2*Math.PI/e.vTotal,o="px0",l="px1",s,f,c;if(a.direction==="counterclockwise"){for(s=0;s<t.length&&t[s].hidden;s++);if(s===t.length)return;i+=n*t[s].v,n*=-1,o="px1",l="px0"}for(c=tf(r,i),s=0;s<t.length;s++)f=t[s],!f.hidden&&(f[o]=c,f.startangle=i,i+=n*f.v/2,f.pxmid=tf(r,i),f.midangle=i,i+=n*f.v/2,c=tf(r,i),f.stopangle=i,f[l]=c,f.largeArc=f.v>e.vTotal/2?1:0,f.halfangle=Math.PI*Math.min(f.v/e.vTotal,.5),f.ring=1-a.hole,f.rInscribed=dF(f,e))}function tf(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function n2(t,e,r){var a=t._fullLayout,i=r.trace,n=i.texttemplate,o=i.textinfo;if(!n&&o&&o!=="none"){var l=o.split("+"),s=function(m){return l.indexOf(m)!==-1},f=s("label"),c=s("text"),v=s("value"),u=s("percent"),d=a.separators,h;if(h=f?[e.label]:[],c){var p=Rt.getFirstFilled(i.text,e.pts);j0(p)&&h.push(p)}v&&h.push(Rt.formatPieValue(e.v,d)),u&&h.push(Rt.formatPiePercent(e.v/r.vTotal,d)),e.text=h.join("<br>")}function g(m){return{label:m.label,value:m.v,valueLabel:Rt.formatPieValue(m.v,a.separators),percent:m.v/r.vTotal,percentLabel:Rt.formatPiePercent(m.v/r.vTotal,a.separators),color:m.color,text:m.text,customdata:Cr.castOption(i,m.i,"customdata")}}if(n){var _=Cr.castOption(i,e.i,"texttemplate");if(!_)e.text="";else{var b=g(e),w=Rt.getFirstFilled(i.text,e.pts);(j0(w)||w==="")&&(b.text=w),e.text=Cr.texttemplateString(_,b,t._fullLayout._d3locale,b,i._meta||{})}}}function o2(t,e){var r=t.rotate*Math.PI/180,a=Math.cos(r),i=Math.sin(r),n=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=n*a-o*i,t.textY=n*i+o*a,t.noCenter=!0}var l2={plot:fF,formatSliceLabel:n2,transformInsideText:QT,determineInsideTextFont:ZT,positionTitleOutside:r2,prerenderTitles:KT,layoutAreas:i2,attachFxHandlers:WT,computeTransform:o2},q0=ct.exports,bF=ch,xF=ni.resizeText,_F=function(e){var r=e._fullLayout._pielayer.selectAll(".trace");xF(e,r,"pie"),r.each(function(a){var i=a[0],n=i.trace,o=q0.select(this);o.style({opacity:n.opacity}),o.selectAll("path.surface").each(function(l){q0.select(this).call(bF,l,n)})})},s2={};(function(t){var e=ar.exports;t.name="pie",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})(s2);var wF={attributes:xc,supplyDefaults:YN.supplyDefaults,supplyLayoutDefaults:KN,layoutAttributes:GT,calc:zf.calc,crossTraceCalc:zf.crossTraceCalc,plot:l2.plot,style:_F,styleOne:ch,moduleType:"trace",name:"pie",basePlotModule:s2,categories:["pie-like","pie","showLegend"],meta:{description:["A data visualized by the sectors of the pie is set in `values`.","The sector labels are set in `labels`.","The sector colors are set in `marker.colors`"].join(" ")}};(function(t){t.exports=wF})(BT);const A8=Ai(BT.exports);var f2={exports:{}},c2={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}},rf=me.exports.extendFlat,af=To,X0=bo.axisHoverFormat,Md=ei.dash,TF=jf,u2=c2,kF=u2.INCREASING.COLOR,AF=u2.DECREASING.COLOR,If=af.line;function Y0(t){return{line:{color:rf({},If.color,{dflt:t}),width:If.width,dash:Md,editType:"style"},editType:"style"}}var v2={xperiod:af.xperiod,xperiod0:af.xperiod0,xperiodalignment:af.xperiodalignment,xhoverformat:X0("x"),yhoverformat:X0("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes",description:["Sets the x coordinates.","If absent, linear coordinate will be generated."].join(" ")},open:{valType:"data_array",editType:"calc",description:"Sets the open values."},high:{valType:"data_array",editType:"calc",description:"Sets the high values."},low:{valType:"data_array",editType:"calc",description:"Sets the low values."},close:{valType:"data_array",editType:"calc",description:"Sets the close values."},line:{width:rf({},If.width,{description:[If.width,"Note that this style setting can also be set per","direction via `increasing.line.width` and","`decreasing.line.width`."].join(" ")}),dash:rf({},Md,{description:[Md.description,"Note that this style setting can also be set per","direction via `increasing.line.dash` and","`decreasing.line.dash`."].join(" ")}),editType:"style"},increasing:Y0(kF),decreasing:Y0(AF),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:["Sets hover text elements associated with each sample point.","If a single string, the same string appears over","all the data points.","If an array of string, the items are mapped in order to","this trace's sample points."].join(" ")},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc",description:"Same as `text`."},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc",description:["Sets the width of the open/close tick marks","relative to the *x* minimal interval."].join(" ")},hoverlabel:rf({},TF.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style",description:["Show hover information (open, close, high, low) in","separate labels."].join(" ")}})},MF=We,SF=me.exports,LF=function(e,r,a,i){var n=a("x"),o=a("open"),l=a("high"),s=a("low"),f=a("close");a("hoverlabel.split");var c=MF.getComponentMethod("calendars","handleTraceDefaults");if(c(e,r,["x"],i),!!(o&&l&&s&&f)){var v=Math.min(o.length,l.length,s.length,f.length);return n&&(v=Math.min(v,SF.minRowLength(n))),r._length=v,v}},CF=me.exports,DF=LF,EF=vc,$F=v2,RF=function(e,r,a,i){function n(l,s){return CF.coerce(e,r,$F,l,s)}var o=DF(e,r,n,i);if(!o){r.visible=!1;return}EF(e,r,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),W0(e,r,n,"increasing"),W0(e,r,n,"decreasing"),n("text"),n("hovertext"),n("tickwidth"),i._requestRangeslider[r.xaxis]=!0};function W0(t,e,r,a){r(a+".line.color"),r(a+".line.width",e.line.width),r(a+".line.dash",e.line.dash)}var _c=me.exports,zs=_c._,nf=jt.exports,PF=dc,qo=Jt.BADNUM;function zF(t,e){var r=nf.getFromId(t,e.xaxis),a=nf.getFromId(t,e.yaxis),i=NF(t,r,e),n=e._minDiff;e._minDiff=null;var o=e._origX;e._origX=null;var l=e._xcalc;e._xcalc=null;var s=d2(t,e,o,l,a,IF);return e._extremes[r._id]=nf.findExtremes(r,l,{vpad:n/2}),s.length?(_c.extendFlat(s[0].t,{wHover:n/2,tickLen:i}),s):[{t:{empty:!0}}]}function IF(t,e,r,a){return{o:t,h:e,l:r,c:a}}function d2(t,e,r,a,i,n){for(var o=i.makeCalcdata(e,"open"),l=i.makeCalcdata(e,"high"),s=i.makeCalcdata(e,"low"),f=i.makeCalcdata(e,"close"),c=Array.isArray(e.text),v=Array.isArray(e.hovertext),u=!0,d=null,h=!!e.xperiodalignment,p=[],g=0;g<a.length;g++){var _=a[g],b=o[g],w=l[g],m=s[g],y=f[g];if(_!==qo&&b!==qo&&w!==qo&&m!==qo&&y!==qo){y===b?d!==null&&y!==d&&(u=y>d):u=y>b,d=y;var x=n(b,w,m,y);x.pos=_,x.yc=(b+y)/2,x.i=g,x.dir=u?"increasing":"decreasing",x.x=x.pos,x.y=[m,w],h&&(x.orig_p=r[g]),c&&(x.tx=e.text[g]),v&&(x.htx=e.hovertext[g]),p.push(x)}else p.push({pos:_,empty:!0})}return e._extremes[i._id]=nf.findExtremes(i,_c.concat(s,l),{padded:!0}),p.length&&(p[0].t={labels:{open:zs(t,"open:")+" ",high:zs(t,"high:")+" ",low:zs(t,"low:")+" ",close:zs(t,"close:")+" "}}),p}function NF(t,e,r){var a=r._minDiff;if(!a){var i=t._fullData,n=[];a=1/0;var o;for(o=0;o<i.length;o++){var l=i[o];if(l.type==="ohlc"&&l.visible===!0&&l.xaxis===e._id){n.push(l);var s=e.makeCalcdata(l,"x");l._origX=s;var f=PF(r,e,"x",s).vals;l._xcalc=f;var c=_c.distinctVals(f).minDiff;c&&isFinite(c)&&(a=Math.min(a,c))}}for(a===1/0&&(a=1),o=0;o<n.length;o++)n[o]._minDiff=a}return a*r.tickwidth}var FF={calc:zF,calcCommon:d2},HF=ct.exports,Z0=me.exports,OF=function(e,r,a,i){var n=r.yaxis,o=r.xaxis,l=!!o.rangebreaks;Z0.makeTraceGroups(i,a,"trace ohlc").each(function(s){var f=HF.select(this),c=s[0],v=c.t,u=c.trace;if(u.visible!==!0||v.empty){f.remove();return}var d=v.tickLen,h=f.selectAll("path").data(Z0.identity);h.enter().append("path"),h.exit().remove(),h.attr("d",function(p){if(p.empty)return"M0,0Z";var g=o.c2p(p.pos-d,!0),_=o.c2p(p.pos+d,!0),b=l?(g+_)/2:o.c2p(p.pos,!0),w=n.c2p(p.o,!0),m=n.c2p(p.h,!0),y=n.c2p(p.l,!0),x=n.c2p(p.c,!0);return"M"+g+","+w+"H"+b+"M"+b+","+m+"V"+y+"M"+_+","+x+"H"+b})})},gv=ct.exports,BF=Pt.exports,jF=ft.exports,GF=function(e,r,a){var i=a||gv.select(e).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var o=n[0].trace;gv.select(this).selectAll("path").each(function(l){if(!l.empty){var s=o[l.dir].line;gv.select(this).style("fill","none").call(jF.stroke,s.color).call(BF.dashLine,s.dash,s.width).style("opacity",o.selectedpoints&&!l.selected?.3:1)}})})},Sd=jt.exports,UF=me.exports,Is=Ma,VF=ft.exports,qF=me.exports.fillText,K0=c2,XF={increasing:K0.INCREASING.SYMBOL,decreasing:K0.DECREASING.SYMBOL};function YF(t,e,r,a){var i=t.cd,n=i[0].trace;return n.hoverlabel.split?p2(t,e,r,a):m2(t,e,r,a)}function h2(t,e,r,a){var i=t.cd,n=t.xa,o=i[0].trace,l=i[0].t,s=o.type,f=s==="ohlc"?"l":"min",c=s==="ohlc"?"h":"max",v,u,d=l.bPos||0,h=function(A){return A.pos+d-e},p=l.bdPos||l.tickLen,g=l.wHover,_=Math.min(1,p/Math.abs(n.r2c(n.range[1])-n.r2c(n.range[0])));v=t.maxHoverDistance-_,u=t.maxSpikeDistance-_;function b(A){var E=h(A);return Is.inbox(E-g,E+g,v)}function w(A){var E=A[f],M=A[c];return E===M||Is.inbox(E-r,M-r,v)}function m(A){return(b(A)+w(A))/2}var y=Is.getDistanceFunction(a,b,w,m);if(Is.getClosest(i,y,t),t.index===!1)return null;var x=i[t.index];if(x.empty)return null;var T=x.dir,k=o[T],S=k.line.color;return VF.opacity(S)&&k.line.width?t.color=S:t.color=k.fillcolor,t.x0=n.c2p(x.pos+d-p,!0),t.x1=n.c2p(x.pos+d+p,!0),t.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,t.spikeDistance=m(x)*u/v,t.xSpike=n.c2p(x.pos,!0),t}function p2(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=[],f=h2(t,e,r,a);if(!f)return[];var c=f.index,v=i[c],u=v.hi||o.hoverinfo,d=u.split("+"),h=u==="all",p=h||d.indexOf("y")!==-1;if(!p)return[];for(var g=["high","open","close","low"],_={},b=0;b<g.length;b++){var w=g[b],m=o[w][f.index],y=n.c2p(m,!0),x;m in _?(x=_[m],x.yLabel+="<br>"+l.labels[w]+Sd.hoverLabelText(n,m,o.yhoverformat)):(x=UF.extendFlat({},f),x.y0=x.y1=y,x.yLabelVal=m,x.yLabel=l.labels[w]+Sd.hoverLabelText(n,m,o.yhoverformat),x.name="",s.push(x),_[m]=x)}return s}function m2(t,e,r,a){var i=t.cd,n=t.ya,o=i[0].trace,l=i[0].t,s=h2(t,e,r,a);if(!s)return[];var f=s.index,c=i[f],v=s.index=c.i,u=c.dir;function d(m){return l.labels[m]+Sd.hoverLabelText(n,o[m][v],o.yhoverformat)}var h=c.hi||o.hoverinfo,p=h.split("+"),g=h==="all",_=g||p.indexOf("y")!==-1,b=g||p.indexOf("text")!==-1,w=_?[d("open"),d("high"),d("low"),d("close")+" "+XF[u]]:[];return b&&qF(c,o,w),s.extraText=w.join("<br>"),s.y0=s.y1=n.c2p(c.yc,!0),[s]}var WF={hoverPoints:YF,hoverSplit:p2,hoverOnPoints:m2},ZF=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l,s=a[0].t.bPos||0;if(r===!1)for(l=0;l<a.length;l++)a[l].selected=0;else for(l=0;l<a.length;l++){var f=a[l];r.contains([i.c2p(f.pos+s),n.c2p(f.yc)],null,f.i,e)?(o.push({pointNumber:f.i,x:i.c2d(f.pos),y:n.c2d(f.yc)}),f.selected=1):f.selected=0}return o},KF={moduleType:"trace",name:"ohlc",basePlotModule:sr,categories:["cartesian","svg","showLegend"],meta:{description:["The ohlc (short for Open-High-Low-Close) is a style of financial chart describing","open, high, low and close for a given `x` coordinate (most likely time).","The tip of the lines represent the `low` and `high` values and","the horizontal segments represent the `open` and `close` values.","Sample points where the close value is higher (lower) then the open","value are called increasing (decreasing).","By default, increasing items are drawn in green whereas","decreasing are drawn in red."].join(" ")},attributes:v2,supplyDefaults:RF,calc:FF.calc,plot:OF,style:GF,hoverPoints:WF.hoverPoints,selectPoints:ZF};(function(t){t.exports=KF})(f2);const M8=Ai(f2.exports);var y2={exports:{}},QF=We,za=me.exports,JF=fw;function e4(t,e,r,a){var i=t.cd,n=i[0].t,o=i[0].trace,l=t.xa,s=t.ya,f=n.x,c=n.y,v=l.c2p(e),u=s.c2p(r),d=t.distance,h;if(n.tree){var p=l.p2c(v-d),g=l.p2c(v+d),_=s.p2c(u-d),b=s.p2c(u+d);a==="x"?h=n.tree.range(Math.min(p,g),Math.min(s._rl[0],s._rl[1]),Math.max(p,g),Math.max(s._rl[0],s._rl[1])):h=n.tree.range(Math.min(p,g),Math.min(_,b),Math.max(p,g),Math.max(_,b))}else h=n.ids;var w,m,y,x,T,k,S,A,E,M=d;if(a==="x"){var D=!!o.xperiodalignment,$=!!o.yperiodalignment;for(T=0;T<h.length;T++){if(w=h[T],y=f[w],k=Math.abs(l.c2p(y)-v),D){var I=l.c2p(o._xStarts[w]),P=l.c2p(o._xEnds[w]);k=v>=Math.min(I,P)&&v<=Math.max(I,P)?0:1/0}if(k<M){if(M=k,x=c[w],S=s.c2p(x)-u,$){var R=s.c2p(o._yStarts[w]),L=s.c2p(o._yEnds[w]);S=u>=Math.min(R,L)&&u<=Math.max(R,L)?0:1/0}E=Math.sqrt(k*k+S*S),m=h[T]}}}else for(T=h.length-1;T>-1;T--)w=h[T],y=f[w],x=c[w],k=l.c2p(y)-v,S=s.c2p(x)-u,A=Math.sqrt(k*k+S*S),A<M&&(M=E=A,m=w);return t.index=m,t.distance=M,t.dxy=E,m===void 0?[t]:[g2(t,f,c,o)]}function g2(t,e,r,a){var i=t.xa,n=t.ya,o=t.distance,l=t.dxy,s=t.index,f={pointNumber:s,x:e[s],y:r[s]};f.tx=Array.isArray(a.text)?a.text[s]:a.text,f.htx=Array.isArray(a.hovertext)?a.hovertext[s]:a.hovertext,f.data=Array.isArray(a.customdata)?a.customdata[s]:a.customdata,f.tp=Array.isArray(a.textposition)?a.textposition[s]:a.textposition;var c=a.textfont;c&&(f.ts=za.isArrayOrTypedArray(c.size)?c.size[s]:c.size,f.tc=Array.isArray(c.color)?c.color[s]:c.color,f.tf=Array.isArray(c.family)?c.family[s]:c.family);var v=a.marker;v&&(f.ms=za.isArrayOrTypedArray(v.size)?v.size[s]:v.size,f.mo=za.isArrayOrTypedArray(v.opacity)?v.opacity[s]:v.opacity,f.mx=za.isArrayOrTypedArray(v.symbol)?v.symbol[s]:v.symbol,f.mc=za.isArrayOrTypedArray(v.color)?v.color[s]:v.color);var u=v&&v.line;u&&(f.mlc=Array.isArray(u.color)?u.color[s]:u.color,f.mlw=za.isArrayOrTypedArray(u.width)?u.width[s]:u.width);var d=v&&v.gradient;d&&d.type!=="none"&&(f.mgt=Array.isArray(d.type)?d.type[s]:d.type,f.mgc=Array.isArray(d.color)?d.color[s]:d.color);var h=i.c2p(f.x,!0),p=n.c2p(f.y,!0),g=f.mrc||1,_=a.hoverlabel;_&&(f.hbg=Array.isArray(_.bgcolor)?_.bgcolor[s]:_.bgcolor,f.hbc=Array.isArray(_.bordercolor)?_.bordercolor[s]:_.bordercolor,f.hts=za.isArrayOrTypedArray(_.font.size)?_.font.size[s]:_.font.size,f.htc=Array.isArray(_.font.color)?_.font.color[s]:_.font.color,f.htf=Array.isArray(_.font.family)?_.font.family[s]:_.font.family,f.hnl=za.isArrayOrTypedArray(_.namelength)?_.namelength[s]:_.namelength);var b=a.hoverinfo;b&&(f.hi=Array.isArray(b)?b[s]:b);var w=a.hovertemplate;w&&(f.ht=Array.isArray(w)?w[s]:w);var m={};m[t.index]=f;var y=a._origX,x=a._origY,T=za.extendFlat({},t,{color:JF(a,f),x0:h-g,x1:h+g,xLabelVal:y?y[s]:f.x,y0:p-g,y1:p+g,yLabelVal:x?x[s]:f.y,cd:m,distance:o,spikeDistance:l,hovertemplate:f.ht});return f.htx?T.text=f.htx:f.tx?T.text=f.tx:a.text&&(T.text=a.text),za.fillText(f,a,T),QF.getComponentMethod("errorbars","hoverInfo")(f,a,T),T}var t4={hoverPoints:e4,calcHover:g2},sp={exports:{}},Q0=20,wc={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:Q0,SYMBOL_STROKE:Q0/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}},r4=Ba,Xt=To,J0=bo.axisHoverFormat,eb=hn,a4=Ud,bv=er.extendFlat,i4=Li.overrideAll,n4=wc.DASHES,tb=Xt.line,pi=Xt.marker,o4=pi.line,Xn=sp.exports=i4({x:Xt.x,x0:Xt.x0,dx:Xt.dx,y:Xt.y,y0:Xt.y0,dy:Xt.dy,xperiod:Xt.xperiod,yperiod:Xt.yperiod,xperiod0:Xt.xperiod0,yperiod0:Xt.yperiod0,xperiodalignment:Xt.xperiodalignment,yperiodalignment:Xt.yperiodalignment,xhoverformat:J0("x"),yhoverformat:J0("y"),text:Xt.text,hovertext:Xt.hovertext,textposition:Xt.textposition,textfont:Xt.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],description:["Determines the drawing mode for this scatter trace."].join(" ")},line:{color:tb.color,width:tb.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot",description:["Determines the line shape.","The values correspond to step-wise line shapes."].join(" ")},dash:{valType:"enumerated",values:a4(n4),dflt:"solid",description:"Sets the style of the lines."}},marker:bv({},eb("marker"),{symbol:pi.symbol,size:pi.size,sizeref:pi.sizeref,sizemin:pi.sizemin,sizemode:pi.sizemode,opacity:pi.opacity,colorbar:pi.colorbar,line:bv({},eb("marker.line"),{width:o4.width})}),connectgaps:Xt.connectgaps,fill:bv({},Xt.fill,{dflt:"none"}),fillcolor:Xt.fillcolor,selected:{marker:Xt.selected.marker,textfont:Xt.selected.textfont},unselected:{marker:Xt.unselected.marker,textfont:Xt.unselected.textfont},opacity:r4.opacity},"calc","nested");Xn.x.editType=Xn.y.editType=Xn.x0.editType=Xn.y0.editType="calc+clearAxisTypes";Xn.hovertemplate=Xt.hovertemplate;Xn.texttemplate=Xt.texttemplate;var Tc={},b2=wc;Tc.isOpenSymbol=function(t){return typeof t=="string"?b2.OPEN_RE.test(t):t%200>100};Tc.isDotSymbol=function(t){return typeof t=="string"?b2.DOT_RE.test(t):t>200};var rb=me.exports,l4=We,s4=Tc,f4=sp.exports,c4=uc,Ns=Rr,u4=Nh,v4=vc,d4=V_,h4=q_,p4=Y_,m4=X_,y4=function(e,r,a,i){function n(d,h){return rb.coerce(e,r,f4,d,h)}var o=e.marker?s4.isOpenSymbol(e.marker.symbol):!1,l=Ns.isBubble(e),s=u4(e,r,i,n);if(!s){r.visible=!1;return}v4(e,r,i,n),n("xhoverformat"),n("yhoverformat");var f=s<c4.PTS_LINESONLY?"lines+markers":"lines";n("text"),n("hovertext"),n("hovertemplate"),n("mode",f),Ns.hasLines(r)&&(n("connectgaps"),h4(e,r,a,i,n),n("line.shape")),Ns.hasMarkers(r)&&(d4(e,r,a,i,n),n("marker.line.width",o||l?1:0)),Ns.hasText(r)&&(n("texttemplate"),m4(e,r,i,n));var c=(r.line||{}).color,v=(r.marker||{}).color;n("fill"),r.fill!=="none"&&p4(e,r,a,n);var u=l4.getComponentMethod("errorbars","supplyDefaults");u(e,r,c||v||a,{axis:"y"}),u(e,r,c||v||a,{axis:"x",inherit:"y"}),rb.coerceSelectionMarkerOpacity(r,n)},g4=sw,b4=function(e,r,a){var i=e.i;return"x"in e||(e.x=r._x[i]),"y"in e||(e.y=r._y[i]),g4(e,r,a)},x2=gt,x4=ca.exports,Nf=Vb,Ff=eo,_4=Er.defaultLine,ab=Ur.isArrayOrTypedArray,Ld=Nf(_4),_2=1;function ib(t,e){var r=t;return r[3]*=e,r}function nb(t){if(x2(t))return Ld;var e=Nf(t);return e.length?e:Ld}function ob(t){return x2(t)?t:_2}function w4(t,e,r){var a=t.color,i=ab(a),n=ab(e),o=Ff.extractOpts(t),l=[],s,f,c,v,u;if(o.colorscale!==void 0?s=Ff.makeColorScaleFuncFromTrace(t):s=nb,i?f=function(h,p){return h[p]===void 0?Ld:Nf(s(h[p]))}:f=nb,n?c=function(h,p){return h[p]===void 0?_2:ob(h[p])}:c=ob,i||n)for(var d=0;d<r;d++)v=f(a,d),u=c(e,d),l[d]=ib(v,u);else l=ib(Nf(a),e);return l}function T4(t){var e=Ff.extractOpts(t),r=e.colorscale;return e.reversescale&&(r=Ff.flipScale(e.colorscale)),r.map(function(a){var i=a[0],n=x4(a[1]),o=n.toRgb();return{index:i,rgb:[o.r,o.g,o.b,o.a]}})}var k4={formatColor:w4,parseColorScale:T4},of=gt,A4=q2,Fs=Vb,M4=We,Zr=me.exports,tl=Pt.exports,lb=ir,sb=k4.formatColor,Qn=Rr,S4=v1,Cd=Tc,Xl=wc,L4=$l.DESELECTDIM,fb={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},C4=ua.appendArrayPointValue;function D4(t,e){var r,a={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=t._context.plotGlPixelRatio;if(e.visible!==!0)return a;if(Qn.hasText(e)&&(a.text=w2(t,e),a.textSel=cb(t,e,e.selected),a.textUnsel=cb(t,e,e.unselected)),Qn.hasMarkers(e)&&(a.marker=fp(e),a.markerSel=Dd(e,e.selected),a.markerUnsel=Dd(e,e.unselected),!e.unselected&&Zr.isArrayOrTypedArray(e.marker.opacity))){var n=e.marker.opacity;for(a.markerUnsel.opacity=new Array(n.length),r=0;r<n.length;r++)a.markerUnsel.opacity[r]=L4*n[r]}if(Qn.hasLines(e)){a.line={overlay:!0,thickness:e.line.width*i,color:e.line.color,opacity:e.opacity};var o=(Xl.DASHES[e.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=e.line.width*i;a.line.dashes=o}return e.error_x&&e.error_x.visible&&(a.errorX=ub(e,e.error_x,i)),e.error_y&&e.error_y.visible&&(a.errorY=ub(e,e.error_y,i)),!!e.fill&&e.fill!=="none"&&(a.fill={closed:!0,fill:e.fillcolor,thickness:0}),a}function w2(t,e){var r=t._fullLayout,a=e._length,i=e.textfont,n=e.textposition,o=Array.isArray(n)?n:[n],l=i.color,s=i.size,f=i.family,c={},v,u=t._context.plotGlPixelRatio,d=e.texttemplate;if(d){c.text=[];var h=r._d3locale,p=Array.isArray(d),g=p?Math.min(d.length,a):a,_=p?function(k){return d[k]}:function(){return d};for(v=0;v<g;v++){var b={i:v},w=e._module.formatLabels(b,e,r),m={};C4(m,e,v);var y=e._meta||{};c.text.push(Zr.texttemplateString(_(v),w,h,m,b,y))}}else Array.isArray(e.text)&&e.text.length<a?c.text=e.text.slice():c.text=e.text;if(Array.isArray(c.text))for(v=c.text.length;v<a;v++)c.text[v]="";for(c.opacity=e.opacity,c.font={},c.align=[],c.baseline=[],v=0;v<o.length;v++){var x=o[v].split(/\s+/);switch(x[1]){case"left":c.align.push("right");break;case"right":c.align.push("left");break;default:c.align.push(x[1])}switch(x[0]){case"top":c.baseline.push("bottom");break;case"bottom":c.baseline.push("top");break;default:c.baseline.push(x[0])}}if(Array.isArray(l))for(c.color=new Array(a),v=0;v<a;v++)c.color[v]=l[v];else c.color=l;if(Zr.isArrayOrTypedArray(s)||Array.isArray(f))for(c.font=new Array(a),v=0;v<a;v++){var T=c.font[v]={};T.size=(Zr.isTypedArray(s)?s[v]:Array.isArray(s)?of(s[v])?s[v]:0:s)*u,T.family=Array.isArray(f)?f[v]:f}else c.font={size:s*u,family:f};return c}function fp(t){var e=t._length,r=t.marker,a={},i,n=Zr.isArrayOrTypedArray(r.symbol),o=Zr.isArrayOrTypedArray(r.color),l=Zr.isArrayOrTypedArray(r.line.color),s=Zr.isArrayOrTypedArray(r.opacity),f=Zr.isArrayOrTypedArray(r.size),c=Zr.isArrayOrTypedArray(r.line.width),v;if(n||(v=Cd.isOpenSymbol(r.symbol)),n||o||l||s){a.colors=new Array(e),a.borderColors=new Array(e);var u=sb(r,r.opacity,e),d=sb(r.line,r.opacity,e);if(!Array.isArray(d[0])){var h=d;for(d=Array(e),i=0;i<e;i++)d[i]=h}if(!Array.isArray(u[0])){var p=u;for(u=Array(e),i=0;i<e;i++)u[i]=p}for(a.colors=u,a.borderColors=d,i=0;i<e;i++){if(n){var g=r.symbol[i];v=Cd.isOpenSymbol(g)}v&&(d[i]=u[i].slice(),u[i]=u[i].slice(),u[i][3]=0)}a.opacity=t.opacity}else v?(a.color=Fs(r.color,"uint8"),a.color[3]=0,a.borderColor=Fs(r.color,"uint8")):(a.color=Fs(r.color,"uint8"),a.borderColor=Fs(r.line.color,"uint8")),a.opacity=t.opacity*r.opacity;if(n)for(a.markers=new Array(e),i=0;i<e;i++)a.markers[i]=hb(r.symbol[i]);else a.marker=hb(r.symbol);var _=1,b=S4(t,_),w;if(f||c){var m=a.sizes=new Array(e),y=a.borderSizes=new Array(e),x=0,T;if(f){for(i=0;i<e;i++)m[i]=b(r.size[i]),x+=m[i];T=x/e}else for(w=b(r.size),i=0;i<e;i++)m[i]=w;if(c)for(i=0;i<e;i++)y[i]=r.line.width[i];else for(w=r.line.width,i=0;i<e;i++)y[i]=w;a.sizeAvg=T}else a.size=b(r&&r.size||10),a.borderSizes=b(r.line.width);return a}function Dd(t,e){var r=t.marker,a={};return e&&(e.marker&&e.marker.symbol?a=fp(Zr.extendFlat({},r,e.marker)):e.marker&&(e.marker.size&&(a.size=e.marker.size),e.marker.color&&(a.colors=e.marker.color),e.marker.opacity!==void 0&&(a.opacity=e.marker.opacity))),a}function cb(t,e,r){var a={};if(!r)return a;if(r.textfont){var i={opacity:1,text:e.text,texttemplate:e.texttemplate,textposition:e.textposition,textfont:Zr.extendFlat({},e.textfont)};r.textfont&&Zr.extendFlat(i.textfont,r.textfont),a=w2(t,i)}return a}function ub(t,e,r){var a={capSize:e.width*2*r,lineWidth:e.thickness*r,color:e.color};return e.copy_ystyle&&(a=t.error_y),a}var vb=Xl.SYMBOL_SDF_SIZE,Vi=Xl.SYMBOL_SIZE,db=Xl.SYMBOL_STROKE,xv={},E4=tl.symbolFuncs[0](Vi*.05);function hb(t){if(t==="circle")return null;var e,r,a=tl.symbolNumber(t),i=tl.symbolFuncs[a%100],n=!!tl.symbolNoDot[a%100],o=!!tl.symbolNoFill[a%100],l=Cd.isDotSymbol(t);return xv[t]?xv[t]:(l&&!n?e=i(Vi*1.1)+E4:e=i(Vi),r=A4(e,{w:vb,h:vb,viewBox:[-Vi,-Vi,Vi,Vi],stroke:o?db:-db}),xv[t]=r,r||null)}function $4(t,e,r){var a=r.length,i=a/2,n,o;if(Qn.hasLines(e)&&i)if(e.line.shape==="hv"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2+2],r[o*2+1]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else if(e.line.shape==="hvh"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var l=(r[o*2]+r[o*2+2])/2;n.push(r[o*2],r[o*2+1],l,r[o*2+1],l,r[o*2+3])}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vhv"){for(n=[],o=0;o<i-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?n.push(r[o*2],r[o*2+1]):n.push(NaN,NaN),n.push(NaN,NaN);else{var s=(r[o*2+1]+r[o*2+3])/2;n.push(r[o*2],r[o*2+1],r[o*2],s,r[o*2+2],s)}n.push(r[a-2],r[a-1])}else if(e.line.shape==="vh"){for(n=[],o=0;o<i-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?n.push(r[o*2],r[o*2+3]):n.push(NaN,NaN));n.push(r[a-2],r[a-1])}else n=r;var f=!1;for(o=0;o<n.length;o++)if(isNaN(n[o])){f=!0;break}var c=f||n.length>Xl.TOO_MANY_POINTS||Qn.hasMarkers(e)?"rect":"round";if(f&&e.connectgaps){var v=n[0],u=n[1];for(o=0;o<n.length;o+=2)isNaN(n[o])||isNaN(n[o+1])?(n[o]=v,n[o+1]=u):(v=n[o],u=n[o+1])}return{join:c,positions:n}}function R4(t,e,r,a,i){var n=M4.getComponentMethod("errorbars","makeComputeError"),o=lb.getFromId(t,e.xaxis),l=lb.getFromId(t,e.yaxis),s=r.length/2,f={};function c(v,u){var d=u._id.charAt(0),h=e["error_"+d];if(h&&h.visible&&(u.type==="linear"||u.type==="log")){for(var p=n(h),g={x:0,y:1}[d],_={x:[0,1,2,3],y:[2,3,0,1]}[d],b=new Float64Array(4*s),w=1/0,m=-1/0,y=0,x=0;y<s;y++,x+=4){var T=v[y];if(of(T)){var k=r[y*2+g],S=p(T,y),A=S[0],E=S[1];if(of(A)&&of(E)){var M=T-A,D=T+E;b[x+_[0]]=k-u.c2l(M),b[x+_[1]]=u.c2l(D)-k,b[x+_[2]]=0,b[x+_[3]]=0,w=Math.min(w,T-A),m=Math.max(m,T+E)}}}f[d]={positions:r,errors:b,_bnds:[w,m]}}}return c(a,o),c(i,l),f}function P4(t,e,r,a){var i=e._length,n={},o;if(Qn.hasMarkers(e)){var l=r.font,s=r.align,f=r.baseline;for(n.offset=new Array(i),o=0;o<i;o++){var c=a.sizes?a.sizes[o]:a.size,v=Array.isArray(l)?l[o].size:l.size,u=Array.isArray(s)?s.length>1?s[o]:s[0]:s,d=Array.isArray(f)?f.length>1?f[o]:f[0]:f,h=fb[u],p=fb[d],g=c?c/.8+1:0,_=-p*g-p*.5;n.offset[o]=[h*g/v,_/v]}}return n}var z4={style:D4,markerStyle:fp,markerSelection:Dd,linePositions:$4,errorBarPositions:R4,textPosition:P4},Hs=me.exports,I4=function(e,r){var a=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},n={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(a=r._scene={},a.init=function(){Hs.extendFlat(a,n,i)},a.init(),a.update=function(l){var s=Hs.repeat(l,a.count);if(a.fill2d&&a.fill2d.update(s),a.scatter2d&&a.scatter2d.update(s),a.line2d&&a.line2d.update(s),a.error2d&&a.error2d.update(s.concat(s)),a.select2d&&a.select2d.update(s),a.glText)for(var f=0;f<a.count;f++)a.glText[f].update(l)},a.draw=function(){for(var l=a.count,s=a.fill2d,f=a.error2d,c=a.line2d,v=a.scatter2d,u=a.glText,d=a.select2d,h=a.selectBatch,p=a.unselectBatch,g=0;g<l;g++){if(s&&a.fillOrder[g]&&s.draw(a.fillOrder[g]),c&&a.lineOptions[g]&&c.draw(g),f&&(a.errorXOptions[g]&&f.draw(g),a.errorYOptions[g]&&f.draw(g+l)),v&&a.markerOptions[g])if(p[g].length){var _=Hs.repeat([],a.count);_[g]=p[g],v.draw(_)}else h[g].length||v.draw(g);u[g]&&a.textOptions[g]&&u[g].render()}d&&d.draw(h),a.dirty=!1},a.destroy=function(){a.fill2d&&a.fill2d.destroy&&a.fill2d.destroy(),a.scatter2d&&a.scatter2d.destroy&&a.scatter2d.destroy(),a.error2d&&a.error2d.destroy&&a.error2d.destroy(),a.line2d&&a.line2d.destroy&&a.line2d.destroy(),a.select2d&&a.select2d.destroy&&a.select2d.destroy(),a.glText&&a.glText.forEach(function(l){l.destroy&&l.destroy()}),a.lineOptions=null,a.fillOptions=null,a.markerOptions=null,a.markerSelectedOptions=null,a.markerUnselectedOptions=null,a.errorXOptions=null,a.errorYOptions=null,a.textOptions=null,a.textSelectedOptions=null,a.textUnselectedOptions=null,a.selectBatch=null,a.unselectBatch=null,r._scene=null}),a.dirty||Hs.extendFlat(a,i),a},N4=X2.exports,Pn=me.exports,pb=ir,F4=Fl.findExtremes,mb=dc,cp=Hh,H4=cp.calcMarkerSize,O4=cp.calcAxisExpansion,B4=cp.setFirstScatter,j4=K_,zn=z4,G4=I4,yb=Jt.BADNUM,U4=wc.TOO_MANY_POINTS,V4=function(e,r){var a=e._fullLayout,i=pb.getFromId(e,r.xaxis),n=pb.getFromId(e,r.yaxis),o=a._plots[r.xaxis+r.yaxis],l=r._length,s=l>=U4,f=l*2,c={},v,u=i.makeCalcdata(r,"x"),d=n.makeCalcdata(r,"y"),h=mb(r,i,"x",u),p=mb(r,n,"y",d),g=h.vals,_=p.vals;r._x=g,r._y=_,r.xperiodalignment&&(r._origX=u,r._xStarts=h.starts,r._xEnds=h.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=p.starts,r._yEnds=p.ends);var b=new Array(f),w=new Array(l);for(v=0;v<l;v++)b[v*2]=g[v]===yb?NaN:g[v],b[v*2+1]=_[v]===yb?NaN:_[v],w[v]=v;if(i.type==="log")for(v=0;v<f;v+=2)b[v]=i.c2l(b[v]);if(n.type==="log")for(v=1;v<f;v+=2)b[v]=n.c2l(b[v]);s&&i.type!=="log"&&n.type!=="log"?c.tree=N4(b):c.ids=w,j4(e,r);var m=q4(e,o,r,b,g,_),y=G4(e,o);B4(a,r);var x;return s?m.marker&&(x=m.marker.sizeAvg||Math.max(m.marker.size,3)):x=H4(r,l),O4(e,r,i,n,g,_,x),m.errorX&&gb(r,i,m.errorX),m.errorY&&gb(r,n,m.errorY),m.fill&&!y.fill2d&&(y.fill2d=!0),m.marker&&!y.scatter2d&&(y.scatter2d=!0),m.line&&!y.line2d&&(y.line2d=!0),(m.errorX||m.errorY)&&!y.error2d&&(y.error2d=!0),m.text&&!y.glText&&(y.glText=!0),m.marker&&(m.marker.snap=l),y.lineOptions.push(m.line),y.errorXOptions.push(m.errorX),y.errorYOptions.push(m.errorY),y.fillOptions.push(m.fill),y.markerOptions.push(m.marker),y.markerSelectedOptions.push(m.markerSel),y.markerUnselectedOptions.push(m.markerUnsel),y.textOptions.push(m.text),y.textSelectedOptions.push(m.textSel),y.textUnselectedOptions.push(m.textUnsel),y.selectBatch.push([]),y.unselectBatch.push([]),c._scene=y,c.index=y.count,c.x=g,c.y=_,c.positions=b,y.count++,[{x:!1,y:!1,t:c,trace:r}]};function gb(t,e,r){var a=t._extremes[e._id],i=F4(e,r._bnds,{padded:!0});a.min=a.min.concat(i.min),a.max=a.max.concat(i.max)}function q4(t,e,r,a,i,n){var o=zn.style(t,r);if(o.marker&&(o.marker.positions=a),o.line&&a.length>1&&Pn.extendFlat(o.line,zn.linePositions(t,r,a)),o.errorX||o.errorY){var l=zn.errorBarPositions(t,r,a,i,n);o.errorX&&Pn.extendFlat(o.errorX,l.x),o.errorY&&Pn.extendFlat(o.errorY,l.y)}return o.text&&(Pn.extendFlat(o.text,{positions:a},zn.textPosition(t,r,o.text,o.marker)),Pn.extendFlat(o.textSel,{positions:a},zn.textPosition(t,r,o.text,o.markerSel)),Pn.extendFlat(o.textUnsel,{positions:a},zn.textPosition(t,r,o.text,o.markerUnsel))),o}var X4=me.exports,Y4=ft.exports,W4=$l.DESELECTDIM;function Z4(t){var e=t[0],r=e.trace,a=e.t,i=a._scene,n=a.index,o=i.selectBatch[n],l=i.unselectBatch[n],s=i.textOptions[n],f=i.textSelectedOptions[n]||{},c=i.textUnselectedOptions[n]||{},v=X4.extendFlat({},s),u,d;if(o.length||l.length){var h=f.color,p=c.color,g=s.color,_=Array.isArray(g);for(v.color=new Array(r._length),u=0;u<o.length;u++)d=o[u],v.color[d]=h||(_?g[d]:g);for(u=0;u<l.length;u++){d=l[u];var b=_?g[d]:g;v.color[d]=p||(h?b:Y4.addOpacity(b,W4))}}i.glText[n].update(v)}var T2={styleTextSelection:Z4},bb=Rr,K4=T2.styleTextSelection,Q4=function(e,r){var a=e.cd,i=e.xaxis,n=e.yaxis,o=[],l=a[0].trace,s=a[0].t,f=l._length,c=s.x,v=s.y,u=s._scene,d=s.index;if(!u)return o;var h=bb.hasText(l),p=bb.hasMarkers(l),g=!p&&!h;if(l.visible!==!0||g)return o;var _=[],b=[];if(r!==!1&&!r.degenerate)for(var w=0;w<f;w++)r.contains([s.xpx[w],s.ypx[w]],!1,w,e)?(_.push(w),o.push({pointNumber:w,x:i.c2d(c[w]),y:n.c2d(v[w])})):b.push(w);if(p){var m=u.scatter2d;if(!_.length&&!b.length){var y=new Array(u.count);y[d]=u.markerOptions[d],m.update.apply(m,y)}else if(!u.selectBatch[d].length&&!u.unselectBatch[d].length){var x=new Array(u.count);x[d]=u.markerUnselectedOptions[d],m.update.apply(m,x)}}return u.selectBatch[d]=_,u.unselectBatch[d]=b,h&&K4(a),o},J4=t4,e6={moduleType:"trace",name:"scattergl",basePlotModule:sr,categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:sp.exports,supplyDefaults:y4,crossTraceDefaults:W_,colorbar:jl,formatLabels:b4,calc:V4,hoverPoints:J4.hoverPoints,selectPoints:Q4,meta:{hrName:"scatter_gl",description:["The data visualized as scatter point or lines is set in `x` and `y`","using the WebGL plotting engine.","Bubble charts are achieved by setting `marker.size` and/or `marker.color`","to a numerical arrays."].join(" ")}},k2={exports:{}},xb=ft.exports,t6=function(){},r6=function(e){for(var r in e)typeof e[r]=="function"&&(e[r]=t6);e.destroy=function(){e.container.parentNode.removeChild(e.container)};var a=document.createElement("div");a.className="no-webgl",a.style.cursor="pointer",a.style.fontSize="24px",a.style.color=xb.defaults[0],a.style.position="absolute",a.style.left=a.style.top="0px",a.style.width=a.style.height="100%",a.style["background-color"]=xb.lightLine,a.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",a.appendChild(i),e.container.appendChild(a),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("https://get.webgl.org")},!1},a6=r6,i6=Y2.exports,n6=function(e,r,a){var i=e._fullLayout,n=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(a);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=i6({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||tk.devicePixelRatio,extensions:r||[],cachedCode:a||{}})}catch{n=!1}o.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(l){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:l,layer:o.key})},!1)}}),n||a6({container:i._glcontainer.node()}),n},_b=W2,wb=Z2,o6=K2,Tb=Q2,_v=me.exports,l6=_o.selectMode,s6=n6,f6=Rr,c6=ow,u6=T2.styleTextSelection,A2={};function v6(t,e,r,a){var i=t._size,n=t.width*a,o=t.height*a,l=i.l*a,s=i.b*a,f=i.r*a,c=i.t*a,v=i.w*a,u=i.h*a;return[l+e.domain[0]*v,s+r.domain[0]*u,n-f-(1-e.domain[1])*v,o-c-(1-r.domain[1])*u]}var d6=k2.exports=function(e,r,a){if(!!a.length){var i=e._fullLayout,n=r._scene,o=r.xaxis,l=r.yaxis,s,f;if(!!n){var c=s6(e,["ANGLE_instanced_arrays","OES_element_index_uint"],A2);if(!c){n.init();return}var v=n.count,u=i._glcanvas.data()[0].regl;if(c6(e,r,a),n.dirty){if(n.error2d===!0&&(n.error2d=o6(u)),n.line2d===!0&&(n.line2d=wb(u)),n.scatter2d===!0&&(n.scatter2d=_b(u)),n.fill2d===!0&&(n.fill2d=wb(u)),n.glText===!0)for(n.glText=new Array(v),s=0;s<v;s++)n.glText[s]=new Tb(u);if(n.glText){if(v>n.glText.length){var d=v-n.glText.length;for(s=0;s<d;s++)n.glText.push(new Tb(u))}else if(v<n.glText.length){var h=n.glText.length-v,p=n.glText.splice(v,h);p.forEach(function(C){C.destroy()})}for(s=0;s<v;s++)n.glText[s].update(n.textOptions[s])}if(n.line2d&&(n.line2d.update(n.lineOptions),n.lineOptions=n.lineOptions.map(function(C){if(C&&C.positions){for(var z=C.positions,F=0;F<z.length&&(isNaN(z[F])||isNaN(z[F+1]));)F+=2;for(var H=z.length-2;H>F&&(isNaN(z[H])||isNaN(z[H+1]));)H-=2;C.positions=z.slice(F,H+2)}return C}),n.line2d.update(n.lineOptions)),n.error2d){var g=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(g)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=_v.repeat(null,v),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(C,z){var F=a[z];if(!(!C||!F||!F[0]||!F[0].trace)){var H=F[0],B=H.trace,O=H.t,W=n.lineOptions[z],j,Z,K=[];B._ownfill&&K.push(z),B._nexttrace&&K.push(z+1),K.length&&(n.fillOrder[z]=K);var Q=[],ee=W&&W.positions||O.positions,ne,le;if(B.fill==="tozeroy"){for(ne=0;ne<ee.length&&isNaN(ee[ne+1]);)ne+=2;for(le=ee.length-2;le>ne&&isNaN(ee[le+1]);)le-=2;ee[ne+1]!==0&&(Q=[ee[ne],0]),Q=Q.concat(ee.slice(ne,le+2)),ee[le+1]!==0&&(Q=Q.concat([ee[le],0]))}else if(B.fill==="tozerox"){for(ne=0;ne<ee.length&&isNaN(ee[ne]);)ne+=2;for(le=ee.length-2;le>ne&&isNaN(ee[le]);)le-=2;ee[ne]!==0&&(Q=[0,ee[ne+1]]),Q=Q.concat(ee.slice(ne,le+2)),ee[le]!==0&&(Q=Q.concat([0,ee[le+1]]))}else if(B.fill==="toself"||B.fill==="tonext"){for(Q=[],j=0,C.splitNull=!0,Z=0;Z<ee.length;Z+=2)(isNaN(ee[Z])||isNaN(ee[Z+1]))&&(Q=Q.concat(ee.slice(j,Z)),Q.push(ee[j],ee[j+1]),Q.push(null,null),j=Z+2);Q=Q.concat(ee.slice(j)),j&&Q.push(ee[j],ee[j+1])}else{var se=B._nexttrace;if(se){var oe=n.lineOptions[z+1];if(oe){var V=oe.positions;if(B.fill==="tonexty"){for(Q=ee.slice(),z=Math.floor(V.length/2);z--;){var ie=V[z*2],ge=V[z*2+1];isNaN(ie)||isNaN(ge)||Q.push(ie,ge)}C.fill=se.fillcolor}}}}if(B._prevtrace&&B._prevtrace.fill==="tonext"){var de=n.lineOptions[z-1].positions,ke=Q.length/2;j=ke;var ue=[j];for(Z=0;Z<de.length;Z+=2)(isNaN(de[Z])||isNaN(de[Z+1]))&&(ue.push(Z/2+ke+1),j=Z+2);Q=Q.concat(de),C.hole=ue}return C.fillmode=B.fill,C.opacity=B.opacity,C.positions=Q,C}}),n.fill2d.update(n.fillOptions))}var _=i.dragmode,b=l6(_),w=i.clickmode.indexOf("select")>-1;for(s=0;s<v;s++){var m=a[s][0],y=m.trace,x=m.t,T=x.index,k=y._length,S=x.x,A=x.y;if(y.selectedpoints||b||w){if(b||(b=!0),y.selectedpoints){var E=n.selectBatch[T]=_v.selIndices2selPoints(y),M={};for(f=0;f<E.length;f++)M[E[f]]=1;var D=[];for(f=0;f<k;f++)M[f]||D.push(f);n.unselectBatch[T]=D}var $=x.xpx=new Array(k),I=x.ypx=new Array(k);for(f=0;f<k;f++)$[f]=o.c2p(S[f]),I[f]=l.c2p(A[f])}else x.xpx=x.ypx=null}if(b){if(n.select2d||(n.select2d=_b(i._glcanvas.data()[1].regl)),n.scatter2d){var P=new Array(v);for(s=0;s<v;s++)P[s]=n.selectBatch[s].length||n.unselectBatch[s].length?n.markerUnselectedOptions[s]:{};n.scatter2d.update(P)}n.select2d&&(n.select2d.update(n.markerOptions),n.select2d.update(n.markerSelectedOptions)),n.glText&&a.forEach(function(C){var z=((C||[])[0]||{}).trace||{};f6.hasText(z)&&u6(C)})}else n.scatter2d&&n.scatter2d.update(n.markerOptions);var R={viewport:v6(i,o,l,e._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(l._rl||l.range)[0],(o._rl||o.range)[1],(l._rl||l.range)[1]]},L=_v.repeat(R,n.count);n.fill2d&&n.fill2d.update(L),n.line2d&&n.line2d.update(L),n.error2d&&n.error2d.update(L.concat(L)),n.scatter2d&&n.scatter2d.update(L),n.select2d&&n.select2d.update(L),n.glText&&n.glText.forEach(function(C){C.update(R)})}}};d6.reglPrecompiled=A2;var M2=e6;M2.plot=k2.exports;var h6=M2;(function(t){t.exports=h6})(y2);const S8=Ai(y2.exports);var S2={exports:{}},L2={};(function(t){var e=ar.exports;t.name="treemap",t.plot=function(r,a,i,n){e.plotBasePlot(t.name,r,a,i,n)},t.clean=function(r,a,i,n){e.cleanBasePlot(t.name,r,a,i,n)}})(L2);var C2={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]},p6=Ba,m6=qr.hovertemplateAttrs,y6=qr.texttemplateAttrs,g6=hn,b6=Ei.attributes,Xa=xc,kb=C2,Xo=er.extendFlat,x6={labels:{valType:"data_array",editType:"calc",description:["Sets the labels of each of the sectors."].join(" ")},parents:{valType:"data_array",editType:"calc",description:["Sets the parent sectors for each of the sectors.","Empty string items '' are understood to reference","the root node in the hierarchy.",'If `ids` is filled, `parents` items are understood to be "ids" themselves.',"When `ids` is not set, plotly attempts to find matching items in `labels`,","but beware they must be unique."].join(" ")},values:{valType:"data_array",editType:"calc",description:["Sets the values associated with each of the sectors.","Use with `branchvalues` to determine how the values are summed."].join(" ")},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc",description:["Determines how the items in `values` are summed.","When set to *total*, items in `values` are taken to be value of all its descendants.","When set to *remainder*, items in `values` corresponding to the root and the branches sectors","are taken to be the extra part not part of the sum of the values at their leaves."].join(" ")},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc",description:["Determines default for `values` when it is not provided,","by inferring a 1 for each of the *leaves* and/or *branches*, otherwise 0."].join(" ")},level:{valType:"any",editType:"plot",anim:!0,description:["Sets the level from which this trace hierarchy is rendered.","Set `level` to `''` to start from the root node in the hierarchy.",'Must be an "id" if `ids` is filled in, otherwise plotly attempts to find a matching',"item in `labels`."].join(" ")},maxdepth:{valType:"integer",editType:"plot",dflt:-1,description:["Sets the number of rendered sectors from any given `level`.","Set `maxdepth` to *-1* to render all the levels in the hierarchy."].join(" ")},marker:Xo({colors:{valType:"data_array",editType:"calc",description:["Sets the color of each sector of this trace.","If not specified, the default trace color set is used","to pick the sector colors."].join(" ")},line:{color:Xo({},Xa.marker.line.color,{dflt:null,description:["Sets the color of the line enclosing each sector.","Defaults to the `paper_bgcolor` value."].join(" ")}),width:Xo({},Xa.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},g6("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1,description:["Sets the opacity of the leaves. With colorscale","it is defaulted to 1; otherwise it is defaulted to 0.7"].join(" ")},editType:"plot"},text:Xa.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot",description:["Determines which trace information appear on the graph."].join(" ")},texttemplate:y6({editType:"plot"},{keys:kb.eventDataKeys.concat(["label","value"])}),hovertext:Xa.hovertext,hoverinfo:Xo({},p6.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:m6({},{keys:kb.eventDataKeys}),textfont:Xa.textfont,insidetextorientation:Xa.insidetextorientation,insidetextfont:Xa.insidetextfont,outsidetextfont:Xo({},Xa.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented at the center of a sunburst graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),rotation:{valType:"angle",dflt:0,editType:"plot",description:["Rotates the whole diagram counterclockwise by some angle.","By default the first slice starts at 3 o'clock."].join(" ")},sort:Xa.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)",description:["sets the color of the root node for a sunburst/treemap/icicle trace.","this has no effect when a colorscale is used to set the markers."].join(" ")},editType:"calc"},domain:b6({name:"sunburst",trace:!0,editType:"calc"})},kc={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1},_6=qr.hovertemplateAttrs,w6=qr.texttemplateAttrs,T6=hn,k6=Ei.attributes,Bi=xc,ta=x6,Ab=kc,wv=er.extendFlat,D2={labels:ta.labels,parents:ta.parents,values:ta.values,branchvalues:ta.branchvalues,count:ta.count,level:ta.level,maxdepth:ta.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot",description:["Determines d3 treemap solver.","For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling"].join(" ")},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot",description:["When using *squarify* `packing` algorithm, according to https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio","this option specifies the desired aspect ratio of the generated rectangles.","The ratio must be specified as a number greater than or equal to one.","Note that the orientation of the generated rectangles (tall or wide)","is not implied by the ratio; for example, a ratio of two will attempt","to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2.","When using *squarify*, unlike d3 which uses the Golden Ratio i.e. 1.618034,","Plotly applies 1 to increase squares in treemap layouts."].join(" ")},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot",description:["Determines if the positions obtained from solver are flipped on each axis."].join(" ")},pad:{valType:"number",min:0,dflt:3,editType:"plot",description:["Sets the inner padding (in px)."].join(" ")},editType:"calc"},marker:wv({pad:{t:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the top (in px)."].join(" ")},l:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the left (in px)."].join(" ")},r:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the right (in px)."].join(" ")},b:{valType:"number",min:0,editType:"plot",description:["Sets the padding form the bottom (in px)."].join(" ")},editType:"calc"},colors:ta.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style",description:["Determines if the sector colors are faded towards","the background from the leaves up to the headers.","This option is unavailable when a `colorscale` is present,","defaults to false when `marker.colors` is set,","but otherwise defaults to true.","When set to *reversed*, the fading direction is inverted,","that is the top elements within hierarchy are drawn with fully saturated colors","while the leaves are faded towards the background color."].join(" ")},line:ta.marker.line,editType:"calc"},T6("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot",description:["Determines if the path bar is drawn","i.e. outside the trace `domain` and","with one pixel gap."].join(" ")},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot",description:["Determines on which side of the the treemap the","`pathbar` should be presented."].join(" ")},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot",description:["Determines which shape is used for edges between `barpath` labels."].join(" ")},thickness:{valType:"number",min:12,editType:"plot",description:["Sets the thickness of `pathbar` (in px). If not specified the `pathbar.textfont.size` is used","with 3 pixles extra padding on each side."].join(" ")},textfont:wv({},Bi.textfont,{description:"Sets the font used inside `pathbar`."}),editType:"calc"},text:Bi.text,textinfo:ta.textinfo,texttemplate:w6({editType:"plot"},{keys:Ab.eventDataKeys.concat(["label","value"])}),hovertext:Bi.hovertext,hoverinfo:ta.hoverinfo,hovertemplate:_6({},{keys:Ab.eventDataKeys}),textfont:Bi.textfont,insidetextfont:Bi.insidetextfont,outsidetextfont:wv({},Bi.outsidetextfont,{description:["Sets the font used for `textinfo` lying outside the sector.","This option refers to the root of the hierarchy","presented on top left corner of a treemap graph.","Please note that if a hierarchy has multiple root nodes,","this option won't have any effect and `insidetextfont` would be used."].join(" ")}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot",description:["Sets the positions of the `text` elements."].join(" ")},sort:Bi.sort,root:ta.root,domain:k6({name:"treemap",trace:!0,editType:"calc"})},E2={treemapcolorway:{valType:"colorlist",editType:"calc",description:["Sets the default treemap slice colors. Defaults to the main","`colorway` used for trace colors. If you specify a new","list here it can still be extended with lighter and darker","colors, see `extendtreemapcolors`."].join(" ")},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc",description:["If `true`, the treemap slice colors (whether given by `treemapcolorway` or","inherited from `colorway`) will be extended to three times its","original length by first repeating every color 20% lighter then","each color 20% darker. This is intended to reduce the likelihood","of reusing the same color when you have many slices, but you can","set `false` to disable.","Colors provided in the trace, using `marker.colors`, are never","extended."].join(" ")}},A6=me.exports,M6=D2,S6=ft.exports,L6=Ei.defaults,C6=fo.handleText,D6=Ul.TEXTPAD,$2=eo,E6=$2.hasColorscale,$6=$2.handleDefaults,R6=function(e,r,a,i){function n(b,w){return A6.coerce(e,r,M6,b,w)}var o=n("labels"),l=n("parents");if(!o||!o.length||!l||!l.length){r.visible=!1;return}var s=n("values");s&&s.length?n("branchvalues"):n("count"),n("level"),n("maxdepth");var f=n("tiling.packing");f==="squarify"&&n("tiling.squarifyratio"),n("tiling.flip"),n("tiling.pad");var c=n("text");n("texttemplate"),r.texttemplate||n("textinfo",Array.isArray(c)?"text+label":"label"),n("hovertext"),n("hovertemplate");var v=n("pathbar.visible"),u="auto";C6(e,r,i,n,u,{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),n("textposition");var d=r.textposition.indexOf("bottom")!==-1,h=n("marker.line.width");h&&n("marker.line.color",i.paper_bgcolor);var p=n("marker.colors"),g=r._hasColorscale=E6(e,"marker","colors")||(e.marker||{}).coloraxis;g?$6(e,r,i,n,{prefix:"marker.",cLetter:"c"}):n("marker.depthfade",!(p||[]).length);var _=r.textfont.size*2;n("marker.pad.t",d?_/4:_),n("marker.pad.l",_/4),n("marker.pad.r",_/4),n("marker.pad.b",d?_:_/4),r._hovered={marker:{line:{width:2,color:S6.contrast(i.paper_bgcolor)}}},v&&(n("pathbar.thickness",r.pathbar.textfont.size+2*D6),n("pathbar.side"),n("pathbar.edgeshape")),n("sort"),n("root.color"),L6(r,i,n),r._length=null},P6=me.exports,z6=E2,I6=function(e,r){function a(i,n){return P6.coerce(e,r,z6,i,n)}a("treemapcolorway",r.colorway),a("extendtreemapcolors")},Hf={},R2={};(function(t){var e=$d,r=gt,a=me.exports,i=eo.makeColorScaleFuncFromTrace,n=zf.makePullColorFn,o=zf.generateExtendedColors,l=eo.calc,s=Jt.ALMOST_EQUAL,f={},c={},v={};t.calc=function(d,h){var p=d._fullLayout,g=h.ids,_=a.isArrayOrTypedArray(g),b=h.labels,w=h.parents,m=h.values,y=a.isArrayOrTypedArray(m),x=[],T={},k={},S=function(ee,ne){T[ee]?T[ee].push(ne):T[ee]=[ne],k[ne]=1},A=function(ee){return ee||typeof ee=="number"},E=function(ee){return!y||r(m[ee])&&m[ee]>=0},M,D,$;_?(M=Math.min(g.length,w.length),D=function(ee){return A(g[ee])&&E(ee)},$=function(ee){return String(g[ee])}):(M=Math.min(b.length,w.length),D=function(ee){return A(b[ee])&&E(ee)},$=function(ee){return String(b[ee])}),y&&(M=Math.min(M,m.length));for(var I=0;I<M;I++)if(D(I)){var P=$(I),R=A(w[I])?String(w[I]):"",L={i:I,id:P,pid:R,label:A(b[I])?String(b[I]):""};y&&(L.v=+m[I]),x.push(L),S(R,P)}if(T[""]){if(T[""].length>1){for(var F=a.randstr(),H=0;H<x.length;H++)x[H].pid===""&&(x[H].pid=F);x.unshift({hasMultipleRoots:!0,id:F,pid:"",label:""})}}else{var C=[],z;for(z in T)k[z]||C.push(z);if(C.length===1)z=C[0],x.unshift({hasImpliedRoot:!0,id:z,pid:"",label:z});else return a.warn(["Multiple implied roots, cannot build",h.type,"hierarchy of",h.name+".","These roots include:",C.join(", ")].join(" "))}var B;try{B=e.stratify().id(function(ee){return ee.id}).parentId(function(ee){return ee.pid})(x)}catch(ee){return a.warn(["Failed to build",h.type,"hierarchy of",h.name+".","Error:",ee.message].join(" "))}var O=e.hierarchy(B),W=!1;if(y)switch(h.branchvalues){case"remainder":O.sum(function(ee){return ee.data.v});break;case"total":O.each(function(ee){var ne=ee.data.data,le=ne.v;if(ee.children){var se=ee.children.reduce(function(oe,V){return oe+V.data.data.v},0);if((ne.hasImpliedRoot||ne.hasMultipleRoots)&&(le=se),le<se*s)return W=!0,a.warn(["Total value for node",ee.data.data.id,"of",h.name,"is smaller than the sum of its children.",`
|
|
5
|
-
parent value =`,le,`
|
|
6
|
-
children sum =`,se].join(" "))}ee.value=le});break}else u(O,h,{branches:h.count.indexOf("branches")!==-1,leaves:h.count.indexOf("leaves")!==-1});if(!W){h.sort&&O.sort(function(ee,ne){return ne.value-ee.value});var j,Z,K=h.marker.colors||[],Q=!!K.length;return h._hasColorscale?(Q||(K=y?h.values:h._values),l(d,h,{vals:K,containerStr:"marker",cLetter:"c"}),Z=i(h.marker)):j=n(p["_"+h.type+"colormap"]),O.each(function(ee){var ne=ee.data.data;ne.color=h._hasColorscale?Z(K[ne.i]):j(K[ne.i],ne.id)}),x[0].hierarchy=O,x}},t._runCrossTraceCalc=function(d,h){var p=h._fullLayout,g=h.calcdata,_=p[d+"colorway"],b=p["_"+d+"colormap"];p["extend"+d+"colors"]&&(_=o(_,d==="icicle"?v:d==="treemap"?c:f));var w=0,m;function y(S){var A=S.data.data,E=A.id;A.color===!1&&(b[E]?A.color=b[E]:S.parent?S.parent.parent?A.color=S.parent.data.data.color:(b[E]=A.color=_[w%_.length],w++):A.color=m)}for(var x=0;x<g.length;x++){var T=g[x],k=T[0];k.trace.type===d&&k.hierarchy&&(m=k.trace.root.color,k.hierarchy.each(y))}},t.crossTraceCalc=function(d){return t._runCrossTraceCalc("sunburst",d)};function u(d,h,p){var g=0,_=d.children;if(_){for(var b=_.length,w=0;w<b;w++)g+=u(_[w],h,p);p.branches&&g++}else p.leaves&&g++;return d.value=d.data.data.value=g,h._values||(h._values=[]),h._values[d.data.data.i]=g,g}})(R2);var P2=R2;Hf.calc=function(t,e){return P2.calc(t,e)};Hf.crossTraceCalc=function(t){return P2._runCrossTraceCalc("treemap",t)};var $i={};(function(t){var e=me.exports,r=ft.exports,a=Di,i=pn;t.findEntryWithLevel=function(s,f){var c;return f&&s.eachAfter(function(v){if(t.getPtId(v)===f)return c=v.copy()}),c||s},t.findEntryWithChild=function(s,f){var c;return s.eachAfter(function(v){for(var u=v.children||[],d=0;d<u.length;d++){var h=u[d];if(t.getPtId(h)===f)return c=v.copy()}}),c||s},t.isEntry=function(s){return!s.parent},t.isLeaf=function(s){return!s.children},t.getPtId=function(s){return s.data.data.id},t.getPtLabel=function(s){return s.data.data.label},t.getValue=function(s){return s.value},t.isHierarchyRoot=function(s){return l(s)===""},t.setSliceCursor=function(s,f,c){var v=c.isTransitioning;if(!v){var u=s.datum();v=c.hideOnRoot&&t.isHierarchyRoot(u)||c.hideOnLeaves&&t.isLeaf(u)}a(s,v?null:"pointer")};function n(s,f,c){return{color:t.getOutsideTextFontKey("color",s,f,c),family:t.getOutsideTextFontKey("family",s,f,c),size:t.getOutsideTextFontKey("size",s,f,c)}}function o(s,f,c,v){var u=(v||{}).onPathbar,d=f.data.data,h=d.i,p=e.castOption(s,h,(u?"pathbar.textfont":"insidetextfont")+".color");return!p&&s._input.textfont&&(p=e.castOption(s._input,h,"textfont.color")),{color:p||r.contrast(d.color),family:t.getInsideTextFontKey("family",s,f,c,v),size:t.getInsideTextFontKey("size",s,f,c,v)}}t.getInsideTextFontKey=function(s,f,c,v,u){var d=(u||{}).onPathbar,h=d?"pathbar.textfont":"insidetextfont",p=c.data.data.i;return e.castOption(f,p,h+"."+s)||e.castOption(f,p,"textfont."+s)||v.size},t.getOutsideTextFontKey=function(s,f,c,v){var u=c.data.data.i;return e.castOption(f,u,"outsidetextfont."+s)||e.castOption(f,u,"textfont."+s)||v.size},t.isOutsideText=function(s,f){return!s._hasColorscale&&t.isHierarchyRoot(f)},t.determineTextFont=function(s,f,c,v){return t.isOutsideText(s,f)?n(s,f,c):o(s,f,c,v)},t.hasTransition=function(s){return!!(s&&s.duration>0)},t.getMaxDepth=function(s){return s.maxdepth>=0?s.maxdepth:1/0},t.isHeader=function(s,f){return!(t.isLeaf(s)||s.depth===f._maxDepth-1)};function l(s){return s.data.data.pid}t.getParent=function(s,f){return t.findEntryWithLevel(s,l(f))},t.listPath=function(s,f){var c=s.parent;if(!c)return[];var v=f?[c.data[f]]:[c];return t.listPath(c,f).concat(v)},t.getPath=function(s){return t.listPath(s,"label").join("/")+"/"},t.formatValue=i.formatPieValue,t.formatPercent=function(s,f){var c=e.formatPercent(s,0);return c==="0%"&&(c=i.formatPiePercent(s,f)),c}})($i);var N6=function t(e,r,a){var i;a.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),a.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),a.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var n=e.children;if(n)for(var o=0;o<n.length;o++)t(n[o],r,a)},Gn=$d,F6=N6,z2=function(e,r,a){var i=a.flipX,n=a.flipY,o=a.packing==="dice-slice",l=a.pad[n?"bottom":"top"],s=a.pad[i?"right":"left"],f=a.pad[i?"left":"right"],c=a.pad[n?"top":"bottom"],v;o&&(v=s,s=l,l=v,v=f,f=c,c=v);var u=Gn.treemap().tile(H6(a.packing,a.squarifyratio)).paddingInner(a.pad.inner).paddingLeft(s).paddingRight(f).paddingTop(l).paddingBottom(c).size(o?[r[1],r[0]]:r)(e);return(o||i||n)&&F6(u,r,{swapXY:o,flipX:i,flipY:n}),u};function H6(t,e){switch(t){case"squarify":return Gn.treemapSquarify.ratio(e);case"binary":return Gn.treemapBinary;case"dice":return Gn.treemapDice;case"slice":return Gn.treemapSlice;default:return Gn.treemapSliceDice}}var Mb=ct.exports,ji=ft.exports,Sb=me.exports,Tv=$i,O6=ni.resizeText;function B6(t){var e=t._fullLayout._treemaplayer.selectAll(".trace");O6(t,e,"treemap"),e.each(function(r){var a=Mb.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){Mb.select(this).call(I2,o,n,{hovered:!1})})})}function I2(t,e,r,a){var i=(a||{}).hovered,n=e.data.data,o=n.i,l,s,f=n.color,c=Tv.isHierarchyRoot(e),v=1;if(i)l=r._hovered.marker.line.color,s=r._hovered.marker.line.width;else if(c&&f===r.root.color)v=100,l="rgba(0,0,0,0)",s=0;else if(l=Sb.castOption(r,o,"marker.line.color")||ji.defaultLine,s=Sb.castOption(r,o,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var u=r.marker.depthfade;if(u){var d=ji.combine(ji.addOpacity(r._backgroundColor,.75),f),h;if(u===!0){var p=Tv.getMaxDepth(r);isFinite(p)?Tv.isLeaf(e)?h=0:h=r._maxVisibleLayers-(e.data.depth-r._entryDepth):h=e.data.height+1}else h=e.data.depth-r._entryDepth,r._atRootLevel||h++;if(h>0)for(var g=0;g<h;g++){var _=.5*g/h;f=ji.combine(ji.addOpacity(d,_),f)}}}t.style("stroke-width",s).call(ji.fill,f).call(ji.stroke,l).style("opacity",v)}var up={style:B6,styleOne:I2},In=ct.exports,Lb=We,j6=ua.appendArrayPointValue,Yo=Ma,Cb=me.exports,G6=Pl,fr=$i,U6=pn,V6=U6.formatPieValue,vp=function(e,r,a,i,n){var o=i[0],l=o.trace,s=o.hierarchy,f=l.type==="sunburst",c=l.type==="treemap"||l.type==="icicle";"_hasHoverLabel"in l||(l._hasHoverLabel=!1),"_hasHoverEvent"in l||(l._hasHoverEvent=!1);var v=function(h){var p=a._fullLayout;if(!(a._dragging||p.hovermode===!1)){var g=a._fullData[l.index],_=h.data.data,b=_.i,w=fr.isHierarchyRoot(h),m=fr.getParent(s,h),y=fr.getValue(h),x=function(B){return Cb.castOption(g,b,B)},T=x("hovertemplate"),k=Yo.castHoverinfo(g,p,b),S=p.separators,A;if(T||k&&k!=="none"&&k!=="skip"){var E,M;f&&(E=o.cx+h.pxmid[0]*(1-h.rInscribed),M=o.cy+h.pxmid[1]*(1-h.rInscribed)),c&&(E=h._hoverX,M=h._hoverY);var D={},$=[],I=[],P=function(B){return $.indexOf(B)!==-1};k&&($=k==="all"?g._module.attributes.hoverinfo.flags:k.split("+")),D.label=_.label,P("label")&&D.label&&I.push(D.label),_.hasOwnProperty("v")&&(D.value=_.v,D.valueLabel=V6(D.value,S),P("value")&&I.push(D.valueLabel)),D.currentPath=h.currentPath=fr.getPath(h.data),P("current path")&&!w&&I.push(D.currentPath);var R,L=[],C=function(){L.indexOf(R)===-1&&(I.push(R),L.push(R))};D.percentParent=h.percentParent=y/fr.getValue(m),D.parent=h.parentString=fr.getPtLabel(m),P("percent parent")&&(R=fr.formatPercent(D.percentParent,S)+" of "+D.parent,C()),D.percentEntry=h.percentEntry=y/fr.getValue(r),D.entry=h.entry=fr.getPtLabel(r),P("percent entry")&&!w&&!h.onPathbar&&(R=fr.formatPercent(D.percentEntry,S)+" of "+D.entry,C()),D.percentRoot=h.percentRoot=y/fr.getValue(s),D.root=h.root=fr.getPtLabel(s),P("percent root")&&!w&&(R=fr.formatPercent(D.percentRoot,S)+" of "+D.root,C()),D.text=x("hovertext")||x("text"),P("text")&&(R=D.text,Cb.isValidTextValue(R)&&I.push(R)),A=[Wo(h,g,n.eventDataKeys)];var z={trace:g,y:M,_x0:h._x0,_x1:h._x1,_y0:h._y0,_y1:h._y1,text:I.join("<br>"),name:T||P("name")?g.name:void 0,color:x("hoverlabel.bgcolor")||_.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:D,eventData:A};f&&(z.x0=E-h.rInscribed*h.rpx1,z.x1=E+h.rInscribed*h.rpx1,z.idealAlign=h.pxmid[0]<0?"left":"right"),c&&(z.x=E,z.idealAlign=E<0?"left":"right");var F=[];Yo.loneHover(z,{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:a,inOut_bbox:F}),A[0].bbox=F[0],l._hasHoverLabel=!0}if(c){var H=e.select("path.surface");n.styleOne(H,h,g,{hovered:!0})}l._hasHoverEvent=!0,a.emit("plotly_hover",{points:A||[Wo(h,g,n.eventDataKeys)],event:In.event})}},u=function(h){var p=a._fullLayout,g=a._fullData[l.index],_=In.select(this).datum();if(l._hasHoverEvent&&(h.originalEvent=In.event,a.emit("plotly_unhover",{points:[Wo(_,g,n.eventDataKeys)],event:In.event}),l._hasHoverEvent=!1),l._hasHoverLabel&&(Yo.loneUnhover(p._hoverlayer.node()),l._hasHoverLabel=!1),c){var b=e.select("path.surface");n.styleOne(b,_,g,{hovered:!1})}},d=function(h){var p=a._fullLayout,g=a._fullData[l.index],_=f&&(fr.isHierarchyRoot(h)||fr.isLeaf(h)),b=fr.getPtId(h),w=fr.isEntry(h)?fr.findEntryWithChild(s,b):fr.findEntryWithLevel(s,b),m=fr.getPtId(w),y={points:[Wo(h,g,n.eventDataKeys)],event:In.event};_||(y.nextLevel=m);var x=G6.triggerHandler(a,"plotly_"+l.type+"click",y);if(x!==!1&&p.hovermode&&(a._hoverdata=[Wo(h,g,n.eventDataKeys)],Yo.click(a,In.event)),!_&&x!==!1&&!a._dragging&&!a._transitioning){Lb.call("_storeDirectGUIEdit",g,p._tracePreGUI[g.uid],{level:g.level});var T={data:[{level:m}],traces:[l.index]},k={frame:{redraw:!1,duration:n.transitionTime},transition:{duration:n.transitionTime,easing:n.transitionEasing},mode:"immediate",fromcurrent:!0};Yo.loneUnhover(p._hoverlayer.node()),Lb.call("animate",a,T,k)}};e.on("mouseover",v),e.on("mouseout",u),e.on("click",d)};function Wo(t,e,r){for(var a=t.data.data,i={curveNumber:e.index,pointNumber:a.i,data:e._input,fullData:e},n=0;n<r.length;n++){var o=r[n];o in t&&(i[o]=t[o])}return"parentString"in t&&!fr.isHierarchyRoot(t)&&(i.parent=t.parentString),j6(i,e,a.i),i}var Db=ct.exports,Os=me.exports,Eb=Pt.exports,q6=xr,X6=z2,$b=up.styleOne,kv=kc,Nn=$i,Y6=vp,Av=!0,W6=function(e,r,a,i,n){var o=n.barDifY,l=n.width,s=n.height,f=n.viewX,c=n.viewY,v=n.pathSlice,u=n.toMoveInsideSlice,d=n.strTransform,h=n.hasTransition,p=n.handleSlicesExit,g=n.makeUpdateSliceInterpolator,_=n.makeUpdateTextInterpolator,b={},w=e._fullLayout,m=r[0],y=m.trace,x=m.hierarchy,T=l/y._entryDepth,k=Nn.listPath(a.data,"id"),S=X6(x.copy(),[l,s],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();S=S.filter(function(E){var M=k.indexOf(E.data.id);return M===-1?!1:(E.x0=T*M,E.x1=T*(M+1),E.y0=o,E.y1=o+s,E.onPathbar=!0,!0)}),S.reverse(),i=i.data(S,Nn.getPtId),i.enter().append("g").classed("pathbar",!0),p(i,Av,b,[l,s],v),i.order();var A=i;h&&(A=A.transition().each("end",function(){var E=Db.select(this);Nn.setSliceCursor(E,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),A.each(function(E){E._x0=f(E.x0),E._x1=f(E.x1),E._y0=c(E.y0),E._y1=c(E.y1),E._hoverX=f(E.x1-Math.min(l,s)/2),E._hoverY=c(E.y1-s/2);var M=Db.select(this),D=Os.ensureSingle(M,"path","surface",function(R){R.style("pointer-events","all")});h?D.transition().attrTween("d",function(R){var L=g(R,Av,b,[l,s]);return function(C){return v(L(C))}}):D.attr("d",v),M.call(Y6,a,e,r,{styleOne:$b,eventDataKeys:kv.eventDataKeys,transitionTime:kv.CLICK_TRANSITION_TIME,transitionEasing:kv.CLICK_TRANSITION_EASING}).call(Nn.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),D.call($b,E,y,{hovered:!1}),E._text=(Nn.getPtLabel(E)||"").split("<br>").join(" ")||"";var $=Os.ensureSingle(M,"g","slicetext"),I=Os.ensureSingle($,"text","",function(R){R.attr("data-notex",1)}),P=Os.ensureUniformFontSize(e,Nn.determineTextFont(y,E,w.font,{onPathbar:!0}));I.text(E._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(Eb.font,P).call(q6.convertToTspans,e),E.textBB=Eb.bBox(I.node()),E.transform=u(E,{fontSize:P.size,onPathbar:!0}),E.transform.fontSize=P.size,h?I.transition().attrTween("transform",function(R){var L=_(R,Av,b,[l,s]);return function(C){return d(L(C))}}):I.attr("transform",d(E))})},Rb=ct.exports,Mv=qb.interpolate,yi=$i,Zo=me.exports,Pb=Ul.TEXTPAD,Z6=op,K6=Z6.toMoveInsideBar,Q6=ni,Sv=Q6.recordMinTextSize,J6=kc,e8=W6;function Gi(t){return yi.isHierarchyRoot(t)?"":yi.getPtId(t)}var t8=function(e,r,a,i,n){var o=e._fullLayout,l=r[0],s=l.trace,f=s.type,c=f==="icicle",v=l.hierarchy,u=yi.findEntryWithLevel(v,s.level),d=Rb.select(a),h=d.selectAll("g.pathbar"),p=d.selectAll("g.slice");if(!u){h.remove(),p.remove();return}var g=yi.isHierarchyRoot(u),_=!o.uniformtext.mode&&yi.hasTransition(i),b=yi.getMaxDepth(s),w=function(Y){return Y.data.depth-u.data.depth<b},m=o._size,y=s.domain,x=m.w*(y.x[1]-y.x[0]),T=m.h*(y.y[1]-y.y[0]),k=x,S=s.pathbar.thickness,A=s.marker.line.width+J6.gapWithPathbar,E=s.pathbar.visible?s.pathbar.side.indexOf("bottom")>-1?T+A:-(S+A):0,M={x0:k,x1:k,y0:E,y1:E+S},D=function(Y,fe,Ae){var be=s.tiling.pad,Ce=function(pe){return pe-be<=fe.x0},Me=function(pe){return pe+be>=fe.x1},Te=function(pe){return pe-be<=fe.y0},X=function(pe){return pe+be>=fe.y1};return Y.x0===fe.x0&&Y.x1===fe.x1&&Y.y0===fe.y0&&Y.y1===fe.y1?{x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1}:{x0:Ce(Y.x0-be)?0:Me(Y.x0-be)?Ae[0]:Y.x0,x1:Ce(Y.x1+be)?0:Me(Y.x1+be)?Ae[0]:Y.x1,y0:Te(Y.y0-be)?0:X(Y.y0-be)?Ae[1]:Y.y0,y1:Te(Y.y1+be)?0:X(Y.y1+be)?Ae[1]:Y.y1}},$=null,I={},P={},R=null,L=function(Y,fe){return fe?I[Gi(Y)]:P[Gi(Y)]},C=function(Y,fe,Ae,be){if(fe)return I[Gi(v)]||M;var Ce=P[s.level]||Ae;return w(Y)?D(Y,Ce,be):{}};l.hasMultipleRoots&&g&&b++,s._maxDepth=b,s._backgroundColor=o.paper_bgcolor,s._entryDepth=u.data.depth,s._atRootLevel=g;var z=-x/2+m.l+m.w*(y.x[1]+y.x[0])/2,F=-T/2+m.t+m.h*(1-(y.y[1]+y.y[0])/2),H=function(Y){return z+Y},B=function(Y){return F+Y},O=B(0),W=H(0),j=function(Y){return W+Y},Z=function(Y){return O+Y};function K(Y,fe){return Y+","+fe}var Q=j(0),ee=function(Y){Y.x=Math.max(Q,Y.x)},ne=s.pathbar.edgeshape,le=function(Y){var fe=j(Math.max(Math.min(Y.x0,Y.x0),0)),Ae=j(Math.min(Math.max(Y.x1,Y.x1),k)),be=Z(Y.y0),Ce=Z(Y.y1),Me=S/2,Te={},X={};Te.x=fe,X.x=Ae,Te.y=X.y=(be+Ce)/2;var pe={x:fe,y:be},ce={x:Ae,y:be},he={x:Ae,y:Ce},De={x:fe,y:Ce};return ne===">"?(pe.x-=Me,ce.x-=Me,he.x-=Me,De.x-=Me):ne==="/"?(he.x-=Me,De.x-=Me,Te.x-=Me/2,X.x-=Me/2):ne==="\\"?(pe.x-=Me,ce.x-=Me,Te.x-=Me/2,X.x-=Me/2):ne==="<"&&(Te.x-=Me,X.x-=Me),ee(pe),ee(De),ee(Te),ee(ce),ee(he),ee(X),"M"+K(pe.x,pe.y)+"L"+K(ce.x,ce.y)+"L"+K(X.x,X.y)+"L"+K(he.x,he.y)+"L"+K(De.x,De.y)+"L"+K(Te.x,Te.y)+"Z"},se=function(Y){var fe=H(Y.x0),Ae=H(Y.x1),be=B(Y.y0),Ce=B(Y.y1),Me=Ae-fe,Te=Ce-be;if(!Me||!Te)return"";var X=0,pe=Me>2*X&&Te>2*X?X:0,ce=function(he,De){return pe?"a"+K(pe,pe)+" 0 0 1 "+K(he,De):""};return"M"+K(fe,be+pe)+ce(pe,-pe)+"L"+K(Ae-pe,be)+ce(pe,pe)+"L"+K(Ae,Ce-pe)+ce(-pe,pe)+"L"+K(fe+pe,Ce)+ce(-pe,-pe)+"Z"},oe=function(Y,fe){var Ae=Y.x0,be=Y.x1,Ce=Y.y0,Me=Y.y1,Te=Y.textBB,X=function(Ue){return s.textposition.indexOf(Ue)!==-1},pe=X("bottom"),ce=X("top")||fe.isHeader&&!pe,he=ce?"start":pe?"end":"middle",De=X("right"),je=X("left")||fe.onPathbar,$e=je?-1:De?1:0,Se=s[c?"tiling":"marker"].pad;if(fe.isHeader){if(Ae+=(c?Se:Se.l)-Pb,be-=(c?Se:Se.r)-Pb,Ae>=be){var Ge=(Ae+be)/2;Ae=Ge,be=Ge}var Pe;pe?(Pe=Me-(c?Se:Se.b),Ce<Pe&&Pe<Me&&(Ce=Pe)):(Pe=Ce+(c?Se:Se.t),Ce<Pe&&Pe<Me&&(Me=Pe))}var Ie=K6(Ae,be,Ce,Me,Te,{isHorizontal:!1,constrained:!0,angle:0,anchor:he,leftToRight:$e});return Ie.fontSize=fe.fontSize,Ie.targetX=H(Ie.targetX),Ie.targetY=B(Ie.targetY),isNaN(Ie.targetX)||isNaN(Ie.targetY)?{}:(Ae!==be&&Ce!==Me&&Sv(s.type,Ie,o),{scale:Ie.scale,rotate:Ie.rotate,textX:Ie.textX,textY:Ie.textY,anchorX:Ie.anchorX,anchorY:Ie.anchorY,targetX:Ie.targetX,targetY:Ie.targetY})},V=function(Y,fe){for(var Ae,be=0,Ce=Y;!Ae&&be<b;)be++,Ce=Ce.parent,Ce?Ae=L(Ce,fe):be=b;return Ae||{}},ie=function(Y,fe,Ae,be){var Ce=L(Y,fe),Me;if(fe)Me=M;else{var Te=L(u,fe);Te?Me=D(Y,Te,be):Me={}}return Mv(Ce,Me)},ge=function(Y,fe,Ae,be,Ce){var Me=L(Y,fe),Te;if(Me)Te=Me;else if(fe)Te=M;else if($)if(Y.parent){var X=R||Ae;X&&!fe?Te=D(Y,X,be):(Te={},Zo.extendFlat(Te,V(Y,fe)))}else Te=Zo.extendFlat({},Y),c&&(Ce.orientation==="h"?Ce.flipX?Te.x0=Y.x1:Te.x1=0:Ce.flipY?Te.y0=Y.y1:Te.y1=0);else Te={};return Mv(Te,{x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})},de=function(Y,fe,Ae,be){var Ce=L(Y,fe),Me={},Te=C(Y,fe,Ae,be);Zo.extendFlat(Me,{transform:oe({x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1,textBB:Y.textBB,_text:Y._text},{isHeader:yi.isHeader(Y,s)})}),Ce?Me=Ce:Y.parent&&Zo.extendFlat(Me,V(Y,fe));var X=Y.transform;return Y.x0!==Y.x1&&Y.y0!==Y.y1&&Sv(s.type,X,o),Mv(Me,{transform:{scale:X.scale,rotate:X.rotate,textX:X.textX,textY:X.textY,anchorX:X.anchorX,anchorY:X.anchorY,targetX:X.targetX,targetY:X.targetY}})},ke=function(Y,fe,Ae,be,Ce){var Me=be[0],Te=be[1];_?Y.exit().transition().each(function(){var X=Rb.select(this),pe=X.select("path.surface");pe.transition().attrTween("d",function(he){var De=ie(he,fe,Ae,[Me,Te]);return function(je){return Ce(De(je))}});var ce=X.select("g.slicetext");ce.attr("opacity",0)}).remove():Y.exit().remove()},ue=function(Y){var fe=Y.transform;return Y.x0!==Y.x1&&Y.y0!==Y.y1&&Sv(s.type,fe,o),Zo.getTextTransform({textX:fe.textX,textY:fe.textY,anchorX:fe.anchorX,anchorY:fe.anchorY,targetX:fe.targetX,targetY:fe.targetY,scale:fe.scale,rotate:fe.rotate})};_&&(h.each(function(Y){I[Gi(Y)]={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1},Y.transform&&(I[Gi(Y)].transform={textX:Y.transform.textX,textY:Y.transform.textY,anchorX:Y.transform.anchorX,anchorY:Y.transform.anchorY,targetX:Y.transform.targetX,targetY:Y.transform.targetY,scale:Y.transform.scale,rotate:Y.transform.rotate})}),p.each(function(Y){P[Gi(Y)]={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1},Y.transform&&(P[Gi(Y)].transform={textX:Y.transform.textX,textY:Y.transform.textY,anchorX:Y.transform.anchorX,anchorY:Y.transform.anchorY,targetX:Y.transform.targetX,targetY:Y.transform.targetY,scale:Y.transform.scale,rotate:Y.transform.rotate}),!$&&yi.isEntry(Y)&&($=Y)})),R=n(e,r,u,p,{width:x,height:T,viewX:H,viewY:B,pathSlice:se,toMoveInsideSlice:oe,prevEntry:$,makeUpdateSliceInterpolator:ge,makeUpdateTextInterpolator:de,handleSlicesExit:ke,hasTransition:_,strTransform:ue}),s.pathbar.visible?e8(e,r,u,h,{barDifY:E,width:k,height:S,viewX:j,viewY:Z,pathSlice:le,toMoveInsideSlice:oe,makeUpdateSliceInterpolator:ge,makeUpdateTextInterpolator:de,handleSlicesExit:ke,hasTransition:_,strTransform:ue}):h.remove()},r8=ct.exports,a8=$i,i8=ni,n8=i8.clearMinTextSize,o8=ln.resizeText,zb=t8,l8=function(e,r,a,i,n){var o=n.type,l=n.drawDescendants,s=e._fullLayout,f=s["_"+o+"layer"],c,v,u=!a;if(n8(o,s),c=f.selectAll("g.trace."+o).data(r,function(h){return h[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!s.uniformtext.mode&&a8.hasTransition(a)){i&&(v=i());var d=r8.transition().duration(a.duration).ease(a.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()});d.each(function(){f.selectAll("g.trace").each(function(h){zb(e,h,this,a,l)})})}else c.each(function(h){zb(e,h,this,a,l)}),s.uniformtext.mode&&o8(e,f.selectAll(".trace"),o);u&&c.exit().remove()},N2={},Ib=ct.exports,Lv=ft.exports,Nb=me.exports,s8=ni.resizeText;function f8(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");s8(t,e,"sunburst"),e.each(function(r){var a=Ib.select(this),i=r[0],n=i.trace;a.style("opacity",n.opacity),a.selectAll("path.surface").each(function(o){Ib.select(this).call(F2,o,n)})})}function F2(t,e,r){var a=e.data.data,i=!e.children,n=a.i,o=Nb.castOption(r,n,"marker.line.color")||Lv.defaultLine,l=Nb.castOption(r,n,"marker.line.width")||0;t.style("stroke-width",l).call(Lv.fill,a.color).call(Lv.stroke,o).style("opacity",i?r.leaf.opacity:null)}var c8={style:f8,styleOne:F2};(function(t){var e=ct.exports,r=$d,a=qb.interpolate,i=Pt.exports,n=me.exports,o=xr,l=ni,s=l.recordMinTextSize,f=l.clearMinTextSize,c=l2,v=pn.getRotationAngle,u=c.computeTransform,d=c.transformInsideText,h=c8.styleOne,p=ln.resizeText,g=vp,_=C2,b=$i;t.plot=function(k,S,A,E){var M=k._fullLayout,D=M._sunburstlayer,$,I,P=!A,R=!M.uniformtext.mode&&b.hasTransition(A);if(f("sunburst",M),$=D.selectAll("g.trace.sunburst").data(S,function(C){return C[0].trace.uid}),$.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),$.order(),R){E&&(I=E());var L=e.transition().duration(A.duration).ease(A.easing).each("end",function(){I&&I()}).each("interrupt",function(){I&&I()});L.each(function(){D.selectAll("g.trace").each(function(C){w(k,C,this,A)})})}else $.each(function(C){w(k,C,this,A)}),M.uniformtext.mode&&p(k,M._sunburstlayer.selectAll(".trace"),"sunburst");P&&$.exit().remove()};function w(k,S,A,E){var M=k._fullLayout,D=!M.uniformtext.mode&&b.hasTransition(E),$=e.select(A),I=$.selectAll("g.slice"),P=S[0],R=P.trace,L=P.hierarchy,C=b.findEntryWithLevel(L,R.level),z=b.getMaxDepth(R),F=M._size,H=R.domain,B=F.w*(H.x[1]-H.x[0]),O=F.h*(H.y[1]-H.y[0]),W=.5*Math.min(B,O),j=P.cx=F.l+F.w*(H.x[1]+H.x[0])/2,Z=P.cy=F.t+F.h*(1-H.y[0])-O/2;if(!C)return I.remove();var K=null,Q={};D&&I.each(function(X){Q[b.getPtId(X)]={rpx0:X.rpx0,rpx1:X.rpx1,x0:X.x0,x1:X.x1,transform:X.transform},!K&&b.isEntry(X)&&(K=X)});var ee=m(C).descendants(),ne=C.height+1,le=0,se=z;P.hasMultipleRoots&&b.isHierarchyRoot(C)&&(ee=ee.slice(1),ne-=1,le=1,se+=1),ee=ee.filter(function(X){return X.y1<=se});var oe=v(R.rotation);oe&&ee.forEach(function(X){X.x0+=oe,X.x1+=oe});var V=Math.min(ne,z),ie=function(X){return(X-le)/V*W},ge=function(X,pe){return[X*Math.cos(pe),-X*Math.sin(pe)]},de=function(X){return n.pathAnnulus(X.rpx0,X.rpx1,X.x0,X.x1,j,Z)},ke=function(X){return j+x(X)[0]*(X.transform.rCenter||0)+(X.transform.x||0)},ue=function(X){return Z+x(X)[1]*(X.transform.rCenter||0)+(X.transform.y||0)};I=I.data(ee,b.getPtId),I.enter().append("g").classed("slice",!0),D?I.exit().transition().each(function(){var X=e.select(this),pe=X.select("path.surface");pe.transition().attrTween("d",function(he){var De=be(he);return function(je){return de(De(je))}});var ce=X.select("g.slicetext");ce.attr("opacity",0)}).remove():I.exit().remove(),I.order();var Y=null;if(D&&K){var fe=b.getPtId(K);I.each(function(X){Y===null&&b.getPtId(X)===fe&&(Y=X.x1)})}var Ae=I;D&&(Ae=Ae.transition().each("end",function(){var X=e.select(this);b.setSliceCursor(X,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),Ae.each(function(X){var pe=e.select(this),ce=n.ensureSingle(pe,"path","surface",function(Ge){Ge.style("pointer-events","all")});X.rpx0=ie(X.y0),X.rpx1=ie(X.y1),X.xmid=(X.x0+X.x1)/2,X.pxmid=ge(X.rpx1,X.xmid),X.midangle=-(X.xmid-Math.PI/2),X.startangle=-(X.x0-Math.PI/2),X.stopangle=-(X.x1-Math.PI/2),X.halfangle=.5*Math.min(n.angleDelta(X.x0,X.x1)||Math.PI,Math.PI),X.ring=1-X.rpx0/X.rpx1,X.rInscribed=y(X),D?ce.transition().attrTween("d",function(Ge){var Pe=Ce(Ge);return function(Ie){return de(Pe(Ie))}}):ce.attr("d",de),pe.call(g,C,k,S,{eventDataKeys:_.eventDataKeys,transitionTime:_.CLICK_TRANSITION_TIME,transitionEasing:_.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,k,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:k._transitioning}),ce.call(h,X,R);var he=n.ensureSingle(pe,"g","slicetext"),De=n.ensureSingle(he,"text","",function(Ge){Ge.attr("data-notex",1)}),je=n.ensureUniformFontSize(k,b.determineTextFont(R,X,M.font));De.text(t.formatSliceLabel(X,C,R,S,M)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,je).call(o.convertToTspans,k);var $e=i.bBox(De.node());X.transform=d($e,X,P),X.transform.targetX=ke(X),X.transform.targetY=ue(X);var Se=function(Ge,Pe){var Ie=Ge.transform;return u(Ie,Pe),Ie.fontSize=je.size,s(R.type,Ie,M),n.getTextTransform(Ie)};D?De.transition().attrTween("transform",function(Ge){var Pe=Me(Ge);return function(Ie){return Se(Pe(Ie),$e)}}):De.attr("transform",Se(X,$e))});function be(X){var pe=b.getPtId(X),ce=Q[pe],he=Q[b.getPtId(C)],De;if(he){var je=(X.x1>he.x1?2*Math.PI:0)+oe;De=X.rpx1<he.rpx1?{x0:X.x0,x1:X.x1,rpx0:0,rpx1:0}:{x0:je,x1:je,rpx0:X.rpx0,rpx1:X.rpx1}}else{var $e,Se=b.getPtId(X.parent);I.each(function(Xe){if(b.getPtId(Xe)===Se)return $e=Xe});var Ge=$e.children,Pe;Ge.forEach(function(Xe,St){if(b.getPtId(Xe)===pe)return Pe=St});var Ie=Ge.length,Ue=a($e.x0,$e.x1);De={rpx0:W,rpx1:W,x0:Ue(Pe/Ie),x1:Ue((Pe+1)/Ie)}}return a(ce,De)}function Ce(X){var pe=Q[b.getPtId(X)],ce,he={x0:X.x0,x1:X.x1,rpx0:X.rpx0,rpx1:X.rpx1};if(pe)ce=pe;else if(K)if(X.parent)if(Y){var De=(X.x1>Y?2*Math.PI:0)+oe;ce={x0:De,x1:De}}else ce={rpx0:W,rpx1:W},n.extendFlat(ce,Te(X));else ce={rpx0:0,rpx1:0};else ce={x0:oe,x1:oe};return a(ce,he)}function Me(X){var pe=Q[b.getPtId(X)],ce,he=X.transform;if(pe)ce=pe;else if(ce={rpx1:X.rpx1,transform:{textPosAngle:he.textPosAngle,scale:0,rotate:he.rotate,rCenter:he.rCenter,x:he.x,y:he.y}},K)if(X.parent)if(Y){var De=X.x1>Y?2*Math.PI:0;ce.x0=ce.x1=De}else n.extendFlat(ce,Te(X));else ce.x0=ce.x1=oe;else ce.x0=ce.x1=oe;var je=a(ce.transform.textPosAngle,X.transform.textPosAngle),$e=a(ce.rpx1,X.rpx1),Se=a(ce.x0,X.x0),Ge=a(ce.x1,X.x1),Pe=a(ce.transform.scale,he.scale),Ie=a(ce.transform.rotate,he.rotate),Ue=he.rCenter===0?3:ce.transform.rCenter===0?1/3:1,Xe=a(ce.transform.rCenter,he.rCenter),St=function(ht){return Xe(Math.pow(ht,Ue))};return function(ht){var Ft=$e(ht),ut=Se(ht),_t=Ge(ht),N=St(ht),U=ge(Ft,(ut+_t)/2),G=je(ht),q={pxmid:U,rpx1:Ft,transform:{textPosAngle:G,rCenter:N,x:he.x,y:he.y}};return s(R.type,he,M),{transform:{targetX:ke(q),targetY:ue(q),scale:Pe(ht),rotate:Ie(ht),rCenter:N}}}}function Te(X){var pe=X.parent,ce=Q[b.getPtId(pe)],he={};if(ce){var De=pe.children,je=De.indexOf(X),$e=De.length,Se=a(ce.x0,ce.x1);he.x0=Se(je/$e),he.x1=Se(je/$e)}else he.x0=he.x1=0;return he}}function m(k){return r.partition().size([2*Math.PI,k.height+1])(k)}t.formatSliceLabel=function(k,S,A,E,M){var D=A.texttemplate,$=A.textinfo;if(!D&&(!$||$==="none"))return"";var I=M.separators,P=E[0],R=k.data.data,L=P.hierarchy,C=b.isHierarchyRoot(k),z=b.getParent(L,k),F=b.getValue(k);if(!D){var H=$.split("+"),B=function(se){return H.indexOf(se)!==-1},O=[],W;if(B("label")&&R.label&&O.push(R.label),R.hasOwnProperty("v")&&B("value")&&O.push(b.formatValue(R.v,I)),!C){B("current path")&&O.push(b.getPath(k.data));var j=0;B("percent parent")&&j++,B("percent entry")&&j++,B("percent root")&&j++;var Z=j>1;if(j){var K,Q=function(se){W=b.formatPercent(K,I),Z&&(W+=" of "+se),O.push(W)};B("percent parent")&&!C&&(K=F/b.getValue(z),Q("parent")),B("percent entry")&&(K=F/b.getValue(S),Q("entry")),B("percent root")&&(K=F/b.getValue(L),Q("root"))}}return B("text")&&(W=n.castOption(A,R.i,"text"),n.isValidTextValue(W)&&O.push(W)),O.join("<br>")}var ee=n.castOption(A,R.i,"texttemplate");if(!ee)return"";var ne={};R.label&&(ne.label=R.label),R.hasOwnProperty("v")&&(ne.value=R.v,ne.valueLabel=b.formatValue(R.v,I)),ne.currentPath=b.getPath(k.data),C||(ne.percentParent=F/b.getValue(z),ne.percentParentLabel=b.formatPercent(ne.percentParent,I),ne.parent=b.getPtLabel(z)),ne.percentEntry=F/b.getValue(S),ne.percentEntryLabel=b.formatPercent(ne.percentEntry,I),ne.entry=b.getPtLabel(S),ne.percentRoot=F/b.getValue(L),ne.percentRootLabel=b.formatPercent(ne.percentRoot,I),ne.root=b.getPtLabel(L),R.hasOwnProperty("color")&&(ne.color=R.color);var le=n.castOption(A,R.i,"text");return(n.isValidTextValue(le)||le==="")&&(ne.text=le),ne.customdata=n.castOption(A,R.i,"customdata"),n.texttemplateString(ee,ne,M._d3locale,ne,A._meta||{})};function y(k){return k.rpx0===0&&n.isFullCircle([k.x0,k.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(k.halfangle)),k.ring/2))}function x(k){return T(k.rpx1,k.transform.textPosAngle)}function T(k,S){return[k*Math.sin(S),-k*Math.cos(S)]}})(N2);var Fb=ct.exports,Bs=me.exports,Hb=Pt.exports,u8=xr,v8=z2,Ob=up.styleOne,Cv=kc,vi=$i,d8=vp,h8=N2.formatSliceLabel,Dv=!1,p8=function(e,r,a,i,n){var o=n.width,l=n.height,s=n.viewX,f=n.viewY,c=n.pathSlice,v=n.toMoveInsideSlice,u=n.strTransform,d=n.hasTransition,h=n.handleSlicesExit,p=n.makeUpdateSliceInterpolator,g=n.makeUpdateTextInterpolator,_=n.prevEntry,b={},w=e._fullLayout,m=r[0],y=m.trace,x=y.textposition.indexOf("left")!==-1,T=y.textposition.indexOf("right")!==-1,k=y.textposition.indexOf("bottom")!==-1,S=!k&&!y.marker.pad.t||k&&!y.marker.pad.b,A=v8(a,[o,l],{packing:y.tiling.packing,squarifyratio:y.tiling.squarifyratio,flipX:y.tiling.flip.indexOf("x")>-1,flipY:y.tiling.flip.indexOf("y")>-1,pad:{inner:y.tiling.pad,top:y.marker.pad.t,left:y.marker.pad.l,right:y.marker.pad.r,bottom:y.marker.pad.b}}),E=A.descendants(),M=1/0,D=-1/0;E.forEach(function(L){var C=L.depth;C>=y._maxDepth?(L.x0=L.x1=(L.x0+L.x1)/2,L.y0=L.y1=(L.y0+L.y1)/2):(M=Math.min(M,C),D=Math.max(D,C))}),i=i.data(E,vi.getPtId),y._maxVisibleLayers=isFinite(D)?D-M+1:0,i.enter().append("g").classed("slice",!0),h(i,Dv,b,[o,l],c),i.order();var $=null;if(d&&_){var I=vi.getPtId(_);i.each(function(L){$===null&&vi.getPtId(L)===I&&($={x0:L.x0,x1:L.x1,y0:L.y0,y1:L.y1})})}var P=function(){return $||{x0:0,x1:o,y0:0,y1:l}},R=i;return d&&(R=R.transition().each("end",function(){var L=Fb.select(this);vi.setSliceCursor(L,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(L){var C=vi.isHeader(L,y);L._x0=s(L.x0),L._x1=s(L.x1),L._y0=f(L.y0),L._y1=f(L.y1),L._hoverX=s(L.x1-y.marker.pad.r),L._hoverY=f(k?L.y1-y.marker.pad.b/2:L.y0+y.marker.pad.t/2);var z=Fb.select(this),F=Bs.ensureSingle(z,"path","surface",function(W){W.style("pointer-events","all")});d?F.transition().attrTween("d",function(W){var j=p(W,Dv,P(),[o,l]);return function(Z){return c(j(Z))}}):F.attr("d",c),z.call(d8,a,e,r,{styleOne:Ob,eventDataKeys:Cv.eventDataKeys,transitionTime:Cv.CLICK_TRANSITION_TIME,transitionEasing:Cv.CLICK_TRANSITION_EASING}).call(vi.setSliceCursor,e,{isTransitioning:e._transitioning}),F.call(Ob,L,y,{hovered:!1}),L.x0===L.x1||L.y0===L.y1?L._text="":C?L._text=S?"":vi.getPtLabel(L)||"":L._text=h8(L,a,y,r,w)||"";var H=Bs.ensureSingle(z,"g","slicetext"),B=Bs.ensureSingle(H,"text","",function(W){W.attr("data-notex",1)}),O=Bs.ensureUniformFontSize(e,vi.determineTextFont(y,L,w.font));B.text(L._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":x||C?"start":"middle").call(Hb.font,O).call(u8.convertToTspans,e),L.textBB=Hb.bBox(B.node()),L.transform=v(L,{fontSize:O.size,isHeader:C}),L.transform.fontSize=O.size,d?B.transition().attrTween("transform",function(W){var j=g(W,Dv,P(),[o,l]);return function(Z){return u(j(Z))}}):B.attr("transform",u(L))}),$},m8=l8,y8=p8,g8=function(e,r,a,i){return m8(e,r,a,i,{type:"treemap",drawDescendants:y8})},b8={moduleType:"trace",name:"treemap",basePlotModule:L2,categories:[],animatable:!0,attributes:D2,layoutAttributes:E2,supplyDefaults:R6,supplyLayoutDefaults:I6,calc:Hf.calc,crossTraceCalc:Hf.crossTraceCalc,plot:g8,style:up.style,colorbar:jl,meta:{description:["Visualize hierarchal data from leaves (and/or outer branches) towards root","with rectangles. The treemap sectors are determined by the entries in","*labels* or *ids* and in *parents*."].join(" ")}};(function(t){t.exports=b8})(S2);const L8=Ai(S2.exports);var H2={};(function(t){function e(y){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(T){return typeof T}:e=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},e(y)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=m;var r=o(J2.exports),a=i(ek.exports);function i(y){return y&&y.__esModule?y:{default:y}}function n(){if(typeof WeakMap!="function")return null;var y=new WeakMap;return n=function(){return y},y}function o(y){if(y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var x=n();if(x&&x.has(y))return x.get(y);var T={},k=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in y)if(Object.prototype.hasOwnProperty.call(y,S)){var A=k?Object.getOwnPropertyDescriptor(y,S):null;A&&(A.get||A.set)?Object.defineProperty(T,S,A):T[S]=y[S]}return T.default=y,x&&x.set(y,T),T}function l(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function s(y,x){for(var T=0;T<x.length;T++){var k=x[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(y,k.key,k)}}function f(y,x,T){return x&&s(y.prototype,x),T&&s(y,T),y}function c(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),x&&v(y,x)}function v(y,x){return v=Object.setPrototypeOf||function(k,S){return k.__proto__=S,k},v(y,x)}function u(y){var x=p();return function(){var k=g(y),S;if(x){var A=g(this).constructor;S=Reflect.construct(k,arguments,A)}else S=k.apply(this,arguments);return d(this,S)}}function d(y,x){return x&&(e(x)==="object"||typeof x=="function")?x:h(y)}function h(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function g(y){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},g(y)}var _=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover"],b=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],w=typeof window<"u";function m(y){var x=function(T){c(S,T);var k=u(S);function S(A){var E;return l(this,S),E=k.call(this,A),E.p=Promise.resolve(),E.resizeHandler=null,E.handlers={},E.syncWindowResize=E.syncWindowResize.bind(h(E)),E.syncEventHandlers=E.syncEventHandlers.bind(h(E)),E.attachUpdateEvents=E.attachUpdateEvents.bind(h(E)),E.getRef=E.getRef.bind(h(E)),E.handleUpdate=E.handleUpdate.bind(h(E)),E.figureCallback=E.figureCallback.bind(h(E)),E.updatePlotly=E.updatePlotly.bind(h(E)),E}return f(S,[{key:"updatePlotly",value:function(E,M,D){var $=this;this.p=this.p.then(function(){if(!$.unmounting){if(!$.el)throw new Error("Missing element reference");return y.react($.el,{data:$.props.data,layout:$.props.layout,config:$.props.config,frames:$.props.frames})}}).then(function(){$.unmounting||($.syncWindowResize(E),$.syncEventHandlers(),$.figureCallback(M),D&&$.attachUpdateEvents())}).catch(function(I){$.props.onError&&$.props.onError(I)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(E){this.unmounting=!1;var M=E.frames&&E.frames.length?E.frames.length:0,D=this.props.frames&&this.props.frames.length?this.props.frames.length:0,$=!(E.layout===this.props.layout&&E.data===this.props.data&&E.config===this.props.config&&D===M),I=E.revision!==void 0,P=E.revision!==this.props.revision;!$&&(!I||I&&!P)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&w&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),y.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var E=this;!this.el||!this.el.removeListener||b.forEach(function(M){E.el.on(M,E.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var E=this;!this.el||!this.el.removeListener||b.forEach(function(M){E.el.removeListener(M,E.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(E){if(typeof E=="function"){var M=this.el,D=M.data,$=M.layout,I=this.el._transitionData?this.el._transitionData._frames:null,P={data:D,layout:$,frames:I};E(P,this.el)}}},{key:"syncWindowResize",value:function(E){var M=this;!w||(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return y.Plots.resize(M.el)},window.addEventListener("resize",this.resizeHandler),E&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(E){this.el=E,this.props.debug&&w&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var E=this;_.forEach(function(M){var D=E.props["on"+M],$=E.handlers[M],I=Boolean($);D&&!I?E.addEventHandler(M,D):!D&&I?E.removeEventHandler(M):D&&I&&D!==$&&(E.removeEventHandler(M),E.addEventHandler(M,D))})}},{key:"addEventHandler",value:function(E,M){this.handlers[E]=M,this.el.on(this.getPlotlyEventName(E),this.handlers[E])}},{key:"removeEventHandler",value:function(E){this.el.removeListener(this.getPlotlyEventName(E),this.handlers[E]),delete this.handlers[E]}},{key:"getPlotlyEventName",value:function(E){return"plotly_"+E.toLowerCase()}},{key:"render",value:function(){return r.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),S}(r.Component);return x.propTypes={data:a.default.arrayOf(a.default.object),config:a.default.object,layout:a.default.object,frames:a.default.arrayOf(a.default.object),revision:a.default.number,onInitialized:a.default.func,onPurge:a.default.func,onError:a.default.func,onUpdate:a.default.func,debug:a.default.bool,style:a.default.object,className:a.default.string,useResizeHandler:a.default.bool,divId:a.default.string},_.forEach(function(T){x.propTypes["on"+T]=a.default.func}),x.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},x}})(H2);const C8=Ai(H2);export{w8 as P,T8 as b,C8 as c,k8 as h,M8 as o,A8 as p,S8 as s,L8 as t};
|
|
7
|
-
//# sourceMappingURL=plotly.2f9046a1.js.map
|