mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-16 01:35:41 +00:00
8 lines
1.8 MiB
8 lines
1.8 MiB
/**
|
||
* plotly.js (mapbox - minified) v2.31.0
|
||
* Copyright 2012-2024, Plotly, Inc.
|
||
* All rights reserved.
|
||
* Licensed under the MIT license
|
||
*/
|
||
/*! For license information please see plotly-mapbox.min.js.LICENSE.txt */
|
||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Plotly=e():t.Plotly=e()}(self,(function(){return function(){var t={9288:function(t,e,r){"use strict";var n=r(3400),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},6712:function(t,e,r){"use strict";t.exports=r(1843)},6144:function(t,e,r){"use strict";t.exports=r(7776)},5e3:function(t,e,r){"use strict";t.exports=r(3023)},2016:function(t,e,r){"use strict";t.exports=r(4884)},7528:function(t,e,r){"use strict";t.exports=r(5088)},5556:function(t,e,r){"use strict";t.exports=r(6744)},6489:function(t,e,r){"use strict";t.exports=r(2028)},488:function(t,e,r){"use strict";var n=r(2016);n.register([r(192),r(5e3),r(7528),r(6712),r(5556),r(6489),r(7312),r(6144)]),t.exports=n},192:function(t,e,r){"use strict";t.exports=r(1572)},7312:function(t,e,r){"use strict";t.exports=r(6272)},2196:function(t){"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},3916:function(t,e,r){"use strict";var n=r(2196),i=r(5376),a=r(3816),o=r(1780).templatedArray;r(6208),t.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},272:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(6196).draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},"range"===a&&s(e,r),"range"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],u=t["a"+a+"ref"],c=t["_"+a+"padplus"],h=t["_"+a+"padminus"],p={x:1,y:-1}[a]*t[a+"shift"],f=3*t.arrowsize*t.arrowwidth||0,d=f+p,m=f-p,y=3*t.startarrowsize*t.arrowwidth||0,v=y+p,g=y-p;if(u===l){var _=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:m}),x=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(c,v),ppadminus:Math.max(h,g)});r={min:[_.min[0],x.min[0]],max:[_.max[0],x.max[0]]}}else v=s?v+s:v,g=s?g-s:g,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(c,d,v),ppadminus:Math.max(h,m,g)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},2300:function(t,e,r){"use strict";var n=r(3400),i=r(4040),a=r(1780).arrayEditor;function o(t,e){var r,n,i,a,o,l,u,c=t._fullLayout.annotations,h=[],p=[],f=[],d=(e||[]).length;for(r=0;r<c.length;r++)if(a=(i=c[r]).clicktoshow){for(n=0;n<d;n++)if(l=(o=e[n]).xaxis,u=o.yaxis,l._id===i.xref&&u._id===i.yref&&l.d2r(o.x)===s(i._xclick,l)&&u.d2r(o.y)===s(i._yclick,u)){(i.visible?"onout"===a?p:f:h).push(r);break}n===d&&i.visible&&"onout"===a&&p.push(r)}return{on:h,off:p,explicitOff:f}}function s(t,e){return"log"===e.type?e.l2r(t):e.d2r(t)}t.exports={hasClickToShow:function(t,e){var r=o(t,e);return r.on.length>0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),u=l.on,c=l.off.concat(l.explicitOff),h={},p=t._fullLayout.annotations;if(u.length||c.length){for(r=0;r<u.length;r++)(s=a(t.layout,"annotations",p[u[r]])).modifyItem("visible",!0),n.extendFlat(h,s.getUpdateObj());for(r=0;r<c.length;r++)(s=a(t.layout,"annotations",p[c[r]])).modifyItem("visible",!1),n.extendFlat(h,s.getUpdateObj());return i.call("update",t,{},h)}}}},7192:function(t,e,r){"use strict";var n=r(3400),i=r(6308);t.exports=function(t,e,r,a){a("opacity");var o=a("bgcolor"),s=a("bordercolor"),l=i.opacity(s);a("borderpad");var u=a("borderwidth"),c=a("showarrow");if(a("text",c?" ":r._dfltTitle.annotation),a("textangle"),n.coerceFont(a,"font",r.font),a("width"),a("align"),a("height")&&a("valign"),c){var h,p,f=a("arrowside");-1!==f.indexOf("end")&&(h=a("arrowhead"),p=a("arrowsize")),-1!==f.indexOf("start")&&(a("startarrowhead",h),a("startarrowsize",p)),a("arrowcolor",l?e.bordercolor:i.defaultLine),a("arrowwidth",2*(l&&u||1)),a("standoff"),a("startstandoff")}var d=a("hovertext"),m=r.hoverlabel||{};if(d){var y=a("hoverlabel.bgcolor",m.bgcolor||(i.opacity(o)?i.rgb(o):i.defaultLine)),v=a("hoverlabel.bordercolor",m.bordercolor||i.contrast(y));n.coerceFont(a,"hoverlabel.font",{family:m.font.family,size:m.font.size,color:m.font.color||v})}a("captureevents",!!d)}},9208:function(t,e,r){"use strict";var n=r(8248),i=r(6896);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.annotations,h=e._id.charAt(0),p=0;p<c.length;p++)l=c[p],u="annotations["+p+"].",l[h+"ref"]===e._id&&f(h),l["a"+h+"ref"]===e._id&&f("a"+h);function f(t){var r=l[t],s=null;s=o?i(r,e.range):Math.pow(10,r),n(s)||(s=null),a(u+t,s)}}},5216:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(7192),s=r(3916);function l(t,e,r){function a(r,i){return n.coerce(t,e,s,r,i)}var l=a("visible"),u=a("clicktoshow");if(l||u){o(t,e,r,a);for(var c=e.showarrow,h=["x","y"],p=[-10,-30],f={_fullLayout:r},d=0;d<2;d++){var m=h[d],y=i.coerceRef(t,e,f,m,"","paper");if("paper"!==y&&i.getFromId(f,y)._annIndices.push(e._index),i.coercePosition(e,f,a,y,m,.5),c){var v="a"+m,g=i.coerceRef(t,e,f,v,"pixel",["pixel","paper"]);"pixel"!==g&&g!==y&&(g=e[v]="pixel");var _="pixel"===g?p[d]:.4;i.coercePosition(e,f,a,g,v,_)}a(m+"anchor"),a(m+"shift")}if(n.noneOrAll(t,e,["x","y"]),c&&n.noneOrAll(t,e,["ax","ay"]),u){var x=a("xclick"),b=a("yclick");e._xclick=void 0===x?e.x:i.cleanPosition(x,f,e.xref),e._yclick=void 0===b?e.y:i.cleanPosition(b,f,e.yref)}}}t.exports=function(t,e){a(t,e,{name:"annotations",handleItemDefaults:l})}},6196:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(4460),u=r(6308),c=r(3616),h=r(3024),p=r(2736),f=r(3972),d=r(6476),m=r(1780).arrayEditor,y=r(3652);function v(t,e){var r=t._fullLayout.annotations[e]||{},n=l.getFromId(t,r.xref),i=l.getFromId(t,r.yref);n&&n.setScale(),i&&i.setScale(),_(t,r,e,!1,n,i)}function g(t,e,r,n,i){var a=i[r],o=i[r+"ref"],s=-1!==r.indexOf("y"),u="domain"===l.getRefType(o),c=s?n.h:n.w;return t?u?a+(s?-e:e)/t._length:t.p2r(t.r2p(a)+e):a+(s?-e:e)/c}function _(t,e,r,a,v,_){var x,b,w=t._fullLayout,T=t._fullLayout._size,k=t._context.edits;a?(x="annotation-"+a,b=a+".annotations"):(x="annotation",b="annotations");var M=m(t.layout,b,e),A=M.modifyBase,S=M.modifyItem,L=M.getUpdateObj;w._infolayer.selectAll("."+x+'[data-index="'+r+'"]').remove();var C="clip"+w._uid+"_ann"+r;if(e._input&&!1!==e.visible){var P={x:{},y:{}},I=+e.textangle||0,E=w._infolayer.append("g").classed(x,!0).attr("data-index",String(r)).style("opacity",e.opacity),D=E.append("g").classed("annotation-text-g",!0),z=k[e.showarrow?"annotationTail":"annotationPosition"],O=e.captureevents||k.annotationText||z,R=D.append("g").style("pointer-events",O?"all":null).call(f,"pointer").on("click",(function(){t._dragging=!1,t.emit("plotly_clickannotation",Z(n.event))}));e.hovertext&&R.on("mouseover",(function(){var r=e.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=t.getBoundingClientRect();h.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:e.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:t})})).on("mouseout",(function(){h.loneUnhover(w._hoverlayer.node())}));var F=e.borderwidth,B=e.borderpad,N=F+B,U=R.append("rect").attr("class","bg").style("stroke-width",F+"px").call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor),j=e.width||e.height,V=w._topclips.selectAll("#"+C).data(j?[0]:[]);V.enter().append("clipPath").classed("annclip",!0).attr("id",C).append("rect"),V.exit().remove();var q=e.font,H=w._meta?o.templateString(e.text,w._meta):e.text,G=R.append("text").classed("annotation-text",!0).text(H);k.annotationText?G.call(p.makeEditable,{delegate:R,gd:t}).call(Y).on("edit",(function(r){e.text=r,this.call(Y),S("text",r),v&&v.autorange&&A(v._name+".autorange",!0),_&&_.autorange&&A(_._name+".autorange",!0),i.call("_guiRelayout",t,L())})):G.call(Y)}else n.selectAll("#"+C).remove();function Z(t){var n={index:r,annotation:e._input,fullAnnotation:e,event:t};return a&&(n.subplotId=a),n}function Y(r){return r.call(c.font,q).attr({"text-anchor":{left:"start",right:"end"}[e.align]||"middle"}),p.convertToTspans(r,t,W),r}function W(){var r=G.selectAll("a");1===r.size()&&r.text()===G.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(U.node());var n=R.select(".annotation-text-math-group"),h=!n.empty(),m=c.bBox((h?n:G).node()),x=m.width,b=m.height,M=e.width||x,O=e.height||b,B=Math.round(M+2*N),q=Math.round(O+2*N);function H(t,e){return"auto"===e&&(e=t<1/3?"left":t>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,W=["x","y"],X=0;X<W.length;X++){var J,K,Q,$,tt,et=W[X],rt=e[et+"ref"]||et,nt=e["a"+et+"ref"],it={x:v,y:_}[et],at=(I+("x"===et?0:-90))*Math.PI/180,ot=B*Math.cos(at),st=q*Math.sin(at),lt=Math.abs(ot)+Math.abs(st),ut=e[et+"anchor"],ct=e[et+"shift"]*("x"===et?1:-1),ht=P[et],pt=l.getRefType(rt);if(it&&"domain"!==pt){var ft=it.r2fraction(e[et]);(ft<0||ft>1)&&(nt===rt?((ft=it.r2fraction(e["a"+et]))<0||ft>1)&&(Y=!0):Y=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt="domain"===pt;"x"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ht.head=J;var mt=e["a"+et];if(tt=ot*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var yt=l.getRefType(nt);"domain"===yt?("y"===et&&(mt=1-mt),ht.tail=it._offset+it._length*mt):"paper"===yt?"y"===et?(mt=1-mt,ht.tail=T.t+T.h*mt):ht.tail=T.l+T.w*mt:ht.tail=it._offset+it.r2p(mt),K=tt}else ht.tail=J+mt,K=tt+mt;ht.text=ht.tail+tt;var vt=w["x"===et?"width":"height"];if("paper"===rt&&(ht.head=o.constrain(ht.head,1,vt-1)),"pixel"===nt){var gt=-Math.max(ht.tail-3,ht.text),_t=Math.min(ht.tail+3,ht.text)-vt;gt>0?(ht.tail+=gt,ht.text+=gt):_t>0&&(ht.tail-=_t,ht.text-=_t)}ht.tail+=ct,ht.head+=ct}else K=tt=lt*H($,ut),ht.text=J+tt;ht.text+=ct,tt+=ct,K+=ct,e["_"+et+"padplus"]=lt/2+K,e["_"+et+"padminus"]=lt/2-K,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)R.remove();else{var xt=0,bt=0;if("left"!==e.align&&(xt=(M-x)*("center"===e.align?.5:1)),"top"!==e.valign&&(bt=(O-b)*("middle"===e.valign?.5:1)),h)n.select("svg").attr({x:N+xt-1,y:N+bt}).call(c.setClipUrl,j?C:null,t);else{var wt=N+bt-m.top,Tt=N+xt-m.left;G.call(p.positionText,Tt,wt).call(c.setClipUrl,j?C:null,t)}V.select("rect").call(c.setRect,N,N,M,O),U.call(c.setRect,F/2,F/2,B-F,q-F),R.call(c.setTranslate,Math.round(P.x.text-B/2),Math.round(P.y.text-q/2)),D.attr({transform:"rotate("+I+","+P.x.text+","+P.y.text+")"});var kt,Mt=function(r,n){E.selectAll(".annotation-arrow-g").remove();var l=P.x.head,h=P.y.head,p=P.x.tail+r,f=P.y.tail+n,m=P.x.text+r,x=P.y.text+n,b=o.rotationXYMatrix(I,m,x),w=o.apply2DTransform(b),M=o.apply2DTransform2(b),C=+U.attr("width"),z=+U.attr("height"),O=m-.5*C,F=O+C,B=x-.5*z,N=B+z,j=[[O,B,O,N],[O,N,F,N],[F,N,F,B],[F,B,O,B]].map(M);if(!j.reduce((function(t,e){return t^!!o.segmentsIntersect(l,h,l+1e6,h+1e6,e[0],e[1],e[2],e[3])}),!1)){j.forEach((function(t){var e=o.segmentsIntersect(p,f,l,h,t[0],t[1],t[2],t[3]);e&&(p=e.x,f=e.y)}));var V=e.arrowwidth,q=e.arrowcolor,H=e.arrowside,G=E.append("g").style({opacity:u.opacity(q)}).classed("annotation-arrow-g",!0),Z=G.append("path").attr("d","M"+p+","+f+"L"+l+","+h).style("stroke-width",V+"px").call(u.stroke,u.rgb(q));if(y(Z,H,e),k.annotationPosition&&Z.node().parentNode&&!a){var Y=l,W=h;if(e.standoff){var X=Math.sqrt(Math.pow(l-p,2)+Math.pow(h-f,2));Y+=e.standoff*(p-l)/X,W+=e.standoff*(f-h)/X}var J,K,Q=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(p-Y)+","+(f-W),transform:s(Y,W)}).style("stroke-width",V+6+"px").call(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");d.init({element:Q.node(),gd:t,prepFn:function(){var t=c.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&A(v._name+".autorange",!0),_&&_.autorange&&A(_._name+".autorange",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(c.setTranslate,i,a),S("x",g(v,t,"x",T,e)),S("y",g(_,r,"y",T,e)),e.axref===e.xref&&S("ax",g(v,t,"ax",T,e)),e.ayref===e.yref&&S("ay",g(_,r,"ay",T,e)),G.attr("transform",s(t,r)),D.attr({transform:"rotate("+I+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,L());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Mt(0,0),z&&d.init({element:R.node(),gd:t,prepFn:function(){kt=D.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",g(v,t,"ax",T,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",g(_,r,"ay",T.w,e)):S("ay",e.ay+r),Mt(t,r);else{if(a)return;var i,o;if(v)i=g(v,t,"x",T,e);else{var l=e._xsize/T.w,u=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(u+t/T.w,l,0,1,e.xanchor)}if(_)o=g(_,r,"y",T,e);else{var c=e._ysize/T.h,h=e.y-(e._yshift+e.yshift)/T.h-c/2;o=d.align(h-r/T.h,c,0,1,e.yanchor)}S("x",i),S("y",o),v&&_||(n=d.getCursor(v?.5:i,_?.5:o,e.xanchor,e.yanchor))}D.attr({transform:s(t,r)+kt}),f(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",Z(n))},doneFn:function(){f(R),i.call("_guiRelayout",t,L());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r<e.annotations.length;r++)e.annotations[r].visible&&v(t,r);return a.previousPromises(t)},drawOne:v,drawRaw:_}},3652:function(t,e,r){"use strict";var n=r(3428),i=r(6308),a=r(2196),o=r(3400),s=o.strScale,l=o.strRotate,u=o.strTranslate;t.exports=function(t,e,r){var o,c,h,p,f=t.node(),d=a[r.arrowhead||0],m=a[r.startarrowhead||0],y=(r.arrowwidth||1)*(r.arrowsize||1),v=(r.arrowwidth||1)*(r.startarrowsize||1),g=e.indexOf("start")>=0,_=e.indexOf("end")>=0,x=d.backoff*y+r.standoff,b=m.backoff*v+r.startstandoff;if("line"===f.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},c={x:+t.attr("x2"),y:+t.attr("y2")};var w=o.x-c.x,T=o.y-c.y;if(p=(h=Math.atan2(T,w))+Math.PI,x&&b&&x+b>Math.sqrt(w*w+T*T))return void z();if(x){if(x*x>w*w+T*T)return void z();var k=x*Math.cos(h),M=x*Math.sin(h);c.x+=k,c.y+=M,t.attr({x2:c.x,y2:c.y})}if(b){if(b*b>w*w+T*T)return void z();var A=b*Math.cos(h),S=b*Math.sin(h);o.x-=A,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===f.nodeName){var L=f.getTotalLength(),C="";if(L<x+b)return void z();var P=f.getPointAtLength(0),I=f.getPointAtLength(.1);h=Math.atan2(P.y-I.y,P.x-I.x),o=f.getPointAtLength(Math.min(b,L)),C="0px,"+b+"px,";var E=f.getPointAtLength(L),D=f.getPointAtLength(L-.1);p=Math.atan2(E.y-D.y,E.x-D.x),c=f.getPointAtLength(Math.max(0,L-x)),C+=L-(C?b+x:x)+"px,"+L+"px",t.style("stroke-dasharray",C)}function z(){t.style("stroke-dasharray","0px,100px")}function O(e,a,o,c){e.path&&(e.noRotate&&(o=0),n.select(f.parentNode).append("path").attr({class:t.attr("class"),d:e.path,transform:u(a.x,a.y)+l(180*o/Math.PI)+s(c)}).style({fill:i.rgb(r.arrowcolor),"stroke-width":0}))}g&&O(m,o,h,v),_&&O(d,c,p,y)}},9180:function(t,e,r){"use strict";var n=r(6196),i=r(2300);t.exports={moduleType:"component",name:"annotations",layoutAttributes:r(3916),supplyLayoutDefaults:r(5216),includeBasePlot:r(6632)("annotations"),calcAutorange:r(272),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:i.hasClickToShow,onClick:i.onClick,convertCoords:r(9208)}},5899:function(t,e,r){"use strict";var n=r(3916),i=r(7824).overrideAll,a=r(1780).templatedArray;t.exports=i(a("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},76:function(t,e,r){"use strict";var n=r(3400),i=r(4460);function a(t,e){var r=e.fullSceneLayout.domain,a=e.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};t._xa={},n.extendFlat(t._xa,o),i.setConvert(t._xa),t._xa._offset=a.l+r.x[0]*a.w,t._xa.l2p=function(){return.5*(1+t._pdata[0]/t._pdata[3])*a.w*(r.x[1]-r.x[0])},t._ya={},n.extendFlat(t._ya,o),i.setConvert(t._ya),t._ya._offset=a.t+(1-r.y[1])*a.h,t._ya.l2p=function(){return.5*(1-t._pdata[1]/t._pdata[3])*a.h*(r.y[1]-r.y[0])}}t.exports=function(t){for(var e=t.fullSceneLayout.annotations,r=0;r<e.length;r++)a(e[r],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()}},2808:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(7192),s=r(5899);function l(t,e,r,a){function l(r,i){return n.coerce(t,e,s,r,i)}function u(t){var n=t+"axis",a={_fullLayout:{}};return a._fullLayout[n]=r[n],i.coercePosition(e,a,l,t,t,.5)}l("visible")&&(o(t,e,a.fullLayout,l),u("x"),u("y"),u("z"),n.noneOrAll(t,e,["x","y","z"]),e.xref="x",e.yref="y",e.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),e.showarrow&&(e.axref="pixel",e.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(t,e,["ax","ay"])))}t.exports=function(t,e,r){a(t,e,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},1836:function(t,e,r){"use strict";var n=r(6196).drawRaw,i=r(4424),a=["x","y","z"];t.exports=function(t){for(var e=t.fullSceneLayout,r=t.dataScale,o=e.annotations,s=0;s<o.length;s++){for(var l=o[s],u=!1,c=0;c<3;c++){var h=a[c],p=l[h],f=e[h+"axis"].r2fraction(p);if(f<0||f>1){u=!0;break}}u?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},6864:function(t,e,r){"use strict";var n=r(4040),i=r(3400);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(5899)}}},layoutAttributes:r(5899),handleDefaults:r(2808),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s<o.length;s++){var l=o[s];a.test(l)&&(t[l].annotations||[]).length&&(i.pushUnique(e._basePlotModules,r),i.pushUnique(e._subplots.gl3d,l))}},convert:r(76),draw:r(1836)}},4976:function(t,e,r){"use strict";t.exports=r(8700),r(5168),r(7020),r(7411),r(5668),r(2787),r(2084),r(6368),r(4747),r(5616),r(632),r(3040),r(1104),r(9075),r(4592),r(5348)},7776:function(t,e,r){"use strict";var n=r(4976),i=r(3400),a=r(9032),o=a.EPOCHJD,s=a.ONEDAY,l={valType:"enumerated",values:i.sortObjectKeys(n.calendars),editType:"calc",dflt:"gregorian"},u=function(t,e,r,n){var a={};return a[r]=l,i.coerce(t,e,a,r,n)},c="##",h={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:c,w:c,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},p={};function f(t){var e=p[t];return e||(p[t]=n.instance(t))}function d(t){return i.extendFlat({},l,{description:t})}function m(t){return"Sets the calendar system to use with `"+t+"` date data."}var y={xcalendar:d(m("x"))},v=i.extendFlat({},y,{ycalendar:d(m("y"))}),g=i.extendFlat({},v,{zcalendar:d(m("z"))}),_=d(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:g,surface:g,mesh3d:g,scattergl:v,ohlc:y,candlestick:y},layout:{calendar:d(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:_},yaxis:{calendar:_},scene:{xaxis:{calendar:_},yaxis:{calendar:_},zaxis:{calendar:_}},polar:{radialaxis:{calendar:_}}},transforms:{filter:{valuecalendar:d(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:d(["WARNING: All transforms are deprecated and may be removed from the API in next major version.","Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:l,handleDefaults:u,handleTraceDefaults:function(t,e,r,n){for(var i=0;i<r.length;i++)u(t,e,r[i]+"calendar",n.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:f,worldCalFmt:function(t,e,r){for(var n,i,a,l,u,p=Math.floor((e+.05)/s)+o,d=f(r).fromJD(p),m=0;-1!==(m=t.indexOf("%",m));)"0"===(n=t.charAt(m+1))||"-"===n||"_"===n?(a=3,i=t.charAt(m+2),"_"===n&&(n="-")):(i=n,n="0",a=2),(l=h[i])?(u=l===c?c:d.formatDate(l[n]),t=t.substr(0,m)+u+t.substr(m+a),m+=u.length):m+=a;return t}}},2548:function(t,e){"use strict";e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11},6308:function(t,e,r){"use strict";var n=r(9760),i=r(8248),a=r(8116).isTypedArray,o=t.exports={},s=r(2548);o.defaults=s.defaults;var l=o.defaultLine=s.defaultLine;o.lightLine=s.lightLine;var u=o.background=s.background;function c(t){if(i(t)||"string"!=typeof t)return t;var e=t.trim();if("rgb"!==e.substr(0,3))return t;var r=e.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return t;var n=r[1].trim().split(/\s*[\s,]\s*/),a="a"===e.charAt(3)&&4===n.length;if(!a&&3!==n.length)return t;for(var o=0;o<n.length;o++){if(!n[o].length)return t;if(n[o]=Number(n[o]),!(n[o]>=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.interpolate=function(t,e,r){var i=n(t).toRgb(),a=n(e).toRgb(),o={r:r*i.r+(1-r)*a.r,g:r*i.g+(1-r)*a.g,b:r*i.b+(1-r)*a.b};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,u))),(i.isDark()?e?i.lighten(e):u:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e<s.length;e++)if(i=t[n=s[e]],"color"===n.substr(n.length-5))if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]=c(i[r]);else t[n]=c(i);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(i))for(r=0;r<i.length;r++)Array.isArray(i[r])&&(i[r][1]=c(i[r][1]));else if(Array.isArray(i)){var l=i[0];if(!Array.isArray(l)&&l&&"object"==typeof l)for(r=0;r<i.length;r++)o.clean(i[r])}else i&&"object"==typeof i&&!a(i)&&o.clean(i)}}},616:function(t,e,r){"use strict";var n=r(4724),i=r(5376),a=r(2880).extendFlat,o=r(7824).overrideAll;t.exports=o({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:a({},n.ticks,{dflt:""}),ticklabeloverflow:a({},n.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:i({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,minexponent:n.minexponent,showexponent:n.showexponent,title:{text:{valType:"string"},font:i({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:i({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},3964:function(t){"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},4013:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(6332),o=r(5404),s=r(5936),l=r(2568),u=r(616);t.exports=function(t,e,r){var c=i.newContainer(e,"colorbar"),h=t.colorbar||{};function p(t,e){return n.coerce(h,c,u,t,e)}var f=r.margin||{t:0,b:0,l:0,r:0},d=r.width-f.l-f.r,m=r.height-f.t-f.b,y="v"===p("orientation"),v=p("thicknessmode");p("thickness","fraction"===v?30/(y?d:m):30);var g=p("lenmode");p("len","fraction"===g?1:y?m:d);var _,x,b,w="paper"===p("yref"),T="paper"===p("xref"),k="left";y?(b="middle",k=T?"left":"right",_=T?1.02:1,x=.5):(b=w?"bottom":"top",k="center",_=.5,x=w?1.02:1),n.coerce(h,c,{x:{valType:"number",min:T?-2:0,max:T?3:1,dflt:_}},"x"),n.coerce(h,c,{y:{valType:"number",min:w?-2:0,max:w?3:1,dflt:x}},"y"),p("xanchor",k),p("xpad"),p("yanchor",b),p("ypad"),n.noneOrAll(h,c,["x","y"]),p("outlinecolor"),p("outlinewidth"),p("bordercolor"),p("borderwidth"),p("bgcolor");var M=n.coerce(h,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:y?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");p("ticklabeloverflow",-1!==M.indexOf("inside")?"hide past domain":"hide past div"),a(h,c,p,"linear");var A=r.font,S={noAutotickangles:!0,outerTicks:!1,font:A};-1!==M.indexOf("inside")&&(S.bgColor="black"),l(h,c,p,"linear",S),s(h,c,p,"linear",S),o(h,c,p,"linear",S),p("title.text",r._dfltTitle.colorbar);var L=c.showticklabels?c.tickfont:A,C=n.extendFlat({},L,{color:A.color,size:n.bigFont(L.size)});n.coerceFont(p,"title.font",C),p("title.side",y?"top":"right")}},7848:function(t,e,r){"use strict";var n=r(3428),i=r(9760),a=r(7316),o=r(4040),s=r(4460),l=r(6476),u=r(3400),c=u.strTranslate,h=r(2880).extendFlat,p=r(3972),f=r(3616),d=r(6308),m=r(1668),y=r(2736),v=r(4288).flipScale,g=r(5955),_=r(7668),x=r(4724),b=r(4284),w=b.LINE_SPACING,T=b.FROM_TL,k=b.FROM_BR,M=r(3964).cn;t.exports={draw:function(t){var e=t._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(t){var e,r,n,i,a=t._fullLayout,o=t.calcdata,s=[];function l(t){return h(t,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){"function"==typeof i.calc?i.calc(t,n,e):(e._fillgradient=r.reversescale?v(r.colorscale):r.colorscale,e._zrange=[r[i.min],r[i.max]])}for(var c=0;c<o.length;c++){var p=o[c];if((n=p[0].trace)._module){var f=n._module.colorbar;if(!0===n.visible&&f)for(var d=Array.isArray(f),m=d?f:[f],y=0;y<m.length;y++){var g=(i=m[y]).container;(r=g?n[g]:n)&&r.showscale&&((e=l(r.colorbar))._id="cb"+n.uid+(d&&g?"-"+g:""),e._traceIndex=n.index,e._propPrefix=(g?g+".":"")+"colorbar.",e._meta=n._meta,u(),s.push(e))}}}for(var _ in a._colorAxes)if((r=a[_]).showscale){var x=a._colorAxes[_];(e=l(r.colorbar))._id="cb"+_,e._propPrefix=_+".colorbar.",e._meta=a._meta,i={min:"cmin",max:"cmax"},"heatmap"!==x[0]&&(n=x[1],i.calc=n._module.colorbar.calc),u(),s.push(e)}return s}(t),(function(t){return t._id}));e.enter().append("g").attr("class",(function(t){return t._id})).classed(M.colorbar,!0),e.each((function(e){var r=n.select(this);u.ensureSingle(r,"rect",M.cbbg),u.ensureSingle(r,"g",M.cbfills),u.ensureSingle(r,"g",M.cblines),u.ensureSingle(r,"g",M.cbaxis,(function(t){t.classed(M.crisp,!0)})),u.ensureSingle(r,"g",M.cbtitleunshift,(function(t){t.append("g").classed(M.cbtitle,!0)})),u.ensureSingle(r,"rect",M.cboutline);var v=function(t,e,r){var o="v"===e.orientation,l=e.len,p=e.lenmode,v=e.thickness,b=e.thicknessmode,A=e.outlinewidth,S=e.borderwidth,L=e.bgcolor,C=e.xanchor,P=e.yanchor,I=e.xpad,E=e.ypad,D=e.x,z=o?e.y:1-e.y,O="paper"===e.yref,R="paper"===e.xref,F=r._fullLayout,B=F._size,N=e._fillcolor,U=e._line,j=e.title,V=j.side,q=e._zrange||n.extent(("function"==typeof N?N:U.color).domain()),H="function"==typeof U.color?U.color:function(){return U.color},G="function"==typeof N?N:function(){return N},Z=e._levels,Y=function(t,e,r){var n,i,a=e._levels,o=[],s=[],l=a.end+a.size/100,u=a.size,c=1.001*r[0]-.001*r[1],h=1.001*r[1]-.001*r[0];for(i=0;i<1e5&&(n=a.start+i*u,!(u>0?n>=l:n<=l));i++)n>c&&n<h&&o.push(n);if(e._fillgradient)s=[0];else if("function"==typeof e._fillcolor){var p=e._filllevels;if(p)for(l=p.end+p.size/100,u=p.size,i=0;i<1e5&&(n=p.start+i*u,!(u>0?n>=l:n<=l));i++)n>r[0]&&n<r[1]&&s.push(n);else(s=o.map((function(t){return t-a.size/2}))).push(s[s.length-1]+a.size)}else e._fillcolor&&"string"==typeof e._fillcolor&&(s=[0]);return a.size<0&&(o.reverse(),s.reverse()),{line:o,fill:s}}(0,e,q),W=Y.fill,X=Y.line,J=Math.round(v*("fraction"===b?o?B.w:B.h:1)),K=J/(o?B.w:B.h),Q=Math.round(l*("fraction"===p?o?B.h:B.w:1)),$=Q/(o?B.h:B.w),tt=R?B.w:r._fullLayout.width,et=O?B.h:r._fullLayout.height,rt=Math.round(o?D*tt+I:z*et+E),nt={center:.5,right:1}[C]||0,it={top:1,middle:.5}[P]||0,at=o?D-nt*K:z-it*K,ot=o?z-it*$:D-nt*$,st=Math.round(o?et*(1-ot):tt*ot);e._lenFrac=$,e._thickFrac=K,e._uFrac=at,e._vFrac=ot;var lt=e._axis=function(t,e,r){var n=t._fullLayout,i="v"===e.orientation,a={type:"linear",range:r,tickmode:e.tickmode,nticks:e.nticks,tick0:e.tick0,dtick:e.dtick,tickvals:e.tickvals,ticktext:e.ticktext,ticks:e.ticks,ticklen:e.ticklen,tickwidth:e.tickwidth,tickcolor:e.tickcolor,showticklabels:e.showticklabels,labelalias:e.labelalias,ticklabelposition:e.ticklabelposition,ticklabeloverflow:e.ticklabeloverflow,ticklabelstep:e.ticklabelstep,tickfont:e.tickfont,tickangle:e.tickangle,tickformat:e.tickformat,exponentformat:e.exponentformat,minexponent:e.minexponent,separatethousands:e.separatethousands,showexponent:e.showexponent,showtickprefix:e.showtickprefix,tickprefix:e.tickprefix,showticksuffix:e.showticksuffix,ticksuffix:e.ticksuffix,title:e.title,showline:!0,anchor:"free",side:i?"right":"bottom",position:1},o=i?"y":"x",s={type:"linear",_id:o+e._id},l={letter:o,font:n.font,noAutotickangles:"y"===o,noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:n.calendar};function c(t,e){return u.coerce(a,s,x,t,e)}return g(a,s,c,l,n),_(a,s,c,l),s}(r,e,q);lt.position=K+(o?D+I/B.w:z+E/B.h);var ut=-1!==["top","bottom"].indexOf(V);if(o&&ut&&(lt.title.side=V,lt.titlex=D+I/B.w,lt.titley=ot+("top"===j.side?$-E/B.h:E/B.h)),o||ut||(lt.title.side=V,lt.titley=z+E/B.h,lt.titlex=ot+I/B.w),U.color&&"auto"===e.tickmode){lt.tickmode="linear",lt.tick0=Z.start;var ct=Z.size,ht=u.constrain(Q/50,4,15)+1,pt=(q[1]-q[0])/((e.nticks||ht)*ct);if(pt>1){var ft=Math.pow(10,Math.floor(Math.log(pt)/Math.LN10));ct*=ft*u.roundUp(pt/ft,[2,5,10]),(Math.abs(Z.start)/Z.size+1e-6)%1<2e-6&&(lt.tick0=0)}lt.dtick=ct}lt.domain=o?[ot+E/B.h,ot+$-E/B.h]:[ot+I/B.w,ot+$-I/B.w],lt.setScale(),t.attr("transform",c(Math.round(B.l),Math.round(B.t)));var dt,mt=t.select("."+M.cbtitleunshift).attr("transform",c(-Math.round(B.l),-Math.round(B.t))),yt=lt.ticklabelposition,vt=lt.title.font.size,gt=t.select("."+M.cbaxis),_t=0,xt=0;function bt(n,i){var a={propContainer:lt,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:F._dfltTitle.colorbar,containerGroup:t.select("."+M.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(r,n,h(a,i||{}))}return u.syncOrAsync([a.previousPromises,function(){var t,e;(o&&ut||!o&&!ut)&&("top"===V&&(t=I+B.l+tt*D,e=E+B.t+et*(1-ot-$)+3+.75*vt),"bottom"===V&&(t=I+B.l+tt*D,e=E+B.t+et*(1-ot)-3-.25*vt),"right"===V&&(e=E+B.t+et*z+3+.75*vt,t=I+B.l+tt*ot),bt(lt._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!ut||o&&ut){var a,l=t.select("."+M.cbtitle),h=l.select("text"),p=[-A/2,A/2],d=l.select(".h"+lt._id+"title-math-group").node(),m=15.6;if(h.node()&&(m=parseInt(h.node().style.fontSize,10)*w),d?(a=f.bBox(d),xt=a.width,(_t=a.height)>m&&(p[1]-=(_t-m)/2)):h.node()&&!h.classed(M.jsPlaceholder)&&(a=f.bBox(h.node()),xt=a.width,_t=a.height),o){if(_t){if(_t+=5,"top"===V)lt.domain[1]-=_t/B.h,p[1]*=-1;else{lt.domain[0]+=_t/B.h;var v=y.lineCount(h);p[1]+=(1-v)*m}l.attr("transform",c(p[0],p[1])),lt.setScale()}}else xt&&("right"===V&&(lt.domain[0]+=(xt+vt/2)/B.w),l.attr("transform",c(p[0],p[1])),lt.setScale())}t.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",o?c(0,Math.round(B.h*(1-lt.domain[1]))):c(Math.round(B.w*lt.domain[0]),0)),gt.attr("transform",o?c(0,Math.round(-B.t)):c(Math.round(-B.l),0));var g=t.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(W);g.enter().append("rect").classed(M.cbfill,!0).attr("style",""),g.exit().remove();var _=q.map(lt.c2p).map(Math.round).sort((function(t,e){return t-e}));g.each((function(t,a){var s=[0===a?q[0]:(W[a]+W[a-1])/2,a===W.length-1?q[1]:(W[a]+W[a+1])/2].map(lt.c2p).map(Math.round);o&&(s[1]=u.constrain(s[1]+(s[1]>s[0])?1:-1,_[0],_[1]));var l=n.select(this).attr(o?"x":"y",rt).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)f.gradient(l,r,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var c=G(t).replace("e-","");l.attr("fill",i(c).toHexString())}}));var x=t.select("."+M.cblines).selectAll("path."+M.cbline).data(U.color&&U.width?X:[]);x.enter().append("path").classed(M.cbline,!0),x.exit().remove(),x.each((function(t){var e=rt,r=Math.round(lt.c2p(t))+U.width/2%1;n.select(this).attr("d","M"+(o?e+","+r:r+","+e)+(o?"h":"v")+J).call(f.lineGroupStyle,U.width,H(t),U.dash)})),gt.selectAll("g."+lt._id+"tick,path").remove();var b=rt+J+(A||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(lt),k=s.getTickSigns(lt)[2];return s.drawTicks(r,lt,{vals:"inside"===lt.ticks?s.clipEnds(lt,T):T,layer:gt,path:s.makeTickPath(lt,b,k),transFn:s.makeTransTickFn(lt)}),s.drawLabels(r,lt,{vals:T,layer:gt,transFn:s.makeTransTickLabelFn(lt),labelFns:s.makeLabelFns(lt,b)})},function(){if(o&&!ut||!o&&ut){var t,i,a=lt.position||0,s=lt._offset+lt._length/2;if("right"===V)i=s,t=B.l+tt*a+10+vt*(lt.showticklabels?1:.5);else if(t=s,"bottom"===V&&(i=B.t+et*a+10+(-1===yt.indexOf("inside")?lt.tickfont.size:0)+("intside"!==lt.ticks&&e.ticklen||0)),"top"===V){var l=j.text.split("<br>").length;i=B.t+et*a+10-J-w*vt*l}bt((o?"h":"v")+lt._id+"title",{avoid:{selection:n.select(r).selectAll("g."+lt._id+"tick"),side:V,offsetTop:o?0:B.t,offsetLeft:o?B.l:0,maxShift:o?F.width:F.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=J+A/2;-1===yt.indexOf("inside")&&(n=f.bBox(gt.node()),s+=o?n.width:n.height),dt=mt.select("text");var u=0,h=o&&"top"===V,m=!o&&"right"===V,y=0;if(dt.node()&&!dt.classed(M.jsPlaceholder)){var g,_=mt.select(".h"+lt._id+"title-math-group").node();_&&(o&&ut||!o&&!ut)?(u=(n=f.bBox(_)).width,g=n.height):(u=(n=f.bBox(mt.node())).right-B.l-(o?rt:st),g=n.bottom-B.t-(o?st:rt),o||"top"!==V||(s+=n.height,y=n.height)),m&&(dt.attr("transform",c(u/2+vt/2,0)),u*=2),s=Math.max(s,o?u:g)}var x=2*(o?I:E)+s+S+A/2,w=0;!o&&j.text&&"bottom"===P&&z<=0&&(x+=w=x/2,y+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=y;var N=S+A,U=(o?rt:st)-N/2-(o?I:0),q=(o?st:rt)-(o?Q:E+y-w);t.select("."+M.cbbg).attr("x",U).attr("y",q).attr(o?"width":"height",Math.max(x-w,2)).attr(o?"height":"width",Math.max(Q+N,2)).call(d.fill,L).call(d.stroke,e.bordercolor).style("stroke-width",S);var H=m?Math.max(u-10,0):0;t.selectAll("."+M.cboutline).attr("x",(o?rt:st+I)+H).attr("y",(o?st+E-Q:rt)+(h?_t:0)).attr(o?"width":"height",Math.max(J,2)).attr(o?"height":"width",Math.max(Q-(o?2*E+_t:2*I+H),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":A});var G=o?nt*x:0,Z=o?0:(1-it)*x-y;if(G=R?B.l-G:-G,Z=O?B.t-Z:-Z,t.attr("transform",c(G,Z)),!o&&(S||i(L).getAlpha()&&!i.equals(F.paper_bgcolor,L))){var Y=gt.selectAll("text"),W=Y[0].length,X=t.select("."+M.cbbg).node(),K=f.bBox(X),$=f.getTranslate(t);Y.each((function(t,e){var r=W-1;if(0===e||e===r){var n,i=f.bBox(this),a=f.getTranslate(this);if(e===r){var o=i.right+a.x;(n=K.right+$.x+st-S-2+D-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=K.left+$.x+st+S+2-s)<0&&(n=0)}n&&(W<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var tt={},et=T[C],at=k[C],ot=T[P],ct=k[P],ht=x-J;o?("pixels"===p?(tt.y=z,tt.t=Q*ot,tt.b=Q*ct):(tt.t=tt.b=0,tt.yt=z+l*ot,tt.yb=z-l*ct),"pixels"===b?(tt.x=D,tt.l=x*et,tt.r=x*at):(tt.l=ht*et,tt.r=ht*at,tt.xl=D-v*et,tt.xr=D+v*at)):("pixels"===p?(tt.x=D,tt.l=Q*et,tt.r=Q*at):(tt.l=tt.r=0,tt.xl=D+l*et,tt.xr=D-l*at),"pixels"===b?(tt.y=1-z,tt.t=x*ot,tt.b=x*ct):(tt.t=ht*ot,tt.b=ht*ct,tt.yt=z-v*ot,tt.yb=z+v*ct));var pt=e.y<.5?"b":"t",ft=e.x<.5?"l":"r";r._fullLayout._reservedMargin[e._id]={};var xt={r:F.width-U-G,l:U+tt.r,b:F.height-q-Z,t:q+tt.b};R&&O?a.autoMargin(r,e._id,tt):R?r._fullLayout._reservedMargin[e._id][pt]=xt[pt]:O||o?r._fullLayout._reservedMargin[e._id][ft]=xt[ft]:r._fullLayout._reservedMargin[e._id][pt]=xt[pt]}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,u=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),p(t)},moveFn:function(r,o){t.attr("transform",n+c(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/u.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/u.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var h=l.getCursor(i,a,e.xanchor,e.yanchor);p(t,h)},doneFn:function(){if(p(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},553:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t){return n.isPlainObject(t.colorbar)}},5080:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(616),supplyDefaults:r(4013),draw:r(7848).draw,hasColorbar:r(553)}},9084:function(t,e,r){"use strict";var n=r(616),i=r(3756).counter,a=r(2996),o=r(8304).scales;function s(t){return"`"+t+"`"}a(o),t.exports=function(t,e){t=t||"";var r,a=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),u="showScaleDflt"in e?e.showScaleDflt:"z"===a,c="string"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,h=e.editTypeOverride||"",p=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(p+(r={z:"z",c:"color"}[a]));var f=a+"auto",d=a+"min",m=a+"max",y=a+"mid",v=(s(p+f),s(p+d),s(p+m),{});v[d]=v[m]=void 0;var g={};g[f]=!1;var _={};return"color"===r&&(_.color={valType:"color",arrayOk:!0,editType:h||"style"},e.anim&&(_.color.anim=!0)),_[f]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},_[d]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:g},_[m]={valType:"number",dflt:null,editType:h||"plot",impliedEdits:g},_[y]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},_.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},_.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},_.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(_.showscale={valType:"boolean",dflt:u,editType:"calc"},_.colorbar=n),e.noColorAxis||(_.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),_}},7128:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(4288).extractOpts;t.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,u=r.containerStr,c=u?i.nestedProperty(e,u).get():e,h=a(c),p=!1!==h.auto,f=h.min,d=h.max,m=h.mid,y=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};void 0===f?f=y():p&&(f=c._colorAx&&n(f)?Math.min(f,y()):y()),void 0===d?d=v():p&&(d=c._colorAx&&n(d)?Math.max(d,v()):v()),p&&void 0!==m&&(d-m>m-f?f=m-(d-m):d-m<m-f&&(d=m+(m-f))),f===d&&(f-=.5,d+=.5),h._sync("min",f),h._sync("max",d),h.autocolorscale&&(o=f*d<0?s.colorscale.diverging:f>=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}},5504:function(t,e,r){"use strict";var n=r(3400),i=r(4288).hasColorscale,a=r(4288).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s<t.length;s++){var l=t[s],u=l._module.colorbar;if(u)if(Array.isArray(u))for(var c=0;c<u.length;c++)o(l,u[c]);else o(l,u);i(l,"marker.line")&&o(l,{container:"marker.line",min:"cmin",max:"cmax"})}for(var h in e._colorAxes)o(e[h],{min:"cmin",max:"cmax"})}},7260:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(553),o=r(4013),s=r(8304).isValid,l=r(4040).traceIs;function u(t,e){var r=e.slice(0,e.length-1);return e?i.nestedProperty(t,r).get()||{}:t}t.exports=function t(e,r,c,h,p){var f=p.prefix,d=p.cLetter,m="_module"in r,y=u(e,f),v=u(r,f),g=u(r._template||{},f)||{},_=function(){return delete e.coloraxis,delete r.coloraxis,t(e,r,c,h,p)};if(m){var x=c._colorAxes||{},b=h(f+"coloraxis");if(b){var w=l(r,"contour")&&i.nestedProperty(r,"contours.coloring").get()||"heatmap",T=x[b];return void(T?(T[2].push(_),T[0]!==w&&(T[0]=!1,i.warn(["Ignoring coloraxis:",b,"setting","as it is linked to incompatible colorscales."].join(" ")))):x[b]=[w,r,[_]])}}var k=y[d+"min"],M=y[d+"max"],A=n(k)&&n(M)&&k<M;h(f+d+"auto",!A)?h(f+d+"mid"):(h(f+d+"min"),h(f+d+"max"));var S,L,C=y.colorscale,P=g.colorscale;void 0!==C&&(S=!s(C)),void 0!==P&&(S=!s(P)),h(f+"autocolorscale",S),h(f+"colorscale"),h(f+"reversescale"),"marker.line."!==f&&(f&&m&&(L=a(y)),h(f+"showscale",L)&&(f&&g&&(v._template=g),o(y,v,c)))}},4288:function(t,e,r){"use strict";var n=r(3428),i=r(9760),a=r(8248),o=r(3400),s=r(6308),l=r(8304).isValid,u=["showscale","autocolorscale","colorscale","reversescale","colorbar"],c=["min","max","mid","auto"];function h(t){var e,r,n,i=t._colorAx,a=i||t,o={};for(r=0;r<u.length;r++)o[n=u[r]]=a[n];if(i)for(e="c",r=0;r<c.length;r++)o[n=c[r]]=a["c"+n];else{var s;for(r=0;r<c.length;r++)((s="c"+(n=c[r]))in a||(s="z"+n)in a)&&(o[n]=a[s]);e=s.charAt(0)}return o._sync=function(t,r){var n=-1!==c.indexOf(t)?e+t:t;a[n]=a["_"+n]=r},o}function p(t){for(var e=h(t),r=e.min,n=e.max,i=e.reversescale?f(e.colorscale):e.colorscale,a=i.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var u=i[l];o[l]=r+u[0]*(n-r),s[l]=u[1]}return{domain:o,range:s}}function f(t){for(var e=t.length,r=new Array(e),n=e-1,i=0;n>=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,u=new Array(l),c=0;c<l;c++){var h=i(o[c]).toRgb();u[c]=[h.r,h.g,h.b,h.a]}var p,f=n.scale.linear().domain(r).range(u).clamp(!0),d=e.noNumericCheck,y=e.returnArray;return(p=d&&y?f:d?function(t){return m(f(t))}:y?function(t){return a(t)?f(t):i(t).isValid()?t:s.defaultLine}:function(t){return a(t)?m(f(t)):i(t).isValid()?t:s.defaultLine}).domain=f.domain,p.range=function(){return o},p}function m(t){var e={r:t[0],g:t[1],b:t[2],a:t[3]};return i(e).toRgbString()}t.exports={hasColorscale:function(t,e,r){var n=e?o.nestedProperty(t,e).get()||{}:t,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var s=!1;if(o.isArrayOrTypedArray(i))for(var u=0;u<i.length;u++)if(a(i[u])){s=!0;break}return o.isPlainObject(n)&&(s||!0===n.showscale||a(n.cmin)&&a(n.cmax)||l(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:h,extractScale:p,flipScale:f,makeColorScaleFunc:d,makeColorScaleFuncFromTrace:function(t,e){return d(p(t),e)}}},8932:function(t,e,r){"use strict";var n=r(8304),i=r(4288);t.exports={moduleType:"component",name:"colorscale",attributes:r(9084),layoutAttributes:r(2332),supplyLayoutDefaults:r(1608),handleDefaults:r(7260),crossTraceDefaults:r(5504),calc:r(7128),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}},2332:function(t,e,r){"use strict";var n=r(2880).extendFlat,i=r(9084),a=r(8304).scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:a.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:a.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:a.RdBu,editType:"calc"}},coloraxis:n({_isSubplotObj:!0,editType:"calc"},i("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},1608:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(2332),o=r(7260);t.exports=function(t,e){function r(r,i){return n.coerce(t,e,a,r,i)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,u=e._colorAxes;function c(t,e){return n.coerce(s,l,a.coloraxis,t,e)}for(var h in u){var p=u[h];if(p[0])s=t[h]||{},(l=i.newContainer(e,h,"coloraxis"))._name=h,o(s,l,e,c,{prefix:"",cLetter:"c"});else{for(var f=0;f<p[2].length;f++)p[2][f]();delete e._colorAxes[h]}}}},8304:function(t,e,r){"use strict";var n=r(9760),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},a=i.RdBu;function o(t){var e=0;if(!Array.isArray(t)||t.length<2)return!1;if(!t[0]||!t[t.length-1])return!1;if(0!=+t[0][0]||1!=+t[t.length-1][0])return!1;for(var r=0;r<t.length;r++){var i=t[r];if(2!==i.length||+i[0]<e||!n(i[1]).isValid())return!1;e=+i[0]}return!0}t.exports={scales:i,defaultScale:a,get:function(t,e){if(e||(e=a),!t)return e;function r(){try{t=i[t]||JSON.parse(t)}catch(r){t=e}}return"string"==typeof t&&(r(),"string"==typeof t&&r()),o(t)?t:e},isValid:function(t){return void 0!==i[t]||o(t)}}},8316:function(t){"use strict";t.exports=function(t,e,r,n,i){var a=(t-r)/(n-r),o=a+e/(n-r),s=(a+o)/2;return"left"===i||"bottom"===i?a:"center"===i||"middle"===i?s:"right"===i||"top"===i?o:a<2/3-s?a:o>4/3-s?o:s}},7416:function(t,e,r){"use strict";var n=r(3400),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},2760:function(t,e){"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},6476:function(t,e,r){"use strict";var n=r(9128),i=r(2264),a=r(9184),o=r(3400).removeElement,s=r(3816),l=t.exports={};l.align=r(8316),l.getCursor=r(7416);var u=r(2616);function c(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function h(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(t){var e,r,n,u,p,f,d,m,y=t.gd,v=1,g=y._context.doubleClickDelay,_=t.element;y._mouseDownTime||(y._mouseDownTime=0),_.style.pointerEvents="all",_.onmousedown=b,a?(_._ontouchstart&&_.removeEventListener("touchstart",_._ontouchstart),_._ontouchstart=b,_.addEventListener("touchstart",b,{passive:!1})):_.ontouchstart=b;var x=t.clampFn||function(t,e,r){return Math.abs(t)<r&&(t=0),Math.abs(e)<r&&(e=0),[t,e]};function b(a){y._dragged=!1,y._dragging=!0;var o=h(a);e=o[0],r=o[1],d=a.target,f=a,m=2===a.buttons||a.ctrlKey,void 0===a.clientX&&void 0===a.clientY&&(a.clientX=e,a.clientY=r),(n=(new Date).getTime())-y._mouseDownTime<g?v+=1:(v=1,y._mouseDownTime=n),t.prepFn&&t.prepFn(a,e,r),i&&!m?(p=c()).style.cursor=window.getComputedStyle(_).cursor:i||(p=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(_).cursor),document.addEventListener("mouseup",T),document.addEventListener("touchend",T),!1!==t.dragmode&&(a.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(n){n.preventDefault();var i=h(n),a=t.minDrag||s.MINDRAG,o=x(i[0]-e,i[1]-r,a),u=o[0],c=o[1];(u||c)&&(y._dragged=!0,l.unhover(y,n)),y._dragged&&t.moveFn&&!m&&(y._dragdata={element:_,dx:u,dy:c},t.moveFn(u,c))}function T(e){if(delete y._dragdata,!1!==t.dragmode&&(e.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T),i?o(p):u&&(p.documentElement.style.cursor=u,u=null),y._dragging){if(y._dragging=!1,(new Date).getTime()-y._mouseDownTime>g&&(v=Math.max(v-1,1)),y._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,f),!m){var r;try{r=new MouseEvent("click",e)}catch(t){var n=h(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}y._dragging=!1,y._dragged=!1}else y._dragged=!1}},l.coverSlip=c},2616:function(t,e,r){"use strict";var n=r(5924),i=r(1200),a=r(2200).getGraphDiv,o=r(2456),s=t.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},8192:function(t,e){"use strict";e.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},3616:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=i.numberFormat,o=r(8248),s=r(9760),l=r(4040),u=r(6308),c=r(8932),h=i.strTranslate,p=r(2736),f=r(9616),d=r(4284).LINE_SPACING,m=r(3448).DESELECTDIM,y=r(3028),v=r(7152),g=r(624).appendArrayPointValue,_=t.exports={};function x(t,e,r,n){var i=e.fillpattern,a=e.fillgradient,o=i&&_.getPatternAttr(i.shape,0,"");if(o){var s=_.getPatternAttr(i.bgcolor,0,null),l=_.getPatternAttr(i.fgcolor,0,null),c=i.fgopacity,h=_.getPatternAttr(i.size,0,8),p=_.getPatternAttr(i.solidity,0,.3),f=e.uid;_.pattern(t,"point",r,f,o,h,p,void 0,i.fillmode,s,l,c)}else if(a&&"none"!==a.type){var d,m,y=a.type,v="scatterfill-"+e.uid;n&&(v="legendfill-"+e.uid),n||void 0===a.start&&void 0===a.stop?("horizontal"===y&&(y+="reversed"),t.call(_.gradient,r,v,y,a.colorscale,"fill")):("horizontal"===y?(d={x:a.start,y:0},m={x:a.stop,y:0}):"vertical"===y&&(d={x:0,y:a.start},m={x:0,y:a.stop}),d.x=e._xA.c2p(void 0===d.x?e._extremes.x.min[0].val:d.x,!0),d.y=e._yA.c2p(void 0===d.y?e._extremes.y.min[0].val:d.y,!0),m.x=e._xA.c2p(void 0===m.x?e._extremes.x.max[0].val:m.x,!0),m.y=e._yA.c2p(void 0===m.y?e._extremes.y.max[0].val:m.y,!0),t.call(A,r,v,"linear",a.colorscale,"fill",d,m,!0,!1))}else e.fillcolor&&t.call(u.fill,e.fillcolor)}_.font=function(t,e,r,n){i.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(u.fill,n)},_.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},_.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},_.setRect=function(t,e,r,n,i){t.call(_.setPosition,e,r).call(_.setSize,n,i)},_.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",h(i,a)),!0)},_.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);_.translatePoint(t,i,e,r)}))},_.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},_.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,u=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(u).each((function(t){_.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},_.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},_.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";u.stroke(e,n||a.color),_.dashLine(e,s,o)},_.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(u.stroke,r||a.color).call(_.dashLine,s,o)}))},_.dashLine=function(t,e,r){r=+r||0,e=_.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},_.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},_.singleFillStyle=function(t,e){var r=n.select(t.node());x(t,((r.data()[0]||[])[0]||{}).trace||{},e,!1)},_.fillGroupStyle=function(t,e,r){t.style("stroke-width",0).each((function(t){var i=n.select(this);t[0].trace&&x(i,t[0].trace,e,r)}))};var b=r(1984);_.symbolNames=[],_.symbolFuncs=[],_.symbolBackOffs=[],_.symbolNeedLines={},_.symbolNoDot={},_.symbolNoFill={},_.symbolList=[],Object.keys(b).forEach((function(t){var e=b[t],r=e.n;_.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),_.symbolNames[r]=t,_.symbolFuncs[r]=e.f,_.symbolBackOffs[r]=e.backoff||0,e.needLine&&(_.symbolNeedLines[r]=!0),e.noDot?_.symbolNoDot[r]=!0:_.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(_.symbolNoFill[r]=!0)}));var w=_.symbolNames.length;function T(t,e,r,n){var i=t%100;return _.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}_.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=_.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var k=a("~f"),M={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function A(t,e,r,a,o,l,c,h,p,f){var d,m=o.length;"linear"===a?d={node:"linearGradient",attrs:{x1:c.x,y1:c.y,x2:h.x,y2:h.y,gradientUnits:p?"userSpaceOnUse":"objectBoundingBox"},reversed:f}:"radial"===a&&(d={node:"radialGradient",reversed:f});for(var y=new Array(m),v=0;v<m;v++)d.reversed?y[m-1-v]=[k(100*(1-o[v][0])),o[v][1]]:y[v]=[k(100*o[v][0]),o[v][1]];var g=e._fullLayout,_="g"+g._uid+"-"+r,x=g._defs.select(".gradients").selectAll("#"+_).data([a+y.join(";")],i.identity);x.exit().remove(),x.enter().append(d.node).each((function(){var t=n.select(this);d.attrs&&t.attr(d.attrs),t.attr("id",_);var e=t.selectAll("stop").data(y);e.exit().remove(),e.enter().append("stop"),e.each((function(t){var e=s(t[1]);n.select(this).attr({offset:t[0]+"%","stop-color":u.tinyRGB(e),"stop-opacity":e.getAlpha()})}))})),t.style(l,j(_,e)).style(l+"-opacity",null),t.classed("gradient_filled",!0)}_.gradient=function(t,e,r,n,i,a){var o=M[n];return A(t,e,r,o.type,i,a,o.start,o.stop,!1,o.reversed)},_.pattern=function(t,e,r,a,o,l,c,h,p,f,d,m){var y="legend"===e;h&&("overlay"===p?(f=h,d=u.contrast(f)):(f=void 0,d=h));var v,g,_,x,b,w,T,k,M,A=r._fullLayout,S="p"+A._uid+"-"+a,L={},C=s(d),P=u.tinyRGB(C),I=m*C.getAlpha();switch(o){case"/":v=l*Math.sqrt(2),g=l*Math.sqrt(2),w="path",L={d:_="M-"+v/4+","+g/4+"l"+v/2+",-"+g/2+"M0,"+g+"L"+v+",0M"+v/4*3+","+g/4*5+"l"+v/2+",-"+g/2,opacity:I,stroke:P,"stroke-width":(x=c*l)+"px"};break;case"\\":v=l*Math.sqrt(2),g=l*Math.sqrt(2),w="path",L={d:_="M"+v/4*3+",-"+g/4+"l"+v/2+","+g/2+"M0,0L"+v+","+g+"M-"+v/4+","+g/4*3+"l"+v/2+","+g/2,opacity:I,stroke:P,"stroke-width":(x=c*l)+"px"};break;case"x":v=l*Math.sqrt(2),g=l*Math.sqrt(2),_="M-"+v/4+","+g/4+"l"+v/2+",-"+g/2+"M0,"+g+"L"+v+",0M"+v/4*3+","+g/4*5+"l"+v/2+",-"+g/2+"M"+v/4*3+",-"+g/4+"l"+v/2+","+g/2+"M0,0L"+v+","+g+"M-"+v/4+","+g/4*3+"l"+v/2+","+g/2,x=l-l*Math.sqrt(1-c),w="path",L={d:_,opacity:I,stroke:P,"stroke-width":x+"px"};break;case"|":w="path",w="path",L={d:_="M"+(v=l)/2+",0L"+v/2+","+(g=l),opacity:I,stroke:P,"stroke-width":(x=c*l)+"px"};break;case"-":w="path",w="path",L={d:_="M0,"+(g=l)/2+"L"+(v=l)+","+g/2,opacity:I,stroke:P,"stroke-width":(x=c*l)+"px"};break;case"+":w="path",_="M"+(v=l)/2+",0L"+v/2+","+(g=l)+"M0,"+g/2+"L"+v+","+g/2,x=l-l*Math.sqrt(1-c),w="path",L={d:_,opacity:I,stroke:P,"stroke-width":x+"px"};break;case".":v=l,g=l,c<Math.PI/4?b=Math.sqrt(c*l*l/Math.PI):(T=c,k=Math.PI/4,1,b=(M=l/2)+(l/Math.sqrt(2)-M)*(T-k)/(1-k)),w="circle",L={cx:v/2,cy:g/2,r:b,opacity:I,fill:P}}var E=[o||"noSh",f||"noBg",d||"noFg",l,c].join(";"),D=A._defs.select(".patterns").selectAll("#"+S).data([E],i.identity);D.exit().remove(),D.enter().append("pattern").each((function(){var t=n.select(this);if(t.attr({id:S,width:v+"px",height:g+"px",patternUnits:"userSpaceOnUse",patternTransform:y?"scale(0.8)":""}),f){var e=s(f),r=u.tinyRGB(e),i=e.getAlpha(),a=t.selectAll("rect").data([0]);a.exit().remove(),a.enter().append("rect").attr({width:v+"px",height:g+"px",fill:r,"fill-opacity":i})}var o=t.selectAll(w).data([0]);o.exit().remove(),o.enter().append(w).attr(L)})),t.style("fill",j(S,r)).style("fill-opacity",null),t.classed("pattern_filled",!0)},_.initGradients=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),n.select(t).selectAll(".gradient_filled").classed("gradient_filled",!1)},_.initPatterns=function(t){var e=t._fullLayout;i.ensureSingle(e._defs,"g","patterns").selectAll("pattern").remove(),n.select(t).selectAll(".pattern_filled").classed("pattern_filled",!1)},_.getPatternAttr=function(t,e,r){return t&&i.isArrayOrTypedArray(t)?e<t.length?t[e]:r:t},_.pointStyle=function(t,e,r,i){if(t.size()){var a=_.makePointStyleFns(e);t.each((function(t){_.singlePointStyle(t,n.select(this),e,a,r,i)}))}},_.singlePointStyle=function(t,e,r,n,a,o){var s=r.marker,l=s.line;if(o&&o.i>=0&&void 0===t.i&&(t.i=o.i),e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?s.opacity:t.mo),n.ms2mrc){var c;c="various"===t.ms||"various"===s.size?3:n.ms2mrc(t.ms),t.mrc=c,n.selectedSizeFn&&(c=t.mrc=n.selectedSizeFn(t));var h=_.symbolNumber(t.mx||s.symbol)||0;t.om=h%200>=100;var p=et(t,r),f=H(t,r);e.attr("d",T(h,c,p,f))}var d,m,y,v=!1;if(t.so)y=l.outlierwidth,m=l.outliercolor,d=s.outliercolor;else{var g=(l||{}).width;y=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(l.color)?u.defaultLine:l.color,i.isArrayOrTypedArray(s.color)&&(d=u.defaultLine,v=!0),d="mc"in t?t.mcc=n.markerScale(t.mc):s.color||s.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(t))}if(t.om)e.call(u.stroke,d).style({"stroke-width":(y||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:y)+"px");var x=s.gradient,b=t.mgt;b?v=!0:b=x&&x.type,i.isArrayOrTypedArray(b)&&(b=b[0],M[b]||(b=0));var w=s.pattern,k=w&&_.getPatternAttr(w.shape,t.i,"");if(b&&"none"!==b){var A=t.mgc;A?v=!0:A=x.color;var S=r.uid;v&&(S+="-"+t.i),_.gradient(e,a,S,b,[[0,A],[1,d]],"fill")}else if(k){var L=!1,C=w.fgcolor;!C&&o&&o.color&&(C=o.color,L=!0);var P=_.getPatternAttr(C,t.i,o&&o.color||null),I=_.getPatternAttr(w.bgcolor,t.i,null),E=w.fgopacity,D=_.getPatternAttr(w.size,t.i,8),z=_.getPatternAttr(w.solidity,t.i,.3);L=L||t.mcc||i.isArrayOrTypedArray(w.shape)||i.isArrayOrTypedArray(w.bgcolor)||i.isArrayOrTypedArray(w.fgcolor)||i.isArrayOrTypedArray(w.size)||i.isArrayOrTypedArray(w.solidity);var O=r.uid;L&&(O+="-"+t.i),_.pattern(e,"point",a,O,k,D,z,t.mcc,w.fillmode,I,P,E)}else i.isArrayOrTypedArray(d)?u.fill(e,d[t.i]):u.fill(e,d);y&&u.stroke(e,m)}},_.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=_.tryColorscale(r,""),e.lineScale=_.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=y.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,_.makeSelectedPointStyleFns(t)),e},_.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,h=s.opacity,p=void 0!==c,f=void 0!==h;(i.isArrayOrTypedArray(u)||p||f)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?p?c:e:f?h:m*e});var d=a.color,y=o.color,v=s.color;(y||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?y||e:v||e});var g=a.size,_=o.size,x=s.size,b=void 0!==_,w=void 0!==x;return l.traceIs(t,"symbols")&&(b||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||g/2;return t.selected?b?_/2:e:w?x/2:e}),e},_.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:c||(l?e:u.addOpacity(e,m))},e},_.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=_.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){u.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr("d",T(_.symbolNumber(a),o,et(n,e),H(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r<a.length;r++)a[r](e,t)}))}},_.tryColorscale=function(t,e){var r=e?i.nestedProperty(t,e).get():t;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&i.isArrayOrTypedArray(n))return c.makeColorScaleFuncFromTrace(r)}return i.identity};var S,L,C={start:1,end:-1,middle:0,bottom:1,top:-1};function P(t,e,r,i,a){var o=n.select(t.node().parentNode),s=-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle",l=-1!==e.indexOf("left")?"end":-1!==e.indexOf("right")?"start":"middle",u=i?i/.8+1:0,c=(p.lineCount(t)-1)*d+1,f=C[l]*u,m=.75*r+C[s]*u+(C[s]-1)*c*r/2;t.attr("text-anchor",l),a||o.attr("transform",h(f,m))}function I(t,e){var r=t.ts||e.textfont.size;return o(r)&&r>0?r:0}function E(t,e,r){return r&&(t=B(t)),e?z(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return S=e,e}function z(t){var e=n.round(t,2);return L=e,e}function O(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,h=(u*u*a-l*l*s)*n,p=3*u*(l+u),f=3*l*(l+u);return[[D(e[0]+(p&&c/p)),z(e[1]+(p&&h/p))],[D(e[0]-(f&&c/f)),z(e[1]-(f&&h/f))]]}_.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=_.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),u=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(u||0===u){if(s){var c=e._module.formatLabels,h=c?c(t,e,l):{},f={};g(f,e,t.i);var d=e._meta||{};u=i.texttemplateString(u,h,l._d3locale,f,t,d)}var m=t.tp||e.textposition,y=I(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(_.font,t.tf||e.textfont.family,y,v).text(u).call(p.convertToTspans,r).call(P,m,y,t.mrc)}else o.remove()}))}},_.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=_.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=I(t,e);u.fill(i,a);var c=l.traceIs(e,"bar-like");P(i,o,s,t.mrc2||t.mrc,c)}))}},_.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r<t.length-1;r++)i.push(O(t[r-1],t[r],t[r+1],e));for(n+="Q"+i[0][0]+" "+t[1],r=2;r<t.length-1;r++)n+="C"+i[r-2][1]+" "+i[r-1][0]+" "+t[r];return n+"Q"+i[t.length-3][1]+" "+t[t.length-1]},_.smoothclosed=function(t,e){if(t.length<3)return"M"+t.join("L")+"Z";var r,n="M"+t[0],i=t.length-1,a=[O(t[i],t[0],t[1],e)];for(r=1;r<i;r++)a.push(O(t[r-1],t[r],t[r+1],e));for(a.push(O(t[i-1],t[i],t[0],e)),r=1;r<=i;r++)n+="C"+a[r-1][1]+" "+a[r][0]+" "+t[r];return n+"C"+a[i][1]+" "+a[0][0]+" "+t[0]+"Z"};var R={hv:function(t,e,r){return"H"+D(e[0])+"V"+E(e,1,r)},vh:function(t,e,r){return"V"+z(e[1])+"H"+E(e,0,r)},hvh:function(t,e,r){return"H"+D((t[0]+e[0])/2)+"V"+z(e[1])+"H"+E(e,0,r)},vhv:function(t,e,r){return"V"+z((t[1]+e[1])/2)+"H"+D(e[0])+"V"+E(e,1,r)}},F=function(t,e,r){return"L"+E(e,0,r)+","+E(e,1,r)};function B(t,e){var r=t.backoff,n=t.trace,a=t.d,o=t.i;if(r&&n&&n.marker&&n.marker.angle%360==0&&n.line&&"spline"!==n.line.shape){var s=i.isArrayOrTypedArray(r),l=t,u=e?e[0]:S||0,c=e?e[1]:L||0,h=l[0],p=l[1],f=h-u,d=p-c,m=Math.atan2(d,f),y=s?r[o]:r;if("auto"===y){var v=l.i;"scatter"===n.type&&v--;var g=l.marker,x=g.symbol;i.isArrayOrTypedArray(x)&&(x=x[v]);var b=g.size;i.isArrayOrTypedArray(b)&&(b=b[v]),y=g?_.symbolBackOffs[_.symbolNumber(x)]*b:0,y+=_.getMarkerStandoff(a[v],n)||0}var w=h-y*Math.cos(m),T=p-y*Math.sin(m);(w<=h&&w>=u||w>=h&&w<=u)&&(T<=p&&T>=c||T>=p&&T<=c)&&(t=[w,T])}return t}_.steps=function(t){var e=R[t]||F;return function(t){for(var r="M"+D(t[0][0])+","+z(t[0][1]),n=t.length,i=1;i<n;i++)r+=e(t[i-1],t[i],i===n-1);return r}},_.applyBackoff=B,_.makeTester=function(){var t=i.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(t){t.attr(f.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),e=i.ensureSingle(t,"path","js-reference-point",(function(t){t.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));_.tester=t,_.testref=e},_.savedBBoxes={};var N=0;function U(t){var e=t.getAttribute("data-unformatted");if(null!==e)return e+t.getAttribute("data-math")+t.getAttribute("text-anchor")+t.getAttribute("style")}function j(t,e){if(!t)return null;var r=e._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+t+"')":"url(#"+t+")"}_.bBox=function(t,e,r){var a,o,s;if(r||(r=U(t)),r){if(a=_.savedBBoxes[r])return i.extendFlat({},a)}else if(1===t.childNodes.length){var l=t.childNodes[0];if(r=U(l)){var u=+l.getAttribute("x")||0,c=+l.getAttribute("y")||0,h=l.getAttribute("transform");if(!h){var f=_.bBox(l,!1,r);return u&&(f.left+=u,f.right+=u),c&&(f.top+=c,f.bottom+=c),f}if(r+="~"+u+"~"+c+"~"+h,a=_.savedBBoxes[r])return i.extendFlat({},a)}}e?o=t:(s=_.tester.node(),o=t.cloneNode(!0),s.appendChild(o)),n.select(o).attr("transform",null).call(p.positionText,0,0);var d=o.getBoundingClientRect(),m=_.testref.node().getBoundingClientRect();e||s.removeChild(o);var y={height:d.height,width:d.width,left:d.left-m.left,top:d.top-m.top,right:d.right-m.left,bottom:d.bottom-m.top};return N>=1e4&&(_.savedBBoxes={},N=0),r&&(_.savedBBoxes[r]=y),N++,i.extendFlat({},y)},_.setClipUrl=function(t,e,r){t.attr("clip-path",j(e,r))},_.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},_.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=h(e,r)).trim(),t[i]("transform",a),a},_.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},_.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var V=/\s*sc.*/;_.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(V,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var q=/translate\([^)]*\)\s*$/;function H(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}_.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(q);t=1===e&&1===r?[]:[h(o,s),"scale("+e+","+r+")",h(-o,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},_.getMarkerStandoff=H;var G,Z,Y,W,X,J,K=Math.atan2,Q=Math.cos,$=Math.sin;function tt(t,e){var r=e[0],n=e[1];return[r*Q(t)-n*$(t),r*$(t)+n*Q(t)]}function et(t,e){var r,n,a=t.ma;void 0===a&&((a=e.marker.angle)&&!i.isArrayOrTypedArray(a)||(a=0));var s=e.marker.angleref;if("previous"===s||"north"===s){if(e._geo){var l=e._geo.project(t.lonlat);r=l[0],n=l[1]}else{var u=e._xA,c=e._yA;if(!u||!c)return 90;r=u.c2p(t.x),n=c.c2p(t.y)}if(e._geo){var h,p=t.lonlat[0],f=t.lonlat[1],d=e._geo.project([p,f+1e-5]),m=e._geo.project([p+1e-5,f]),y=K(m[1]-n,m[0]-r),v=K(d[1]-n,d[0]-r);if("north"===s)h=a/180*Math.PI;else if("previous"===s){var g=p/180*Math.PI,_=f/180*Math.PI,x=G/180*Math.PI,b=Z/180*Math.PI,w=x-g,T=Q(b)*$(w),k=$(b)*Q(_)-Q(b)*$(_)*Q(w);h=-K(T,k)-Math.PI,G=p,Z=f}var M=tt(y,[Q(h),0]),A=tt(v,[$(h),0]);a=K(M[1]+A[1],M[0]+A[0])/Math.PI*180,"previous"!==s||J===e.uid&&t.i===X+1||(a=null)}if("previous"===s&&!e._geo)if(J===e.uid&&t.i===X+1&&o(r)&&o(n)){var S=r-Y,L=n-W,C=e.line&&e.line.shape||"",P=C.slice(C.length-1);"h"===P&&(L=0),"v"===P&&(S=0),a+=K(L,S)/Math.PI*180+90}else a=null}return Y=r,W=n,X=t.i,J=e.uid,a}_.getMarkerAngle=et},1984:function(t,e,r){"use strict";var n,i,a,o,s=r(9604),l=r(3428).round,u="M0,0Z",c=Math.sqrt(2),h=Math.sqrt(3),p=Math.PI,f=Math.cos,d=Math.sin;function m(t){return null===t}function y(t,e,r){if(!(t&&t%360!=0||e))return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=f(t),i=d(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var u=t/180*p,c=0,h=0,m=s(r),y="",v=0;v<m.length;v++){var g=m[v],_=g[0],x=c,b=h;if("M"===_||"L"===_)c=+g[1],h=+g[2];else if("m"===_||"l"===_)c+=+g[1],h+=+g[2];else if("H"===_)c=+g[1];else if("h"===_)c+=+g[1];else if("V"===_)h=+g[1];else if("v"===_)h+=+g[1];else if("A"===_){c=+g[1],h=+g[2];var w=l(u,[+g[6],+g[7]]);g[6]=w[0],g[7]=w[1],g[3]=+g[3]+t}"H"!==_&&"V"!==_||(_="L"),"h"!==_&&"v"!==_||(_="l"),"m"!==_&&"l"!==_||(c-=x,h-=b);var T=l(u,[c,h]);"H"!==_&&"V"!==_||(_="L"),"M"!==_&&"L"!==_&&"m"!==_&&"l"!==_||(g[1]=T[0],g[2]=T[1]),g[0]=_,y+=g[0]+g.slice(1).join(",")}return i=y,y}t.exports={circle:{n:0,f:function(t,e,r){if(m(e))return u;var n=l(t,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?y(e,r,i):i}},square:{n:1,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(t,e,r){if(m(e))return u;var n=l(1.3*t,2);return y(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(t,e,r){if(m(e))return u;var n=l(.4*t,2),i=l(1.2*t,2);return y(e,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(t,e,r){if(m(e))return u;var n=l(.8*t/c,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return y(e,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(t,e,r){if(m(e))return u;var n=l(2*t/h,2);return y(e,r,"M-"+n+","+l(t/2,2)+"H"+n+"L0,-"+l(t,2)+"Z")}},"triangle-down":{n:6,f:function(t,e,r){if(m(e))return u;var n=l(2*t/h,2);return y(e,r,"M-"+n+",-"+l(t/2,2)+"H"+n+"L0,"+l(t,2)+"Z")}},"triangle-left":{n:7,f:function(t,e,r){if(m(e))return u;var n=l(2*t/h,2);return y(e,r,"M"+l(t/2,2)+",-"+n+"V"+n+"L-"+l(t,2)+",0Z")}},"triangle-right":{n:8,f:function(t,e,r){if(m(e))return u;var n=l(2*t/h,2);return y(e,r,"M-"+l(t/2,2)+",-"+n+"V"+n+"L"+l(t,2)+",0Z")}},"triangle-ne":{n:9,f:function(t,e,r){if(m(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return y(e,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(t,e,r){if(m(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return y(e,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(t,e,r){if(m(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return y(e,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(t,e,r){if(m(e))return u;var n=l(.6*t,2),i=l(1.2*t,2);return y(e,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(t,e,r){if(m(e))return u;var n=l(.951*t,2),i=l(.588*t,2),a=l(-t,2),o=l(-.309*t,2);return y(e,r,"M"+n+","+o+"L"+i+","+l(.809*t,2)+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(t,e,r){if(m(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*h/2,2);return y(e,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(t,e,r){if(m(e))return u;var n=l(t,2),i=l(t/2,2),a=l(t*h/2,2);return y(e,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(t,e,r){if(m(e))return u;var n=l(.924*t,2),i=l(.383*t,2);return y(e,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(t,e,r){if(m(e))return u;var n=1.4*t,i=l(.225*n,2),a=l(.951*n,2),o=l(.363*n,2),s=l(.588*n,2),c=l(-n,2),h=l(-.309*n,2),p=l(.118*n,2),f=l(.809*n,2);return y(e,r,"M"+i+","+h+"H"+a+"L"+o+","+p+"L"+s+","+f+"L0,"+l(.382*n,2)+"L-"+s+","+f+"L-"+o+","+p+"L-"+a+","+h+"H-"+i+"L0,"+c+"Z")}},hexagram:{n:18,f:function(t,e,r){if(m(e))return u;var n=l(.66*t,2),i=l(.38*t,2),a=l(.76*t,2);return y(e,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(t,e,r){if(m(e))return u;var n=l(t*h*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return y(e,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(t,e,r){if(m(e))return u;var n=l(t*h*.8,2),i=l(.8*t,2),a=l(1.6*t,2),o=l(4*t,2),s="A "+o+","+o+" 0 0 1 ";return y(e,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(t,e,r){if(m(e))return u;var n=l(1.1*t,2),i=l(2*t,2),a="A "+i+","+i+" 0 0 1 ";return y(e,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(t,e,r){if(m(e))return u;var n=l(1.4*t,2),i=l(1.9*t,2),a="A "+i+","+i+" 0 0 1 ";return y(e,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(t,e,r){if(m(e))return u;var n=l(.7*t,2),i=l(1.4*t,2);return y(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(t,e,r){if(m(e))return u;var n=l(1.4*t,2),i=l(.7*t,2);return y(e,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t,e,r){if(m(e))return u;var n=l(t,2),i=l(t/c,2);return y(e,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t,e,r){if(m(e))return u;var n=l(1.3*t,2);return y(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t,e,r){if(m(e))return u;var n=l(1.3*t,2),i=l(.65*t,2);return y(e,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t,e,r){if(m(e))return u;var n=l(1.4*t,2);return y(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t,e,r){if(m(e))return u;var n=l(1.2*t,2),i=l(.85*t,2);return y(e,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t,e,r){if(m(e))return u;var n=l(t/2,2),i=l(t,2);return y(e,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t,e,r){if(m(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return y(e,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t,e,r){if(m(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return y(e,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t,e,r){if(m(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return y(e,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t,e,r){if(m(e))return u;var n=l(1.2*t,2),i=l(1.6*t,2),a=l(.8*t,2);return y(e,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t,e,r){if(m(e))return u;var n=l(1.4*t,2);return y(e,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t,e,r){if(m(e))return u;var n=l(1.4*t,2);return y(e,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(t,e,r){if(m(e))return u;var n=l(2*t,2),i=l(t,2);return y(e,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(t,e,r){if(m(e))return u;var n=l(2*t,2),i=l(t,2);return y(e,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+l(2*t,2)+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(t,e,r){if(m(e))return u;var n=l(t,2);return y(e,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+l(2*t,2)+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(t,e,r){if(m(e))return u;var n=l(2*t,2),i=l(t,2);return y(e,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(t,e,r){if(m(e))return u;var n=l(2*t,2),i=l(t,2);return y(e,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(t,e,r){if(m(e))return u;var n=p/2.5,i=2*t*f(n),a=2*t*d(n);return y(e,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(t,e,r){if(m(e))return u;var n=p/4,i=2*t*f(n),a=2*t*d(n);return y(e,r,"M0,0L"+-i+","+a+"A "+2*t+","+2*t+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}}},7644:function(t){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},4880:function(t,e,r){"use strict";var n=r(8248),i=r(4040),a=r(4460),o=r(3400),s=r(3792);function l(t,e,r,i){var l=e["error_"+i]||{},u=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var c=s(l),h=0;h<t.length;h++){var p=t[h],f=p.i;if(void 0===f)f=h;else if(null===f)continue;var d=p[i];if(n(r.c2l(d))){var m=c(d,f);if(n(m[0])&&n(m[1])){var y=p[i+"s"]=d-m[0],v=p[i+"h"]=d+m[1];u.push(y,v)}}}var g=r._id,_=e._extremes[g],x=a.findExtremes(r,u,o.extendFlat({tozero:_.opts.tozero},{padded:!0}));_.min=_.min.concat(x.min),_.max=_.max.concat(x.max)}}t.exports=function(t){for(var e=t.calcdata,r=0;r<e.length;r++){var n=e[r],o=n[0].trace;if(!0===o.visible&&i.traceIs(o,"errorBarsOK")){var s=a.getFromId(t,o.xaxis),u=a.getFromId(t,o.yaxis);l(n,o,s,"x"),l(n,o,u,"y")}}}},3792:function(t){"use strict";function e(t,e){return"percent"===t?function(t){return Math.abs(t*e/100)}:"constant"===t?function(){return Math.abs(e)}:"sqrt"===t?function(t){return Math.sqrt(Math.abs(t))}:void 0}t.exports=function(t){var r=t.type,n=t.symmetric;if("data"===r){var i=t.array||[];if(n)return function(t,e){var r=+i[e];return[r,r]};var a=t.arrayminus||[];return function(t,e){var r=+i[e],n=+a[e];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=e(r,t.value),s=e(r,t.valueminus);return n||void 0===t.valueminus?function(t){var e=o(t);return[e,e]}:function(t){return[s(t),o(t)]}}},5200:function(t,e,r){"use strict";var n=r(8248),i=r(4040),a=r(3400),o=r(1780),s=r(7644);t.exports=function(t,e,r,l){var u="error_"+l.axis,c=o.newContainer(e,u),h=t[u]||{};function p(t,e){return a.coerce(h,c,s,t,e)}if(!1!==p("visible",void 0!==h.array||void 0!==h.value||"sqrt"===h.type)){var f=p("type","array"in h?"data":"percent"),d=!0;"sqrt"!==f&&(d=p("symmetric",!(("data"===f?"arrayminus":"valueminus")in h))),"data"===f?(p("array"),p("traceref"),d||(p("arrayminus"),p("tracerefminus"))):"percent"!==f&&"constant"!==f||(p("value"),d||p("valueminus"));var m="copy_"+l.inherit+"style";l.inherit&&(e["error_"+l.inherit]||{}).visible&&p(m,!(h.color||n(h.thickness)||n(h.width))),l.inherit&&c[m]||(p("color",r),p("thickness"),p("width",i.traceIs(e,"gl3d")?0:4))}}},4968:function(t,e,r){"use strict";var n=r(3400),i=r(7824).overrideAll,a=r(7644),o={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},a),error_y:n.extendFlat({},a),error_z:n.extendFlat({},a)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:i(s,"calc","nested"),scattergl:i(o,"calc","nested")}},supplyDefaults:r(5200),calc:r(4880),makeComputeError:r(3792),plot:r(8512),style:r(2036),hoverInfo:function(t,e,r){(e.error_y||{}).visible&&(r.yerr=t.yh-t.y,e.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(e.error_x||{}).visible&&(r.xerr=t.xh-t.x,e.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}},8512:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(3616),o=r(3028);t.exports=function(t,e,r,s){var l=r.xaxis,u=r.yaxis,c=s&&s.duration>0,h=t._context.staticPlot;e.each((function(e){var p,f=e[0].trace,d=f.error_x||{},m=f.error_y||{};f.ids&&(p=function(t){return t.id});var y=o.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||d.visible||(e=[]);var v=n.select(this).selectAll("g.errorbar").data(e,p);if(v.exit().remove(),e.length){d.visible||v.selectAll("path.xerror").remove(),m.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var g=v.enter().append("g").classed("errorbar",!0);c&&g.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(v,r.layerClipId,t),v.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,u);if(!y||t.vis){var a,o=e.select("path.yerror");if(m.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var p=m.width;a="M"+(r.x-p)+","+r.yh+"h"+2*p+"m-"+p+",0V"+r.ys,r.noYS||(a+="m-"+p+",0h"+2*p),o.size()?c&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var f=e.select("path.xerror");if(d.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var v=(d.copy_ystyle?m:d).width;a="M"+r.xh+","+(r.y-v)+"v"+2*v+"m0,-"+v+"H"+r.xs,r.noXS||(a+="m0,-"+v+"v"+2*v),f.size()?c&&(f=f.transition().duration(s.duration).ease(s.easing)):f=e.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),f.attr("d",a)}else f.remove()}}))}}))}},2036:function(t,e,r){"use strict";var n=r(3428),i=r(6308);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},5756:function(t,e,r){"use strict";var n=r(5376),i=r(5460).hoverlabel,a=r(2880).extendFlat;t.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},5056:function(t,e,r){"use strict";var n=r(3400),i=r(4040);function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s<e.length;s++){var l=e[s],u=l[0].trace;if(!i.traceIs(u,"pie-like")){var c=i.traceIs(u,"2dMap")?a:n.fillArray;c(u.hoverinfo,l,"hi",o(u)),u.hovertemplate&&c(u.hovertemplate,l,"ht"),u.hoverlabel&&(c(u.hoverlabel.bgcolor,l,"hbg"),c(u.hoverlabel.bordercolor,l,"hbc"),c(u.hoverlabel.font.size,l,"hts"),c(u.hoverlabel.font.color,l,"htc"),c(u.hoverlabel.font.family,l,"htf"),c(u.hoverlabel.namelength,l,"hnl"),c(u.hoverlabel.align,l,"hta"))}}}},2376:function(t,e,r){"use strict";var n=r(4040),i=r(3292).hover;t.exports=function(t,e,r){var a=n.getComponentMethod("annotations","onClick")(t,t._hoverdata);function o(){t.emit("plotly_click",{points:t._hoverdata,event:e})}void 0!==r&&i(t,e,r,!0),t._hoverdata&&e&&e.target&&(a&&a.then?a.then(o):o(),e.stopImmediatePropagation&&e.stopImmediatePropagation())}},2456:function(t){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},5448:function(t,e,r){"use strict";var n=r(3400),i=r(5756),a=r(6132);t.exports=function(t,e,r,o){var s=n.extendFlat({},o.hoverlabel);e.hovertemplate&&(s.namelength=-1),a(t,e,(function(r,a){return n.coerce(t,e,i,r,a)}),s)}},624:function(t,e,r){"use strict";var n=r(3400);e.getSubplot=function(t){return t.subplot||t.xaxis+t.yaxis||t.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a<n.length;a++)for(var o=0;o<i.length;o++)if(-1!==r.indexOf(n[a]+i[o]))return!0;return!1}return-1!==r.indexOf(e.getSubplot(t))},e.flat=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=e;return r},e.p2c=function(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)r[n]=t[n].p2c(e);return r},e.getDistanceFunction=function(t,r,n,i){return"closest"===t?i||e.quadrature(r,n):"x"===t.charAt(0)?r:n},e.getClosest=function(t,e,r){if(!1!==r.index)r.index>=0&&r.index<t.length?r.distance=0:r.index=!1;else for(var n=0;n<t.length;n++){var i=e(t[n]);i<=r.distance&&(r.index=n,r.distance=i)}return r},e.inbox=function(t,e,r){return t*e<0||0===t?r:1/0},e.quadrature=function(t,e){return function(r){var n=t(r),i=e(r);return Math.sqrt(n*n+i*i)}},e.makeEventData=function(t,r,n){var i="index"in t?t.index:t.pointNumber,a={data:r._input,fullData:r,curveNumber:r.index,pointNumber:i};if(r._indexToPoints){var o=r._indexToPoints[i];1===o.length?a.pointIndex=o[0]:a.pointIndices=o}else a.pointIndex=i;return r._module.eventData?a=r._module.eventData(a,t,r,n,i):("xVal"in t?a.x=t.xVal:"x"in t&&(a.x=t.x),"yVal"in t?a.y=t.yVal:"y"in t&&(a.y=t.y),t.xa&&(a.xaxis=t.xa),t.ya&&(a.yaxis=t.ya),void 0!==t.zLabelVal&&(a.z=t.zLabelVal)),e.appendArrayPointValue(a,r,i),a},e.appendArrayPointValue=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){var c=o(n.nestedProperty(e,l).get(),r);void 0!==c&&(t[u]=c)}}},e.appendArrayMultiPointValues=function(t,e,r){var i=e._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var l=i[s],u=a(l);if(void 0===t[u]){for(var c=n.nestedProperty(e,l).get(),h=new Array(r.length),p=0;p<r.length;p++)h[p]=o(c,r[p]);t[u]=h}}};var i={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function a(t){return i[t]||t}function o(t,e){return Array.isArray(e)?Array.isArray(t)&&Array.isArray(t[e[0]])?t[e[0]][e[1]]:void 0:t[e]}var s={x:!0,y:!0},l={"x unified":!0,"y unified":!0};e.isUnifiedHover=function(t){return"string"==typeof t&&!!l[t]},e.isXYhover=function(t){return"string"==typeof t&&!!s[t]}},3292:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(9760),o=r(3400),s=o.pushUnique,l=o.strTranslate,u=o.strRotate,c=r(5924),h=r(2736),p=r(2213),f=r(3616),d=r(6308),m=r(6476),y=r(4460),v=r(4040),g=r(624),_=r(2456),x=r(7864),b=r(1140),w=_.YANGLE,T=Math.PI*w/180,k=1/Math.sin(T),M=Math.cos(T),A=Math.sin(T),S=_.HOVERARROWSIZE,L=_.HOVERTEXTPAD,C={box:!0,ohlc:!0,violin:!0,candlestick:!0},P={scatter:!0,scattergl:!0,splom:!0};function I(t){return[t.trace.index,t.index,t.x0,t.y0,t.name,t.attr,t.xa?t.xa._id:"",t.ya?t.ya._id:""].join(",")}e.hover=function(t,e,r,a){t=o.getGraphDiv(t);var l=e.target;o.throttle(t._fullLayout._uid+_.HOVERID,_.HOVERMINTIME,(function(){!function(t,e,r,a,l){r||(r="xy");var u,h=Array.isArray(r)?r:[r],f=t._fullLayout,_=f.hoversubplots,x=f._plots||[],b=x[r],w=f._has("cartesian"),T=e.hovermode||f.hovermode,M="x"===(T||"").charAt(0),A="y"===(T||"").charAt(0);if(w&&(M||A)&&"axis"===_)for(var L=h.length,E=0;E<L;E++)if(x[u=h[E]]){var z=y.getFromId(t,u,M?"x":"y")._subplotsWith;if(z&&z.length)for(var U=0;U<z.length;U++)s(h,z[U])}if(b&&"single"!==_){var H=b.overlays.map((function(t){return t.id}));h=h.concat(H)}for(var G=h.length,Z=new Array(G),Y=new Array(G),W=!1,X=0;X<G;X++)if(x[u=h[X]])W=!0,Z[X]=x[u].xaxis,Y[X]=x[u].yaxis;else{if(!f[u]||!f[u]._subplot)return void o.warn("Unrecognized subplot: "+u);var J=f[u]._subplot;Z[X]=J.xaxis,Y[X]=J.yaxis}if(T&&!W&&(T="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(T)||!t.calcdata||t.querySelector(".zoombox")||t._dragging)return m.unhoverRaw(t,e);var K=f.hoverdistance;-1===K&&(K=1/0);var Q=f.spikedistance;-1===Q&&(Q=1/0);var $,tt,et,rt,nt,it,at,ot,st,lt,ut,ct,ht,pt=[],ft=[],dt={hLinePoint:null,vLinePoint:null},mt=!1;if(Array.isArray(e))for(T="array",et=0;et<e.length;et++)(nt=t.calcdata[e[et].curveNumber||0])&&(it=nt[0].trace,"skip"!==nt[0].trace.hoverinfo&&(ft.push(nt),"h"===it.orientation&&(mt=!0)));else{var yt,vt,gt=t.calcdata.slice();for(gt.sort((function(t,e){return(t[0].trace.zorder||0)-(e[0].trace.zorder||0)})),rt=0;rt<gt.length;rt++)nt=gt[rt],"skip"!==(it=nt[0].trace).hoverinfo&&g.isTraceInSubplots(it,h)&&(ft.push(nt),"h"===it.orientation&&(mt=!0));if(l){if(!1===c.triggerHandler(t,"plotly_beforehover",e))return;var _t=l.getBoundingClientRect();yt=e.clientX-_t.left,vt=e.clientY-_t.top,f._calcInverseTransform(t);var xt=o.apply3DTransform(f._invTransform)(yt,vt);if(yt=xt[0],vt=xt[1],yt<0||yt>Z[0]._length||vt<0||vt>Y[0]._length)return m.unhoverRaw(t,e)}else yt="xpx"in e?e.xpx:Z[0]._length/2,vt="ypx"in e?e.ypx:Y[0]._length/2;if(e.pointerX=yt+Z[0]._offset,e.pointerY=vt+Y[0]._offset,$="xval"in e?g.flat(h,e.xval):g.p2c(Z,yt),tt="yval"in e?g.flat(h,e.yval):g.p2c(Y,vt),!i($[0])||!i(tt[0]))return o.warn("Fx.hover failed",e,t),m.unhoverRaw(t,e)}var bt=1/0;function wt(r,n){for(rt=0;rt<ft.length;rt++)if((nt=ft[rt])&&nt[0]&&nt[0].trace&&!0===(it=nt[0].trace).visible&&0!==it._length&&-1===["carpet","contourcarpet"].indexOf(it._module.name)){if(st=T,g.isUnifiedHover(st)&&(st=st.charAt(0)),"splom"===it.type?at=h[ot=0]:(at=g.getSubplot(it),ot=h.indexOf(at)),ct={cd:nt,trace:it,xa:Z[ot],ya:Y[ot],maxHoverDistance:K,maxSpikeDistance:Q,index:!1,distance:Math.min(bt,K),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:d.defaultLine,name:it.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},f[at]&&(ct.subplot=f[at]._subplot),f._splomScenes&&f._splomScenes[it.uid]&&(ct.scene=f._splomScenes[it.uid]),"array"===st){var a=e[rt];"pointNumber"in a?(ct.index=a.pointNumber,st="closest"):(st="","xval"in a&&(lt=a.xval,st="x"),"yval"in a&&(ut=a.yval,st=st?"closest":"y"))}else void 0!==r&&void 0!==n?(lt=r,ut=n):(lt=$[ot],ut=tt[ot]);if(ht=pt.length,0!==K)if(it._module&&it._module.hoverPoints){var s=it._module.hoverPoints(ct,lt,ut,st,{finiteRange:!0,hoverLayer:f._hoverlayer,hoversubplots:_,gd:t});if(s)for(var l,u=0;u<s.length;u++)l=s[u],i(l.x0)&&i(l.y0)&&pt.push(F(l,T))}else o.log("Unrecognized trace type in hover:",it);if("closest"===T&&pt.length>ht&&(pt.splice(0,ht),bt=pt[0].distance),w&&0!==Q&&0===pt.length){ct.distance=Q,ct.index=!1;var c=it._module.hoverPoints(ct,lt,ut,"closest",{hoverLayer:f._hoverlayer});if(c&&(c=c.filter((function(t){return t.spikeDistance<=Q}))),c&&c.length){var p,m=c.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(m.length){var y=m[0];i(y.x0)&&i(y.y0)&&(p=kt(y),(!dt.vLinePoint||dt.vLinePoint.spikeDistance>p.spikeDistance)&&(dt.vLinePoint=p))}var v=c.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(v.length){var x=v[0];i(x.x0)&&i(x.y0)&&(p=kt(x),(!dt.hLinePoint||dt.hLinePoint.spikeDistance>p.spikeDistance)&&(dt.hLinePoint=p))}}}}}function Tt(t,e,r){for(var n,i=null,a=1/0,o=0;o<t.length;o++)n=t[o].spikeDistance,r&&0===o&&(n=-1/0),n<=a&&n<=e&&(i=t[o],a=n);return i}function kt(t){return t?{xa:t.xa,ya:t.ya,x:void 0!==t.xSpike?t.xSpike:(t.x0+t.x1)/2,y:void 0!==t.ySpike?t.ySpike:(t.y0+t.y1)/2,distance:t.distance,spikeDistance:t.spikeDistance,curveNumber:t.trace.index,color:t.color,pointNumber:t.index}:null}wt();var Mt={fullLayout:f,container:f._hoverlayer,event:e},At=t._spikepoints,St={vLinePoint:dt.vLinePoint,hLinePoint:dt.hLinePoint};t._spikepoints=St;var Lt=function(){"axis"!==_&&pt.sort((function(t,e){return t.distance-e.distance})),pt=function(t,e){for(var r=e.charAt(0),n=[],i=[],a=[],o=0;o<t.length;o++){var s=t[o];v.traceIs(s.trace,"bar-like")||v.traceIs(s.trace,"box-violin")?a.push(s):s.trace[r+"period"]?i.push(s):n.push(s)}return n.concat(i).concat(a)}(pt,T)};Lt();var Ct=T.charAt(0),Pt=("x"===Ct||"y"===Ct)&&pt[0]&&P[pt[0].trace.type];if(w&&0!==Q&&0!==pt.length){var It=Tt(pt.filter((function(t){return t.ya.showspikes})),Q,Pt);dt.hLinePoint=kt(It);var Et=Tt(pt.filter((function(t){return t.xa.showspikes})),Q,Pt);dt.vLinePoint=kt(Et)}if(0===pt.length){var Dt=m.unhoverRaw(t,e);return!w||null===dt.hLinePoint&&null===dt.vLinePoint||N(At)&&B(t,dt,Mt),Dt}if(w&&N(At)&&B(t,dt,Mt),g.isXYhover(st)&&0!==pt[0].length&&"splom"!==pt[0].trace.type){var zt=pt[0],Ot=(pt=C[zt.trace.type]?pt.filter((function(t){return t.trace.index===zt.trace.index})):[zt]).length;wt(j("x",zt,f),j("y",zt,f));var Rt,Ft=[],Bt={},Nt=0,Ut=function(t){var e=C[t.trace.type]?I(t):t.trace.index;if(Bt[e]){var r=Bt[e]-1,n=Ft[r];r>0&&Math.abs(t.distance)<Math.abs(n.distance)&&(Ft[r]=t)}else Nt++,Bt[e]=Nt,Ft.push(t)};for(Rt=0;Rt<Ot;Rt++)Ut(pt[Rt]);for(Rt=pt.length-1;Rt>Ot-1;Rt--)Ut(pt[Rt]);pt=Ft,Lt()}var jt=t._hoverdata,Vt=[],qt=V(t),Ht=q(t);for(et=0;et<pt.length;et++){var Gt=pt[et],Zt=g.makeEventData(Gt,Gt.trace,Gt.cd);if(!1!==Gt.hovertemplate){var Yt=!1;Gt.cd[Gt.index]&&Gt.cd[Gt.index].ht&&(Yt=Gt.cd[Gt.index].ht),Gt.hovertemplate=Yt||Gt.trace.hovertemplate||!1}if(Gt.xa&&Gt.ya){var Wt=Gt.x0+Gt.xa._offset,Xt=Gt.x1+Gt.xa._offset,Jt=Gt.y0+Gt.ya._offset,Kt=Gt.y1+Gt.ya._offset,Qt=Math.min(Wt,Xt),$t=Math.max(Wt,Xt),te=Math.min(Jt,Kt),ee=Math.max(Jt,Kt);Zt.bbox={x0:Qt+Ht,x1:$t+Ht,y0:te+qt,y1:ee+qt}}Gt.eventData=[Zt],Vt.push(Zt)}t._hoverdata=Vt;var re="y"===T&&(ft.length>1||pt.length>1)||"closest"===T&&mt&&pt.length>1,ne=d.combine(f.plot_bgcolor||d.background,f.paper_bgcolor),ie=D(pt,{gd:t,hovermode:T,rotateLabels:re,bgColor:ne,container:f._hoverlayer,outerContainer:f._paper.node(),commonLabelOpts:f.hoverlabel,hoverdistance:f.hoverdistance}),ae=ie.hoverLabels;if(g.isUnifiedHover(T)||(function(t,e,r,n){var i,a,o,s,l,u,c,h=e?"xa":"ya",p=e?"ya":"xa",f=0,d=1,m=t.size(),y=new Array(m),v=0,g=n.minX,_=n.maxX,x=n.minY,b=n.maxY,w=function(t){return t*r._invScaleX},T=function(t){return t*r._invScaleY};function M(t){var e=t[0],r=t[t.length-1];if(a=e.pmin-e.pos-e.dp+e.size,o=r.pos+r.dp+r.size-e.pmax,a>.01){for(l=t.length-1;l>=0;l--)t[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=t.length-1;l>=0;l--)t[l].dp-=o;i=!1}if(i){var n=0;for(s=0;s<t.length;s++)(u=t[s]).pos+u.dp+u.size>e.pmax&&n++;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos>e.pmax-1&&(u.del=!0,n--);for(s=0;s<t.length&&!(n<=0);s++)if((u=t[s]).pos<e.pmin+1)for(u.del=!0,n--,o=2*u.size,l=t.length-1;l>=0;l--)t[l].dp-=o;for(s=t.length-1;s>=0&&!(n<=0);s--)(u=t[s]).pos+u.dp+u.size>e.pmax&&(u.del=!0,n--)}}}for(t.each((function(t){var n=t[h],i=t[p],a="x"===n._id.charAt(0),o=n.range;0===v&&o&&o[0]>o[1]!==a&&(d=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var u,c,f=O(t,e),m=t.anchor,M="end"===m?-1:1;if("middle"===m)c=(u=t.crossPos+(a?T(f.y-t.by/2):w(t.bx/2+t.tx2width/2)))+(a?T(t.by):w(t.bx));else if(a)c=(u=t.crossPos+T(S+f.y)-T(t.by/2-S))+T(t.by);else{var A=w(M*S+f.x),L=A+w(M*t.bx);u=t.crossPos+Math.min(A,L),c=t.crossPos+Math.max(A,L)}a?void 0!==x&&void 0!==b&&Math.min(c,b)-Math.max(u,x)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==g&&void 0!==_&&Math.min(c,_)-Math.max(u,g)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}y[v++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(a?k:1)/2,pmin:s,pmax:l}]})),y.sort((function(t,e){return t[0].posref-e[0].posref||d*(e[0].traceIndex-t[0].traceIndex)}));!i&&f<=m;){for(f++,i=!0,s=0;s<y.length-1;){var A=y[s],L=y[s+1],C=A[A.length-1],P=L[0];if((a=C.pos+C.dp+C.size-P.pos-P.dp+P.size)>.01&&C.pmin===P.pmin&&C.pmax===P.pmax){for(l=L.length-1;l>=0;l--)L[l].dp+=a;for(A.push.apply(A,L),y.splice(s+1,1),c=0,l=A.length-1;l>=0;l--)c+=A[l].dp;for(o=c/A.length,l=A.length-1;l>=0;l--)A[l].dp-=o;i=!1}else s++}y.forEach(M)}for(s=y.length-1;s>=0;s--){var I=y[s];for(l=I.length-1;l>=0;l--){var E=I[l],D=E.datum;D.offset=E.dp,D.del=E.del}}}(ae,re,f,ie.commonLabelBoundingBox),R(ae,re,f._invScaleX,f._invScaleY)),l&&l.tagName){var oe=v.getComponentMethod("annotations","hasClickToShow")(t,Vt);p(n.select(l),oe?"pointer":"")}l&&!a&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,jt)&&(jt&&t.emit("plotly_unhover",{event:e,points:jt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:Z,yaxes:Y,xvals:$,yvals:tt}))}(t,e,r,a,l)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=V(i),o=q(i),s=D(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,u=t.eventData;if(u){var c=Math.min(r,n),h=Math.max(r,n),p=Math.min(s,l),f=Math.max(s,l),m=t.trace;if(v.traceIs(m,"gl3d")){var y=i._fullLayout[m.scene]._scene.container,g=y.offsetLeft,_=y.offsetTop;c+=g,h+=g,p+=_,f+=_}u.bbox={x0:c+o,x1:h+o,y0:p+a,y1:f+a},e.inOut_bbox&&e.inOut_bbox.push(u.bbox)}else u=!1;return{color:t.color||d.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:u}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||d.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,l=0,u=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5<l?l-n+5:0,l=n+t.by+t.offset,r===e.anchorIndex&&(u=t.offset)})).each((function(t){t.offset-=u})),R(s,!1,i._fullLayout._invScaleX,i._fullLayout._invScaleY),r?s:s.node()};var E=/<extra>([\s\S]*)<\/extra>/;function D(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,s=e.rotateLabels,c=e.bgColor,p=e.container,m=e.outerContainer,y=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||_.HOVERFONT,k=e.fontSize||_.HOVERFONTSIZE,M=t[0],A=M.xa,C=M.ya,P=a.charAt(0),E=P+"Label",D=M[E];if(void 0===D&&"multicategory"===A.type)for(var O=0;O<t.length&&void 0===(D=t[O][E]);O++);var R=H(r,m),F=R.top,B=R.width,N=R.height,U=void 0!==D&&M.distance<=e.hoverdistance&&("x"===a||"y"===a);if(U){var j,V,q=!0;for(j=0;j<t.length;j++)if(q&&void 0===t[j].zLabel&&(q=!1),V=t[j].hoverinfo||t[j].trace.hoverinfo){var G=Array.isArray(V)?V:V.split("+");if(-1===G.indexOf("all")&&-1===G.indexOf(a)){U=!1;break}}q&&(U=!1)}var Z=p.selectAll("g.axistext").data(U?[0]:[]);Z.enter().append("g").classed("axistext",!0),Z.exit().remove();var Y={minX:0,maxX:0,minY:0,maxY:0};if(Z.each((function(){var t=n.select(this),e=o.ensureSingle(t,"path","",(function(t){t.style({"stroke-width":"1px"})})),s=o.ensureSingle(t,"text","",(function(t){t.attr("data-notex",1)})),u=y.bgcolor||d.defaultLine,c=y.bordercolor||d.contrast(u),p=d.contrast(u),m={family:y.font.family||T,size:y.font.size||k,color:y.font.color||p};e.style({fill:u,stroke:c}),s.text(D).call(f.font,m).call(h.positionText,0,0).call(h.convertToTspans,r),t.attr("transform","");var v,g,_=H(r,s.node());if("x"===a){var x="top"===A.side?"-":"";s.attr("text-anchor","middle").call(h.positionText,0,"top"===A.side?F-_.bottom-S-L:F-_.top+S+L),v=A._offset+(M.x0+M.x1)/2,g=C._offset+("top"===A.side?0:C._length);var b=_.width/2+L,w=v;v<b?w=b:v>i.width-b&&(w=i.width-b),e.attr("d","M"+(v-w)+",0L"+(v-w+S)+","+x+S+"H"+b+"v"+x+(2*L+_.height)+"H"+-b+"V"+x+S+"H"+(v-w-S)+"Z"),v=w,Y.minX=v-b,Y.maxX=v+b,"top"===A.side?(Y.minY=g-(2*L+_.height),Y.maxY=g-L):(Y.minY=g+L,Y.maxY=g+(2*L+_.height))}else{var P,I,E;"right"===C.side?(P="start",I=1,E="",v=A._offset+A._length):(P="end",I=-1,E="-",v=A._offset),g=C._offset+(M.y0+M.y1)/2,s.attr("text-anchor",P),e.attr("d","M0,0L"+E+S+","+S+"V"+(L+_.height/2)+"h"+E+(2*L+_.width)+"V-"+(L+_.height/2)+"H"+E+S+"V-"+S+"Z"),Y.minY=g-(L+_.height/2),Y.maxY=g+(L+_.height/2),"right"===C.side?(Y.minX=v+S,Y.maxX=v+S+(2*L+_.width)):(Y.minX=v-S-(2*L+_.width),Y.maxX=v-S);var z,O=_.height/2,R=F-_.top-O,B="clip"+i._uid+"commonlabel"+C._id;if(v<_.width+2*L+S){z="M-"+(S+L)+"-"+O+"h-"+(_.width-L)+"V"+O+"h"+(_.width-L)+"Z";var N=_.width-v+L;h.positionText(s,N,R),"end"===P&&s.selectAll("tspan").each((function(){var t=n.select(this),e=f.tester.append("text").text(t.text()).call(f.font,m),i=H(r,e.node());Math.round(i.width)<Math.round(_.width)&&t.attr("x",N-i.width),e.remove()}))}else h.positionText(s,I*(L+S),R),z=null;var U=i._topclips.selectAll("#"+B).data(z?[0]:[]);U.enter().append("clipPath").attr("id",B).append("path"),U.exit().remove(),U.select("path").attr("d",z),f.setClipUrl(s,z?B:null,r)}t.attr("transform",l(v,g))})),g.isUnifiedHover(a)){p.selectAll("g.hovertext").remove();var W=t.filter((function(t){return"none"!==t.hoverinfo}));if(0===W.length)return[];var X=i.hoverlabel,J=X.font,K={showlegend:!0,legend:{title:{text:D,font:J},font:J,bgcolor:X.bgcolor,bordercolor:X.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},Q={font:J};x(K,Q,r._fullData);var $=Q.legend;$.entries=[];for(var tt=0;tt<W.length;tt++){var et=W[tt];if("none"!==et.hoverinfo){var rt=z(et,!0,a,i,D),nt=rt[0],it=rt[1];et.name=it,et.text=""!==it?it+" : "+nt:nt;var at=et.cd[et.index];at&&(at.mc&&(et.mc=at.mc),at.mcc&&(et.mc=at.mcc),at.mlc&&(et.mlc=at.mlc),at.mlcc&&(et.mlc=at.mlcc),at.mlw&&(et.mlw=at.mlw),at.mrc&&(et.mrc=at.mrc),at.dir&&(et.dir=at.dir)),et._distinct=!0,$.entries.push([et])}}$.entries.sort((function(t,e){return t[0].trace.index-e[0].trace.index})),$.layer=p,$._inHover=!0,$._groupTitleFont=X.grouptitlefont,b(r,$);var ot,st,lt,ut,ct=p.select("g.legend"),ht=H(r,ct.node()),pt=ht.width+2*L,ft=ht.height+2*L,dt=W[0],mt=(dt.x0+dt.x1)/2,yt=(dt.y0+dt.y1)/2,vt=!(v.traceIs(dt.trace,"bar-like")||v.traceIs(dt.trace,"box-violin"));"y"===P?vt?(st=yt-L,ot=yt+L):(st=Math.min.apply(null,W.map((function(t){return Math.min(t.y0,t.y1)}))),ot=Math.max.apply(null,W.map((function(t){return Math.max(t.y0,t.y1)})))):st=ot=o.mean(W.map((function(t){return(t.y0+t.y1)/2})))-ft/2,"x"===P?vt?(lt=mt+L,ut=mt-L):(lt=Math.max.apply(null,W.map((function(t){return Math.max(t.x0,t.x1)}))),ut=Math.min.apply(null,W.map((function(t){return Math.min(t.x0,t.x1)})))):lt=ut=o.mean(W.map((function(t){return(t.x0+t.x1)/2})))-pt/2;var gt,_t,xt=A._offset,bt=C._offset;return ut+=xt-pt,st+=bt-ft,gt=(lt+=xt)+pt<B&<>=0?lt:ut+pt<B&&ut>=0?ut:xt+pt<B?xt:lt-mt<mt-ut+pt?B-pt:0,gt+=L,_t=(ot+=bt)+ft<N&&ot>=0?ot:st+ft<N&&st>=0?st:bt+ft<N?bt:ot-yt<yt-st+ft?N-ft:0,_t+=L,ct.attr("transform",l(gt-1,_t-1)),ct}var wt=p.selectAll("g.hovertext").data(t,(function(t){return I(t)}));return wt.enter().append("g").classed("hovertext",!0).each((function(){var t=n.select(this);t.append("rect").call(d.fill,d.addOpacity(c,.8)),t.append("text").classed("name",!0),t.append("path").style("stroke-width","1px"),t.append("text").classed("nums",!0).call(f.font,T,k)})),wt.exit().remove(),wt.each((function(t){var e=n.select(this).attr("transform",""),o=t.color;Array.isArray(o)&&(o=o[t.eventData[0].pointNumber]);var p=t.bgcolor||o,m=d.combine(d.opacity(p)?p:d.defaultLine,c),y=d.combine(d.opacity(o)?o:d.defaultLine,c),v=t.borderColor||d.contrast(m),g=z(t,U,a,i,D,e),_=g[0],x=g[1],b=e.select("text.nums").call(f.font,t.fontFamily||T,t.fontSize||k,t.fontColor||v).text(_).attr("data-notex",1).call(h.positionText,0,0).call(h.convertToTspans,r),M=e.select("text.name"),A=0,C=0;if(x&&x!==_){M.call(f.font,t.fontFamily||T,t.fontSize||k,y).text(x).attr("data-notex",1).call(h.positionText,0,0).call(h.convertToTspans,r);var P=H(r,M.node());A=P.width+2*L,C=P.height+2*L}else M.remove(),e.select("rect").remove();e.select("path").style({fill:m,stroke:v});var I=t.xa._offset+(t.x0+t.x1)/2,E=t.ya._offset+(t.y0+t.y1)/2,O=Math.abs(t.x1-t.x0),R=Math.abs(t.y1-t.y0),j=H(r,b.node()),V=j.width/i._invScaleX,q=j.height/i._invScaleY;t.ty0=(F-j.top)/i._invScaleY,t.bx=V+2*L,t.by=Math.max(q+2*L,C),t.anchor="start",t.txwidth=V,t.tx2width=A,t.offset=0;var G,Z,Y=(V+S+L+A)*i._invScaleX;if(s)t.pos=I,G=E+R/2+Y<=N,Z=E-R/2-Y>=0,"top"!==t.idealAlign&&G||!Z?G?(E+=R/2,t.anchor="start"):t.anchor="middle":(E-=R/2,t.anchor="end"),t.crossPos=E;else{if(t.pos=E,G=I+O/2+Y<=B,Z=I-O/2-Y>=0,"left"!==t.idealAlign&&G||!Z)if(G)I+=O/2,t.anchor="start";else{t.anchor="middle";var W=Y/2,X=I+W-B,J=I-W;X>0&&(I-=X),J<0&&(I+=-J)}else I-=O/2,t.anchor="end";t.crossPos=I}b.attr("text-anchor",t.anchor),A&&M.attr("text-anchor",t.anchor),e.attr("transform",l(I,E)+(s?u(w):""))})),{hoverLabels:wt,commonLabelBoundingBox:Y}}function z(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=U(t.name,t.nameLength));var u=r.charAt(0),c="x"===u?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"<br>"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"<br>"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[u+"Label"]===i?l=t[c+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"<br>":"")+t.text),void 0!==t.extraText&&(l+=(l?"<br>":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var h=t.hovertemplate||!1;if(h){var p=t.hovertemplateLabels||t;t[u+"Label"]!==i&&(p[u+"other"]=p[u+"Val"],p[u+"otherLabel"]=p[u+"Label"]),l=(l=o.hovertemplateString(h,p,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(E,(function(e,r){return s=U(r,t.nameLength),""}))}return[l,s]}function O(t,e){var r=0,n=t.offset;return e&&(n*=-A,r=t.offset*M),{x:r,y:n}}function R(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i,s,l,u,c=r.select("text.nums"),p=t.anchor,d="end"===p?-1:1,m=(u=(l=(s={start:1,end:-1,middle:0}[(i=t).anchor])*(S+L))+s*(i.txwidth+L),"middle"===i.anchor&&(l-=i.tx2width/2,u+=i.txwidth/2+L),{alignShift:s,textShiftX:l,text2ShiftX:u}),y=O(t,e),v=y.x,g=y.y,_="middle"===p;r.select("path").attr("d",_?"M-"+a(t.bx/2+t.tx2width/2)+","+o(g-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(d*S+v)+","+o(S+g)+"v"+o(t.by/2-S)+"h"+a(d*t.bx)+"v-"+o(t.by)+"H"+a(d*S+v)+"V"+o(g-S)+"Z");var x=v+m.textShiftX,b=g+t.ty0-t.by/2+L,w=t.textAlign||"auto";"auto"!==w&&("left"===w&&"start"!==p?(c.attr("text-anchor","start"),x=_?-t.bx/2-t.tx2width/2+L:-t.bx-L):"right"===w&&"end"!==p&&(c.attr("text-anchor","end"),x=_?t.bx/2-t.tx2width/2-L:t.bx+L)),c.call(h.positionText,a(x),o(b)),t.tx2width&&(r.select("text.name").call(h.positionText,a(m.text2ShiftX+m.alignShift*L+v),o(g+t.ty0-t.by/2+L)),r.select("rect").call(f.setRect,a(m.text2ShiftX+(m.alignShift-1)*t.tx2width/2+v),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function F(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var u=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function c(e,r,n){var i=u(r,n);l(i)&&(t[e]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:y.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:y.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var h=y.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+h+" / -"+y.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+h,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var p=y.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+p+" / -"+y.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+p,"y"===e&&(t.distance+=1)}var f=t.hoverinfo||t.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===f.indexOf("y")&&(t.yLabel=void 0),-1===f.indexOf("z")&&(t.zLabel=void 0),-1===f.indexOf("text")&&(t.text=void 0),-1===f.indexOf("name")&&(t.name=void 0)),t}function B(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!e.hLinePoint,h=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),h||c){var p=d.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var m,v,g=e.hLinePoint;n=g&&g.xa,"cursor"===(i=g&&g.ya).spikesnap?(m=u.pointerX,v=u.pointerY):(m=n._offset+g.x,v=i._offset+g.y);var _,x,b=a.readability(g.color,p)<1.5?d.contrast(p):g.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||b,M=y.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(_=M,x=m),-1!==w.indexOf("across")){var A=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(A=Math.min(A,i.position),S=Math.max(S,i.position)),_=l.l+A*l.w,x=l.l+S*l.w}o.insert("line",":first-child").attr({x1:_,x2:x,y1:v,y2:v,"stroke-width":T,stroke:k,"stroke-dasharray":f.dashStyle(i.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:_,x2:x,y1:v,y2:v,"stroke-width":T+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:M+("right"!==i.side?T:-T),cy:v,r:T,fill:k}).classed("spikeline",!0)}if(h){var L,C,P=e.vLinePoint;n=P&&P.xa,i=P&&P.ya,"cursor"===n.spikesnap?(L=u.pointerX,C=u.pointerY):(L=n._offset+P.x,C=i._offset+P.y);var I,E,D=a.readability(P.color,p)<1.5?d.contrast(p):P.color,z=n.spikemode,O=n.spikethickness,R=n.spikecolor||D,F=y.getPxPosition(t,n);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(I=F,E=C),-1!==z.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),I=l.t+(1-N)*l.h,E=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:L,x2:L,y1:I,y2:E,"stroke-width":O,stroke:R,"stroke-dasharray":f.dashStyle(n.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:L,x2:L,y1:I,y2:E,"stroke-width":O+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:L,cy:F-("top"!==n.side?O:-O),r:O,fill:R}).classed("spikeline",!0)}}}function N(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function U(t,e){return h.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function j(t,e,r){var n=e[t+"a"],i=e[t+"Val"],a=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=e.trace[t+"periodalignment"];if(o){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var u=s[t+"End"];void 0===u&&(u=s[t]);var c=u-l;"end"===o?i+=c:"middle"===o&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function V(t){return t.offsetTop+t.clientTop}function q(t){return t.offsetLeft+t.clientLeft}function H(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.left,a=n.top,s=i+n.width,l=a+n.height,u=o.apply3DTransform(r._invTransform)(i,a),c=o.apply3DTransform(r._invTransform)(s,l),h=u[0],p=u[1],f=c[0],d=c[1];return{x:h,y:p,width:f-h,height:d-p,top:Math.min(p,d),left:Math.min(h,f),right:Math.max(h,f),bottom:Math.max(p,d)}}},6132:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(624).isUnifiedHover;t.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},1008:function(t,e,r){"use strict";var n=r(3400),i=r(5460);t.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r("clickmode"),r("hoversubplots"),r("hovermode")}},3024:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=r(6476),o=r(624),s=r(5460),l=r(3292);t.exports={moduleType:"component",name:"fx",constants:r(2456),schema:{layout:s},attributes:r(5756),layoutAttributes:s,supplyLayoutGlobalDefaults:r(1976),supplyDefaults:r(5448),supplyLayoutDefaults:r(8336),calc:r(5056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(2376)}},5460:function(t,e,r){"use strict";var n=r(2456),i=r(5376),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},8336:function(t,e,r){"use strict";var n=r(3400),i=r(5460),a=r(1008),o=r(6132);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("geo"),u=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===u||s&&l&&2===u)&&(e.dragmode="pan"),o(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},1976:function(t,e,r){"use strict";var n=r(3400),i=r(6132),a=r(5460);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},2704:function(t,e,r){"use strict";var n=r(3400),i=r(3756).counter,a=r(6968).u,o=r(3816).idRegex,s=r(1780),l={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[i("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:a({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function u(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function c(t,e,r,n,i,a){var o=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),h=c*(1-o),p=0;p<i;p++){var f=u+c*p;l[a?i-1-p:p]=[f,f+h]}return l}function h(t,e,r,n,i){var a,o=new Array(r);function s(t,r){-1!==e.indexOf(r)&&void 0===n[r]?(o[t]=r,n[r]=t):o[t]=""}if(Array.isArray(t))for(a=0;a<r;a++)s(a,t[a]);else for(s(0,i),a=1;a<r;a++)s(a,i+(a+1));return o}t.exports={moduleType:"component",name:"grid",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(t,e){var r=t.grid||{},i=u(e,r,"x"),a=u(e,r,"y");if(t.grid||i||a){var o,h,p=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),f=Array.isArray(i),d=Array.isArray(a),m=f&&i!==r.xaxes&&d&&a!==r.yaxes;p?(o=r.subplots.length,h=r.subplots[0].length):(d&&(o=a.length),f&&(h=i.length));var y=s.newContainer(e,"grid"),v=k("rows",o),g=k("columns",h);if(v*g>1){p||f||d||"independent"===k("pattern")&&(p=!0),y._hasSubplotGrid=p;var _,x,b="top to bottom"===k("roworder"),w=p?.2:.1,T=p?.3:.1;m&&e._splomGridDflt&&(_=e._splomGridDflt.xside,x=e._splomGridDflt.yside),y._domains={x:c("x",k,w,_,g),y:c("y",k,T,x,v,b)}}else delete e.grid}function k(t,e){return n.coerce(r,y,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,c,p=t.grid||{},f=e._subplots,d=r._hasSubplotGrid,m=r.rows,y=r.columns,v="independent"===r.pattern,g=r._axisMap={};if(d){var _=p.subplots||[];l=r.subplots=new Array(m);var x=1;for(n=0;n<m;n++){var b=l[n]=new Array(y),w=_[n]||[];for(i=0;i<y;i++)if(v?(s=1===x?"xy":"x"+x+"y"+x,x++):s=w[i],b[i]="",-1!==f.cartesian.indexOf(s)){if(c=s.indexOf("y"),a=s.slice(0,c),o=s.slice(c),void 0!==g[a]&&g[a]!==i||void 0!==g[o]&&g[o]!==n)continue;b[i]=s,g[a]=i,g[o]=n}}}else{var T=u(e,p,"x"),k=u(e,p,"y");r.xaxes=h(T,f.xaxis,y,g,"x"),r.yaxes=h(k,f.yaxis,m,g,"y")}var M=r._anchors={},A="top to bottom"===r.roworder;for(var S in g){var L,C,P,I=S.charAt(0),E=r[I+"side"];if(E.length<8)M[S]="free";else if("x"===I){if("t"===E.charAt(0)===A?(L=0,C=1,P=m):(L=m-1,C=-1,P=-1),d){var D=g[S];for(n=L;n!==P;n+=C)if((s=l[n][D])&&(c=s.indexOf("y"),s.slice(0,c)===S)){M[S]=s.slice(c);break}}else for(n=L;n!==P;n+=C)if(o=r.yaxes[n],-1!==f.cartesian.indexOf(S+o)){M[S]=o;break}}else if("l"===E.charAt(0)?(L=0,C=1,P=y):(L=y-1,C=-1,P=-1),d){var z=g[S];for(n=L;n!==P;n+=C)if((s=l[z][n])&&(c=s.indexOf("y"),s.slice(c)===S)){M[S]=s.slice(0,c);break}}else for(n=L;n!==P;n+=C)if(a=r.xaxes[n],-1!==f.cartesian.indexOf(a+S)){M[S]=a;break}}}}}},5760:function(t,e,r){"use strict";var n=r(3816),i=r(1780).templatedArray;r(6208),t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},3556:function(t,e,r){"use strict";var n=r(8248),i=r(6896);t.exports=function(t,e,r,a){e=e||{};var o="log"===r&&"linear"===e.type,s="linear"===r&&"log"===e.type;if(o||s)for(var l,u,c=t._fullLayout.images,h=e._id.charAt(0),p=0;p<c.length;p++)if(u="images["+p+"].",(l=c[p])[h+"ref"]===e._id){var f=l[h],d=l["size"+h],m=null,y=null;if(o){m=i(f,e.range);var v=d/Math.pow(10,m)/2;y=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else y=(m=Math.pow(10,f))*(Math.pow(10,d/2)-Math.pow(10,-d/2));n(m)?n(y)||(y=null):(m=null,y=null),a(u+h,m),a(u+"size"+h,y)}}},7404:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(5760);function s(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var s=a("source");if(!a("visible",!!s))return e;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var l={_fullLayout:r},u=["x","y"],c=0;c<2;c++){var h=u[c],p=i.coerceRef(t,e,l,h,"paper",void 0);"paper"!==p&&i.getFromId(l,p)._imgIndices.push(e._index),i.coercePosition(e,l,a,p,h,0)}return e}t.exports=function(t,e){a(t,e,{name:"images",handleItemDefaults:s})}},963:function(t,e,r){"use strict";var n=r(3428),i=r(3616),a=r(4460),o=r(9811),s=r(9616);t.exports=function(t){var e,r,l=t._fullLayout,u=[],c={},h=[];for(r=0;r<l.images.length;r++){var p=l.images[r];if(p.visible)if("below"===p.layer&&"paper"!==p.xref&&"paper"!==p.yref){e=o.ref2id(p.xref)+o.ref2id(p.yref);var f=l._plots[e];if(!f){h.push(p);continue}f.mainplot&&(e=f.mainplot.id),c[e]||(c[e]=[]),c[e].push(p)}else"above"===p.layer?u.push(p):h.push(p)}var d={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},m={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function y(e){var r=n.select(this);if(this._imgSrc!==e.source)if(r.attr("xmlns",s.svg),e.source&&"data:"===e.source.slice(0,5))r.attr("xlink:href",e.source),this._imgSrc=e.source;else{var i=new Promise(function(t){var n=new Image;function i(){r.remove(),t()}this.img=n,n.setAttribute("crossOrigin","anonymous"),n.onerror=i,n.onload=function(){var e=document.createElement("canvas");e.width=this.width,e.height=this.height,e.getContext("2d",{willReadFrequently:!0}).drawImage(this,0,0);var n=e.toDataURL("image/png");r.attr("xlink:href",n),t()},r.on("error",i),n.src=e.source,this._imgSrc=e.source}.bind(this));t._promises.push(i)}}function v(e){var r,o,s=n.select(this),u=a.getFromId(t,e.xref),c=a.getFromId(t,e.yref),h="domain"===a.getRefType(e.xref),p="domain"===a.getRefType(e.yref),f=l._size;r=void 0!==u?"string"==typeof e.xref&&h?u._length*e.sizex:Math.abs(u.l2p(e.sizex)-u.l2p(0)):e.sizex*f.w,o=void 0!==c?"string"==typeof e.yref&&p?c._length*e.sizey:Math.abs(c.l2p(e.sizey)-c.l2p(0)):e.sizey*f.h;var y,v,g=r*d[e.xanchor].offset,_=o*m[e.yanchor].offset,x=d[e.xanchor].sizing+m[e.yanchor].sizing;switch(y=void 0!==u?"string"==typeof e.xref&&h?u._length*e.x+u._offset:u.r2p(e.x)+u._offset:e.x*f.w+f.l,y+=g,v=void 0!==c?"string"==typeof e.yref&&p?c._length*(1-e.y)+c._offset:c.r2p(e.y)+c._offset:f.h-e.y*f.h+f.t,v+=_,e.sizing){case"fill":x+=" slice";break;case"stretch":x="none"}s.attr({x:y,y:v,width:r,height:o,preserveAspectRatio:x,opacity:e.opacity});var b=(u&&"domain"!==a.getRefType(e.xref)?u._id:"")+(c&&"domain"!==a.getRefType(e.yref)?c._id:"");i.setClipUrl(s,b?"clip"+l._uid+b:null,t)}var g=l._imageLowerLayer.selectAll("image").data(h),_=l._imageUpperLayer.selectAll("image").data(u);g.enter().append("image"),_.enter().append("image"),g.exit().remove(),_.exit().remove(),g.each((function(t){y.bind(this)(t),v.bind(this)(t)})),_.each((function(t){y.bind(this)(t),v.bind(this)(t)}));var x=Object.keys(l._plots);for(r=0;r<x.length;r++){e=x[r];var b=l._plots[e];if(b.imagelayer){var w=b.imagelayer.selectAll("image").data(c[e]||[]);w.enter().append("image"),w.exit().remove(),w.each((function(t){y.bind(this)(t),v.bind(this)(t)}))}}}},7402:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:r(5760),supplyLayoutDefaults:r(7404),includeBasePlot:r(6632)("images"),draw:r(963),convertCoords:r(3556)}},3800:function(t,e,r){"use strict";var n=r(5376),i=r(2548);t.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),grouptitlefont:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:n({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}},5196:function(t){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},7864:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(1780),o=r(5464),s=r(3800),l=r(4859),u=r(2451);function c(t,e,r,c){var h=e[t]||{},p=a.newContainer(r,t);function f(t,e){return i.coerce(h,p,s,t,e)}var d=i.coerceFont(f,"font",r.font);if(f("bgcolor",r.paper_bgcolor),f("bordercolor"),f("visible")){for(var m,y=function(t,e){var r=m._input,n=m;return i.coerce(r,n,o,t,e)},v=r.font||{},g=i.coerceFont(f,"grouptitlefont",i.extendFlat({},v,{size:Math.round(1.1*v.size)})),_=0,x=!1,b="normal",w=(r.shapes||[]).filter((function(t){return t.showlegend})),T=c.concat(w).filter((function(e){return t===(e.legend||"legend")})),k=0;k<T.length;k++)if((m=T[k]).visible){var M=m._isShape;(m.showlegend||m._dfltShowLegend&&!(m._module&&m._module.attributes&&m._module.attributes.showlegend&&!1===m._module.attributes.showlegend.dflt))&&(_++,m.showlegend&&(x=!0,(!M&&n.traceIs(m,"pie-like")||!0===m._input.showlegend)&&_++),i.coerceFont(y,"legendgrouptitle.font",g)),(!M&&n.traceIs(m,"bar")&&"stack"===r.barmode||-1!==["tonextx","tonexty"].indexOf(m.fill))&&(b=u.isGrouped({traceorder:b})?"grouped+reversed":"reversed"),void 0!==m.legendgroup&&""!==m.legendgroup&&(b=u.isReversed({traceorder:b})?"reversed+grouped":"grouped")}var A=i.coerce(e,r,l,"showlegend",x&&_>("legend"===t?1:0));if(!1===A&&(r[t]=void 0),(!1!==A||h.uirevision)&&(f("uirevision",r.uirevision),!1!==A)){f("borderwidth");var S,L,C,P="h"===f("orientation"),I="paper"===f("yref"),E="paper"===f("xref"),D="left";if(P?(S=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?I?(L=1.1,C="bottom"):(L=1,C="top"):I?(L=-.1,C="top"):(L=0,C="bottom")):(L=1,C="auto",E?S=1.02:(S=1,D="right")),i.coerce(h,p,{x:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:S}},"x"),i.coerce(h,p,{y:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:L}},"y"),f("traceorder",b),u.isGrouped(r[t])&&f("tracegroupgap"),f("entrywidth"),f("entrywidthmode"),f("indentation"),f("itemsizing"),f("itemwidth"),f("itemclick"),f("itemdoubleclick"),f("groupclick"),f("xanchor",D),f("yanchor",C),f("valign"),i.noneOrAll(h,p,["x","y"]),f("title.text")){f("title.side",P?"left":"top");var z=i.extendFlat({},d,{size:i.bigFont(d.size)});i.coerceFont(f,"title.font",z)}}}}t.exports=function(t,e,r){var n,a=r.slice(),o=e.shapes;if(o)for(n=0;n<o.length;n++){var s=o[n];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=["legend"];for(n=0;n<a.length;n++)i.pushUnique(u,a[n].legend);for(e._legends=[],n=0;n<u.length;n++){var h=u[n];c(h,t,e,a),e[h]&&e[h].visible&&(e[h]._id=h),e._legends.push(h)}}},1140:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=r(7316),o=r(4040),s=r(5924),l=r(6476),u=r(3616),c=r(6308),h=r(2736),p=r(3048),f=r(5196),d=r(4284),m=d.LINE_SPACING,y=d.FROM_TL,v=d.FROM_BR,g=r(3076),_=r(2012),x=r(2451),b=1,w=/^legend[0-9]*$/;function T(t,e){var r,s,p=e||{},d=t._fullLayout,w=E(p),T=p._inHover;if(T?(s=p.layer,r="hover"):(s=d._infolayer,r=w),s){var S;if(r+=d._uid,t._legendMouseDownTime||(t._legendMouseDownTime=0),T){if(!p.entries)return;S=g(p.entries,p)}else{for(var D=(t.calcdata||[]).slice(),z=d.shapes,O=0;O<z.length;O++){var R=z[O];if(R.showlegend){var F={_isShape:!0,_fullInput:R,index:R._index,name:R.name||R.label.text||"shape "+R._index,legend:R.legend,legendgroup:R.legendgroup,legendgrouptitle:R.legendgrouptitle,legendrank:R.legendrank,legendwidth:R.legendwidth,showlegend:R.showlegend,visible:R.visible,opacity:R.opacity,mode:"line"===R.type?"lines":"markers",line:R.line,marker:{line:R.line,color:R.fillcolor,size:12,symbol:"rect"===R.type?"square":"circle"===R.type?"circle":"hexagon2"}};D.push([{trace:F}])}}S=d.showlegend&&g(D,p,d._legends.length>1)}var B=d.hiddenlabels||[];if(!(T||d.showlegend&&S.length))return s.selectAll("."+w).remove(),d._topdefs.select("#"+r).remove(),a.autoMargin(t,w);var N=i.ensureSingle(s,"g",w,(function(t){T||t.attr("pointer-events","all")})),U=i.ensureSingleById(d._topdefs,"clipPath",r,(function(t){t.append("rect")})),j=i.ensureSingle(N,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));j.call(c.stroke,p.bordercolor).call(c.fill,p.bgcolor).style("stroke-width",p.borderwidth+"px");var V,q=i.ensureSingle(N,"g","scrollbox"),H=p.title;p._titleWidth=0,p._titleHeight=0,H.text?((V=i.ensureSingle(q,"text",w+"titletext")).attr("text-anchor","start").call(u.font,H.font).text(H.text),C(V,q,t,p,b)):q.selectAll("."+w+"titletext").remove();var G=i.ensureSingle(N,"rect","scrollbar",(function(t){t.attr(f.scrollBarEnterAttrs).call(c.fill,f.scrollBarColor)})),Z=q.selectAll("g.groups").data(S);Z.enter().append("g").attr("class","groups"),Z.exit().remove();var Y=Z.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(A,t,p)})).call(_,t,p).each((function(){T||n.select(this).call(L,t,w)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout,o=E(i);i||(i=a[o]);var s=a._size,l=x.isVertical(i),c=x.isGrouped(i),h="fraction"===i.entrywidthmode,p=i.borderwidth,d=2*p,m=f.itemGap,y=i.indentation+i.itemwidth+2*m,v=2*(p+m),g=I(i),_=i.y<0||0===i.y&&"top"===g,b=i.y>1||1===i.y&&"bottom"===g,w=i.tracegroupgap,T={};i._maxHeight=Math.max(_||b?a.height/2:s.h,30);var M=0;i._width=0,i._height=0;var A=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(l)r.each((function(t){var e=t[0].height;u.setTranslate(this,p+A[0],p+A[1]+i._height+e/2+m),i._height+=e,i._width=Math.max(i._width,t[0].width)})),M=y+i._width,i._width+=m+y+d,i._height+=v,c&&(e.each((function(t,e){u.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var S=P(i),L=i.x<0||0===i.x&&"right"===S,C=i.x>1||1===i.x&&"left"===S,D=b||_,z=a.width/2;i._maxWidth=Math.max(L?D&&"left"===S?s.l+s.w:z:C?D&&"right"===S?s.r+s.w:z:s.w,2*y);var O=0,R=0;r.each((function(t){var e=k(t,i,y);O=Math.max(O,e),R+=e})),M=null;var F=0;if(c){var B=0,N=0,U=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=k(r,i,y),a=r[0].height;u.setTranslate(this,A[0],A[1]+p+m+a/2+e),e+=a,t=Math.max(t,n),T[r[0].trace.legendgroup]=t}));var r=t+m;N>0&&r+p+N>i._maxWidth?(F=Math.max(F,N),N=0,U+=B+w,B=e):B=Math.max(B,e),u.setTranslate(this,N,U),N+=r})),i._width=Math.max(F,N)+p,i._height=U+B+v}else{var j=r.size(),V=R+d+(j-1)*m<i._maxWidth,q=0,H=0,G=0,Z=0;r.each((function(t){var e=t[0].height,r=k(t,i,y),n=V?r:O;h||(n+=m),n+p+H-m>=i._maxWidth&&(F=Math.max(F,Z),H=0,G+=q,i._height+=q,q=0),u.setTranslate(this,A[0]+p+H,A[1]+p+G+e/2+m),Z=H+r+m,H+=n,q=Math.max(q,e)})),V?(i._width=H+d,i._height=q+v):(i._width=Math.max(F,Z)+d,i._height+=q+v)}}i._width=Math.ceil(Math.max(i._width+A[0],i._titleWidth+2*(p+f.titlePad))),i._height=Math.ceil(Math.max(i._height+A[1],i._titleHeight+2*(p+f.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var Y=t._context.edits,W=Y.legendText||Y.legendPosition;r.each((function(t){var e=n.select(this).select("."+o+"toggle"),r=t[0].height,a=t[0].trace.legendgroup,s=k(t,i,y);c&&""!==a&&(s=T[a]);var p=W?y:M||s;l||h||(p+=m/2),u.setRect(e,0,-r/2,p,r)}))}(t,Z,Y,p)},function(){var e,c,g,_,x=d._size,b=p.borderwidth,k="paper"===p.xref,A="paper"===p.yref;if(H.text&&function(t,e,r){if("top center"===e.title.side||"top right"===e.title.side){var n=e.title.font.size*m,i=0,a=t.node(),o=u.bBox(a).width;"top center"===e.title.side?i=.5*(e._width-2*r-2*f.titlePad-o):"top right"===e.title.side&&(i=e._width-2*r-2*f.titlePad-o),h.positionText(t,r+f.titlePad+i,r+n)}}(V,p,b),!T){var S,L;S=k?x.l+x.w*p.x-y[P(p)]*p._width:d.width*p.x-y[P(p)]*p._width,L=A?x.t+x.h*(1-p.y)-y[I(p)]*p._effHeight:d.height*(1-p.y)-y[I(p)]*p._effHeight;var C=function(t,e,r,n){var i=t._fullLayout,o=i[e],s=P(o),l=I(o),u="paper"===o.xref,c="paper"===o.yref;t._fullLayout._reservedMargin[e]={};var h=o.y<.5?"b":"t",p=o.x<.5?"l":"r",f={r:i.width-r,l:r+o._width,b:i.height-n,t:n+o._effHeight};if(u&&c)return a.autoMargin(t,e,{x:o.x,y:o.y,l:o._width*y[s],r:o._width*v[s],b:o._effHeight*v[l],t:o._effHeight*y[l]});u?t._fullLayout._reservedMargin[e][h]=f[h]:c||"v"===o.orientation?t._fullLayout._reservedMargin[e][p]=f[p]:t._fullLayout._reservedMargin[e][h]=f[h]}(t,w,S,L);if(C)return;if(d.margin.autoexpand){var E=S,D=L;S=k?i.constrain(S,0,d.width-p._width):E,L=A?i.constrain(L,0,d.height-p._effHeight):D,S!==E&&i.log("Constrain "+w+".x to make legend fit inside graph"),L!==D&&i.log("Constrain "+w+".y to make legend fit inside graph")}u.setTranslate(N,S,L)}if(G.on(".drag",null),N.on("wheel",null),T||p._height<=p._maxHeight||t._context.staticPlot){var z=p._effHeight;T&&(z=p._height),j.attr({width:p._width-b,height:z-b,x:b/2,y:b/2}),u.setTranslate(q,0,0),U.select("rect").attr({width:p._width-2*b,height:z-2*b,x:b,y:b}),u.setClipUrl(q,r,t),u.setRect(G,0,0,0,0),delete p._scrollY}else{var O,R,F,B=Math.max(f.scrollBarMinHeight,p._effHeight*p._effHeight/p._height),Z=p._effHeight-B-2*f.scrollBarMargin,Y=p._height-p._effHeight,W=Z/Y,X=Math.min(p._scrollY||0,Y);j.attr({width:p._width-2*b+f.scrollBarWidth+f.scrollBarMargin,height:p._effHeight-b,x:b/2,y:b/2}),U.select("rect").attr({width:p._width-2*b+f.scrollBarWidth+f.scrollBarMargin,height:p._effHeight-2*b,x:b,y:b+X}),u.setClipUrl(q,r,t),Q(X,B,W),N.on("wheel",(function(){Q(X=i.constrain(p._scrollY+n.event.deltaY/Z*Y,0,Y),B,W),0!==X&&X!==Y&&n.event.preventDefault()}));var J=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;O="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,F=X})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,X=function(t,e,r){var n=(r-e)/W+t;return i.constrain(n,0,Y)}(F,O,R),Q(X,B,W))}));G.call(J);var K=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(O=t.changedTouches[0].clientY,F=X)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,X=function(t,e,r){var n=(e-r)/W+t;return i.constrain(n,0,Y)}(F,O,R),Q(X,B,W))}));q.call(K)}function Q(e,r,n){p._scrollY=t._fullLayout[w]._scrollY=e,u.setTranslate(q,0,-e),u.setRect(G,p._width,f.scrollBarMargin+e*n,f.scrollBarWidth,r),U.select("rect").attr("y",b+e)}t._context.edits.legendPosition&&(N.classed("cursor-move",!0),l.init({element:N.node(),gd:t,prepFn:function(){var t=u.getTranslate(N);g=t.x,_=t.y},moveFn:function(t,r){var n=g+t,i=_+r;u.setTranslate(N,n,i),e=l.align(n,p._width,x.l,x.l+x.w,p.xanchor),c=l.align(i+p._height,-p._height,x.t+x.h,x.t,p.yanchor)},doneFn:function(){if(void 0!==e&&void 0!==c){var r={};r[w+".x"]=e,r[w+".y"]=c,o.call("_guiRelayout",t,r)}},clickFn:function(e,r){var n=s.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return r.clientX>=t.left&&r.clientX<=t.right&&r.clientY>=t.top&&r.clientY<=t.bottom}));n.size()>0&&M(t,N,n,e,r)}}))}],t)}}function k(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return"fraction"===a?e._maxWidth*o:r+(o||i)}function M(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label);var u=s.triggerHandler(t,"plotly_legendclick",l);if(1===n){if(!1===u)return;e._clickTimeout=setTimeout((function(){t._fullLayout&&p(r,t,n)}),t._context.doubleClickDelay)}else 2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&!1!==u&&p(r,t,n))}function A(t,e,r){var n,a,s=E(r),l=t.data()[0][0],c=l.trace,p=o.traceIs(c,"pie-like"),d=!r._inHover&&e._context.edits.legendText&&!p,m=r._maxNameLength;l.groupTitle?(n=l.groupTitle.text,a=l.groupTitle.font):(a=r.font,r.entries?n=l.text:(n=p?l.label:c.name,c._meta&&(n=i.templateString(n,c._meta))));var y=i.ensureSingle(t,"text",s+"text");y.attr("text-anchor","start").call(u.font,a).text(d?S(n,m):n);var v=r.indentation+r.itemwidth+2*f.itemGap;h.positionText(y,v,0),d?y.call(h.makeEditable,{gd:e,text:n}).call(C,t,e,r).on("edit",(function(n){this.text(S(n,m)).call(C,t,e,r);var a=l.trace._fullInput||{},s={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),h=u[u.length-1],p=i.keyedContainer(a,"transforms["+h+"].styles","target","value.name");p.set(l.trace._group,n),s=p.constructUpdate()}else s.name=n;return a._isShape?o.call("_guiRelayout",e,"shapes["+c.index+"].name",s.name):o.call("_guiRestyle",e,s,c.index)})):C(y,t,e,r)}function S(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function L(t,e,r){var a,o=e._context.doubleClickDelay,s=1,l=i.ensureSingle(t,"rect",r+"toggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(c.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-e._legendMouseDownTime<o?s+=1:(s=1,e._legendMouseDownTime=a)})),l.on("mouseup",(function(){if(!e._dragged&&!e._editing){var i=e._fullLayout[r];(new Date).getTime()-e._legendMouseDownTime>o&&(s=Math.max(s-1,1)),M(e,i,t,s,n.event)}})))}function C(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),h.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=t.select("g[class*=math-group]"),o=a.node(),s=E(r);r||(r=e._fullLayout[s]);var l,c,p=r.borderwidth,d=(n===b?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(o){var y=u.bBox(o);l=y.height,c=y.width,n===b?u.setTranslate(a,p,p+.75*l):u.setTranslate(a,0,.25*l)}else{var v="."+s+(n===b?"title":"")+"text",g=t.select(v),_=h.lineCount(g),x=g.node();if(l=d*_,c=x?u.bBox(x).width:0,n===b)"left"===r.title.side&&(c+=2*f.itemGap),h.positionText(g,p+f.titlePad,p+d);else{var w=2*f.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=f.itemGap,c-=r.indentation+r.itemwidth),h.positionText(g,w,-d*((_-1)/2-.3))}}n===b?(r._titleWidth=c,r._titleHeight=l):(i.lineHeight=d,i.height=Math.max(l,16)+3,i.width=c)}else t.remove()}(e,r,n,i)}))}function P(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function I(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}function E(t){return t._id||"legend"}t.exports=function(t,e){if(e)T(t,e);else{var r=t._fullLayout,i=r._legends;r._infolayer.selectAll('[class^="legend"]').each((function(){var t=n.select(this),e=t.attr("class").split(" ")[0];e.match(w)&&-1===i.indexOf(e)&&t.remove()}));for(var a=0;a<i.length;a++){var o=i[a];T(t,t._fullLayout[o])}}}},3076:function(t,e,r){"use strict";var n=r(4040),i=r(2451);t.exports=function(t,e,r){var a,o,s=e._inHover,l=i.isGrouped(e),u=i.isReversed(e),c={},h=[],p=!1,f={},d=0,m=0;function y(t,n,a){if(!1!==e.visible&&(!r||t===e._id))if(""!==n&&i.isGrouped(e))-1===h.indexOf(n)?(h.push(n),p=!0,c[n]=[a]):c[n].push(a);else{var o="~~i"+d;h.push(o),c[o]=[a],d++}}for(a=0;a<t.length;a++){var v=t[a],g=v[0],_=g.trace,x=_.legend,b=_.legendgroup;if(s||_.visible&&_.showlegend)if(n.traceIs(_,"pie-like"))for(f[b]||(f[b]={}),o=0;o<v.length;o++){var w=v[o].label;f[b][w]||(y(x,b,{label:w,color:v[o].color,i:v[o].i,trace:_,pts:v[o].pts}),f[b][w]=!0,m=Math.max(m,(w||"").length))}else y(x,b,g),m=Math.max(m,(_.name||"").length)}if(!h.length)return[];var T=!p||!l,k=[];for(a=0;a<h.length;a++){var M=c[h[a]];T?k.push(M[0]):k.push(M)}for(T&&(k=[k]),a=0;a<k.length;a++){var A=1/0;for(o=0;o<k[a].length;o++){var S=k[a][o].trace.legendrank;A>S&&(A=S)}k[a][0]._groupMinRank=A,k[a][0]._preGroupSort=a}var L=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(k.forEach((function(t,e){t[0]._preGroupSort=e})),k.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),a=0;a<k.length;a++){k[a].forEach((function(t,e){t._preSort=e})),k[a].sort(L);var C=k[a][0].trace,P=null;for(o=0;o<k[a].length;o++){var I=k[a][o].trace.legendgrouptitle;if(I&&I.text){P=I,s&&(I.font=e._groupTitleFont);break}}if(u&&k[a].reverse(),P){var E=!1;for(o=0;o<k[a].length;o++)if(n.traceIs(k[a][o].trace,"pie-like")){E=!0;break}k[a].unshift({i:-1,groupTitle:P,noClick:E,trace:{showlegend:C.showlegend,legendgroup:C.legendgroup,visible:"toggleitem"===e.groupclick||C.visible}})}for(o=0;o<k[a].length;o++)k[a][o]=[k[a][o]]}return e._lgroupsLength=k.length,e._maxNameLength=m,k}},3048:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=i.pushUnique,o=!0;t.exports=function(t,e,r){var s=e._fullLayout;if(!e._dragged&&!e._editing){var l,u=s.legend.itemclick,c=s.legend.itemdoubleclick,h=s.legend.groupclick;if(1===r&&"toggle"===u&&"toggleothers"===c&&o&&e.data&&e._context.showTips?(i.notifier(i._(e,"Double-click on legend to isolate one trace"),"long"),o=!1):o=!1,1===r?l=u:2===r&&(l=c),l){var p="togglegroup"===h,f=s.hiddenlabels?s.hiddenlabels.slice():[],d=t.data()[0][0];if(!d.groupTitle||!d.noClick){var m=e._fullData,y=(s.shapes||[]).filter((function(t){return t.showlegend})),v=m.concat(y),g=d.trace;g._isShape&&(g=g._fullInput);var _,x,b,w,T,k=g.legendgroup,M={},A=[],S=[],L=[],C=(s.shapes||[]).map((function(t){return t._input})),P=!1,I=g.legend,E=g._fullInput;if(E&&E._isShape||!n.traceIs(g,"pie-like")){var D,z=k&&k.length,O=[];if(z)for(_=0;_<v.length;_++)(D=v[_]).visible&&D.legendgroup===k&&O.push(_);if("toggle"===l){var R;switch(g.visible){case!0:R="legendonly";break;case!1:R=!1;break;case"legendonly":R=!0}if(z)if(p)for(_=0;_<v.length;_++){var F=v[_];!1!==F.visible&&F.legendgroup===k&&tt(F,R)}else tt(g,R);else tt(g,R)}else if("toggleothers"===l){var B,N,U,j,V=!0;for(_=0;_<v.length;_++)if(B=(j=v[_])===g,N=!0!==j.showlegend,!(B||N||z&&j.legendgroup===k||j.legend!==I||!0!==j.visible||n.traceIs(j,"notLegendIsolatable"))){V=!1;break}for(_=0;_<v.length;_++)if(!1!==(j=v[_]).visible&&j.legend===I&&!n.traceIs(j,"notLegendIsolatable"))switch(g.visible){case"legendonly":tt(j,!0);break;case!0:U=!!V||"legendonly",B=j===g,N=!0!==j.showlegend&&!j.legendgroup,tt(j,!!(B||z&&j.legendgroup===k||N)||U)}}for(_=0;_<S.length;_++)if(b=S[_]){var q=b.constructUpdate(),H=Object.keys(q);for(x=0;x<H.length;x++)w=H[x],(M[w]=M[w]||[])[L[_]]=q[w]}for(T=Object.keys(M),_=0;_<T.length;_++)for(w=T[_],x=0;x<A.length;x++)M[w].hasOwnProperty(x)||(M[w][x]=void 0);P?n.call("_guiUpdate",e,M,{shapes:C},A):n.call("_guiRestyle",e,M,A)}else{var G=d.label,Z=f.indexOf(G);if("toggle"===l)-1===Z?f.push(G):f.splice(Z,1);else if("toggleothers"===l){var Y=-1!==Z,W=[];for(_=0;_<e.calcdata.length;_++){var X=e.calcdata[_];for(x=0;x<X.length;x++){var J=X[x].label;I===X[0].trace.legend&&G!==J&&(-1===f.indexOf(J)&&(Y=!0),a(f,J),W.push(J))}}if(!Y)for(var K=0;K<W.length;K++){var Q=f.indexOf(W[K]);-1!==Q&&f.splice(Q,1)}}n.call("_guiRelayout",e,"hiddenlabels",f)}}}}function $(t,e){var r=A.indexOf(t),n=M.visible;return n||(n=M.visible=[]),-1===A.indexOf(t)&&(A.push(t),r=A.length-1),n[r]=e,r}function tt(t,e){if(!d.groupTitle||p){var r,a=t._fullInput||t,o=a._isShape,s=a.index;if(void 0===s&&(s=a._index),n.hasTransform(a,"groupby")){var l=S[s];if(!l){var u=n.getTransformIndices(a,"groupby"),c=u[u.length-1];l=i.keyedContainer(a,"transforms["+c+"].styles","target","value.visible"),S[s]=l}var h=l.get(t._group);void 0===h&&(h=!0),!1!==h&&l.set(t._group,e),L[s]=$(s,!1!==a.visible)}else{var f=!1!==a.visible&&e;o?(r=f,C[s].visible=r,P=!0):$(s,f)}}}}},2451:function(t,e){"use strict";e.isGrouped=function(t){return-1!==(t.traceorder||"").indexOf("grouped")},e.isVertical=function(t){return"h"!==t.orientation},e.isReversed=function(t){return-1!==(t.traceorder||"").indexOf("reversed")}},2780:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:r(3800),supplyLayoutDefaults:r(7864),draw:r(1140),style:r(2012)}},2012:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=a.strTranslate,s=r(3616),l=r(6308),u=r(4288).extractOpts,c=r(3028),h=r(528),p=r(9656).castOption,f=r(5196);function d(t,e){return(e?"radial":"horizontal")+(t?"":"reversed")}function m(t){var e=t[0].trace,r=e.contours,n=c.hasLines(e),i=c.hasMarkers(e),a=e.visible&&e.fill&&"none"!==e.fill,o=!1,s=!1;if(r){var l=r.coloring;"lines"===l?o=!0:n="none"===l||"heatmap"===l||r.showlines,"constraint"===r.type?a="="!==r._operation:"fill"!==l&&"heatmap"!==l||(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function y(t,e,r){return t&&a.isArrayOrTypedArray(t)?e:t>r?r:t}t.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var g="constant"===r.itemsizing,_=r.itemwidth,x=(_+2*f.itemGap)/2,b=o(x,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return g?n:Math.min(i,r)};function T(t,a,o){var c=t[0].trace,h=c.marker||{},p=h.line||{},f=h.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",d=o?c.visible&&c.type===o:i.traceIs(c,"bar"),m=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(d?[t]:[]);m.enter().append("path").classed("legend"+o,!0).attr("d",f).attr("transform",b),m.exit().remove(),m.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,h.line,5,2);i.style("stroke-width",o+"px");var f=a.mcc;if(!r._inHover&&"mc"in a){var d=u(h),m=d.mid;void 0===m&&(m=(d.max+d.min)/2),f=s.tryColorscale(h,"")(m)}var v=f||a.mc||h.color,g=h.pattern,_=g&&s.getPatternAttr(g.shape,0,"");if(_){var x=s.getPatternAttr(g.bgcolor,0,null),b=s.getPatternAttr(g.fgcolor,0,null),T=g.fgopacity,k=y(g.size,8,10),M=y(g.solidity,.5,1),A="legend-"+c.uid;i.call(s.pattern,"legend",e,A,_,k,M,f,g.fillmode,x,b,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||p.color)}))}function k(t,r,o){var s=t[0],l=s.trace,u=o?l.visible&&l.type===o:i.traceIs(l,o),c=n.select(r).select("g.legendpoints").selectAll("path.legend"+o).data(u?[t]:[]);if(c.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),c.exit().remove(),c.size()){var f=l.marker||{},d=w(p(f.line.width,s.pts),f.line,5,2),m="pieLike",y=a.minExtend(l,{marker:{line:{width:d}}},m),v=a.minExtend(s,{trace:y},m);h(c,v,y,e)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.indentation,l=r.valign,u=t[0].lineHeight,c=t[0].height;if("middle"===l&&0===s||!u||!c)i.attr("transform",null);else{var h={top:1,bottom:-1}[l]*(.5*(u-c+3))||0,p=r.indentation;i.attr("transform",o(p,h))}i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var c=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(t,o){var c,h=n.select(this),p=u(i),f=p.colorscale,m=p.reversescale;if(f){if(!r){var y=f.length;c=0===o?f[m?y-1:0][1]:1===o?f[m?0:y-1][1]:f[Math.floor((y-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}h.attr("d",t[0]),c?h.call(l.fill,c):h.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(m,"radial"===r),f,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,"waterfall")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,"funnel")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var u=a.minExtend(r,{marker:{size:g?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,u,e)}}))})).each((function(t){k(t,this,"funnelarea")})).each((function(t){k(t,this,"pie")})).each((function(t){var r,i,o=m(t),l=o.showFill,h=o.showLine,p=o.showGradientLine,f=o.showGradientFill,y=o.anyFill,v=o.anyLine,g=t[0],x=g.trace,b=u(x),T=b.colorscale,k=b.reversescale,M=c.hasMarkers(x)||!y?"M5,0":v?"M5,-2":"M5,-3",A=n.select(this),S=A.select(".legendfill").selectAll("path").data(l||f?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",M+"h"+_+"v6h-"+_+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e,!0);else{var r="legendfill-"+x.uid;s.gradient(t,e,r,d(k),T,"fill")}})),h||p){var L=w(void 0,x.line,10,5);i=a.minExtend(x,{line:{width:L}}),r=[a.minExtend(g,{trace:i})]}var C=A.select(".legendlines").selectAll("path").data(h||p?[r]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",M+(p?"l"+_+",0.0001":"h"+_)).call(h?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+x.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,"stroke")}})})).each((function(t){var r,i,o=m(t),l=o.anyFill,u=o.anyLine,h=o.showLine,p=o.showMarker,f=t[0],d=f.trace,y=!p&&!u&&!l&&c.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(g&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function _(t){return f._distinct&&f.index&&t[f.index]?t[f.index]:t[0]}if(p||y||h){var x={},w={};if(p){x.mc=v("marker.color",_),x.mx=v("marker.symbol",_),x.mo=v("marker.opacity",a.mean,[.2,1]),x.mlc=v("marker.line.color",_),x.mlw=v("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=v("marker.size",a.mean,[2,16],12);x.ms=T,w.marker.size=T}h&&(w.line={width:v("line.width",_,[0,10],5)}),y&&(x.tx="Aa",x.tp=v("textposition",_),x.ts=10,x.tc=v("textfont.color",_),x.tf=v("textfont.family",_)),r=[a.minExtend(f,x)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select("g.legendpoints"),M=k.selectAll("path.scatterpts").data(p?r:[]);M.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),M.exit().remove(),M.call(s.pointStyle,i,e),p&&(r[0].mrc=3);var A=k.selectAll("g.pointtext").data(y?r:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),A.exit().remove(),A.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",b).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",b).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},6540:function(t,e,r){"use strict";r(6052),t.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},1868:function(t,e,r){"use strict";var n=r(4040),i=r(7316),a=r(9811),o=r(9224),s=r(4016).eraseActiveShape,l=r(3400),u=l._,c=t.exports={};function h(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=t._fullLayout,c={},h=a.list(t,null,!0),p=u._cartesianSpikesEnabled;if("zoom"===s){var f,d="in"===l?.5:2,m=(1+d)/2,y=(1-d)/2;for(i=0;i<h.length;i++)if(!(r=h[i]).fixedrange)if(f=r._name,"auto"===l)c[f+".autorange"]=!0;else if("reset"===l)void 0===r._rangeInitial0&&void 0===r._rangeInitial1?c[f+".autorange"]=!0:void 0===r._rangeInitial0?(c[f+".autorange"]=r._autorangeInitial,c[f+".range"]=[null,r._rangeInitial1]):void 0===r._rangeInitial1?(c[f+".range"]=[r._rangeInitial0,null],c[f+".autorange"]=r._autorangeInitial):c[f+".range"]=[r._rangeInitial0,r._rangeInitial1],void 0!==r._showSpikeInitial&&(c[f+".showspikes"]=r._showSpikeInitial,"on"!==p||r._showSpikeInitial||(p="off"));else{var v=[r.r2l(r.range[0]),r.r2l(r.range[1])],g=[m*v[0]+y*v[1],m*v[1]+y*v[0]];c[f+".range[0]"]=r.l2r(g[0]),c[f+".range[1]"]=r.l2r(g[1])}}else"hovermode"!==s||"x"!==l&&"y"!==l||(l=u._isHoriz?"y":"x",o.setAttribute("data-val",l)),c[s]=l;u._cartesianSpikesEnabled=p,n.call("_guiRelayout",t,c)}function p(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout._subplots.gl3d||[],s={},l=i.split("."),u=0;u<o.length;u++)s[o[u]+"."+l[1]]=a;var c="pan"===a?a:"zoom";s.dragmode=c,n.call("_guiRelayout",t,s)}function f(t,e){for(var r=e.currentTarget.getAttribute("data-attr"),i="resetLastSave"===r,a="resetDefault"===r,o=t._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c,h=s[u],p=h+".camera",f=h+".aspectratio",d=h+".aspectmode",m=o[h]._scene;i?(l[p+".up"]=m.viewInitial.up,l[p+".eye"]=m.viewInitial.eye,l[p+".center"]=m.viewInitial.center,c=!0):a&&(l[p+".up"]=null,l[p+".eye"]=null,l[p+".center"]=null,c=!0),c&&(l[f+".x"]=m.viewInitial.aspectratio.x,l[f+".y"]=m.viewInitial.aspectratio.y,l[f+".z"]=m.viewInitial.aspectratio.z,l[d]=m.viewInitial.aspectmode)}n.call("_guiRelayout",t,l)}function d(t,e){var r=e.currentTarget,n=r._previousVal,i=t._fullLayout,a=i._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var u=0;u<a.length;u++){var c=a[u],h=i[c],p=c+".hovermode";s[p]=h.hovermode,l[p]=!1;for(var f=0;f<3;f++){var d=o[f],m=c+"."+d+".showspikes";l[m]=!1,s[m]=h[d].showspikes}}r._previousVal=s}return l}function m(t,e){for(var r=e.currentTarget,i=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,o=t._fullLayout,s=o._subplots.geo||[],l=0;l<s.length;l++){var u=s[l],c=o[u];if("zoom"===i){var h=c.projection.scale,p="in"===a?2*h:.5*h;n.call("_guiRelayout",t,u+".projection.scale",p)}}"reset"===i&&_(t,"geo")}function y(t){var e=t._fullLayout;return!e.hovermode&&(e._has("cartesian")?e._isHoriz?"y":"x":"closest")}function v(t){var e=y(t);n.call("_guiRelayout",t,"hovermode",e)}function g(t,e){for(var r=e.currentTarget.getAttribute("data-val"),i=t._fullLayout,a=i._subplots.mapbox||[],o={},s=0;s<a.length;s++){var l=a[s],u=i[l].zoom,c="in"===r?1.05*u:u/1.05;o[l+".zoom"]=c}n.call("_guiRelayout",t,o)}function _(t,e){for(var r=t._fullLayout,i=r._subplots[e]||[],a={},o=0;o<i.length;o++)for(var s=i[o],l=r[s]._subplot.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var h=u[c];a[s+"."+h]=l[h]}n.call("_guiRelayout",t,a)}c.toImage={name:"toImage",title:function(t){var e=(t._context.toImageButtonOptions||{}).format||"png";return u(t,"png"===e?"Download plot as a png":"Download plot")},icon:o.camera,click:function(t){var e=t._context.toImageButtonOptions,r={format:e.format||"png"};l.notifier(u(t,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&l.isIE()&&(l.notifier(u(t,"IE only supports svg. Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(t){t in e&&(r[t]=e[t])})),n.call("downloadImage",t,r).then((function(e){l.notifier(u(t,"Snapshot succeeded")+" - "+e,"long")})).catch((function(){l.notifier(u(t,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},c.sendDataToCloud={name:"sendDataToCloud",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.disk,click:function(t){i.sendDataToCloud(t)}},c.editInChartStudio={name:"editInChartStudio",title:function(t){return u(t,"Edit in Chart Studio")},icon:o.pencil,click:function(t){i.sendDataToCloud(t)}},c.zoom2d={name:"zoom2d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"dragmode",val:"zoom",icon:o.zoombox,click:h},c.pan2d={name:"pan2d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"dragmode",val:"pan",icon:o.pan,click:h},c.select2d={name:"select2d",_cat:"select",title:function(t){return u(t,"Box Select")},attr:"dragmode",val:"select",icon:o.selectbox,click:h},c.lasso2d={name:"lasso2d",_cat:"lasso",title:function(t){return u(t,"Lasso Select")},attr:"dragmode",val:"lasso",icon:o.lasso,click:h},c.drawclosedpath={name:"drawclosedpath",title:function(t){return u(t,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:o.drawclosedpath,click:h},c.drawopenpath={name:"drawopenpath",title:function(t){return u(t,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:o.drawopenpath,click:h},c.drawline={name:"drawline",title:function(t){return u(t,"Draw line")},attr:"dragmode",val:"drawline",icon:o.drawline,click:h},c.drawrect={name:"drawrect",title:function(t){return u(t,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:o.drawrect,click:h},c.drawcircle={name:"drawcircle",title:function(t){return u(t,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:o.drawcircle,click:h},c.eraseshape={name:"eraseshape",title:function(t){return u(t,"Erase active shape")},icon:o.eraseshape,click:s},c.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:h},c.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:h},c.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(t){return u(t,"Autoscale")},attr:"zoom",val:"auto",icon:o.autoscale,click:h},c.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(t){return u(t,"Reset axes")},attr:"zoom",val:"reset",icon:o.home,click:h},c.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(t){return u(t,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:h},c.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(t){return u(t,"Compare data on hover")},attr:"hovermode",val:function(t){return t._fullLayout._isHoriz?"y":"x"},icon:o.tooltip_compare,gravity:"ne",click:h},c.zoom3d={name:"zoom3d",_cat:"zoom",title:function(t){return u(t,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:o.zoombox,click:p},c.pan3d={name:"pan3d",_cat:"pan",title:function(t){return u(t,"Pan")},attr:"scene.dragmode",val:"pan",icon:o.pan,click:p},c.orbitRotation={name:"orbitRotation",title:function(t){return u(t,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:o["3d_rotate"],click:p},c.tableRotation={name:"tableRotation",title:function(t){return u(t,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:o["z-axis"],click:p},c.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(t){return u(t,"Reset camera to default")},attr:"resetDefault",icon:o.home,click:f},c.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(t){return u(t,"Reset camera to last save")},attr:"resetLastSave",icon:o.movie,click:f},c.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=d(t,e);n.call("_guiRelayout",t,r)}},c.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:m},c.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:m},c.resetGeo={name:"resetGeo",_cat:"reset",title:function(t){return u(t,"Reset")},attr:"reset",val:null,icon:o.autoscale,click:m},c.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:v},c.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:v},c.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:o.tooltip_basic,gravity:"ne",click:v},c.resetViewSankey={name:"resetSankeyGroup",title:function(t){return u(t,"Reset view")},icon:o.home,click:function(t){for(var e={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<t._fullData.length;r++){var i=t._fullData[r]._viewInitial;e["node.groups"].push(i.node.groups.slice()),e["node.x"].push(i.node.x.slice()),e["node.y"].push(i.node.y.slice())}n.call("restyle",t,e)}},c.toggleHover={name:"toggleHover",title:function(t){return u(t,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:o.tooltip_basic,gravity:"ne",click:function(t,e){var r=d(t,e);r.hovermode=y(t),n.call("_guiRelayout",t,r)}},c.resetViews={name:"resetViews",title:function(t){return u(t,"Reset views")},icon:o.home,click:function(t,e){var r=e.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),h(t,e),r.setAttribute("data-attr","resetLastSave"),f(t,e),_(t,"geo"),_(t,"mapbox")}},c.toggleSpikelines={name:"toggleSpikelines",title:function(t){return u(t,"Toggle Spike Lines")},icon:o.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(t){var e=t._fullLayout,r=e._cartesianSpikesEnabled;e._cartesianSpikesEnabled="on"===r?"off":"on",n.call("_guiRelayout",t,function(t){for(var e="on"===t._fullLayout._cartesianSpikesEnabled,r=a.list(t,null,!0),n={},i=0;i<r.length;i++){var o=r[i];n[o._name+".showspikes"]=!!e||o._showSpikeInitial}return n}(t))}},c.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(t){return u(t,"Reset view")},attr:"reset",icon:o.home,click:function(t){_(t,"mapbox")}},c.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(t){return u(t,"Zoom in")},attr:"zoom",val:"in",icon:o.zoom_plus,click:g},c.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(t){return u(t,"Zoom out")},attr:"zoom",val:"out",icon:o.zoom_minus,click:g}},6052:function(t,e,r){"use strict";var n=r(1868),i=Object.keys(n),a=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],o=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(a),s=[];i.forEach((function(t){!function(t){if(-1===o.indexOf(t._cat||t.name)){var e=t.name,r=(t._cat||t.name).toLowerCase();-1===s.indexOf(e)&&s.push(e),-1===s.indexOf(r)&&s.push(r)}}(n[t])})),s.sort(),t.exports={DRAW_MODES:a,backButtons:o,foreButtons:s}},824:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(1780),o=r(6540);t.exports=function(t,e){var r=t.modebar||{},s=a.newContainer(e,"modebar");function l(t,e){return n.coerce(r,s,o,t,e)}l("orientation"),l("bgcolor",i.addOpacity(e.paper_bgcolor,.5));var u=i.contrast(i.rgb(e.modebar.bgcolor));l("color",i.addOpacity(u,.3)),l("activecolor",i.addOpacity(u,.7)),l("uirevision",e.uirevision),l("add"),l("remove")}},3080:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"modebar",layoutAttributes:r(6540),supplyLayoutDefaults:r(824),manage:r(8816)}},8816:function(t,e,r){"use strict";var n=r(9811),i=r(3028),a=r(4040),o=r(624).isUnifiedHover,s=r(6400),l=r(1868),u=r(6052).DRAW_MODES,c=r(3400).extendDeep;t.exports=function(t){var e=t._fullLayout,r=t._context,h=e._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var p,f=r.modeBarButtons;p=Array.isArray(f)&&f.length?function(t){for(var e=c([],t),r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var a=n[i];if("string"==typeof a){if(void 0===l[a])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));e[r][i]=l[a]}}return e}(f):!r.displayModeBar&&r.watermark?[]:function(t){var e=t._fullLayout,r=t._fullData,s=t._context;function c(t,e){if("string"==typeof e){if(e.toLowerCase()===t.toLowerCase())return!0}else{var r=e.name,n=e._cat||e.name;if(r===t||n===t.toLowerCase())return!0}return!1}var h=e.modebar.add;"string"==typeof h&&(h=[h]);var p=e.modebar.remove;"string"==typeof p&&(p=[p]);var f=s.modeBarButtonsToAdd.concat(h.filter((function(t){for(var e=0;e<s.modeBarButtonsToRemove.length;e++)if(c(t,s.modeBarButtonsToRemove[e]))return!1;return!0}))),d=s.modeBarButtonsToRemove.concat(p.filter((function(t){for(var e=0;e<s.modeBarButtonsToAdd.length;e++)if(c(t,s.modeBarButtonsToAdd[e]))return!1;return!0}))),m=e._has("cartesian"),y=e._has("gl3d"),v=e._has("geo"),g=e._has("pie"),_=e._has("funnelarea"),x=e._has("gl2d"),b=e._has("ternary"),w=e._has("mapbox"),T=e._has("polar"),k=e._has("smith"),M=e._has("sankey"),A=function(t){for(var e=n.list({_fullLayout:t},null,!0),r=0;r<e.length;r++)if(!e[r].fixedrange)return!1;return!0}(e),S=o(e.hovermode),L=[];function C(t){if(t.length){for(var e=[],r=0;r<t.length;r++){for(var n=t[r],i=l[n],a=i.name.toLowerCase(),o=(i._cat||i.name).toLowerCase(),s=!1,u=0;u<d.length;u++){var c=d[u].toLowerCase();if(c===a||c===o){s=!0;break}}s||e.push(l[n])}L.push(e)}}var P=["toImage"];s.showEditInChartStudio?P.push("editInChartStudio"):s.showSendToCloud&&P.push("sendDataToCloud"),C(P);var I=[],E=[],D=[],z=[];(m||x||g||_||b)+v+y+w+T+k>1?(E=["toggleHover"],D=["resetViews"]):v?(I=["zoomInGeo","zoomOutGeo"],E=["hoverClosestGeo"],D=["resetGeo"]):y?(E=["hoverClosest3d"],D=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(I=["zoomInMapbox","zoomOutMapbox"],E=["toggleHover"],D=["resetViewMapbox"]):x?E=["hoverClosestGl2d"]:g?E=["hoverClosestPie"]:M?(E=["hoverClosestCartesian","hoverCompareCartesian"],D=["resetViewSankey"]):E=["toggleHover"],m&&(E=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(t){for(var e=0;e<t.length;e++)if(!a.traceIs(t[e],"noHover"))return!1;return!0}(r)||S)&&(E=[]),!m&&!x||A||(I=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==D[0]&&(D=["resetScale2d"])),y?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:(m||x)&&!A||b?z=["zoom2d","pan2d"]:w||v?z=["pan2d"]:T&&(z=["zoom2d"]),function(t){for(var e=!1,r=0;r<t.length&&!e;r++){var n=t[r];n._module&&n._module.selectPoints&&(a.traceIs(n,"scatter-like")?(i.hasMarkers(n)||i.hasText(n))&&(e=!0):a.traceIs(n,"box-violin")&&"all"!==n.boxpoints&&"all"!==n.points||(e=!0))}return e}(r)&&z.push("select2d","lasso2d");var O=[],R=function(t){-1===O.indexOf(t)&&-1!==E.indexOf(t)&&O.push(t)};if(Array.isArray(f)){for(var F=[],B=0;B<f.length;B++){var N=f[B];"string"==typeof N?(N=N.toLowerCase(),-1!==u.indexOf(N)?(e._has("mapbox")||e._has("cartesian"))&&z.push(N):"togglespikelines"===N?R("toggleSpikelines"):"togglehover"===N?R("toggleHover"):"hovercompare"===N?R("hoverCompareCartesian"):"hoverclosest"===N?(R("hoverClosestCartesian"),R("hoverClosestGeo"),R("hoverClosest3d"),R("hoverClosestGl2d"),R("hoverClosestPie")):"v1hovermode"===N&&(R("toggleHover"),R("hoverClosestCartesian"),R("hoverCompareCartesian"),R("hoverClosestGeo"),R("hoverClosest3d"),R("hoverClosestGl2d"),R("hoverClosestPie"))):F.push(N)}f=F}return C(z),C(I.concat(D)),C(O),function(t,e){if(e.length)if(Array.isArray(e[0]))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e);return t}(L,f)}(t),h?h.update(t,p):e._modeBar=s(t,p)}else h&&(h.destroy(),delete e._modeBar)}},6400:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(3400),o=r(9224),s=r(5788).version,l=new DOMParser;function u(t){this.container=t.container,this.element=document.createElement("div"),this.update(t.graphInfo,t.buttons),this.container.appendChild(this.element)}var c=u.prototype;c.update=function(t,e){this.graphInfo=t;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this._uid=i,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",e=e.reverse());var o=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";a.deleteRelatedStyleRule(i),a.addRelatedStyleRule(i,s+"#"+i+" .modebar-group","background-color: "+o.bgcolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn .icon path","fill: "+o.color),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn:hover .icon path","fill: "+o.activecolor),a.addRelatedStyleRule(i,"#"+i+" .modebar-btn.active .icon path","fill: "+o.activecolor);var l=!this.hasButtons(e),u=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(l||u||c)&&(this.removeAllButtons(),this.updateButtons(e),r.watermark||r.displaylogo)){var h=this.getLogo();r.watermark&&(h.className=h.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(h,this.element.childNodes[0]):this.element.appendChild(h),this.hasLogo=!0}this.updateActiveButton()},c.updateButtons=function(t){var e=this;this.buttons=t,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(t){var r=e.createGroup();t.forEach((function(t){var n=t.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==e.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");e.buttonsNames.push(n);var i=e.createButton(t);e.buttonElements.push(i),r.appendChild(i)})),e.element.appendChild(r)}))},c.createGroup=function(){var t=document.createElement("div");return t.className="modebar-group",t},c.createButton=function(t){var e=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=t.title;void 0===i?i=t.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&r.setAttribute("data-title",i),void 0!==t.attr&&r.setAttribute("data-attr",t.attr);var a=t.val;if(void 0!==a&&("function"==typeof a&&(a=a(this.graphInfo)),r.setAttribute("data-val",a)),"function"!=typeof t.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){t.click(e.graphInfo,r),e.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",t.toggle||!1),t.toggle&&n.select(r).classed("active",!0);var s=t.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute("data-gravity",t.gravity||"n"),r},c.createIcon=function(t){var e,r=i(t.height)?Number(t.height):t.ascent-t.descent,n="http://www.w3.org/2000/svg";if(t.path){(e=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,t.width,r].join(" ")),e.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",t.path),t.transform?a.setAttribute("transform",t.transform):void 0!==t.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+t.ascent+")"),e.appendChild(a)}return t.svg&&(e=l.parseFromString(t.svg,"application/xml").childNodes[0]),e.setAttribute("height","1em"),e.setAttribute("width","1em"),e},c.updateActiveButton=function(t){var e=this.graphInfo._fullLayout,r=void 0!==t?t.getAttribute("data-attr"):null;this.buttonElements.forEach((function(t){var i=t.getAttribute("data-val")||!0,o=t.getAttribute("data-attr"),s="true"===t.getAttribute("data-toggle"),l=n.select(t);if(s)o===r&&l.classed("active",!l.classed("active"));else{var u=null===o?o:a.nestedProperty(e,o).get();l.classed("active",u===i)}}))},c.hasButtons=function(t){var e=this.buttons;if(!e)return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;n<t[r].length;n++)if(t[r][n].name!==e[r][n].name)return!1}return!0},c.getLogo=function(){var t=this.createGroup(),e=document.createElement("a");return e.href="https://plotly.com/",e.target="_blank",e.setAttribute("data-title",a._(this.graphInfo,"Produced with Plotly.js")+" (v"+s+")"),e.className="modebar-btn plotlyjsicon modebar-btn--logo",e.appendChild(this.createIcon(o.newplotlylogo)),t.appendChild(e),t},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){a.removeElement(this.container.querySelector(".modebar")),a.deleteRelatedStyleRule(this._uid)},t.exports=function(t,e){var r=t._fullLayout,i=new u({graphInfo:t,container:r._modebardiv.node(),buttons:e});return r._privateplot&&n.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}},6680:function(t,e,r){"use strict";var n=r(5376),i=r(2548),a=(0,r(1780).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:a,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:n({editType:"plot"}),bgcolor:{valType:"color",dflt:i.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:i.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},5984:function(t){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},2148:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(1780),o=r(1272),s=r(6680),l=r(5984);function u(t,e,r,i){var a=i.calendar;function o(r,i){return n.coerce(t,e,s.buttons,r,i)}if(o("visible")){var l=o("step");"all"!==l&&(!a||"gregorian"===a||"month"!==l&&"year"!==l?o("stepmode"):e.stepmode="backward",o("count")),o("label")}}t.exports=function(t,e,r,c,h){var p=t.rangeselector||{},f=a.newContainer(e,"rangeselector");function d(t,e){return n.coerce(p,f,s,t,e)}if(d("visible",o(p,f,{name:"buttons",handleItemDefaults:u,calendar:h}).length>0)){var m=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a<n.length;a++){var o=e[n[a]].domain;o&&(i=Math.max(o[1],i))}return[t.domain[0],i+l.yPad]}(e,r,c);d("x",m[0]),d("y",m[1]),n.noneOrAll(t,e,["x","y"]),d("xanchor"),d("yanchor"),n.coerceFont(d,"font",r.font);var y=d("bgcolor");d("activecolor",i.contrast(y,l.lightAmount,l.darkAmount)),d("bordercolor"),d("borderwidth")}}},216:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(6308),s=r(3616),l=r(3400),u=l.strTranslate,c=r(2736),h=r(9811),p=r(4284),f=p.LINE_SPACING,d=p.FROM_TL,m=p.FROM_BR,y=r(5984),v=r(8040);function g(t){return t._id}function _(t,e,r){var n=l.ensureSingle(t,"rect","selector-rect",(function(t){t.attr("shape-rendering","crispEdges")}));n.attr({rx:y.rx,ry:y.ry}),n.call(o.stroke,e.bordercolor).call(o.fill,function(t,e){return e._isActive||e._isHovered?t.activecolor:t.bgcolor}(e,r)).style("stroke-width",e.borderwidth+"px")}function x(t,e,r,n){var i,a;l.ensureSingle(t,"text","selector-text",(function(t){t.attr("text-anchor","middle")})).call(s.font,e.font).text((i=r,a=n._fullLayout._meta,i.label?a?l.templateString(i.label,a):i.label:"all"===i.step?"all":i.count+i.step.charAt(0))).call((function(t){c.convertToTspans(t,n)}))}t.exports=function(t){var e=t._fullLayout._infolayer.selectAll(".rangeselector").data(function(t){for(var e=h.list(t,"x",!0),r=[],n=0;n<e.length;n++){var i=e[n];i.rangeselector&&i.rangeselector.visible&&r.push(i)}return r}(t),g);e.enter().append("g").classed("rangeselector",!0),e.exit().remove(),e.style({cursor:"pointer","pointer-events":"all"}),e.each((function(e){var r=n.select(this),o=e,h=o.rangeselector,p=r.selectAll("g.button").data(l.filterVisible(h.buttons));p.enter().append("g").classed("button",!0),p.exit().remove(),p.each((function(e){var r=n.select(this),a=v(o,e);e._isActive=function(t,e,r){if("all"===e.step)return!0===t.autorange;var n=Object.keys(r);return t.range[0]===r[n[0]]&&t.range[1]===r[n[1]]}(o,e,a),r.call(_,h,e),r.call(x,h,e,t),r.on("click",(function(){t._dragged||i.call("_guiRelayout",t,a)})),r.on("mouseover",(function(){e._isHovered=!0,r.call(_,h,e)})),r.on("mouseout",(function(){e._isHovered=!1,r.call(_,h,e)}))})),function(t,e,r,i,o){var h=0,p=0,v=r.borderwidth;e.each((function(){var t=n.select(this).select(".selector-text"),e=r.font.size*f,i=Math.max(e*c.lineCount(t),16)+3;p=Math.max(p,i)})),e.each((function(){var t=n.select(this),e=t.select(".selector-rect"),i=t.select(".selector-text"),a=i.node()&&s.bBox(i.node()).width,o=r.font.size*f,l=c.lineCount(i),d=Math.max(a+10,y.minButtonWidth);t.attr("transform",u(v+h,v)),e.attr({x:0,y:0,width:d,height:p}),c.positionText(i,d/2,p/2-(l-1)*o/2+3),h+=d+5}));var g=t._fullLayout._size,_=g.l+g.w*r.x,x=g.t+g.h*(1-r.y),b="left";l.isRightAnchor(r)&&(_-=h,b="right"),l.isCenterAnchor(r)&&(_-=h/2,b="center");var w="top";l.isBottomAnchor(r)&&(x-=p,w="bottom"),l.isMiddleAnchor(r)&&(x-=p/2,w="middle"),h=Math.ceil(h),p=Math.ceil(p),_=Math.round(_),x=Math.round(x),a.autoMargin(t,i+"-range-selector",{x:r.x,y:r.y,l:h*d[b],r:h*m[b],b:p*m[w],t:p*d[w]}),o.attr("transform",u(_,x))}(t,p,h,o._name,r)}))}},8040:function(t,e,r){"use strict";var n=r(3220),i=r(3400).titleCase;t.exports=function(t,e){var r=t._name,a={};if("all"===e.step)a[r+".autorange"]=!0;else{var o=function(t,e){var r,a=t.range,o=new Date(t.r2l(a[1])),s=e.step,l=n["utc"+i(s)],u=e.count;switch(e.stepmode){case"backward":r=t.l2r(+l.offset(o,-u));break;case"todate":var c=l.offset(o,-u);r=t.l2r(+l.ceil(c))}return[r,a[1]]}(t,e);a[r+".range[0]"]=o[0],a[r+".range[1]"]=o[1]}return a}},1152:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:r(6680)}}},layoutAttributes:r(6680),handleDefaults:r(2148),draw:r(216)}},8820:function(t,e,r){"use strict";var n=r(2548);t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},6652:function(t,e,r){"use strict";var n=r(9811).list,i=r(9280).getAutoRange,a=r(4636);t.exports=function(t){for(var e=n(t,"x",!0),r=0;r<e.length;r++){var o=e[r],s=o[a.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=i(t,o))}}},4636:function(t){"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},1659:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(9811),o=r(8820),s=r(936);t.exports=function(t,e,r){var l=t[r],u=e[r];if(l.rangeslider||e._requestRangeslider[u._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var c,h,p=l.rangeslider,f=i.newContainer(u,"rangeslider");if(b("visible")){b("bgcolor",e.plot_bgcolor),b("bordercolor"),b("borderwidth"),b("thickness"),b("autorange",!u.isValidRange(p.range)),b("range");var d=e._subplots;if(d)for(var m=d.cartesian.filter((function(t){return t.substr(0,t.indexOf("y"))===a.name2id(r)})).map((function(t){return t.substr(t.indexOf("y"),t.length)})),y=n.simpleMap(m,a.id2name),v=0;v<y.length;v++){var g=y[v];c=p[g]||{},h=i.newContainer(f,g,"yaxis");var _,x=e[g];c.range&&x.isValidRange(c.range)&&(_="fixed"),"match"!==w("rangemode",_)&&w("range",x.range.slice())}f._input=p}}function b(t,e){return n.coerce(p,f,o,t,e)}function w(t,e){return n.coerce(c,h,s,t,e)}}},60:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(3400),s=o.strTranslate,l=r(3616),u=r(6308),c=r(1668),h=r(7952),p=r(9811),f=r(6476),d=r(3972),m=r(4636);function y(t){return"number"==typeof t.clientX?t.clientX:t.touches&&t.touches.length>0?t.touches[0].clientX:0}function v(t,e,r,n){var i=o.ensureSingle(t,"rect",m.bgClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),a=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,c=-n._offsetShift,h=l.crispRound(e,n.borderwidth);i.attr({width:n._width+a,height:n._height+a,transform:s(c,c),"stroke-width":h}).call(u.stroke,n.bordercolor).call(u.fill,n.bgcolor)}function g(t,e,r,n){var i=e._fullLayout;o.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(t){t.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function _(t,e,r,i){var s,u=e.calcdata,c=t.selectAll("g."+m.rangePlotClassName).data(r._subplotsWith,o.identity);c.enter().append("g").attr("class",(function(t){return m.rangePlotClassName+" "+t})).call(l.setClipUrl,i._clipId,e),c.order(),c.exit().remove(),c.each((function(t,o){var l=n.select(this),c=0===o,f=p.getFromId(e,t,"y"),d=f._name,m=i[d],y={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};r.rangebreaks&&(y.layout.xaxis.rangebreaks=r.rangebreaks),y.layout[d]={type:f.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(y.layout[d].rangebreaks=f.rangebreaks),a.supplyDefaults(y);var v=y._fullLayout.xaxis,g=y._fullLayout[d];v.clearCalc(),v.setScale(),g.clearCalc(),g.setScale();var _={id:t,plotgroup:l,xaxis:v,yaxis:g,isRangePlot:!0};c?s=_:(_.mainplot="xy",_.mainplotinfo=s),h.rangePlot(e,_,function(t,e){for(var r=[],n=0;n<t.length;n++){var i=t[n],a=i[0].trace;a.xaxis+a.yaxis===e&&r.push(i)}return r}(u,t))}))}function x(t,e,r,n,i){o.ensureSingle(t,"rect",m.maskMinClassName,(function(t){t.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,m.maskColor),o.ensureSingle(t,"rect",m.maskMaxClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(u.fill,m.maskColor),"match"!==i.rangemode&&(o.ensureSingle(t,"rect",m.maskMinOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(u.fill,m.maskOppAxisColor),o.ensureSingle(t,"rect",m.maskMaxOppAxisClassName,(function(t){t.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",m.maskOppBorder).call(u.fill,m.maskOppAxisColor))}function b(t,e,r,n){e._context.staticPlot||o.ensureSingle(t,"rect",m.slideBoxClassName,(function(t){t.attr({y:0,cursor:m.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:m.slideBoxFill})}function w(t,e,r,n){var i=o.ensureSingle(t,"g",m.grabberMinClassName),a=o.ensureSingle(t,"g",m.grabberMaxClassName),s={x:0,width:m.handleWidth,rx:m.handleRadius,fill:u.background,stroke:u.defaultLine,"stroke-width":m.handleStrokeWidth,"shape-rendering":"crispEdges"},l={y:Math.round(n._height/4),height:Math.round(n._height/2)};o.ensureSingle(i,"rect",m.handleMinClassName,(function(t){t.attr(s)})).attr(l),o.ensureSingle(a,"rect",m.handleMaxClassName,(function(t){t.attr(s)})).attr(l);var c={width:m.grabAreaWidth,x:0,y:0,fill:m.grabAreaFill,cursor:e._context.staticPlot?void 0:m.grabAreaCursor};o.ensureSingle(i,"rect",m.grabAreaMinClassName,(function(t){t.attr(c)})).attr("height",n._height),o.ensureSingle(a,"rect",m.grabAreaMaxClassName,(function(t){t.attr(c)})).attr("height",n._height)}t.exports=function(t){for(var e=t._fullLayout,r=e._rangeSliderData,a=0;a<r.length;a++){var l=r[a][m.name];l._clipId=l._id+"-"+e._uid}var u=e._infolayer.selectAll("g."+m.containerClassName).data(r,(function(t){return t._name}));u.exit().each((function(t){var r=t[m.name];e._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(u.enter().append("g").classed(m.containerClassName,!0).attr("pointer-events","all"),u.each((function(r){var a=n.select(this),l=r[m.name],u=e[p.id2name(r.anchor)],h=l[p.id2name(r.anchor)];if(l.range){var T,k=o.simpleMap(l.range,r.r2l),M=o.simpleMap(r.range,r.r2l);T=M[0]<M[1]?[Math.min(k[0],M[0]),Math.max(k[1],M[1])]:[Math.max(k[0],M[0]),Math.min(k[1],M[1])],l.range=l._input.range=o.simpleMap(T,r.l2r)}r.cleanRange("rangeslider.range");var A=e._size,S=r.domain;l._width=A.w*(S[1]-S[0]);var L=Math.round(A.l+A.w*S[0]),C=Math.round(A.t+A.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+l._offsetShift+m.extraPad);a.attr("transform",s(L,C)),l._rl=o.simpleMap(l.range,r.r2l);var P=l._rl[0],I=l._rl[1],E=I-P;if(l.p2d=function(t){return t/l._width*E+P},l.d2p=function(t){return(t-P)/E*l._width},r.rangebreaks){var D=r.locateBreaks(P,I);if(D.length){var z,O,R=0;for(z=0;z<D.length;z++)R+=(O=D[z]).max-O.min;var F=l._width/(I-P-R),B=[-F*P];for(z=0;z<D.length;z++)O=D[z],B.push(B[B.length-1]-F*(O.max-O.min));for(l.d2p=function(t){for(var e=B[0],r=0;r<D.length;r++){var n=D[r];if(t>=n.max)e=B[r+1];else if(t<n.min)break}return e+F*t},z=0;z<D.length;z++)(O=D[z]).pmin=l.d2p(O.min),O.pmax=l.d2p(O.max);l.p2d=function(t){for(var e=B[0],r=0;r<D.length;r++){var n=D[r];if(t>=n.pmax)e=B[r+1];else if(t<n.pmin)break}return(t-e)/F}}}if("match"!==h.rangemode){var N=u.r2l(h.range[0]),U=u.r2l(h.range[1])-N;l.d2pOppAxis=function(t){return(t-N)/U*l._height}}a.call(v,t,r,l).call(g,t,r,l).call(_,t,r,l).call(x,t,r,l,h).call(b,t,r,l).call(w,t,r,l),function(t,e,r,a){if(!e._context.staticPlot){var s=t.select("rect."+m.slideBoxClassName).node(),l=t.select("rect."+m.grabAreaMinClassName).node(),u=t.select("rect."+m.grabAreaMaxClassName).node();t.on("mousedown",c),t.on("touchstart",c)}function c(){var c=n.event,h=c.target,p=y(c),m=p-t.node().getBoundingClientRect().left,v=a.d2p(r._rl[0]),g=a.d2p(r._rl[1]),_=f.coverSlip();function x(t){var c,f,x,b=+y(t)-p;switch(h){case s:if(x="ew-resize",v+b>r._length||g+b<0)return;c=v+b,f=g+b;break;case l:if(x="col-resize",v+b>r._length)return;c=v+b,f=g;break;case u:if(x="col-resize",g+b<0)return;c=v,f=g+b;break;default:x="ew-resize",c=m,f=m+b}if(f<c){var w=f;f=c,c=w}a._pixelMin=c,a._pixelMax=f,d(n.select(_),x),function(t,e,r,n){function a(t){return r.l2r(o.constrain(t,n._rl[0],n._rl[1]))}var s=a(n.p2d(n._pixelMin)),l=a(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){i.call("_guiRelayout",e,r._name+".range",[s,l])}))}(0,e,r,a)}function b(){_.removeEventListener("mousemove",x),_.removeEventListener("mouseup",b),this.removeEventListener("touchmove",x),this.removeEventListener("touchend",b),o.removeElement(_)}this.addEventListener("touchmove",x),this.addEventListener("touchend",b),_.addEventListener("mousemove",x),_.addEventListener("mouseup",b)}}(a,t,r,l),function(t,e,r,n,i,a){var l=m.handleWidth/2;function u(t){return o.constrain(t,0,n._width)}function c(t){return o.constrain(t,0,n._height)}function h(t){return o.constrain(t,-l,n._width+l)}var p=u(n.d2p(r._rl[0])),f=u(n.d2p(r._rl[1]));if(t.select("rect."+m.slideBoxClassName).attr("x",p).attr("width",f-p),t.select("rect."+m.maskMinClassName).attr("width",p),t.select("rect."+m.maskMaxClassName).attr("x",f).attr("width",n._width-f),"match"!==a.rangemode){var d=n._height-c(n.d2pOppAxis(i._rl[1])),y=n._height-c(n.d2pOppAxis(i._rl[0]));t.select("rect."+m.maskMinOppAxisClassName).attr("x",p).attr("height",d).attr("width",f-p),t.select("rect."+m.maskMaxOppAxisClassName).attr("x",p).attr("y",y).attr("height",n._height-y).attr("width",f-p),t.select("rect."+m.slideBoxClassName).attr("y",d).attr("height",y-d)}var v=.5,g=Math.round(h(p-l))-v,_=Math.round(h(f-l))+v;t.select("g."+m.grabberMinClassName).attr("transform",s(g,v)),t.select("g."+m.grabberMaxClassName).attr("transform",s(_,v))}(a,0,r,l,u,h),"bottom"===r.side&&c.draw(t,r._id+"title",{propContainer:r,propName:r._name+".title",placeholder:e._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:C+l._height+l._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})})))}},7944:function(t,e,r){"use strict";var n=r(9811),i=r(2736),a=r(4636),o=r(4284).LINE_SPACING,s=a.name;function l(t){var e=t&&t[s];return e&&e.visible}e.isVisible=l,e.makeData=function(t){var e=n.list({_fullLayout:t},"x",!0),r=t.margin,i=[];if(!t._has("gl2d"))for(var a=0;a<e.length;a++){var o=e[a];if(l(o)){i.push(o);var u=o[s];u._id=s+o._id,u._height=(t.height-r.b-r.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}t._rangeSliderData=i},e.autoMarginOpts=function(t,e){var r=t._fullLayout,n=e[s],l=e._id.charAt(0),u=0,c=0;return"bottom"===e.side&&(u=e._depth,e.title.text!==r._dfltTitle[l]&&(c=1.5*e.title.font.size+10+n._offsetShift,c+=(e.title.text.match(i.BR_TAG_ALL)||[]).length*e.title.font.size*o)),{x:0,y:e._counterDomainMin,l:0,r:0,t:0,b:n._height+u+Math.max(r.margin.b,c),pad:a.extraPad+2*n._offsetShift}}},9692:function(t,e,r){"use strict";var n=r(3400),i=r(8820),a=r(936),o=r(7944);t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},i,{yaxis:a})}}},layoutAttributes:r(8820),handleDefaults:r(1659),calcAutorange:r(6652),draw:r(60),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},936:function(t){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},3956:function(t,e,r){"use strict";var n=r(3916),i=r(2904).line,a=r(8192).u,o=r(2880).extendFlat,s=r(7824).overrideAll,l=r(1780).templatedArray;r(6208),t.exports=s(l("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:o({},n.xref,{}),yref:o({},n.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:i.color,width:o({},i.width,{min:1,dflt:1}),dash:o({},a,{dflt:"dot"})}}),"arraydraw","from-root")},3280:function(t){"use strict";t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},4224:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(3956),s=r(5152);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}var l=a("path"),u="path"!==a("type",l?"path":"rect");u&&delete e.path,a("opacity"),a("line.color"),a("line.width"),a("line.dash");for(var c=["x","y"],h=0;h<2;h++){var p,f,d,m=c[h],y={_fullLayout:r},v=i.coerceRef(t,e,y,m);if((p=i.getFromId(y,v))._selectionIndices.push(e._index),d=s.rangeToShapePosition(p),f=s.shapePositionToRange(p),u){var g=m+"0",_=m+"1",x=t[g],b=t[_];t[g]=f(t[g],!0),t[_]=f(t[_],!0),i.coercePosition(e,y,a,v,g),i.coercePosition(e,y,a,v,_);var w=e[g],T=e[_];void 0!==w&&void 0!==T&&(e[g]=d(w),e[_]=d(T),t[g]=x,t[_]=b)}}u&&n.noneOrAll(t,e,["x0","x1","y0","y1"])}t.exports=function(t,e){a(t,e,{name:"selections",handleItemDefaults:l});for(var r=e.selections,n=0;n<r.length;n++){var i=r[n];i&&void 0===i.path&&(void 0!==i.x0&&void 0!==i.x1&&void 0!==i.y0&&void 0!==i.y1||(e.selections[n]=null))}}},3640:function(t,e,r){"use strict";var n=r(9856).readPaths,i=r(5496),a=r(1936).clearOutlineControllers,o=r(6308),s=r(3616),l=r(1780).arrayEditor,u=r(5152),c=u.getPathString;function h(t){var e=t._fullLayout;for(var r in a(t),e._selectionLayer.selectAll("path").remove(),e._plots){var n=e._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i<e.selections.length;i++)f(t,i)}function p(t){return t._context.editSelection}function f(t,e){t._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+e+'"]').remove();var r=u.makeSelectionsOptionsAndPlotinfo(t,e),a=r.options,f=r.plotinfo;a._input&&function(r){var u=c(t,a),y={"data-index":e,"fill-rule":"evenodd",d:u},v=a.opacity,g="rgba(0,0,0,0)",_=a.line.color||o.contrast(t._fullLayout.plot_bgcolor),x=a.line.width,b=a.line.dash;x||(x=5,b="solid");var w=p(t)&&t._fullLayout._activeSelectionIndex===e;w&&(g=t._fullLayout.activeselection.fillcolor,v=t._fullLayout.activeselection.opacity);for(var T=[],k=1;k>=0;k--){var M=r.append("path").attr(y).style("opacity",k?.1:v).call(o.stroke,_).call(o.fill,g).call(s.dashLine,k?"solid":b,k?4+x:x);if(d(M,t,a),w){var A=l(t.layout,"selections",a);M.style({cursor:"move"});var S={element:M.node(),plotinfo:f,gd:t,editHelpers:A,isActiveSelection:!0},L=n(u,t);i(L,M,S)}else M.style("pointer-events",k?"all":"none");T[k]=M}var C=T[0];T[1].node().addEventListener("click",(function(){return function(t,e){if(p(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void m(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=m,h(t)}}}(t,C)}))}(t._fullLayout._selectionLayer)}function d(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function m(t){p(t)&&t._fullLayout._activeSelectionIndex>=0&&(a(t),delete t._fullLayout._activeSelectionIndex,h(t))}t.exports={draw:h,drawOne:f,activateLastSelection:function(t){if(p(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=m,h(t)}}}},4200:function(t,e,r){"use strict";var n=r(8192).u,i=r(2880).extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:i({},n,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},1004:function(t){"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},5968:function(t,e,r){"use strict";var n=r(2760).selectMode,i=r(1936).clearOutline,a=r(9856),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute("d"),u=e.gd,c=u._fullLayout.newselection,h=e.plotinfo,p=h.xaxis,f=h.yaxis,d=e.isActiveSelection,m=e.dragmode,y=(u.layout||{}).selections||[];if(!n(m)&&void 0!==d){var v=u._fullLayout._activeSelectionIndex;if(v<y.length)switch(u._fullLayout.selections[v].type){case"rect":m="select";break;case"path":m="lasso"}}var g,_=o(a,u,h,d),x={xref:p._id,yref:f._id,opacity:c.opacity,line:{color:c.line.color,width:c.line.width,dash:c.line.dash}};1===_.length&&(g=_[0]),g&&5===g.length&&"select"===m?(x.type="rect",x.x0=g[0][1],x.y0=g[0][2],x.x1=g[2][1],x.y1=g[2][2]):(x.type="path",p&&f&&l(_,p,f),x.path=s(_),g=null),i(u);for(var b=e.editHelpers,w=(b||{}).modifyItem,T=[],k=0;k<y.length;k++){var M=u._fullLayout.selections[k];if(M){if(T[k]=M._input,void 0!==d&&k===u._fullLayout._activeSelectionIndex){var A=x;switch(M.type){case"rect":w("x0",A.x0),w("x1",A.x1),w("y0",A.y0),w("y1",A.y1);break;case"path":w("path",A.path)}}}else T[k]=M}return void 0===d?(T.push(x),T):b?b.getUpdateObj():{}}}}},5840:function(t,e,r){"use strict";var n=r(3400).strTranslate;function i(t,e){switch(t.type){case"log":return t.p2d(e);case"date":return t.p2r(e,0,t.calendar);default:return t.p2r(e)}}t.exports={p2r:i,r2p:function(t,e){switch(t.type){case"log":return t.d2p(e);case"date":return t.r2p(e,0,t.calendar);default:return t.r2p(e)}},axValue:function(t){var e="y"===t._id.charAt(0)?1:0;return function(r){return i(t,r[e])}},getTransform:function(t){return n(t.xaxis._offset,t.yaxis._offset)}}},2676:function(t,e,r){"use strict";var n=r(3640),i=r(3156);t.exports={moduleType:"component",name:"selections",layoutAttributes:r(3956),supplyLayoutDefaults:r(4224),supplyDrawNewSelectionDefaults:r(1004),includeBasePlot:r(6632)("selections"),draw:n.draw,drawOne:n.drawOne,reselect:i.reselect,prepSelect:i.prepSelect,clearOutline:i.clearOutline,clearSelectionsCache:i.clearSelectionsCache,selectOnClick:i.selectOnClick}},3156:function(t,e,r){"use strict";var n=r(4756),i=r(1456),a=r(4040),o=r(3616).dashStyle,s=r(6308),l=r(3024),u=r(624).makeEventData,c=r(2760),h=c.freeMode,p=c.rectMode,f=c.drawMode,d=c.openMode,m=c.selectMode,y=r(5152),v=r(3068),g=r(5496),_=r(1936).clearOutline,x=r(9856),b=x.handleEllipse,w=x.readPaths,T=r(3940).newShapes,k=r(5968),M=r(3640).activateLastSelection,A=r(3400),S=A.sorterAsc,L=r(2065),C=r(1200),P=r(9811).getFromId,I=r(3696),E=r(9172).redrawReglTraces,D=r(3280),z=D.MINSELECT,O=L.filter,R=L.tester,F=r(5840),B=F.p2r,N=F.axValue,U=F.getTransform;function j(t){return void 0!==t.subplot}function V(t,e,r,n,i,a,o){var s,l,u,c,h,p,f,m,y,v=e._hoverdata,_=e._fullLayout.clickmode.indexOf("event")>-1,x=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){Z(t,e,a);var b=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n<e.length;n++)if(r=e[n],i.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===i.hoverOnBox)break;void 0!==i.pointNumber?a=i.pointNumber:void 0!==i.binNumber&&(a=i.binNumber,o=i.pointNumbers);break}return{pointNumber:a,pointNumbers:o,searchInfo:r}}(v,s=X(e,r,n,i));if(b.pointNumbers.length>0?function(t,e){var r,n,i,a=[];for(i=0;i<t.length;i++)(r=t[i]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i<e.pointNumbers.length;i++)if(n.selectedpoints.indexOf(e.pointNumbers[i])<0)return!1;return!0}return!1}(s,b):function(t){var e,r,n=0;for(r=0;r<t.length;r++)if((e=t[r].cd[0].trace).selectedpoints){if(e.selectedpoints.length>1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(p=K(b))){for(o&&o.remove(),y=0;y<s.length;y++)(l=s[y])._module.selectPoints(l,!1);Q(e,s),Y(a),_&&pt(e)}else{for(f=t.shiftKey&&(void 0!==p?p:K(b)),u=function(t,e,r){return{pointNumber:t,searchInfo:e,subtract:!!r}}(b.pointNumber,b.searchInfo,f),c=G(a.selectionDefs.concat([u])),y=0;y<s.length;y++)if(h=tt(s[y]._module.selectPoints(s[y],c),s[y]),x.length)for(var w=0;w<h.length;w++)x.push(h[w]);else x=h;if(Q(e,s,m={points:x}),u&&a&&a.selectionDefs.push(u),o){var T=a.mergedPolygons,k=d(a.dragmode);g(et(T,k),o,a)}_&&ht(e,m)}}}function q(t){return"pointNumber"in t&&"searchInfo"in t}function H(t){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(e,r,n,i){var a=t.searchInfo.cd[0].trace._expandedIndex;return i.cd[0].trace._expandedIndex===a&&n===t.pointNumber},isRect:!1,degenerate:!1,subtract:!!t.subtract}}function G(t){if(t.length){for(var e=[],r=q(t[0])?0:t[0][0][0],n=r,i=q(t[0])?0:t[0][0][1],a=i,o=0;o<t.length;o++)if(q(t[o]))e.push(H(t[o]));else{var s=R(t[o]);s.subtract=!!t[o].subtract,e.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}return{xmin:r,xmax:n,ymin:i,ymax:a,pts:[],contains:function(t,r,n,i){for(var a=!1,o=0;o<e.length;o++)e[o].contains(t,r,n,i)&&(a=!e[o].subtract);return a},isRect:!1,degenerate:!1}}}function Z(t,e,r){var n=e._fullLayout,i=r.plotinfo,a=r.dragmode,o=n._lastSelectedSubplot&&n._lastSelectedSubplot===i.id,s=(t.shiftKey||t.altKey)&&!(f(a)&&d(a));o&&s&&i.selection&&i.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=i.selection.selectionDefs,r.mergedPolygons=i.selection.mergedPolygons):s&&i.selection||Y(r),o||(_(e),n._lastSelectedSubplot=i.id)}function Y(t,e){var r=t.dragmode,n=t.plotinfo,i=t.gd;(function(t){return t._fullLayout._activeShapeIndex>=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=f(r),l=m(r);if(s||l){var u,c,h=o.selectAll(".select-outline-"+n.id);h&&i._fullLayout._outlining&&(s&&(u=T(h,t)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!j(t)&&(c=k(h,t)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then((function(){e&&M(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function W(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(W),u=r.map(W);for(o=0;o<t.calcdata.length;o++)if(!0===(a=(i=t.calcdata[o])[0].trace).visible&&a._module&&a._module.selectPoints)if(!j({subplot:n})||a.subplot!==n&&a.geo!==n)if("splom"===a.type){if(a._xaxes[l[0]]&&a._yaxes[u[0]]){var c=J(a._module,i,e[0],r[0]);c.scene=t._fullLayout._splomScenes[a.uid],s.push(c)}}else if("sankey"===a.type){var h=J(a._module,i,e[0],r[0]);s.push(h)}else{if(!(-1!==l.indexOf(a.xaxis)||a._xA&&a._xA.overlaying))continue;if(!(-1!==u.indexOf(a.yaxis)||a._yA&&a._yA.overlaying))continue;s.push(J(a._module,i,P(t,a.xaxis),P(t,a.yaxis)))}else s.push(J(a._module,i,e[0],r[0]));return s}function J(t,e,r,n){return{_module:t,cd:e,xaxis:r,yaxis:n}}function K(t){var e=t.searchInfo.cd[0].trace,r=t.pointNumber,n=t.pointNumbers,i=n.length>0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function Q(t,e,r){var n,i;for(n=0;n<e.length;n++){var o=e[n].cd[0].trace._fullInput,s=t._fullLayout._tracePreGUI[o.uid]||{};void 0===s.selectedpoints&&(s.selectedpoints=o._input.selectedpoints||null)}if(r){var l=r.points||[];for(n=0;n<e.length;n++)(i=e[n].cd[0].trace)._input.selectedpoints=i._fullInput.selectedpoints=[],i._fullInput!==i&&(i.selectedpoints=[]);for(var u=0;u<l.length;u++){var c=l[u],h=c.data,p=c.fullData,f=c.pointIndex,d=c.pointIndices;d?([].push.apply(h.selectedpoints,d),i._fullInput!==i&&[].push.apply(p.selectedpoints,d)):(h.selectedpoints.push(f),i._fullInput!==i&&p.selectedpoints.push(f))}}else for(n=0;n<e.length;n++)delete(i=e[n].cd[0].trace).selectedpoints,delete i._input.selectedpoints,i._fullInput!==i&&delete i._fullInput.selectedpoints;!function(t,e){for(var r=!1,n=0;n<e.length;n++){var i=e[n],o=i.cd;a.traceIs(o[0].trace,"regl")&&(r=!0);var s=i._module,l=s.styleOnSelect||s.style;l&&(l(t,o,o[0].node3),o[0].nodeRangePlot3&&l(t,o,o[0].nodeRangePlot3))}r&&(I(t),E(t))}(t,e)}function $(t,e,r){for(var i=(r?n.difference:n.union)({regions:t},{regions:[e]}).regions.reverse(),a=0;a<i.length;a++){var o=i[a];o.subtract=st(o,i.slice(0,a))}return i}function tt(t,e){if(Array.isArray(t))for(var r=e.cd,n=e.cd[0].trace,i=0;i<t.length;i++)t[i]=u(t[i],n,r);return t}function et(t,e){for(var r=[],n=0;n<t.length;n++){r[n]=[];for(var i=0;i<t[n].length;i++){r[n][i]=[],r[n][i][0]=i?"L":"M";for(var a=0;a<t[n][i].length;a++)r[n][i].push(t[n][i][a])}e||r[n].push(["Z",r[n][0][1],r[n][0][2]])}return r}function rt(t,e){for(var r,n,i=[],a=[],o=0;o<e.length;o++){var s=e[o];n=s._module.selectPoints(s,t),a.push(n),r=tt(n,s),i=i.concat(r)}return i}function nt(t,e,r,n,i){var a,o,s,l=!!n;i&&(a=i.plotinfo,o=i.xaxes[0]._id,s=i.yaxes[0]._id);var u=[],c=[],h=ot(t),p=t._fullLayout;if(a){var d=p._zoomlayer,y=p.dragmode,v=f(y),g=m(y);if(v||g){var _=P(t,o,"x"),x=P(t,s,"y");if(_&&x){var b=d.selectAll(".select-outline-"+a.id);if(b&&t._fullLayout._outlining&&b.length){for(var T=b[0][0].getAttribute("d"),k=w(T,t,a),M=[],A=0;A<k.length;A++){for(var S=k[A],L=[],C=0;C<S.length;C++)L.push([lt(_,S[C][1]),lt(x,S[C][2])]);L.xref=o,L.yref=s,L.subtract=st(L,M),M.push(L)}h=h.concat(M)}}}}var I=o&&s?[o+s]:p._subplots.cartesian;!function(t){var e=t.calcdata;if(e)for(var r=0;r<e.length;r++){var n=e[r][0].trace,i=t._fullLayout._splomScenes;if(i){var a=i[n.uid];a&&(a.selectBatch=[])}}}(t);for(var E={},D=0;D<I.length;D++){var z=I[D],O=z.indexOf("y"),R=z.slice(0,O),F=z.slice(O),B=o&&s?r:void 0;if(B=at(h,R,F,B)){var N=n;if(!l){var U=P(t,R,"x"),j=P(t,F,"y");N=X(t,[U],[j],z);for(var V=0;V<N.length;V++){var q=N[V],H=q.cd[0],G=H.trace;if("scattergl"===q._module.name&&!H.t.xpx){var Z=G.x,Y=G.y,W=G._length;H.t.xpx=[],H.t.ypx=[];for(var J=0;J<W;J++)H.t.xpx[J]=U.c2p(Z[J]),H.t.ypx[J]=j.c2p(Y[J])}"splom"===q._module.name&&(E[G.uid]||(E[G.uid]=!0))}}var K=rt(B,N);u=u.concat(K),c=c.concat(N)}}var $={points:u};Q(t,c,$);var tt=p.clickmode.indexOf("event")>-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,ft=et[0].yref;if(nt&&ft){var dt=ut(et);ct([P(t,nt,"x"),P(t,ft,"y")])($,dt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ht(t,$),p._reselect=!1}if(!a&&p._deselect){var mt=p._deselect;(function(t,e,r){for(var n=0;n<r.length;n++){var i=r[n];if(i.xaxis&&i.xaxis._id===t&&i.yaxis&&i.yaxis._id===e)return!0}return!1})(o=mt.xref,s=mt.yref,c)||it(t,o,s,n),tt&&($.points.length?ht(t,$):pt(t)),p._deselect=!1}return{eventData:$,selectionTesters:r}}function it(t,e,r,n){n=X(t,[P(t,e,"x")],[P(t,r,"y")],e+r);for(var i=0;i<n.length;i++){var a=n[i];a._module.selectPoints(a,!1)}Q(t,n)}function at(t,e,r,n){for(var i,a=0;a<t.length;a++){var o=t[a];e===o.xref&&r===o.yref&&(i?n=G(i=$(i,o,!!o.subtract)):(i=[o],n=R(o)))}return n}function ot(t,e){for(var r=[],n=t._fullLayout,i=n.selections,a=i.length,o=0;o<a;o++)if(!e||o===n._activeSelectionIndex){var s=i[o];if(s){var l,u,c,h,p,f=s.xref,d=s.yref,m=P(t,f,"x"),g=P(t,d,"y");if("rect"===s.type){p=[];var _=lt(m,s.x0),x=lt(m,s.x1),b=lt(g,s.y0),w=lt(g,s.y1);p=[[_,b],[_,w],[x,w],[x,b]],l=Math.min(_,x),u=Math.max(_,x),c=Math.min(b,w),h=Math.max(b,w),p.xmin=l,p.xmax=u,p.ymin=c,p.ymax=h,p.xref=f,p.yref=d,p.subtract=!1,p.isRect=!0,r.push(p)}else if("path"===s.type)for(var T=s.path.split("Z"),k=[],M=0;M<T.length;M++){var A=T[M];if(A){A+="Z";var S=y.extractPathCoords(A,v.paramIsX,"raw"),L=y.extractPathCoords(A,v.paramIsY,"raw");l=1/0,u=-1/0,c=1/0,h=-1/0,p=[];for(var C=0;C<S.length;C++){var I=lt(m,S[C]),E=lt(g,L[C]);p.push([I,E]),l=Math.min(I,l),u=Math.max(I,u),c=Math.min(E,c),h=Math.max(E,h)}p.xmin=l,p.xmax=u,p.ymin=c,p.ymax=h,p.xref=f,p.yref=d,p.subtract=st(p,k),k.push(p),r.push(p)}}}}return r}function st(t,e){for(var r=!1,n=0;n<e.length;n++)for(var a=e[n],o=0;o<t.length;o++)if(i(t[o],a)){r=!r;break}return r}function lt(t,e){return"date"===t.type&&(e=e.replace("_"," ")),"log"===t.type?t.c2p(e):t.r2p(e,null,t.calendar)}function ut(t){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];r=(r=r.concat(i)).concat([i[0]])}return(a=r).isRect=5===a.length&&a[0][0]===a[4][0]&&a[0][1]===a[4][1]&&a[0][0]===a[1][0]&&a[2][0]===a[3][0]&&a[0][1]===a[3][1]&&a[1][1]===a[2][1]||a[0][1]===a[1][1]&&a[2][1]===a[3][1]&&a[0][0]===a[3][0]&&a[1][0]===a[2][0],a.isRect&&(a.xmin=Math.min(a[0][0],a[2][0]),a.xmax=Math.max(a[0][0],a[2][0]),a.ymin=Math.min(a[0][1],a[2][1]),a.ymax=Math.max(a[0][1],a[2][1])),a;var a}function ct(t){return function(e,r){for(var n,i,a=0;a<t.length;a++){var o=t[a],s=o._id,l=s.charAt(0);if(r.isRect){n||(n={});var u=r[l+"min"],c=r[l+"max"];void 0!==u&&void 0!==c&&(n[s]=[B(o,u),B(o,c)].sort(S))}else i||(i={}),i[s]=r.map(N(o))}n&&(e.range=n),i&&(e.lassoPoints=i)}}function ht(t,e){e&&(e.selections=(t.layout||{}).selections||[]),t.emit("plotly_selected",e)}function pt(t){t.emit("plotly_deselect",null)}t.exports={reselect:nt,prepSelect:function(t,e,r,n,i){var u=!j(n),c=h(i),y=p(i),v=d(i),_=f(i),x=m(i),w="drawcircle"===i,T="drawline"===i||w,k=n.gd,M=k._fullLayout,S=x&&"immediate"===M.newselection.mode&&u,L=M._zoomlayer,P=n.element.getBoundingClientRect(),I=n.plotinfo,E=U(I),F=e-P.left,B=r-P.top;M._calcInverseTransform(k);var N=A.apply3DTransform(M._invTransform)(F,B);F=N[0],B=N[1];var q,H,W,J,K,tt,at,ot=M._invScaleX,st=M._invScaleY,lt=F,ft=B,dt="M"+F+","+B,mt=n.xaxes[0],yt=n.yaxes[0],vt=mt._length,gt=yt._length,_t=t.altKey&&!(f(i)&&v);Z(t,k,n),c&&(q=O([[F,B]],D.BENDPX));var xt=L.selectAll("path.select-outline-"+I.id).data([1]),bt=_?M.newshape:M.newselection;_&&(n.hasText=bt.label.text||bt.label.texttemplate);var wt=_&&!v?bt.fillcolor:"rgba(0,0,0,0)",Tt=bt.line.color||(u?s.contrast(k._fullLayout.plot_bgcolor):"#7f7f7f");xt.enter().append("path").attr("class","select-outline select-outline-"+I.id).style({opacity:_?bt.opacity/2:1,"stroke-dasharray":o(bt.line.dash,bt.line.width),"stroke-width":bt.line.width+"px","shape-rendering":"crispEdges"}).call(s.stroke,Tt).call(s.fill,wt).attr("fill-rule","evenodd").classed("cursor-move",!!_).attr("transform",E).attr("d",dt+"Z");var kt=L.append("path").attr("class","zoombox-corners").style({fill:s.background,stroke:s.defaultLine,"stroke-width":1}).attr("transform",E).attr("d","M0,0Z");if(_&&n.hasText){var Mt=L.select(".label-temp");Mt.empty()&&(Mt=L.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var At=M._uid+D.SELECTID,St=[],Lt=X(k,n.xaxes,n.yaxes,n.subplot);S&&!t.shiftKey&&(n._clearSubplotSelections=function(){if(u){var t=mt._id,e=yt._id;it(k,t,e,Lt);for(var r=(k.layout||{}).selections||[],n=[],i=!1,o=0;o<r.length;o++){var s=M.selections[o];s.xref!==t||s.yref!==e?n.push(r[o]):i=!0}i&&(k._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",k,{selections:n}))}});var Ct=function(t){return t.plotinfo.fillRangeItems||ct(t.xaxes.concat(t.yaxes))}(n);n.moveFn=function(t,e){n._clearSubplotSelections&&(n._clearSubplotSelections(),n._clearSubplotSelections=void 0),lt=Math.max(0,Math.min(vt,ot*t+F)),ft=Math.max(0,Math.min(gt,st*e+B));var r=Math.abs(lt-F),i=Math.abs(ft-B);if(y){var a,o,s;if(x){var l=M.selectdirection;switch(a="any"===l?i<Math.min(.6*r,z)?"h":r<Math.min(.6*i,z)?"v":"d":l){case"h":o=w?gt/2:0,s=gt;break;case"v":o=w?vt/2:0,s=vt}}if(_)switch(M.newshape.drawdirection){case"vertical":a="h",o=w?gt/2:0,s=gt;break;case"horizontal":a="v",o=w?vt/2:0,s=vt;break;case"ortho":r<i?(a="h",o=B,s=ft):(a="v",o=F,s=lt);break;default:a="d"}"h"===a?((J=T?b(w,[lt,o],[lt,s]):[[F,o],[F,s],[lt,s],[lt,o]]).xmin=T?lt:Math.min(F,lt),J.xmax=T?lt:Math.max(F,lt),J.ymin=Math.min(o,s),J.ymax=Math.max(o,s),kt.attr("d","M"+J.xmin+","+(B-z)+"h-4v"+2*z+"h4ZM"+(J.xmax-1)+","+(B-z)+"h4v"+2*z+"h-4Z")):"v"===a?((J=T?b(w,[o,ft],[s,ft]):[[o,B],[o,ft],[s,ft],[s,B]]).xmin=Math.min(o,s),J.xmax=Math.max(o,s),J.ymin=T?ft:Math.min(B,ft),J.ymax=T?ft:Math.max(B,ft),kt.attr("d","M"+(F-z)+","+J.ymin+"v-4h"+2*z+"v4ZM"+(F-z)+","+(J.ymax-1)+"v4h"+2*z+"v-4Z")):"d"===a&&((J=T?b(w,[F,B],[lt,ft]):[[F,B],[F,ft],[lt,ft],[lt,B]]).xmin=Math.min(F,lt),J.xmax=Math.max(F,lt),J.ymin=Math.min(B,ft),J.ymax=Math.max(B,ft),kt.attr("d","M0,0Z"))}else c&&(q.addPt([lt,ft]),J=q.filtered);if(n.selectionDefs&&n.selectionDefs.length?(W=$(n.mergedPolygons,J,_t),J.subtract=_t,H=G(n.selectionDefs.concat([J]))):(W=[J],H=R(J)),g(et(W,v),xt,n),x){var u,h=nt(k,!1),p=h.eventData?h.eventData.points.slice():[];h=nt(k,!1,H,Lt,n),H=h.selectionTesters,at=h.eventData,u=q?q.filtered:ut(W),C.throttle(At,D.SELECTDELAY,(function(){for(var t=(St=rt(H,Lt)).slice(),e=0;e<p.length;e++){for(var r=p[e],n=!1,i=0;i<t.length;i++)if(t[i].curveNumber===r.curveNumber&&t[i].pointNumber===r.pointNumber){n=!0;break}n||t.push(r)}t.length&&(at||(at={}),at.points=t),Ct(at,u),function(t,e){t.emit("plotly_selecting",e)}(k,at)}))}},n.clickFn=function(t,e){if(kt.remove(),k._fullLayout._activeShapeIndex>=0)k._fullLayout._deactivateShape(k);else if(!_){var r=M.clickmode;C.done(At).then((function(){if(C.clear(At),2===t){for(xt.remove(),K=0;K<Lt.length;K++)(tt=Lt[K])._module.selectPoints(tt,!1);if(Q(k,Lt),Y(n),pt(k),Lt.length){var i=Lt[0].xaxis,o=Lt[0].yaxis;if(i&&o){for(var s=[],u=k._fullLayout.selections,c=0;c<u.length;c++){var h=u[c];h&&(h.xref===i._id&&h.yref===o._id||s.push(h))}s.length<u.length&&(k._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",k,{selections:s}))}}}else r.indexOf("select")>-1&&V(e,k,n.xaxes,n.yaxes,n.subplot,n,xt),"event"===r&&ht(k,void 0);l.click(k,e,I.id)})).catch(A.error)}},n.doneFn=function(){kt.remove(),C.done(At).then((function(){C.clear(At),!S&&J&&n.selectionDefs&&(J.subtract=_t,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,W)),(S||_)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(St),x&&ht(k,at)})).catch(A.error)}},clearOutline:_,clearSelectionsCache:Y,selectOnClick:V}},6056:function(t,e,r){"use strict";var n=r(3916),i=r(5376),a=r(2904).line,o=r(8192).u,s=r(2880).extendFlat,l=r(1780).templatedArray,u=(r(6208),r(5464)),c=r(1776).ye,h=r(7728);t.exports=l("shape",{visible:s({},u.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:s({},u.legend,{editType:"calc+arraydraw"}),legendgroup:s({},u.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:s({},u.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:i({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:s({},u.legendrank,{editType:"calc+arraydraw"}),legendwidth:s({},u.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:s({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:s({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:s({},a.color,{editType:"arraydraw"}),width:s({},a.width,{editType:"calc+arraydraw"}),dash:s({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:c({},{keys:Object.keys(h)}),font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},6084:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(3068),o=r(5152);function s(t){return u(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return u(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function u(t,e,r,i,s,l){var u=t/2,c=l;if("pixel"===e){var h=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],p=n.aggNums(Math.max,null,h),f=n.aggNums(Math.min,null,h),d=f<0?Math.abs(f)+u:u,m=p>0?p+u:u;return{ppad:u,ppadplus:c?d:m,ppadminus:c?m:d}}return{ppad:u}}function c(t,e,r,n,i){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,u,c,h,p=1/0,f=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;l<d.length;l++)void 0!==(u=i[d[l].charAt(0)].drawn)&&(!(c=d[l].substr(1).match(a.paramRE))||c.length<u||((h=s(c[u]))<p&&(p=h),h>f&&(f=h)));return f>=p?[p,f]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o<r.length;o++){var u,h,p=r[o];p._extremes={};var f=i.getRefType(p.xref),d=i.getRefType(p.yref);if("paper"!==p.xref&&"domain"!==f){var m="pixel"===p.xsizemode?p.xanchor:p.x0,y="pixel"===p.xsizemode?p.xanchor:p.x1;(h=c(u=i.getFromId(t,p.xref),m,y,p.path,a.paramIsX))&&(p._extremes[u._id]=i.findExtremes(u,h,s(p)))}if("paper"!==p.yref&&"domain"!==d){var v="pixel"===p.ysizemode?p.yanchor:p.y0,g="pixel"===p.ysizemode?p.yanchor:p.y1;(h=c(u=i.getFromId(t,p.yref),v,g,p.path,a.paramIsY))&&(p._extremes[u._id]=i.findExtremes(u,h,l(p)))}}}},3068:function(t){"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},3712:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(1272),o=r(6056),s=r(5152);function l(t,e,r){function a(r,i){return n.coerce(t,e,o,r,i)}if(e._isShape=!0,a("visible")){a("showlegend")&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),n.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),u=a("type",l?"path":"rect"),c="path"!==u;c&&delete e.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule"),a("line.width")&&(a("line.color"),a("line.dash"));for(var h=a("xsizemode"),p=a("ysizemode"),f=["x","y"],d=0;d<2;d++){var m,y,v,g=f[d],_=g+"anchor",x="x"===g?h:p,b={_fullLayout:r},w=i.coerceRef(t,e,b,g,void 0,"paper");if("range"===i.getRefType(w)?((m=i.getFromId(b,w))._shapeIndices.push(e._index),v=s.rangeToShapePosition(m),y=s.shapePositionToRange(m)):y=v=n.identity,c){var T=g+"0",k=g+"1",M=t[T],A=t[k];t[T]=y(t[T],!0),t[k]=y(t[k],!0),"pixel"===x?(a(T,0),a(k,10)):(i.coercePosition(e,b,a,w,T,.25),i.coercePosition(e,b,a,w,k,.75)),e[T]=v(e[T]),e[k]=v(e[k]),t[T]=M,t[k]=A}if("pixel"===x){var S=t[_];t[_]=y(t[_],!0),i.coercePosition(e,b,a,w,_,.25),e[_]=v(e[_]),t[_]=S}}c&&n.noneOrAll(t,e,["x0","x1","y0","y1"]);var L,C,P="line"===u;if(c&&(L=a("label.texttemplate")),L||(C=a("label.text")),C||L){a("label.textangle");var I=a("label.textposition",P?"middle":"middle center");a("label.xanchor"),a("label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(P,I)),a("label.padding"),n.coerceFont(a,"label.font",r.font)}}}t.exports=function(t,e){a(t,e,{name:"shapes",handleItemDefaults:l})}},728:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(2736),o=r(3616),s=r(9856).readPaths,l=r(5152),u=l.getPathString,c=r(7728),h=r(4284).FROM_TL;t.exports=function(t,e,r,p){if(p.selectAll(".shape-label").remove(),r.label.text||r.label.texttemplate){var f;if(r.label.texttemplate){var d={};if("path"!==r.type){var m=i.getFromId(t,r.xref),y=i.getFromId(t,r.yref);for(var v in c){var g=c[v](r,m,y);void 0!==g&&(d[v]=g)}}f=n.texttemplateStringForShapes(r.label.texttemplate,{},t._fullLayout._d3locale,d)}else f=r.label.text;var _,x,b,w,T={"data-index":e},k=r.label.font,M=p.append("g").attr(T).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(f);if(r.path){var A=u(t,r),S=s(A,t);_=1/0,b=1/0,x=-1/0,w=-1/0;for(var L=0;L<S.length;L++)for(var C=0;C<S[L].length;C++)for(var P=S[L][C],I=1;I<P.length;I+=2){var E=P[I],D=P[I+1];_=Math.min(_,E),x=Math.max(x,E),b=Math.min(b,D),w=Math.max(w,D)}}else{var z=i.getFromId(t,r.xref),O=i.getRefType(r.xref),R=i.getFromId(t,r.yref),F=i.getRefType(r.yref),B=l.getDataToPixel(t,z,!1,O),N=l.getDataToPixel(t,R,!0,F);_=B(r.x0),x=B(r.x1),b=N(r.y0),w=N(r.y1)}var U=r.label.textangle;"auto"===U&&(U="line"===r.type?function(t,e,r,n){var i,a;return a=Math.abs(r-t),i=r>=t?e-n:n-e,-180/Math.PI*Math.atan2(i,a)}(_,b,x,w):0),M.call((function(e){return e.call(o.font,k).attr({}),a.convertToTspans(e,t),e}));var j=function(t,e,r,n,i,a,o){var s,l,u,c,p=i.label.textposition,f=i.label.textangle,d=i.label.padding,m=i.type,y=Math.PI/180*a,v=Math.sin(y),g=Math.cos(y),_=i.label.xanchor,x=i.label.yanchor;if("line"===m){"start"===p?(s=t,l=e):"end"===p?(s=r,l=n):(s=(t+r)/2,l=(e+n)/2),"auto"===_&&(_="start"===p?"auto"===f?r>t?"left":r<t?"right":"center":r>t?"right":r<t?"left":"center":"end"===p?"auto"===f?r>t?"right":r<t?"left":"center":r>t?"left":r<t?"right":"center":"center");var b={bottom:-1,middle:0,top:1};if("auto"===f){var w=b[x];u=-d*v*w,c=d*g*w}else u=d*{left:1,center:0,right:-1}[_],c=d*b[x];s+=u,l+=c}else u=d+3,-1!==p.indexOf("right")?(s=Math.max(t,r)-u,"auto"===_&&(_="right")):-1!==p.indexOf("left")?(s=Math.min(t,r)+u,"auto"===_&&(_="left")):(s=(t+r)/2,"auto"===_&&(_="center")),l=-1!==p.indexOf("top")?Math.min(e,n):-1!==p.indexOf("bottom")?Math.max(e,n):(e+n)/2,c=d,"bottom"===x?l-=c:"top"===x&&(l+=c);var T=h[x],k=i.label.font.size,M=o.height;return{textx:s+(M*T-k)*v,texty:l+-(M*T-k)*g,xanchor:_}}(_,b,x,w,r,U,o.bBox(M.node())),V=j.textx,q=j.texty,H=j.xanchor;M.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[H],y:q,x:V,transform:"rotate("+U+","+V+","+q+")"}).call(a.positionText,V,q)}}},5496:function(t,e,r){"use strict";var n=r(3400).strTranslate,i=r(6476),a=r(2760),o=a.drawMode,s=a.selectMode,l=r(4040),u=r(6308),c=r(7e3),h=c.i000,p=c.i090,f=c.i180,d=c.i270,m=r(1936).clearOutlineControllers,y=r(9856),v=y.pointsOnRectangle,g=y.pointsOnEllipse,_=y.writePaths,x=r(3940).newShapes,b=r(3940).createShapeObj,w=r(5968),T=r(728);function k(t,e){var r,n,i,a=t[e][1],o=t[e][2],s=t.length;return n=t[r=(e+1)%s][1],i=t[r][2],n===a&&i===o&&(n=t[r=(e+2)%s][1],i=t[r][2]),[r,n,i]}t.exports=function t(e,r,a,c){c||(c=0);var y=a.gd;function M(){t(e,r,a,c++),(g(e[0])||a.hasText)&&A({redrawing:!0})}function A(t){var e={};void 0!==a.isActiveShape&&(a.isActiveShape=!1,e=x(r,a)),void 0!==a.isActiveSelection&&(a.isActiveSelection=!1,e=w(r,a),y._fullLayout._reselect=!0),Object.keys(e).length&&l.call((t||{}).redrawing?"relayout":"_guiRelayout",y,e)}var S,L,C,P,I,E=y._fullLayout._zoomlayer,D=a.dragmode,z=o(D),O=s(D);if((z||O)&&(y._fullLayout._outlining=!0),m(y),r.attr("d",_(e)),c||!a.isActiveShape&&!a.isActiveSelection||(I=function(t,e){for(var r=0;r<e.length;r++){var n=e[r];t[r]=[];for(var i=0;i<n.length;i++){t[r][i]=[];for(var a=0;a<n[i].length;a++)t[r][i][a]=n[i][a]}}return t}([],e),function(t){S=[];for(var r=0;r<e.length;r++){var o=e[r],s=v(o),l=!s&&g(o);S[r]=[];for(var c=o.length,m=0;m<c;m++)if("Z"!==o[m][0]&&(!l||m===h||m===p||m===f||m===d)){var _,x=s&&a.isActiveSelection;x&&(_=k(o,m));var b=o[m][1],w=o[m][2],T=t.append(x?"rect":"circle").attr("data-i",r).attr("data-j",m).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(x){var M=_[1]-b,A=_[2]-w,L=A?5:Math.max(Math.min(25,Math.abs(M)-5),5),C=M?5:Math.max(Math.min(25,Math.abs(A)-5),5);T.classed(A?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",L).attr("height",C).attr("x",b-L/2).attr("y",w-C/2).attr("transform",n(M/2,A/2))}else T.classed("cursor-grab",!0).attr("r",5).attr("cx",b).attr("cy",w);S[r][m]={element:T.node(),gd:y,prepFn:B,doneFn:U,clickFn:j},i.init(S[r][m])}}}(E.append("g").attr("class","outline-controllers")),function(){if(L=[],e.length){L[0]={element:r[0][0],gd:y,prepFn:q,doneFn:H,clickFn:G},i.init(L[0])}}()),z&&a.hasText){var R=E.select(".label-temp"),F=b(r,a,a.dragmode);T(y,"label-temp",F,R)}function B(t){C=+t.srcElement.getAttribute("data-i"),P=+t.srcElement.getAttribute("data-j"),S[C][P].moveFn=N}function N(t,r){if(e.length){var n=I[C][P][1],i=I[C][P][2],o=e[C],s=o.length;if(v(o)){var l=t,u=r;a.isActiveSelection&&(k(o,P)[1]===o[P][1]?u=0:l=0);for(var c=0;c<s;c++)if(c!==P){var h=o[c];h[1]===o[P][1]&&(h[1]=n+l),h[2]===o[P][2]&&(h[2]=i+u)}if(o[P][1]=n+l,o[P][2]=i+u,!v(o))for(var p=0;p<s;p++)for(var f=0;f<o[p].length;f++)o[p][f]=I[C][p][f]}else o[P][1]=n+t,o[P][2]=i+r;M()}}function U(){A()}function j(t,r){if(2===t){C=+r.srcElement.getAttribute("data-i"),P=+r.srcElement.getAttribute("data-j");var n=e[C];v(n)||g(n)||function(){if(e.length&&e[C]&&e[C].length){for(var t=[],r=0;r<e[C].length;r++)r!==P&&t.push(e[C][r]);t.length>1&&(2!==t.length||"Z"!==t[1][0])&&(0===P&&(t[0][0]="M"),e[C]=t,M(),A())}}()}}function V(t,r){!function(t,r){if(e.length)for(var n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)for(var a=0;a+2<e[n][i].length;a+=2)e[n][i][a+1]=I[n][i][a+1]+t,e[n][i][a+2]=I[n][i][a+2]+r}(t,r),M()}function q(t){(C=+t.srcElement.getAttribute("data-i"))||(C=0),L[C].moveFn=V}function H(){A()}function G(t){2===t&&function(t){if(s(t._fullLayout.dragmode)){m(t);var e=t._fullLayout._activeSelectionIndex,r=(t.layout||{}).selections||[];if(e<r.length){for(var n=[],i=0;i<r.length;i++)i!==e&&n.push(r[i]);delete t._fullLayout._activeSelectionIndex;var a=t._fullLayout.selections[e];t._fullLayout._deselect={xref:a.xref,yref:a.yref},l.call("_guiRelayout",t,{selections:n})}}}(y)}}},4016:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=r(4460),s=r(9856).readPaths,l=r(5496),u=r(728),c=r(1936).clearOutlineControllers,h=r(6308),p=r(3616),f=r(1780).arrayEditor,d=r(6476),m=r(3972),y=r(3068),v=r(5152),g=v.getPathString;function _(t){var e=t._fullLayout;for(var r in e._shapeUpperLayer.selectAll("path").remove(),e._shapeLowerLayer.selectAll("path").remove(),e._shapeUpperLayer.selectAll("text").remove(),e._shapeLowerLayer.selectAll("text").remove(),e._plots){var n=e._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;i<e.shapes.length;i++)!0===e.shapes[i].visible&&w(t,i)}function x(t){return!!t._fullLayout._outlining}function b(t){return!t._context.edits.shapePosition}function w(t,e){t._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+e+'"]').remove();var r=v.makeShapesOptionsAndPlotinfo(t,e),c=r.options,w=r.plotinfo;function A(r){var A=g(t,c),S={"data-index":e,"fill-rule":c.fillrule,d:A},L=c.opacity,C=c.fillcolor,P=c.line.width?c.line.color:"rgba(0,0,0,0)",I=c.line.width,E=c.line.dash;I||!0!==c.editable||(I=5,E="solid");var D="Z"!==A[A.length-1],z=b(t)&&c.editable&&t._fullLayout._activeShapeIndex===e;z&&(C=D?"rgba(0,0,0,0)":t._fullLayout.activeshape.fillcolor,L=t._fullLayout.activeshape.opacity);var O,R=r.append("g").classed("shape-group",!0).attr({"data-index":e}),F=R.append("path").attr(S).style("opacity",L).call(h.stroke,P).call(h.fill,C).call(p.dashLine,E,I);if(T(R,t,c),u(t,e,c,R),(z||t._context.edits.shapePosition)&&(O=f(t.layout,"shapes",c)),z){F.style({cursor:"move"});var B={element:F.node(),plotinfo:w,gd:t,editHelpers:O,hasText:c.label.text||c.label.texttemplate,isActiveShape:!0},N=s(A,t);l(N,F,B)}else t._context.edits.shapePosition?function(t,e,r,s,l,c){var h,f,_,b,w,M,A,S,L,C,P,I,E,D,z,O,R=10,F=10,B="pixel"===r.xsizemode,N="pixel"===r.ysizemode,U="line"===r.type,j="path"===r.type,V=c.modifyItem,q=n.select(e.node().parentNode),H=o.getFromId(t,r.xref),G=o.getRefType(r.xref),Z=o.getFromId(t,r.yref),Y=o.getRefType(r.yref),W=v.getDataToPixel(t,H,!1,G),X=v.getDataToPixel(t,Z,!0,Y),J=v.getPixelToData(t,H,!1,G),K=v.getPixelToData(t,Z,!0,Y),Q=U?function(){var t=10,n=Math.max(r.line.width,t),i=l.append("g").attr("data-index",s).attr("drag-helper",!0);i.append("path").attr("d",e.attr("d")).style({cursor:"move","stroke-width":n,"stroke-opacity":"0"});var a={"fill-opacity":"0"},o=Math.max(n/2,t);return i.append("circle").attr({"data-line-point":"start-point",cx:B?W(r.xanchor)+r.x0:W(r.x0),cy:N?X(r.yanchor)-r.y0:X(r.y0),r:o}).style(a).classed("cursor-grab",!0),i.append("circle").attr({"data-line-point":"end-point",cx:B?W(r.xanchor)+r.x1:W(r.x1),cy:N?X(r.yanchor)-r.y1:X(r.y1),r:o}).style(a).classed("cursor-grab",!0),i}():e,$={element:Q.node(),gd:t,prepFn:function(n){x(t)||(B&&(w=W(r.xanchor)),N&&(M=X(r.yanchor)),"path"===r.type?z=r.path:(h=B?r.x0:W(r.x0),f=N?r.y0:X(r.y0),_=B?r.x1:W(r.x1),b=N?r.y1:X(r.y1)),h<_?(L=h,E="x0",C=_,D="x1"):(L=_,E="x1",C=h,D="x0"),!N&&f<b||N&&f>b?(A=f,P="y0",S=b,I="y1"):(A=b,P="y1",S=f,I="y0"),tt(n),nt(l,r),function(t,e,r){var n=e.xref,i=e.yref,a=o.getFromId(r,n),s=o.getFromId(r,i),l="";"paper"===n||a.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),p.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),$.moveFn="move"===O?et:rt,$.altKey=n.altKey)},doneFn:function(){x(t)||(m(e),it(l),T(e,t,r),i.call("_guiRelayout",t,c.getUpdateObj()))},clickFn:function(){x(t)||it(l)}};function tt(r){if(x(t))O=null;else if(U)O="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=$.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!j&&i>R&&a>F&&!r.shiftKey?d.getCursor(o/i,1-s/a):"move";m(e,l),O=l.split("-")[0]}}function et(n,i){if("path"===r.type){var a=function(t){return t},o=a,c=a;B?V("xanchor",r.xanchor=J(w+n)):(o=function(t){return J(W(t)+n)},H&&"date"===H.type&&(o=v.encodeDate(o))),N?V("yanchor",r.yanchor=K(M+i)):(c=function(t){return K(X(t)+i)},Z&&"date"===Z.type&&(c=v.encodeDate(c))),V("path",r.path=k(z,o,c))}else B?V("xanchor",r.xanchor=J(w+n)):(V("x0",r.x0=J(h+n)),V("x1",r.x1=J(_+n))),N?V("yanchor",r.yanchor=K(M+i)):(V("y0",r.y0=K(f+i)),V("y1",r.y1=K(b+i)));e.attr("d",g(t,r)),nt(l,r),u(t,s,r,q)}function rt(n,i){if(j){var a=function(t){return t},o=a,c=a;B?V("xanchor",r.xanchor=J(w+n)):(o=function(t){return J(W(t)+n)},H&&"date"===H.type&&(o=v.encodeDate(o))),N?V("yanchor",r.yanchor=K(M+i)):(c=function(t){return K(X(t)+i)},Z&&"date"===Z.type&&(c=v.encodeDate(c))),V("path",r.path=k(z,o,c))}else if(U){if("resize-over-start-point"===O){var p=h+n,d=N?f-i:f+i;V("x0",r.x0=B?p:J(p)),V("y0",r.y0=N?d:K(d))}else if("resize-over-end-point"===O){var m=_+n,y=N?b-i:b+i;V("x1",r.x1=B?m:J(m)),V("y1",r.y1=N?y:K(y))}}else{var x=function(t){return-1!==O.indexOf(t)},T=x("n"),G=x("s"),Y=x("w"),Q=x("e"),$=T?A+i:A,tt=G?S+i:S,et=Y?L+n:L,rt=Q?C+n:C;N&&(T&&($=A-i),G&&(tt=S-i)),(!N&&tt-$>F||N&&$-tt>F)&&(V(P,r[P]=N?$:K($)),V(I,r[I]=N?tt:K(tt))),rt-et>R&&(V(E,r[E]=B?et:J(et)),V(D,r[D]=B?rt:J(rt)))}e.attr("d",g(t,r)),nt(l,r),u(t,s,r,q)}function nt(t,e){(B||N)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=W(B?e.xanchor:a.midRange(r?[e.x0,e.x1]:v.extractPathCoords(e.path,y.paramIsX))),o=X(N?e.yanchor:a.midRange(r?[e.y0,e.y1]:v.extractPathCoords(e.path,y.paramIsY)));if(i=v.roundPositionForSharpStrokeRendering(i,1),o=v.roundPositionForSharpStrokeRendering(o,1),B&&N){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(B){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var u="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function it(t){t.selectAll(".visual-cue").remove()}d.init($),Q.node().onmousemove=tt}(t,F,c,e,r,O):!0===c.editable&&F.style("pointer-events",D||h.opacity(C)*L<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(t,e){if(b(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void M(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=M,_(t)}}}(t,F)}))}c._input&&!0===c.visible&&("above"===c.layer?A(t._fullLayout._shapeUpperLayer):"paper"===c.xref||"paper"===c.yref?A(t._fullLayout._shapeLowerLayer):"between"===c.layer?A(w.shapelayerBetween):w._hadPlotinfo?A((w.mainplotinfo||w).shapelayer):A(t._fullLayout._shapeLowerLayer))}function T(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");p.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function k(t,e,r){return t.replace(y.segmentRE,(function(t){var n=0,i=t.charAt(0),a=y.paramIsX[i],o=y.paramIsY[i],s=y.numParams[i];return i+t.substr(1).replace(y.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function M(t){b(t)&&t._fullLayout._activeShapeIndex>=0&&(c(t),delete t._fullLayout._activeShapeIndex,_(t))}t.exports={draw:_,drawOne:w,eraseActiveShape:function(t){if(b(t)){c(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e<r.length){for(var n=[],a=0;a<r.length;a++)a!==e&&n.push(r[a]);return delete t._fullLayout._activeShapeIndex,i.call("_guiRelayout",t,{shapes:n})}}},drawLabel:u}},2872:function(t,e,r){"use strict";var n=r(7824).overrideAll,i=r(5464),a=r(5376),o=r(8192).u,s=r(2880).extendFlat,l=r(1776).ye,u=r(7728);t.exports=n({newshape:{visible:s({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:s({},i.legend,{}),legendgroup:s({},i.legendgroup,{}),legendgrouptitle:{text:s({},i.legendgrouptitle.text,{}),font:a({})},legendrank:s({},i.legendrank,{}),legendwidth:s({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:s({},o,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:s({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:l({newshape:!0},{keys:Object.keys(u)}),font:a({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)"},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")},7e3:function(t){"use strict";t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},5144:function(t,e,r){"use strict";var n=r(6308),i=r(3400);t.exports=function(t,e,r){if(r("newshape.visible"),r("newshape.name"),r("newshape.showlegend"),r("newshape.legend"),r("newshape.legendwidth"),r("newshape.legendgroup"),r("newshape.legendgrouptitle.text"),i.coerceFont(r,"newshape.legendgrouptitle.font"),r("newshape.legendrank"),r("newshape.drawdirection"),r("newshape.layer"),r("newshape.fillcolor"),r("newshape.fillrule"),r("newshape.opacity"),r("newshape.line.width")){var a=(t||{}).plot_bgcolor||"#FFF";r("newshape.line.color",n.contrast(a)),r("newshape.line.dash")}var o="drawline"===t.dragmode,s=r("newshape.label.text"),l=r("newshape.label.texttemplate");if(s||l){r("newshape.label.textangle");var u=r("newshape.label.textposition",o?"middle":"middle center");r("newshape.label.xanchor"),r("newshape.label.yanchor",function(t,e){return t?"bottom":-1!==e.indexOf("top")?"top":-1!==e.indexOf("bottom")?"bottom":"middle"}(o,u)),r("newshape.label.padding"),i.coerceFont(r,"newshape.label.font",e.font)}r("activeshape.fillcolor"),r("activeshape.opacity")}},9856:function(t,e,r){"use strict";var n=r(9604),i=r(7e3),a=i.CIRCLE_SIDES,o=i.SQRT2,s=r(5840),l=s.p2r,u=s.r2p,c=[0,3,4,5,6,1,2],h=[0,3,4,1,2];function p(t,e){return Math.abs(t-e)<=1e-6}function f(t,e){var r=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(t){var e=t.length;if(!e)return"M0,0Z";for(var r="",n=0;n<e;n++)for(var i=t[n].length,a=0;a<i;a++){var o=t[n][a][0];if("Z"===o)r+="Z";else for(var s=t[n][a].length,l=0;l<s;l++){var u=l;"Q"===o||"S"===o?u=h[l]:"C"===o&&(u=c[l]),r+=t[n][a][u],l>0&&l<s-1&&(r+=",")}}return r},e.readPaths=function(t,e,r,i){var o,s,c,h=n(t),p=[],f=-1,d=0,m=0,y=function(){s=d,c=m};y();for(var v=0;v<h.length;v++){var g,_,x,b,w=[],T=h[v][0],k=T;switch(T){case"M":p[++f]=[],d=+h[v][1],m=+h[v][2],w.push([k,d,m]),y();break;case"Q":case"S":g=+h[v][1],x=+h[v][2],d=+h[v][3],m=+h[v][4],w.push([k,d,m,g,x]);break;case"C":g=+h[v][1],x=+h[v][2],_=+h[v][3],b=+h[v][4],d=+h[v][5],m=+h[v][6],w.push([k,d,m,g,x,_,b]);break;case"T":case"L":d=+h[v][1],m=+h[v][2],w.push([k,d,m]);break;case"H":k="L",d=+h[v][1],w.push([k,d,m]);break;case"V":k="L",m=+h[v][1],w.push([k,d,m]);break;case"A":k="L";var M=+h[v][1],A=+h[v][2];+h[v][4]||(M=-M,A=-A);var S=d-M,L=m;for(o=1;o<=a/2;o++){var C=2*Math.PI*o/a;w.push([k,S+M*Math.cos(C),L+A*Math.sin(C)])}break;case"Z":d===s&&m===c||(d=s,m=c,w.push([k,d,m]))}for(var P=(r||{}).domain,I=e._fullLayout._size,E=r&&"pixel"===r.xsizemode,D=r&&"pixel"===r.ysizemode,z=!1===i,O=0;O<w.length;O++){for(o=0;o+2<7;o+=2){var R=w[O][o+1],F=w[O][o+2];void 0!==R&&void 0!==F&&(d=R,m=F,r&&(r.xaxis&&r.xaxis.p2r?(z&&(R-=r.xaxis._offset),R=E?u(r.xaxis,r.xanchor)+R:l(r.xaxis,R)):(z&&(R-=I.l),P?R=P.x[0]+R/I.w:R/=I.w),r.yaxis&&r.yaxis.p2r?(z&&(F-=r.yaxis._offset),F=D?u(r.yaxis,r.yanchor)-F:l(r.yaxis,F)):(z&&(F-=I.t),F=P?P.y[1]-F/I.h:1-F/I.h)),w[O][o+1]=R,w[O][o+2]=F)}p[f].push(w[O].slice())}}return p},e.pointsOnRectangle=function(t){if(5!==t.length)return!1;for(var e=1;e<3;e++){if(!p(t[0][e]-t[1][e],t[3][e]-t[2][e]))return!1;if(!p(t[0][e]-t[3][e],t[1][e]-t[2][e]))return!1}return!(!p(t[0][1],t[1][1])&&!p(t[0][1],t[3][1])||!(f(t[0],t[1])*f(t[0],t[3])))},e.pointsOnEllipse=function(t){var e=t.length;if(e!==a+1)return!1;e=a;for(var r=0;r<e;r++){var n=(2*e-r)%e,i=(e/2+n)%e,o=(e/2+r)%e;if(!p(f(t[r],t[o]),f(t[n],t[i])))return!1}return!0},e.handleEllipse=function(t,r,n){if(!t)return[r,n];var i=e.ellipseOver({x0:r[0],y0:r[1],x1:n[0],y1:n[1]}),s=(i.x1+i.x0)/2,l=(i.y1+i.y0)/2,u=(i.x1-i.x0)/2,c=(i.y1-i.y0)/2;u||(u=c/=o),c||(c=u/=o);for(var h=[],p=0;p<a;p++){var f=2*p*Math.PI/a;h.push([s+u*Math.cos(f),l+c*Math.sin(f)])}return h},e.ellipseOver=function(t){var e=t.x0,r=t.y0,n=t.x1,i=t.y1,a=n-e,s=i-r,l=((e-=a)+n)/2,u=((r-=s)+i)/2;return{x0:l-(a*=o),y0:u-(s*=o),x1:l+a,y1:u+s}},e.fixDatesForPaths=function(t,e,r){var n="date"===e.type,i="date"===r.type;if(!n&&!i)return t;for(var a=0;a<t.length;a++)for(var o=0;o<t[a].length;o++)for(var s=0;s+2<t[a][o].length;s+=2)n&&(t[a][o][s+1]=t[a][o][s+1].replace(" ","_")),i&&(t[a][o][s+2]=t[a][o][s+2].replace(" ","_"));return t}},3940:function(t,e,r){"use strict";var n=r(2760),i=n.drawMode,a=n.openMode,o=r(7e3),s=o.i000,l=o.i090,u=o.i180,c=o.i270,h=o.cos45,p=o.sin45,f=r(5840),d=f.p2r,m=f.r2p,y=r(1936).clearOutline,v=r(9856),g=v.readPaths,_=v.writePaths,x=v.ellipseOver,b=v.fixDatesForPaths;function w(t,e,r){var n,i=t[0][0],o=e.gd,f=i.getAttribute("d"),y=o._fullLayout.newshape,v=e.plotinfo,w=e.isActiveShape,T=v.xaxis,k=v.yaxis,M=!!v.domain||!v.xaxis,A=!!v.domain||!v.yaxis,S=a(r),L=g(f,o,v,w),C={editable:!0,visible:y.visible,name:y.name,showlegend:y.showlegend,legend:y.legend,legendwidth:y.legendwidth,legendgroup:y.legendgroup,legendgrouptitle:{text:y.legendgrouptitle.text,font:y.legendgrouptitle.font},legendrank:y.legendrank,label:y.label,xref:M?"paper":T._id,yref:A?"paper":k._id,layer:y.layer,opacity:y.opacity,line:{color:y.line.color,width:y.line.width,dash:y.line.dash}};if(S||(C.fillcolor=y.fillcolor,C.fillrule=y.fillrule),1===L.length&&(n=L[0]),n&&5===n.length&&"drawrect"===r)C.type="rect",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[2][1],C.y1=n[2][2];else if(n&&"drawline"===r)C.type="line",C.x0=n[0][1],C.y0=n[0][2],C.x1=n[1][1],C.y1=n[1][2];else if(n&&"drawcircle"===r){C.type="circle";var P=n[s][1],I=n[l][1],E=n[u][1],D=n[c][1],z=n[s][2],O=n[l][2],R=n[u][2],F=n[c][2],B=v.xaxis&&("date"===v.xaxis.type||"log"===v.xaxis.type),N=v.yaxis&&("date"===v.yaxis.type||"log"===v.yaxis.type);B&&(P=m(v.xaxis,P),I=m(v.xaxis,I),E=m(v.xaxis,E),D=m(v.xaxis,D)),N&&(z=m(v.yaxis,z),O=m(v.yaxis,O),R=m(v.yaxis,R),F=m(v.yaxis,F));var U=(I+D)/2,j=(z+R)/2,V=x({x0:U,y0:j,x1:U+(D-I+E-P)/2*h,y1:j+(F-O+R-z)/2*p});B&&(V.x0=d(v.xaxis,V.x0),V.x1=d(v.xaxis,V.x1)),N&&(V.y0=d(v.yaxis,V.y0),V.y1=d(v.yaxis,V.y1)),C.x0=V.x0,C.y0=V.y0,C.x1=V.x1,C.y1=V.y1}else C.type="path",T&&k&&b(L,T,k),C.path=_(L),n=null;return C}t.exports={newShapes:function(t,e){if(t.length&&t[0][0]){var r=e.gd,n=e.isActiveShape,a=e.dragmode,o=(r.layout||{}).shapes||[];if(!i(a)&&void 0!==n){var s=r._fullLayout._activeShapeIndex;if(s<o.length)switch(r._fullLayout.shapes[s].type){case"rect":a="drawrect";break;case"circle":a="drawcircle";break;case"line":a="drawline";break;case"path":var l=o[s].path||"";a="Z"===l[l.length-1]?"drawclosedpath":"drawopenpath"}}var u=w(t,e,a);y(r);for(var c=e.editHelpers,h=(c||{}).modifyItem,p=[],f=0;f<o.length;f++){var d=r._fullLayout.shapes[f];if(p[f]=d._input,void 0!==n&&f===r._fullLayout._activeShapeIndex){var m=u;switch(d.type){case"line":case"rect":case"circle":h("x0",m.x0),h("x1",m.x1),h("y0",m.y0),h("y1",m.y1);break;case"path":h("path",m.path)}}}return void 0===n?(p.push(u),p):c?c.getUpdateObj():{}}},createShapeObj:w}},1936:function(t){"use strict";t.exports={clearOutlineControllers:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(t){var e=t._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),t._fullLayout._outlining=!1}}},5152:function(t,e,r){"use strict";var n=r(3068),i=r(3400),a=r(4460);e.rangeToShapePosition=function(t){return"log"===t.type?t.r2d:function(t){return t}},e.shapePositionToRange=function(t){return"log"===t.type?t.d2r:function(t){return t}},e.decodeDate=function(t){return function(e){return e.replace&&(e=e.replace("_"," ")),t(e)}},e.encodeDate=function(t){return function(e){return t(e).replace(" ","_")}},e.extractPathCoords=function(t,e,r){var a=[];return t.match(n.segmentRE).forEach((function(t){var o=e[t.charAt(0)].drawn;if(void 0!==o){var s=t.substr(1).match(n.paramRE);if(s&&!(s.length<o)){var l=s[o],u=r?l:i.cleanNumber(l);a.push(u)}}})),a},e.getDataToPixel=function(t,r,n,i){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(t){return r._length*(n?1-t:t)+r._offset};else{var s=e.shapePositionToRange(r);a=function(t){return r._offset+r.r2p(s(t,!0))},"date"===r.type&&(a=e.decodeDate(a))}else a=n?function(t){return o.t+o.h*(1-t)}:function(t){return o.l+o.w*t};return a},e.getPixelToData=function(t,r,n,i){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(t){var e=(t-r._offset)/r._length;return n?1-e:e};else{var s=e.rangeToShapePosition(r);a=function(t){return s(r.p2r(t-r._offset))}}else a=n?function(t){return 1-(t-o.t)/o.h}:function(t){return(t-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(t,e){var r=1===Math.round(e%2),n=Math.round(t);return r?n+.5:n},e.makeShapesOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.shapes[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=t._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=t._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},e.makeSelectionsOptionsAndPlotinfo=function(t,e){var r=t._fullLayout.selections[e]||{},n=t._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=t._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=t._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},e.getPathString=function(t,r){var o,s,l,u,c,h,p,f,d=r.type,m=a.getRefType(r.xref),y=a.getRefType(r.yref),v=a.getFromId(t,r.xref),g=a.getFromId(t,r.yref),_=t._fullLayout._size;if(v?"domain"===m?s=function(t){return v._offset+v._length*t}:(o=e.shapePositionToRange(v),s=function(t){return v._offset+v.r2p(o(t,!0))}):s=function(t){return _.l+_.w*t},g?"domain"===y?u=function(t){return g._offset+g._length*(1-t)}:(l=e.shapePositionToRange(g),u=function(t){return g._offset+g.r2p(l(t,!0))}):u=function(t){return _.t+_.h*(1-t)},"path"===d)return v&&"date"===v.type&&(s=e.decodeDate(s)),g&&"date"===g.type&&(u=e.decodeDate(u)),function(t,e,r){var a=t.path,o=t.xsizemode,s=t.ysizemode,l=t.xanchor,u=t.yanchor;return a.replace(n.segmentRE,(function(t){var a=0,c=t.charAt(0),h=n.paramIsX[c],p=n.paramIsY[c],f=n.numParams[c],d=t.substr(1).replace(n.paramRE,(function(t){return h[a]?t="pixel"===o?e(l)+Number(t):e(t):p[a]&&(t="pixel"===s?r(u)-Number(t):r(t)),++a>f&&(t="X"),t}));return a>f&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),c+d}))}(r,s,u);if("pixel"===r.xsizemode){var x=s(r.xanchor);c=x+r.x0,h=x+r.x1}else c=s(r.x0),h=s(r.x1);if("pixel"===r.ysizemode){var b=u(r.yanchor);p=b-r.y0,f=b-r.y1}else p=u(r.y0),f=u(r.y1);if("line"===d)return"M"+c+","+p+"L"+h+","+f;if("rect"===d)return"M"+c+","+p+"H"+h+"V"+f+"H"+c+"Z";var w=(c+h)/2,T=(p+f)/2,k=Math.abs(w-c),M=Math.abs(T-p),A="A"+k+","+M,S=w+k+","+T;return"M"+S+A+" 0 1,1 "+w+","+(T-M)+A+" 0 0,1 "+S+"Z"}},1592:function(t,e,r){"use strict";var n=r(4016);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(6056),supplyLayoutDefaults:r(3712),supplyDrawNewShapeDefaults:r(5144),includeBasePlot:r(6632)("shapes"),calcAutorange:r(6084),draw:n.draw,drawOne:n.drawOne}},7728:function(t){"use strict";function e(t,e){return e?e.d2l(t):t}function r(t,e){return e?e.l2d(t):t}function n(t,r){return e(t.x1,r)-e(t.x0,r)}function i(t,r,n){return e(t.y1,n)-e(t.y0,n)}t.exports={x0:function(t){return t.x0},x1:function(t){return t.x1},y0:function(t){return t.y0},y1:function(t){return t.y1},slope:function(t,e,r){return"line"!==t.type?void 0:i(t,0,r)/n(t,e)},dx:n,dy:i,width:function(t,e){return Math.abs(n(t,e))},height:function(t,e,r){return Math.abs(i(t,0,r))},length:function(t,e,r){return"line"!==t.type?void 0:Math.sqrt(Math.pow(n(t,e),2)+Math.pow(i(t,0,r),2))},xcenter:function(t,n){return r((e(t.x1,n)+e(t.x0,n))/2,n)},ycenter:function(t,n,i){return r((e(t.y1,i)+e(t.y0,i))/2,i)}}},9861:function(t,e,r){"use strict";var n=r(5376),i=r(6741),a=r(2880).extendDeepAll,o=r(7824).overrideAll,s=r(5656),l=r(1780).templatedArray,u=r(876),c=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:a(i({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:u.gripBgActiveColor},bgcolor:{valType:"color",dflt:u.railBgColor},bordercolor:{valType:"color",dflt:u.railBorderColor},borderwidth:{valType:"number",min:0,dflt:u.railBorderWidth},ticklen:{valType:"number",min:0,dflt:u.tickLength},tickcolor:{valType:"color",dflt:u.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:u.minorTickLength}}),"arraydraw","from-root")},876:function(t){"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(t,e,r){"use strict";var n=r(3400),i=r(1272),a=r(9861),o=r(876).name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:u}),l=0,c=0;c<s.length;c++)s[c].visible&&l++;if(l<2?e.visible=!1:o("visible")){e._stepCount=l;var h=e._visibleSteps=n.filterVisible(s);(s[o("active")]||{}).visible||(e.active=h[0]._index),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("len"),o("lenmode"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("currentvalue.visible")&&(o("currentvalue.xanchor"),o("currentvalue.prefix"),o("currentvalue.suffix"),o("currentvalue.offset"),n.coerceFont(o,"currentvalue.font",e.font)),o("transition.duration"),o("transition.easing"),o("bgcolor"),o("activebgcolor"),o("bordercolor"),o("borderwidth"),o("ticklen"),o("tickwidth"),o("tickcolor"),o("minorticklen")}}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}if("skip"===t.method||Array.isArray(t.args)?r("visible"):e.visible=!1){r("method"),r("args");var i=r("label","step-"+e._index);r("value",i),r("execute")}}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},9664:function(t,e,r){"use strict";var n=r(3428),i=r(7316),a=r(6308),o=r(3616),s=r(3400),l=s.strTranslate,u=r(2736),c=r(1780).arrayEditor,h=r(876),p=r(4284),f=p.LINE_SPACING,d=p.FROM_TL,m=p.FROM_BR;function y(t){return h.autoMarginIdRoot+t._index}function v(t){return t._index}function g(t,e){var r=o.tester.selectAll("g."+h.labelGroupClass).data(e._visibleSteps);r.enter().append("g").classed(h.labelGroupClass,!0);var a=0,l=0;r.each((function(t){var r=b(n.select(this),{step:t},e).node();if(r){var i=o.bBox(r);l=Math.max(l,i.height),a=Math.max(a,i.width)}})),r.remove();var c=e._dims={};c.inputAreaWidth=Math.max(h.railWidth,h.gripHeight);var p=t._fullLayout._size;c.lx=p.l+p.w*e.x,c.ly=p.t+p.h*(1-e.y),"fraction"===e.lenmode?c.outerLength=Math.round(p.w*e.len):c.outerLength=e.len,c.inputAreaStart=0,c.inputAreaLength=Math.round(c.outerLength-e.pad.l-e.pad.r);var f=(c.inputAreaLength-2*h.stepInset)/(e._stepCount-1),v=a+h.labelPadding;if(c.labelStride=Math.max(1,Math.ceil(v/f)),c.labelHeight=l,c.currentValueMaxWidth=0,c.currentValueHeight=0,c.currentValueTotalHeight=0,c.currentValueMaxLines=1,e.currentvalue.visible){var g=o.tester.append("g");r.each((function(t){var r=_(g,e,t.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},i=u.lineCount(r);c.currentValueMaxWidth=Math.max(c.currentValueMaxWidth,Math.ceil(n.width)),c.currentValueHeight=Math.max(c.currentValueHeight,Math.ceil(n.height)),c.currentValueMaxLines=Math.max(c.currentValueMaxLines,i)})),c.currentValueTotalHeight=c.currentValueHeight+e.currentvalue.offset,g.remove()}c.height=c.currentValueTotalHeight+h.tickOffset+e.ticklen+h.labelOffset+c.labelHeight+e.pad.t+e.pad.b;var x="left";s.isRightAnchor(e)&&(c.lx-=c.outerLength,x="right"),s.isCenterAnchor(e)&&(c.lx-=c.outerLength/2,x="center");var w="top";s.isBottomAnchor(e)&&(c.ly-=c.height,w="bottom"),s.isMiddleAnchor(e)&&(c.ly-=c.height/2,w="middle"),c.outerLength=Math.ceil(c.outerLength),c.height=Math.ceil(c.height),c.lx=Math.round(c.lx),c.ly=Math.round(c.ly);var T={y:e.y,b:c.height*m[w],t:c.height*d[w]};"fraction"===e.lenmode?(T.l=0,T.xl=e.x-e.len*d[x],T.r=0,T.xr=e.x+e.len*m[x]):(T.x=e.x,T.l=c.outerLength*d[x],T.r=c.outerLength*m[x]),i.autoMargin(t,y(e),T)}function _(t,e,r){if(e.currentvalue.visible){var n,i,a=e._dims;switch(e.currentvalue.xanchor){case"right":n=a.inputAreaLength-h.currentValueInset-a.currentValueMaxWidth,i="left";break;case"center":n=.5*a.inputAreaLength,i="middle";break;default:n=h.currentValueInset,i="left"}var l=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":i,"data-notex":1})})),c=e.currentvalue.prefix?e.currentvalue.prefix:"";if("string"==typeof r)c+=r;else{var p=e.steps[e.active].label,d=e._gd._fullLayout._meta;d&&(p=s.templateString(p,d)),c+=p}e.currentvalue.suffix&&(c+=e.currentvalue.suffix),l.call(o.font,e.currentvalue.font).text(c).call(u.convertToTspans,e._gd);var m=u.lineCount(l),y=(a.currentValueMaxLines+1-m)*e.currentvalue.font.size*f;return u.positionText(l,n,y),l}}function x(t,e,r){s.ensureSingle(t,"rect",h.gripRectClass,(function(n){n.call(M,e,t,r).style("pointer-events","all")})).attr({width:h.gripWidth,height:h.gripHeight,rx:h.gripRadius,ry:h.gripRadius}).call(a.stroke,r.bordercolor).call(a.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function b(t,e,r){var n=s.ensureSingle(t,"text",h.labelClass,(function(t){t.attr({"text-anchor":"middle","data-notex":1})})),i=e.step.label,a=r._gd._fullLayout._meta;return a&&(i=s.templateString(i,a)),n.call(o.font,r.font).text(i).call(u.convertToTspans,r._gd),n}function w(t,e){var r=s.ensureSingle(t,"g",h.labelsClass),i=e._dims,a=r.selectAll("g."+h.labelGroupClass).data(i.labelSteps);a.enter().append("g").classed(h.labelGroupClass,!0),a.exit().remove(),a.each((function(t){var r=n.select(this);r.call(b,t,e),o.setTranslate(r,L(e,t.fraction),h.tickOffset+e.ticklen+e.font.size*f+h.labelOffset+i.currentValueTotalHeight)}))}function T(t,e,r,n,i){var a=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&k(t,e,r,o,!0,i)}function k(t,e,r,n,a,o){var s=r.active;r.active=n,c(t.layout,h.name,r).applyUpdate("active",n);var l=r.steps[r.active];e.call(S,r,o),e.call(_,r),t.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:a,previousActive:s}),l&&l.method&&a&&(e._nextMethod?(e._nextMethod.step=l,e._nextMethod.doCallback=a,e._nextMethod.doTransition=o):(e._nextMethod={step:l,doCallback:a,doTransition:o},e._nextMethodRaf=window.requestAnimationFrame((function(){var r=e._nextMethod.step;r.method&&(r.execute&&i.executeAPICommand(t,r.method,r.args),e._nextMethod=null,e._nextMethodRaf=null)}))))}function M(t,e,r){if(!e._context.staticPlot){var i=r.node(),o=n.select(e);t.on("mousedown",l),t.on("touchstart",l)}function s(){return r.data()[0]}function l(){var t=s();e.emit("plotly_sliderstart",{slider:t});var l=r.select("."+h.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(a.fill,t.activebgcolor);var u=C(t,n.mouse(i)[0]);function c(){var t=s(),a=C(t,n.mouse(i)[0]);T(e,r,t,a,!1)}function p(){var t=s();t._dragging=!1,l.call(a.fill,t.bgcolor),o.on("mouseup",null),o.on("mousemove",null),o.on("touchend",null),o.on("touchmove",null),e.emit("plotly_sliderend",{slider:t,step:t.steps[t.active]})}T(e,r,t,u,!0),t._dragging=!0,o.on("mousemove",c),o.on("touchmove",c),o.on("mouseup",p),o.on("touchend",p)}}function A(t,e){var r=t.selectAll("rect."+h.tickRectClass).data(e._visibleSteps),i=e._dims;r.enter().append("rect").classed(h.tickRectClass,!0),r.exit().remove(),r.attr({width:e.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(t,r){var s=r%i.labelStride==0,l=n.select(this);l.attr({height:s?e.ticklen:e.minorticklen}).call(a.fill,e.tickcolor),o.setTranslate(l,L(e,r/(e._stepCount-1))-.5*e.tickwidth,(s?h.tickOffset:h.minorTickOffset)+i.currentValueTotalHeight)}))}function S(t,e,r){for(var n=t.select("rect."+h.gripRectClass),i=0,a=0;a<e._stepCount;a++)if(e._visibleSteps[a]._index===e.active){i=a;break}var o=L(e,i/(e._stepCount-1));if(!e._invokingCommand){var s=n;r&&e.transition.duration>0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*h.gripWidth,e._dims.currentValueTotalHeight))}}function L(t,e){var r=t._dims;return r.inputAreaStart+h.stepInset+(r.inputAreaLength-2*h.stepInset)*Math.min(1,Math.max(0,e))}function C(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-h.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*h.stepInset-2*r.inputAreaStart)))}function P(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",h.railTouchRectClass,(function(n){n.call(M,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,h.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function I(t,e){var r=e._dims,n=r.inputAreaLength-2*h.railInset,i=s.ensureSingle(t,"rect",h.railRectClass);i.attr({width:n,height:h.railWidth,rx:h.railRadius,ry:h.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,h.railInset,.5*(r.inputAreaWidth-h.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,a=function(t,e){for(var r=t[h.name],n=[],i=0;i<r.length;i++){var a=r[i];a.visible&&(a._gd=e,n.push(a))}return n}(r,t),s=r._infolayer.selectAll("g."+h.containerClassName).data(a.length>0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,y(e))}if(s.enter().append("g").classed(h.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+h.groupClassName).each(l)})).remove(),0!==a.length){var u=s.selectAll("g."+h.groupClassName).data(a,v);u.enter().append("g").classed(h.groupClassName,!0),u.exit().each(l).remove();for(var c=0;c<a.length;c++){var p=a[c];g(t,p)}u.each((function(e){var r=n.select(this);!function(t){var e=t._dims;e.labelSteps=[];for(var r=t._stepCount,n=0;n<r;n+=e.labelStride)e.labelSteps.push({fraction:n/(r-1),step:t._visibleSteps[n]})}(e),i.manageCommandObserver(t,e,e._visibleSteps,(function(e){var n=r.data()[0];n.active!==e.index&&(n._dragging||k(t,r,n,e.index,!1,!0))})),function(t,e,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),e.call(_,r).call(I,r).call(w,r).call(A,r).call(P,t,r).call(x,t,r);var n=r._dims;o.setTranslate(e,n.lx+r.pad.l,n.ly+r.pad.t),e.call(S,r,!1),e.call(_,r)}(t,n.select(this),e)}))}}},7544:function(t,e,r){"use strict";var n=r(876);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(9861),supplyLayoutDefaults:r(8132),draw:r(9664)}},1668:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(7316),o=r(4040),s=r(3400),l=s.strTranslate,u=r(3616),c=r(6308),h=r(2736),p=r(3448),f=r(4284).OPPOSITE_SIDE,d=/ [XY][0-9]* /;t.exports={draw:function(t,e,r){var m,y=r.propContainer,v=r.propName,g=r.placeholder,_=r.traceIndex,x=r.avoid||{},b=r.attributes,w=r.transform,T=r.containerGroup,k=t._fullLayout,M=1,A=!1,S=y.title,L=(S&&S.text?S.text:"").trim(),C=S&&S.font?S.font:{},P=C.family,I=C.size,E=C.color;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":v.indexOf(!0)&&(m="colorbarTitleText");var D=t._context.edits[m];""===L?M=0:L.replace(d," % ")===g.replace(d," % ")&&(M=.2,A=!0,D||(L="")),r._meta?L=s.templateString(L,r._meta):k._meta&&(L=s.templateString(L,k._meta));var z,O=L||D;T||(T=s.ensureSingle(k._infolayer,"g","g-"+e),z=k._hColorbarMoveTitle);var R=T.selectAll("text").data(O?[0]:[]);if(R.enter().append("text"),R.text(L).attr("class",e),R.exit().remove(),!O)return T;function F(t){s.syncOrAsync([B,N],t)}function B(e){var r;return!w&&z&&(w={}),w?(r="",w.rotate&&(r+="rotate("+[w.rotate,b.x,b.y]+")"),(w.offset||z)&&(r+=l(0,(w.offset||0)-(z||0)))):r=null,e.attr("transform",r),e.style({"font-family":P,"font-size":n.round(I,2)+"px",fill:c.rgb(E),opacity:M*c.opacity(E),"font-weight":a.fontWeight}).attr(b).call(h.convertToTspans,t),a.previousPromises(t)}function N(e){var r=n.select(e.node().parentNode);if(x&&x.selection&&x.side&&L){r.attr("transform",null);var a=f[x.side],o="left"===x.side||"top"===x.side?-1:1,c=i(x.pad)?x.pad:2,h=u.bBox(r.node()),p={t:0,b:0,l:0,r:0},d=t._fullLayout._reservedMargin;for(var m in d)for(var v in d[m]){var g=d[m][v];p[v]=Math.max(p[v],g)}var _={left:p.l,top:p.t,right:k.width-p.r,bottom:k.height-p.b},b=x.maxShift||o*(_[x.side]-h[x.side]),w=0;if(b<0)w=b;else{var T=x.offsetLeft||0,M=x.offsetTop||0;h.left-=T,h.right-=T,h.top-=M,h.bottom-=M,x.selection.each((function(){var t=u.bBox(this);s.bBoxIntersect(h,t,c)&&(w=Math.max(w,o*(t[x.side]-h[a])+c))})),w=Math.min(b,w),y._titleScoot=Math.abs(w)}if(w>0||b<0){var A={left:[-w,0],right:[w,0],top:[0,-w],bottom:[0,w]}[x.side];r.attr("transform",l(A[0],A[1]))}}}return R.call(F),D&&(L?R.on(".opacity",null):(M=0,A=!0,R.text(g).on("mouseover.opacity",(function(){n.select(this).transition().duration(p.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(p.HIDE_PLACEHOLDER).style("opacity",0)}))),R.call(h.makeEditable,{gd:t}).on("edit",(function(e){void 0!==_?o.call("_guiRestyle",t,v,e,_):o.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(F)})).on("input",(function(t){this.text(t||" ").call(h.positionText,b.x,b.y)}))),R.classed("js-placeholder",A),T}}},8444:function(t,e,r){"use strict";var n=r(5376),i=r(2548),a=r(2880).extendFlat,o=r(7824).overrideAll,s=r(6741),l=r(1780).templatedArray,u=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:u,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},1331:function(t){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},1384:function(t,e,r){"use strict";var n=r(3400),i=r(1272),a=r(8444),o=r(1331).name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:u}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},4420:function(t,e,r){"use strict";var n=r(3428),i=r(7316),a=r(6308),o=r(3616),s=r(3400),l=r(2736),u=r(1780).arrayEditor,c=r(4284).LINE_SPACING,h=r(1331),p=r(7400);function f(t){return t._index}function d(t,e){return+t.attr(h.menuIndexAttrName)===e._index}function m(t,e,r,n,i,a,o,s){e.active=o,u(t.layout,h.name,e).applyUpdate("active",o),"buttons"===e.type?v(t,n,null,null,e):"dropdown"===e.type&&(i.attr(h.menuIndexAttrName,"-1"),y(t,n,i,a,e),s||v(t,n,i,a,e))}function y(t,e,r,n,i){var a=s.ensureSingle(e,"g",h.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,u=i.active,c=i.buttons[u]||h.blankHeaderOpts,p={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},f={width:l.headerWidth,height:l.headerHeight};a.call(g,i,c,t).call(A,i,p,f),s.ensureSingle(e,"text",h.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(o.font,i.font).text(h.arrowSymbol[i.direction])})).attr({x:l.headerWidth-h.arrowOffsetX+i.pad.l,y:l.headerHeight/2+h.textOffsetY+i.pad.t}),a.on("click",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(h.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?h.dropdownButtonClassName:h.buttonClassName,c=r.selectAll("g."+u).data(s.filterVisible(l)),p=c.enter().append("g").classed(u,!0),f=c.exit();"dropdown"===o.type?(p.attr("opacity","0").transition().attr("opacity","1"),f.transition().attr("opacity","0").remove()):f.remove();var d=0,y=0,v=o._dims,_=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(_?y=v.headerHeight+h.gapButtonHeader:d=v.headerWidth+h.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(y=-h.gapButtonHeader+h.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-h.gapButtonHeader+h.gapButton-v.openWidth);var x={x:v.lx+d+o.pad.l,y:v.ly+y+o.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},k={l:x.x+o.borderwidth,t:x.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(g,o,s,t).call(A,o,x),u.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(m(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(m(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),u.on("mouseover",(function(){u.call(w)})),u.on("mouseout",(function(){u.call(T,o),c.call(b,o)}))})),c.call(b,o),_?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=x.y-k.t):(k.w=x.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.direction=o.direction,a&&(c.size()?function(t,e,r,n,i,a){var o,s,l,u=i.direction,c="up"===u||"down"===u,p=i._dims,f=i.active;if(c)for(s=0,l=0;l<f;l++)s+=p.heights[l]+h.gapButton;else for(o=0,l=0;l<f;l++)o+=p.widths[l]+h.gapButton;n.enable(a,o,s),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,a,o,k):function(t){var e=!!t.hbar,r=!!t.vbar;e&&t.hbar.transition().attr("opacity","0").each("end",(function(){e=!1,r||t.disable()})),r&&t.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,e||t.disable()}))}(a))}function g(t,e,r,n){t.call(_,e).call(x,e,r,n)}function _(t,e){s.ensureSingle(t,"rect",h.itemRectClassName,(function(t){t.attr({rx:h.rx,ry:h.ry,"shape-rendering":"crispEdges"})})).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px")}function x(t,e,r,n){var i=s.ensureSingle(t,"text",h.itemTextClassName,(function(t){t.attr({"text-anchor":"start","data-notex":1})})),a=r.label,u=n._fullLayout._meta;u&&(a=s.templateString(a,u)),i.call(o.font,e.font).text(a).call(l.convertToTspans,n)}function b(t,e){var r=e.active;t.each((function(t,i){var o=n.select(this);i===r&&e.showactive&&o.select("rect."+h.itemRectClassName).call(a.fill,h.activeColor)}))}function w(t){t.select("rect."+h.itemRectClassName).call(a.fill,h.hoverColor)}function T(t,e){t.select("rect."+h.itemRectClassName).call(a.fill,e.bgcolor)}function k(t,e){var r=e._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},a=o.tester.selectAll("g."+h.dropdownButtonClassName).data(s.filterVisible(e.buttons));a.enter().append("g").classed(h.dropdownButtonClassName,!0);var u=-1!==["up","down"].indexOf(e.direction);a.each((function(i,a){var s=n.select(this);s.call(g,e,i,t);var p=s.select("."+h.itemTextClassName),f=p.node()&&o.bBox(p.node()).width,d=Math.max(f+h.textPadX,h.minWidth),m=e.font.size*c,y=l.lineCount(p),v=Math.max(m*y,h.minHeight)+h.textOffsetY;v=Math.ceil(v),d=Math.ceil(d),r.widths[a]=d,r.heights[a]=v,r.height1=Math.max(r.height1,v),r.width1=Math.max(r.width1,d),u?(r.totalWidth=Math.max(r.totalWidth,d),r.openWidth=r.totalWidth,r.totalHeight+=v+h.gapButton,r.openHeight+=v+h.gapButton):(r.totalWidth+=d+h.gapButton,r.openWidth+=d+h.gapButton,r.totalHeight=Math.max(r.totalHeight,v),r.openHeight=r.totalHeight)})),u?r.totalHeight-=h.gapButton:r.totalWidth-=h.gapButton,r.headerWidth=r.width1+h.arrowPadX,r.headerHeight=r.height1,"dropdown"===e.type&&(u?(r.width1+=h.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=h.arrowPadX),a.remove();var p=r.totalWidth+e.pad.l+e.pad.r,f=r.totalHeight+e.pad.t+e.pad.b,d=t._fullLayout._size;r.lx=d.l+d.w*e.x,r.ly=d.t+d.h*(1-e.y);var m="left";s.isRightAnchor(e)&&(r.lx-=p,m="right"),s.isCenterAnchor(e)&&(r.lx-=p/2,m="center");var y="top";s.isBottomAnchor(e)&&(r.ly-=f,y="bottom"),s.isMiddleAnchor(e)&&(r.ly-=f/2,y="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),i.autoMargin(t,M(e),{x:e.x,y:e.y,l:p*({right:1,center:.5}[m]||0),r:p*({left:1,center:.5}[m]||0),b:f*({top:1,middle:.5}[y]||0),t:f*({bottom:1,middle:.5}[y]||0)})}function M(t){return h.autoMarginIdRoot+t._index}function A(t,e,r,n){n=n||{};var i=t.select("."+h.itemRectClassName),a=t.select("."+h.itemTextClassName),s=e.borderwidth,u=r.index,p=e._dims;o.setTranslate(t,s+r.x,s+r.y);var f=-1!==["up","down"].indexOf(e.direction),d=n.height||(f?p.heights[u]:p.height1);i.attr({x:0,y:0,width:n.width||(f?p.width1:p.widths[u]),height:d});var m=e.font.size*c,y=(l.lineCount(a)-1)*m/2;l.positionText(a,h.textOffsetX,d/2-y+h.textOffsetY),f?r.y+=p.heights[u]+r.yPad:r.x+=p.widths[u]+r.xPad,r.index++}function S(t,e){t.attr(h.menuIndexAttrName,e||"-1").selectAll("g."+h.dropdownButtonClassName).remove()}t.exports=function(t){var e=t._fullLayout,r=s.filterVisible(e[h.name]);function a(e){i.autoMargin(t,M(e))}var o=e._menulayer.selectAll("g."+h.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+h.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+h.headerGroupClassName).data(r,f);l.enter().append("g").classed(h.headerGroupClassName,!0);for(var u=s.ensureSingle(o,"g",h.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),c=0;c<r.length;c++){var g=r[c];k(t,g)}var _="updatemenus"+e._uid,x=new p(t,u,_);l.enter().size()&&(u.node().parentNode.appendChild(u.node()),u.call(S)),l.exit().each((function(t){u.call(S),a(t)})).remove(),l.each((function(e){var r=n.select(this),a="dropdown"===e.type?u:null;i.manageCommandObserver(t,e,e.buttons,(function(n){m(t,e,e.buttons[n.index],r,a,x,n.index,!0)})),"dropdown"===e.type?(y(t,r,u,x,e),d(u,e)&&v(t,r,u,x,e)):v(t,r,null,null,e)}))}}},6908:function(t,e,r){"use strict";var n=r(1331);t.exports={moduleType:"component",name:n.name,layoutAttributes:r(8444),supplyLayoutDefaults:r(1384),draw:r(4420)}},7400:function(t,e,r){"use strict";t.exports=s;var n=r(3428),i=r(6308),a=r(3616),o=r(3400);function s(t,e,r){this.gd=t,this.container=e,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(t,e,r){var o=this.gd._fullLayout,l=o.width,u=o.height;this.position=t;var c,h,p,f,d=this.position.l,m=this.position.w,y=this.position.t,v=this.position.h,g=this.position.direction,_="down"===g,x="left"===g,b="up"===g,w=m,T=v;_||x||"right"===g||b||(this.position.direction="down",_=!0),_||b?(h=(c=d)+w,_?(p=y,T=(f=Math.min(p+T,u))-p):T=(f=y+T)-(p=Math.max(f-T,0))):(f=(p=y)+T,x?w=(h=d+w)-(c=Math.max(h-w,0)):(c=d,w=(h=Math.min(c+w,l))-c)),this._box={l:c,t:p,w:w,h:T};var k=m>w,M=s.barLength+2*s.barPad,A=s.barWidth+2*s.barPad,S=d,L=y+v;L+A>u&&(L=u-A);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:L,width:M,height:A}),this._hbarXMin=S+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=v>T,I=s.barWidth+2*s.barPad,E=s.barLength+2*s.barPad,D=d+m,z=y;D+I>l&&(D=l-I);var O=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),P?(this.vbar=O.attr({rx:s.barRadius,ry:s.barRadius,x:D,y:z,width:I,height:E}),this._vbarYMin=z+E/2,this._vbarTranslateMax=T-E):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=c-.5,B=P?h+I+.5:h+.5,N=p-.5,U=k?f+A+.5:f+.5,j=o._topdefs.selectAll("#"+R).data(k||P?[0]:[]);if(j.exit().remove(),j.enter().append("clipPath").attr("id",R).append("rect"),k||P?(this._clipRect=j.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(U)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:y,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||P){var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var q=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},4284:function(t){"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},6208:function(t){"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},6880:function(t){"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},9104:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},3448:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},9032:function(t){"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},9616:function(t,e){"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},4884:function(t,e,r){"use strict";e.version=r(5788).version,r(8324),r(9288);for(var n=r(4040),i=e.register=n.register,a=r(2448),o=Object.keys(a),s=0;s<o.length;s++){var l=o[s];"_"!==l.charAt(0)&&(e[l]=a[l]),i({moduleType:"apiMethod",name:l,fn:a[l]})}i(r(5875)),i([r(9180),r(6864),r(2676),r(1592),r(7402),r(6908),r(7544),r(9692),r(1152),r(2704),r(4968),r(8932),r(5080),r(2780),r(3024),r(3080)]),i([r(6580),r(1680)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(i(window.PlotlyLocales),delete window.PlotlyLocales),e.Icons=r(9224);var u=r(3024),c=r(7316);e.Plots={resize:c.resize,graphJson:c.graphJson,sendDataToCloud:c.sendDataToCloud},e.Fx={hover:u.hover,unhover:u.unhover,loneHover:u.loneHover,loneUnhover:u.loneUnhover},e.Snapshot=r(8904),e.PlotSchema=r(3060)},9224:function(t){"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>","<defs>"," <style>"," .cls-0{fill:#000;}"," .cls-1{fill:#FFF;}"," .cls-2{fill:#F26;}"," .cls-3{fill:#D69;}"," .cls-4{fill:#BAC;}"," .cls-5{fill:#9EF;}"," </style>","</defs>"," <title>plotly-logomark</title>"," <g id='symbol'>"," <rect class='cls-0' x='0' y='0' width='132' height='132' rx='18' ry='18'/>"," <circle class='cls-5' cx='102' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='30' r='6'/>"," <circle class='cls-4' cx='78' cy='54' r='6'/>"," <circle class='cls-3' cx='54' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='30' r='6'/>"," <circle class='cls-2' cx='30' cy='54' r='6'/>"," <path class='cls-1' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>"," <path class='cls-1' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>"," <path class='cls-1' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>"," <path class='cls-1' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}},8308:function(t,e){"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},1864:function(t,e,r){"use strict";var n=r(435),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function u(t,e){return a(e-t,s)}function c(t,e){if(l(e))return!0;var r,n;e[0]<e[1]?(r=e[0],n=e[1]):(r=e[1],n=e[0]),(r=i(r,s))>(n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function h(t,e,r,n,i,a,u){i=i||0,a=a||0;var c,h,p,f,d,m=l([r,n]);function y(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}m?(c=0,h=o,p=s):r<n?(c=r,p=n):(c=n,p=r),t<e?(f=t,d=e):(f=e,d=t);var v,g=Math.abs(p-c)<=o?0:1;function _(t,e,r){return"A"+[t,t]+" "+[0,g,r]+" "+y(t,e)}return m?v=null===f?"M"+y(d,c)+_(d,h,0)+_(d,p,0)+"Z":"M"+y(f,c)+_(f,h,0)+_(f,p,0)+"ZM"+y(d,c)+_(d,h,1)+_(d,p,1)+"Z":null===f?(v="M"+y(d,c)+_(d,p,0),u&&(v+="L0,0Z")):v="M"+y(f,c)+"L"+y(d,c)+_(d,p,0)+"L"+y(f,p)+_(f,c,1)+"Z",v}t.exports={deg2rad:function(t){return t/180*o},rad2deg:function(t){return t/o*180},angleDelta:u,angleDist:function(t,e){return Math.abs(u(t,e))},isFullCircle:l,isAngleInsideSector:c,isPtInsideSector:function(t,e,r,n){return!!c(e,n)&&(r[0]<r[1]?(i=r[0],a=r[1]):(i=r[1],a=r[0]),t>=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return h(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return h(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return h(t,e,r,n,i,a,1)}}},8116:function(t,e,r){"use strict";var n=r(3160).decode,i=r(3620),a=Array.isArray,o=ArrayBuffer,s=DataView;function l(t){return o.isView(t)&&!(t instanceof s)}function u(t){return a(t)||l(t)}e.isTypedArray=l,e.isArrayOrTypedArray=u,e.isArray1D=function(t){return!u(t[0])},e.ensureArray=function(t,e){return a(t)||(t=[]),t.length=e,t};var c={u1c:"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"==typeof Int8Array?void 0:Int8Array,u1:"undefined"==typeof Uint8Array?void 0:Uint8Array,i2:"undefined"==typeof Int16Array?void 0:Int16Array,u2:"undefined"==typeof Uint16Array?void 0:Uint16Array,i4:"undefined"==typeof Int32Array?void 0:Int32Array,u4:"undefined"==typeof Uint32Array?void 0:Uint32Array,f4:"undefined"==typeof Float32Array?void 0:Float32Array,f8:"undefined"==typeof Float64Array?void 0:Float64Array};function h(t){return t.constructor===ArrayBuffer}function p(t,e,r){if(u(t)){if(u(t[0])){for(var n=r,i=0;i<t.length;i++)n=e(n,t[i].length);return n}return t.length}return 0}c.uint8c=c.u1c,c.uint8=c.u1,c.int8=c.i1,c.uint16=c.u2,c.int16=c.i2,c.uint32=c.u4,c.int32=c.i4,c.float32=c.f4,c.float64=c.f8,e.isArrayBuffer=h,e.decodeTypedArraySpec=function(t){var e=[],r=function(t){return{bdata:t.bdata,dtype:t.dtype,shape:t.shape}}(t),i=r.dtype,a=c[i];if(!a)throw new Error('Error in dtype: "'+i+'"');var o=a.BYTES_PER_ELEMENT,s=r.bdata;h(s)||(s=n(s));var l=void 0===r.shape?[s.byteLength/o]:(""+r.shape).split(",");l.reverse();var u,p,f=l.length,d=+l[0],m=o*d,y=0;if(1===f)e=new a(s);else if(2===f)for(u=+l[1],p=0;p<u;p++)e[p]=new a(s,y,d),y+=m;else{if(3!==f)throw new Error("ndim: "+f+'is not supported with the shape:"'+r.shape+'"');u=+l[1];for(var v=+l[2],g=0;g<v;g++)for(e[g]=[],p=0;p<u;p++)e[g][p]=new a(s,y,d),y+=m}return e.bdata=r.bdata,e.dtype=r.dtype,e.shape=l.reverse().join(","),t._inputArray=e,e},e.isTypedArraySpec=function(t){return i(t)&&t.hasOwnProperty("dtype")&&"string"==typeof t.dtype&&t.hasOwnProperty("bdata")&&("string"==typeof t.bdata||h(t.bdata))&&(void 0===t.shape||t.hasOwnProperty("shape")&&("string"==typeof t.shape||"number"==typeof t.shape))},e.concat=function(){var t,e,r,n,i,o,s,l,u=[],c=!0,h=0;for(r=0;r<arguments.length;r++)(o=(n=arguments[r]).length)&&(e?u.push(n):(e=n,i=o),a(n)?t=!1:(c=!1,h?t!==n.constructor&&(t=!1):t=n.constructor),h+=o);if(!h)return[];if(!u.length)return e;if(c)return e.concat.apply(e,u);if(t){for((s=new t(h)).set(e),r=0;r<u.length;r++)n=u[r],s.set(n,i),i+=n.length;return s}for(s=new Array(h),l=0;l<e.length;l++)s[l]=e[l];for(r=0;r<u.length;r++){for(n=u[r],l=0;l<n.length;l++)s[i+l]=n[l];i+=l}return s},e.maxRowLength=function(t){return p(t,Math.max,0)},e.minRowLength=function(t){return p(t,Math.min,1/0)}},4037:function(t,e,r){"use strict";var n=r(8248),i=r(9032).BADNUM,a=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(t){return"string"==typeof t&&(t=t.replace(a,"")),n(t)?Number(t):i}},3696:function(t){"use strict";t.exports=function(t){var e=t._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each((function(t){t.regl&&t.regl.clear({color:!0,depth:!0})}))}},5352:function(t){"use strict";t.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}},3064:function(t,e,r){"use strict";var n=r(8248),i=r(9760),a=r(5464),o=r(8304),s=r(6308),l=r(3448).DESELECTDIM,u=r(2296),c=r(3756).counter,h=r(435).modHalf,p=r(8116).isArrayOrTypedArray,f=r(8116).isTypedArraySpec,d=r(8116).decodeTypedArraySpec;function m(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&p(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},a=i,o={set:function(t){a=t}};return n.coerceFunction(t,o,i,r),a!==i}e.valObjectMeta={data_array:{coerceFunction:function(t,e,r){e.set(p(t)?t:f(t)?d(t):r)}},enumerated:{coerceFunction:function(t,e,r,n){n.coerceNumber&&(t=+t),-1===n.values.indexOf(t)?e.set(r):e.set(t)},validateFunction:function(t,e){e.coerceNumber&&(t=+t);for(var r=e.values,n=0;n<r.length;n++){var i=String(r[n]);if("/"===i.charAt(0)&&"/"===i.charAt(i.length-1)){if(new RegExp(i.substr(1,i.length-2)).test(t))return!0}else if(t===r[n])return!0}return!1}},boolean:{coerceFunction:function(t,e,r){!0===t||!1===t?e.set(t):e.set(r)}},number:{coerceFunction:function(t,e,r,i){!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&t<i.min||void 0!==i.max&&t>i.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(h(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),a=0;a<i.length;){var o=i[a];-1===n.flags.indexOf(o)||i.indexOf(o)<a?i.splice(a,1):a++}i.length?e.set(i.join("+")):e.set(r)}else e.set(r);else e.set(t)}},any:{coerceFunction:function(t,e,r){void 0===t?e.set(r):e.set(f(t)?d(t):t)}},info_array:{coerceFunction:function(t,r,n,i){function a(t,r,n){var i,a={set:function(t){i=t}};return void 0===n&&(n=r.dflt),e.valObjectMeta[r.valType].coerceFunction(t,a,n,r),i}if(f(t)&&(t=d(t)),p(t)){var o,s,l,u,c,h,m=2===i.dimensions||"1-2"===i.dimensions&&Array.isArray(t)&&p(t[0]),y=i.items,v=[],g=Array.isArray(y),_=g&&m&&p(y[0]),x=m&&g&&!_,b=g&&!x?y.length:t.length;if(n=Array.isArray(n)?n:[],m)for(o=0;o<b;o++)for(v[o]=[],l=p(t[o])?t[o]:[],c=x?y.length:g?y[o].length:l.length,s=0;s<c;s++)u=x?y[s]:g?y[o][s]:y,void 0!==(h=a(l[s],u,(n[o]||[])[s]))&&(v[o][s]=h);else for(o=0;o<b;o++)void 0!==(h=a(t[o],g?y[o]:y,n[o]))&&(v[o]=h);r.set(v)}else r.set(n)},validateFunction:function(t,e){if(!p(t))return!1;var r=e.items,n=Array.isArray(r),i=2===e.dimensions;if(!e.freeLength&&t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(i){if(!p(t[a])||!e.freeLength&&t[a].length!==r[a].length)return!1;for(var o=0;o<t[a].length;o++)if(!m(t[a][o],n?r[a][o]:r))return!1}else if(!m(t[a],n?r[a]:r))return!1;return!0}}},e.coerce=function(t,r,n,i,a){var o=u(n,i).get(),s=u(t,i),l=u(r,i),c=s.get(),h=r._template;if(void 0===c&&h&&(c=u(h,i).get(),h=0),void 0===a&&(a=o.dflt),o.arrayOk){if(p(c))return l.set(c),c;if(f(c))return c=d(c),l.set(c),c}var y=e.valObjectMeta[o.valType].coerceFunction;y(c,l,a,o);var v=l.get();return h&&v===a&&!m(c,o)&&(y(c=u(h,i).get(),l,a,o),v=l.get()),v},e.coerce2=function(t,r,n,i,a){var o=u(t,i),s=e.coerce(t,r,n,i,a);return null!=o.get()&&s},e.coerceFont=function(t,e,r){var n={};return r=r||{},n.family=t(e+".family",r.family),n.size=t(e+".size",r.size),n.color=t(e+".color",r.color),n},e.coercePattern=function(t,e,r,n){if(t(e+".shape")){t(e+".solidity"),t(e+".size");var i="overlay"===t(e+".fillmode");if(!n){var a=t(e+".bgcolor",i?r:void 0);t(e+".fgcolor",i?s.contrast(a):r)}t(e+".fgopacity",i?.5:1)}},e.coerceHoverinfo=function(t,r,n){var i,o=r._module.attributes,s=o.hoverinfo?o:a,l=s.hoverinfo;if(1===n._dataLength){var u="all"===l.dflt?l.flags.slice():l.dflt.split("+");u.splice(u.indexOf("name"),1),i=u.join("+")}return e.coerce(t,r,s,"hoverinfo",i)},e.coerceSelectionMarkerOpacity=function(t,e){if(t.marker){var r,n,i=t.marker.opacity;void 0!==i&&(p(i)||t.selected||t.unselected||(r=i,n=l*i),e("selected.marker.opacity",r),e("unselected.marker.opacity",n))}},e.validate=m},7555:function(t,e,r){"use strict";var n,i,a=r(4336).Yn,o=r(8248),s=r(4248),l=r(435).mod,u=r(9032),c=u.BADNUM,h=u.ONEDAY,p=u.ONEHOUR,f=u.ONEMIN,d=u.ONESEC,m=u.EPOCHJD,y=r(4040),v=r(4336).E9,g=/^\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,_=/^\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,x=(new Date).getFullYear()-70;function b(t){return t&&y.componentsRegistry.calendars&&"string"==typeof t&&"gregorian"!==t}function w(t,e){return String(t+Math.pow(10,e)).substr(1)}e.dateTick0=function(t,r){var n=function(t,e){return b(t)?e?y.getComponentMethod("calendars","CANONICAL_SUNDAY")[t]:y.getComponentMethod("calendars","CANONICAL_TICK")[t]:e?"2000-01-02":"2000-01-01"}(t,!!r);if(r<2)return n;var i=e.dateTime2ms(n,t);return i+=h*(r-1),e.ms2DateTime(i,0,t)},e.dfltRange=function(t){return b(t)?y.getComponentMethod("calendars","DFLTRANGE")[t]:["2000-01-01","2001-01-01"]},e.isJSDate=function(t){return"object"==typeof t&&null!==t&&"function"==typeof t.getTime},e.dateTime2ms=function(t,r){if(e.isJSDate(t)){var a=t.getTimezoneOffset()*f,o=(t.getUTCMinutes()-t.getMinutes())*f+(t.getUTCSeconds()-t.getSeconds())*d+(t.getUTCMilliseconds()-t.getMilliseconds());if(o){var s=3*f;a=a-s/2+l(o-a+s/2,s)}return(t=Number(t)-a)>=n&&t<=i?t:c}if("string"!=typeof t&&"number"!=typeof t)return c;t=String(t);var u=b(r),v=t.charAt(0);!u||"G"!==v&&"g"!==v||(t=t.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),T=t.match(w?_:g);if(!T)return c;var k=T[1],M=T[3]||"1",A=Number(T[5]||1),S=Number(T[7]||0),L=Number(T[9]||0),C=Number(T[11]||0);if(u){if(2===k.length)return c;var P;k=Number(k);try{var I=y.getComponentMethod("calendars","getCal")(r);if(w){var E="i"===M.charAt(M.length-1);M=parseInt(M,10),P=I.newDate(k,I.toMonthIndex(k,M,E),A)}else P=I.newDate(k,Number(M),A)}catch(t){return c}return P?(P.toJD()-m)*h+S*p+L*f+C*d:c}k=2===k.length?(Number(k)+2e3-x)%100+x:Number(k),M-=1;var D=new Date(Date.UTC(2e3,M,A,S,L));return D.setUTCFullYear(k),D.getUTCMonth()!==M||D.getUTCDate()!==A?c:D.getTime()+C*d},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==c};var T=90*h,k=3*p,M=5*f;function A(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+="."+w(i,a)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return c;e||(e=0);var a,o,s,u,g,_,x=Math.floor(10*l(t+.05,1)),w=Math.round(t-x/10);if(b(r)){var S=Math.floor(w/h)+m,L=Math.floor(l(t,h));try{a=y.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=v("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e<T?Math.floor(L/p):0,s=e<T?Math.floor(L%p/f):0,u=e<k?Math.floor(L%f/d):0,g=e<M?L%d*10+x:0}else _=new Date(w),a=v("%Y-%m-%d")(_),o=e<T?_.getUTCHours():0,s=e<T?_.getUTCMinutes():0,u=e<k?_.getUTCSeconds():0,g=e<M?10*_.getUTCMilliseconds()+x:0;return A(a,o,s,u,g)},e.ms2DateTimeLocal=function(t){if(!(t>=n+h&&t<=i-h))return c;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return A(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===c)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(b(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,L=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function P(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(L,(function(){return C[r("%q")(i)]})),b(n))try{t=y.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var I=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,a){if(i=b(i)&&i,!e)if("y"===r)e=a.year;else if("m"===r)e=a.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,h),n=w(Math.floor(r/p),2)+":"+w(l(Math.floor(r/f),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),I[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+P(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return P(e,t,n,i)};var E=3*h;e.incrementMonth=function(t,e,r){r=b(r)&&r;var n=l(t,h);if(t=Math.round(t-n),r)try{var i=Math.round(t/h)+m,a=y.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-m)*h+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var u=new Date(t+E);return u.setUTCMonth(u.getUTCMonth()+e)+n-E},e.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,u=b(e)&&y.getComponentMethod("calendars","getCal")(e),c=0;c<t.length;c++)if(n=t[c],o(n)){if(!(n%h))if(u)try{1===(r=u.fromJD(n/h+m)).day()?1===r.month()?i++:a++:s++}catch(t){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?i++:a++:s++}else l++;s+=a+=i;var p=t.length-l;return{exactYears:i/p,exactMonths:a/p,exactDays:s/p}}},2200:function(t,e,r){"use strict";var n=r(3428),i=r(4248),a=r(2248),o=r(6524);function s(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function l(t,e,r){var n="plotly.js-style-"+t,a=document.getElementById(n);a||((a=document.createElement("style")).setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var o=a.sheet;o.insertRule?o.insertRule(e+"{"+r+"}",0):o.addRule?o.addRule(e,r,0):i.warn("addStyleRule failed")}function u(t){var e=window.getComputedStyle(t,null),r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform");return"none"===r?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map((function(t){return+t}))}function c(t){for(var e=[];h(t);)e.push(t),t=t.parentNode;return e}function h(t){return t&&(t instanceof Element||t instanceof HTMLElement)}t.exports={getGraphDiv:function(t){var e;if("string"==typeof t){if(null===(e=document.getElementById(t)))throw new Error("No DOM element with id '"+t+"' exists on the page.");return e}if(null==t)throw new Error("DOM element provided is null or undefined");return t},isPlotDiv:function(t){var e=n.select(t);return e.node()instanceof HTMLElement&&e.size()&&e.classed("js-plotly-plot")},removeElement:s,addStyleRule:function(t,e){l("global",t,e)},addRelatedStyleRule:l,deleteRelatedStyleRule:function(t){var e="plotly.js-style-"+t,r=document.getElementById(e);r&&s(r)},getFullTransformMatrix:function(t){var e=c(t),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(t){var e=u(t);if(e){var n=a.convertCssMatrix(e);r=o.multiply(r,r,n)}})),r},getElementTransformMatrix:u,getElementAndAncestors:c,equalDomRects:function(t,e){return t&&e&&t.top===e.top&&t.left===e.left&&t.right===e.right&&t.bottom===e.bottom}}},5924:function(t,e,r){"use strict";var n=r(1252).EventEmitter,i={init:function(t){if(t._ev instanceof n)return t;var e=new n,r=new n;return t._ev=e,t._internalEv=r,t.on=e.on.bind(e),t.once=e.once.bind(e),t.removeListener=e.removeListener.bind(e),t.removeAllListeners=e.removeAllListeners.bind(e),t._internalOn=r.on.bind(r),t._internalOnce=r.once.bind(r),t._removeInternalListener=r.removeListener.bind(r),t._removeAllInternalListeners=r.removeAllListeners.bind(r),t.emit=function(n,i){"undefined"!=typeof jQuery&&jQuery(t).trigger(n,i),e.emit(n,i),r.emit(n,i)},t},triggerHandler:function(t,e,r){var n,i;"undefined"!=typeof jQuery&&(n=jQuery(t).triggerHandler(e,r));var a=t._ev;if(!a)return n;var o,s=a._events[e];if(!s)return n;function l(t){return t.listener?(a.removeListener(e,t.listener),t.fired?void 0:(t.fired=!0,t.listener.apply(a,[r]))):t.apply(a,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return i=l(s[o]),void 0!==n?n:i},purge:function(t){return delete t._ev,delete t.on,delete t.once,delete t.removeListener,delete t.removeAllListeners,delete t.emit,delete t._ev,delete t._internalEv,delete t._internalOn,delete t._internalOnce,delete t._removeInternalListener,delete t._removeAllInternalListeners,t}};t.exports=i},2880:function(t,e,r){"use strict";var n=r(3620),i=Array.isArray;function a(t,e,r,o){var s,l,u,c,h,p,f,d=t[0],m=t.length;if(2===m&&i(d)&&i(t[1])&&0===d.length){if(f=function(t,e){var r,n;for(r=0;r<t.length;r++){if(null!==(n=t[r])&&"object"==typeof n)return!1;void 0!==n&&(e[r]=n)}return!0}(t[1],d),f)return d;d.splice(0,d.length)}for(var y=1;y<m;y++)for(l in s=t[y])u=d[l],c=s[l],o&&i(c)?d[l]=c:e&&c&&(n(c)||(h=i(c)))?(h?(h=!1,p=u&&i(u)?u:[]):p=u&&n(u)?u:{},d[l]=a([p,c],e,r,o)):(void 0!==c||r)&&(d[l]=c);return d}e.extendFlat=function(){return a(arguments,!1,!1,!1)},e.extendDeep=function(){return a(arguments,!0,!1,!1)},e.extendDeepAll=function(){return a(arguments,!0,!0,!1)},e.extendDeepNoArrays=function(){return a(arguments,!0,!1,!0)}},8944:function(t){"use strict";t.exports=function(t){for(var e={},r=[],n=0,i=0;i<t.length;i++){var a=t[i];1!==e[a]&&(e[a]=1,r[n++]=a)}return r}},3880:function(t){"use strict";function e(t){return!0===t.visible}function r(t){var e=t[0].trace;return!0===e.visible&&0!==e._length}t.exports=function(t){for(var n,i=(n=t,Array.isArray(n)&&Array.isArray(n[0])&&n[0][0]&&n[0][0].trace?r:e),a=[],o=0;o<t.length;o++){var s=t[o];i(s)&&a.push(s)}return a}},7144:function(t,e,r){"use strict";var n=r(3428),i=r(6116),a=r(440),o=r(7844),s=r(2428),l=r(5536),u=r(4248),c=r(3620),h=r(2296),p=r(2065),f=Object.keys(i),d={"ISO-3":l,"USA-states":l,"country names":function(t){for(var e=0;e<f.length;e++){var r=f[e];if(new RegExp(i[r]).test(t.trim().toLowerCase()))return r}return u.log("Unrecognized country name: "+t+"."),!1}};function m(t){var e=t.geojson,r=window.PlotlyGeoAssets||{},n="string"==typeof e?r[e]:e;return c(n)?n:(u.error("Oops ... something went wrong when fetching "+e),!1)}t.exports={locationToFeature:function(t,e,r){if(!e||"string"!=typeof e)return!1;var n,i,a,o=d[t](e);if(o){if("USA-states"===t)for(n=[],a=0;a<r.length;a++)(i=r[a]).properties&&i.properties.gu&&"USA"===i.properties.gu&&n.push(i);else n=r;for(a=0;a<n.length;a++)if((i=n[a]).id===o)return i;u.log(["Location with id",o,"does not have a matching topojson feature at this resolution."].join(" "))}return!1},feature2polygons:function(t){var e,r,n,i,a=t.geometry,o=a.coordinates,s=t.id,l=[];function u(t){for(var e=0;e<t.length-1;e++)if(t[e][0]>0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;i<t.length;i++)e[i]=[t[i][0]<0?t[i][0]+360:t[i][0],t[i][1]];l.push(p.tester(e))}:"ATA"===s?function(t){var e=u(t);if(null===e)return l.push(p.tester(t));var r=new Array(t.length+1),n=0;for(i=0;i<t.length;i++)i>e?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=p.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(p.tester(t))},a.type){case"MultiPolygon":for(r=0;r<o.length;r++)for(n=0;n<o[r].length;n++)e(o[r][n]);break;case"Polygon":for(r=0;r<o.length;r++)e(o[r])}return l},getTraceGeojson:m,extractTraceFeature:function(t){var e=t[0].trace,r=m(e);if(!r)return!1;var n,i={},s=[];for(n=0;n<e._length;n++){var l=t[n];(l.loc||0===l.loc)&&(i[l.loc]=l)}function c(t){var r=h(t,e.featureidkey||"id").get(),n=i[r];if(n){var l=t.geometry;if("Polygon"===l.type||"MultiPolygon"===l.type){var c={type:"Feature",id:r,geometry:l,properties:{}};c.properties.ct=function(t){var e,r=t.geometry;if("MultiPolygon"===r.type)for(var n=r.coordinates,i=0,s=0;s<n.length;s++){var l={type:"Polygon",coordinates:n[s]},u=a.default(l);u>i&&(i=u,e=l)}else e=r;return o.default(e).geometry.coordinates}(c),n.fIn=t,n.fOut=c,s.push(c)}else u.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var p=r.features;for(n=0;n<p.length;n++)c(p[n]);break;case"Feature":c(r);break;default:return u.warn(["Invalid GeoJSON type",(r.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var f in i)u.log(["Location *"+f+"*","does not have a matching feature with id-key","*"+e.featureidkey+"*."].join(" "));return s},fetchTraceGeoData:function(t){var e=window.PlotlyGeoAssets||{},r=[];function i(t){return new Promise((function(r,i){n.json(t,(function(n,a){if(n){delete e[t];var o=404===n.status?'GeoJSON at URL "'+t+'" does not exist.':"Unexpected error while fetching from "+t;return i(new Error(o))}return e[t]=a,r(a)}))}))}function a(t){return new Promise((function(r,n){var i=0,a=setInterval((function(){return e[t]&&"pending"!==e[t]?(clearInterval(a),r(e[t])):i>100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++}),50)}))}for(var o=0;o<t.length;o++){var s=t[o][0].trace.geojson;"string"==typeof s&&(e[s]?"pending"===e[s]&&r.push(a(s)):(e[s]="pending",r.push(i(s))))}return r},computeBbox:function(t){return s.default(t)}}},4808:function(t,e,r){"use strict";var n=r(9032).BADNUM;e.calcTraceToLineCoords=function(t){for(var e=t[0].trace.connectgaps,r=[],i=[],a=0;a<t.length;a++){var o=t[a].lonlat;o[0]!==n?i.push(o):!e&&i.length>0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},e.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},e.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r<t.length;r++)e[r]=[t[r]];return{type:"MultiPolygon",coordinates:e}},e.makeBlank=function(){return{type:"Point",coordinates:[]}}},2348:function(t,e,r){"use strict";var n,i,a,o=r(435).mod;function s(t,e,r,n,i,a,o,s){var l=r-t,u=i-t,c=o-i,h=n-e,p=a-e,f=s-a,d=l*f-c*h;if(0===d)return null;var m=(u*f-c*p)/d,y=(u*h-l*p)/d;return y<0||y>1||m<0||m>1?null:{x:t+l*m,y:e+h*m}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,a,o,u){if(s(t,e,r,n,i,a,o,u))return 0;var c=r-t,h=n-e,p=o-i,f=u-a,d=c*c+h*h,m=p*p+f*f,y=Math.min(l(c,h,d,i-t,a-e),l(c,h,d,o-t,u-e),l(p,f,m,t-i,e-a),l(p,f,m,r-i,n-a));return Math.sqrt(y)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),u=t.getPointAtLength(o(r+s/2,e)),c=Math.atan((u.y-l.y)/(u.x-l.x)),h=t.getPointAtLength(o(r,e)),p={x:(4*h.x+l.x+u.x)/6,y:(4*h.y+l.y+u.y)/6,theta:c};return n[r]=p,p},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,u=0,c=t.getTotalLength(),h=c;function p(e){var r=t.getPointAtLength(e);0===e?n=r:e===c&&(i=r);var u=r.x<a?a-r.x:r.x>o?r.x-o:0,h=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(u*u+h*h)}for(var f=p(u);f;){if((u+=f+r)>h)return;f=p(u)}for(f=p(h);f;){if(u>(h-=f+r))return;f=p(h)}return{min:u,max:h,len:h-u,total:c,isClosed:0===u&&h===c&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,u=n.iterationLimit||30,c=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,h=0,p=0,f=s;h<u;){if(i=(p+f)/2,o=(a=t.getPointAtLength(i))[r]-e,Math.abs(o)<l)return a;c*o>0?f=i:p=i,h++}return a}},5536:function(t){"use strict";t.exports=function(t){return t}},1396:function(t){"use strict";t.exports=function(t,e){if(!e)return t;var r=1/Math.abs(e),n=r>1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},3400:function(t,e,r){"use strict";var n=r(3428),i=r(4336).E9,a=r(7624).E9,o=r(8248),s=r(9032),l=s.FP_SAFE,u=-l,c=s.BADNUM,h=t.exports={};h.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var p={};h.warnBadFormat=function(t){var e=String(t);p[e]||(p[e]=1,h.warn('encountered bad format: "'+e+'"'))},h.noFormat=function(t){return String(t)},h.numberFormat=function(t){var e;try{e=a(h.adjustFormat(t))}catch(e){return h.warnBadFormat(t),h.noFormat}return e},h.nestedProperty=r(2296),h.keyedContainer=r(7804),h.relativeAttr=r(3193),h.isPlainObject=r(3620),h.toLogRange=r(6896),h.relinkPrivateKeys=r(1528);var f=r(8116);h.isArrayBuffer=f.isArrayBuffer,h.isTypedArray=f.isTypedArray,h.isArrayOrTypedArray=f.isArrayOrTypedArray,h.isArray1D=f.isArray1D,h.ensureArray=f.ensureArray,h.concat=f.concat,h.maxRowLength=f.maxRowLength,h.minRowLength=f.minRowLength;var d=r(435);h.mod=d.mod,h.modHalf=d.modHalf;var m=r(3064);h.valObjectMeta=m.valObjectMeta,h.coerce=m.coerce,h.coerce2=m.coerce2,h.coerceFont=m.coerceFont,h.coercePattern=m.coercePattern,h.coerceHoverinfo=m.coerceHoverinfo,h.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,h.validate=m.validate;var y=r(7555);h.dateTime2ms=y.dateTime2ms,h.isDateTime=y.isDateTime,h.ms2DateTime=y.ms2DateTime,h.ms2DateTimeLocal=y.ms2DateTimeLocal,h.cleanDate=y.cleanDate,h.isJSDate=y.isJSDate,h.formatDate=y.formatDate,h.incrementMonth=y.incrementMonth,h.dateTick0=y.dateTick0,h.dfltRange=y.dfltRange,h.findExactDates=y.findExactDates,h.MIN_MS=y.MIN_MS,h.MAX_MS=y.MAX_MS;var v=r(4952);h.findBin=v.findBin,h.sorterAsc=v.sorterAsc,h.sorterDes=v.sorterDes,h.distinctVals=v.distinctVals,h.roundUp=v.roundUp,h.sort=v.sort,h.findIndexOfMin=v.findIndexOfMin,h.sortObjectKeys=r(2996);var g=r(3084);h.aggNums=g.aggNums,h.len=g.len,h.mean=g.mean,h.median=g.median,h.midRange=g.midRange,h.variance=g.variance,h.stdev=g.stdev,h.interp=g.interp;var _=r(2248);h.init2dArray=_.init2dArray,h.transposeRagged=_.transposeRagged,h.dot=_.dot,h.translationMatrix=_.translationMatrix,h.rotationMatrix=_.rotationMatrix,h.rotationXYMatrix=_.rotationXYMatrix,h.apply3DTransform=_.apply3DTransform,h.apply2DTransform=_.apply2DTransform,h.apply2DTransform2=_.apply2DTransform2,h.convertCssMatrix=_.convertCssMatrix,h.inverseTransformMatrix=_.inverseTransformMatrix;var x=r(1864);h.deg2rad=x.deg2rad,h.rad2deg=x.rad2deg,h.angleDelta=x.angleDelta,h.angleDist=x.angleDist,h.isFullCircle=x.isFullCircle,h.isAngleInsideSector=x.isAngleInsideSector,h.isPtInsideSector=x.isPtInsideSector,h.pathArc=x.pathArc,h.pathSector=x.pathSector,h.pathAnnulus=x.pathAnnulus;var b=r(8308);h.isLeftAnchor=b.isLeftAnchor,h.isCenterAnchor=b.isCenterAnchor,h.isRightAnchor=b.isRightAnchor,h.isTopAnchor=b.isTopAnchor,h.isMiddleAnchor=b.isMiddleAnchor,h.isBottomAnchor=b.isBottomAnchor;var w=r(2348);h.segmentsIntersect=w.segmentsIntersect,h.segmentDistance=w.segmentDistance,h.getTextLocation=w.getTextLocation,h.clearLocationCache=w.clearLocationCache,h.getVisibleSegment=w.getVisibleSegment,h.findPointOnPath=w.findPointOnPath;var T=r(2880);h.extendFlat=T.extendFlat,h.extendDeep=T.extendDeep,h.extendDeepAll=T.extendDeepAll,h.extendDeepNoArrays=T.extendDeepNoArrays;var k=r(4248);h.log=k.log,h.warn=k.warn,h.error=k.error;var M=r(3756);h.counterRegex=M.counter;var A=r(1200);h.throttle=A.throttle,h.throttleDone=A.done,h.clearThrottle=A.clear;var S=r(2200);function L(t){var e={};for(var r in t)for(var n=t[r],i=0;i<n.length;i++)e[n[i]]=+r;return e}h.getGraphDiv=S.getGraphDiv,h.isPlotDiv=S.isPlotDiv,h.removeElement=S.removeElement,h.addStyleRule=S.addStyleRule,h.addRelatedStyleRule=S.addRelatedStyleRule,h.deleteRelatedStyleRule=S.deleteRelatedStyleRule,h.getFullTransformMatrix=S.getFullTransformMatrix,h.getElementTransformMatrix=S.getElementTransformMatrix,h.getElementAndAncestors=S.getElementAndAncestors,h.equalDomRects=S.equalDomRects,h.clearResponsive=r(5352),h.preserveDrawingBuffer=r(4296),h.makeTraceGroups=r(988),h._=r(8356),h.notifier=r(1792),h.filterUnique=r(8944),h.filterVisible=r(3880),h.pushUnique=r(2416),h.increment=r(1396),h.cleanNumber=r(4037),h.ensureNumber=function(t){return o(t)?(t=Number(t))>l||t<u?c:t:c},h.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&o(t)&&t>=0&&t%1==0},h.noop=r(6628),h.identity=r(5536),h.repeat=function(t,e){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r},h.swapAttrs=function(t,e,r,n){r||(r="x"),n||(n="y");for(var i=0;i<e.length;i++){var a=e[i],o=h.nestedProperty(t,a.replace("?",r)),s=h.nestedProperty(t,a.replace("?",n)),l=o.get();o.set(s.get()),s.set(l)}},h.raiseToTop=function(t){t.parentNode.appendChild(t)},h.cancelTransition=function(t){return t.transition().duration(0)},h.constrain=function(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},h.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},h.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s<a;s++)o[s]=e(t[s],r,n,i);return o},h.randstr=function t(e,r,n,i){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var a,o,s=Math.log(Math.pow(2,r))/Math.log(n),l="";for(a=2;s===1/0;a*=2)s=Math.log(Math.pow(2,r/a))/Math.log(n)*a;var u=s-Math.floor(s);for(a=0;a<Math.floor(s);a++)l=Math.floor(Math.random()*n).toString(n)+l;u&&(o=Math.pow(n,u),l=Math.floor(Math.random()*o).toString(n)+l);var c=parseInt(l,n);return e&&e[l]||c!==1/0&&c>=Math.pow(2,r)?i>10?(h.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},h.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},h.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r<l;r++)u[r]=(1-Math.cos(Math.PI*(r+1)/e))/(2*e);for(r=0;r<o;r++){for(a=0,n=0;n<l;n++)(i=r+n+1-e)<-o?i-=s*Math.round(i/s):i>=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},h.syncOrAsync=function(t,e,r){var n;function i(){return h.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},h.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},h.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n<r.length;n++)null!=t[r[n]]?i=!0:a=!1;if(i&&!a)for(n=0;n<r.length;n++)t[r[n]]=e[r[n]]}},h.mergeArray=function(t,e,r,n){var i="function"==typeof n;if(h.isArrayOrTypedArray(t))for(var a=Math.min(t.length,e.length),o=0;o<a;o++){var s=t[o];e[o][r]=i?n(s):s}},h.mergeArrayCastPositive=function(t,e,r){return h.mergeArray(t,e,r,(function(t){var e=+t;return isFinite(e)&&e>0?e:0}))},h.fillArray=function(t,e,r,n){if(n=n||h.identity,h.isArrayOrTypedArray(t))for(var i=0;i<e.length;i++)e[i][r]=n(t[i])},h.castOption=function(t,e,r,n){n=n||h.identity;var i=h.nestedProperty(t,r).get();return h.isArrayOrTypedArray(i)?Array.isArray(e)&&h.isArrayOrTypedArray(i[e[0]])?n(i[e[0]][e[1]]):n(i[e]):i},h.extractOption=function(t,e,r,n){if(r in t)return t[r];var i=h.nestedProperty(e,n).get();return Array.isArray(i)?void 0:i},h.tagSelected=function(t,e,r){var n,i,a=e.selectedpoints,o=e._indexToPoints;o&&(n=L(o));for(var s=0;s<a.length;s++){var l=a[s];if(h.isIndex(l)||h.isArrayOrTypedArray(l)&&h.isIndex(l[0])&&h.isIndex(l[1])){var u=n?n[l]:l,c=r?r[u]:u;void 0!==(i=c)&&i<t.length&&(t[c].selected=1)}}},h.selIndices2selPoints=function(t){var e=t.selectedpoints,r=t._indexToPoints;if(r){for(var n=L(r),i=[],a=0;a<e.length;a++){var o=e[a];if(h.isIndex(o)){var s=n[o];h.isIndex(s)&&i.push(s)}}return i}return e},h.getTargetArray=function(t,e){var r=e.target;if("string"==typeof r&&r){var n=h.nestedProperty(t,r).get();return!!h.isArrayOrTypedArray(n)&&n}return!!h.isArrayOrTypedArray(r)&&r},h.minExtend=function t(e,r,n){var i={};"object"!=typeof r&&(r={});var a,o,s,l="pieLike"===n?-1:3,u=Object.keys(e);for(a=0;a<u.length;a++)s=e[o=u[a]],"_"!==o.charAt(0)&&"function"!=typeof s&&("module"===o?i[o]=s:Array.isArray(s)?i[o]="colorscale"===o||-1===l?s.slice():s.slice(0,l):h.isTypedArray(s)?i[o]=-1===l?s.subarray():s.subarray(0,l):i[o]=s&&"object"==typeof s?t(e[o],r[o],n):s);for(u=Object.keys(r),a=0;a<u.length;a++)"object"==typeof(s=r[o=u[a]])&&o in i&&"object"==typeof i[o]||(i[o]=s);return i},h.titleCase=function(t){return t.charAt(0).toUpperCase()+t.substr(1)},h.containsAny=function(t,e){for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r]))return!0;return!1},h.isIE=function(){return void 0!==window.navigator.msSaveBlob};var C=/Version\/[\d\.]+.*Safari/;h.isSafari=function(){return C.test(window.navigator.userAgent)};var P=/iPad|iPhone|iPod/;h.isIOS=function(){return P.test(window.navigator.userAgent)};var I=/Firefox\/(\d+)\.\d+/;h.getFirefoxVersion=function(){var t=I.exec(window.navigator.userAgent);if(t&&2===t.length){var e=parseInt(t[1]);if(!isNaN(e))return e}return null},h.isD3Selection=function(t){return t instanceof n.selection},h.ensureSingle=function(t,e,r,n){var i=t.select(e+(r?"."+r:""));if(i.size())return i;var a=t.append(e);return r&&a.classed(r,!0),n&&a.call(n),a},h.ensureSingleById=function(t,e,r,n){var i=t.select(e+"#"+r);if(i.size())return i;var a=t.append(e).attr("id",r);return n&&a.call(n),a},h.objectFromPath=function(t,e){for(var r,n=t.split("."),i=r={},a=0;a<n.length;a++){var o=n[a],s=null,l=n[a].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],r=r[o]=[],a===n.length-1?r[s]=e:r[s]={},r=r[s]):(a===n.length-1?r[o]=e:r[o]={},r=r[o])}return i};var E=/^([^\[\.]+)\.(.+)?/,D=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function z(t){return"__"===t.slice(0,2)}h.expandObjectPaths=function(t){var e,r,n,i,a,o,s;if("object"==typeof t&&!Array.isArray(t))for(r in t)if(t.hasOwnProperty(r))if(e=r.match(E)){if(i=t[r],z(n=e[1]))continue;delete t[r],t[n]=h.extendDeepNoArrays(t[n]||{},h.objectFromPath(r,h.expandObjectPaths(i))[n])}else if(e=r.match(D)){if(i=t[r],z(n=e[1]))continue;if(a=parseInt(e[2]),delete t[r],t[n]=t[n]||[],"."===e[3])s=e[4],o=t[n][a]=t[n][a]||{},h.extendDeepNoArrays(o,h.objectFromPath(s,h.expandObjectPaths(i)));else{if(z(n))continue;t[n][a]=h.expandObjectPaths(i)}}else{if(z(r))continue;t[r]=h.expandObjectPaths(t[r])}return t},h.numSeparate=function(t,e,r){if(r||(r=!1),"string"!=typeof e||0===e.length)throw new Error("Separator string required for formatting!");"number"==typeof t&&(t=String(t));var n=/(\d+)(\d{3})/,i=e.charAt(0),a=e.charAt(1),o=t.split("."),s=o[0],l=o.length>1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var O=/^\w*$/;h.templateString=function(t,e){var r={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,n){var i;return O.test(n)?i=e[n]:(r[n]=r[n]||h.nestedProperty(e,n).get,i=r[n]()),h.isValidTextValue(i)?i:""}))};var R={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=function(){return j.apply(R,arguments)};var F={max:10,count:0,name:"texttemplate"};h.texttemplateString=function(){return j.apply(F,arguments)};var B=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,N={max:10,count:0,name:"texttemplate",parseMultDiv:!0};h.texttemplateStringForShapes=function(){return j.apply(N,arguments)};var U=/^[:|\|]/;function j(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(h.TEMPLATE_STRING_REGEX,(function(t,s,l){var u="_xother"===s||"_yother"===s,c="_xother_"===s||"_yother_"===s,p="xother_"===s||"yother_"===s,f="xother"===s||"yother"===s||u||p||c,d=s;(u||c)&&(d=d.substring(1)),(p||c)&&(d=d.substring(0,d.length-1));var m,y,v,g=null,_=null;if(n.parseMultDiv){var x=function(t){var e=t.match(B);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:t,op:null,number:null}}(d);d=x.key,g=x.op,_=x.number}if(f){if(void 0===(m=e[d]))return""}else for(v=3;v<a.length;v++)if(y=a[v]){if(y.hasOwnProperty(d)){m=y[d];break}if(O.test(d)||(m=h.nestedProperty(y,d).get(),(m=o[d]||h.nestedProperty(y,d).get())&&(o[d]=m)),void 0!==m)break}if(void 0!==m&&("*"===g&&(m*=_),"/"===g&&(m/=_)),void 0===m&&n)return n.count<n.max&&(h.warn("Variable '"+d+"' in "+n.name+" could not be found!"),m=t),n.count===n.max&&h.warn("Too many "+n.name+" warnings - additional warnings will be suppressed"),n.count++,t;if(l){var b;if(":"===l[0]&&(b=r?r.numberFormat:h.numberFormat,""!==m&&(m=b(l.replace(U,""))(m))),"|"===l[0]){b=r?r.timeFormat:i;var w=h.dateTime2ms(m);m=h.formatDate(w,l.replace(U,""),!1,b)}}else{var T=d+"Label";e.hasOwnProperty(T)&&(m=e[T])}return f&&(m="("+m+")",(u||c)&&(m=" "+m),(p||c)&&(m+=" ")),m}))}h.subplotSort=function(t,e){for(var r=Math.min(t.length,e.length)+1,n=0,i=0,a=0;a<r;a++){var o=t.charCodeAt(a)||0,s=e.charCodeAt(a)||0,l=o>=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(i=10*i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var V=2e9;h.seedPseudoRandom=function(){V=2e9},h.pseudoRandom=function(){var t=V;return V=(69069*V+1)%4294967296,Math.abs(V-t)<429496729?h.pseudoRandom():V/4294967296},h.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=h.extractOption(t,e,"htx","hovertext");if(h.isValidTextValue(i))return n(i);var a=h.extractOption(t,e,"tx","text");return h.isValidTextValue(a)?n(a):void 0},h.isValidTextValue=function(t){return t||0===t},h.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n<e;n++)-1!==r.indexOf(".")&&(r=(r=r.replace("0%","%")).replace(".%","%"));return r},h.isHidden=function(t){var e=window.getComputedStyle(t).display;return!e||"none"===e},h.strTranslate=function(t,e){return t||e?"translate("+t+","+e+")":""},h.strRotate=function(t){return t?"rotate("+t+")":""},h.strScale=function(t){return 1!==t?"scale("+t+")":""},h.getTextTransform=function(t){var e=t.noCenter,r=t.textX,n=t.textY,i=t.targetX,a=t.targetY,o=t.anchorX||0,s=t.anchorY||0,l=t.rotate,u=t.scale;return u?u>1&&(u=1):u=0,h.strTranslate(i-u*(r+o),a-u*(n+s))+h.strScale(u)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},h.setTransormAndDisplay=function(t,e){t.attr("transform",h.getTextTransform(e)),t.style("display",e.scale?null:"none")},h.ensureUniformFontSize=function(t,e){var r=h.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},h.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},h.bigFont=function(t){return Math.round(1.2*t)};var q=h.getFirefoxVersion(),H=null!==q&&q<86;h.getPositionFromD3Event=function(){return H?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},3620:function(t){"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},7804:function(t,e,r){"use strict";var n=r(2296),i=/^\w*$/;t.exports=function(t,e,r,a){var o,s,l;r=r||"name",a=a||"value";var u={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var c={};if(s)for(o=0;o<s.length;o++)c[s[o][r]]=o;var h=i.test(a),p={set:function(t,e){var i=null===e?4:0;if(!s){if(!l||4===i)return;s=[],l.set(s)}var o=c[t];if(void 0===o){if(4===i)return;i|=3,o=s.length,c[t]=o}else e!==(h?s[o][a]:n(s[o],a).get())&&(i|=2);var f=s[o]=s[o]||{};return f[r]=t,h?f[a]=e:n(f,a).set(e),null!==e&&(i&=-5),u[o]=u[o]|i,p},get:function(t){if(s){var e=c[t];return void 0===e?void 0:h?s[e][a]:n(s[e],a).get()}},rename:function(t,e){var n=c[t];return void 0===n||(u[n]=1|u[n],c[e]=n,delete c[t],s[n][r]=e),p},remove:function(t){var e=c[t];if(void 0===e)return p;var i=s[e];if(Object.keys(i).length>2)return u[e]=2|u[e],p.set(t,null);if(h){for(o=e;o<s.length;o++)u[o]=3|u[o];for(o=e;o<s.length;o++)c[s[o][r]]--;s.splice(e,1),delete c[t]}else n(i,a).set(null),u[e]=6|u[e];return p},constructUpdate:function(){for(var t,i,o={},l=Object.keys(u),c=0;c<l.length;c++)i=l[c],t=e+"["+i+"]",s[i]?(1&u[i]&&(o[t+"."+r]=s[i][r]),2&u[i]&&(o[t+"."+a]=h?4&u[i]?null:s[i][a]:4&u[i]?null:n(s[i],a).get())):o[t]=null;return o}};return p}},8356:function(t,e,r){"use strict";var n=r(4040);t.exports=function(t,e){for(var r=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[r]||{}).dictionary;if(s){var l=s[e];if(l)return l}a=n.localeRegistry}var u=r.split("-")[0];if(u===r)break;r=u}return e}},4248:function(t,e,r){"use strict";var n=r(556).dfltConfig,i=r(1792),a=t.exports={};a.log=function(){var t;if(n.logging>1){var e=["LOG:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>1){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.trace.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t<arguments.length;t++)e.push(arguments[t]);console.error.apply(console,e)}if(n.notifyOnLogging>0){var r=[];for(t=0;t<arguments.length;t++)r.push(arguments[t]);i(r.join("<br>"),"stick")}}},988:function(t,e,r){"use strict";var n=r(3428);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][a]=n.select(this)})),i}},2248:function(t,e,r){"use strict";var n=r(6524);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;n<t;n++)r[n]=new Array(e);return r},e.transposeRagged=function(t){var e,r,n=0,i=t.length;for(e=0;e<i;e++)n=Math.max(n,t[e].length);var a=new Array(n);for(e=0;e<n;e++)for(a[e]=new Array(i),r=0;r<i;r++)a[e][r]=t[r][e];return a},e.dot=function(t,r){if(!t.length||!r.length||t.length!==r.length)return null;var n,i,a=t.length;if(t[0].length)for(n=new Array(a),i=0;i<a;i++)n[i]=e.dot(t[i],r);else if(r[0].length){var o=e.transposeRagged(r);for(n=new Array(o.length),i=0;i<o.length;i++)n[i]=e.dot(t,o[i])}else for(n=0,i=0;i<a;i++)n+=t[i]*r[i];return n},e.translationMatrix=function(t,e){return[[1,0,t],[0,1,e],[0,0,1]]},e.rotationMatrix=function(t){var e=t*Math.PI/180;return[[Math.cos(e),-Math.sin(e),0],[Math.sin(e),Math.cos(e),0],[0,0,1]]},e.rotationXYMatrix=function(t,r,n){return e.dot(e.dot(e.translationMatrix(r,n),e.rotationMatrix(t)),e.translationMatrix(-r,-n))},e.apply3DTransform=function(t){return function(){var r=arguments,n=1===arguments.length?r[0]:[r[0],r[1],r[2]||0];return e.dot(t,[n[0],n[1],n[2],1]).slice(0,3)}},e.apply2DTransform=function(t){return function(){var r=arguments;3===r.length&&(r=r[0]);var n=1===arguments.length?r[0]:[r[0],r[1]];return e.dot(t,[n[0],n[1],1]).slice(0,2)}},e.apply2DTransform2=function(t){var r=e.apply2DTransform(t);return function(t){return r(t.slice(0,2)).concat(r(t.slice(2,4)))}},e.convertCssMatrix=function(t){if(t){var e=t.length;if(16===e)return t;if(6===e)return[t[0],t[1],0,0,t[2],t[3],0,0,0,0,1,0,t[4],t[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},e.inverseTransformMatrix=function(t){var e=[];return n.invert(e,t),[[e[0],e[1],e[2],e[3]],[e[4],e[5],e[6],e[7]],[e[8],e[9],e[10],e[11]],[e[12],e[13],e[14],e[15]]]}},435:function(t){"use strict";t.exports={mod:function(t,e){var r=t%e;return r<0?r+e:r},modHalf:function(t,e){return Math.abs(t)>e/2?t-Math.round(t/e)*e:t}}},2296:function(t,e,r){"use strict";var n=r(8248),i=r(8116).isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,u=t;for(s=0;s<e.length-1;s++){if(-1===(r=e[s])){for(n=!0,o=[],l=0;l<u.length;l++)o[l]=a(u[l],e.slice(s+1))(),o[l]!==o[0]&&(n=!1);return n?o[0]:o}if("number"==typeof r&&!i(u))return;if("object"!=typeof(u=u[r])||null===u)return}if("object"==typeof u&&null!==u&&null!==(o=u[e[s]]))return o}}t.exports=function(t,e){if(n(e))e=String(e);else if("string"!=typeof e||"[-1]"===e.substr(e.length-4))throw"bad property string";var r,i,o,s,u=e.split(".");for(s=0;s<u.length;s++)if("__"===String(u[s]).slice(0,2))throw"bad property string";for(s=0;s<u.length;){if(r=String(u[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])u[s]=r[1];else{if(0!==s)throw"bad property string";u.splice(0,1)}for(i=r[2].substr(1,r[2].length-2).split("]["),o=0;o<i.length;o++)s++,u.splice(s,0,Number(i[o]))}s++}return"object"!=typeof t?function(t,e,r){return{set:function(){throw"bad container"},get:function(){},astr:e,parts:r,obj:t}}(t,e,u):{set:l(t,u,e),get:a(t,u),astr:e,parts:u,obj:t}};var o=/(^|\.)args\[/;function s(t,e){return void 0===t||null===t&&!e.match(o)}function l(t,e,r){return function(n){var a,o,l=t,p="",f=[[t,p]],d=s(n,r);for(o=0;o<e.length-1;o++){if("number"==typeof(a=e[o])&&!i(l))throw"array index but container is not an array";if(-1===a){if(d=!c(l,e.slice(o+1),n,r))break;return}if(!h(l,a,e[o+1],d))break;if("object"!=typeof(l=l[a])||null===l)throw"container is not an object";p=u(p,a),f.push([l,p])}if(d){if(o===e.length-1&&(delete l[e[o]],Array.isArray(l)&&+e[o]==l.length-1))for(;l.length&&void 0===l[l.length-1];)l.pop()}else l[e[o]]=n}}function u(t,e){var r=e;return n(e)?r="["+e+"]":t&&(r="."+e),t+r}function c(t,e,r,n){var a,o=i(r),u=!0,c=r,p=n.replace("-1",0),f=!o&&s(r,p),d=e[0];for(a=0;a<t.length;a++)p=n.replace("-1",a),o&&(f=s(c=r[a%r.length],p)),f&&(u=!1),h(t,a,d,f)&&l(t[a],e,n.replace("-1",a))(c);return u}function h(t,e,r,n){if(void 0===t[e]){if(n)return!1;t[e]="number"==typeof r?[]:{}}return!0}},6628:function(t){"use strict";t.exports=function(){}},1792:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=[];t.exports=function(t,e){if(-1===a.indexOf(t)){a.push(t);var r=1e3;i(e)?r=e:"long"===e&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(a).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(t){var i=n.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",(function(){i.transition().call(s)}));for(var a=i.append("p"),o=t.split(/<br\s*\/?>/g),l=0;l<o.length;l++)l&&a.append("br"),a.append("span").text(o[l]);"stick"===e?i.transition().duration(350).style("opacity",1):i.transition().duration(700).style("opacity",1).transition().delay(r).call(s)}))}function s(t){t.duration(700).style("opacity",0).each("end",(function(t){var e=a.indexOf(t);-1!==e&&a.splice(e,1),n.select(this).remove()}))}}},2213:function(t,e,r){"use strict";var n=r(3972),i="data-savedcursor";t.exports=function(t,e){var r=t.attr(i);if(e){if(!r){for(var a=(t.attr("class")||"").split(" "),o=0;o<a.length;o++){var s=a[o];0===s.indexOf("cursor-")&&t.attr(i,s.substr(7)).classed(s,!1)}t.attr(i)||t.attr(i,"!!")}n(t,e)}else r&&(t.attr(i,null),"!!"===r?n(t):n(t,r))}},2065:function(t,e,r){"use strict";var n=r(2248).dot,i=r(9032).BADNUM,a=t.exports={};a.tester=function(t){var e,r=t.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for(r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),e=1;e<r.length;e++)n=Math.min(n,r[e][0]),a=Math.max(a,r[e][0]),o=Math.min(o,r[e][1]),s=Math.max(s,r[e][1]);var l,u=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,l=function(t){return t[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,l=function(t){return t[1]===r[0][1]}));var c=!0,h=r[0];for(e=1;e<r.length;e++)if(h[0]!==r[e][0]||h[1]!==r[e][1]){c=!1;break}return{xmin:n,xmax:a,ymin:o,ymax:s,pts:r,contains:u?function(t,e){var r=t[0],u=t[1];return!(r===i||r<n||r>a||u===i||u<o||u>s||e&&l(t))}:function(t,e){var l=t[0],u=t[1];if(l===i||l<n||l>a||u===i||u<o||u>s)return!1;var c,h,p,f,d,m=r.length,y=r[0][0],v=r[0][1],g=0;for(c=1;c<m;c++)if(h=y,p=v,y=r[c][0],v=r[c][1],!(l<(f=Math.min(h,y))||l>Math.max(h,y)||u>Math.max(p,v)))if(u<Math.min(p,v))l!==f&&g++;else{if(u===(d=y===h?u:p+(l-h)*(v-p)/(y-h)))return 1!==c||!e;u<=d&&l!==f&&g++}return g%2==1},isRect:u,degenerate:c}},a.isSegmentBent=function(t,e,r,i){var a,o,s,l=t[e],u=[t[r][0]-l[0],t[r][1]-l[1]],c=n(u,u),h=Math.sqrt(c),p=[-u[1]/h,u[0]/h];for(a=e+1;a<r;a++)if(o=[t[a][0]-l[0],t[a][1]-l[1]],(s=n(o,u))<0||s>c||Math.abs(n(o,p))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u<t.length;u++)(u===t.length-1||a.isSegmentBent(t,l,u+1,e))&&(r.push(t[u]),r.length<s-2&&(n=u,i=r.length-1),l=u)}return t.length>1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},4296:function(t,e,r){"use strict";var n=r(8248),i=r(5928);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(" "),o=1;o<a.length;o++)if(-1!==a[o].indexOf("Safari"))for(var s=o-1;s>-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var u=l.substr(8).split(".")[0];if(n(u)&&(u=+u),u>=13)return!0}}return r}},2416:function(t){"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;n<t.length;n++)if(t[n]instanceof RegExp&&t[n].toString()===r)return t;t.push(e)}else!e&&0!==e||-1!==t.indexOf(e)||t.push(e);return t}},4552:function(t,e,r){"use strict";var n=r(3400),i=r(556).dfltConfig,a={add:function(t,e,r,n,a){var o,s;t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},s=t.undoQueue.index,t.autoplay?t.undoQueue.inSequence||(t.autoplay=!1):(!t.undoQueue.sequence||t.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(s,t.undoQueue.queue.length-s,o),t.undoQueue.index+=1):o=t.undoQueue.queue[s-1],t.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(e),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(a)),t.undoQueue.queue.length>i.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.undo.calls.length;r++)a.plotDo(t,e.undo.calls[r],e.undo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1}},redo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index>=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r<e.redo.calls.length;r++)a.plotDo(t,e.redo.calls[r],e.redo.args[r]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}},plotDo:function(t,e,r){t.autoplay=!0,r=function(t,e){for(var r,i=[],a=0;a<e.length;a++)r=e[a],i[a]=r===t?r:"object"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return i}(t,r),e.apply(null,r)}};t.exports=a},3756:function(t,e){"use strict";e.counter=function(t,e,r,n){var i=(e||"")+(r?"":"$"),a=!1===n?"":"^";return"xy"===t?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+t+"([2-9]|[1-9][0-9]+)?"+i)}},3193:function(t){"use strict";var e=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,r=/^[^\.\[\]]+$/;t.exports=function(t,n){for(;n;){var i=t.match(e);if(i)t=i[1];else{if(!t.match(r))throw new Error("bad relativeAttr call:"+[t,n]);t=""}if("^"!==n.charAt(0))break;n=n.slice(1)}return t&&"["!==n.charAt(0)?t+"."+n:t+n}},1528:function(t,e,r){"use strict";var n=r(8116).isArrayOrTypedArray,i=r(3620);t.exports=function t(e,r){for(var a in r){var o=r[a],s=e[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in e)continue;e[a]=o}else if(n(o)&&n(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),u=0;u<l;u++)s[u]!==o[u]&&i(o[u])&&i(s[u])&&t(s[u],o[u])}else i(o)&&i(s)&&(t(s,o),Object.keys(s).length||delete e[a])}}},4952:function(t,e,r){"use strict";var n=r(8248),i=r(4248),a=r(5536),o=r(9032).BADNUM,s=1e-9;function l(t,e){return t<e}function u(t,e){return t<=e}function c(t,e){return t>e}function h(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var a,o,p=0,f=e.length,d=0,m=f>1?(e[f-1]-e[0])/(f-1):1;for(o=m>=0?r?l:u:r?h:c,t+=m*s*(r?-1:1)*(m>=0?1:-1);p<f&&d++<100;)o(e[a=Math.floor((p+f)/2)],t)?p=a+1:f=a;return d>90&&i.log("Long binary search..."),p-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var i,a=n[r]-n[0]||1,s=a/(r||1)/1e4,l=[],u=0;u<=r;u++){var c=n[u],h=c-i;void 0===i?(l.push(c),i=c):h>s&&(a=Math.min(a,h),l.push(c),i=c)}return{vals:l,minDiff:a}},e.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i<a&&o++<100;)e[n=u((i+a)/2)]<=t?i=n+s:a=n-l;return e[i]},e.sort=function(t,e){for(var r=0,n=0,i=1;i<t.length;i++){var a=e(t[i],t[i-1]);if(a<0?r=1:a>0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;i<t.length;i++){var o=e(t[i]);o<n&&(n=o,r=i)}return r}},3972:function(t){"use strict";t.exports=function(t,e){(t.attr("class")||"").split(" ").forEach((function(e){0===e.indexOf("cursor-")&&t.classed(e,!1)})),e&&t.classed("cursor-"+e,!0)}},2996:function(t){"use strict";t.exports=function(t){return Object.keys(t).sort()}},3084:function(t,e,r){"use strict";var n=r(8248),i=r(8116).isArrayOrTypedArray;e.aggNums=function(t,r,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=e.aggNums(t,r,a[s]);a=l}for(s=0;s<o;s++)n(r)?n(a[s])&&(r=t(+r,+a[s])):r=a[s];return r},e.len=function(t){return e.aggNums((function(t){return t+1}),0,t)},e.mean=function(t,r){return r||(r=e.len(t)),e.aggNums((function(t,e){return t+e}),0,t)/r},e.midRange=function(t){if(void 0!==t&&0!==t.length)return(e.aggNums(Math.max,null,t)+e.aggNums(Math.min,null,t))/2},e.variance=function(t,r,i){return r||(r=e.len(t)),n(i)||(i=e.mean(t,r)),e.aggNums((function(t,e){return t+Math.pow(e-i,2)}),0,t)/r},e.stdev=function(t,r,n){return Math.sqrt(e.variance(t,r,n))},e.median=function(t){var r=t.slice().sort();return e.interp(r,.5)},e.interp=function(t,e){if(!n(e))throw"n should be a finite number";if((e=e*t.length-.5)<0)return t[0];if(e>t.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},2736:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=i.strTranslate,o=r(9616),s=r(4284).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,y){var S=t.text(),L=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),I=n.select(t.node().parentNode);if(!I.empty()){var E=t.attr("class")?t.attr("class").split(" ")[0]:"text";return E+="-math",I.selectAll("svg."+E).remove(),I.selectAll("g."+E+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),L?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l,p=parseInt((MathJax.version||"").split(".")[0]);if(2===p||3===p){var f=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(u,"\\lt ").replace(c,"\\gt "))).node();return 2===p?MathJax.Hub.Typeset(a):MathJax.typeset([a])},d=function(){var e=l.select(2===p?".MathJax_SVG":".MathJax"),a=!e.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===p?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,o,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===p?MathJax.Hub.Queue((function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:h},displayAlign:"left"})}),(function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),f,d,(function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})):3===p&&(o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=h,"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){f(),d(),"svg"!==a&&(MathJax.config.startup.output=a),MathJax.config=o})))}else i.warn("No MathJax version:",MathJax.version)}(L[2],o,(function(n,i,o){I.selectAll("svg."+E).remove(),I.selectAll("g."+E+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return D(),void e();var l=I.append("g").classed(E+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class:E,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var h=t.node().style.fill||"black",p=s.select("g");p.attr({fill:h,stroke:h});var f=p.node().getBoundingClientRect(),d=f.width,m=f.height;(d>u||m>c)&&(s.style("overflow","hidden"),d=(f=s.node().getBoundingClientRect()).width,m=f.height);var v=+t.attr("x"),g=+t.attr("y"),_=-(r||t.node().getBoundingClientRect().height)/4;if("y"===E[0])l.attr({transform:"rotate("+[-90,v,g]+")"+a(-d/2,_-m/2)});else if("l"===E[0])g=_-m/2;else if("a"===E[0]&&0!==E.indexOf("atitle"))v=0,g=_;else{var x=t.attr("text-anchor");v-=d*("middle"===x?.5:"end"===x?1:0),g=g+_-m/2}s.attr({x:v,y:g}),y&&y.call(t,l),e(l)}))}))):D(),t}function D(){I.empty()||(E=t.attr("class")+"-math",I.select("svg."+E).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(v," ");var r,a=!1,l=[],u=-1;function c(){u++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:u*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a<i.length;a++)h(i[a])}function h(t){var e,i=t.type,a={};if("a"===i){e="a";var s=t.target,u=t.href,c=t.popup;u&&(a={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":u},c&&(a.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+c+'");return false;'))}else e="tspan";t.style&&(a.style=t.style);var h=document.createElementNS(o.svg,e);if("sup"===i||"sub"===i){y(r,m),r.appendChild(h);var p=document.createElementNS(o.svg,"tspan");y(p,m),n.select(p).attr("dy",d[i]),a.dy=f[i],r.appendChild(h),r.appendChild(p)}else r.appendChild(h);n.select(h).attr(a),r=t.node=h,l.push(t)}function y(t,e){t.appendChild(document.createTextNode(e))}function S(t){if(1!==l.length){var n=l.pop();t!==n.type&&i.log("Start tag <"+n.type+"> doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag </"+t+">.",e)}x.test(e)?c():(r=t,l=[{node:t}]);for(var L=e.split(g),I=0;I<L.length;I++){var E=L[I],D=E.match(_),z=D&&D[2].toLowerCase(),O=p[z];if("br"===z)c();else if(void 0===O)y(r,C(E));else if(D[1])S(z);else{var R=D[4],F={type:z},B=M(R,b);if(B?(B=B.replace(A,"$1 fill:"),O&&(B+=";"+O)):O&&(B=O),B&&(F.style=B),"a"===z){a=!0;var N=M(R,w);if(N){var U=P(N);U&&(F.href=U,F.target=M(R,T)||"_blank",F.popup=M(R,k))}}h(F)}}return a}(t.node(),S);r&&t.style("pointer-events","all"),e.positionText(t),y&&y.call(t)}};var u=/(<|<|<)/g,c=/(>|>|>)/g,h=[["$","$"],["\\(","\\)"]],p={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"},f={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},m="",y=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,g=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=/<br(\s+.*)?>/i;e.BR_TAG_ALL=/<br(\s+.*)?>/gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&C(n)}var A=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i=t.split(g),a=[],o="",s=0,l=0;l<i.length;l++){var u=i[l],c=u.match(_),h=c&&c[2].toLowerCase();if(h)-1!==n.indexOf(h)&&(a.push(u),o=h);else{var p=u.length;if(s+p<r)a.push(u),s+=p;else if(s<r){var f=r-s;o&&("br"!==o||f<=3||p<=3)&&a.pop(),r>3?a.push(u.substr(0,f-3)+"..."):a.push(u.substr(0,f));break}o=""}}return a.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function C(t){return t.replace(L,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function P(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==y.indexOf(i)&&-1!==y.indexOf(a)?e:""}function I(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",u=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return u.bottom-n.height}:"middle"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===s?function(){return u.right-n.width}:"center"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var t=o()-c.left,e=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=C,e.sanitizeHTML=function(t){t=t.replace(v," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(g),o=0;o<a.length;o++){var s=a[o],l=s.match(_),u=l&&l[2].toLowerCase();if(u in p)if(l[1])i.length&&(r=i.pop());else{var c=l[4],h=M(c,b),f=h?{style:h}:{};if("a"===u){var d=M(c,w);if(d){var m=P(d);if(m){f.href=m;var y=M(c,T);y&&(f.target=y)}}}var x=document.createElement(u);r.appendChild(x),n.select(x).attr(f),r=x,i.push(x)}else r.appendChild(document.createTextNode(C(s)))}return e.innerHTML},e.lineCount=function(t){return t.selectAll("tspan.line").size()||1},e.positionText=function(t,e,r){return t.each((function(){var t=n.select(this);function i(e,r){return void 0===r?null===(r=t.attr(e))&&(t.attr(e,0),r=0):t.attr(e,r),r}var a=i("x",e),o=i("y",r);"text"===this.nodeName&&t.selectAll("tspan.line").attr({x:a,y:o})}))};var E="1px ";e.makeTextShadow=function(t){return E+E+E+t+", -"+E+"-"+E+E+t+", "+E+"-"+E+E+t+", -"+E+E+E+t},e.makeEditable=function(t,e){var r=e.gd,i=e.delegate,a=n.dispatch("edit","input","cancel"),o=i||t;if(t.style({"pointer-events":i?"none":"all"}),1!==t.size())throw new Error("boo");function s(){var i,s,u,c,h;i=n.select(r).select(".svg-container"),s=i.append("div"),u=t.node().style,c=parseFloat(u.fontSize||12),void 0===(h=e.text)&&(h=t.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":u.fontFamily||"Arial","font-size":c,color:e.fill||u.fill||"black",opacity:1,"background-color":e.background||"transparent",outline:"#ffffff33 1px solid",margin:[-c/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(h).call(I(t,i,e)).on("blur",(function(){r._editing=!1,t.text(this.textContent).style({opacity:1});var e,i=n.select(this).attr("class");(e=i?"."+i.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(e).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),a.edit.call(t,o)})).on("focus",(function(){var t=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===t)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,t.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),a.cancel.call(t,this.textContent)):(a.input.call(t,this.textContent),n.select(this).call(I(t,i,e)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),t.style({opacity:0});var p,f=o.attr("class");(p=f?"."+f.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(t.node().parentNode).select(p).style({opacity:0})}function l(t){var e=t.node(),r=document.createRange();r.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),e.focus()}return e.immediate?s():o.on("click",s),n.rebind(t,a,"on")}},1200:function(t,e){"use strict";var r={};function n(t){t&&null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}e.throttle=function(t,e,i){var a=r[t],o=Date.now();if(!a){for(var s in r)r[s].ts<o-6e4&&delete r[s];a=r[t]={ts:0,timer:null}}function l(){i(),a.ts=Date.now(),a.onDone&&(a.onDone(),a.onDone=null)}n(a),o>a.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},6896:function(t,e,r){"use strict";var n=r(8248);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},1680:function(t){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(t){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},9820:function(t,e,r){"use strict";var n=r(4040);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s<a.length;s++)if((r=t.match(a[s]))&&0===r.index){e=r[0];break}if(e||(e=i[i.indexOf(o)]),!e)return!1;var l=t.substr(e.length);return l?!!(r=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:e,index:Number(r[1]),property:r[3]||""}:{array:e,index:"",property:""}}},7824:function(t,e,r){"use strict";var n=r(2880).extendFlat,i=r(3620),a={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},o={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},s=a.flags.slice().concat(["fullReplot"]),l=o.flags.slice().concat("layoutReplot");function u(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!1;return e}function c(t,e,r){var a=n({},t);for(var o in a){var s=a[o];i(s)&&(a[o]=h(s,e,0,o))}return"from-root"===r&&(a.editType=e),a}function h(t,e,r,i){if(t.valType){var a=n({},t);if(a.editType=e,Array.isArray(t.items)){a.items=new Array(t.items.length);for(var o=0;o<t.items.length;o++)a.items[o]=h(t.items[o],e)}return a}return c(t,e,"_"===i.charAt(0)?"nested":"from-root")}t.exports={traces:a,layout:o,traceFlags:function(){return u(s)},layoutFlags:function(){return u(l)},update:function(t,e){var r=e.editType;if(r&&"none"!==r)for(var n=r.split("+"),i=0;i<n.length;i++)t[n[i]]=!0},overrideAll:c}},3404:function(t,e,r){"use strict";var n=r(8248),i=r(1784),a=r(4040),o=r(3400),s=r(7316),l=r(9811),u=r(6308),c=l.cleanId,h=l.getFromTrace,p=a.traceIs;function f(t,e){var r=t[e],n=e.charAt(0);r&&"paper"!==r&&(t[e]=c(r,n,!0))}function d(t){function e(e,r){var n=t[e],i=t.title&&t.title[r];n&&!i&&(t.title||(t.title={}),t.title[r]=t[e],delete t[e])}t&&("string"!=typeof t.title&&"number"!=typeof t.title||(t.title={text:t.title}),e("titlefont","font"),e("titleposition","position"),e("titleside","side"),e("titleoffset","offset"))}function m(t){if(!o.isPlainObject(t))return!1;var e=t.name;return delete t.name,delete t.showlegend,("string"==typeof e||"number"==typeof e)&&String(e)}function y(t,e,r,n){if(r&&!n)return t;if(n&&!r)return e;if(!t.trim())return e;if(!e.trim())return t;var i,a=Math.min(t.length,e.length);for(i=0;i<a&&t.charAt(i)===e.charAt(i);i++);return t.substr(0,i).trim()}function v(t){var e="middle",r="center";return"string"==typeof t&&(-1!==t.indexOf("top")?e="top":-1!==t.indexOf("bottom")&&(e="bottom"),-1!==t.indexOf("left")?r="left":-1!==t.indexOf("right")&&(r="right")),e+" "+r}function g(t,e){return e in t&&"object"==typeof t[e]&&0===Object.keys(t[e]).length}e.clearPromiseQueue=function(t){Array.isArray(t._promises)&&t._promises.length>0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,h=(s.subplotsRegistry.ternary||{}).attrRegex,p=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(t);for(r=0;r<m.length;r++){var y=m[r];if(a&&a.test(y)){var v=t[y];v.anchor&&"free"!==v.anchor&&(v.anchor=c(v.anchor)),v.overlaying&&(v.overlaying=c(v.overlaying)),v.type||(v.isdate?v.type="date":v.islog?v.type="log":!1===v.isdate&&!1===v.islog&&(v.type="linear")),"withzero"!==v.autorange&&"tozero"!==v.autorange||(v.autorange=!0,v.rangemode="tozero"),v.insiderange&&delete v.range,delete v.islog,delete v.isdate,delete v.categories,g(v,"domain")&&delete v.domain,void 0!==v.autotick&&(void 0===v.tickmode&&(v.tickmode=v.autotick?"auto":"linear"),delete v.autotick),d(v)}else if(l&&l.test(y))d(t[y].radialaxis);else if(h&&h.test(y)){var _=t[y];d(_.aaxis),d(_.baxis),d(_.caxis)}else if(p&&p.test(y)){var x=t[y],b=x.cameraposition;if(Array.isArray(b)&&4===b[0].length){var w=b[0],T=b[1],k=b[2],M=i([],w),A=[];for(n=0;n<3;++n)A[n]=T[n]+k*M[2+4*n];x.camera={eye:{x:A[0],y:A[1],z:A[2]},center:{x:T[0],y:T[1],z:T[2]},up:{x:0,y:0,z:1}},delete x.cameraposition}d(x.xaxis),d(x.yaxis),d(x.zaxis)}}var S=Array.isArray(t.annotations)?t.annotations.length:0;for(r=0;r<S;r++){var L=t.annotations[r];o.isPlainObject(L)&&(L.ref&&("paper"===L.ref?(L.xref="paper",L.yref="paper"):"data"===L.ref&&(L.xref="x",L.yref="y"),delete L.ref),f(L,"xref"),f(L,"yref"))}var C=Array.isArray(t.shapes)?t.shapes.length:0;for(r=0;r<C;r++){var P=t.shapes[r];o.isPlainObject(P)&&(f(P,"xref"),f(P,"yref"))}var I=Array.isArray(t.images)?t.images.length:0;for(r=0;r<I;r++){var E=t.images[r];o.isPlainObject(E)&&(f(E,"xref"),f(E,"yref"))}var D=t.legend;return D&&(D.x>3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),u.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r<t.length;r++){var n,i=t[r];if("histogramy"===i.type&&"xbins"in i&&!("ybins"in i)&&(i.ybins=i.xbins,delete i.xbins),i.error_y&&"opacity"in i.error_y){var l=u.defaults,h=i.error_y.color||(p(i,"bar")?u.defaultLine:l[r%l.length]);i.error_y.color=u.addOpacity(u.rgb(h),u.opacity(h)*i.error_y.opacity),delete i.error_y.opacity}if("bardir"in i&&("h"!==i.bardir||!p(i,"bar")&&"histogram"!==i.type.substr(0,9)||(i.orientation="h",e.swapXYData(i)),delete i.bardir),"histogramy"===i.type&&e.swapXYData(i),"histogramx"!==i.type&&"histogramy"!==i.type||(i.type="histogram"),"scl"in i&&!("colorscale"in i)&&(i.colorscale=i.scl,delete i.scl),"reversescl"in i&&!("reversescale"in i)&&(i.reversescale=i.reversescl,delete i.reversescl),i.xaxis&&(i.xaxis=c(i.xaxis,"x")),i.yaxis&&(i.yaxis=c(i.yaxis,"y")),p(i,"gl3d")&&i.scene&&(i.scene=s.subplotsRegistry.gl3d.cleanId(i.scene)),!p(i,"pie-like")&&!p(i,"bar-like"))if(Array.isArray(i.textposition))for(n=0;n<i.textposition.length;n++)i.textposition[n]=v(i.textposition[n]);else i.textposition&&(i.textposition=v(i.textposition));var f=a.getModule(i);if(f&&f.colorbar){var _=f.colorbar.container,x=_?i[_]:i;x&&x.colorscale&&("YIGnBu"===x.colorscale&&(x.colorscale="YlGnBu"),"YIOrRd"===x.colorscale&&(x.colorscale="YlOrRd"))}if("surface"===i.type&&o.isPlainObject(i.contours)){var b=["x","y","z"];for(n=0;n<b.length;n++){var w=i.contours[b[n]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===i.type||"ohlc"===i.type){var T=!1!==(i.increasing||{}).showlegend,k=!1!==(i.decreasing||{}).showlegend,M=m(i.increasing),A=m(i.decreasing);if(!1!==M&&!1!==A){var S=y(M,A,T,k);S&&(i.name=S)}else!M&&!A||i.name||(i.name=M||A)}if(Array.isArray(i.transforms)){var L=i.transforms;for(n=0;n<L.length;n++){var C=L[n];if(o.isPlainObject(C))switch(C.type){case"filter":C.filtersrc&&(C.target=C.filtersrc,delete C.filtersrc),C.calendar&&(C.valuecalendar||(C.valuecalendar=C.calendar),delete C.calendar);break;case"groupby":if(C.styles=C.styles||C.style,C.styles&&!Array.isArray(C.styles)){var P=C.styles,I=Object.keys(P);C.styles=[];for(var E=0;E<I.length;E++)C.styles.push({target:I[E],value:P[I[E]]})}}}}g(i,"line")&&delete i.line,"marker"in i&&(g(i.marker,"line")&&delete i.marker.line,g(i,"marker")&&delete i.marker),u.clean(i),i.autobinx&&(delete i.autobinx,delete i.xbins),i.autobiny&&(delete i.autobiny,delete i.ybins),d(i),i.colorbar&&d(i.colorbar),i.marker&&i.marker.colorbar&&d(i.marker.colorbar),i.line&&i.line.colorbar&&d(i.line.colorbar),i.aaxis&&d(i.aaxis),i.baxis&&d(i.baxis)}},e.swapXYData=function(t){var e;if(o.swapAttrs(t,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(t.z)&&Array.isArray(t.z[0])&&(t.transpose?delete t.transpose:t.transpose=!0),t.error_x&&t.error_y){var r=t.error_y,n="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(t,["error_?.copy_ystyle"]),n&&o.swapAttrs(t,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof t.hoverinfo){var i=t.hoverinfo.split("+");for(e=0;e<i.length;e++)"x"===i[e]?i[e]="y":"y"===i[e]&&(i[e]="x");t.hoverinfo=i.join("+")}},e.coerceTraceIndices=function(t,e){if(n(e))return[e];if(!Array.isArray(e)||!e.length)return t.data.map((function(t,e){return e}));if(Array.isArray(e)){for(var r=[],i=0;i<e.length;i++)o.isIndex(e[i],t.data.length)?r.push(e[i]):o.warn("trace index (",e[i],") is not a number or is out of bounds");return r}return e},e.manageArrayContainers=function(t,e,r){var i=t.obj,a=t.parts,s=a.length,l=a[s-1],u=n(l);if(u&&null===e){var c=a.slice(0,s-1).join(".");o.nestedProperty(i,c).get().splice(l,1)}else u&&void 0===t.get()?(void 0===t.get()&&(r[t.astr]=null),t.set(e)):t.set(e)};var _=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function x(t){var e=t.search(_);if(e>0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=x(e);r;){if(r in t)return!0;r=x(r)}return!1};var b=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n<e.length;n++)for(var i=t._fullData[n],a=0;a<3;a++){var s=h(t,i,b[a]);if(s&&"log"!==s.type){var l=s._name,u=s._id.substr(1);if("scene"===u.substr(0,5)){if(void 0!==r[u])continue;l=u+"."+l}var c=l+".type";void 0===r[l]&&void 0===r[c]&&o.nestedProperty(t.layout,c).set(null)}}}},2448:function(t,e,r){"use strict";var n=r(6424);e._doPlot=n._doPlot,e.newPlot=n.newPlot,e.restyle=n.restyle,e.relayout=n.relayout,e.redraw=n.redraw,e.update=n.update,e._guiRestyle=n._guiRestyle,e._guiRelayout=n._guiRelayout,e._guiUpdate=n._guiUpdate,e._storeDirectGUIEdit=n._storeDirectGUIEdit,e.react=n.react,e.extendTraces=n.extendTraces,e.prependTraces=n.prependTraces,e.addTraces=n.addTraces,e.deleteTraces=n.deleteTraces,e.moveTraces=n.moveTraces,e.purge=n.purge,e.addFrames=n.addFrames,e.deleteFrames=n.deleteFrames,e.animate=n.animate,e.setPlotConfig=n.setPlotConfig;var i=r(2200).getGraphDiv,a=r(4016).eraseActiveShape;e.deleteActiveShape=function(t){return a(i(t))},e.toImage=r(7024),e.validate=r(1480),e.downloadImage=r(7412);var o=r(4828);e.makeTemplate=o.makeTemplate,e.validateTemplate=o.validateTemplate},7680:function(t,e,r){"use strict";var n=r(3620),i=r(6628),a=r(4248),o=r(4952).sorterAsc,s=r(4040);e.containerArrayMatch=r(9820);var l=e.isAddVal=function(t){return"add"===t||n(t)},u=e.isRemoveVal=function(t){return null===t||"remove"===t};e.applyContainerArrayChanges=function(t,e,r,n,c){var h=e.astr,p=s.getComponentMethod(h,"supplyLayoutDefaults"),f=s.getComponentMethod(h,"draw"),d=s.getComponentMethod(h,"drawOne"),m=n.replot||n.recalc||p===i||f===i,y=t.layout,v=t._fullLayout;if(r[""]){Object.keys(r).length>1&&a.warn("Full array edits are incompatible with other edits",h);var g=r[""][""];if(u(g))e.set(null);else{if(!Array.isArray(g))return a.warn("Unrecognized full array edit value",h,g),!0;e.set(g)}return!m&&(p(y,v),f(t),!0)}var _,x,b,w,T,k,M,A,S=Object.keys(r).map(Number).sort(o),L=e.get(),C=L||[],P=c(v,h).get(),I=[],E=-1,D=C.length;for(_=0;_<S.length;_++)if(w=r[b=S[_]],T=Object.keys(w),k=w[""],M=l(k),b<0||b>C.length-(M?0:1))a.warn("index out of range",h,b);else if(void 0!==k)T.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",h,b),u(k)?I.push(b):M?("add"===k&&(k={}),C.splice(b,0,k),P&&P.splice(b,0,{})):a.warn("Unrecognized full object edit value",h,b,k),-1===E&&(E=b);else for(x=0;x<T.length;x++)A=h+"["+b+"].",c(C[b],T[x],A).set(w[T[x]]);for(_=I.length-1;_>=0;_--)C.splice(I[_],1),P&&P.splice(I[_],1);if(C.length?L||e.set(C):e.set(null),m)return!1;if(p(y,v),d!==i){var z;if(-1===E)z=S;else{for(D=Math.max(C.length,D),z=[],_=0;_<S.length&&!((b=S[_])>=E);_++)z.push(b);for(_=E;_<D;_++)z.push(_)}for(_=0;_<z.length;_++)d(t,z[_])}else f(t);return!0}},6424:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(2264),o=r(3400),s=o.nestedProperty,l=r(5924),u=r(4552),c=r(4040),h=r(3060),p=r(7316),f=r(4460),d=r(6312),m=r(4724),y=r(3616),v=r(6308),g=r(2464).initInteractions,_=r(9616),x=r(2676).clearOutline,b=r(556).dfltConfig,w=r(7680),T=r(3404),k=r(9172),M=r(7824),A=r(3816).AX_NAME_PATTERN,S=0;function L(t){var e=t._fullLayout;e._redrawFromAutoMarginCount?e._redrawFromAutoMarginCount--:t.emit("plotly_afterplot")}function C(t,e){try{t._fullLayout._paper.style("background",e)}catch(t){o.error(t)}}function P(t,e){C(t,v.combine(e,"white"))}function I(t,e){if(!t._context){t._context=o.extendDeep({},b);var r=n.select("base");t._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i,s,l,u=t._context;if(e){for(s=Object.keys(e),i=0;i<s.length;i++)"editable"!==(l=s[i])&&"edits"!==l&&l in u&&("setBackground"===l&&"opaque"===e[l]?u[l]=P:u[l]=e[l]);e.plot3dPixelRatio&&!u.plotGlPixelRatio&&(u.plotGlPixelRatio=u.plot3dPixelRatio);var c=e.editable;if(void 0!==c)for(u.editable=c,s=Object.keys(u.edits),i=0;i<s.length;i++)u.edits[s[i]]=c;if(e.edits)for(s=Object.keys(e.edits),i=0;i<s.length;i++)(l=s[i])in u.edits&&(u.edits[l]=e.edits[l]);u._exportedPlot=e._exportedPlot}u.staticPlot&&(u.editable=!1,u.edits={},u.autosizable=!1,u.scrollZoom=!1,u.doubleClick=!1,u.showTips=!1,u.showLink=!1,u.displayModeBar=!1),"hover"!==u.displayModeBar||a||(u.displayModeBar=!0),"transparent"!==u.setBackground&&"function"==typeof u.setBackground||(u.setBackground=C),u._hasZeroHeight=u._hasZeroHeight||0===t.clientHeight,u._hasZeroWidth=u._hasZeroWidth||0===t.clientWidth;var h=u.scrollZoom,p=u._scrollZoom={};if(!0===h)p.cartesian=1,p.gl3d=1,p.geo=1,p.mapbox=1;else if("string"==typeof h){var f=h.split("+");for(i=0;i<f.length;i++)p[f[i]]=1}else!1!==h&&(p.gl3d=1,p.geo=1,p.mapbox=1)}function E(t,e){var r,n,i=e+1,a=[];for(r=0;r<t.length;r++)(n=t[r])<0?a.push(i+n):a.push(n);return a}function D(t,e,r){var n,i;for(n=0;n<e.length;n++){if((i=e[n])!==parseInt(i,10))throw new Error("all values in "+r+" must be integers");if(i>=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function z(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),D(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&D(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function O(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var a in D(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,u,c,h,p=o.isPlainObject(n),f=[];for(var d in Array.isArray(r)||(r=[r]),r=E(r,t.data.length-1),e)for(var m=0;m<r.length;m++){if(a=t.data[r[m]],l=(u=s(a,d)).get(),c=e[d][m],!o.isArrayOrTypedArray(c))throw new Error("attribute: "+d+" index: "+m+" must be an array");if(!o.isArrayOrTypedArray(l))throw new Error("cannot extend missing or non-array attribute: "+d);if(l.constructor!==c.constructor)throw new Error("cannot extend array with an array of a different type: "+d);h=p?n[d][m]:n,i(h)||(h=-1),f.push({prop:u,target:l,insert:c,maxp:Math.floor(h)})}return f}(t,e,r,n),u={},c={},h=0;h<l.length;h++){var p=l[h].prop,f=l[h].maxp,d=a(l[h].target,l[h].insert,f);p.set(d[0]),Array.isArray(u[p.astr])||(u[p.astr]=[]),u[p.astr].push(d[1]),Array.isArray(c[p.astr])||(c[p.astr]=[]),c[p.astr].push(l[h].target.length)}return{update:u,maxPoints:c}}function R(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}function F(t,r,n,i){t=o.getGraphDiv(t),T.clearPromiseQueue(t);var a={};if("string"==typeof r)a[r]=n;else{if(!o.isPlainObject(r))return o.warn("Restyle fail.",r,n,i),Promise.reject();a=o.extendFlat({},r),void 0===i&&(i=n)}Object.keys(a).length&&(t.changed=!0);var s=T.coerceTraceIndices(t,i),l=j(t,a,s),c=l.flags;c.calc&&(t.calcdata=void 0),c.clearAxisTypes&&T.clearAxisTypes(t,s,{});var h=[];c.fullReplot?h.push(e._doPlot):(h.push(p.previousPromises),p.supplyDefaults(t),c.markerSize&&(p.doCalcdata(t),G(h)),c.style&&h.push(k.doTraceStyle),c.colorbars&&h.push(k.doColorBars),h.push(L)),h.push(p.rehover,p.redrag,p.reselect),u.add(t,F,[t,l.undoit,l.traces],F,[t,l.redoit,l.traces]);var f=o.syncOrAsync(h,t);return f&&f.then||(f=Promise.resolve()),f.then((function(){return t.emit("plotly_restyle",l.eventData),t}))}function B(t){return void 0===t?null:t}function N(t,e){return e?function(e,r,n){var i=s(e,r),a=i.set;return i.set=function(e){U((n||"")+r,i.get(),e,t),a(e)},i}:s}function U(t,e,r,n){if(Array.isArray(e)||Array.isArray(r))for(var i=Array.isArray(e)?e:[],a=Array.isArray(r)?r:[],s=Math.max(i.length,a.length),l=0;l<s;l++)U(t+"["+l+"]",i[l],a[l],n);else if(o.isPlainObject(e)||o.isPlainObject(r)){var u=o.isPlainObject(e)?e:{},c=o.isPlainObject(r)?r:{},h=o.extendFlat({},u,c);for(var p in h)U(t+"."+p,u[p],c[p],n)}else void 0===n[t]&&(n[t]=B(e))}function j(t,e,r){var n,i=t._fullLayout,a=t._fullData,l=t.data,u=i._guiEditing,d=N(i._preGUI,u),m=o.extendDeepAll({},e);V(e);var y,v=M.traceFlags(),g={},_={};function x(){return r.map((function(){}))}function b(t){var e=f.id2name(t);-1===y.indexOf(e)&&y.push(e)}function w(t){return"LAYOUT"+t+".autorange"}function k(t){return"LAYOUT"+t+".range"}function A(t){for(var e=t;e<a.length;e++)if(a[e]._input===l[t])return a[e]}function S(n,a,o){if(Array.isArray(n))n.forEach((function(t){S(t,a,o)}));else if(!(n in e)&&!T.hasParent(e,n)){var s;if("LAYOUT"===n.substr(0,6))s=d(t.layout,n.replace("LAYOUT",""));else{var c=r[o];s=N(i._tracePreGUI[A(c)._fullInput.uid],u)(l[c],n)}n in _||(_[n]=x()),void 0===_[n][o]&&(_[n][o]=B(s.get())),void 0!==a&&s.set(a)}}function L(t){return function(e){return a[e][t]}}function C(t){return function(e,n){return!1===e?a[r[n]][t]:null}}for(var P in e){if(T.hasParent(e,P))throw new Error("cannot set "+P+" and a parent attribute simultaneously");var I,E,D,z,O,R,F=e[P];if("autobinx"!==P&&"autobiny"!==P||(P=P.charAt(P.length-1)+"bins",F=Array.isArray(F)?F.map(C(P)):!1===F?r.map(L(P)):null),g[P]=F,"LAYOUT"!==P.substr(0,6)){for(_[P]=x(),n=0;n<r.length;n++)if(I=l[r[n]],E=A(r[n]),z=(D=N(i._tracePreGUI[E._fullInput.uid],u)(I,P)).get(),void 0!==(O=Array.isArray(F)?F[n%F.length]:F)){var U=D.parts[D.parts.length-1],j=P.substr(0,P.length-U.length-1),q=j?j+".":"",H=j?s(E,j).get():E;if((R=h.getTraceValObject(E,D.parts))&&R.impliedEdits&&null!==O)for(var G in R.impliedEdits)S(o.relativeAttr(P,G),R.impliedEdits[G],n);else if("thicknessmode"!==U&&"lenmode"!==U||z===O||"fraction"!==O&&"pixels"!==O||!H){if("type"===P&&("pie"===O!=("pie"===z)||"funnelarea"===O!=("funnelarea"===z))){var Z="x",Y="y";"bar"!==O&&"bar"!==z||"h"!==I.orientation||(Z="y",Y="x"),o.swapAttrs(I,["?","?src"],"labels",Z),o.swapAttrs(I,["d?","?0"],"label",Z),o.swapAttrs(I,["?","?src"],"values",Y),"pie"===z||"funnelarea"===z?(s(I,"marker.color").set(s(I,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):c.traceIs(I,"cartesian")&&s(I,"marker.colors").set(s(I,"marker.color").get())}}else{var W=i._size,X=H.orient,J="top"===X||"bottom"===X;if("thicknessmode"===U){var K=J?W.h:W.w;S(q+"thickness",H.thickness*("fraction"===O?1/K:K),n)}else{var Q=J?W.w:W.h;S(q+"len",H.len*("fraction"===O?1/Q:Q),n)}}if(_[P][n]=B(z),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(P)){if("orientation"===P){D.set(O);var $=I.x&&!I.y?"h":"v";if((D.get()||$)===E.orientation)continue}else"orientationaxes"===P&&(I.orientation={v:"h",h:"v"}[E.orientation]);T.swapXYData(I),v.calc=v.clearAxisTypes=!0}else-1!==p.dataArrayContainers.indexOf(D.parts[0])?(T.manageArrayContainers(D,O,_),v.calc=!0):(R?R.arrayOk&&!c.traceIs(E,"regl")&&(o.isArrayOrTypedArray(O)||o.isArrayOrTypedArray(z))?v.calc=!0:M.update(v,R):v.calc=!0,D.set(O))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(P)&&f.swap(t,r),"orientationaxes"===P){var tt=s(t.layout,"hovermode"),et=tt.get();"x"===et?tt.set("y"):"y"===et?tt.set("x"):"x unified"===et?tt.set("y unified"):"y unified"===et&&tt.set("x unified")}if(-1!==["orientation","type"].indexOf(P)){for(y=[],n=0;n<r.length;n++){var rt=l[r[n]];c.traceIs(rt,"cartesian")&&(b(rt.xaxis||"x"),b(rt.yaxis||"y"))}S(y.map(w),!0,0),S(y.map(k),[0,1],0)}}else D=d(t.layout,P.replace("LAYOUT","")),_[P]=[B(D.get())],D.set(Array.isArray(F)?F[0]:F),v.calc=!0}return(v.calc||v.plot)&&(v.fullReplot=!0),{flags:v,undoit:_,redoit:g,traces:r,eventData:o.extendDeepNoArrays([],[m,r])}}function V(t){var e,r,n,i=o.counterRegex("axis",".title",!1,!1),a=/colorbar\.title$/,s=Object.keys(t);for(e=0;e<s.length;e++)r=s[e],n=t[r],"title"!==r&&!i.test(r)&&!a.test(r)||"string"!=typeof n&&"number"!=typeof n?r.indexOf("titlefont")>-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function q(t,e,r){t=o.getGraphDiv(t),T.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=X(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[p.previousPromises];a.layoutReplot?s.push(k.layoutReplot):Object.keys(n).length&&(H(t,a,i)||p.supplyDefaults(t),a.legend&&s.push(k.doLegend),a.layoutstyle&&s.push(k.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(k.doTicksRelayout),a.modebar&&s.push(k.doModeBar),a.camera&&s.push(k.doCamera),a.colorbars&&s.push(k.doColorBars),s.push(L)),s.push(p.rehover,p.redrag,p.reselect),u.add(t,q,[t,i.undoit],q,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function H(t,e,r){var n,i,a=t._fullLayout;if(!e.axrange)return!1;for(var s in e)if("axrange"!==s&&e[s])return!1;var l=function(t,e){return o.coerce(n,i,m,t,e)},u={};for(var c in r.rangesAltered){var h=f.id2name(c);if(n=t.layout[h],i=a[h],d(n,i,l,u),i._matchGroup)for(var p in i._matchGroup)if(p!==c){var y=a[f.id2name(p)];y.autorange=i.autorange,y.range=i.range.slice(),y._input.range=i.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[];for(var n in e){var i=f.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)e[a]||r.push(a)}return f.draw(t,r,{skipTitle:!0})}:function(t){return f.draw(t,"redraw")};t.push(x,k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}var Z=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Y=/^[xyz]axis[0-9]*\.autorange$/,W=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function X(t,e){var r,n,i,a=t.layout,l=t._fullLayout,u=l._guiEditing,p=N(l._preGUI,u),d=Object.keys(e),m=f.list(t),y=o.extendDeepAll({},e),v={};for(V(e),d=Object.keys(e),n=0;n<d.length;n++)if(0===d[n].indexOf("allaxes")){for(i=0;i<m.length;i++){var g=m[i]._id.substr(1),_=-1!==g.indexOf("scene")?g+".":"",x=d[n].replace("allaxes",_+m[i]._name);e[x]||(e[x]=e[d[n]])}delete e[d[n]]}var b=M.layoutFlags(),k={},S={};function L(t,r){if(Array.isArray(t))t.forEach((function(t){L(t,r)}));else if(!(t in e)&&!T.hasParent(e,t)){var n=p(a,t);t in S||(S[t]=B(n.get())),void 0!==r&&n.set(r)}}var C,P={};function I(t){var e=f.name2id(t.split(".")[0]);return P[e]=1,e}for(var E in e){if(T.hasParent(e,E))throw new Error("cannot set "+E+" and a parent attribute simultaneously");for(var D=p(a,E),z=e[E],O=D.parts.length-1;O>0&&"string"!=typeof D.parts[O];)O--;var R=D.parts[O],F=D.parts[O-1]+"."+R,U=D.parts.slice(0,O).join("."),j=s(t.layout,U).get(),q=s(l,U).get(),H=D.get();if(void 0!==z){k[E]=z,S[E]="reverse"===R?z:B(H);var G=h.getLayoutValObject(l,D.parts);if(G&&G.impliedEdits&&null!==z)for(var X in G.impliedEdits)L(o.relativeAttr(E,X),G.impliedEdits[X]);if(-1!==["width","height"].indexOf(E))if(z){L("autosize",null);var K="height"===E?"width":"height";L(K,l[K])}else l[E]=t._initialAutoSize[E];else if("autosize"===E)L("width",z?null:l.width),L("height",z?null:l.height);else if(F.match(Z))I(F),s(l,U+"._inputRange").set(null);else if(F.match(Y)){I(F),s(l,U+"._inputRange").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else F.match(W)&&s(l,U+"._inputDomain").set(null);if("type"===R){C=j;var $="linear"===q.type&&"log"===z,tt="log"===q.type&&"linear"===z;if($||tt){if(C&&C.range)if(q.autorange)$&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],rt=C.range[1];$?(et<=0&&rt<=0&&L(U+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),L(U+".range[0]",Math.log(et)/Math.LN10),L(U+".range[1]",Math.log(rt)/Math.LN10)):(L(U+".range[0]",Math.pow(10,et)),L(U+".range[1]",Math.pow(10,rt)))}else L(U+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[D.parts[0]]&&"radialaxis"===D.parts[1]&&delete l[D.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(t,q,z,L),c.getComponentMethod("images","convertCoords")(t,q,z,L)}else L(U+".autorange",!0),L(U+".range",null);s(l,U+"._inputRange").set(null)}else if(R.match(A)){var nt=s(l,E).get(),it=(z||{}).type;it&&"-"!==it||(it="linear"),c.getComponentMethod("annotations","convertCoords")(t,nt,it,L),c.getComponentMethod("images","convertCoords")(t,nt,it,L)}var at=w.containerArrayMatch(E);if(at){r=at.array,n=at.index;var ot=at.property,st=G||{editType:"calc"};""!==n&&""===ot&&(w.isAddVal(z)?S[E]=null:w.isRemoveVal(z)?S[E]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),M.update(b,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[E]}else"reverse"===R?(j.range?j.range.reverse():(L(U+".autorange",!0),j.range=[1,0]),q.autorange?b.calc=!0:b.plot=!0):("dragmode"===E&&(!1===z&&!1!==H||!1!==z&&!1===H)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===E&&("lasso"===z||"select"===z)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?b.plot=!0:G?M.update(b,G):b.calc=!0,D.set(z))}}for(r in v)w.applyContainerArrayChanges(t,p(a,r),v[r],b,p)||(b.plot=!0);for(var ut in P){var ct=(C=f.getFromId(t,ut))&&C._constraintGroup;if(ct)for(var ht in b.calc=!0,ct)P[ht]||(f.getFromId(t,ht)._constraintShrinkable=!0)}(J(t)||e.height||e.width)&&(b.plot=!0);var pt=l.shapes;for(n=0;n<pt.length;n++)if(pt[n].showlegend){b.calc=!0;break}return(b.plot||b.calc)&&(b.layoutReplot=!0),{flags:b,rangesAltered:P,undoit:S,redoit:k,eventData:y}}function J(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&p.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function K(t,r,n,i){t=o.getGraphDiv(t),T.clearPromiseQueue(t),o.isPlainObject(r)||(r={}),o.isPlainObject(n)||(n={}),Object.keys(r).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=T.coerceTraceIndices(t,i),s=j(t,o.extendFlat({},r),a),l=s.flags,c=X(t,o.extendFlat({},n)),h=c.flags;(l.calc||h.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&T.clearAxisTypes(t,a,n);var f=[];h.layoutReplot?f.push(k.layoutReplot):l.fullReplot?f.push(e._doPlot):(f.push(p.previousPromises),H(t,h,c)||p.supplyDefaults(t),l.style&&f.push(k.doTraceStyle),(l.colorbars||h.colorbars)&&f.push(k.doColorBars),h.legend&&f.push(k.doLegend),h.layoutstyle&&f.push(k.layoutStyles),h.axrange&&G(f,c.rangesAltered),h.ticks&&f.push(k.doTicksRelayout),h.modebar&&f.push(k.doModeBar),h.camera&&f.push(k.doCamera),f.push(L)),f.push(p.rehover,p.redrag,p.reselect),u.add(t,K,[t,s.undoit,c.undoit,s.traces],K,[t,s.redoit,c.redoit,s.traces]);var d=o.syncOrAsync(f,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit("plotly_update",{data:s.eventData,layout:c.eventData}),t}))}function Q(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var $=[{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"}],tt=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function et(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=t.match(n.pattern);if(i){var a=i[1]||"";return{head:a,tail:t.substr(a.length+1),attr:n.attr}}}}function rt(t,e){var r=s(e,t).get();if(void 0!==r)return r;var n=t.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r<e.length;r++)if(e[r]._fullInput.uid===t)return r;return-1}function it(t,e,r){for(var n=0;n<e.length;n++)if(e[n].uid===t)return n;return!e[r]||e[r].uid?-1:r}function at(t,e){var r=o.isPlainObject(t),n=Array.isArray(t);return r||n?(r&&o.isPlainObject(e)||n&&Array.isArray(e))&&JSON.stringify(t)===JSON.stringify(e):t===e}function ot(t,e,r,n){var i,a,l,u=n.getValObject,c=n.flags,h=n.immutable,p=n.inArray,f=n.arrayIndex;function d(){var t=i.editType;p&&-1!==t.indexOf("arraydraw")?o.pushUnique(c.arrays[p],f):(M.update(c,i),"none"!==t&&c.nChanges++,n.transition&&i.anim&&c.nChangesAnim++,(Z.test(l)||Y.test(l))&&(c.rangesAltered[r[0]]=1),W.test(l)&&s(e,"_inputDomain").set(null),"datarevision"===a&&(c.newDataRevision=1))}function m(t){return"data_array"===t.valType||t.arrayOk}for(a in t){if(c.calc&&!n.transition)return;var y=t[a],v=e[a],g=r.concat(a);if(l=g.join("."),"_"!==a.charAt(0)&&"function"!=typeof y&&y!==v){if(("tick0"===a||"dtick"===a)&&"geo"!==r[0]){var _=e.tickmode;if("auto"===_||"array"===_||!_)continue}if(("range"!==a||!e.autorange)&&("zmin"!==a&&"zmax"!==a||"contourcarpet"!==e.type)&&(i=u(g))&&(!i._compareAsJSON||JSON.stringify(y)!==JSON.stringify(v))){var x,b=i.valType,w=m(i),T=Array.isArray(y),k=Array.isArray(v);if(T&&k){var A="_input_"+a,S=t[A],L=e[A];if(Array.isArray(S)&&S===L)continue}if(void 0===v)w&&T?c.calc=!0:d();else if(i._isLinkedToArray){var C=[],P=!1;p||(c.arrays[a]=C);var I=Math.min(y.length,v.length),E=Math.max(y.length,v.length);if(I!==E){if("arraydraw"!==i.editType){d();continue}P=!0}for(x=0;x<I;x++)ot(y[x],v[x],g.concat(x),o.extendFlat({inArray:a,arrayIndex:x},n));if(P)for(x=I;x<E;x++)C.push(x)}else!b&&o.isPlainObject(y)?ot(y,v,g,n):w?T&&k?(h&&(c.calc=!0),(h||n.newDataRevision)&&d()):T!==k?c.calc=!0:d():T&&k&&y.length===v.length&&String(y)===String(v)||d()}}}for(a in e)if(!(a in t)&&"_"!==a.charAt(0)&&"function"!=typeof e[a]){if(m(i=u(r.concat(a)))&&Array.isArray(e[a]))return void(c.calc=!0);d()}}function st(t,e){var r;for(r in t)if("_"!==r.charAt(0)){var n=t[r],i=e[r];if(n!==i)if(o.isPlainObject(n)&&o.isPlainObject(i)){if(st(n,i))return!0}else{if(!Array.isArray(n)||!Array.isArray(i))return!0;if(n.length!==i.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==i[a]){if(!o.isPlainObject(n[a])||!o.isPlainObject(i[a]))return!0;if(st(n[a],i[a]))return!0}}}}function lt(t){var e=t._fullLayout,r=t.getBoundingClientRect();if(!o.equalDomRects(r,e._lastBBox)){var n=e._invTransform=o.inverseTransformMatrix(o.getFullTransformMatrix(t));e._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),e._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),e._lastBBox=r}}e.animate=function(t,e,r){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var n=t._transitionData;n._frameQueue||(n._frameQueue=[]);var i=(r=p.supplyAnimationDefaults(r)).transition,a=r.frame;function s(t){return Array.isArray(i)?t>=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function u(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,c){function h(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,p.transition(t,e.frame.data,e.frame.layout,T.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var f,d,m=0;function y(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var v=[],g=null==e,_=Array.isArray(e);if(g||_||!o.isPlainObject(e)){if(g||-1!==["string","number"].indexOf(typeof e))for(f=0;f<n._frames.length;f++)(d=n._frames[f])&&(g||String(d.group)===String(e))&&v.push({type:"byname",name:String(d.name),data:y({name:d.name})});else if(_)for(f=0;f<e.length;f++){var x=e[f];-1!==["number","string"].indexOf(typeof x)?(x=String(x),v.push({type:"byname",name:x,data:y({name:x})})):o.isPlainObject(x)&&v.push({type:"object",data:y(o.extendFlat({},x))})}}else v.push({type:"object",data:y(o.extendFlat({},e))});for(f=0;f<v.length;f++)if("byname"===(d=v[f]).type&&!n._frameHash[d.data.name])return o.warn('animate failure: frame not found: "'+d.data.name+'"'),void c();-1!==["next","immediate"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var e=n._frameQueue.pop();e.onInterrupt&&e.onInterrupt()}t.emit("plotly_animationinterrupted",[])}}(),"reverse"===r.direction&&v.reverse();var b=t._fullLayout._currentFrame;if(b&&r.fromcurrent){var w=-1;for(f=0;f<v.length;f++)if("byname"===(d=v[f]).type&&d.name===b){w=f;break}if(w>0&&w<v.length-1){var k=[];for(f=0;f<v.length;f++)d=v[f],("byname"!==v[f].type||f>w)&&k.push(d);v=k}}v.length>0?function(e){if(0!==e.length){for(var i=0;i<e.length;i++){var o;o="byname"===e[i].type?p.computeFrame(t,e[i].name):e[i].data;var f=l(i),d=s(i);d.duration=Math.min(d.duration,f.duration);var m={frame:o,name:e[i].name,frameOpts:f,transitionOpts:d};i===e.length-1&&(m.onComplete=u(a,2),m.onInterrupt=c),n._frameQueue.push(m)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||h()}}(v):(t.emit("plotly_animated"),a())}))},e.addFrames=function(t,e,r){if(t=o.getGraphDiv(t),null==e)return Promise.resolve();if(!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,s,l=t._transitionData._frames,c=t._transitionData._frameHash;if(!Array.isArray(e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+e);var h=l.length+2*e.length,f=[],d={};for(n=e.length-1;n>=0;n--)if(o.isPlainObject(e[n])){var m=e[n].name,y=(c[m]||d[m]||{}).name,v=e[n].name,g=c[y]||d[y];y&&v&&"number"==typeof v&&g&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(c[y]||d[y]).name+'" with a frame whose name of type "number" also equates to "'+y+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[m]={name:m},f.push({frame:p.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:h+n})}f.sort((function(t,e){return t.index>e.index?-1:t.index<e.index?1:0}));var _=[],x=[],b=l.length;for(n=f.length-1;n>=0;n--){if("number"==typeof(i=f[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;c[i.name="frame "+t._transitionData._counter++];);if(c[i.name]){for(a=0;a<l.length&&(l[a]||{}).name!==i.name;a++);_.push({type:"replace",index:a,value:i}),x.unshift({type:"replace",index:a,value:l[a]})}else s=Math.max(0,Math.min(f[n].index,b)),_.push({type:"insert",index:s,value:i}),x.unshift({type:"delete",index:s}),b++}var w=p.modifyFrames,T=p.modifyFrames,k=[t,x],M=[t,_];return u&&u.add(t,w,k,T,M),p.modifyFrames(t,_)},e.deleteFrames=function(t,e){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);var r,n,i=t._transitionData._frames,a=[],s=[];if(!e)for(e=[],r=0;r<i.length;r++)e.push(r);for((e=e.slice()).sort(),r=e.length-1;r>=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=p.modifyFrames,c=p.modifyFrames,h=[t,s],f=[t,a];return u&&u.add(t,l,h,c,f),p.modifyFrames(t,a)},e.addTraces=function t(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],c=e.deleteTraces,h=t,p=[r,l],f=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n<e.length;n++)if("object"!=typeof(i=e[n])||Array.isArray(i)||null===i)throw new Error("all values in traces array must be non-array objects");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==e.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(r,n,i),Array.isArray(n)||(n=[n]),n=n.map((function(t){return o.extendFlat({},t)})),T.cleanData(n),a=0;a<n.length;a++)r.data.push(n[a]);for(a=0;a<n.length;a++)l.push(-n.length+a);if(void 0===i)return s=e.redraw(r),u.add(r,c,p,h,f),s;Array.isArray(i)||(i=[i]);try{z(r,l,i)}catch(t){throw r.data.splice(r.data.length-n.length,n.length),t}return u.startSequence(r),u.add(r,c,p,h,f),s=e.moveTraces(r,l,i),u.stopSequence(r),s},e.deleteTraces=function t(r,n){r=o.getGraphDiv(r);var i,a,s=[],l=e.addTraces,c=t,h=[r,s,n],p=[r,n];if(void 0===n)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),D(r,n,"indices"),(n=E(n,r.data.length-1)).sort(o.sorterDes),i=0;i<n.length;i+=1)a=r.data.splice(n[i],1)[0],s.push(a);var f=e.redraw(r);return u.add(r,l,h,c,p),f},e.extendTraces=function t(r,n,i,a){var s=O(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<0){var a=new t.constructor(0),s=R(t,e);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(l)),i.set(t),i.set(e.subarray(0,l),t.length)}else{var u=r-e.length,c=t.length-u;n.set(t.subarray(c)),n.set(e,u),i.set(t.subarray(0,c))}else n=t.concat(e),i=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,i]})),l=e.redraw(r),c=[r,s.update,i,s.maxPoints];return u.add(r,e.prependTraces,c,t,arguments),l},e.moveTraces=function t(r,n,i){var a,s=[],l=[],c=t,h=t,p=[r=o.getGraphDiv(r),i,n],f=[r,n,i];if(z(r,n,i),n=Array.isArray(n)?n:[n],void 0===i)for(i=[],a=0;a<n.length;a++)i.push(-n.length+a);for(i=Array.isArray(i)?i:[i],n=E(n,r.data.length-1),i=E(i,r.data.length-1),a=0;a<r.data.length;a++)-1===n.indexOf(a)&&s.push(r.data[a]);for(a=0;a<n.length;a++)l.push({newIndex:i[a],trace:r.data[n[a]]});for(l.sort((function(t,e){return t.newIndex-e.newIndex})),a=0;a<l.length;a+=1)s.splice(l[a].newIndex,0,l[a].trace);r.data=s;var d=e.redraw(r);return u.add(r,c,p,h,f),d},e.prependTraces=function t(r,n,i,a){var s=O(r=o.getGraphDiv(r),n,i,a,(function(t,e,r){var n,i;if(o.isTypedArray(t))if(r<=0){var a=new t.constructor(0),s=R(e,t);r<0?(n=s,i=a):(n=a,i=s)}else if(n=new t.constructor(r),i=new t.constructor(t.length+e.length-r),r===e.length)n.set(e),i.set(t);else if(r<e.length){var l=e.length-r;n.set(e.subarray(0,l)),i.set(e.subarray(l)),i.set(t,l)}else{var u=r-e.length;n.set(e),n.set(t.subarray(0,u),e.length),i.set(t.subarray(u))}else n=e.concat(t),i=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,i]})),l=e.redraw(r),c=[r,s.update,i,s.maxPoints];return u.add(r,e.extendTraces,c,t,arguments),l},e.newPlot=function(t,r,n,i){return t=o.getGraphDiv(t),p.cleanPlot([],{},t._fullData||[],t._fullLayout||{}),p.purge(t),e._doPlot(t,r,n,i)},e._doPlot=function(t,r,i,a){var s;if(t=o.getGraphDiv(t),l.init(t),o.isPlainObject(r)){var u=r;r=u.data,i=u.layout,a=u.config,s=u.frames}if(!1===l.triggerHandler(t,"plotly_beforeplot",[r,i,a]))return Promise.reject();r||i||o.isPlotDiv(t)||o.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",t),I(t,a),i||(i={}),n.select(t).classed("js-plotly-plot",!0),y.makeTester(),Array.isArray(t._promises)||(t._promises=[]);var h=0===(t.data||[]).length&&Array.isArray(r);Array.isArray(r)&&(T.cleanData(r),h?t.data=r:t.data.push.apply(t.data,r),t.empty=!1),t.layout&&!h||(t.layout=T.cleanLayout(i)),p.supplyDefaults(t);var d=t._fullLayout,m=d._has("cartesian");d._replotting=!0,(h||d._shouldCreateBgLayer)&&(function(t){var e=n.select(t),r=t._fullLayout;if(r._calcInverseTransform=lt,r._calcInverseTransform(t),r._container=e.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};n.selectAll("defs").each((function(){this.id&&(i[this.id.split("-")[1]]=1)})),r._uid=o.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(_.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var s=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=s.append("g").classed("imagelayer",!0),r._shapeUpperLayer=s.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),t.emit("plotly_framework")}(t),d._shouldCreateBgLayer&&delete d._shouldCreateBgLayer),y.initGradients(t),y.initPatterns(t),h&&f.saveShowSpikeInitial(t);var v=!t.calcdata||t.calcdata.length!==(t._fullData||[]).length;v&&p.doCalcdata(t);for(var x=0;x<t.calcdata.length;x++)t.calcdata[x][0].trace=t._fullData[x];t._context.responsive?t._responsiveChartHandler||(t._responsiveChartHandler=function(){o.isHidden(t)||p.resize(t)},window.addEventListener("resize",t._responsiveChartHandler)):o.clearResponsive(t);var b=o.extendFlat({},d._size),w=0;function M(){if(p.clearAutoMarginIds(t),k.drawMarginPushers(t),f.allowAutoMargin(t),t._fullLayout.title.text&&t._fullLayout.title.automargin&&p.allowAutoMargin(t,"title.automargin"),d._has("pie"))for(var e=t._fullData,r=0;r<e.length;r++){var n=e[r];"pie"===n.type&&n.automargin&&p.allowAutoMargin(t,"pie."+n.uid+".automargin")}return p.doAutoMargin(t),p.previousPromises(t)}function A(){t._transitioning||(k.doAutoRangeAndConstraints(t),h&&f.saveRangeInitial(t),c.getComponentMethod("rangeslider","calcAutorange")(t))}var S=[p.previousPromises,function(){if(s)return e.addFrames(t,s)},function e(){for(var r=d._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(t);!d._glcanvas&&d._has("gl")&&(d._glcanvas=d._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],(function(t){return t.key})),d._glcanvas.enter().append("canvas").attr("class",(function(t){return"gl-canvas gl-canvas-"+t.key.replace("Layer","")})).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var i=t._context.plotGlPixelRatio;if(d._glcanvas){d._glcanvas.attr("width",d.width*i).attr("height",d.height*i).style("width",d.width+"px").style("height",d.height+"px");var a=d._glcanvas.data()[0].regl;if(a&&(Math.floor(d.width*i)!==a._gl.drawingBufferWidth||Math.floor(d.height*i)!==a._gl.drawingBufferHeight)){var s="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!w)return o.log(s+" Clearing graph and plotting again."),p.cleanPlot([],{},t._fullData,d),p.supplyDefaults(t),d=t._fullLayout,p.doCalcdata(t),w++,e();o.error(s)}}return"h"===d.modebar.orientation?d._modebardiv.style("height",null).style("width","100%"):d._modebardiv.style("width",null).style("height",d.height+"px"),p.previousPromises(t)},M,function(){if(p.didMarginChange(b,d._size))return o.syncOrAsync([M,k.layoutStyles],t)}];m&&S.push((function(){if(v)return o.syncOrAsync([c.getComponentMethod("shapes","calcAutorange"),c.getComponentMethod("annotations","calcAutorange"),A],t);A()})),S.push(k.layoutStyles),m&&S.push((function(){return f.draw(t,h?"":"redraw")}),(function(t){var e=t._fullLayout._insideTickLabelsUpdaterange;if(e)return t._fullLayout._insideTickLabelsUpdaterange=void 0,q(t,e).then((function(){f.saveRangeInitial(t,!0)}))})),S.push(k.drawData,k.finalDraw,g,p.addLinks,p.rehover,p.redrag,p.reselect,p.doAutoMargin,p.previousPromises);var C=o.syncOrAsync(S,t);return C&&C.then||(C=Promise.resolve()),C.then((function(){return L(t),t}))},e.purge=function(t){var e=(t=o.getGraphDiv(t))._fullLayout||{},r=t._fullData||[];return p.cleanPlot([],{},r,e),p.purge(t),l.purge(t),e._container&&e._container.remove(),delete t._context,t},e.react=function(t,r,n,i){var a,l;t=o.getGraphDiv(t),T.clearPromiseQueue(t);var u=t._fullData,f=t._fullLayout;if(o.isPlotDiv(t)&&u&&f){if(o.isPlainObject(r)){var d=r;r=d.data,n=d.layout,i=d.config,a=d.frames}var m=!1;if(i){var y=o.extendDeep({},t._context);t._context=void 0,I(t,i),m=st(y,t._context)}t.data=r||[],T.cleanData(t.data),t.layout=n||{},T.cleanLayout(t.layout),function(t,e,r,n){var i,a,l,u,c,h,p,f,d,m,y=n._preGUI,v=[],g={},_={};for(i in y){if(c=et(i,$)){if(d=c.head,m=c.tail,a=c.attr||d+".uirevision",(u=(l=s(n,a).get())&&rt(a,e))&&u===l){if(null===(h=y[i])&&(h=void 0),at(f=(p=s(e,i)).get(),h)){void 0===f&&"autorange"===m&&v.push(d),p.set(B(s(n,i).get()));continue}if("autorange"===m||"range["===m.substr(0,6)){var x=y[d+".range[0]"],b=y[d+".range[1]"],w=y[d+".autorange"];if(w||null===w&&null===x&&null===b){if(!(d in g)){var T=s(e,d).get();g[d]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(g[d]){p.set(B(s(n,i).get()));continue}}}}}else o.warn("unrecognized GUI edit: "+i);delete y[i],c&&"range["===c.tail.substr(0,6)&&(_[c.head]=1)}for(var k=0;k<v.length;k++){var M=v[k];if(_[M]){var A=s(e,M).get();A&&delete A.autorange}}var S=n._tracePreGUI;for(var L in S){var C,P=S[L],I=null;for(i in P){if(!I){var E=nt(L,r);if(E<0){delete S[L];break}var D=it(L,t,(C=r[E]._fullInput).index);if(D<0){delete S[L];break}I=t[D]}if(c=et(i,tt)){if(c.attr?u=(l=s(n,c.attr).get())&&rt(c.attr,e):(l=C.uirevision,void 0===(u=I.uirevision)&&(u=e.uirevision)),u&&u===l&&(null===(h=P[i])&&(h=void 0),at(f=(p=s(I,i)).get(),h))){p.set(B(s(C,i).get()));continue}}else o.warn("unrecognized GUI edit: "+i+" in trace uid "+L);delete P[i]}}}(t.data,t.layout,u,f),p.supplyDefaults(t,{skipUpdateCalc:!0});var v=t._fullData,g=t._fullLayout,_=void 0===g.datarevision,x=g.transition,b=function(t,e,r,n,i){var a=M.layoutFlags();return a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0,ot(e,r,[],{getValObject:function(t){return h.getLayoutValObject(r,t)},flags:a,immutable:n,transition:i,gd:t}),(a.plot||a.calc)&&(a.layoutReplot=!0),i&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?"all":"some"),a}(t,f,g,_,x),w=b.newDataRevision,A=function(t,e,r,n,i,a){var o=e.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s,l,u=M.traceFlags();u.arrays={},u.nChanges=0,u.nChangesAnim=0;var c={getValObject:function(t){var e=h.getTraceValObject(l,t);return!l._module.animatable&&e.anim&&(e.anim=!1),e},flags:u,immutable:n,transition:i,newDataRevision:a,gd:t},f={};for(s=0;s<e.length;s++)if(r[s]){if(l=r[s]._fullInput,p.hasMakesDataTransform(l)&&(l=r[s]),f[l.uid])continue;f[l.uid]=1,ot(e[s]._fullInput,l,[],c)}return(u.calc||u.plot)&&(u.fullReplot=!0),i&&u.nChanges&&u.nChangesAnim&&(u.anim=u.nChanges===u.nChangesAnim&&o?"all":"some"),u}(t,u,v,_,x,w);if(J(t)&&(b.layoutReplot=!0),A.calc||b.calc){t.calcdata=void 0;for(var S=Object.getOwnPropertyNames(g),C=0;C<S.length;C++){var P=S[C],E=P.substring(0,5);if("xaxis"===E||"yaxis"===E){var D=g[P]._emptyCategories;D&&D()}}}else p.supplyDefaultsUpdateCalc(t.calcdata,v);var z=[];if(a&&(t._transitionData={},p.createTransitionData(t),z.push((function(){return e.addFrames(t,a)}))),g.transition&&!m&&(A.anim||b.anim))b.ticks&&z.push(k.doTicksRelayout),p.doCalcdata(t),k.doAutoRangeAndConstraints(t),z.push((function(){return p.transitionFromReact(t,A,b,f)}));else if(A.fullReplot||b.layoutReplot||m)t._fullLayout._skipDefaults=!0,z.push(e._doPlot);else{for(var O in b.arrays){var R=b.arrays[O];if(R.length){var F=c.getComponentMethod(O,"drawOne");if(F!==o.noop)for(var N=0;N<R.length;N++)F(t,R[N]);else{var U=c.getComponentMethod(O,"draw");if(U===o.noop)throw new Error("cannot draw components: "+O);U(t)}}}z.push(p.previousPromises),A.style&&z.push(k.doTraceStyle),(A.colorbars||b.colorbars)&&z.push(k.doColorBars),b.legend&&z.push(k.doLegend),b.layoutstyle&&z.push(k.layoutStyles),b.axrange&&G(z),b.ticks&&z.push(k.doTicksRelayout),b.modebar&&z.push(k.doModeBar),b.camera&&z.push(k.doCamera),z.push(L)}z.push(p.rehover,p.redrag,p.reselect),(l=o.syncOrAsync(z,t))&&l.then||(l=Promise.resolve(t))}else l=e.newPlot(t,r,n,i);return l.then((function(){return t.emit("plotly_react",{data:r,layout:n}),t}))},e.redraw=function(t){if(t=o.getGraphDiv(t),!o.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);return T.cleanData(t.data),T.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then((function(){return t.emit("plotly_redraw"),t}))},e.relayout=q,e.restyle=F,e.setPlotConfig=function(t){return o.extendFlat(b,t)},e.update=K,e._guiRelayout=Q(q),e._guiRestyle=Q(F),e._guiUpdate=Q(K),e._storeDirectGUIEdit=function(t,e,r){for(var n in r)U(n,s(t,n).get(),r[n],e)}},556:function(t){"use strict";var e={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},r={};!function t(e,r){for(var n in e){var i=e[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),t(i,r[n]))}}(e,r),t.exports={configAttributes:e,dfltConfig:r}},3060:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(5464),o=r(4859),s=r(6672),l=r(5656),u=r(556).configAttributes,c=r(7824),h=i.extendDeepAll,p=i.isPlainObject,f=i.isArrayOrTypedArray,d=i.nestedProperty,m=i.valObjectMeta,y="_isSubplotObj",v="_isLinkedToArray",g="_deprecated",_=[y,v,"_arrayAttrRegexps",g];function x(t,e,r){if(!t)return!1;if(t._isLinkedToArray)if(b(e[r]))r++;else if(r<e.length)return!1;for(;r<e.length;r++){var n=t[e[r]];if(!p(n))break;if(t=n,r===e.length-1)break;if(t._isLinkedToArray){if(!b(e[++r]))return!1}else if("info_array"===t.valType){var i=e[++r];if(!b(i))return!1;var a=t.items;if(Array.isArray(a)){if(i>=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!b(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function b(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in h(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i<e.attr.length;i++)k(r,e,e.attr[i]);else k(r,e,"subplot"===e.attr?e.name:e.attr);for(t in n.componentsRegistry){var a=(e=n.componentsRegistry[t]).schema;if(a&&(a.subplots||a.layout)){var s=a.subplots;if(s&&s.xaxis&&!s.yaxis)for(var l in s.xaxis)delete r.yaxis[l];delete r.xaxis.shift,delete r.xaxis.autoshift}else"colorscale"===e.name?h(r,e.layoutAttributes):e.layoutAttributes&&M(r,e.layoutAttributes,e.name)}return{layoutAttributes:T(r)}}function T(t){return function(t){e.crawl(t,(function(t,r,n){e.isValObject(t)?!0!==t.arrayOk&&"data_array"!==t.valType||(n[r+"src"]={valType:"string",editType:"none"}):p(t)&&(t.role="object")}))}(t),function(t){e.crawl(t,(function(t,e,r){if(t){var n=t[v];n&&(delete t[v],r[e]={items:{}},r[e].items[n]=t,r[e].role="object")}}))}(t),function(t){!function t(e){for(var r in e)if(p(e[r]))t(e[r]);else if(Array.isArray(e[r]))for(var n=0;n<e[r].length;n++)t(e[r][n]);else e[r]instanceof RegExp&&(e[r]=e[r].toString())}(t)}(t),t}function k(t,e,r){var n=d(t,r),i=h({},e.layoutAttributes);i[y]=!0,n.set(i)}function M(t,e,r){var n=d(t,r);n.set(h(n.get()||{},e))}e.IS_SUBPLOT_OBJ=y,e.IS_LINKED_TO_ARRAY=v,e.DEPRECATED=g,e.UNDERSCORE_ATTRS=_,e.get=function(){var t={};n.allTypes.forEach((function(r){t[r]=function(t){var r,i;i=(r=n.modules[t]._module).basePlotModule;var o={type:null},s=h({},a),l=h({},r.attributes);e.crawl(l,(function(t,e,r,n,i){d(s,i).set(void 0),void 0===t&&d(l,i).set(void 0)})),h(o,s),n.traceIs(t,"noOpacity")&&delete o.opacity,n.traceIs(t,"showLegend")||(delete o.showlegend,delete o.legendgroup),n.traceIs(t,"noHover")&&(delete o.hoverinfo,delete o.hoverlabel),r.selectPoints||delete o.selectedpoints,h(o,l),i.attributes&&h(o,i.attributes),o.type=t;var u={meta:r.meta||{},categories:r.categories||{},animatable:Boolean(r.animatable),type:t,attributes:T(o)};if(r.layoutAttributes){var c={};h(c,r.layoutAttributes),u.layoutAttributes=T(c)}return r.animatable||e.crawl(u,(function(t){e.isValObject(t)&&"anim"in t&&delete t.anim})),u}(r)}));var r,i={};return Object.keys(n.transformsRegistry).forEach((function(t){i[t]=function(t){var e=n.transformsRegistry[t],r=h({},e.attributes);return Object.keys(n.componentsRegistry).forEach((function(e){var i=n.componentsRegistry[e];i.schema&&i.schema.transforms&&i.schema.transforms[t]&&Object.keys(i.schema.transforms[t]).forEach((function(e){M(r,i.schema.transforms[t][e],e)}))})),{attributes:T(r)}}(t)})),{defs:{valObjects:m,metaKeys:_.concat(["description","role","editType","impliedEdits"]),editType:{traces:c.traces,layout:c.layout},impliedEdits:{}},traces:t,layout:w(),transforms:i,frames:(r={frames:h({},s)},T(r),r.frames),animation:T(l),config:T(u)}},e.crawl=function(t,r,n,i){var a=n||0;i=i||"",Object.keys(t).forEach((function(n){var o=t[n];if(-1===_.indexOf(n)){var s=(i?i+".":"")+n;r(o,n,t,a,s),e.isValObject(o)||p(o)&&"impliedEdits"!==n&&e.crawl(o,r,a+1,s)}}))},e.isValObject=function(t){return t&&void 0!==t.valType},e.findArrayAttributes=function(t){var r,n,i=[],o=[],s=[];function l(t,e,n,i){o=o.slice(0,i).concat([e]),s=s.slice(0,i).concat([t&&t._isLinkedToArray]),t&&("data_array"===t.valType||!0===t.arrayOk)&&("colorbar"!==o[i-1]||"ticktext"!==e&&"tickvals"!==e)&&u(r,0,"")}function u(t,e,r){var a=t[o[e]],l=r+o[e];if(e===o.length-1)f(a)&&i.push(n+l);else if(s[e]){if(Array.isArray(a))for(var c=0;c<a.length;c++)p(a[c])&&u(a[c],e+1,l+"["+c+"].")}else p(a)&&u(a,e+1,l+".")}r=t,n="",e.crawl(a,l),t._module&&t._module.attributes&&e.crawl(t._module.attributes,l);var c=t.transforms;if(c)for(var h=0;h<c.length;h++){var d=c[h],m=d._module;m&&(n="transforms["+h+"].",r=d,e.crawl(m.attributes,l))}return i},e.getTraceValObject=function(t,e){var r,i,o=e[0],s=1;if("transforms"===o){if(1===e.length)return a.transforms;var l=t.transforms;if(!Array.isArray(l)||!l.length)return!1;var u=e[1];if(!b(u)||u>=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[e[2]],s=3}else{var c=t._module;if(c||(c=(n.modules[t.type||a.type.dflt]||{})._module),!c)return!1;if(!(i=(r=c.attributes)&&r[o])){var h=c.basePlotModule;h&&h.attributes&&(i=h.attributes[o])}i||(i=a[o])}return x(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var u;for(r=0;r<l.length;r++){if((a=l[r]).attrRegex&&a.attrRegex.test(e)){if(a.layoutAttrOverrides)return a.layoutAttrOverrides;!u&&a.layoutAttributes&&(u=a.layoutAttributes)}var c=a.baseLayoutAttrOverrides;if(c&&e in c)return c[e]}if(u)return u}var h=t._modules;if(h)for(r=0;r<h.length;r++)if((s=h[r].layoutAttributes)&&e in s)return s[e];for(i in n.componentsRegistry){if("colorscale"===(a=n.componentsRegistry[i]).name&&0===e.indexOf("coloraxis"))return a.layoutAttributes[e];if(!a.schema&&e===a.name)return a.layoutAttributes}return e in o&&o[e]}(t,e[0]);return x(r,e,1)}},1780:function(t,e,r){"use strict";var n=r(3400),i=r(5464),a="templateitemname",o={name:{valType:"string",editType:"none"}};function s(t){return t&&"string"==typeof t}function l(t){var e=t.length-1;return"s"!==t.charAt(e)&&n.warn("bad argument to arrayDefaultKey: "+t),t.substr(0,t.length-1)+"defaults"}o[a]={valType:"string",editType:"calc"},e.templatedArray=function(t,e){return e._isLinkedToArray=t,e.name=o.name,e[a]=o[a],e},e.traceTemplater=function(t){var e,r,a={};for(e in t)r=t[e],Array.isArray(r)&&r.length&&(a[e]=0);return{newTrace:function(o){var s={type:e=n.coerce(o,{},i,"type"),_template:null};if(e in a){r=t[e];var l=a[e]%r.length;a[e]++,s._template=r[l]}return s}}},e.newContainer=function(t,e,r){var i=t._template,a=i&&(i[e]||r&&i[r]);return n.isPlainObject(a)||(a=null),t[e]={_template:a}},e.arrayTemplater=function(t,e,r){var n=t._template,i=n&&n[l(e)],o=n&&n[e];Array.isArray(o)&&o.length||(o=[]);var u={};return{newItem:function(t){var e={name:t.name,_input:t},n=e[a]=t[a];if(!s(n))return e._template=i,e;for(var l=0;l<o.length;l++){var c=o[l];if(c.name===n)return u[n]=1,e._template=c,e}return e[r]=t[r]||!1,e._template=!1,e},defaultItems:function(){for(var t=[],e=0;e<o.length;e++){var r=o[e],n=r.name;if(s(n)&&!u[n]){var i={_template:r,name:n,_input:{_templateitemname:n}};i[a]=r[a],t.push(i),u[n]=1}}return t}}},e.arrayDefaultKey=l,e.arrayEditor=function(t,e,r){var i=(n.nestedProperty(t,e).get()||[]).length,o=r._index,s=o>=i&&(r._input||{})._templateitemname;s&&(o=i);var l,u=e+"["+o+"]";function c(){l={},s&&(l[u]={},l[u][a]=s)}function h(t,e){s?n.nestedProperty(l[u],t).set(e):l[u+"."+t]=e}function p(){var t=l;return c(),t}return c(),{modifyBase:function(t,e){l[t]=e},modifyItem:h,getUpdateObj:p,applyUpdate:function(e,r){e&&h(e,r);var i=p();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},9172:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(7316),o=r(3400),s=r(2736),l=r(3696),u=r(6308),c=r(3616),h=r(1668),p=r(3080),f=r(4460),d=r(4284),m=r(1888),y=m.enforce,v=m.clean,g=r(9280).doAutoRange,_="start";function x(t,e,r){for(var n=0;n<r.length;n++){var i=r[n][0],a=r[n][1];if(!(i[0]>=t[1]||i[1]<=t[0])&&a[0]<e[1]&&a[1]>e[0])return!0}return!1}function b(t){var r,i,s,l,h,m,y=t._fullLayout,v=y._size,g=v.p,_=f.list(t,"",!0);if(y._paperdiv.style({width:t._context.responsive&&y.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":y.width+"px",height:t._context.responsive&&y.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":y.height+"px"}).selectAll(".main-svg").call(c.setSize,y.width,y.height),t._context.setBackground(t,y.paper_bgcolor),e.drawMainTitle(t),p.manage(t),!y._has("cartesian"))return a.previousPromises(t);function b(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-g-n:e._offset+e._length+g+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+g+n:e._offset-g-n:v.l+v.w*(t.position||0)+n%1}for(r=0;r<_.length;r++){var T=(l=_[r])._anchorAxis;l._linepositions={},l._lw=c.crispRound(t,l.linewidth,1),l._mainLinePosition=b(l,T,l.side),l._mainMirrorPosition=l.mirror&&T?b(l,T,d.OPPOSITE_SIDE[l.side]):null}var M=[],A=[],S=[],L=1===u.opacity(y.paper_bgcolor)&&1===u.opacity(y.plot_bgcolor)&&y.paper_bgcolor===y.plot_bgcolor;for(i in y._plots)if((s=y._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var C=s.xaxis.domain,P=s.yaxis.domain,I=s.plotgroup;if(x(C,P,S)){var E=I.node(),D=s.bg=o.ensureSingle(I,"rect","bg");E.insertBefore(D.node(),E.childNodes[0]),A.push(i)}else I.select("rect.bg").remove(),S.push([C,P]),L||(M.push(i),A.push(i))}var z,O,R,F,B,N,U,j,V,q,H,G,Z,Y=y._bgLayer.selectAll(".bg").data(M);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each((function(t){y._plots[t].bg=n.select(this)})),r=0;r<A.length;r++)s=y._plots[A[r]],h=s.xaxis,m=s.yaxis,s.bg&&void 0!==h._offset&&void 0!==m._offset&&s.bg.call(c.setRect,h._offset-g,m._offset-g,h._length+2*g,m._length+2*g).call(u.fill,y.plot_bgcolor).style("stroke-width",0);if(!y._hasOnlyLargeSploms)for(i in y._plots){s=y._plots[i],h=s.xaxis,m=s.yaxis;var W,X,J=s.clipId="clip"+y._uid+i+"plot",K=o.ensureSingleById(y._clips,"clipPath",J,(function(t){t.classed("plotclip",!0).append("rect")}));s.clipRect=K.select("rect").attr({width:h._length,height:m._length}),c.setTranslate(s.plot,h._offset,m._offset),s._hasClipOnAxisFalse?(W=null,X=J):(W=J,X=null),c.setClipUrl(s.plot,W,t),s.layerClipId=X}function Q(t){return"M"+z+","+t+"H"+O}function $(t){return"M"+h._offset+","+t+"h"+h._length}function tt(t){return"M"+t+","+j+"V"+U}function et(t){return void 0!==m._shift&&(t+=m._shift),"M"+t+","+m._offset+"v"+m._length}function rt(t,e,r){if(!t.showline||i!==t._mainSubplot)return"";if(!t._anchorAxis)return r(t._mainLinePosition);var n=e(t._mainLinePosition);return t.mirror&&(n+=e(t._mainMirrorPosition)),n}for(i in y._plots){s=y._plots[i],h=s.xaxis,m=s.yaxis;var nt="M0,0";w(h,i)&&(B=k(h,"left",m,_),z=h._offset-(B?g+B:0),N=k(h,"right",m,_),O=h._offset+h._length+(N?g+N:0),R=b(h,m,"bottom"),F=b(h,m,"top"),!(Z=!h._anchorAxis||i!==h._mainSubplot)||"allticks"!==h.mirror&&"all"!==h.mirror||(h._linepositions[i]=[R,F]),nt=rt(h,Q,$),Z&&h.showline&&("all"===h.mirror||"allticks"===h.mirror)&&(nt+=Q(R)+Q(F)),s.xlines.style("stroke-width",h._lw+"px").call(u.stroke,h.showline?h.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",nt);var it="M0,0";w(m,i)&&(H=k(m,"bottom",h,_),U=m._offset+m._length+(H?g:0),G=k(m,"top",h,_),j=m._offset-(G?g:0),V=b(m,h,"left"),q=b(m,h,"right"),!(Z=!m._anchorAxis||i!==m._mainSubplot)||"allticks"!==m.mirror&&"all"!==m.mirror||(m._linepositions[i]=[V,q]),it=rt(m,tt,et),Z&&m.showline&&("all"===m.mirror||"allticks"===m.mirror)&&(it+=tt(V)+tt(q)),s.ylines.style("stroke-width",m._lw+"px").call(u.stroke,m.showline?m.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",it)}return f.makeClipPaths(t),a.previousPromises(t)}function w(t,e){return(t.ticks||t.showline)&&(e===t._mainSubplot||"all"===t.mirror||"allticks"===t.mirror)}function T(t,e,r){if(!r.showline||!r._lw)return!1;if("all"===r.mirror||"allticks"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var i=d.FROM_BL[e];return r.side===e?n.domain[i]===t.domain[i]:r.mirror&&n.domain[1-i]===t.domain[1-i]}function k(t,e,r,n){if(T(t,e,r))return r._lw;for(var i=0;i<n.length;i++){var a=n[i];if(a._mainAxis===r._mainAxis&&T(t,e,a))return a._lw}return 0}e.layoutStyles=function(t){return o.syncOrAsync([a.doAutoMargin,b],t)},e.drawMainTitle=function(t){var e,r=t._fullLayout.title,i=t._fullLayout,l=function(t){var e=t.title,r="middle";return o.isRightAnchor(e)?r="end":o.isLeftAnchor(e)&&(r=_),r}(i),u=function(t){var e=t.title,r="0em";return o.isTopAnchor(e)?r=d.CAP_SHIFT+"em":o.isMiddleAnchor(e)&&(r=d.MID_SHIFT+"em"),r}(i),p=function(t,e){var r=t.title,n=t._size,i=0;return"0em"!==e&&e?e===d.CAP_SHIFT+"em"&&(i=r.pad.t):i=-r.pad.b,"auto"===r.y?n.t/2:"paper"===r.yref?n.t+n.h-n.h*r.y+i:t.height-t.height*r.y+i}(i,u),f=function(t,e){var r=t.title,n=t._size,i=0;return e===_?i=r.pad.l:"end"===e&&(i=-r.pad.r),"paper"===r.xref?n.l+n.w*r.x+i:t.width*r.x+i}(i,l);if(h.draw(t,"gtitle",{propContainer:i,propName:"title.text",placeholder:i._dfltTitle.plot,attributes:{x:f,y:p,"text-anchor":l,dy:u}}),r.text&&r.automargin){var m=n.selectAll(".gtitle"),y=c.bBox(m.node()).height,v=function(t,e,r){var n=e.y,i=e.yanchor,a=n>.5?"t":"b",o=t._fullLayout.margin[a],s=0;return"paper"===e.yref?s=r+e.pad.t+e.pad.b:"container"===e.yref&&(s=function(t,e,r,n,i){var a=0;return"middle"===r&&(a+=i/2),"t"===t?("top"===r&&(a+=i),a+=n-e*n):("bottom"===r&&(a+=i),a+=e*n),a}(a,n,i,t._fullLayout.height,r)+e.pad.t+e.pad.b),s>o?s:0}(t,r,y);if(v>0){!function(t,e,r,n){var i="title.automargin",s=t._fullLayout.title,l=s.y>.5?"t":"b",u={x:s.x,y:s.y,t:0,b:0},c={};"paper"===s.yref&&function(t,e,r,n,i){var a="paper"===e.yref?t._fullLayout._size.h:t._fullLayout.height,s=o.isTopAnchor(e)?n:n-i,l="b"===r?a-s:s;return!(o.isTopAnchor(e)&&"t"===r||o.isBottomAnchor(e)&&"b"===r)&&l<i}(t,s,l,e,n)?u[l]=r:"container"===s.yref&&(c[l]=r,t._fullLayout._reservedMargin[i]=c),a.allowAutoMargin(t,i),a.autoMargin(t,i,u)}(t,p,v,y),m.attr({x:f,y:p,"text-anchor":l,dy:(e=r.yanchor,"top"===e?d.CAP_SHIFT+.3+"em":"bottom"===e?"-0.3em":d.MID_SHIFT+"em")}).call(s.positionText,f,p);var g=(r.text.match(s.BR_TAG_ALL)||[]).length;if(g){var x=d.LINE_SPACING*g+d.MID_SHIFT;0===r.y&&(x=-x),m.selectAll(".line").each((function(){var t=+this.getAttribute("dy").slice(0,-2)-x+"em";this.setAttribute("dy",t)}))}}}},e.doTraceStyle=function(t){var r,n=t.calcdata,o=[];for(r=0;r<n.length;r++){var s=n[r],u=s[0]||{},c=u.trace||{},h=c._module||{},p=h.arraysToCalcdata;p&&p(s,c);var f=h.editStyle;f&&o.push({fn:f,cd0:u})}if(o.length){for(r=0;r<o.length;r++){var d=o[r];d.fn(t,d.cd0)}l(t),e.redrawReglTraces(t)}return a.style(t),i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doColorBars=function(t){return i.getComponentMethod("colorbar","draw")(t),a.previousPromises(t)},e.layoutReplot=function(t){var e=t.layout;return t.layout=void 0,i.call("_doPlot",t,"",e)},e.doLegend=function(t){return i.getComponentMethod("legend","draw")(t),a.previousPromises(t)},e.doTicksRelayout=function(t){return f.draw(t,"redraw"),t._fullLayout._hasOnlyLargeSploms&&(i.subplotsRegistry.splom.updateGrid(t),l(t),e.redrawReglTraces(t)),e.drawMainTitle(t),a.previousPromises(t)},e.doModeBar=function(t){var e=t._fullLayout;p.manage(t);for(var r=0;r<e._basePlotModules.length;r++){var n=e._basePlotModules[r].updateFx;n&&n(t)}return a.previousPromises(t)},e.doCamera=function(t){for(var e=t._fullLayout,r=e._subplots.gl3d,n=0;n<r.length;n++){var i=e[r[n]];i._scene.setViewport(i)}},e.drawData=function(t){var r=t._fullLayout;l(t);for(var n=r._basePlotModules,o=0;o<n.length;o++)n[o].plot(t);return e.redrawReglTraces(t),a.style(t),i.getComponentMethod("selections","draw")(t),i.getComponentMethod("shapes","draw")(t),i.getComponentMethod("annotations","draw")(t),i.getComponentMethod("images","draw")(t),r._replotting=!1,a.previousPromises(t)},e.redrawReglTraces=function(t){var e=t._fullLayout;if(e._has("regl")){var r,n,i=t._fullData,a=[],s=[];for(e._hasOnlyLargeSploms&&e._splomGrid.draw(),r=0;r<i.length;r++){var l=i[r];!0===l.visible&&0!==l._length&&("splom"===l.type?e._splomScenes[l.uid].draw():"scattergl"===l.type?o.pushUnique(a,l.xaxis+l.yaxis):"scatterpolargl"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<a.length;r++)(n=e._plots[a[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=e[s[r]]._subplot)._scene&&n._scene.draw()}},e.doAutoRangeAndConstraints=function(t){for(var e,r=f.list(t,"",!0),n={},i=0;i<r.length;i++)if(!n[(e=r[i])._id]){n[e._id]=1,v(t,e),g(t,e);var a=e._matchGroup;if(a)for(var o in a){var s=f.getFromId(t,o);g(t,s,e.range),n[o]=1}}y(t)},e.finalDraw=function(t){i.getComponentMethod("rangeslider","draw")(t),i.getComponentMethod("rangeselector","draw")(t)},e.drawMarginPushers=function(t){i.getComponentMethod("legend","draw")(t),i.getComponentMethod("rangeselector","draw")(t),i.getComponentMethod("sliders","draw")(t),i.getComponentMethod("updatemenus","draw")(t),i.getComponentMethod("colorbar","draw")(t)}},4828:function(t,e,r){"use strict";var n=r(3400),i=n.isPlainObject,a=r(3060),o=r(7316),s=r(5464),l=r(1780),u=r(556).dfltConfig;function c(t,e){t=n.extendDeep({},t);var r,a,o=Object.keys(t).sort();function s(e,r,n){if(i(r)&&i(e))c(e,r);else if(Array.isArray(r)&&Array.isArray(e)){var o=l.arrayTemplater({_template:t},n);for(a=0;a<r.length;a++){var s=r[a],u=o.newItem(s)._template;u&&c(u,s)}var h=o.defaultItems();for(a=0;a<h.length;a++)r.push(h[a]._template);for(a=0;a<r.length;a++)delete r[a].templateitemname}}for(r=0;r<o.length;r++){var u=o[r],p=t[u];if(u in e?s(p,e[u],u):e[u]=p,h(u)===u)for(var f in e){var d=h(f);f===d||d!==u||f in t||s(p,e[f],u)}}}function h(t){return t.replace(/[0-9]+$/,"")}function p(t,e,r,a,o){var s=o&&r(o);for(var u in t){var c=t[u],f=m(t,u,a),d=m(t,u,o),y=r(d);if(!y){var v=h(u);v!==u&&(y=r(d=m(t,v,o)))}if(!(s&&s===y||!y||y._noTemplating||"data_array"===y.valType||y.arrayOk&&Array.isArray(c)))if(!y.valType&&i(c))p(c,e,r,f,d);else if(y._isLinkedToArray&&Array.isArray(c))for(var g=!1,_=0,x={},b=0;b<c.length;b++){var w=c[b];if(i(w)){var T=w.name;if(T)x[T]||(p(w,e,r,m(c,_,f),m(c,_,d)),_++,x[T]=1);else if(!g){var k=m(t,l.arrayDefaultKey(u),a),M=m(c,_,f);p(w,e,r,M,m(c,_,d));var A=n.nestedProperty(e,M);n.nestedProperty(e,k).set(A.get()),A.set(null),g=!0}}}else n.nestedProperty(e,f).set(c)}}function f(t,e){return a.getLayoutValObject(t,n.nestedProperty({},e).parts)}function d(t,e){return a.getTraceValObject(t,n.nestedProperty({},e).parts)}function m(t,e,r){return r?Array.isArray(t)?r+"["+e+"]":r+"."+e:e}function y(t){for(var e=0;e<t.length;e++)if(i(t[e]))return!0}function v(t){var e;switch(t.code){case"data":e="The template has no key data.";break;case"layout":e="The template has no key layout.";break;case"missing":e=t.path?"There are no templates for item "+t.path+" with name "+t.templateitemname:"There are no templates for trace "+t.index+", of type "+t.traceType+".";break;case"unused":e=t.path?"The template item at "+t.path+" was not used in constructing the plot.":t.dataCount?"Some of the templates of type "+t.traceType+" were not used. The template has "+t.templateCount+" traces, the data only has "+t.dataCount+" of this type.":"The template has "+t.templateCount+" traces of type "+t.traceType+" but there are none in the data.";break;case"reused":e="Some of the templates of type "+t.traceType+" were used more than once. The template has "+t.templateCount+" traces, the data has "+t.dataCount+" of this type."}return t.msg=e,t}e.makeTemplate=function(t){t=n.isPlainObject(t)?t:n.getGraphDiv(t),t=n.extendDeep({_context:u},{data:t.data,layout:t.layout}),o.supplyDefaults(t);var e=t.data||[],r=t.layout||{};r._basePlotModules=t._fullLayout._basePlotModules,r._modules=t._fullLayout._modules;var a={data:{},layout:{}};e.forEach((function(t){var e={};p(t,e,d.bind(null,t));var r=n.coerce(t,{},s,"type"),i=a.data[r];i||(i=a.data[r]=[]),i.push(e)})),p(r,a.layout,f.bind(null,r)),delete a.layout.template;var l=r.template;if(i(l)){var h,m,y,v,g,_,x=l.layout;i(x)&&c(x,a.layout);var b=l.data;if(i(b)){for(m in a.data)if(y=b[m],Array.isArray(y)){for(_=(g=a.data[m]).length,v=y.length,h=0;h<_;h++)c(y[h%v],g[h]);for(h=_;h<v;h++)g.push(n.extendDeep({},y[h]))}for(m in b)m in a.data||(a.data[m]=n.extendDeep([],b[m]))}}return a},e.validateTemplate=function(t,e){var r=n.extendDeep({},{_context:u,data:t.data,layout:t.layout}),a=r.layout||{};i(e)||(e=a.template||{});var s=e.layout,l=e.data,c=[];r.layout=a,r.layout.template=e,o.supplyDefaults(r);var p=r._fullLayout,f=r._fullData,d={};if(i(s)?(function t(e,r){for(var n in e)if("_"!==n.charAt(0)&&i(e[n])){var a,o=h(n),s=[];for(a=0;a<r.length;a++)s.push(m(e,n,r[a])),o!==n&&s.push(m(e,o,r[a]));for(a=0;a<s.length;a++)d[s[a]]=1;t(e[n],s)}}(p,["layout"]),function t(e,r){for(var n in e)if(-1===n.indexOf("defaults")&&i(e[n])){var a=m(e,n,r);d[a]?t(e[n],a):c.push({code:"unused",path:a})}}(s,"layout")):c.push({code:"layout"}),i(l)){for(var g,_={},x=0;x<f.length;x++){var b=f[x];_[g=b.type]=(_[g]||0)+1,b._fullInput._template||c.push({code:"missing",index:b._fullInput.index,traceType:g})}for(g in l){var w=l[g].length,T=_[g]||0;w>T?c.push({code:"unused",traceType:g,templateCount:w,dataCount:T}):T>w&&c.push({code:"reused",traceType:g,templateCount:w,dataCount:T})}}else c.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=m(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&c.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&y(a)&&t(a,o)}}({data:f,layout:p},""),c.length)return c.map(v)}},7024:function(t,e,r){"use strict";var n=r(8248),i=r(6424),a=r(7316),o=r(3400),s=r(7030),l=r(7164),u=r(3268),c=r(5788).version,h={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(t,e){var r,p,f,d;function m(t){return!(t in e)||o.validate(e[t],h[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],p=t.layout||{},f=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),p=o.extendDeep({},t.layout),f=t._context,d=t._fullLayout||{}),!m("width")&&null!==e.width||!m("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+o.join2(h.format.values,", "," or ")+".");var y={};function v(t,r){return o.coerce(e,y,h,t,r)}var g=v("format"),_=v("width"),x=v("height"),b=v("scale"),w=v("setBackground"),T=v("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var M=o.extendFlat({},p);_?M.width=_:null===e.width&&n(d.width)&&(M.width=d.width),x?M.height=x:null===e.height&&n(d.height)&&(M.height=d.height);var A=o.extendFlat({},f,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function L(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function C(){return new Promise((function(t,e){var r=l(k,g,b),n=k._fullLayout.width,h=k._fullLayout.height;function p(){i.purge(k),document.body.removeChild(k)}if("full-json"===g){var f=a.graphJson(k,!1,"keepdata","object",!0,!0);return f.version=c,f=JSON.stringify(f),p(),t(T?f:s.encodeJSON(f))}if(p(),"svg"===g)return t(T?r:s.encodeSVG(r));var d=document.createElement("canvas");d.id=o.randstr(),u({format:g,width:n,height:h,scale:b,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,M,A).then(S).then(L).then(C).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},1480:function(t,e,r){"use strict";var n=r(3400),i=r(7316),a=r(3060),o=r(556).dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(t,e,r,i,a,o){o=o||[];for(var h=Object.keys(t),p=0;p<h.length;p++){var y=h[p];if("transforms"!==y){var v=o.slice();v.push(y);var g=t[y],_=e[y],x=m(r,y),b=(x||{}).valType,w="info_array"===b,T="colorscale"===b,k=(x||{}).items;if(d(r,y))if(s(g)&&s(_)&&"any"!==b)c(g,_,x,i,a,v);else if(w&&l(g)){g.length>_.length&&i.push(f("unused",a,v.concat(_.length)));var M,A,S,L,C,P=_.length,I=Array.isArray(k);if(I&&(P=Math.min(P,k.length)),2===x.dimensions)for(A=0;A<P;A++)if(l(g[A])){g[A].length>_[A].length&&i.push(f("unused",a,v.concat(A,_[A].length)));var E=_[A].length;for(M=0;M<(I?Math.min(E,k[A].length):E);M++)S=I?k[A][M]:k,L=g[A][M],C=_[A][M],n.validate(L,S)?C!==L&&C!==+L&&i.push(f("dynamic",a,v.concat(A,M),L,C)):i.push(f("value",a,v.concat(A,M),L))}else i.push(f("array",a,v.concat(A),g[A]));else for(A=0;A<P;A++)S=I?k[A]:k,L=g[A],C=_[A],n.validate(L,S)?C!==L&&C!==+L&&i.push(f("dynamic",a,v.concat(A),L,C)):i.push(f("value",a,v.concat(A),L))}else if(x.items&&!w&&l(g)){var D,z,O=k[Object.keys(k)[0]],R=[];for(D=0;D<_.length;D++){var F=_[D]._index||D;if((z=v.slice()).push(F),s(g[F])&&s(_[D])){R.push(F);var B=g[F],N=_[D];s(B)&&!1!==B.visible&&!1===N.visible?i.push(f("invisible",a,z)):c(B,N,O,i,a,z)}}for(D=0;D<g.length;D++)(z=v.slice()).push(D),s(g[D])?-1===R.indexOf(D)&&i.push(f("unused",a,z)):i.push(f("object",a,z,g[D]))}else!s(g)&&s(_)?i.push(f("object",a,v,g)):u(g)||!u(_)||w||T?y in e?n.validate(g,x)?"enumerated"===x.valType&&(x.coerceNumber&&g!==+_||g!==_)&&i.push(f("dynamic",a,v,g,_)):i.push(f("value",a,v,g)):i.push(f("unused",a,v,g)):i.push(f("array",a,v,g));else i.push(f("schema",a,v))}}return i}t.exports=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var r,u,h=a.get(),p=[],d={_context:n.extendFlat({},o)};l(t)?(d.data=n.extendDeep([],t),r=t):(d.data=[],r=[],p.push(f("array","data"))),s(e)?(d.layout=n.extendDeep({},e),u=e):(d.layout={},u={},arguments.length>1&&p.push(f("object","layout"))),i.supplyDefaults(d);for(var m=d._fullData,y=r.length,v=0;v<y;v++){var g=r[v],_=["data",v];if(s(g)){var x=m[v],b=x.type,w=h.traces[b].attributes;w.type={valType:"enumerated",values:[b]},!1===x.visible&&!1!==g.visible&&p.push(f("invisible",_)),c(g,x,w,p,_);var T=g.transforms,k=x.transforms;if(T){l(T)||p.push(f("array",_,["transforms"])),_.push("transforms");for(var M=0;M<T.length;M++){var A=["transforms",M],S=T[M].type;if(s(T[M])){var L=h.transforms[S]?h.transforms[S].attributes:{};L.type={valType:"enumerated",values:Object.keys(h.transforms)},c(T[M],k[M],L,p,_,A)}else p.push(f("object",_,A))}}}else p.push(f("object",_))}var C=d._fullLayout,P=function(t,e){for(var r=t.layout.layoutAttributes,i=0;i<e.length;i++){var a=e[i],o=t.traces[a.type],s=o.layoutAttributes;s&&(a.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}(h,m);return c(u,C,P,p,"layout"),0===p.length?void 0:p};var h={object:function(t,e){return("layout"===t&&""===e?"The layout argument":"data"===t[0]&&""===e?"Trace "+t[1]+" in the data argument":p(t)+"key "+e)+" must be linked to an object container"},array:function(t,e){return("data"===t?"The data argument":p(t)+"key "+e)+" must be linked to an array container"},schema:function(t,e){return p(t)+"key "+e+" is not part of the schema"},unused:function(t,e,r){var n=s(r)?"container":"key";return p(t)+n+" "+e+" did not get coerced"},dynamic:function(t,e,r,n){return[p(t)+"key",e,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(t,e){return(e?p(t)+"item "+e:"Trace "+t[1])+" got defaulted to be not visible"},value:function(t,e,r){return[p(t)+"key "+e,"is set to an invalid value ("+r+")"].join(" ")}};function p(t){return l(t)?"In data trace "+t[1]+", ":"In "+t+", "}function f(t,e,r,i,a){var o,s;r=r||"",l(e)?(o=e[0],s=e[1]):(o=e,s=null);var u=function(t){if(!l(t))return String(t);for(var e="",r=0;r<t.length;r++){var n=t[r];"number"==typeof n?e=e.substr(0,e.length-1)+"["+n+"]":e+=n,r<t.length-1&&(e+=".")}return e}(r),c=h[t](e,u,i,a);return n.log(c),{code:t,container:o,trace:s,path:r,astr:u,msg:c}}function d(t,e){var r=v(e),n=r.keyMinusId,i=r.id;return!!(n in t&&t[n]._isSubplotObj&&i)||e in t}function m(t,e){return e in t?t[e]:t[v(e).keyMinusId]}var y=n.counterRegex("([a-z]+)");function v(t){var e=t.match(y);return{keyMinusId:e&&e[1],id:e&&e[2]}}},5656:function(t){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},1272:function(t,e,r){"use strict";var n=r(3400),i=r(1780);t.exports=function(t,e,r){var a,o,s=r.name,l=r.inclusionAttr||"visible",u=e[s],c=n.isArrayOrTypedArray(t[s])?t[s]:[],h=e[s]=[],p=i.arrayTemplater(e,s,l);for(a=0;a<c.length;a++){var f=c[a];n.isPlainObject(f)?o=p.newItem(f):(o=p.newItem({}))[l]=!1,o._index=a,!1!==o[l]&&r.handleItemDefaults(f,o,e,r),h.push(o)}var d=p.defaultItems();for(a=0;a<d.length;a++)(o=d[a])._index=h.length,r.handleItemDefaults({},o,e,r,{}),h.push(o);if(n.isArrayOrTypedArray(u)){var m=Math.min(u.length,h.length);for(a=0;a<m;a++)n.relinkPrivateKeys(h[a],u[a])}return h}},5464:function(t,e,r){"use strict";var n=r(5376),i=r(5756);t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:n({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},1220:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=i.dateTime2ms,o=i.incrementMonth,s=r(9032).ONEAVGMONTH;t.exports=function(t,e,r,i){if("date"!==e.type)return{vals:i};var l=t[r+"periodalignment"];if(!l)return{vals:i};var u,c=t[r+"period"];if(n(c)){if((c=+c)<=0)return{vals:i}}else if("string"==typeof c&&"M"===c.charAt(0)){var h=+c.substring(1);if(!(h>0&&Math.round(h)===h))return{vals:i};u=h}for(var p=e.calendar,f="start"===l,d="end"===l,m=t[r+"period0"],y=a(m,p)||0,v=[],g=[],_=[],x=i.length,b=0;b<x;b++){var w,T,k,M=i[b];if(u){for(w=Math.round((M-y)/(u*s)),k=o(y,u*w,p);k>M;)k=o(k,-u,p);for(;k<=M;)k=o(k,u,p);T=o(k,-u,p)}else{for(k=y+(w=Math.round((M-y)/c))*c;k>M;)k-=c;for(;k<=M;)k+=c;T=k-c}v[b]=f?T:d?k:(T+k)/2,g[b]=T,_[b]=k}return{vals:v,starts:g,ends:_}}},6720:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},9280:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(3400),o=r(9032).FP_SAFE,s=r(4040),l=r(3616),u=r(9811),c=u.getFromId,h=u.isLinked;function p(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),u=y(t,e),c=u.min,h=u.max;if(0===c.length||0===h.length)return a.simpleMap(e.range,e.r2l);var p=c[0].val,m=h[0].val;for(r=1;r<c.length&&p===m;r++)p=Math.min(p,c[r].val);for(r=1;r<h.length&&p===m;r++)m=Math.max(m,h[r].val);var v=e.autorange,g="reversed"===v||"min reversed"===v||"max reversed"===v;if(!g&&e.range){var _=a.simpleMap(e.range,e.r2l);g=_[1]<_[0]}"reversed"===e.autorange&&(e.autorange=!0);var x,b,w,T,M,A,S=e.rangemode,L="tozero"===S,C="nonnegative"===S,P=e._length,I=P/10,E=0;for(r=0;r<c.length;r++)for(x=c[r],n=0;n<h.length;n++)(A=(b=h[n]).val-x.val-f(e,x.val,b.val))>0&&((M=P-s(x)-l(b))>I?A/M>E&&(w=x,T=b,E=A/M):A/P>E&&(w={val:x.val,nopad:1},T={val:b.val,nopad:1},E=A/P));if(p===m){var D=p-1,z=p+1;if(L)if(0===p)i=[0,1];else{var O=(p>0?h:c).reduce((function(t,e){return Math.max(t,l(e))}),0),R=p/(1-Math.min(.5,O/P));i=p>0?[0,R]:[R,0]}else i=C?[Math.max(0,D),Math.max(1,z)]:[D,z]}else L?(w.val>=0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):C&&(w.val-E*s(w)<0&&(w={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),E=(T.val-w.val-f(e,x.val,b.val))/(P-s(w)-l(T)),i=[w.val-E*s(w),T.val+E*l(T)];return i=k(i,e),e.limitRange&&e.limitRange(),g&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function f(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a<i.length;a++){var o=i[a];n+=o.max-o.min}return n}function d(t,e,r){var i=.05*e._length,o=e._anchorAxis||{};if(-1!==(e.ticklabelposition||"").indexOf("inside")||-1!==(o.ticklabelposition||"").indexOf("inside")){var s=e.isReversed();if(!s){var u=a.simpleMap(e.range,e.r2l);s=u[1]<u[0]}s&&(r=!r)}var c=0;return h(t,e._id)||(c=function(t,e,r){var i=0,o="x"===e._id.charAt(0);for(var s in t._plots){var u=t._plots[s];if(e._id===u.xaxis._id||e._id===u.yaxis._id){var c=(o?u.yaxis:u.xaxis)||{};if(-1!==(c.ticklabelposition||"").indexOf("inside")&&(!r&&("left"===c.side||"bottom"===c.side)||r&&("top"===c.side||"right"===c.side))){if(c._vals){var h=a.deg2rad(c._tickAngles[c._id+"tick"]||0),p=Math.abs(Math.cos(h)),f=Math.abs(Math.sin(h));if(!c._vals[0].bb){var d=c._id+"tick";c._selections[d].each((function(t){var e=n.select(this);e.select(".text-math-group").empty()&&(t.bb=l.bBox(e.node()))}))}for(var y=0;y<c._vals.length;y++){var v=c._vals[y].bb;if(v){var g=2*m+v.width,_=2*m+v.height;i=Math.max(i,o?Math.max(g*p,_*f):Math.max(_*p,g*f))}}}"inside"===c.ticks&&"inside"===c.ticklabelposition&&(i+=c.ticklen||0)}}}return i}(t,e,r)),i=Math.max(c,i),"domain"===e.constrain&&e._inputDomain&&(i*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(t){return t.nopad?0:t.pad+(t.extrapad?i:c)}}t.exports={applyAutorangeOptions:k,getAutoRange:p,makePadFn:d,doAutoRange:function(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():p(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var n=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,s.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),n.range=e.range.slice(),n.autorange=e.autorange}var o=e._anchorAxis;if(o&&o.rangeslider){var l=o.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=p(t,e)),o._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t._m||t.setScale();var n,a,s,l,u,c,h,p,f,d=[],m=[],y=e.length,_=r.padded||!1,b=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,T=!1,k=r.vpadLinearized||!1;function M(t){if(Array.isArray(t))return T=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var A=M((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),L=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!T){if(p=1/0,f=-1/0,w)for(n=0;n<y;n++)(a=e[n])<p&&a>0&&(p=a),a>f&&a<o&&(f=a);else for(n=0;n<y;n++)(a=e[n])<p&&a>-o&&(p=a),a>f&&a<o&&(f=a);e=[p,f],y=2}var P={tozero:b,extrapad:_};function I(r){s=e[r],i(s)&&(c=A(r),h=S(r),k?(l=t.c2l(s)-C(r),u=t.c2l(s)+L(r)):(p=s-C(r),f=s+L(r),w&&p<f/10&&(p=f/10),l=t.c2l(p),u=t.c2l(f)),b&&(l=Math.min(0,l),u=Math.max(0,u)),x(l)&&v(d,l,h,P),x(u)&&g(m,u,c,P))}var E=Math.min(6,y);for(n=0;n<E;n++)I(n);for(n=y-1;n>=E;n--)I(n);return{min:d,max:m,opts:r}},concatExtremes:y};var m=3;function y(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,u=[],h=[];function p(t,e){for(n=0;n<e.length;n++){var r=t[e[n]],s=(r._extremes||{})[o];if(!0===r.visible&&s){for(i=0;i<s.min.length;i++)a=s.min[i],v(u,a.val,a.pad,{extrapad:a.extrapad});for(i=0;i<s.max.length;i++)a=s.max[i],g(h,a.val,a.pad,{extrapad:a.extrapad})}}}if(p(s,e._traceIndices),p(l.annotations||[],e._annIndices||[]),p(l.shapes||[],e._shapeIndices||[]),e._matchGroup&&!r)for(var f in e._matchGroup)if(f!==e._id){var d=c(t,f),m=y(t,d,!0),_=e._length/d._length;for(i=0;i<m.min.length;i++)a=m.min[i],v(u,a.val,a.pad*_,{extrapad:a.extrapad});for(i=0;i<m.max.length;i++)a=m.max[i],g(h,a.val,a.pad*_,{extrapad:a.extrapad})}return{min:u,max:h}}function v(t,e,r,n){_(t,e,r,n,b)}function g(t,e,r,n){_(t,e,r,n,w)}function _(t,e,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l<t.length&&s;l++){var u=t[l];if(i(u.val,e)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}i(e,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(t.splice(l,1),l--)}if(s){var c=a&&0===e;t.push({val:e,pad:c?0:r,extrapad:!c&&o})}}function x(t){return i(t)&&Math.abs(t)<o}function b(t,e){return t<=e}function w(t,e){return t>=e}function T(t,e,r){return void 0===e||void 0===r||(e=t.d2l(e))<t.d2l(r)}function k(t,e){if(!e||!e.autorangeoptions)return t;var r=t[0],n=t[1],i=e.autorangeoptions.include;if(void 0!==i){var o=e.d2l(r),s=e.d2l(n);a.isArrayOrTypedArray(i)||(i=[i]);for(var l=0;l<i.length;l++){var u=e.d2l(i[l]);o>=u&&(o=u,r=u),s<=u&&(s=u,n=u)}}return r=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.minallowed&&T(e,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&T(e,r.clipmin,r.clipmax)?Math.max(t,e.d2l(r.clipmin)):t}(r,e),n=function(t,e){var r=e.autorangeoptions;return r&&void 0!==r.maxallowed&&T(e,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&T(e,r.clipmin,r.clipmax)?Math.min(t,e.d2l(r.clipmax)):t}(n,e),[r,n]}},6808:function(t){"use strict";t.exports=function(t,e,r){var n,i;if(r){var a="reversed"===e||"min reversed"===e||"max reversed"===e;n=r[a?1:0],i=r[a?0:1]}var o=t("autorangeoptions.minallowed",null===i?n:void 0),s=t("autorangeoptions.maxallowed",null===n?i:void 0);void 0===o&&t("autorangeoptions.clipmin"),void 0===s&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},4460:function(t,e,r){"use strict";var n=r(3428),i=r(8248),a=r(7316),o=r(4040),s=r(3400),l=s.strTranslate,u=r(2736),c=r(1668),h=r(6308),p=r(3616),f=r(4724),d=r(8728),m=r(9032),y=m.ONEMAXYEAR,v=m.ONEAVGYEAR,g=m.ONEMINYEAR,_=m.ONEMAXQUARTER,x=m.ONEAVGQUARTER,b=m.ONEMINQUARTER,w=m.ONEMAXMONTH,T=m.ONEAVGMONTH,k=m.ONEMINMONTH,M=m.ONEWEEK,A=m.ONEDAY,S=A/2,L=m.ONEHOUR,C=m.ONEMIN,P=m.ONESEC,I=m.MINUS_SIGN,E=m.BADNUM,D={K:"zeroline"},z={K:"gridline",L:"path"},O={K:"minor-gridline",L:"path"},R={K:"tick",L:"path"},F={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},N=r(4284),U=N.MID_SHIFT,j=N.CAP_SHIFT,V=N.LINE_SPACING,q=N.OPPOSITE_SIDE,H=t.exports={};H.setConvert=r(8344);var G=r(2976),Z=r(9811),Y=Z.idSort,W=Z.isLinked;H.id2name=Z.id2name,H.name2id=Z.name2id,H.cleanId=Z.cleanId,H.list=Z.list,H.listIds=Z.listIds,H.getFromId=Z.getFromId,H.getFromTrace=Z.getFromTrace;var X=r(9280);H.getAutoRange=X.getAutoRange,H.findExtremes=X.findExtremes;var J=1e-4;function K(t){var e=(t[1]-t[0])*J;return[t[0]-e,t[1]+e]}H.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],u=n+"ref",c={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),c[u]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,c,u)},H.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},H.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==H.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=H.getFromId(e,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}t[i]=o(l)},H.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:H.getFromId(e,r).cleanPos)(t)},H.redrawComponents=function(t,e){e=e||H.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),u={},c=0;c<e.length;c++)for(var h=r[H.id2name(e[c])][a],p=0;p<h.length;p++){var f=h[p];if(!u[f]&&(l(t,f),u[f]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0),n("selections","drawOne","_selectionIndices")};var Q=H.getDataConversions=function(t,e,r,n){var i,a="x"===r||"y"===r||"z"===r?r:n;if(s.isArrayOrTypedArray(a)){if(i={type:G(n,void 0,{autotypenumbers:t._fullLayout.autotypenumbers}),_categories:[]},H.setConvert(i),"category"===i.type)for(var o=0;o<n.length;o++)i.d2c(n[o])}else i=H.getFromTrace(t,e,a);return i?{d2c:i.d2c,c2d:i.c2d}:"ids"===a?{d2c:tt,c2d:tt}:{d2c:$,c2d:$}};function $(t){return+t}function tt(t){return String(t)}function et(t,e){return Math.abs((t/e+.5)%1-.5)<.001}function rt(t,e){return Math.abs(t/e-1)<.001}function nt(t){return+t.substring(1)}function it(t,e){return t.rangebreaks&&(e=e.filter((function(e){return t.maskBreaks(e.x)!==E}))),e}function at(t){var e=t._mainAxis,r=[];if(e._vals)for(var n=0;n<e._vals.length;n++)if(!e._vals[n].noTick){var i=e.l2p(e._vals[n].x),a=t.p2l(i),o=H.tickText(t,a);e._vals[n].minor&&(o.minor=!0,o.text=""),r.push(o)}return it(t,r)}function ot(t,e){var r=K(s.simpleMap(t.range,t.r2l)),n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a="category"===t.type?t.d2l_noadd:t.d2l;"log"===t.type&&"L"!==String(t.dtick).charAt(0)&&(t.dtick="L"+Math.pow(10,Math.floor(Math.min(t.range[0],t.range[1]))-1));for(var o=[],l=0;l<=1;l++)if((void 0===e||!(e&&l||!1===e&&!l))&&(!l||t.minor)){var u=l?t.minor.tickvals:t.tickvals,c=l?[]:t.ticktext;if(u){s.isArrayOrTypedArray(c)||(c=[]);for(var h=0;h<u.length;h++){var p=a(u[h]);if(p>n&&p<i){var f=H.tickText(t,p,!1,String(c[h]));l&&(f.minor=!0,f.text=""),o.push(f)}}}}return it(t,o)}H.getDataToCoordFunc=function(t,e,r,n){return Q(t,e,r,n).d2c},H.counterLetter=function(t){var e=t.charAt(0);return"x"===e?"y":"y"===e?"x":void 0},H.minDtick=function(t,e,r,n){-1===["log","category","multicategory"].indexOf(t.type)&&n?void 0===t._minDtick?(t._minDtick=e,t._forceTick0=r):t._minDtick&&((t._minDtick/e+1e-6)%1<2e-6&&((r-t._forceTick0)/e%1+1.000001)%1<2e-6?(t._minDtick=e,t._forceTick0=r):((e/t._minDtick+1e-6)%1>2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},H.saveRangeInitial=function(t,e){for(var r=H.list(t,"",!0),n=!1,i=0;i<r.length;i++){var a=r[i],o=void 0===a._rangeInitial0&&void 0===a._rangeInitial1,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&!0!==l||e&&s)&&(a._rangeInitial0="min"===l||"max reversed"===l?void 0:a.range[0],a._rangeInitial1="max"===l||"min reversed"===l?void 0:a.range[1],a._autorangeInitial=l,n=!0)}return n},H.saveShowSpikeInitial=function(t,e){for(var r=H.list(t,"",!0),n=!1,i="on",a=0;a<r.length;a++){var o=r[a],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||e&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),"on"!==i||o.showspikes||(i="off")}return t._fullLayout._cartesianSpikesEnabled=i,n},H.autoBin=function(t,e,r,n,a,o){var l,u=s.aggNums(Math.min,null,t),c=s.aggNums(Math.max,null,t);if("category"===e.type||"multicategory"===e.type)return{start:u-.5,end:c+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:c-u};if(a||(a=e.calendar),l="log"===e.type?{type:"linear",range:[u,c]}:{type:e.type,range:s.simpleMap([u,c],e.c2r,0,a),calendar:a},H.setConvert(l),o=o&&d.dtick(o,l.type))l.dtick=o,l.tick0=d.tick0(void 0,l.type,a);else{var h;if(r)h=(c-u)/r;else{var p=s.distinctVals(t),f=Math.pow(10,Math.floor(Math.log(p.minDiff)/Math.LN10)),m=f*s.roundUp(p.minDiff/f,[.9,1.9,4.9,9.9],!0);h=Math.max(m,2*s.stdev(t)/Math.pow(t.length,n?.25:.4)),i(h)||(h=1)}H.autoTicks(l,h)}var y,v=l.dtick,g=H.tickIncrement(H.tickFirst(l),v,"reverse",a);if("number"==typeof v)g=function(t,e,r,n,a){var o=0,s=0,l=0,u=0;function c(e){return(1+100*(e-t)/r.dtick)%100<2}for(var h=0;h<e.length;h++)e[h]%1==0?l++:i(e[h])||u++,c(e[h])&&o++,c(e[h]+r.dtick/2)&&s++;var p=e.length-u;if(l===p&&"date"!==r.type)r.dtick<1?t=n-.5*r.dtick:(t-=.5)+r.dtick<n&&(t+=r.dtick);else if(s<.1*p&&(o>.3*p||c(n)||c(a))){var f=r.dtick/2;t+=t+f<n?f:-f}return t}(g,t,l,u,c),y=g+(1+Math.floor((c-g)/v))*v;else for("M"===l.dtick.charAt(0)&&(g=function(t,e,r,n,i){var a=s.findExactDates(e,i);if(a.exactDays>.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=H.tickIncrement(t,"M6","reverse")+1.5*A:a.exactMonths>.8?t=H.tickIncrement(t,"M1","reverse")+15.5*A:t-=S;var l=H.tickIncrement(t,r);if(l<=n)return l}return t}(g,t,v,u,a)),y=g;y<=c;)y=H.tickIncrement(y,v,!1,a);return{start:e.c2r(g,0,a),end:e.c2r(y,0,a),size:v,_dataSpan:c-u}},H.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=H.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*o+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,H.prepTicks(t,r),a){var u=i(e.dtick),c=i(t.dtick),h=u?e.dtick:+e.dtick.substring(1),p=c?t.dtick:+t.dtick.substring(1);u&&c?et(h,p)?h===2*M&&p===2*A&&(t.dtick=M):h===2*M&&p===3*A?t.dtick=M:h!==M||(e._input.minor||{}).nticks?rt(h/p,2.5)?t.dtick=h/2:t.dtick=h:t.dtick=A:"M"===String(e.dtick).charAt(0)?c?t.dtick="M1":et(h,p)?h>=12&&2===p&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?et(h,p)||(t.dtick=rt(h/p,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},H.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,a=t.nticks;a||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n="y"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(a*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,H.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=H.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=L,o&&!n&&t.dtick<L&&(t.dtick=L)):/%p/.test(a)?(e=S,o&&!n&&t.dtick<S&&(t.dtick=S)):/%[Aadejuwx]/.test(a)?(e=A,o&&!n&&t.dtick<A&&(t.dtick=A)):/%[UVW]/.test(a)?(e=M,o&&!n&&t.dtick<M&&(t.dtick=M)):/%[Bbm]/.test(a)?(e=T,o&&(n?nt(t.dtick)<1:t.dtick<k)&&(t.dtick="M1")):/%[q]/.test(a)?(e=x,o&&(n?nt(t.dtick)<3:t.dtick<b)&&(t.dtick="M3")):/%[Yy]/.test(a)&&(e=v,o&&(n?nt(t.dtick)<12:t.dtick<g)&&(t.dtick="M12")))}(n=r())&&t.tick0===t._dowTick0&&(t.tick0=t._rawTick0),t._definedDelta=e}(t),t.tick0||(t.tick0="date"===t.type?"2000-01-01":0),"date"===t.type&&t.dtick<.1&&(t.dtick=.1),mt(t)},H.calcTicks=function(t,e){for(var r,n,a=t.type,o=t.calendar,l=t.ticklabelstep,u="period"===t.ticklabelmode,c=s.simpleMap(t.range,t.r2l,void 0,void 0,e),h=c[1]<c[0],p=Math.min(c[0],c[1]),f=Math.max(c[0],c[1]),d=Math.max(1e3,t._length||0),m=[],C=[],P=[],I=[],D=t.minor&&(t.minor.ticks||t.minor.showgrid),z=1;z>=(D?0:1);z--){var O=!z;z?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var R=z?t:s.extendFlat({},t,t.minor);if(O?H.prepMinorTicks(R,t,e):H.prepTicks(R,e),"array"!==R.tickmode)if("sync"!==R.tickmode){var F=K(c),B=F[0],N=F[1],U=i(R.dtick),j="log"===a&&!(U||"L"===R.dtick.charAt(0)),V=H.tickFirst(R,e);if(z){if(t._tmin=V,V<B!==h)break;"category"!==a&&"multicategory"!==a||(N=h?Math.max(-.5,N):Math.min(t._categories.length-.5,N))}var q,G,Z=null,Y=V;z&&(U?G=t.dtick:"date"===a?"string"==typeof t.dtick&&"M"===t.dtick.charAt(0)&&(G=T*t.dtick.substring(1)):G=t._roughDTick,q=Math.round((t.r2l(Y)-t.r2l(t.tick0))/G)-1);var W=R.dtick;for(R.rangebreaks&&R._tick0Init!==R.tick0&&(Y=Ot(Y,t),h||(Y=H.tickIncrement(Y,W,!h,o))),z&&u&&(Y=H.tickIncrement(Y,W,!h,o),q--);h?Y>=N:Y<=N;Y=H.tickIncrement(Y,W,h,o)){if(z&&q++,R.rangebreaks&&!h){if(Y<B)continue;if(R.maskBreaks(Y)===E&&Ot(Y,R)>=f)break}if(P.length>d||Y===Z)break;Z=Y;var X={value:Y};z?(j&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&q%l&&(X.skipLabel=!0),P.push(X)):(X.minor=!0,I.push(X))}}else P=[],m=at(t);else z?(P=[],m=ot(t,!O)):(I=[],C=ot(t,!O))}if(D&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var J=P.map((function(t){return t.value})),Q=[],$=0;$<I.length;$++){var tt=I[$],et=tt.value;if(-1===J.indexOf(et)){for(var rt=!1,nt=0;!rt&&nt<P.length;nt++)1e7+P[nt].value===1e7+et&&(rt=!0);rt||Q.push(tt)}}I=Q}if(u&&function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n].value,a=n,o=n+1;n<t.length-1?(a=n,o=n+1):n>0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,u=t[o].value,c=Math.abs(u-l),h=r||c,p=0;h>=g?p=c>=g&&c<=y?c:v:r===x&&h>=b?p=c>=b&&c<=_?c:x:h>=k?p=c>=k&&c<=w?c:T:r===M&&h>=M?p=M:h>=A?p=A:r===S&&h>=S?p=S:r===L&&h>=L&&(p=L),p>=c&&(p=c,s=!0);var f=i+p;if(e.rangebreaks&&p>0){for(var d=0,m=0;m<84;m++){var C=(m+.5)/84;e.maskBreaks(i*(1-C)+C*f)!==E&&d++}(p*=d/84)||(t[n].drop=!0),s&&c>M&&(p=c)}(p>0||0===n)&&(t[n].periodX=i+p/2)}}(P,t,t._definedDelta),t.rangebreaks){var it="y"===t._id.charAt(0),st=1;"auto"===t.tickmode&&(st=t.tickfont?t.tickfont.size:12);var lt=NaN;for(r=P.length-1;r>-1;r--)if(P[r].drop)P.splice(r,1);else{P[r].value=Ot(P[r].value,t);var ut=t.c2p(P[r].value);(it?lt>ut-st:lt<ut+st)?P.splice(h?r+1:r,1):lt=ut}}zt(t)&&360===Math.abs(c[1]-c[0])&&P.pop(),t._tmax=(P[P.length-1]||{}).value,t._prevDateHead="",t._inCalcTicks=!0;var ct,ht,pt=function(e){e.text="",t._prevDateHead=n};for(P=P.concat(I),r=0;r<P.length;r++){var ft=P[r].minor,dt=P[r].value;ft?C.push({x:dt,minor:!0}):(n=t._prevDateHead,ct=H.tickText(t,dt,!1,P[r].simpleLabel),void 0!==(ht=P[r].periodX)&&(ct.periodX=ht,(ht>f||ht<p)&&(ht>f&&(ct.periodX=f),ht<p&&(ct.periodX=p),pt(ct))),P[r].skipLabel&&pt(ct),m.push(ct))}return m=m.concat(C),t._inCalcTicks=!1,u&&m.length&&(m[0].noTick=!0),m};var st=[2,5,10],lt=[1,2,3,6,12],ut=[1,2,5,10,15,30],ct=[1,2,3,7,14],ht=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],pt=[-.301,0,.301,.699,1],ft=[15,30,45,90,180];function dt(t,e,r){return e*s.roundUp(t/e,r)}function mt(t){var e=t.dtick;if(t._tickexponent=0,i(e)||"string"==typeof e||(e=1),"category"!==t.type&&"multicategory"!==t.type||(t._tickround=null),"date"===t.type){var r=t.r2l(t.tick0),n=t.l2r(r).replace(/(^-|i)/g,""),a=n.length;if("M"===String(e).charAt(0))a>10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=A&&a<=10||e>=15*A)t._tickround="d";else if(e>=C&&a<=16||e>=L)t._tickround="M";else if(e>=P&&a<=19||e>=C)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),c=void 0===t.minexponent?3:t.minexponent;Math.abs(u)>c&&(gt(t.exponentformat)&&!_t(u)?t._tickexponent=3*Math.round((u-1)/3):t._tickexponent=u)}else t._tickround=null}function yt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}H.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>v)e/=v,n=a(10),t.dtick="M"+12*dt(e,n,st);else if(o>T)e/=T,t.dtick="M"+dt(e,1,lt);else if(o>A){if(t.dtick=dt(e,A,t._hasDayOfWeekBreaks?[1,2,7,14]:ct),!r){var l=H.getTickFormat(t),u="period"===t.ticklabelmode;u&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),u&&(t._dowTick0=t.tick0)}}else o>L?t.dtick=dt(e,L,lt):o>C?t.dtick=dt(e,C,ut):o>P?t.dtick=dt(e,P,ut):(n=a(10),t.dtick=dt(e,n,st))}else if("log"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var h=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/h,n=a(10),t.dtick="L"+dt(e,n,st)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):zt(t)?(t.tick0=0,n=1,t.dtick=dt(e,n,ft)):(t.tick0=0,n=a(10),t.dtick=dt(e,n,st));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var p=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(p)}},H.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),u=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,u,a);if("L"===l)return Math.log(Math.pow(10,t)+u)/Math.LN10;if("D"===l){var c="D2"===e?pt:ht,h=t+.01*o,p=s.roundUp(s.mod(h,1),c,r);return Math.floor(h)+Math.log(n.round(Math.pow(10,p),1))/Math.LN10}throw"unrecognized dtick "+String(e)},H.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1]<a[0],l=o?Math.floor:Math.ceil,u=K(a)[0],c=t.dtick,h=r(t.tick0);if(i(c)){var p=l((u-h)/c)*c+h;return"category"!==t.type&&"multicategory"!==t.type||(p=s.constrain(p,0,t._categories.length-1)),p}var f=c.charAt(0),d=Number(c.substr(1));if("M"===f){for(var m,y,v,g=0,_=h;g<10;){if(((m=H.tickIncrement(_,c,o,t.calendar))-u)*(_-u)<=0)return o?Math.min(_,m):Math.max(_,m);y=(u-(_+m)/2)/(m-_),v=f+(Math.abs(Math.round(y))||1)*d,_=H.tickIncrement(_,v,y<0?!o:o,t.calendar),g++}return s.error("tickFirst did not converge",t),_}if("L"===f)return Math.log(l((Math.pow(10,u)-h)/d)*d+h)/Math.LN10;if("D"===f){var x="D2"===c?pt:ht,b=s.roundUp(s.mod(u,1),x,o);return Math.floor(u)+Math.log(n.round(Math.pow(10,b),1))/Math.LN10}throw"unrecognized dtick "+String(c)},H.tickText=function(t,e,r,n){var a,o=yt(t,e),l="array"===t.tickmode,u=r||l,c=t.type,h="category"===c?t.d2l_noadd:t.d2l,p=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};if(l&&s.isArrayOrTypedArray(t.ticktext)){var f=s.simpleMap(t.range,t.r2l),d=(Math.abs(f[1]-f[0])-(t._lBreaks||0))/1e4;for(a=0;a<t.ticktext.length&&!(Math.abs(e-h(t.tickvals[a]))<d);a++);if(a<t.ticktext.length)return o.text=String(t.ticktext[a]),o.xbnd=[p(o.x-.5),p(o.x+t.dtick-.5)],o}function m(n){if(void 0===n)return!0;if(r)return"none"===n;var i={first:t._tmin,last:t._tmax}[n];return"all"!==n&&e!==i}var y=r?"never":"none"!==t.exponentformat&&m(t.showexponent)?"hide":"";if("date"===c?function(t,e,r,n){var a=t._tickround,o=r&&t.hoverformat||H.getTickFormat(t);(n=!o&&n)&&(a=i(a)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[a]);var l,u=s.formatDate(e.x,o,a,t._dateFormat,t.calendar,t._extraFormat),c=u.indexOf("\n");if(-1!==c&&(l=u.substr(c+1),u=u.substr(0,c)),n&&(void 0===l||"00:00:00"!==u&&"00:00"!==u?8===u.length&&(u=u.replace(/:00$/,"")):(u=l,l="")),l)if(r)"d"===a?u+=", "+l:u=l+(u?", "+u:"");else if(t._inCalcTicks&&t._prevDateHead===l){var h=Rt(t),p=t._trueSide||t.side;(!h&&"top"===p||h&&"bottom"===p)&&(u+="<br> ")}else t._prevDateHead=l,u+="<br>"+l;e.text=u}(t,o,r,u):"log"===c?function(t,e,r,n,a){var o=t.dtick,l=e.x,u=t.tickformat,c="string"==typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==c&&(o="L3",c="L"),u||"L"===c)e.text=xt(Math.pow(10,l),t,a,n);else if(i(o)||"D"===c&&s.mod(l+.01,1)<.1){var h=Math.round(l),p=Math.abs(h),f=t.exponentformat;"power"===f||gt(f)&&_t(h)?(e.text=0===h?1:1===h?"10":"10<sup>"+(h>1?"":I)+p+"</sup>",e.fontSize*=1.25):("e"===f||"E"===f)&&p>2?e.text="1"+f+(h>0?"+":I)+p:(e.text=xt(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,u,y):"category"===c?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===c?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):zt(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=xt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=xt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["<sup>",o[0],"</sup>","⁄","<sub>",o[1],"</sub>","π"].join(""),l&&(e.text=I+e.text)}}}}(t,o,r,u,y):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=xt(e.x,t,i,n)}(t,o,0,u,y),n||(t.tickprefix&&!m(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!m(t.showticksuffix)&&(o.text+=t.ticksuffix)),t.labelalias&&t.labelalias.hasOwnProperty(o.text)){var v=t.labelalias[o.text];"string"==typeof v&&(o.text=v)}return("boundaries"===t.tickson||t.showdividers)&&(o.xbnd=[p(o.x-.5),p(o.x+t.dtick-.5)]),o},H.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=s.isArrayOrTypedArray(e)?e[0]:e,i=s.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return H.hoverLabelText(t,n,r)+" - "+H.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=H.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":I+o:o};var vt=["f","p","n","μ","m","","k","M","G","T"];function gt(t){return"SI"===t||"B"===t}function _t(t){return t>14||t<-15}function xt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",u=e._tickexponent,c=H.getTickFormat(e),h=e.separatethousands;if(n){var p={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};mt(p),o=(Number(p._tickround)||0)+4,u=p._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return e._numFormat(c)(t).replace(/-/g,I);var f,d=Math.pow(10,-o)/2;if("none"===l&&(u=0),(t=Math.abs(t))<d)t="0",a=!1;else{if(t+=d,u&&(t*=Math.pow(10,-u),o+=u),0===o)t=String(Math.floor(t));else if(o<0){t=(t=String(Math.round(t))).substr(0,t.length+o);for(var m=o;m<0;m++)t+="0"}else{var y=(t=String(t)).indexOf(".")+1;y&&(t=t.substr(0,y+o).replace(/\.?0+$/,""))}t=s.numSeparate(t,e._separators,h)}return u&&"hide"!==l&&(gt(l)&&_t(u)&&(l="power"),f=u<0?I+-u:"power"!==l?"+"+u:String(u),"e"===l||"E"===l?t+=l+f:"power"===l?t+="×10<sup>"+f+"</sup>":"B"===l&&9===u?t+="B":gt(l)&&(t+=vt[u/3+5])),a?I+t:t}function bt(t,e){if(t){var r=Object.keys(B).reduce((function(t,r){return-1!==e.indexOf(r)&&B[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function wt(t,e){for(var r=[],n={},i=0;i<e.length;i++){var a=e[i];n[a.text2]?n[a.text2].push(a.x):n[a.text2]=[a.x]}for(var o in n)r.push(yt(t,s.interp(n[o],.5),o));return r}function Tt(t){return void 0!==t.periodX?t.periodX:t.x}function kt(t){return[t.text,t.x,t.axInfo,t.font,t.fontSize,t.fontColor].join("_")}function Mt(t){var e=t.title.font.size,r=(t.title.text.match(u.BR_TAG_ALL)||[]).length;return t.title.hasOwnProperty("standoff")?r?e*(j+r*V):e*j:r?e*(r+1)*V:e}function At(t,e){var r=t.l2p(e);return r>1&&r<t._length-1}function St(t){var e=n.select(t),r=e.select(".text-math-group");return r.empty()?e.select("text"):r}function Lt(t){return t._id+".automargin"}function Ct(t){return Lt(t)+".mirror"}function Pt(t){return t._id+".rangeslider"}function It(t,e){for(var r=0;r<e.length;r++)-1===t.indexOf(e[r])&&t.push(e[r])}function Et(t,e,r){var n,i,a=[],o=[],l=t.layout;for(n=0;n<e.length;n++)a.push(H.getFromId(t,e[n]));for(n=0;n<r.length;n++)o.push(H.getFromId(t,r[n]));var u=Object.keys(f),c=["anchor","domain","overlaying","position","side","tickangle","editType"],h=["linear","log"];for(n=0;n<u.length;n++){var p=u[n],d=a[0][p],m=o[0][p],y=!0,v=!1,g=!1;if("_"!==p.charAt(0)&&"function"!=typeof d&&-1===c.indexOf(p)){for(i=1;i<a.length&&y;i++){var _=a[i][p];"type"===p&&-1!==h.indexOf(d)&&-1!==h.indexOf(_)&&d!==_?v=!0:_!==d&&(y=!1)}for(i=1;i<o.length&&y;i++){var x=o[i][p];"type"===p&&-1!==h.indexOf(m)&&-1!==h.indexOf(x)&&m!==x?g=!0:o[i][p]!==m&&(y=!1)}y&&(v&&(l[a[0]._name].type="linear"),g&&(l[o[0]._name].type="linear"),Dt(l,p,a,o,t._fullLayout._dfltTitle))}}for(n=0;n<t._fullLayout.annotations.length;n++){var b=t._fullLayout.annotations[n];-1!==e.indexOf(b.xref)&&-1!==r.indexOf(b.yref)&&s.swapAttrs(l.annotations[n],["?"])}}function Dt(t,e,r,n,i){var a,o=s.nestedProperty,l=o(t[r[0]._name],e).get(),u=o(t[n[0]._name],e).get();for("title"===e&&(l&&l.text===i.x&&(l.text=i.y),u&&u.text===i.y&&(u.text=i.x)),a=0;a<r.length;a++)o(t,r[a]._name+"."+e).set(u);for(a=0;a<n.length;a++)o(t,n[a]._name+"."+e).set(l)}function zt(t){return"angularaxis"===t._id}function Ot(t,e){for(var r=e._rangebreaks.length,n=0;n<r;n++){var i=e._rangebreaks[n];if(t>=i.min&&t<i.max)return i.max}return t}function Rt(t){return-1!==(t.ticklabelposition||"").indexOf("inside")}function Ft(t,e){Rt(t._anchorAxis||{})&&t._hideCounterAxisInsideTickLabels&&t._hideCounterAxisInsideTickLabels(e)}function Bt(t,e,r,n){var i,a="free"===t.anchor||void 0!==t.overlaying&&!1!==t.overlaying?t.overlaying:t._id;i=n?"right"===t.side?e:-e:e,a in r||(r[a]={}),t.side in r[a]||(r[a][t.side]=0),r[a][t.side]+=i}H.getTickFormat=function(t){var e,r,n,i,a,o,s,l;function u(t){return"string"!=typeof t?t:Number(t.replace("M",""))*T}function c(t,e){var r=["L","D"];if(typeof t==typeof e){if("number"==typeof t)return t-e;var n=r.indexOf(t.charAt(0)),i=r.indexOf(e.charAt(0));return n===i?Number(t.replace(/(L|D)/g,""))-Number(e.replace(/(L|D)/g,"")):n-i}return"number"==typeof t?1:-1}function h(t,e){var r=null===e[0],n=null===e[1],i=c(t,e[0])>=0,a=c(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&(i=t.dtick,o=void 0,void 0,void 0,o=u||function(t){return t},s=(a=n.dtickrange)[0],l=a[1],(!s&&"number"!=typeof s||o(s)<=o(i))&&(!l&&"number"!=typeof l||o(l)>=o(i)))){r=n;break}break;case"log":for(e=0;e<t.tickformatstops.length;e++)if((n=t.tickformatstops[e]).enabled&&h(t.dtick,n.dtickrange)){r=n;break}}return r?r.value:t.tickformat},H.getSubplots=function(t,e){var r=t._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=e?H.findSubplotsWithAxis(n,e):n;return i.sort((function(t,e){var r=t.substr(1).split("y"),n=e.substr(1).split("y");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),i},H.findSubplotsWithAxis=function(t,e){for(var r=new RegExp("x"===e._id.charAt(0)?"^"+e._id+"y":e._id+"$"),n=[],i=0;i<t.length;i++){var a=t[i];r.test(a)&&n.push(a)}return n},H.makeClipPaths=function(t){var e=t._fullLayout;if(!e._hasOnlyLargeSploms){var r,i,a={_offset:0,_length:e.width,_id:""},o={_offset:0,_length:e.height,_id:""},s=H.list(t,"x",!0),l=H.list(t,"y",!0),u=[];for(r=0;r<s.length;r++)for(u.push({x:s[r],y:o}),i=0;i<l.length;i++)0===r&&u.push({x:a,y:l[i]}),u.push({x:s[r],y:l[i]});var c=e._clips.selectAll(".axesclip").data(u,(function(t){return t.x._id+t.y._id}));c.enter().append("clipPath").classed("axesclip",!0).attr("id",(function(t){return"clip"+e._uid+t.x._id+t.y._id})).append("rect"),c.exit().remove(),c.each((function(t){n.select(this).select("rect").attr({x:t.x._offset||0,y:t.y._offset||0,width:t.x._length||1,height:t.y._length||1})}))}},H.draw=function(t,e,r){var n=t._fullLayout;"redraw"===e&&n._paper.selectAll("g.subplot").each((function(t){var e=t[0],r=n._plots[e];if(r){var i=r.xaxis,a=r.yaxis;r.xaxislayer.selectAll("."+i._id+"tick").remove(),r.yaxislayer.selectAll("."+a._id+"tick").remove(),r.xaxislayer.selectAll("."+i._id+"tick2").remove(),r.yaxislayer.selectAll("."+a._id+"tick2").remove(),r.xaxislayer.selectAll("."+i._id+"divider").remove(),r.yaxislayer.selectAll("."+a._id+"divider").remove(),r.minorGridlayer&&r.minorGridlayer.selectAll("path").remove(),r.gridlayer&&r.gridlayer.selectAll("path").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+i._id+"title").remove(),n._infolayer.select(".g-"+a._id+"title").remove()}}));var i=e&&"redraw"!==e?e:H.listIds(t),a=H.list(t).filter((function(t){return t.autoshift})).map((function(t){return t.overlaying}));i.map((function(e){var r=H.getFromId(t,e);if("sync"===r.tickmode&&r.overlaying){var n=i.findIndex((function(t){return t===r.overlaying}));n>=0&&i.unshift(i.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=H.getFromId(t,e);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=H.drawOne(t,n,r);return n._shiftPusher&&Bt(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},H.drawOne=function(t,e,r){var n,i,l,u=(r=r||{}).axShifts||{},f=r.overlayingShiftedAx||[];e.setScale();var d=t._fullLayout,m=e._id,y=m.charAt(0),v=H.counterLetter(m),g=d._plots[e._mainSubplot];if(g){if(e._shiftPusher=e.autoshift||-1!==f.indexOf(e._id)||-1!==f.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var _=e.linewidth/2||0;"inside"===e.ticks&&(_+=e.ticklen),Bt(e,_,u,!0),Bt(e,e.shift||0,u,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,u));var x=g[y+"axislayer"],b=e._mainLinePosition,w=b+=e._shift,T=e._mainMirrorPosition,k=e._vals=H.calcTicks(e),M=[e.mirror,w,T].join("_");for(n=0;n<k.length;n++)k[n].axInfo=M;e._selections={},e._tickAngles&&(e._prevTickAngles=e._tickAngles),e._tickAngles={},e._depth=null;var A={};if(e.visible){var S,L,C=H.makeTransTickFn(e),P=H.makeTransTickLabelFn(e),I="inside"===e.ticks,E="outside"===e.ticks;if("boundaries"===e.tickson){var D=function(t,e){var r,n=[],i=function(t,e){var r=t.xbnd[e];null!==r&&n.push(s.extendFlat({},t,{x:r}))};if(e.length){for(r=0;r<e.length;r++)i(e[r],0);i(e[r-1],1)}return n}(0,k);L=H.clipEnds(e,D),S=I?L:D}else L=H.clipEnds(e,k),S=I&&"period"!==e.ticklabelmode?L:k;var z,O=e._gridVals=L,R=function(t,e){var r,n,i=[],a=e.length&&e[e.length-1].x<e[0].x,o=function(t,e){var r=t.xbnd[e];null!==r&&i.push(s.extendFlat({},t,{x:r}))};if(t.showdividers&&e.length){for(r=0;r<e.length;r++){var l=e[r];l.text2!==n&&o(l,a?1:0),n=l.text2}o(e[r-1],a?0:1)}return i}(e,k);if(!d._hasOnlyLargeSploms){var F=e._subplotsWith,B={};for(n=0;n<F.length;n++){i=F[n];var N=(l=d._plots[i])[v+"axis"],U=N._mainAxis._id;if(!B[U]){B[U]=1;var j="x"===y?"M0,"+N._offset+"v"+N._length:"M"+N._offset+",0h"+N._length;H.drawGrid(t,e,{vals:O,counterAxis:N,layer:l.gridlayer.select("."+m),minorLayer:l.minorGridlayer.select("."+m),path:j,transFn:C}),H.drawZeroLine(t,e,{counterAxis:N,layer:l.zerolinelayer,path:j,transFn:C})}}}var G=H.getTickSigns(e),Z=H.getTickSigns(e,"minor");if(e.ticks||e.minor&&e.minor.ticks){var Y,W,X,J,K=H.makeTickPath(e,w,G[2]),Q=H.makeTickPath(e,w,Z[2],{minor:!0});if(e._anchorAxis&&e.mirror&&!0!==e.mirror?(Y=H.makeTickPath(e,T,G[3]),W=H.makeTickPath(e,T,Z[3],{minor:!0}),X=K+Y,J=Q+W):(Y="",W="",X=K,J=Q),e.showdividers&&E&&"boundaries"===e.tickson){var $={};for(n=0;n<R.length;n++)$[R[n].x]=1;z=function(t){return $[t.x]?Y:X}}else z=function(t){return t.minor?J:X}}if(H.drawTicks(t,e,{vals:S,layer:x,path:z,transFn:C}),"allticks"===e.mirror){var tt=Object.keys(e._linepositions||{});for(n=0;n<tt.length;n++){i=tt[n],l=d._plots[i];var et=e._linepositions[i]||[],rt=et[0],nt=et[1],it=et[2],at=H.makeTickPath(e,rt,it?G[0]:Z[0],{minor:it})+H.makeTickPath(e,nt,it?G[1]:Z[1],{minor:it});H.drawTicks(t,e,{vals:S,layer:l[y+"axislayer"],path:at,transFn:C})}}var ot=[];if(ot.push((function(){return H.drawLabels(t,e,{vals:k,layer:x,plotinfo:l,transFn:P,labelFns:H.makeLabelFns(e,w)})})),"multicategory"===e.type){var st={x:2,y:10}[y];ot.push((function(){var r={x:"height",y:"width"}[y],n=ut()[r]+st+(e._tickAngles[m+"tick"]?e.tickfont.size*V:0);return H.drawLabels(t,e,{vals:wt(e,k),layer:x,cls:m+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:C,labelFns:H.makeLabelFns(e,w+n*G[4])})})),ot.push((function(){return e._depth=G[4]*(ut("tick2")[e.side]-w),function(t,e,r){var n=e._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,kt);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(h.stroke,e.dividercolor).style("stroke-width",p.crispRound(t,e.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}(t,e,{vals:R,layer:x,path:H.makeTickPath(e,w,G[4],{len:e._depth}),transFn:C})}))}else e.title.hasOwnProperty("standoff")&&ot.push((function(){e._depth=G[4]*(ut()[e.side]-w)}));var lt=o.getComponentMethod("rangeslider","isVisible")(e);return r.skipTitle||lt&&"bottom"===e.side||ot.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty("standoff"))r=e._depth+e.title.standoff+Mt(e);else{var s=Rt(e);if("multicategory"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,"outside"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+="x"===a?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var u,h,f,d,m=H.getPxPosition(t,e);if("x"===a?(h=e._offset+e._length/2,f="top"===e.side?m-r:m+r):(f=e._offset+e._length/2,h="right"===e.side?m+r:m-r,u={rotate:"-90",offset:0}),"multicategory"!==e.type){var y=e._selections[e._id+"tick"];if(d={selection:y,side:e.side},y&&y.node()&&y.node().parentNode){var v=p.getTranslate(y.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return e._titleStandoff=r,c.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:d,transform:u,attributes:{x:h,y:f,"text-anchor":"middle"}})}(t,e)})),ot.push((function(){var r,n,i,s,l=e.side.charAt(0),u=q[e.side].charAt(0),c=H.getPxPosition(t,e),h=E?e.ticklen:0;(e.automargin||lt||e._shiftPusher)&&("multicategory"===e.type?r=ut("tick2"):(r=ut(),"x"===y&&"b"===l&&(e._depth=Math.max(r.width>0?r.bottom-c:0,h))));var p=0,f=0;if(e._shiftPusher&&(p=Math.max(h,r.height>0?"l"===l?c-r.left:r.right-c:0),e.title.text!==d._dfltTitle[y]&&(f=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(f+=Mt(e))),e._fullDepth=Math.max(p,f)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var m=[0,1],g="number"==typeof e._shift?e._shift:0;if("x"===y){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?c-r.top:0,h),m.reverse()),r.width>0){var _=r.right-(e._offset+e._length);_>0&&(n.xr=1,n.r=_);var x=e._offset-r.left;x>0&&(n.xl=0,n.l=x)}}else if("l"===l?(e._depth=Math.max(r.height>0?c-r.left:0,h),n[l]=e._depth-g):(e._depth=Math.max(r.height>0?r.right-c:0,h),n[l]=e._depth+g,m.reverse()),r.height>0){var b=r.bottom-(e._offset+e._length);b>0&&(n.yb=0,n.b=b);var w=e._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[v]="free"===e.anchor?e.position:e._anchorAxis.domain[m[0]],e.title.text!==d._dfltTitle[y]&&(n[l]+=Mt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||"ticks"===e.mirror?i[v]=e._anchorAxis.domain[m[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[v]=[e._counterDomainMin,e._counterDomainMax][m[1]]))}lt&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(bt(n,e.automargin),bt(i,e.automargin)),a.autoMargin(t,Lt(e),n),a.autoMargin(t,Ct(e),i),a.autoMargin(t,Pt(e),s)})),s.syncOrAsync(ot)}}function ut(t){var r=m+(t||"tick");return A[r]||(A[r]=function(t,e,r){var n,i,a,o;if(t._selections[e].size())n=1/0,i=-1/0,a=1/0,o=-1/0,t._selections[e].each((function(){var t=St(this),e=p.bBox(t.node().parentNode);n=Math.min(n,e.top),i=Math.max(i,e.bottom),a=Math.min(a,e.left),o=Math.max(o,e.right)}));else{var s=H.makeLabelFns(t,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(e,r,w)),A[r]}},H.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},H.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},H.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=t.side,c=l?(t.tickwidth||0)/2:0,h=3,p=t.tickfont?t.tickfont.size:12;return(o||n)&&(c+=p*j,h+=(t.linewidth||0)/2),(i||a)&&(c+=(t.linewidth||0)/2,h+=3),s&&"top"===u&&(h-=p*(1-j)),(i||n)&&(c=-c),"bottom"!==u&&"right"!==u||(h=-h),[l?c:0,s?h:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(Tt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(Tt(e)))}},H.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===o?"M0,"+(e+s*r)+"v"+a*r:"M"+(e+s*r)+",0h"+a*r},H.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",a=function(t){return-1!==n.indexOf(t)},o=a("top"),l=a("left"),u=a("right"),c=a("bottom")||l||o||u,h=a("inside"),p="inside"===n&&"inside"===t.ticks||!h&&"outside"===t.ticks&&"boundaries"!==t.tickson,f=0,d=0,m=p?t.ticklen:0;if(h?m*=-1:c&&(m=0),p&&(f+=m,r)){var y=s.deg2rad(r);f=m*Math.cos(y)+1,d=m*Math.sin(y)}t.showticklabels&&(p||t.showline)&&(f+=.2*t.tickfont.size);var v,g,_,x,b,w={labelStandoff:f+=(t.linewidth||1)/2*(h?-1:1),labelShift:d},T=0,k=t.side,M=t._id.charAt(0),A=t.tickangle;if("x"===M)x=(b=!h&&"bottom"===k||h&&"top"===k)?1:-1,h&&(x*=-1),v=d*x,g=e+f*x,_=b?1:-.2,90===Math.abs(A)&&(h?_+=U:_=-90===A&&"bottom"===k?j:90===A&&"top"===k?U:.5,T=U/2*(A/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+g+t.fontSize*_},w.anchorFn=function(t,e){if(c){if(l)return"end";if(u)return"start"}return i(e)&&0!==e&&180!==e?e*x<0!==h?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==h?-n:0};else if("y"===M){if(x=(b=!h&&"left"===k||h&&"right"===k)?1:-1,h&&(x*=-1),v=f,g=d*x,_=0,h||90!==Math.abs(A)||(_=-90===A&&"left"===k||90===A&&"right"===k?j:.5),h){var S=i(A)?+A:0;if(0!==S){var L=s.deg2rad(S);T=Math.abs(Math.sin(L))*j*x,_=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*_)*x+T*t.fontSize},w.yFn=function(t){return t.dy+g+t.fontSize*U},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":b?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},H.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,kt);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return p.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Ft(e,[R]),o.attr("transform",r.transFn)},H.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",a=e.minor&&e.minor.showgrid,o=a?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&H.shouldShowZeroLine(t,e,l))for(var u="array"===e.tickmode,c=0;c<s.length;c++){var f=s[c].x;if(u?!f:Math.abs(f)<e.dtick/100){if(s=s.slice(0,c).concat(s.slice(c+1)),!u)break;c--}}e._gw=p.crispRound(t,e.gridwidth,1);for(var d=a?p.crispRound(t,e.minor.gridwidth,1):0,m=r.layer,y=r.minorLayer,v=1;v>=0;v--){var g=v?m:y;if(g){var _=g.selectAll("path."+i).data(v?s:o,kt);_.exit().remove(),_.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),_.attr("transform",r.transFn).attr("d",r.path).each((function(t){return h.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return p.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?d:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&_.attr("d",r.path)}}Ft(e,[z,O])}},H.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=H.shouldShowZeroLine(t,e,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return Y(t.id,e.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(h.stroke,e.zerolinecolor||h.defaultLine).style("stroke-width",p.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Ft(e,[D])},H.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,c=r.cls||o+"tick",h=r.vals.filter((function(t){return t.text})),f=r.labelFns,d=r.secondary?0:e.tickangle,m=(e._prevTickAngles||{})[c],y=r.layer.selectAll("g."+c).data(e.showticklabels?h:[],kt),v=[];function g(t,a){t.each((function(t){var o=n.select(this),s=o.select(".text-math-group"),c=f.anchorFn(t,a),h=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?" rotate("+a+","+f.xFn(t)+","+(f.yFn(t)-t.fontSize/2)+")":""),d=u.lineCount(o),m=V*t.fontSize,y=f.heightFn(t,i(a)?+a:0,(d-1)*m);if(y&&(h+=l(0,y)),s.empty()){var v=o.select("text");v.attr({transform:h,"text-anchor":c}),v.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var g=p.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",h+l(g,0))}}))}y.enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(u.positionText,f.xFn(e),f.yFn(e)).call(p.font,e.font,e.fontSize,e.fontColor).text(e.text).call(u.convertToTspans,t),t._promises[i]?v.push(t._promises.pop().then((function(){g(r,d)}))):g(r,d)})),Ft(e,[F]),y.exit().remove(),r.repositionOnUpdate&&y.each((function(t){n.select(this).select("text").call(u.positionText,f.xFn(t),f.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===e._id.charAt(0),l=0,u=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var c=s.simpleMap(e.range,e.r2l);l=e.l2p(c[0])+e._offset,u=e.l2p(c[1])+e._offset}var h=Math.min(l,u),f=Math.max(l,u),d=e.side,m=1/0,v=-1/0;for(var g in y.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=p.bBox(r.node()),s=0;o?(a.right>f||a.left<h)&&(s=1):(a.bottom>f||a.top+(e.tickangle?0:t.fontSize/4)<h)&&(s=1);var l=r.select("text");s?i&&l.style("opacity",0):(l.style("opacity",1),m="bottom"===d||"right"===d?Math.min(m,o?a.top:a.left):-1/0,v="top"===d||"left"===d?Math.max(v,o?a.bottom:a.right):1/0)}})),a._plots){var _=a._plots[g];if(e._id===_.xaxis._id||e._id===_.yaxis._id){var x=o?_.yaxis:_.xaxis;x&&(x["_visibleLabelMin_"+e._id]=m,x["_visibleLabelMax_"+e._id]=v)}}}},e._hideCounterAxisInsideTickLabels=function(t){var r="x"===e._id.charAt(0),i=[];for(var o in a._plots){var s=a._plots[o];e._id!==s.xaxis._id&&e._id!==s.yaxis._id||i.push(r?s.yaxis:s.xaxis)}i.forEach((function(r,i){r&&Rt(r)&&(t||[D,O,z,R,F]).forEach((function(t){var o="tick"===t.K&&"text"===t.L&&"period"===e.ticklabelmode,s=a._plots[e._mainSubplot];(t.K===D.K?s.zerolinelayer.selectAll("."+e._id+"zl"):t.K===O.K?s.minorGridlayer.selectAll("."+e._id):t.K===z.K?s.gridlayer.selectAll("."+e._id):s[e._id.charAt(0)+"axislayer"]).each((function(){var a=n.select(this);t.L&&(a=a.selectAll(t.L)),a.each((function(a){var s=e.l2p(o?Tt(a):a.x)+e._offset,l=n.select(this);s<e["_visibleLabelMax_"+r._id]&&s>e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},g(y,m+1?m:d);var _=null;e._selections&&(e._selections[c]=y);var x=[function(){return v.length&&Promise.all(v)}];e.automargin&&a._redrawFromAutoMarginCount&&90===m?(_=m,x.push((function(){g(y,m)}))):x.push((function(){if(g(y,d),h.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){_=e.autotickangles[0];var t,n=0,i=[],a=1;if(y.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),o=St(this),s=p.bBox(o.node());a=Math.max(a,u.lineCount(o)),i.push({top:0,bottom:10,height:10,left:r-s.width/2,right:r+s.width/2+2,width:s.width+2})})),"boundaries"!==e.tickson&&!e.showdividers||r.secondary){var o=h.length,l=Math.abs((h[o-1].x-h[0].x)*e._m)/(o-1),c=e.ticklabelposition||"",f=function(t){return-1!==c.indexOf(t)},m=f("top"),v=f("left"),x=f("right"),b=f("bottom")||v||m||x?(e.tickwidth||0)+6:0,w=l,T=1.25*n*a,k=w/Math.sqrt(Math.pow(w,2)+Math.pow(T,2)),M=e.autotickangles.map((function(t){return t*Math.PI/180})),A=M.find((function(t){return Math.abs(Math.cos(t))<=k}));void 0===A&&(A=M.reduce((function(t,e){return Math.abs(Math.cos(t))<Math.abs(Math.cos(e))?t:e}),M[0]));var S=A*(180/Math.PI);for(t=0;t<i.length-1;t++)if(s.bBoxIntersect(i[t],i[t+1],b)){_=S;break}}else{var L=2;for(e.ticks&&(L+=e.tickwidth/2),t=0;t<i.length;t++){var C=h[t].xbnd,P=i[t];if(null!==C[0]&&P.left-e.l2p(C[0])<L||null!==C[1]&&e.l2p(C[1])-P.right<L){_=90;break}}}_&&g(y,_)}})),e._tickAngles&&x.push((function(){e._tickAngles[c]=null===_?i(d)?d:0:_}));var b=function(){var t=0,r=0;return y.each((function(n,i){var a,o=St(this);o.select(".text-math-group").empty()&&(e._vals[i]&&(a=e._vals[i].bb||p.bBox(o.node()),e._vals[i].bb=a),t=Math.max(t,a.width),r=Math.max(r,a.height))})),{labelsMaxW:t,labelsMaxH:r}},w=e._anchorAxis;if(w&&(w.autorange||w.insiderange)&&Rt(e)&&!W(a,e._id)&&(a._insideTickLabelsUpdaterange||(a._insideTickLabelsUpdaterange={}),w.autorange&&(a._insideTickLabelsUpdaterange[w._name+".autorange"]=w.autorange,x.push(b)),w.insiderange)){var T=b(),k="y"===e._id.charAt(0)?T.labelsMaxW:T.labelsMaxH;k+=6,"inside"===e.ticklabelposition&&(k+=e.ticklen||0);var M="right"===e.side||"top"===e.side?1:-1,A=1===M?1:0,S=1===M?0:1,L=[];L[S]=w.range[S];var C=w.range,P=w.r2p(C[A]),I=w.r2p(C[S]),E=a._insideTickLabelsUpdaterange[w._name+".range"];if(E){var B=w.r2p(E[A]),N=w.r2p(E[S]),U=M*("y"===e._id.charAt(0)?1:-1);U*P<U*B&&(P=B,L[A]=C[A]=E[A]),U*I>U*N&&(I=N,L[S]=C[S]=E[S])}var j=Math.abs(I-P);j-k>0?k*=1+k/(j-=k):k=0,"y"!==e._id.charAt(0)&&(k=-k),L[A]=w.p2r(w.r2p(C[A])+M*k),"min"===w.autorange||"max reversed"===w.autorange?(L[0]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0):"max"!==w.autorange&&"min reversed"!==w.autorange||(L[1]=null,w._rangeInitial0=void 0,w._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[w._name+".range"]=L}var q=s.syncOrAsync(x);return q&&q.then&&t._promises.push(q),q},H.getPxPosition=function(t,e){var r,n=t._fullLayout._size,i=e._id.charAt(0),a=e.side;return"free"!==e.anchor?r=e._anchorAxis:"x"===i?r={_offset:n.t+(1-(e.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(e.position||0)*n.w+e._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},H.shouldShowZeroLine=function(t,e,r){var n=s.simpleMap(e.range,e.r2l);return n[0]*n[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===E)&&(At(e,0)||!function(t,e,r,n){var i=r._mainAxis;if(i){var a=t._fullLayout,o=e._id.charAt(0),s=H.counterLetter(e._id),l=e._offset+(Math.abs(n[0])<Math.abs(n[1])==("x"===o)?0:e._length),u=a._plots[r._mainSubplot];if(!(u.mainplotinfo||u).overlays.length)return f(r);for(var c=H.list(t,s),h=0;h<c.length;h++){var p=c[h];if(p._mainAxis===i&&f(p))return!0}}function f(t){if(!t.showline||!t.linewidth)return!1;var r=Math.max((t.linewidth+e.zerolinewidth)/2,1);function n(t){return"number"==typeof t&&Math.abs(t-l)<r}if(n(t._mainLinePosition)||n(t._mainMirrorPosition))return!0;var i=t._linepositions||{};for(var a in i)if(n(i[a][0])||n(i[a][1]))return!0}}(t,e,r,n)||function(t,e){for(var r=t._fullData,n=e._mainSubplot,i=e._id.charAt(0),a=0;a<r.length;a++){var s=r[a];if(!0===s.visible&&s.xaxis+s.yaxis===n){if(o.traceIs(s,"bar-like")&&s.orientation==={x:"h",y:"v"}[i])return!0;if(s.fill&&s.fill.charAt(s.fill.length-1)===i)return!0}}return!1}(t,e))},H.clipEnds=function(t,e){return e.filter((function(e){return At(t,e.x)}))},H.allowAutoMargin=function(t){for(var e=H.list(t,"",!0),r=0;r<e.length;r++){var n=e[r];n.automargin&&(a.allowAutoMargin(t,Lt(n)),n.mirror&&a.allowAutoMargin(t,Ct(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&a.allowAutoMargin(t,Pt(n))}},H.swap=function(t,e){for(var r=function(t,e){var r,n,i=[];for(r=0;r<e.length;r++){var a=[],o=t._fullData[e[r]].xaxis,s=t._fullData[e[r]].yaxis;if(o&&s){for(n=0;n<i.length;n++)-1===i[n].x.indexOf(o)&&-1===i[n].y.indexOf(s)||a.push(n);if(a.length){var l,u=i[a[0]];if(a.length>1)for(n=1;n<a.length;n++)l=i[a[n]],It(u.x,l.x),It(u.y,l.y);It(u.x,[o]),It(u.y,[s])}else i.push({x:[o],y:[s]})}}return i}(t,e),n=0;n<r.length;n++)Et(t,r[n].x,r[n].y)}},2976:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(9032).BADNUM,o=i.isArrayOrTypedArray,s=i.isDateTime,l=i.cleanNumber,u=Math.round;function c(t,e){return e?n(t):"number"==typeof t}function h(t){return Math.max(1,(t-1)/1e3)}t.exports=function(t,e,r){var i=t,p=r.noMultiCategory;if(o(i)&&!i.length)return"-";if(!p&&function(t){return o(t[0])&&o(t[1])}(i))return"multicategory";if(p&&Array.isArray(i[0])){for(var f=[],d=0;d<i.length;d++)if(o(i[d]))for(var m=0;m<i[d].length;m++)f.push(i[d][m]);i=f}if(function(t,e){for(var r=t.length,i=h(r),a=0,o=0,l={},c=0;c<r;c+=i){var p=t[u(c)],f=String(p);l[f]||(l[f]=1,s(p,e)&&a++,n(p)&&o++)}return a>2*o}(i,e))return"date";var y="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=h(r),i=0,o=0,s={},c=0;c<r;c+=n){var p=t[u(c)],f=String(p);if(!s[f]){s[f]=1;var d=typeof p;"boolean"===d?o++:(e?l(p)!==a:"number"===d)?i++:"string"===d&&o++}}return o>2*i}(i,y)?"category":function(t,e){for(var r=t.length,n=0;n<r;n++)if(c(t[n],e))return!0;return!1}(i,y)?"linear":"-"}},5955:function(t,e,r){"use strict";var n=r(8248),i=r(4040),a=r(3400),o=r(1780),s=r(1272),l=r(4724),u=r(6332),c=r(5404),h=r(5936),p=r(2568),f=r(4796),d=r(2136),m=r(6312),y=r(8344),v=r(3816).WEEKDAY_PATTERN,g=r(3816).HOUR_PATTERN;function _(t,e,r){function i(r,n){return a.coerce(t,e,l.rangebreaks,r,n)}if(i("enabled")){var o=i("bounds");if(o&&o.length>=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=b(o[s])){c=v;break}var h=i("pattern",c);if(h===v)for(s=0;s<2;s++)(u=b(o[s]))&&(e.bounds[s]=o[s]=u-1);if(h)for(s=0;s<2;s++)switch(u=o[s],h){case v:if(!n(u))return void(e.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=u;break;case g:if(!n(u))return void(e.enabled=!1);if((u=+u)<0||u>24)return void(e.enabled=!1);e.bounds[s]=o[s]=u}if(!1===r.autorange){var p=r.range;if(p[0]<p[1]){if(o[0]<p[0]&&o[1]>p[1])return void(e.enabled=!1)}else if(o[0]>p[0]&&o[1]<p[1])return void(e.enabled=!1)}}else{var f=i("values");if(!f||!f.length)return void(e.enabled=!1);i("dvalue")}}}t.exports=function(t,e,r,n,g){var x,b=n.letter,w=n.font||{},T=n.splomStash||{},k=r("visible",!n.visibleDflt),M=e._template||{},A=e.type||M.type||"-";"date"===A&&(i.getComponentMethod("calendars","handleDefaults")(t,e,"calendar",n.calendar),n.noTicklabelmode||(x=r("ticklabelmode")));var S="";n.noTicklabelposition&&"multicategory"!==A||(S=a.coerce(t,e,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===x?["outside","inside"]:"x"===b?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||r("ticklabeloverflow",-1!==S.indexOf("inside")?"hide past domain":"category"===A||"multicategory"===A?"allow":"hide past div"),y(e,g),m(t,e,r,n),f(t,e,r,n),"category"===A||n.noHover||r("hoverformat");var L=r("color"),C=L!==l.color.dflt?L:w.color,P=T.label||g._dfltTitle[b];if(p(t,e,r,A,n),!k)return e;r("title.text",P),a.coerceFont(r,"title.font",{family:w.family,size:a.bigFont(w.size),color:C}),u(t,e,r,A);var I=n.hasMinor;if(I&&(o.newContainer(e,"minor"),u(t,e,r,A,{isMinor:!0})),h(t,e,r,A,n),c(t,e,r,n),I){var E=n.isMinor;n.isMinor=!0,c(t,e,r,n),n.isMinor=E}d(t,e,r,{dfltColor:L,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:I,attributes:l}),!I||e.minor.ticks||e.minor.showgrid||delete e.minor,(e.showline||e.ticks)&&r("mirror");var D,z="multicategory"===A;if(n.noTickson||"category"!==A&&!z||!e.ticks&&!e.showgrid||(z&&(D="boundaries"),"boundaries"===r("tickson",D)&&delete e.ticklabelposition),z&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),"date"===A)if(s(t,e,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:_}),e.rangebreaks.length){for(var O=0;O<e.rangebreaks.length;O++)if(e.rangebreaks[O].pattern===v){e._hasDayOfWeekBreaks=!0;break}if(y(e,g),g._has("scattergl")||g._has("splom"))for(var R=0;R<n.data.length;R++){var F=n.data[R];"scattergl"!==F.type&&"splom"!==F.type||(F.visible=!1,a.warn(F.type+" traces do not work on axes with rangebreaks. Setting trace "+F.index+" to `visible: false`."))}}else delete e.rangebreaks;return e};var x={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function b(t){if("string"==typeof t)return x[t.substr(0,3).toLowerCase()]}},9736:function(t,e,r){"use strict";var n=r(6880),i=n.FORMAT_LINK,a=n.DATE_FORMAT_LINK;function o(t,e){return["Sets the "+t+" formatting rule"+(e?"for `"+e+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+i+"."].join(" ")}function s(t,e){return o(t,e)+[" And for dates see: "+a+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}t.exports={axisHoverFormat:function(t,e){return{valType:"string",dflt:"",editType:"none",description:(e?o:s)("hover text",t)+["By default the values are formatted using "+(e?"generic number format":"`"+t+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:o,descriptionWithDates:s}},9811:function(t,e,r){"use strict";var n=r(4040),i=r(3816);function a(t,e){if(e&&e.length)for(var r=0;r<e.length;r++)if(e[r][t])return!0;return!1}e.id2name=function(t){if("string"==typeof t&&t.match(i.AX_ID_PATTERN)){var e=t.split(" ")[0].substr(1);return"1"===e&&(e=""),t.charAt(0)+"axis"+e}},e.name2id=function(t){if(t.match(i.AX_NAME_PATTERN)){var e=t.substr(5);return"1"===e&&(e=""),t.charAt(0)+e}},e.cleanId=function(t,e,r){var n=/( domain)$/.test(t);if("string"==typeof t&&t.match(i.AX_ID_PATTERN)&&(!e||t.charAt(0)===e)&&(!n||r)){var a=t.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===a&&(a=""),t.charAt(0)+a+(n&&r?" domain":"")}},e.list=function(t,r,n){var i=t._fullLayout;if(!i)return[];var a,o=e.listIds(t,r),s=new Array(o.length);for(a=0;a<o.length;a++){var l=o[a];s[a]=i[l.charAt(0)+"axis"+l.substr(1)]}if(!n){var u=i._subplots.gl3d||[];for(a=0;a<u.length;a++){var c=i[u[a]];r?s.push(c[r+"axis"]):s.push(c.xaxis,c.yaxis,c.zaxis)}}return s},e.listIds=function(t,e){var r=t._fullLayout;if(!r)return[];var n=r._subplots;return e?n[e+"axis"]:n.xaxis.concat(n.yaxis)},e.getFromId=function(t,r,n){var i=t._fullLayout;return r=void 0===r||"string"!=typeof r?r:r.replace(" domain",""),"x"===n?r=r.replace(/y[0-9]*/,""):"y"===n&&(r=r.replace(/x[0-9]*/,"")),i[e.id2name(r)]},e.getFromTrace=function(t,r,i){var a=t._fullLayout,o=null;if(n.traceIs(r,"gl3d")){var s=r.scene;"scene"===s.substr(0,5)&&(o=a[s][i+"axis"])}else o=e.getFromId(t,r[i+"axis"]||i);return o},e.idSort=function(t,e){var r=t.charAt(0),n=e.charAt(0);return r!==n?r>n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},4796:function(t,e,r){"use strict";var n=r(8116).isTypedArraySpec;t.exports=function(t,e,r,i){if("category"===e.type){var a,o=t.categoryarray,s=Array.isArray(o)&&o.length>0||n(o);s&&(a="array");var l,u=r("categoryorder",a);"array"===u&&(l=r("categoryarray")),s||"array"!==u||(u=e.categoryorder="trace"),"trace"===u?e._initialCategories=[]:"array"===u?e._initialCategories=l.slice():(l=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;n<e.data.length;n++){var s=e.data[n];s[a+"axis"]===t._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][a];for(i=0;i<l.length;i++){var u=l[i];null!=u&&(o[u]=1)}}return Object.keys(o)}(e,i).sort(),"category ascending"===u?e._initialCategories=l:"category descending"===u&&(e._initialCategories=l.reverse()))}}},8728:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(9032),o=a.ONEDAY,s=a.ONEWEEK;e.dtick=function(t,e){var r="log"===e,i="date"===e,a="category"===e,s=i?o:1;if(!t)return s;if(n(t))return(t=Number(t))<=0?s:a?Math.max(1,Math.round(t)):i?Math.max(.1,t):t;if("string"!=typeof t||!i&&!r)return s;var l=t.charAt(0),u=t.substr(1);return(u=n(u)?Number(u):0)<=0||!(i&&"M"===l&&u===Math.round(u)||r&&"L"===l||r&&"D"===l&&(1===u||2===u))?s:t},e.tick0=function(t,e,r,a){return"date"===e?i.cleanDate(t,i.dateTick0(r,a%s==0?1:0)):"D1"!==a&&"D2"!==a?n(t)?Number(t):0:void 0}},3816:function(t,e,r){"use strict";var n=r(3756).counter;t.exports={idRegex:{x:n("x","( domain)?"),y:n("y","( domain)?")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},1888:function(t,e,r){"use strict";var n=r(3400),i=r(9280),a=r(9811).id2name,o=r(4724),s=r(1160),l=r(8344),u=r(9032).ALMOST_EQUAL,c=r(4284).FROM_BL;function h(t,e,r){var i=r.axIds,s=r.layoutOut,l=r.hasImage,u=s._axisConstraintGroups,c=s._axisMatchGroups,h=e._id,m=h.charAt(0),y=((s._splomAxes||{})[m]||{})[h]||{},v=e._id,g="x"===v.charAt(0);function _(r,i){return n.coerce(t,e,o,r,i)}e._matchGroup=null,e._constraintGroup=null,_("constrain",l?"domain":"range"),n.coerce(t,e,{constraintoward:{valType:"enumerated",values:g?["left","center","right"]:["bottom","middle","top"],dflt:g?"center":"middle"}},"constraintoward");var x,b,w=e.type,T=[];for(x=0;x<i.length;x++)(b=i[x])!==v&&s[a(b)].type===w&&T.push(b);var k=f(u,v);if(k){var M=[];for(x=0;x<T.length;x++)k[b=T[x]]||M.push(b);T=M}var A,S,L=T.length;L&&(t.matches||y.matches)&&(A=n.coerce(t,e,{matches:{valType:"enumerated",values:T,dflt:-1!==T.indexOf(y.matches)?y.matches:void 0}},"matches"));var C=l&&!g?e.anchor:void 0;if(L&&!A&&(t.scaleanchor||C)&&(S=n.coerce(t,e,{scaleanchor:{valType:"enumerated",values:T.concat([!1])}},"scaleanchor",C)),A){e._matchGroup=d(c,v,A,1);var P=s[a(A)],I=p(s,e)/p(s,P);g!==("x"===A.charAt(0))&&(I=(g?"x":"y")+I),d(u,v,A,I)}else t.matches&&-1!==i.indexOf(t.matches)&&n.warn("ignored "+e._name+'.matches: "'+t.matches+'" to avoid an infinite loop');if(S){var E=_("scaleratio");E||(E=e.scaleratio=1),d(u,v,S,E)}else t.scaleanchor&&-1!==i.indexOf(t.scaleanchor)&&n.warn("ignored "+e._name+'.scaleanchor: "'+t.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function p(t,e){var r=e.domain;return r||(r=t[a(e.overlaying)].domain),r[1]-r[0]}function f(t,e){for(var r=0;r<t.length;r++)if(t[r][e])return t[r];return null}function d(t,e,r,n){var i,a,o,s,l,u=f(t,e);null===u?((u={})[e]=1,l=t.length,t.push(u)):l=t.indexOf(u);var c=Object.keys(u);for(i=0;i<t.length;i++)if(o=t[i],i!==l&&o[r]){var h=o[r];for(a=0;a<c.length;a++)o[s=c[a]]=m(h,m(n,u[s]));return void t.splice(l,1)}if(1!==n)for(a=0;a<c.length;a++){var p=c[a];u[p]=m(n,u[p])}u[r]=1}function m(t,e){var r,n,i="",a="";"string"==typeof t&&(r=(i=t.match(/^[xy]*/)[0]).length,t=+t.substr(r)),"string"==typeof e&&(n=(a=e.match(/^[xy]*/)[0]).length,e=+e.substr(n));var o=t*e;return r||n?r&&n&&i.charAt(0)!==a.charAt(0)?r===n?o:(r>n?i.substr(n):a.substr(r))+o:i+a+t*e:o}function y(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;o<a.length;o++){var s=a[o],l=t[s];if("string"==typeof l){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.substr(c);for(var h="y"===u.charAt(0)?n:1/n,p=0;p<c;p++)l*=h}i[s]=l}return i}function v(t,e){var r=t._inputDomain,n=c[t.constraintoward],i=r[0]+(r[1]-r[0])*n;t.domain=t._input.domain=[i+(r[0]-i)/e,i+(r[1]-i)/e],t.setScale()}e.handleDefaults=function(t,e,r){var i,o,s,u,c,p,f,d,m=r.axIds,y=r.axHasImage,v=e._axisConstraintGroups=[],g=e._axisMatchGroups=[];for(i=0;i<m.length;i++)h(c=t[u=a(m[i])],p=e[u],{axIds:m,layoutOut:e,hasImage:y[u]});function _(t,r){for(i=0;i<t.length;i++)for(s in o=t[i])e[a(s)][r]=o}for(_(g,"_matchGroup"),i=0;i<v.length;i++)for(s in o=v[i])if((p=e[a(s)]).fixedrange){for(var x in o){var b=a(x);!1===(t[b]||{}).fixedrange&&n.warn("fixedrange was specified as false for axis "+b+" but was overridden because another axis in its constraint group has fixedrange true"),e[b].fixedrange=!0}break}for(i=0;i<v.length;){for(s in o=v[i]){(p=e[a(s)])._matchGroup&&Object.keys(p._matchGroup).length===Object.keys(o).length&&(v.splice(i,1),i--);break}i++}_(v,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],T=!1,k=!1;function M(){d=p[f],"rangebreaks"===f&&(k=p._hasDayOfWeekBreaks)}for(i=0;i<g.length;i++){o=g[i];for(var A=0;A<w.length;A++){var S;for(s in f=w[A],d=null,o)if(c=t[u=a(s)],p=e[u],f in p){if(!p.matches&&(S=p,f in c)){M();break}null===d&&f in c&&M()}if("range"===f&&d&&c.range&&2===c.range.length&&null!==c.range[0]&&null!==c.range[1]&&(T=!0),"autorange"===f&&null===d&&T&&(d=!1),null===d&&f in S&&(d=S[f]),null!==d)for(s in o)(p=e[a(s)])[f]="range"===f?d.slice():d,"rangebreaks"===f&&(p._hasDayOfWeekBreaks=k,l(p,e))}}},e.enforce=function(t){var e,r,n,o,l,c,h,p,f=t._fullLayout,d=f._axisConstraintGroups||[];for(e=0;e<d.length;e++){n=y(d[e],f);var m=Object.keys(n),g=1/0,_=0,x=1/0,b={},w={},T=!1;for(r=0;r<m.length;r++)w[o=m[r]]=l=f[a(o)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),b[o]=c=Math.abs(l._m)/n[o],g=Math.min(g,c),"domain"!==l.constrain&&l._constraintShrinkable||(x=Math.min(x,c)),delete l._constraintShrinkable,_=Math.max(_,c),"domain"===l.constrain&&(T=!0);if(!(g>u*_)||T)for(r=0;r<m.length;r++)if(c=b[o=m[r]],h=(l=w[o]).constrain,c!==x||"domain"===h)if(p=c/x,"range"===h)s(l,p);else{var k=l._inputDomain,M=(l.domain[1]-l.domain[0])/(k[1]-k[0]),A=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if((p/=M)*A<1){l.domain=l._input.domain=k.slice(),s(l,p);continue}if(A<1&&(l.range=l._input.range=l._inputRange.slice(),p*=A),l.autorange){var S=l.r2l(l.range[0]),L=l.r2l(l.range[1]),C=(S+L)/2,P=C,I=C,E=Math.abs(L-C),D=C-E*p*1.0001,z=C+E*p*1.0001,O=i.makePadFn(f,l,0),R=i.makePadFn(f,l,1);v(l,p);var F,B,N=Math.abs(l._m),U=i.concatExtremes(t,l),j=U.min,V=U.max;for(B=0;B<j.length;B++)(F=j[B].val-O(j[B])/N)>D&&F<P&&(P=F);for(B=0;B<V.length;B++)(F=V[B].val+R(V[B])/N)<z&&F>I&&(I=F);p/=(I-P)/(2*E),P=l.l2r(P),I=l.l2r(I),l.range=l._input.range=S<L?[P,I]:[I,P]}v(l,p)}}},e.getAxisGroup=function(t,e){for(var r=t._axisMatchGroups,n=0;n<r.length;n++)if(r[n][e])return"g"+n;return e},e.clean=function(t,e){if(e._inputDomain){for(var r=!1,n=e._id,i=t._fullLayout._axisConstraintGroups,a=0;a<i.length;a++)if(i[a][n]){r=!0;break}r&&"domain"===e.constrain||(e._input.domain=e.domain=e._inputDomain,delete e._inputDomain)}}},1184:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=i.numberFormat,o=r(9760),s=r(9184),l=r(4040),u=i.strTranslate,c=r(2736),h=r(6308),p=r(3616),f=r(3024),d=r(4460),m=r(3972),y=r(6476),v=r(2760),g=v.selectingOrDrawing,_=v.freeMode,x=r(4284).FROM_TL,b=r(3696),w=r(9172).redrawReglTraces,T=r(7316),k=r(9811).getFromId,M=r(2676).prepSelect,A=r(2676).clearOutline,S=r(2676).selectOnClick,L=r(1160),C=r(3816),P=C.MINDRAG,I=C.MINZOOM,E=!0;function D(t,e,r,n){var a=i.ensureSingle(t.draglayer,e,r,(function(e){e.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",t.id)}));return a.call(m,n),a.node()}function z(t,e,r,i,a,o,s){var l=D(t,"rect",e,r);return n.select(l).call(p.setRect,i,a,o,s),l}function O(t,e){for(var r=0;r<t.length;r++)if(!t[r].fixedrange)return e;return""}function R(t,e,r,n,i){for(var a=0;a<t.length;a++){var o=t[a];if(!o.fixedrange)if(o.rangebreaks){var s="y"===o._id.charAt(0),l=s?1-e:e,u=s?1-r:r;n[o._name+".range[0]"]=o.l2r(o.p2l(l*o._length)),n[o._name+".range[1]"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],h=o._rl[1]-c;n[o._name+".range[0]"]=o.l2r(c+h*e),n[o._name+".range[1]"]=o.l2r(c+h*r)}}if(i&&i.length){var p=(e+(1-r))/2;R(i,p,1-p,n,[])}}function F(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(!n.fixedrange){if(n.rangebreaks){var i=n._length,a=(n.p2l(0+e)-n.p2l(0)+(n.p2l(i+e)-n.p2l(i)))/2;n.range=[n.l2r(n._rl[0]-a),n.l2r(n._rl[1]-a)]}else n.range=[n.l2r(n._rl[0]-e/n._m),n.l2r(n._rl[1]-e/n._m)];n.limitRange&&n.limitRange()}}}function B(t){return 1-(t>=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(r,n)).attr("d",i+"Z")}function U(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(e,r)).attr("d","M0,0Z")}function j(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),V(t,e,i,a)}function V(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function q(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(t){E&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),E=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,I)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function Z(t,e,r,n,a){for(var o,s,l,u,c=!1,h={},p={},f=(a||{}).xaHash,d=(a||{}).yaHash,m=0;m<e.length;m++){var y=e[m];for(o in r)if(y[o]){for(l in y)a&&(f[l]||d[l])||("x"===l.charAt(0)?r:n)[l]||(h[l]=o);for(s in n)a&&(f[s]||d[s])||!y[s]||(c=!0)}for(s in n)if(y[s])for(u in y)a&&(f[u]||d[u])||("x"===u.charAt(0)?r:n)[u]||(p[u]=s)}c&&(i.extendFlat(h,p),p={});var v={},g=[];for(l in h){var _=k(t,l);g.push(_),v[_._id]=_}var x={},b=[];for(u in p){var w=k(t,u);b.push(w),x[w._id]=w}return{xaHash:v,yaHash:x,xaxes:g,yaxes:b,xLinks:h,yLinks:p,isSubplotConstrained:c}}function Y(t,e){if(s){var r=void 0!==t.onwheel?"wheel":"mousewheel";t._onwheel&&t.removeEventListener(r,t._onwheel),t._onwheel=e,t.addEventListener(r,e,{passive:!1})}else void 0!==t.onwheel?t.onwheel=e:void 0!==t.onmousewheel?t.onmousewheel=e:t.isAddedWheelEvent||(t.isAddedWheelEvent=!0,t.addEventListener("wheel",e,{passive:!1}))}function W(t){var e=[];for(var r in t)e.push(t[r]);return e}t.exports={makeDragBox:function(t,e,r,s,u,h,m,v){var E,D,V,X,J,K,Q,$,tt,et,rt,nt,it,at,ot,st,lt,ut,ct,ht,pt,ft,dt,mt=t._fullLayout._zoomlayer,yt=m+v==="nsew",vt=1===(m+v).length;function gt(){if(E=e.xaxis,D=e.yaxis,tt=E._length,et=D._length,Q=E._offset,$=D._offset,(V={})[E._id]=E,(X={})[D._id]=D,m&&v)for(var r=e.overlays,n=0;n<r.length;n++){var i=r[n].xaxis;V[i._id]=i;var a=r[n].yaxis;X[a._id]=a}J=W(V),K=W(X),it=O(J,v),at=O(K,m),ot=!at&&!it,nt=Z(t,t._fullLayout._axisMatchGroups,V,X);var o=(rt=Z(t,t._fullLayout._axisConstraintGroups,V,X,nt)).isSubplotConstrained||nt.isSubplotConstrained;st=v||o,lt=m||o;var s=t._fullLayout;ut=s._has("scattergl"),ct=s._has("splom"),ht=s._has("svg")}r+=e.yaxis._shift,gt();var _t=function(t,e,r){return t?"nsew"===t?r?"":"pan"===e?"move":"crosshair":t.toLowerCase()+"-resize":"pointer"}(at+it,t._fullLayout.dragmode,yt),xt=z(e,m+v+"drag",_t,r,s,u,h);if(ot&&!yt)return xt.onmousedown=null,xt.style.pointerEvents="none",xt;var bt,wt,Tt,kt,Mt,At,St,Lt,Ct,Pt,It={element:xt,gd:t,plotinfo:e};function Et(){It.plotinfo.selection=!1,A(t)}function Dt(t,r){var i=It.gd;if(i._fullLayout._activeShapeIndex>=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(q(i),2!==t||vt||Ht(),yt)o.indexOf("select")>-1&&S(r,i,J,K,e.id,It),o.indexOf("event")>-1&&f.click(i,r,e.id);else if(1===t&&vt){var s=m?D:E,u="s"===m||"w"===v?0:1,h=s._name+".range["+u+"]",p=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,u),d="left",y="middle";if(s.fixedrange)return;m?(y="n"===m?"top":"bottom","right"===s.side&&(d="right")):"e"===v&&(d="right"),i._context.showAxisRangeEntryBoxes&&n.select(xt).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(p),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:d,verticalAlign:y}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,h,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,ft*e+bt)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-bt),o=Math.abs(i-wt);function s(){St="",Tt.r=Tt.l,Tt.t=Tt.b,Ct.attr("d","M0,0Z")}if(Tt.l=Math.min(bt,n),Tt.r=Math.max(bt,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>I||o>I?(St="xy",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,bt>n?Tt.l=bt-a:Tt.r=bt+a),Ct.attr("d",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>I||o>I){St="xy";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),u=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=u*tt,Tt.b=(1-l)*et,Tt.t=(1-u)*et,Ct.attr("d",G(Tt))}else s();else!at||o<Math.min(Math.max(.6*a,P),I)?a<P||!it?s():(Tt.t=0,Tt.b=et,St="x",Ct.attr("d",function(t,e){return"M"+(t.l-.5)+","+(e-I-.5)+"h-3v"+(2*I+1)+"h3ZM"+(t.r+.5)+","+(e-I-.5)+"h3v"+(2*I+1)+"h-3Z"}(Tt,wt))):!it||a<Math.min(.6*o,I)?(Tt.l=0,Tt.r=tt,St="y",Ct.attr("d",function(t,e){return"M"+(e-I-.5)+","+(t.t-.5)+"v-3h"+(2*I+1)+"v3ZM"+(e-I-.5)+","+(t.b+.5)+"v3h"+(2*I+1)+"v-3Z"}(Tt,bt))):(St="xy",Ct.attr("d",G(Tt)));Tt.w=Tt.r-Tt.l,Tt.h=Tt.b-Tt.t,St&&(Pt=!0),t._dragged=Pt,j(Lt,Ct,Tt,Mt,At,kt),Ot(),t.emit("plotly_relayouting",pt),At=!0}function Ot(){pt={},"xy"!==St&&"x"!==St||(R(J,Tt.l/tt,Tt.r/tt,pt,rt.xaxes),Vt("x",pt)),"xy"!==St&&"y"!==St||(R(K,(et-Tt.b)/et,(et-Tt.t)/et,pt,rt.yaxes),Vt("y",pt))}function Rt(){Ot(),q(t),Gt(),H(t)}It.prepFn=function(e,r,n){var a=It.dragmode,s=t._fullLayout.dragmode;s!==a&&(It.dragmode=s),gt(),ft=t._fullLayout._invScaleX,dt=t._fullLayout._invScaleY,ot||(yt?e.shiftKey?"pan"===s?s="zoom":g(s)||(s="pan"):e.ctrlKey&&(s="pan"):s="pan"),_(s)?It.minDrag=1:It.minDrag=void 0,g(s)?(It.xaxes=J,It.yaxes=K,M(e,r,n,It,s)):(It.clickFn=Dt,g(a)&&Et(),ot||("zoom"===s?(It.moveFn=zt,It.doneFn=Rt,It.minDrag=1,function(e,r,n){var a=xt.getBoundingClientRect();bt=r-a.left,wt=n-a.top,t._fullLayout._calcInverseTransform(t);var s=i.apply3DTransform(t._fullLayout._invTransform)(bt,wt);bt=s[0],wt=s[1],Tt={l:bt,r:bt,w:0,t:wt,b:wt,h:0},kt=t._hmpixcount?t._hmlumcount/t._hmpixcount:o(t._fullLayout.plot_bgcolor).getLuminance(),At=!1,St="xy",Pt=!1,Lt=N(mt,kt,Q,$,Mt="M0,0H"+tt+"V"+et+"H0V0"),Ct=U(mt,Q,$)}(0,r,n)):"pan"===s&&(It.moveFn=jt,It.doneFn=Gt))),t._fullLayout._redrag=function(){var e=t._dragdata;if(e&&e.element===xt){var r=t._fullLayout.dragmode;g(r)||(gt(),Zt([0,0,tt,et]),It.moveFn(e.dx,e.dy))}}},y.init(It);var Ft=[0,0,tt,et],Bt=null,Nt=C.REDRAWDELAY,Ut=e.mainplot?t._fullLayout._plots[e.mainplot]:e;function jt(e,r){if(e*=ft,r*=dt,!t._transitioningWithDuration){if(t._fullLayout._replotting=!0,"ew"===it||"ns"===at){var n=it?-e:0,i=at?-r:0;if(nt.isSubplotConstrained){if(it&&at){var a=(e/tt-r/et)/2;n=-(e=a*tt),i=-(r=-a*et)}at?n=-i*tt/et:i=-n*et/tt}return it&&(F(J,e),Vt("x")),at&&(F(K,r),Vt("y")),Zt([n,i,tt,et]),qt(),void t.emit("plotly_relayouting",pt)}var o,s,l="w"===it==("n"===at)?1:-1;if(it&&at&&(rt.isSubplotConstrained||nt.isSubplotConstrained)){var u=(e/tt+l*r/et)/2;e=u*tt,r=l*u*et}if("w"===it?e=f(J,0,e):"e"===it?e=f(J,1,-e):it||(e=0),"n"===at?r=f(K,1,r):"s"===at?r=f(K,0,-r):at||(r=0),o="w"===it?e:0,s="n"===at?r:0,rt.isSubplotConstrained&&!nt.isSubplotConstrained||nt.isSubplotConstrained&&it&&at&&l>0){var c;if(nt.isSubplotConstrained||!it&&1===at.length){for(c=0;c<J.length;c++)J[c].range=J[c]._r.slice(),L(J[c],1-r/et);o=(e=r*tt/et)/2}if(nt.isSubplotConstrained||!at&&1===it.length){for(c=0;c<K.length;c++)K[c].range=K[c]._r.slice(),L(K[c],1-e/tt);s=(r=e*et/tt)/2}}nt.isSubplotConstrained&&at||Vt("x"),nt.isSubplotConstrained&&it||Vt("y");var h=tt-e,p=et-r;!nt.isSubplotConstrained||it&&at||(it?(s=o?0:e*et/tt,p=h*et/tt):(o=s?0:r*tt/et,h=p*tt/et)),Zt([o,s,h,p]),qt(),t.emit("plotly_relayouting",pt)}function f(t,e,r){for(var n,i,a=1-e,o=0;o<t.length;o++){var s=t[o];if(!s.fixedrange){n=s,i=s._rl[a]+(s._rl[e]-s._rl[a])/B(r/s._length);var l=s.l2r(i);!1!==l&&void 0!==l&&(s.range[e]=l)}}return n._length*(n._rl[e]-i)/(n._rl[e]-n._rl[a])}}function Vt(t,e){for(var r=nt.isSubplotConstrained?{x:K,y:J}[t]:nt[t+"axes"],n=nt.isSubplotConstrained?{x:J,y:K}[t]:[],i=0;i<r.length;i++){var a=r[i],o=a._id,s=nt.xLinks[o]||nt.yLinks[o],l=n[0]||V[s]||X[s];l&&(e?(e[a._name+".range[0]"]=e[l._name+".range[0]"],e[a._name+".range[1]"]=e[l._name+".range[1]"]):a.range=l.range.slice())}}function qt(){var r,n=[];function i(t){for(r=0;r<t.length;r++)t[r].fixedrange||n.push(t[r]._id)}function a(t,e){for(r=0;r<t.length;r++){var i=t[r],a=i[e];i.fixedrange||"sync"!==a.tickmode||n.push(a._id)}}for(st&&(i(J),i(rt.xaxes),i(nt.xaxes),a(e.overlays,"xaxis")),lt&&(i(K),i(rt.yaxes),i(nt.yaxes),a(e.overlays,"yaxis")),pt={},r=0;r<n.length;r++){var o=n[r],s=k(t,o);d.drawOne(t,s,{skipTitle:!0}),pt[s._name+".range[0]"]=s.range[0],pt[s._name+".range[1]"]=s.range[1]}d.redrawComponents(t,n)}function Ht(){if(!t._transitioningWithDuration){var e=t._context.doubleClick,r=[];it&&(r=r.concat(J)),at&&(r=r.concat(K)),nt.xaxes&&(r=r.concat(nt.xaxes)),nt.yaxes&&(r=r.concat(nt.yaxes));var n,i,a={};if("reset+autosize"===e)for(e="autosize",i=0;i<r.length;i++){var o=(n=r[i])._rangeInitial0,s=n._rangeInitial1,u=void 0!==o||void 0!==s;if(u&&(void 0!==o&&o!==n.range[0]||void 0!==s&&s!==n.range[1])||!u&&!0!==n.autorange){e="reset";break}}if("autosize"===e)for(i=0;i<r.length;i++)(n=r[i]).fixedrange||(a[n._name+".autorange"]=!0);else if("reset"===e)for((it||rt.isSubplotConstrained)&&(r=r.concat(rt.xaxes)),at&&!rt.isSubplotConstrained&&(r=r.concat(rt.yaxes)),rt.isSubplotConstrained&&(it?at||(r=r.concat(K)):r=r.concat(J)),i=0;i<r.length;i++)if(!(n=r[i]).fixedrange){var c=n._name,h=n._autorangeInitial;void 0===n._rangeInitial0&&void 0===n._rangeInitial1?a[c+".autorange"]=!0:void 0===n._rangeInitial0?(a[c+".autorange"]=h,a[c+".range"]=[null,n._rangeInitial1]):void 0===n._rangeInitial1?(a[c+".range"]=[n._rangeInitial0,null],a[c+".autorange"]=h):a[c+".range"]=[n._rangeInitial0,n._rangeInitial1]}t.emit("plotly_doubleclick",null),l.call("_guiRelayout",t,a)}}function Gt(){Zt([0,0,tt,et]),i.syncOrAsync([T.previousPromises,function(){t._fullLayout._replotting=!1,l.call("_guiRelayout",t,pt)}],t)}function Zt(e){var r,n,a,o,s=t._fullLayout,u=s._plots,c=s._subplots.cartesian;if(ct&&l.subplotsRegistry.splom.drag(t),ut)for(r=0;r<c.length;r++)if(a=(n=u[c[r]]).xaxis,o=n.yaxis,n._scene){var h=i.simpleMap(a.range,a.r2l),f=i.simpleMap(o.range,o.r2l);a.limitRange&&a.limitRange(),o.limitRange&&o.limitRange(),h=a.range,f=o.range,n._scene.update({range:[h[0],f[0],h[1],f[1]]})}if((ct||ut)&&(b(t),w(t)),ht){var d=e[2]/E._length,y=e[3]/D._length;for(r=0;r<c.length;r++){a=(n=u[c[r]]).xaxis,o=n.yaxis;var g,_,x,T,k=(st||nt.isSubplotConstrained)&&!a.fixedrange&&V[a._id],M=(lt||nt.isSubplotConstrained)&&!o.fixedrange&&X[o._id];if(k?(g=d,x=v||nt.isSubplotConstrained?e[0]:Xt(a,g)):nt.xaHash[a._id]?(g=d,x=e[0]*a._length/E._length):nt.yaHash[a._id]?(g=y,x="ns"===at?-e[1]*a._length/D._length:Xt(a,g,{n:"top",s:"bottom"}[at])):x=Wt(a,g=Yt(a,d,y)),g>1&&(void 0!==a.maxallowed&&st===(a.range[0]<a.range[1]?"e":"w")||void 0!==a.minallowed&&st===(a.range[0]<a.range[1]?"w":"e"))&&(g=1,x=0),M?(_=y,T=m||nt.isSubplotConstrained?e[1]:Xt(o,_)):nt.yaHash[o._id]?(_=y,T=e[1]*o._length/D._length):nt.xaHash[o._id]?(_=d,T="ew"===it?-e[0]*o._length/E._length:Xt(o,_,{e:"right",w:"left"}[it])):T=Wt(o,_=Yt(o,d,y)),_>1&&(void 0!==o.maxallowed&<===(o.range[0]<o.range[1]?"n":"s")||void 0!==o.minallowed&<===(o.range[0]<o.range[1]?"s":"n"))&&(_=1,T=0),g||_){g||(g=1),_||(_=1);var A=a._offset-x/g,S=o._offset-T/_;n.clipRect.call(p.setTranslate,x,T).call(p.setScale,g,_),n.plot.call(p.setTranslate,A,S).call(p.setScale,1/g,1/_),g===n.xScaleFactor&&_===n.yScaleFactor||(p.setPointGroupScale(n.zoomScalePts,g,_),p.setTextPointsScale(n.zoomScaleTxt,g,_)),p.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=g,n.yScaleFactor=_}}}}function Yt(t,e,r){return t.fixedrange?0:st&&rt.xaHash[t._id]?e:lt&&(rt.isSubplotConstrained?rt.xaHash:rt.yaHash)[t._id]?r:0}function Wt(t,e){return e?(t.range=t._r.slice(),L(t,e),Xt(t,e)):0}function Xt(t,e,r){return t._length*(1-e)*x[r||t.constraintoward||"middle"]}return m.length*v.length!=1&&Y(xt,(function(e){if(t._context._scrollZoom.cartesian||t._fullLayout._enablescrollzoom){if(Et(),t._transitioningWithDuration)return e.preventDefault(),void e.stopPropagation();gt(),clearTimeout(Bt);var r=-e.deltaY;if(isFinite(r)||(r=e.wheelDelta/10),isFinite(r)){var n,a=Math.exp(-Math.min(Math.max(r,-20),20)/200),o=Ut.draglayer.select(".nsewdrag").node().getBoundingClientRect(),s=(e.clientX-o.left)/o.width,l=(o.bottom-e.clientY)/o.height;if(st){for(v||(s=.5),n=0;n<J.length;n++)u(J[n],s,a);Vt("x"),Ft[2]*=a,Ft[0]+=Ft[2]*s*(1/a-1)}if(lt){for(m||(l=.5),n=0;n<K.length;n++)u(K[n],l,a);Vt("y"),Ft[3]*=a,Ft[1]+=Ft[3]*(1-l)*(1/a-1)}Zt(Ft),qt(),t.emit("plotly_relayouting",pt),Bt=setTimeout((function(){t._fullLayout&&(Ft=[0,0,tt,et],Gt())}),Nt),e.preventDefault()}else i.log("Did not find wheel motion attributes: ",e)}function u(t,e,r){if(!t.fixedrange){var n=i.simpleMap(t.range,t.r2l),a=n[0]+(n[1]-n[0])*e;t.range=n.map((function(e){return t.l2r(a+(e-a)*r)}))}}})),xt},makeDragger:D,makeRectDragger:z,makeZoombox:N,makeCorners:U,updateZoombox:j,xyCorners:G,transitionZoombox:V,removeZoombox:q,showDoubleClickNotifier:H,attachWheelEventHandler:Y}},2464:function(t,e,r){"use strict";var n=r(3428),i=r(3024),a=r(6476),o=r(3972),s=r(1184).makeDragBox,l=r(3816).DRAGGERSIZE;e.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot)n.select(t).selectAll(".drag").remove();else if(r._has("cartesian")||r._has("splom")){Object.keys(r._plots||{}).sort((function(t,e){if((r._plots[t].mainplot&&!0)===(r._plots[e].mainplot&&!0)){var n=t.split("y"),i=e.split("y");return n[0]===i[0]?Number(n[1]||1)-Number(i[1]||1):Number(n[0]||1)-Number(i[0]||1)}return r._plots[t].mainplot?1:-1})).forEach((function(e){var n=r._plots[e],o=n.xaxis,u=n.yaxis;if(!n.mainplot){var c=s(t,n,o._offset,u._offset,o._length,u._length,"ns","ew");c.onmousemove=function(r){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===e&&t._fullLayout._plots[e]&&i.hover(t,r,e)},i.hover(t,r,e),t._fullLayout._lasthover=c,t._fullLayout._hoversubplot=e},c.onmouseout=function(e){t._dragging||(t._fullLayout._hoversubplot=null,a.unhover(t,e))},t._context.showAxisDragHandles&&(s(t,n,o._offset-l,u._offset-l,l,l,"n","w"),s(t,n,o._offset+o._length,u._offset-l,l,l,"n","e"),s(t,n,o._offset-l,u._offset+u._length,l,l,"s","w"),s(t,n,o._offset+o._length,u._offset+u._length,l,l,"s","e"))}if(t._context.showAxisDragHandles){if(e===o._mainSubplot){var h=o._mainLinePosition;"top"===o.side&&(h-=l),s(t,n,o._offset+.1*o._length,h,.8*o._length,l,"","ew"),s(t,n,o._offset,h,.1*o._length,l,"","w"),s(t,n,o._offset+.9*o._length,h,.1*o._length,l,"","e")}if(e===u._mainSubplot){var p=u._mainLinePosition;"right"!==u.side&&(p-=l),s(t,n,p,u._offset+.1*u._length,l,.8*u._length,"ns",""),s(t,n,p,u._offset+.9*u._length,l,.1*u._length,"s",""),s(t,n,p,u._offset,l,.1*u._length,"n","")}}}));var o=r._hoverlayer.node();o.onmousemove=function(e){e.target=t._fullLayout._lasthover,i.hover(t,e,r._hoversubplot)},o.onclick=function(e){e.target=t._fullLayout._lasthover,i.click(t,e)},o.onmousedown=function(e){t._fullLayout._lasthover.onmousedown(e)},e.updateFx(t)}},e.updateFx=function(t){var e=t._fullLayout,r="pan"===e.dragmode?"move":"crosshair";o(e._draggers,r)}},6632:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=r(9811);t.exports=function(t){return function(e,r){var o=e[t];if(Array.isArray(o))for(var s=n.subplotsRegistry.cartesian,l=s.idRegex,u=r._subplots,c=u.xaxis,h=u.yaxis,p=u.cartesian,f=r._has("cartesian")||r._has("gl2d"),d=0;d<o.length;d++){var m=o[d];if(i.isPlainObject(m)){var y=a.cleanId(m.xref,"x",!1),v=a.cleanId(m.yref,"y",!1),g=l.x.test(y),_=l.y.test(v);if(g||_){f||i.pushUnique(r._basePlotModules,s);var x=!1;g&&-1===c.indexOf(y)&&(c.push(y),x=!0),_&&-1===h.indexOf(v)&&(h.push(v),x=!0),x&&g&&_&&p.push(y+v)}}}}}},7952:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=r(7316),s=r(3616),l=r(4888)._M,u=r(9811),c=r(3816),h=r(9616),p=a.ensureSingle;function f(t,e,r){return a.ensureSingle(t,e,r,(function(t){t.datum(r)}))}function d(t,e,r,o,u){for(var h,p,f,d=c.traceLayerClasses,m=t._fullLayout,y=m._modules,v={},g=0;g<r.length;g++){var _=r[g][0].trace.zorder||0;v[_]||(v[_]=[]),v[_].push(r[g])}for(var x=[],b=[],w=Object.keys(v).map(Number).sort(a.sorterAsc),T=0;T<w.length;T++)for(var k=w[T],M=0;M<y.length;M++){var A=(h=y[M]).name,S=i.modules[A].categories;if(S.svg){var L=(h.layerName||A+"layer")+(T?Number(T)+1:""),C=h.plot;f=(p=l(r,C,k))[0],r=p[1],f.length&&x.push({i:d.indexOf(L),zorder:T,className:L,plotMethod:C,cdModule:f}),S.zoomScale&&b.push("."+L)}}x.sort((function(t,e){return(t.zorder||0)-(e.zorder||0)||t.i-e.i}));var P=e.plot.selectAll("g.mlayer").data(x,(function(t){return t.className}));if(P.enter().append("g").attr("class",(function(t){return t.className})).classed("mlayer",!0).classed("rangeplot",e.isRangePlot),P.exit().remove(),P.order(),P.each((function(r){var i=n.select(this),a=r.className;r.plotMethod(t,e,r.cdModule,i,o,u),-1===c.clipOnAxisFalseQuery.indexOf("."+a)&&s.setClipUrl(i,e.layerClipId,t)})),m._has("scattergl")&&(h=i.getModule("scattergl"),f=l(r,h)[0],h.plot(t,e,f)),!t._context.staticPlot&&(e._hasClipOnAxisFalse&&(e.clipOnAxisFalseTraces=e.plot.selectAll(c.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),b.length)){var I=e.plot.selectAll(b.join(",")).selectAll(".trace");e.zoomScalePts=I.selectAll("path.point"),e.zoomScaleTxt=I.selectAll(".textpoint")}}function m(t,e){var r=e.plotgroup,n=e.id,i=c.layerValue2layerClass[e.xaxis.layer],a=c.layerValue2layerClass[e.yaxis.layer],o=t._fullLayout._hasOnlyLargeSploms;if(e.mainplot){var s=e.mainplotinfo,l=s.plotgroup,h=n+"-x",d=n+"-y";e.minorGridlayer=s.minorGridlayer,e.gridlayer=s.gridlayer,e.zerolinelayer=s.zerolinelayer,p(s.overlinesBelow,"path",h),p(s.overlinesBelow,"path",d),p(s.overaxesBelow,"g",h),p(s.overaxesBelow,"g",d),e.plot=p(s.overplot,"g",n),p(s.overlinesAbove,"path",h),p(s.overlinesAbove,"path",d),p(s.overaxesAbove,"g",h),p(s.overaxesAbove,"g",d),e.xlines=l.select(".overlines-"+i).select("."+h),e.ylines=l.select(".overlines-"+a).select("."+d),e.xaxislayer=l.select(".overaxes-"+i).select("."+h),e.yaxislayer=l.select(".overaxes-"+a).select("."+d)}else if(o)e.xlines=p(r,"path","xlines-above"),e.ylines=p(r,"path","ylines-above"),e.xaxislayer=p(r,"g","xaxislayer-above"),e.yaxislayer=p(r,"g","yaxislayer-above");else{var m=p(r,"g","layer-subplot");e.shapelayer=p(m,"g","shapelayer"),e.imagelayer=p(m,"g","imagelayer"),e.minorGridlayer=p(r,"g","minor-gridlayer"),e.gridlayer=p(r,"g","gridlayer"),e.zerolinelayer=p(r,"g","zerolinelayer");var y=p(r,"g","layer-between");e.shapelayerBetween=p(y,"g","shapelayer"),e.imagelayerBetween=p(y,"g","imagelayer"),p(r,"path","xlines-below"),p(r,"path","ylines-below"),e.overlinesBelow=p(r,"g","overlines-below"),p(r,"g","xaxislayer-below"),p(r,"g","yaxislayer-below"),e.overaxesBelow=p(r,"g","overaxes-below"),e.plot=p(r,"g","plot"),e.overplot=p(r,"g","overplot"),e.xlines=p(r,"path","xlines-above"),e.ylines=p(r,"path","ylines-above"),e.overlinesAbove=p(r,"g","overlines-above"),p(r,"g","xaxislayer-above"),p(r,"g","yaxislayer-above"),e.overaxesAbove=p(r,"g","overaxes-above"),e.xlines=r.select(".xlines-"+i),e.ylines=r.select(".ylines-"+a),e.xaxislayer=r.select(".xaxislayer-"+i),e.yaxislayer=r.select(".yaxislayer-"+a)}o||(f(e.minorGridlayer,"g",e.xaxis._id),f(e.minorGridlayer,"g",e.yaxis._id),e.minorGridlayer.selectAll("g").map((function(t){return t[0]})).sort(u.idSort),f(e.gridlayer,"g",e.xaxis._id),f(e.gridlayer,"g",e.yaxis._id),e.gridlayer.selectAll("g").map((function(t){return t[0]})).sort(u.idSort)),e.xlines.style("fill","none").classed("crisp",!0),e.ylines.style("fill","none").classed("crisp",!0)}function y(t,e){if(t){var r={};for(var i in t.each((function(t){var i=t[0];n.select(this).remove(),v(i,e),r[i]=!0})),e._plots)for(var a=e._plots[i].overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function v(t,e){e._draggers.selectAll("g."+t).remove(),e._defs.select("#clip"+e._uid+t+"plot").remove()}e.name="cartesian",e.attr=["xaxis","yaxis"],e.idRoot=["x","y"],e.idRegex=c.idRegex,e.attrRegex=c.attrRegex,e.attributes=r(6720),e.layoutAttributes=r(4724),e.supplyLayoutDefaults=r(7352),e.transitionAxes=r(3736),e.finalizeSubplots=function(t,e){var r,n,i,o=e._subplots,s=o.xaxis,l=o.yaxis,h=o.cartesian,p=h.concat(o.gl2d||[]),f={},d={};for(r=0;r<p.length;r++){var m=p[r].split("y");f[m[0]]=1,d["y"+m[1]]=1}for(r=0;r<s.length;r++)f[n=s[r]]||(i=(t[u.id2name(n)]||{}).anchor,c.idRegex.y.test(i)||(i="y"),h.push(n+i),p.push(n+i),d[i]||(d[i]=1,a.pushUnique(l,i)));for(r=0;r<l.length;r++)d[i=l[r]]||(n=(t[u.id2name(i)]||{}).anchor,c.idRegex.x.test(n)||(n="x"),h.push(n+i),p.push(n+i),f[n]||(f[n]=1,a.pushUnique(s,n)));if(!p.length){for(var y in n="",i="",t)c.attrRegex.test(y)&&("x"===y.charAt(0)?(!n||+y.substr(5)<+n.substr(5))&&(n=y):(!i||+y.substr(5)<+i.substr(5))&&(i=y));n=n?u.name2id(n):"x",i=i?u.name2id(i):"y",s.push(n),l.push(i),h.push(n+i)}},e.plot=function(t,e,r,n){var i,a=t._fullLayout,o=a._subplots.cartesian,s=t.calcdata;if(!Array.isArray(e))for(e=[],i=0;i<s.length;i++)e.push(i);for(i=0;i<o.length;i++){for(var l,u=o[i],c=a._plots[u],h=[],p=0;p<s.length;p++){var f=s[p],m=f[0].trace;m.xaxis+m.yaxis===u&&((-1!==e.indexOf(m.index)||m.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===u&&-1!==["tonextx","tonexty","tonext"].indexOf(m.fill)&&-1===h.indexOf(l)&&h.push(l),h.push(f)),l=f)}d(t,c,h,r,n)}},e.clean=function(t,e,r,n){var i,a,o,s=n._plots||{},l=e._plots||{},c=n._subplots||{};if(n._hasOnlyLargeSploms&&!e._hasOnlyLargeSploms)for(o in s)(i=s[o]).plotgroup&&i.plotgroup.remove();var h=n._has&&n._has("gl"),p=e._has&&e._has("gl");if(h&&!p)for(o in s)(i=s[o])._scene&&i._scene.destroy();if(c.xaxis&&c.yaxis){var f=u.listIds({_fullLayout:n});for(a=0;a<f.length;a++){var d=f[a];e[u.id2name(d)]||n._infolayer.selectAll(".g-"+d+"title").remove()}}var m=n._has&&n._has("cartesian"),g=e._has&&e._has("cartesian");if(m&&!g)y(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups,delete n._axisMatchGroups;else if(c.cartesian)for(a=0;a<c.cartesian.length;a++){var _=c.cartesian[a];if(!l[_]){var x="."+_+",."+_+"-x,."+_+"-y";n._cartesianlayer.selectAll(x).remove(),v(_,n)}}},e.drawFramework=function(t){var e=t._fullLayout,r=function(t){var e,r,n,i,a,o,s=t._fullLayout,l=s._subplots.cartesian,u=l.length,c=[],h=[];for(e=0;e<u;e++){n=l[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var p=a._mainAxis,f=o._mainAxis,d=p._id+f._id,m=s._plots[d];i.overlays=[],d!==n&&m?(i.mainplot=d,i.mainplotinfo=m,h.push(n)):(i.mainplot=void 0,i.mainplotinfo=void 0,c.push(n))}for(e=0;e<h.length;e++)n=h[e],(i=s._plots[n]).mainplotinfo.overlays.push(i);var y=c.concat(h),v=new Array(u);for(e=0;e<u;e++){n=y[e],a=(i=s._plots[n]).xaxis,o=i.yaxis;var g=[n,a.layer,o.layer,a.overlaying||"",o.overlaying||""];for(r=0;r<i.overlays.length;r++)g.push(i.overlays[r].id);v[e]=g}return v}(t),i=e._cartesianlayer.selectAll(".subplot").data(r,String);i.enter().append("g").attr("class",(function(t){return"subplot "+t[0]})),i.order(),i.exit().call(y,e),i.each((function(r){var i=r[0],a=e._plots[i];a.plotgroup=n.select(this),m(t,a),a.draglayer=p(e._draggers,"g",i)}))},e.rangePlot=function(t,e,r){m(t,e),d(t,e,r),o.style(t)},e.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this,r=t.toDataURL("image/png");e.append("svg:image").attr({xmlns:h.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})}))},e.updateFx=r(2464).updateFx},4724:function(t,e,r){"use strict";var n=r(5376),i=r(2548),a=r(8192).u,o=r(2880).extendFlat,s=r(1780).templatedArray,l=r(9736).descriptionWithDates,u=r(9032).ONEDAY,c=r(3816),h=c.HOUR_PATTERN,p=c.WEEKDAY_PATTERN,f={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},d=o({},f,{values:f.values.slice().concat(["sync"])});function m(t){return{valType:"integer",min:0,dflt:t?5:0,editType:"ticks"}}var y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},v={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},g={valType:"data_array",editType:"ticks"},_={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function x(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=5),e}function b(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var w={valType:"color",dflt:i.defaultLine,editType:"ticks"},T={valType:"color",dflt:i.lightLine,editType:"ticks"};function k(t){var e={valType:"number",min:0,editType:"ticks"};return t||(e.dflt=1),e}var M=o({},a,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:i.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:n({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"calc"},rangebreaks:s("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[p,h,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:u},editType:"calc"}),tickmode:d,nticks:m(),tick0:y,dtick:v,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:g,ticktext:{valType:"data_array",editType:"ticks"},ticks:_,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:x(),tickwidth:b(),tickcolor:w,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},a,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:l("tick label")},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:l("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:i.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:T,gridwidth:k(),griddash:M,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:i.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",c.idRegex.x.toString(),c.idRegex.y.toString()],editType:"plot"},minor:{tickmode:f,nticks:m("minor"),tick0:y,dtick:v,tickvals:g,ticks:_,ticklen:x("minor"),tickwidth:b("minor"),tickcolor:w,gridcolor:T,gridwidth:k("minor"),griddash:M,showgrid:A,editType:"ticks"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:n({editType:"ticks"})}}},7352:function(t,e,r){"use strict";var n=r(3400),i=r(6308),a=r(624).isUnifiedHover,o=r(1008),s=r(1780),l=r(4859),u=r(4724),c=r(4944),h=r(5955),p=r(1888),f=r(7668),d=r(9811),m=d.id2name,y=d.name2id,v=r(3816).AX_ID_PATTERN,g=r(4040),_=g.traceIs,x=g.getComponentMethod;function b(t,e,r){Array.isArray(t[e])?t[e].push(r):t[e]=[r]}t.exports=function(t,e,r){var g,w,T=e.autotypenumbers,k={},M={},A={},S={},L={},C={},P={},I={},E={},D={};for(g=0;g<r.length;g++){var z=r[g];if(_(z,"cartesian")||_(z,"gl2d")){var O,R;if(z.xaxis)O=m(z.xaxis),b(k,O,z);else if(z.xaxes)for(w=0;w<z.xaxes.length;w++)b(k,m(z.xaxes[w]),z);if(z.yaxis)R=m(z.yaxis),b(k,R,z);else if(z.yaxes)for(w=0;w<z.yaxes.length;w++)b(k,m(z.yaxes[w]),z);"funnel"===z.type?"h"===z.orientation?(O&&(M[O]=!0),R&&(P[R]=!0)):R&&(A[R]=!0):"image"===z.type?(R&&(I[R]=!0),O&&(I[O]=!0)):(R&&(L[R]=!0,C[R]=!0),_(z,"carpet")&&("carpet"!==z.type||z._cheater)||O&&(S[O]=!0)),"carpet"===z.type&&z._cheater&&O&&(M[O]=!0),_(z,"2dMap")&&(E[O]=!0,E[R]=!0),_(z,"oriented")&&(D["h"===z.orientation?R:O]=!0)}}var F=e._subplots,B=F.xaxis,N=F.yaxis,U=n.simpleMap(B,m),j=n.simpleMap(N,m),V=U.concat(j),q=i.background;B.length&&N.length&&(q=n.coerce(t,e,l,"plot_bgcolor"));var H,G,Z,Y,W,X=i.combine(q,e.paper_bgcolor);function J(){var t=k[H]||[];W._traceIndices=t.map((function(t){return t._expandedIndex})),W._annIndices=[],W._shapeIndices=[],W._selectionIndices=[],W._imgIndices=[],W._subplotsWith=[],W._counterAxes=[],W._name=W._attr=H,W._id=G}function K(t,e){return n.coerce(Y,W,u,t,e)}function Q(t,e){return n.coerce2(Y,W,u,t,e)}function $(t){return"x"===t?N:B}function tt(e,r){for(var n="x"===e?U:j,i=[],a=0;a<n.length;a++){var o=n[a];o===r||(t[o]||{}).overlaying||i.push(y(o))}return i}var et={x:$("x"),y:$("y")},rt=et.x.concat(et.y),nt={},it=[];function at(){var t=Y.matches;v.test(t)&&-1===rt.indexOf(t)&&(nt[t]=Y.type,it=Object.keys(nt))}var ot=o(t,e),st=a(ot);for(g=0;g<V.length;g++){H=V[g],G=y(H),Z=H.charAt(0),n.isPlainObject(t[H])||(t[H]={}),Y=t[H],W=s.newContainer(e,H,Z+"axis"),J();var lt="x"===Z&&!S[H]&&M[H]||"y"===Z&&!L[H]&&A[H],ut="y"===Z&&(!C[H]&&P[H]||I[H]),ct={hasMinor:!0,letter:Z,font:e.font,outerTicks:E[H],showGrid:!D[H],data:k[H]||[],bgColor:X,calendar:e.calendar,automargin:!0,visibleDflt:lt,reverseDflt:ut,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[Z]||{})[G],noAutotickangles:"y"===Z};K("uirevision",e.uirevision),c(Y,W,K,ct),h(Y,W,K,ct,e);var ht=st&&Z===ot.charAt(0),pt=Q("spikecolor",st?W.color:void 0),ft=Q("spikethickness",st?1.5:void 0),dt=Q("spikedash",st?"dot":void 0),mt=Q("spikemode",st?"across":void 0),yt=Q("spikesnap");K("showspikes",!!(ht||pt||ft||dt||mt||yt))||(delete W.spikecolor,delete W.spikethickness,delete W.spikedash,delete W.spikemode,delete W.spikesnap);var vt=m(Y.overlaying),gt=[0,1];if(void 0!==e[vt]){var _t=m(e[vt].anchor);void 0!==e[_t]&&(gt=e[_t].domain)}f(Y,W,K,{letter:Z,counterAxes:et[Z],overlayableAxes:tt(Z,H),grid:e.grid,overlayingDomain:gt}),K("title.standoff"),at(),W._input=Y}for(g=0;g<it.length;){G=it[g++],Z=(H=m(G)).charAt(0),n.isPlainObject(t[H])||(t[H]={}),Y=t[H],W=s.newContainer(e,H,Z+"axis"),J();var xt={letter:Z,font:e.font,outerTicks:E[H],showGrid:!D[H],data:[],bgColor:X,calendar:e.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:T,splomStash:((e._splomAxes||{})[Z]||{})[G]};K("uirevision",e.uirevision),W.type=nt[G]||"linear",h(Y,W,K,xt,e),f(Y,W,K,{letter:Z,counterAxes:et[Z],overlayableAxes:tt(Z,H),grid:e.grid}),K("fixedrange"),at(),W._input=Y}var bt=x("rangeslider","handleDefaults"),wt=x("rangeselector","handleDefaults");for(g=0;g<U.length;g++)H=U[g],Y=t[H],W=e[H],bt(t,e,H),"date"===W.type&&wt(Y,W,e,j,W.calendar),K("fixedrange");for(g=0;g<j.length;g++){H=j[g],Y=t[H],W=e[H];var Tt=e[m(W.anchor)];K("fixedrange",x("rangeslider","isVisible")(Tt))}p.handleDefaults(t,e,{axIds:rt.concat(it).sort(d.idSort),axHasImage:I})}},2136:function(t,e,r){"use strict";var n=r(9760).mix,i=r(2548),a=r(3400);t.exports=function(t,e,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return a.coerce2(t,e,o.attributes,r,n)}var u=l("linecolor",s),c=l("linewidth");r("showline",o.showLine||!!u||!!c)||(delete e.linecolor,delete e.linewidth);var h=l("gridcolor",n(s,o.bgColor,o.blend||i.lightFraction).toRgbString()),p=l("gridwidth"),f=l("griddash");if(r("showgrid",o.showGrid||!!h||!!p||!!f)||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),o.hasMinor){var d=l("minor.gridcolor",n(e.gridcolor,o.bgColor,67).toRgbString()),m=l("minor.gridwidth",e.gridwidth||1),y=l("minor.griddash",e.griddash||"solid");r("minor.showgrid",!!d||!!m||!!y)||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!o.noZeroLine){var v=l("zerolinecolor",s),g=l("zerolinewidth");r("zeroline",o.showGrid||!!v||!!g)||(delete e.zerolinecolor,delete e.zerolinewidth)}}},7668:function(t,e,r){"use strict";var n=r(8248),i=r(3400);t.exports=function(t,e,r,a){var o,s,l,u,c,h,p=a.counterAxes||[],f=a.overlayableAxes||[],d=a.letter,m=a.grid,y=a.overlayingDomain;m&&(s=m._domains[d][m._axisMap[e._id]],o=m._anchors[e._id],s&&(l=m[d+"side"].split(" ")[0],u=m.domain[d]["right"===l||"top"===l?1:0])),s=s||[0,1],o=o||(n(t.position)?"free":p[0]||"free"),l=l||("x"===d?"bottom":"left"),u=u||0,c=0,h=!1;var v=i.coerce(t,e,{anchor:{valType:"enumerated",values:["free"].concat(p),dflt:o}},"anchor"),g=i.coerce(t,e,{side:{valType:"enumerated",values:"x"===d?["bottom","top"]:["left","right"],dflt:l}},"side");"free"===v&&("y"===d&&(r("autoshift")&&(u="left"===g?y[0]:y[1],h=!e.automargin||e.automargin,c="left"===g?-3:3),r("shift",c)),r("position",u)),r("automargin",h);var _=!1;if(f.length&&(_=i.coerce(t,e,{overlaying:{valType:"enumerated",values:[!1].concat(f),dflt:!1}},"overlaying")),!_){var x=r("domain",s);x[0]>x[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},2568:function(t,e,r){"use strict";var n=r(5024);t.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},6312:function(t,e,r){"use strict";var n=r(6808);t.exports=function(t,e,r,i){var a=e._template||{},o=e.type||a.type||"-";r("minallowed"),r("maxallowed");var s,l=r("range");l||i.noInsiderange||"log"===o||(!(s=r("insiderange"))||null!==s[0]&&null!==s[1]||(e.insiderange=!1,s=void 0),s&&(l=r("range",s)));var u,c=e.getAutorangeDflt(l,i),h=r("autorange",c);!l||(null!==l[0]||null!==l[1])&&(null!==l[0]&&null!==l[1]||"reversed"!==h&&!0!==h)&&(null===l[0]||"min"!==h&&"max reversed"!==h)&&(null===l[1]||"max"!==h&&"min reversed"!==h)||(l=void 0,delete e.range,e.autorange=!0,u=!0),u||(h=r("autorange",c=e.getAutorangeDflt(l,i))),h&&(n(r,h,l),"linear"!==o&&"-"!==o||r("rangemode")),e.cleanRange()}},1160:function(t,e,r){"use strict";var n=r(4284).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},8344:function(t,e,r){"use strict";var n=r(3428),i=r(4336).E9,a=r(3400),o=a.numberFormat,s=r(8248),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,h=a.ensureNumber,p=a.isArrayOrTypedArray,f=r(9032),d=f.FP_SAFE,m=f.BADNUM,y=f.LOG_CLIP,v=f.ONEWEEK,g=f.ONEDAY,_=f.ONEHOUR,x=f.ONEMIN,b=f.ONESEC,w=r(9811),T=r(3816),k=T.HOUR_PATTERN,M=T.WEEKDAY_PATTERN;function A(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",f=r.charAt(0);function L(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*y*Math.abs(n-i))}return m}function C(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=c(e,n||t.calendar);if(o===m){if(!s(e))return m;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),u=Math.round(e-l/10);o=c(new Date(u))+l/10}return o}function P(e,r,n){return u(e,r,n||t.calendar)}function I(e){return t._categories[Math.round(e)]}function E(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return m}function D(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=D(t);return void 0!==e?e:s(t)?+t:void 0}function O(t){return s(t)?+t:D(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):m},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var U="y"===f;B=function(e){if(!s(e))return m;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=U;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;l<r;l++){var u=i*t._rangebreaks[l].min,c=i*t._rangebreaks[l].max;if(a<u)break;if(!(a>c)){o=a<(u+c)/2?l:l+1;break}o=l+1}var h=t._B[o]||0;return isFinite(h)?R(e,t._m2,h):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;i<r&&!(e<t._rangebreaks[i].pmin);i++)e>t._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l="log"===t.type?L:h,t.l2c="log"===t.type?A:h,t.l2p=B,t.p2l=N,t.c2p="log"===t.type?function(t,e){return B(L(t,e))}:B,t.p2c="log"===t.type?function(t){return A(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=h,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=h):"log"===t.type?(t.d2r=t.d2l=function(t,e){return L(l(t),e)},t.r2d=t.r2c=function(t){return A(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=h,t.c2r=L,t.l2d=A,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return A(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=h):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=C,t.c2d=t.c2r=t.l2d=t.l2r=P,t.d2p=t.r2p=function(e,r,n){return t.l2p(C(e,0,n))},t.p2d=t.p2r=function(t,e,r){return P(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,m,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=E,t.r2d=t.c2d=t.l2d=I,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=O(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=h,t.r2l=O,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return I(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:h(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=I,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=D,t.l2r=t.c2r=h,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return I(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:h(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var u in l)if(u!==r){var c=e[w.id2name(u)];s=s.concat(c._traceIndices)}var h=[[0,{}],[0,{}]],d=[];for(i=0;i<s.length;i++){var m=n[s[i]];if(f in m){var y=m[f],v=m._length||a.minRowLength(y);if(p(y[0])&&p(y[1]))for(o=0;o<v;o++){var g=y[0][o],_=y[1][o];S(g)&&S(_)&&(d.push([g,_]),g in h[0][1]||(h[0][1][g]=h[0][0]++),_ in h[1][1]||(h[1][1][_]=h[1][0]++))}}}for(d.sort((function(t,e){var r=h[0][1],n=r[t[0]]-r[e[0]];if(n)return n;var i=h[1][1];return i[t[1]]-i[e[1]]})),i=0;i<d.length;i++)E(d[i])}),t.fraction2r=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return t.l2r(r+e*(n-r))},t.r2fraction=function(e){var r=t.r2l(t.range[0]),n=t.r2l(t.range[1]);return(t.r2l(e)-r)/(n-r)},t.limitRange=function(e){var r=t.minallowed,n=t.maxallowed;if(void 0!==r||void 0!==n){e||(e="range");var i=a.nestedProperty(t,e).get(),o=a.simpleMap(i,t.r2l),s=o[1]<o[0];s&&o.reverse();var l=a.simpleMap([r,n],t.r2l);if(void 0!==r&&o[0]<l[0]&&(i[s?1:0]=r),void 0!==n&&o[1]>l[1]&&(i[s?0:1]=n),i[0]===i[1]){var u=t.l2r(r),c=t.l2r(n);if(void 0!==r){var h=u+1;void 0!==n&&(h=Math.min(h,c)),i[s?1:0]=h}if(void 0!==n){var p=c+1;void 0!==r&&(p=Math.max(p,u)),i[s?0:1]=p}}}},t.cleanRange=function(e,r){t._cleanRange(e,r),t.limitRange(e)},t._cleanRange=function(e,r){r||(r={}),e||(e="range");var n,i,o=a.nestedProperty(t,e).get();if(i=(i="date"===t.type?a.dfltRange(t.calendar):"y"===f?T.DFLTRANGEY:"realaxis"===t._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),"tozero"!==t.rangemode&&"nonnegative"!==t.rangemode||(i[0]=0),o&&2===o.length){var l=null===o[0],u=null===o[1];for("date"!==t.type||t.autorange||(o[0]=a.cleanDate(o[0],m,t.calendar),o[1]=a.cleanDate(o[1],m,t.calendar)),n=0;n<2;n++)if("date"===t.type){if(!a.isDateTime(o[n],t.calendar)){t[e]=i;break}if(t.r2l(o[0])===t.r2l(o[1])){var c=a.constrain(t.r2l(o[0]),a.MIN_MS+1e3,a.MAX_MS-1e3);o[0]=t.l2r(c-1e3),o[1]=t.l2r(c+1e3);break}}else{if(!s(o[n])){if(l||u||!s(o[1-n])){t[e]=i;break}o[n]=o[1-n]*(n?10:.1)}if(o[n]<-d?o[n]=-d:o[n]>d&&(o[n]=d),o[0]===o[1]){var h=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=h,o[1]+=h}}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,u=t.r2l(t[a][0],o),c=t.r2l(t[a][1],o),h="y"===f;if(h?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(u,c),Math.max(u,c)),t._rangebreaks.length)){for(s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._lBreaks+=Math.abs(l.max-l.min);var p=h;u>c&&(p=!p),p&&t._rangebreaks.reverse();var d=p?-1:1;for(t._m2=d*t._length/(Math.abs(c-u)-t._lBreaks),t._B.push(-t._m2*(h?c:u)),s=0;s<t._rangebreaks.length;s++)l=t._rangebreaks[s],t._B.push(t._B[t._B.length-1]-d*t._m2*(l.max-l.min));for(s=0;s<t._rangebreaks.length;s++)(l=t._rangebreaks[s]).pmin=B(l.min),l.pmax=B(l.max)}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw e._replotting=!1,new Error("Something went wrong with axis scaling")},t.maskBreaks=function(e){var r,n,i,o,s,u=t.rangebreaks||[];u._cachedPatterns||(u._cachedPatterns=u.map((function(e){return e.enabled&&e.bounds?a.simpleMap(e.bounds,e.pattern?l:t.d2c):null}))),u._cachedValues||(u._cachedValues=u.map((function(e){return e.enabled&&e.values?a.simpleMap(e.values,t.d2c).sort(a.sorterAsc):null})));for(var c=0;c<u.length;c++){var h=u[c];if(h.enabled)if(h.bounds){var p=h.pattern;switch(n=(r=u._cachedPatterns[c])[0],i=r[1],p){case M:o=(s=new Date(e)).getUTCDay(),n>i&&(i+=7,o<n&&(o+=7));break;case k:o=(s=new Date(e)).getUTCHours()+(s.getUTCMinutes()/60+s.getUTCSeconds()/3600+s.getUTCMilliseconds()/36e5),n>i&&(i+=24,o<n&&(o+=24));break;case"":o=e}if(o>=n&&o<i)return m}else for(var f=u._cachedValues[c],d=0;d<f.length;d++)if(i=(n=f[d])+h.dvalue,e>=n&&e<i)return m}return e},t.locateBreaks=function(e,r){var n,i,o,s,u=[];if(!t.rangebreaks)return u;var c=t.rangebreaks.slice().sort((function(t,e){return t.pattern===M&&e.pattern===k?-1:e.pattern===M&&t.pattern===k?1:0})),h=function(t,n){if((t=a.constrain(t,e,r))!==(n=a.constrain(n,e,r))){for(var i=!0,o=0;o<u.length;o++){var s=u[o];t<s.max&&n>=s.min&&(t<s.min&&(s.min=t),n>s.max&&(s.max=n),i=!1)}i&&u.push({min:t,max:n})}};for(n=0;n<c.length;n++){var p=c[n];if(p.enabled)if(p.bounds){var f=e,d=r;p.pattern&&(f=Math.floor(f)),o=(i=a.simpleMap(p.bounds,p.pattern?l:t.r2l))[0],s=i[1];var m,y,w=new Date(f);switch(p.pattern){case M:y=v,m=(s-o+(s<o?7:0))*g,f+=o*g-(w.getUTCDay()*g+w.getUTCHours()*_+w.getUTCMinutes()*x+w.getUTCSeconds()*b+w.getUTCMilliseconds());break;case k:y=g,m=(s-o+(s<o?24:0))*_,f+=o*_-(w.getUTCHours()*_+w.getUTCMinutes()*x+w.getUTCSeconds()*b+w.getUTCMilliseconds());break;default:f=Math.min(i[0],i[1]),m=y=(d=Math.max(i[0],i[1]))-f}for(var T=f;T<d;T+=y)h(T,T+m)}else for(var A=a.simpleMap(p.values,t.d2c),S=0;S<A.length;S++)h(o=A[S],s=o+p.dvalue)}return u.sort((function(t,e){return t.min-e.min})),u},t.makeCalcdata=function(e,r,n){var i,o,s,l,u=t.type,c="date"===u&&e[r+"calendar"];if(r in e){if(i=e[r],l=e._length||a.minRowLength(i),a.isTypedArray(i)&&("linear"===u||"log"===u)){if(l===i.length)return i;if(i.subarray)return i.subarray(0,l)}if("multicategory"===u)return function(t,e){for(var r=new Array(e),n=0;n<e;n++){var i=(t[0]||[])[n],a=(t[1]||[])[n];r[n]=D([i,a])}return r}(i,l);for(o=new Array(l),s=0;s<l;s++)o[s]=t.d2c(i[s],0,c,n)}else{var h=r+"0"in e?t.d2c(e[r+"0"],0,c):0,p=e["d"+r]?Number(e["d"+r]):1;for(i=e[{x:"y",y:"x"}[r]],l=e._length||i.length,o=new Array(l),s=0;s<l;s++)o[s]=h+s*p}if(t.rangebreaks)for(s=0;s<l;s++)o[s]=t.maskBreaks(o[s]);return o},t.isValidRange=function(e,r){return Array.isArray(e)&&2===e.length&&(r&&null===e[0]||s(t.r2l(e[0])))&&(r&&null===e[1]||s(t.r2l(e[1])))},t.getAutorangeDflt=function(e,r){var n=!t.isValidRange(e,"nullOk");return n&&r&&r.reverseDflt?n="reversed":e&&(null===e[0]&&null===e[1]?n=!0:null===e[0]&&null!==e[1]?n="min":null!==e[0]&&null===e[1]&&(n="max")),n},t.isReversed=function(){var e=t.autorange;return"reversed"===e||"min reversed"===e||"max reversed"===e},t.isPtWithinRange=function(e,r){var n=t.c2l(e[f],null,r),i=t.r2l(t.range[0]),a=t.r2l(t.range[1]);return i<a?i<=n&&n<=a:a<=n&&n<=i},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var r=t._matchGroup;if(r){var n=null,i=null;for(var a in r){var o=e[w.id2name(a)];if(o._categories){n=o._categories,i=o._categoriesMap;break}}n&&i?(t._categories=n,t._categoriesMap=i):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var s=0;s<t._initialCategories.length;s++)E(t._initialCategories[s])},t.sortByInitialCategories=function(){var n=[];if(t._emptyCategories(),t._initialCategories)for(var i=0;i<t._initialCategories.length;i++)E(t._initialCategories[i]);n=n.concat(t._traceIndices);var a=t._matchGroup;for(var o in a)if(r!==o){var s=e[w.id2name(o)];s._categories=t._categories,s._categoriesMap=t._categoriesMap,n=n.concat(s._traceIndices)}return n};var j=e._d3locale;"date"===t.type&&(t._dateFormat=j?j.timeFormat:i,t._extraFormat=e._extraFormat),t._separators=e.separators,t._numFormat=j?j.numberFormat:o,delete t._minDtick,delete t._forceTick0}},5024:function(t){"use strict";t.exports=function(t){var e=["showexponent","showtickprefix","showticksuffix"].filter((function(e){return void 0!==t[e]}));if(e.every((function(r){return t[r]===t[e[0]]}))||1===e.length)return t[e[0]]}},5936:function(t,e,r){"use strict";var n=r(3400),i=r(6308).contrast,a=r(4724),o=r(5024),s=r(1272);function l(t,e){function r(r,i){return n.coerce(t,e,a.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(t,e,r,u,c){c||(c={});var h=r("labelalias");n.isPlainObject(h)||delete e.labelalias;var p=o(t);if(r("showticklabels")){var f=c.font||{},d=e.color,m=-1!==(e.ticklabelposition||"").indexOf("inside")?i(c.bgColor):d&&d!==a.color.dflt?d:f.color;if(n.coerceFont(r,"tickfont",{family:f.family,size:f.size,color:m}),c.noTicklabelstep||"multicategory"===u||"log"===u||r("ticklabelstep"),!c.noAng){var y=r("tickangle");c.noAutotickangles||"auto"!==y||r("autotickangles")}if("category"!==u){var v=r("tickformat");s(t,e,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:l}),e.tickformatstops.length||delete e.tickformatstops,c.noExp||v||"date"===u||(r("showexponent",p),r("exponentformat"),r("minexponent"),r("separatethousands"))}}}},5404:function(t,e,r){"use strict";var n=r(3400),i=r(4724);t.exports=function(t,e,r,a){var o=a.isMinor,s=o?t.minor||{}:t,l=o?e.minor:e,u=o?i.minor:i,c=o?"minor.":"",h=n.coerce2(s,l,u,"ticklen",o?.6*(e.ticklen||5):void 0),p=n.coerce2(s,l,u,"tickwidth",o?e.tickwidth||1:void 0),f=n.coerce2(s,l,u,"tickcolor",(o?e.tickcolor:void 0)||l.color);r(c+"ticks",!o&&a.outerTicks||h||p||f?"outside":"")||(delete l.ticklen,delete l.tickwidth,delete l.tickcolor)}},6332:function(t,e,r){"use strict";var n=r(8728),i=r(3400).isArrayOrTypedArray,a=r(8116).isTypedArraySpec,o=r(8116).decodeTypedArraySpec;t.exports=function(t,e,r,s,l){l||(l={});var u=l.isMinor,c=u?t.minor||{}:t,h=u?e.minor:e,p=u?"minor.":"";function f(t){var e=c[t];return a(e)&&(e=o(e)),void 0!==e?e:(h._template||{})[t]}var d=f("tick0"),m=f("dtick"),y=f("tickvals"),v=r(p+"tickmode",i(y)?"array":m?"linear":"auto");if("auto"===v||"sync"===v)r(p+"nticks");else if("linear"===v){var g=h.dtick=n.dtick(m,s);h.tick0=n.tick0(d,s,e.calendar,g)}else"multicategory"!==s&&(void 0===r(p+"tickvals")?h.tickmode="auto":u||r("ticktext"))}},3736:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=r(3616),s=r(4460);t.exports=function(t,e,r,l){var u=t._fullLayout;if(0!==e.length){var c,h,p,f;l&&(c=l());var d=n.ease(r.easing);return t._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(f),f=null,function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr0&&(r[o._name+".range"]=a.xr0.slice()),a.yr0&&(r[s._name+".range"]=a.yr0.slice())}return i.call("relayout",t,r).then((function(){for(var t=0;t<e.length;t++)m(e[t].plotinfo)}))}()})),h=Date.now(),f=window.requestAnimationFrame((function n(){p=Date.now();for(var a=Math.min(1,(p-h)/r.duration),o=d(a),s=0;s<e.length;s++)y(e[s],o);p-h>r.duration?(function(){for(var r={},n=0;n<e.length;n++){var a=e[n],o=a.plotinfo.xaxis,s=a.plotinfo.yaxis;a.xr1&&(r[o._name+".range"]=a.xr1.slice()),a.yr1&&(r[s._name+".range"]=a.yr1.slice())}c&&c(),i.call("relayout",t,r).then((function(){for(var t=0;t<e.length;t++)m(e[t].plotinfo)}))}(),f=window.cancelAnimationFrame(n)):f=window.requestAnimationFrame(n)})),Promise.resolve()}function m(t){var e=t.xaxis,r=t.yaxis;u._defs.select("#"+t.clipId+"> rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function y(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,u=i._length,c=l._length,h=!!e.xr1,p=!!e.yr1,f=[];if(h){var d=a.simpleMap(e.xr0,i.r2l),m=a.simpleMap(e.xr1,i.r2l),y=d[1]-d[0],v=m[1]-m[0];f[0]=(d[0]*(1-r)+r*m[0]-d[0])/(d[1]-d[0])*u,f[2]=u*(1-r+r*v/y),i.range[0]=i.l2r(d[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*m[1])}else f[0]=0,f[2]=u;if(p){var g=a.simpleMap(e.yr0,l.r2l),_=a.simpleMap(e.yr1,l.r2l),x=g[1]-g[0],b=_[1]-_[0];f[1]=(g[1]*(1-r)+r*_[1]-g[1])/(g[0]-g[1])*c,f[3]=c*(1-r+r*b/x),l.range[0]=i.l2r(g[0]*(1-r)+r*_[0]),l.range[1]=l.l2r(g[1]*(1-r)+r*_[1])}else f[1]=0,f[3]=c;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=h?u/f[2]:1,T=p?c/f[3]:1,k=h?f[0]:0,M=p?f[1]:0,A=h?f[0]/f[2]*u:0,S=p?f[1]/f[3]*c:0,L=i._offset-A,C=l._offset-S;n.clipRect.call(o.setTranslate,k,M).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,L,C).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},4944:function(t,e,r){"use strict";var n=r(4040).traceIs,i=r(2976);function a(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=a(t),i=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var u=function(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if("splom"===i.type&&i._length>0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(u)if("histogram"!==u.type||l!=={v:"y",h:"x"}[u.orientation||"v"]){var c=l+"calendar",h=u[c],p={noMultiCategory:!n(u,"cartesian")||n(u,"noMultiCategory")};if("box"===u.type&&u._hasPreCompStats&&l==={h:"x",v:"y"}[u.orientation||"v"]&&(p.noMultiCategory=!0),p.autotypenumbers=t.autotypenumbers,o(u,l)){var f=a(u),d=[];for(r=0;r<e.length;r++){var m=e[r];n(m,"box-violin")&&(m[l+"axis"]||l)===s&&(void 0!==m[f]?d.push(m[f][0]):void 0!==m.name?d.push(m.name):d.push("text"),m[c]!==h&&(h=void 0))}t.type=i(d,h,p)}else if("splom"===u.type){var y=u.dimensions[u._axesDim[s]];y.visible&&(t.type=i(y.values,h,p))}else t.type=i(u[l]||[u[l+"0"]],h,p)}else t.type="linear"}}(e,s.data),"-"===e.type?e.type="linear":t.type=e.type)}},2460:function(t,e,r){"use strict";var n=r(4040),i=r(3400);function a(t,e,r){var n,a,o,s=!1;if("data"===e.type)n=t._fullData[null!==e.traces?e.traces[0]:0];else{if("layout"!==e.type)return!1;n=t._fullLayout}return a=i.nestedProperty(n,e.prop).get(),(o=r[e.type]=r[e.type]||{}).hasOwnProperty(e.prop)&&o[e.prop]!==a&&(s=!0),o[e.prop]=a,{changed:s,value:a}}function o(t,e){var r=[],n=e[0],a={};if("string"==typeof n)a[n]=e[1];else{if(!i.isPlainObject(n))return r;a=n}return l(a,(function(t,e,n){r.push({type:"layout",prop:t,value:n})}),"",0),r}function s(t,e){var r,n,a,o,s=[];if(n=e[0],a=e[1],r=e[2],o={},"string"==typeof n)o[n]=a;else{if(!i.isPlainObject(n))return s;o=n,void 0===r&&(r=a)}return void 0===r&&(r=null),l(o,(function(e,n,i){var a,o;if(Array.isArray(i)){o=i.slice();var l=Math.min(o.length,t.data.length);r&&(l=Math.min(l,r.length)),a=[];for(var u=0;u<l;u++)a[u]=r?r[u]:u}else o=i,a=r?r.slice():null;if(null===a)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(a)){if(!Array.isArray(o)){var c=o;o=[];for(var h=0;h<a.length;h++)o[h]=c}o.length=Math.min(a.length,o.length)}s.push({type:"data",prop:e,traces:a,value:o})}),"",0),s}function l(t,e,r,n){Object.keys(t).forEach((function(a){var o=t[a];if("_"!==a[0]){var s=r+(n>0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}e.manageCommandObserver=function(t,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(u)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(u){a(t,u,s.cache),s.check=function(){if(l){var e=a(t,u,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h<c.length;h++)t._internalOn(c[h],s.check);s.remove=function(){for(var e=0;e<c.length;e++)t._removeInternalListener(c[e],s.check)}}else i.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},r&&(r._commandObserver=s),s},e.hasSimpleAPICommandBindings=function(t,r,n){var i,a,o=r.length;for(i=0;i<o;i++){var s,l=r[i],u=l.method,c=l.args;if(Array.isArray(c)||(c=[]),!u)return!1;var h=e.computeAPICommandBindings(t,u,c);if(1!==h.length)return!1;if(a){if((s=h[0]).type!==a.type)return!1;if(s.prop!==a.prop)return!1;if(Array.isArray(a.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var p=0;p<a.traces.length;p++)if(a.traces[p]!==s.traces[p])return!1}else if(s.prop!==a.prop)return!1}else a=h[0],Array.isArray(a.traces)&&a.traces.sort();var f=(s=h[0]).value;if(Array.isArray(f)){if(1!==f.length)return!1;f=f[0]}n&&(n[f]=i)}return a},e.executeAPICommand=function(t,e,r){if("skip"===e)return Promise.resolve();var a=n.apiMethodRegistry[e],o=[t];Array.isArray(r)||(r=[]);for(var s=0;s<r.length;s++)o.push(r[s]);return a.apply(null,o).catch((function(t){return i.warn("API call to Plotly."+e+" rejected.",t),Promise.reject(t)}))},e.computeAPICommandBindings=function(t,e,r){var n;switch(Array.isArray(r)||(r=[]),e){case"restyle":n=s(t,r);break;case"relayout":n=o(0,r);break;case"update":n=s(t,[r[0],r[2]]).concat(o(0,[r[1]]));break;case"animate":n=function(t,e){return Array.isArray(e[0])&&1===e[0].length&&-1!==["string","number"].indexOf(typeof e[0][0])?[{type:"layout",prop:"_currentFrame",value:e[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},6968:function(t,e,r){"use strict";var n=r(2880).extendFlat;e.u=function(t,e){e=e||{};var r={valType:"info_array",editType:(t=t||{}).editType,items:[{valType:"number",min:0,max:1,editType:t.editType},{valType:"number",min:0,max:1,editType:t.editType}],dflt:[0,1]},i=(t.name&&t.name,t.trace,e.description&&e.description,{x:n({},r,{}),y:n({},r,{}),editType:t.editType});return t.noGridCell||(i.row={valType:"integer",min:0,dflt:0,editType:t.editType},i.column={valType:"integer",min:0,dflt:0,editType:t.editType}),i},e.Q=function(t,e,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=e.grid;if(o){var s=r("domain.column");void 0!==s&&(s<o.columns?i=o._domains.x[s]:delete t.domain.column);var l=r("domain.row");void 0!==l&&(l<o.rows?a=o._domains.y[l]:delete t.domain.row)}var u=r("domain.x",i),c=r("domain.y",a);u[0]<u[1]||(t.domain.x=i.slice()),c[0]<c[1]||(t.domain.y=a.slice())}},5376:function(t){"use strict";t.exports=function(t){var e=t.editType,r=t.colorEditType;void 0===r&&(r=e);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:e},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:r},editType:e};return t.autoSize&&(n.size.dflt="auto"),t.autoColor&&(n.color.dflt="auto"),t.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},6672:function(t){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},4888:function(t,e,r){"use strict";var n=r(4040);r(3816).SUBPLOT_PATTERN;e.KY=function(t,e,r){var i=n.subplotsRegistry[e];if(!i)return[];for(var a=i.attr,o=[],s=0;s<t.length;s++){var l=t[s];l[0].trace[a]===r&&o.push(l)}return o},e._M=function(t,e,r){var i,a=[],o=[];if(!(i="string"==typeof e?n.getModule(e).plot:"function"==typeof e?e:e.plot))return[a,t];for(var s=r,l=0;l<t.length;l++){var u=t[l],c=u[0].trace,h=void 0!==c.zorder;!0===c.visible&&0!==c._length&&(!c._module||c._module.plot!==i||h&&c.zorder!==s?o.push(u):a.push(u))}return[a,o]}},4424:function(t){"use strict";function e(t,e){var r,n,i=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)i[n]+=t[4*r+n]*e[r];return i}t.exports=function(t,r){return e(t.projection,e(t.view,e(t.model,[r[0],r[1],r[2],1])))}},4859:function(t,e,r){"use strict";var n=r(5376),i=r(5656),a=r(2548),o=r(2872),s=r(4200),l=r(6741),u=r(2880).extendFlat,c=n({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=a.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:u(l({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:a.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:a.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:a.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:o.newshape,activeshape:o.activeshape,newselection:s.newselection,activeselection:s.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:u({},i.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},7552:function(t,e,r){"use strict";var n=r(2996),i="1.13.4",a='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',o=['© <a target="_blank" href="https://carto.com/">Carto</a>',a].join(" "),s=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),l={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:s,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},u=n(l);t.exports={requiredVersion:i,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:l,styleValuesNonMapbox:u,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+i+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",u.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},4270:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){var r=t.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s}return{anchor:u[0]&&u[1]?u.join("-"):u[0]?u[0]:u[1]?u[1]:"center",offset:c}}},1308:function(t,e,r){"use strict";var n=r(3480),i=r(3400),a=i.strTranslate,o=i.strScale,s=r(4888).KY,l=r(9616),u=r(3428),c=r(3616),h=r(2736),p=r(4440),f="mapbox",d=e.constants=r(7552);function m(t){return"string"==typeof t&&(-1!==d.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://")||0===t.indexOf("stamen"))}e.name=f,e.attr="subplot",e.idRoot=f,e.idRegex=e.attrRegex=i.counterRegex(f),e.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},e.layoutAttributes=r(5232),e.supplyLayoutDefaults=r(5976),e.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots[f];if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],a=[],o=!1,s=!1,l=0;l<e.length;l++){var u=r[e[l]],c=u.accesstoken;m(u.style)&&(c?i.pushUnique(n,c):(m(u._input.style)&&(i.error("Uses Mapbox map style, but did not set an access token."),o=!0),s=!0)),c&&i.pushUnique(a,c)}if(s){var h=o?d.noAccessTokenErrorMsg:d.missingStyleErrorMsg;throw i.error(h),new Error(h)}return n.length?(n.length>1&&i.warn(d.multipleTokensErrorMsg),n[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,a);n.accessToken=o;for(var l=0;l<a.length;l++){var u=a[l],c=s(r,f,u),h=e[u],y=h._subplot;y||(y=new p(t,u),e[u]._subplot=y),y.viewInitial||(y.viewInitial={center:i.extendFlat({},h.center),zoom:h.zoom,bearing:h.bearing,pitch:h.pitch}),y.plot(c,e,t._promises)}},e.clean=function(t,e,r,n){for(var i=n._subplots[f]||[],a=0;a<i.length;a++){var o=i[a];!e[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},e.toSVG=function(t){for(var e=t._fullLayout,r=e._subplots[f],n=e._size,i=0;i<r.length;i++){var s=e[r[i]],p=s.domain,m=s._subplot.toImage("png");e._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":m,x:n.l+n.w*p.x[0],y:n.t+n.h*(1-p.y[1]),width:n.w*(p.x[1]-p.x[0]),height:n.h*(p.y[1]-p.y[0]),preserveAspectRatio:"none"});var y=u.select(s._subplot.div);if(null!==y.select(".mapboxgl-ctrl-logo").node().offsetParent){var v=e._glimages.append("g");v.attr("transform",a(n.l+n.w*p.x[0]+10,n.t+n.h*(1-p.y[0])-31)),v.append("path").attr("d",d.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),v.append("path").attr("d",d.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),v.append("path").attr("d",d.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),v.append("polygon").attr("points",d.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var g=y.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),_=e._glimages.append("g"),x=_.append("text");x.text(g).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":g});var b=c.bBox(x.node()),w=n.w*(p.x[1]-p.x[0]);if(b.width>w/2){var T=g.split("|").join("<br>");x.text(T).attr("data-unformatted",T).call(h.convertToTspans,t),b=c.bBox(x.node())}x.attr("transform",a(-3,8-b.height)),_.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;b.width+6>w&&(k=w/(b.width+6));var M=[n.l+n.w*p.x[1],n.t+n.h*(1-p.y[0])];_.attr("transform",a(M[0],M[1])+o(k))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots[f],n=0;n<r.length;n++)e[r[n]]._subplot.updateFx(e)}},2360:function(t,e,r){"use strict";var n=r(3400),i=r(2736).sanitizeHTML,a=r(4270),o=r(7552);function s(t,e){this.subplot=t,this.uid=t.uid+"-"+e,this.index=e,this.idSource="source-"+this.uid,this.idLayer=o.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var l=s.prototype;function u(t){if(!t.visible)return!1;var e=t.source;if(Array.isArray(e)&&e.length>0){for(var r=0;r<e.length;r++)if("string"!=typeof e[r]||0===e[r].length)return!1;return!0}return n.isPlainObject(e)||"string"==typeof e&&e.length>0}function c(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=u(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,u(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution)),a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r<e.length;r++){var n=e[r].id;if("string"==typeof n&&0===n.indexOf(o.traceLayerPrefix)){t=n;break}}return t},l.updateLayer=function(t){var e=this.subplot,r=c(t),n=this.lookupBelow(),i=this.findFollowingMapboxLayerId(n);this.removeLayer(),u(t)&&e.addLayer({id:this.idLayer,source:this.idSource,"source-layer":t.sourcelayer||"",type:t.type,minzoom:t.minzoom,maxzoom:t.maxzoom,layout:r.layout,paint:r.paint},i),this.layerType=t.type,this.below=n},l.updateStyle=function(t){if(u(t)){var e=c(t);this.subplot.setOptions(this.idLayer,"setLayoutProperty",e.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",e.paint)}},l.removeLayer=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer)},l.dispose=function(){var t=this.subplot.map;t.getLayer(this.idLayer)&&t.removeLayer(this.idLayer),t.getSource(this.idSource)&&t.removeSource(this.idSource)},t.exports=function(t,e,r){var n=new s(t,e);return n.update(r),n}},5232:function(t,e,r){"use strict";var n=r(3400),i=r(6308).defaultLine,a=r(6968).u,o=r(5376),s=r(2904).textposition,l=r(7824).overrideAll,u=r(1780).templatedArray,c=r(7552),h=o({});h.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=l({_arrayAttrRegexps:[n.counterRegex("mapbox",".layers",!0)],domain:a({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:c.styleValuesMapbox.concat(c.styleValuesNonMapbox),dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:u("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:h,textposition:n.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},5976:function(t,e,r){"use strict";var n=r(3400),i=r(168),a=r(1272),o=r(5232);function s(t,e,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),u=r("bounds.north");void 0!==i&&void 0!==o&&void 0!==s&&void 0!==u||delete e.bounds,a(t,e,{name:"layers",handleItemDefaults:l}),e._input=t}function l(t,e){function r(r,i){return n.coerce(t,e,o.layers,r,i)}if(r("visible")){var i,a=r("sourcetype"),s="raster"===a||"image"===a;r("source"),r("sourceattribution"),"vector"===a&&r("sourcelayer"),"image"===a&&r("coordinates"),s&&(i="raster");var l=r("type",i);s&&"raster"!==l&&(l=e.type="raster",n.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),"circle"===l&&r("circle.radius"),"line"===l&&(r("line.width"),r("line.dash")),"fill"===l&&r("fill.outlinecolor"),"symbol"===l&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),n.coerceFont(r,"symbol.textfont"),r("symbol.textposition"),r("symbol.placement"))}}t.exports=function(t,e,r){i(t,e,r,{type:"mapbox",attributes:o,handleDefaults:s,partition:"y",accessToken:e._mapboxAccessToken})}},4440:function(t,e,r){"use strict";var n=r(3480),i=r(3400),a=r(7144),o=r(4040),s=r(4460),l=r(6476),u=r(3024),c=r(2760),h=c.drawMode,p=c.selectMode,f=r(2676).prepSelect,d=r(2676).clearOutline,m=r(2676).clearSelectionsCache,y=r(2676).selectOnClick,v=r(7552),g=r(2360);function _(t,e){this.id=e,this.gd=t;var r=t._fullLayout,n=t._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var x=_.prototype;x.plot=function(t,e,r){var n,i=this,a=e[i.id];i.map&&a.accesstoken!==i.accessToken&&(i.map.remove(),i.map=null,i.styleObj=null,i.traceHash={},i.layerList=[]),n=i.map?new Promise((function(r,n){i.updateMap(t,e,r,n)})):new Promise((function(r,n){i.createMap(t,e,r,n)})),r.push(n)},x.createMap=function(t,e,r,i){var o=this,s=e[o.id],l=o.styleObj=w(s.style,e);o.accessToken=s.accesstoken;var u=s.bounds,c=u?[[u.west,u.south],[u.east,u.north]]:null,h=o.map=new n.Map({container:o.div,style:l.style,center:k(s.center),zoom:s.zoom,bearing:s.bearing,pitch:s.pitch,maxBounds:c,interactive:!o.isStatic,preserveDrawingBuffer:o.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0}));h._canvas.style.left="0px",h._canvas.style.top="0px",o.rejectOnError(i),o.isStatic||o.initFx(t,e);var p=[];p.push(new Promise((function(t){h.once("load",t)}))),p=p.concat(a.fetchTraceGeoData(t)),Promise.all(p).then((function(){o.fillBelowLookup(t,e),o.updateData(t),o.updateLayout(e),o.resolveOnRender(r)})).catch(i)},x.updateMap=function(t,e,r,n){var i=this,o=i.map,s=e[this.id];i.rejectOnError(n);var l=[],u=w(s.style,e);JSON.stringify(i.styleObj)!==JSON.stringify(u)&&(i.styleObj=u,o.setStyle(u.style),i.traceHash={},l.push(new Promise((function(t){o.once("styledata",t)})))),l=l.concat(a.fetchTraceGeoData(t)),Promise.all(l).then((function(){i.fillBelowLookup(t,e),i.updateData(t),i.updateLayout(e),i.resolveOnRender(r)})).catch(n)},x.fillBelowLookup=function(t,e){var r,n,i=e[this.id].layers,a=this.belowLookup={},o=!1;for(r=0;r<t.length;r++){var s=t[r][0].trace,l=s._module;"string"==typeof s.below?n=s.below:l.getBelow&&(n=l.getBelow(s,this)),""===n&&(o=!0),a["trace-"+s.uid]=n||""}for(r=0;r<i.length;r++){var u=i[r];n="string"==typeof u.below?u.below:o?"traces":"",a["layout-"+r]=n}var c,h,p={};for(c in a)p[n=a[c]]?p[n].push(c):p[n]=[c];for(n in p){var f=p[n];if(f.length>1)for(r=0;r<f.length;r++)0===(c=f[r]).indexOf("trace-")?(h=c.split("trace-")[1],this.traceHash[h]&&(this.traceHash[h].below=null)):0===c.indexOf("layout-")&&(h=c.split("layout-")[1],this.layerList[h]&&(this.layerList[h].below=null))}};var b={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function w(t,e){var r={};if(i.isPlainObject(t))r.id=t.id,r.style=t;else if("string"==typeof t)if(r.id=t,-1!==v.styleValuesMapbox.indexOf(t))r.style=T(t);else if(v.stylesNonMapbox[t]){r.style=v.stylesNonMapbox[t];var n=r.style.sources["plotly-"+t],a=n?n.tiles:void 0;a&&a[0]&&"?api_key="===a[0].slice(-9)&&(a[0]+=e._mapboxAccessToken)}else r.style=t;else r.id=v.styleValueDflt,r.style=T(v.styleValueDflt);return r.transition={duration:0,delay:0},r}function T(t){return v.styleUrlPrefix+t+"-"+v.styleUrlSuffix}function k(t){return[t.lon,t.lat]}x.updateData=function(t){var e,r,n,i,a=this.traceHash,o=t.slice().sort((function(t,e){return b[t[0].trace.type]-b[e[0].trace.type]}));for(n=0;n<o.length;n++){var s=o[n],l=!1;(e=a[(r=s[0].trace).uid])&&(e.type===r.type?(e.update(s),l=!0):e.dispose()),!l&&r._module&&(a[r.uid]=r._module.plot(this,s))}var u=Object.keys(a);t:for(n=0;n<u.length;n++){var c=u[n];for(i=0;i<t.length;i++)if(c===(r=t[i][0].trace).uid)continue t;(e=a[c]).dispose(),delete a[c]}},x.updateLayout=function(t){var e=this.map,r=t[this.id];this.dragging||this.wheeling||(e.setCenter(k(r.center)),e.setZoom(r.zoom),e.setBearing(r.bearing),e.setPitch(r.pitch)),this.updateLayers(t),this.updateFramework(t),this.updateFx(t),this.map.resize(),this.gd._context._scrollZoom.mapbox?e.scrollZoom.enable():e.scrollZoom.disable()},x.resolveOnRender=function(t){var e=this.map;e.on("render",(function r(){e.loaded()&&(e.off("render",r),setTimeout(t,10))}))},x.rejectOnError=function(t){var e=this.map;function r(){t(new Error(v.mapOnErrorMsg))}e.once("error",r),e.once("style.error",r),e.once("source.error",r),e.once("tile.error",r),e.once("layer.error",r)},x.createFramework=function(t){var e=this,r=e.div=document.createElement("div");r.id=e.uid,r.style.position="absolute",e.container.appendChild(r),e.xaxis={_id:"x",c2p:function(t){return e.project(t).x}},e.yaxis={_id:"y",c2p:function(t){return e.project(t).y}},e.updateFramework(t),e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},s.setConvert(e.mockAxis,t)},x.initFx=function(t,e){var r=this,n=r.gd,i=r.map;function a(){u.loneUnhover(e._hoverlayer)}function s(){var t=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(t))}i.on("moveend",(function(t){if(r.map){var e=n._fullLayout;if(t.originalEvent||r.wheeling){var i=e[r.id];o.call("_storeDirectGUIEdit",n.layout,e._preGUI,r.getViewEdits(i));var a=r.getView();i._input.center=i.center=a.center,i._input.zoom=i.zoom=a.zoom,i._input.bearing=i.bearing=a.bearing,i._input.pitch=i.pitch=a.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(a))}t.originalEvent&&"mouseup"===t.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),e._rehover&&e._rehover()}})),i.on("wheel",(function(){r.wheeling=!0})),i.on("mousemove",(function(t){var e=r.div.getBoundingClientRect(),a=[t.originalEvent.offsetX,t.originalEvent.offsetY];t.target.getBoundingClientRect=function(){return e},r.xaxis.p2c=function(){return i.unproject(a).lng},r.yaxis.p2c=function(){return i.unproject(a).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&u.hover(n,t,r.id)},u.hover(n,t,r.id),n._fullLayout._hoversubplot=r.id})),i.on("dragstart",(function(){r.dragging=!0,a()})),i.on("zoomstart",a),i.on("mouseout",(function(){n._fullLayout._hoversubplot=null})),i.on("drag",s),i.on("zoom",s),i.on("dblclick",(function(){var t=n._fullLayout[r.id];o.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(t));var e=r.viewInitial;i.setCenter(k(e.center)),i.setZoom(e.zoom),i.setBearing(e.bearing),i.setPitch(e.pitch);var a=r.getView();t._input.center=t.center=a.center,t._input.zoom=t.zoom=a.zoom,t._input.bearing=t.bearing=a.bearing,t._input.pitch=t.pitch=a.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(a))})),r.clearOutline=function(){m(r.dragOptions),d(r.dragOptions.gd)},r.onClickInPanFn=function(t){return function(e){var i=n._fullLayout.clickmode;i.indexOf("select")>-1&&y(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&u.click(n,e.originalEvent)}}},x.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(u)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){f(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function u(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},x.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},x.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e<n.length;e++)n[e].dispose();for(n=this.layerList=[],e=0;e<r.length;e++)n.push(g(this,e,r[e]))}else for(e=0;e<r.length;e++)n[e].update(r[e])},x.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},x.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},x.setOptions=function(t,e,r){for(var n in r)this.map[e](t,n,r[n])},x.getMapLayers=function(){return this.map.getStyle().layers},x.addLayer=function(t,e){var r=this.map;if("string"==typeof e){if(""===e)return void r.addLayer(t,e);for(var n=this.getMapLayers(),a=0;a<n.length;a++)if(e===n[a].id)return void r.addLayer(t,e);i.warn(["Trying to add layer with *below* value",e,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(t)},x.project=function(t){return this.map.project(new n.LngLat(t[0],t[1]))},x.getView=function(){var t=this.map,e=t.getCenter(),r={lon:e.lng,lat:e.lat},n=t.getCanvas(),i=parseInt(n.style.width),a=parseInt(n.style.height);return{center:r,zoom:t.getZoom(),bearing:t.getBearing(),pitch:t.getPitch(),_derived:{coordinates:[t.unproject([0,0]).toArray(),t.unproject([i,0]).toArray(),t.unproject([i,a]).toArray(),t.unproject([0,a]).toArray()]}}},x.getViewEdits=function(t){for(var e=this.id,r=["center","zoom","bearing","pitch"],n={},i=0;i<r.length;i++){var a=r[i];n[e+"."+a]=t[a]}return n},x.getViewEditsWithDerived=function(t){var e=this.id,r=this.getViewEdits(t);return r[e+"._derived"]=t._derived,r},t.exports=_},6741:function(t){"use strict";t.exports=function(t){var e=t.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},7316:function(t,e,r){"use strict";var n=r(3428),i=r(4336).m_,a=r(7624).SO,o=r(8248),s=r(3160),l=r(4040),u=r(3060),c=r(1780),h=r(3400),p=r(6308),f=r(9032).BADNUM,d=r(9811),m=r(1936).clearOutline,y=r(5308),v=r(5656),g=r(6672),_=r(4888)._M,x=h.relinkPrivateKeys,b=h._,w=t.exports={};h.extendFlat(w,l),w.attributes=r(5464),w.attributes.type.values=w.allTypes,w.fontAttrs=r(5376),w.layoutAttributes=r(4859),w.fontWeight="normal";var T=w.transformsRegistry,k=r(2460);w.executeAPICommand=k.executeAPICommand,w.computeAPICommandBindings=k.computeAPICommandBindings,w.manageCommandObserver=k.manageCommandObserver,w.hasSimpleAPICommandBindings=k.hasSimpleAPICommandBindings,w.redrawText=function(t){return t=h.getGraphDiv(t),new Promise((function(e){setTimeout((function(){t._fullLayout&&(l.getComponentMethod("annotations","draw")(t),l.getComponentMethod("legend","draw")(t),l.getComponentMethod("colorbar","draw")(t),e(w.previousPromises(t)))}),300)}))},w.resize=function(t){var e;t=h.getGraphDiv(t);var r=new Promise((function(r,n){t&&!h.isHidden(t)||n(new Error("Resize must be passed a displayed plot div element.")),t._redrawTimer&&clearTimeout(t._redrawTimer),t._resolveResize&&(e=t._resolveResize),t._resolveResize=r,t._redrawTimer=setTimeout((function(){if(!t.layout||t.layout.width&&t.layout.height||h.isHidden(t))r(t);else{delete t.layout.width,delete t.layout.height;var e=t.changed;t.autoplay=!0,l.call("relayout",t,{autosize:!0}).then((function(){t.changed=e,t._resolveResize===r&&(delete t._resolveResize,r(t))}))}}),100)}));return e&&e(r),r},w.previousPromises=function(t){if((t._promises||[]).length)return Promise.all(t._promises).then((function(){t._promises=[]}))},w.addLinks=function(t){if(t._context.showLink||t._context.showSources){var e=t._fullLayout,r=h.ensureSingle(e._paper,"text","js-plot-link-container",(function(t){t.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:p.defaultLine,"pointer-events":"all"}).each((function(){var t=n.select(this);t.append("tspan").classed("js-link-to-tool",!0),t.append("tspan").classed("js-link-spacer",!0),t.append("tspan").classed("js-sourcelinks",!0)}))})),i=r.node(),a={y:e._paper.attr("height")-9};document.body.contains(i)&&i.getComputedTextLength()>=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){w.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var M=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function S(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a<e.length;a++){var o=e[a];i[o]||(t[o]?i[o]=t[o]:r=!1)}r&&(n=!0)}for(var o=0;o<2;o++){for(var s=t._context.locales,u=0;u<2;u++){var c=(s[r]||{}).format;if(c&&(a(c),n))break;s=l.localeRegistry}var h=r.split("-")[0];if(n||h===r)break;r=h}return n||a(l.localeRegistry.en.format),i}function L(t,e){var r={_fullLayout:e},n="x"===t._id.charAt(0),i=t._mainAxis._anchorAxis,a="",o="",s="";if(i&&(s=i._mainAxis._id,a=n?t._id+s:s+t._id),!a||!e._plots[a]){a="";for(var l=t._counterAxes,u=0;u<l.length;u++){var c=l[u],h=n?t._id+c:c+t._id;o||(o=h);var p=d.getFromId(r,c);if(s&&p.overlaying===s){a=h;break}}}return a||o}function C(t){var e=t.transforms;if(Array.isArray(e)&&e.length)for(var r=0;r<e.length;r++){var n=e[r],i=n._module||T[n.type];if(i&&i.makesData)return!0}return!1}function P(t,e,r,n){for(var i=t.transforms,a=[t],o=0;o<i.length;o++){var s=i[o],l=T[s.type];l&&l.transform&&(a=l.transform(a,{transform:s,fullTrace:t,fullData:e,layout:r,fullLayout:n,transformIndex:o}))}return a}function I(t){return"string"==typeof t&&"px"===t.substr(t.length-2)&&parseFloat(t)}function E(t){var e=t.margin;if(!t._size){var r=t._size={l:Math.round(e.l),r:Math.round(e.r),t:Math.round(e.t),b:Math.round(e.b),p:Math.round(e.pad)};r.w=Math.round(t.width)-r.l-r.r,r.h=Math.round(t.height)-r.t-r.b}t._pushmargin||(t._pushmargin={}),t._pushmarginIds||(t._pushmarginIds={}),t._reservedMargin||(t._reservedMargin={})}w.supplyDefaults=function(t,e){var r=e&&e.skipUpdateCalc,n=t._fullLayout||{};if(n._skipDefaults)delete n._skipDefaults;else{var o,s=t._fullLayout={},u=t.layout||{},c=t._fullData||[],p=t._fullData=[],f=t.data||[],d=t.calcdata||[],y=t._context||{};t._transitionData||w.createTransitionData(t),s._dfltTitle={plot:b(t,"Click to enter Plot title"),x:b(t,"Click to enter X axis title"),y:b(t,"Click to enter Y axis title"),colorbar:b(t,"Click to enter Colorscale title"),annotation:b(t,"new text")},s._traceWord=b(t,"trace");var v=S(t,M);if(s._mapboxAccessToken=y.mapboxAccessToken,n._initialAutoSizeIsDone){var g=n.width,_=n.height;w.supplyLayoutGlobalDefaults(u,s,v),u.width||(s.width=g),u.height||(s.height=_),w.sanitizeMargins(s)}else{w.supplyLayoutGlobalDefaults(u,s,v);var T=!u.width||!u.height,k=s.autosize,L=y.autosizable;T&&(k||L)?w.plotAutoSize(t,u,s):T&&w.sanitizeMargins(s),!k&&T&&(u.width=s.width,u.height=s.height)}s._d3locale=function(t,e){return t.decimal=e.charAt(0),t.thousands=e.charAt(1),{numberFormat:function(e){try{e=a(t).format(h.adjustFormat(e))}catch(t){return h.warnBadFormat(e),h.noFormat}return e},timeFormat:i(t).utcFormat}}(v,s.separators),s._extraFormat=S(t,A),s._initialAutoSizeIsDone=!0,s._dataLength=f.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var C=s._subplots=function(){var t,e,r=l.collectableSubplotTypes,n={};if(!r){r=[];var i=l.subplotsRegistry;for(var a in i){var o=i[a].attr;if(o&&(r.push(a),Array.isArray(o)))for(e=0;e<o.length;e++)h.pushUnique(r,o[e])}}for(t=0;t<r.length;t++)n[r[t]]=[];return n}(),P=s._splomAxes={x:{},y:{}},I=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._alignmentOpts={},s._colorAxes={},s._requestRangeslider={},s._traceUids=function(t,e){var r,n,i=e.length,a=[];for(r=0;r<t.length;r++){var o=t[r]._fullInput;o!==n&&a.push(o),n=o}var s=a.length,l=new Array(i),u={};function c(t,e){l[e]=t,u[t]=1}function p(t,e){if(t&&"string"==typeof t&&!u[t])return c(t,e),!0}for(r=0;r<i;r++){var f=e[r].uid;"number"==typeof f&&(f=String(f)),p(f,r)||r<s&&p(a[r].uid,r)||c(h.randstr(u),r)}return l}(c,f),s._globalTransforms=(t._context||{}).globalTransforms,w.supplyDataDefaults(f,p,u,s);var D=Object.keys(P.x),z=Object.keys(P.y);if(D.length>1&&z.length>1){for(l.getComponentMethod("grid","sizeDefaults")(u,s),o=0;o<D.length;o++)h.pushUnique(C.xaxis,D[o]);for(o=0;o<z.length;o++)h.pushUnique(C.yaxis,z[o]);for(var O in I)h.pushUnique(C.cartesian,O)}if(s._has=w._hasPlotType.bind(s),c.length===p.length)for(o=0;o<p.length;o++)x(p[o],c[o]);w.supplyLayoutModuleDefaults(u,s,p,t._transitionData);var R=s._visibleModules,F=[];for(o=0;o<R.length;o++){var B=R[o].crossTraceDefaults;B&&h.pushUnique(F,B)}for(o=0;o<F.length;o++)F[o](p,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&D.length>15&&z.length>15&&0===s.shapes.length&&0===s.images.length,w.linkSubplots(p,s,c,n),w.cleanPlot(p,s,c,n);var N=!(!n._has||!n._has("gl2d")),U=!(!s._has||!s._has("gl2d")),j=!(!n._has||!n._has("cartesian"))||N,V=!(!s._has||!s._has("cartesian"))||U;j&&!V?n._bgLayer.remove():V&&!j&&(s._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&m({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i<t.length;i++){var a=t[i];a.meta?n[a.index]=a._meta={meta:a.meta}:e.meta&&(a._meta={meta:e.meta}),e.meta&&(a._meta.layout={meta:e.meta})}n.length&&(r||(r=e._meta={}),r.data=n)}(p,s),x(s,n),l.getComponentMethod("colorscale","crossTraceDefaults")(p,s),s._preGUI||(s._preGUI={}),s._tracePreGUI||(s._tracePreGUI={});var q,H=s._tracePreGUI,G={};for(q in H)G[q]="old";for(o=0;o<p.length;o++)G[q=p[o]._fullInput.uid]||(H[q]={}),G[q]="new";for(q in G)"old"===G[q]&&delete H[q];E(s),l.getComponentMethod("rangeslider","makeData")(s),r||d.length!==p.length||w.supplyDefaultsUpdateCalc(d,p)}},w.supplyDefaultsUpdateCalc=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=(t[r]||[])[0];if(i&&i.trace){var a=i.trace;if(a._hasCalcTransform){var o,s,l,u=a._arrayAttrs;for(o=0;o<u.length;o++)s=u[o],l=h.nestedProperty(a,s).get().slice(),h.nestedProperty(n,s).set(l)}i.trace=n}}},w.createTransitionData=function(t){t._transitionData||(t._transitionData={}),t._transitionData._frames||(t._transitionData._frames=[]),t._transitionData._frameHash||(t._transitionData._frameHash={}),t._transitionData._counter||(t._transitionData._counter=0),t._transitionData._interruptCallbacks||(t._transitionData._interruptCallbacks=[])},w._hasPlotType=function(t){var e,r=this._basePlotModules||[];for(e=0;e<r.length;e++)if(r[e].name===t)return!0;var n=this._modules||[];for(e=0;e<n.length;e++){var i=n[e].name;if(i===t)return!0;var a=l.modules[i];if(a&&a.categories[t])return!0}return!1},w.cleanPlot=function(t,e,r,n){var i,a,o=n._basePlotModules||[];for(i=0;i<o.length;i++){var s=o[i];s.clean&&s.clean(t,e,r,n)}var l=n._has&&n._has("gl"),u=e._has&&e._has("gl");l&&!u&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var c=!!n._infolayer;t:for(i=0;i<r.length;i++){var h=r[i].uid;for(a=0;a<t.length;a++)if(h===t[a].uid)continue t;c&&n._infolayer.select(".cb"+h).remove()}},w.linkSubplots=function(t,e,r,n){var i,a,o=n._plots||{},s=e._plots={},u=e._subplots,c={_fullData:t,_fullLayout:e},p=u.cartesian.concat(u.gl2d||[]);for(i=0;i<p.length;i++){var f,m=p[i],y=o[m],v=d.getFromId(c,m,"x"),g=d.getFromId(c,m,"y");for(y?f=s[m]=y:(f=s[m]={}).id=m,v._counterAxes.push(g._id),g._counterAxes.push(v._id),v._subplotsWith.push(m),g._subplotsWith.push(m),f.xaxis=v,f.yaxis=g,f._hasClipOnAxisFalse=!1,a=0;a<t.length;a++){var _=t[a];if(_.xaxis===f.xaxis._id&&_.yaxis===f.yaxis._id&&!1===_.cliponaxis){f._hasClipOnAxisFalse=!0;break}}}var x,b=d.list(c,null,!0);for(i=0;i<b.length;i++){var w=null;(x=b[i]).overlaying&&(w=d.getFromId(c,x.overlaying))&&w.overlaying&&(x.overlaying=!1,w=null),x._mainAxis=w||x,w&&(x.domain=w.domain.slice()),x._anchorAxis="free"===x.anchor?null:d.getFromId(c,x.anchor)}for(i=0;i<b.length;i++)if((x=b[i])._counterAxes.sort(d.idSort),x._subplotsWith.sort(h.subplotSort),x._mainSubplot=L(x,e),x._counterAxes.length&&(x.spikemode&&-1!==x.spikemode.indexOf("across")||x.automargin&&x.mirror&&"free"!==x.anchor||l.getComponentMethod("rangeslider","isVisible")(x))){var T=1,k=0;for(a=0;a<x._counterAxes.length;a++){var M=d.getFromId(c,x._counterAxes[a]);T=Math.min(T,M.domain[0]),k=Math.max(k,M.domain[1])}T<k&&(x._counterDomainMin=T,x._counterDomainMax=k)}},w.clearExpandedTraceDefaultColors=function(t){var e,r,n;for(r=[],(e=t._module._colorAttrs)||(t._module._colorAttrs=e=[],u.crawl(t._module.attributes,(function(t,n,i,a){r[a]=n,r.length=a+1,"color"===t.valType&&void 0===t.dflt&&e.push(r.join("."))}))),n=0;n<e.length;n++)h.nestedProperty(t,"_input."+e[n]).get()||h.nestedProperty(t,e[n]).set(null)},w.supplyDataDefaults=function(t,e,r,n){var i,a,o,s=n._modules,u=n._visibleModules,p=n._basePlotModules,f=0,d=0;function m(t){e.push(t);var r=t._module;r&&(h.pushUnique(s,r),!0===t.visible&&h.pushUnique(u,r),h.pushUnique(p,t._module.basePlotModule),f++,!1!==t._input.visible&&d++)}n._transformModules=[];var y={},v=[],g=(r.template||{}).data||{},_=c.traceTemplater(g);for(i=0;i<t.length;i++){if(o=t[i],(a=_.newTrace(o)).uid=n._traceUids[i],w.supplyTraceDefaults(o,a,d,n,i),a.index=i,a._input=o,a._expandedIndex=f,a.transforms&&a.transforms.length)for(var b=!1!==o.visible&&!1===a.visible,T=P(a,e,r,n),k=0;k<T.length;k++){var M=T[k],A={_template:a._template,type:a.type,uid:a.uid+k};b&&!1===M.visible&&delete M.visible,w.supplyTraceDefaults(M,A,f,n,i),x(A,M),A.index=i,A._input=o,A._fullInput=a,A._expandedIndex=f,A._expandedInput=M,m(A)}else a._fullInput=a,a._expandedInput=a,m(a);l.traceIs(a,"carpetAxis")&&(y[a.carpet]=a),l.traceIs(a,"carpetDependent")&&v.push(i)}for(i=0;i<v.length;i++)if((a=e[v[i]]).visible){var S=y[a.carpet];a._carpet=S,S&&S.visible?(a.xaxis=S.xaxis,a.yaxis=S.yaxis):a.visible=!1}},w.supplyAnimationDefaults=function(t){var e;t=t||{};var r={};function n(e,n){return h.coerce(t||{},r,v,e,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(t.frame))for(r.frame=[],e=0;e<t.frame.length;e++)r.frame[e]=w.supplyAnimationFrameDefaults(t.frame[e]||{});else r.frame=w.supplyAnimationFrameDefaults(t.frame||{});if(Array.isArray(t.transition))for(r.transition=[],e=0;e<t.transition.length;e++)r.transition[e]=w.supplyAnimationTransitionDefaults(t.transition[e]||{});else r.transition=w.supplyAnimationTransitionDefaults(t.transition||{});return r},w.supplyAnimationFrameDefaults=function(t){var e={};function r(r,n){return h.coerce(t||{},e,v.frame,r,n)}return r("duration"),r("redraw"),e},w.supplyAnimationTransitionDefaults=function(t){var e={};function r(r,n){return h.coerce(t||{},e,v.transition,r,n)}return r("duration"),r("easing"),e},w.supplyFrameDefaults=function(t){var e={};function r(r,n){return h.coerce(t,e,g,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),e},w.supplyTraceDefaults=function(t,e,r,n,i){var a,o=n.colorway||p.defaults,s=o[r%o.length];function u(r,n){return h.coerce(t,e,w.attributes,r,n)}var c=u("visible");u("type"),u("name",n._traceWord+" "+i),u("uirevision",n.uirevision);var f=w.getModule(e);if(e._module=f,f){var d=f.basePlotModule,m=d.attr,y=d.attributes;if(m&&y){var v=n._subplots,g="";if(c||"gl2d"!==d.name){if(Array.isArray(m))for(a=0;a<m.length;a++){var _=m[a],x=h.coerce(t,e,y,_);v[_]&&h.pushUnique(v[_],x),g+=x}else g=h.coerce(t,e,y,m);v[d.name]&&h.pushUnique(v[d.name],g)}}}if(c){if(u("customdata"),u("ids"),u("meta"),l.traceIs(e,"showLegend")?(h.coerce(t,e,f.attributes.showlegend?f.attributes:w.attributes,"showlegend"),u("legend"),u("legendwidth"),u("legendgroup"),u("legendgrouptitle.text"),u("legendrank"),e._dfltShowLegend=!0):e._dfltShowLegend=!1,f&&f.supplyDefaults(t,e,s,n),l.traceIs(e,"noOpacity")||u("opacity"),l.traceIs(e,"notLegendIsolatable")&&(e.visible=!!e.visible),l.traceIs(e,"noHover")||(e.hovertemplate||h.coerceHoverinfo(t,e,n),"parcats"!==e.type&&l.getComponentMethod("fx","supplyDefaults")(t,e,s,n)),f&&f.selectPoints){var b=u("selectedpoints");h.isTypedArray(b)&&(e.selectedpoints=Array.from(b))}w.supplyTransformDefaults(t,e,n)}return e},w.hasMakesDataTransform=C,w.supplyTransformDefaults=function(t,e,r){if(e._length||C(t)){var n=r._globalTransforms||[],i=r._transformModules||[];if(Array.isArray(t.transforms)||0!==n.length)for(var a=t.transforms||[],o=n.concat(a),s=e.transforms=[],l=0;l<o.length;l++){var u,c=o[l],p=c.type,f=T[p],d=!(c._module&&c._module===f),m=f&&"function"==typeof f.transform;f||h.warn("Unrecognized transform type "+p+"."),f&&f.supplyDefaults&&(d||m)?((u=f.supplyDefaults(c,e,r,t)).type=p,u._module=f,h.pushUnique(i,f)):u=h.extendFlat({},c),s.push(u)}}},w.supplyLayoutGlobalDefaults=function(t,e,r){function n(r,n){return h.coerce(t,e,w.layoutAttributes,r,n)}var i=t.template;h.isPlainObject(i)&&(e.template=i,e._template=i.layout,e._dataTemplate=i.data),n("autotypenumbers");var a=h.coerceFont(n,"font"),o=a.size;h.coerceFont(n,"title.font",h.extendFlat({},a,{size:Math.round(1.4*o)})),n("title.text",e._dfltTitle.plot),n("title.xref");var s=n("title.yref");n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l");var u=n("title.automargin");n("title.x"),n("title.xanchor"),n("title.y"),n("title.yanchor"),u&&("paper"===s&&(0!==e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=0===e.title.y?"top":"bottom")),"container"===s&&("auto"===e.title.y&&(e.title.y=1),"auto"===e.title.yanchor&&(e.title.yanchor=e.title.y<.5?"bottom":"top"))),n("uniformtext.mode")&&n("uniformtext.minsize"),n("autosize",!(t.width&&t.height)),n("width"),n("height"),n("minreducedwidth"),n("minreducedheight"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),t.width&&t.height&&w.sanitizeMargins(e),l.getComponentMethod("grid","sizeDefaults")(t,e),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var c=n("uirevision");n("editrevision",c),n("selectionrevision",c),l.getComponentMethod("modebar","supplyLayoutDefaults")(t,e),l.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(t,e,n),l.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(t,e,n),n("meta"),h.isPlainObject(t.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),l.getComponentMethod("calendars","handleDefaults")(t,e,"calendar"),l.getComponentMethod("fx","supplyLayoutGlobalDefaults")(t,e,n),h.coerce(t,e,y,"scattermode")},w.plotAutoSize=function(t,e,r){var n,i,a=t._context||{},s=a.frameMargins,l=h.isPlotDiv(t);if(l&&t.emit("plotly_autosize"),a.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else{var u=l?window.getComputedStyle(t):{};if(n=I(u.width)||I(u.maxWidth)||r.width,i=I(u.height)||I(u.maxHeight)||r.height,o(s)&&s>0){var c=1-2*s;n=Math.round(c*n),i=Math.round(c*i)}}var p=w.layoutAttributes.width.min,f=w.layoutAttributes.height.min;n<p&&(n=p),i<f&&(i=f);var d=!e.width&&Math.abs(r.width-n)>1,m=!e.height&&Math.abs(r.height-i)>1;(m||d)&&(d&&(r.width=n),m&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,s=l.componentsRegistry,u=e._basePlotModules,c=l.subplotsRegistry.cartesian;for(i in s)(o=s[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var p in u.length||u.push(c),e._has("cartesian")&&(l.getComponentMethod("grid","contentDefaults")(t,e),c.finalizeSubplots(t,e)),e._subplots)e._subplots[p].sort(h.subplotSort);for(a=0;a<u.length;a++)(o=u[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var f=e._modules;for(a=0;a<f.length;a++)(o=f[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r);var d=e._transformModules;for(a=0;a<d.length;a++)(o=d[a]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r,n);for(i in s)(o=s[i]).supplyLayoutDefaults&&o.supplyLayoutDefaults(t,e,r)},w.purge=function(t){var e=t._fullLayout||{};void 0!==e._glcontainer&&(e._glcontainer.selectAll(".gl-canvas").remove(),e._glcontainer.remove(),e._glcanvas=null),e._modeBar&&e._modeBar.destroy(),t._transitionData&&(t._transitionData._interruptCallbacks&&(t._transitionData._interruptCallbacks.length=0),t._transitionData._animationRaf&&window.cancelAnimationFrame(t._transitionData._animationRaf)),h.clearThrottle(),h.clearResponsive(t),delete t.data,delete t.layout,delete t._fullData,delete t._fullLayout,delete t.calcdata,delete t.empty,delete t.fid,delete t.undoqueue,delete t.undonum,delete t.autoplay,delete t.changed,delete t._promises,delete t._redrawTimer,delete t._hmlumcount,delete t._hmpixcount,delete t._transitionData,delete t._transitioning,delete t._initialAutoSize,delete t._transitioningWithDuration,delete t._dragging,delete t._dragged,delete t._dragdata,delete t._hoverdata,delete t._snapshotInProgress,delete t._editing,delete t._mouseDownTime,delete t._legendMouseDownTime,t.removeAllListeners&&t.removeAllListeners()},w.style=function(t){var e,r=t._fullLayout._visibleModules,n=[];for(e=0;e<r.length;e++){var i=r[e];i.style&&h.pushUnique(n,i.style)}for(e=0;e<n.length;e++)n[e](t)},w.sanitizeMargins=function(t){if(t&&t.margin){var e,r=t.width,n=t.height,i=t.margin,a=r-(i.l+i.r),o=n-(i.t+i.b);a<0&&(e=(r-1)/(i.l+i.r),i.l=Math.floor(e*i.l),i.r=Math.floor(e*i.r)),o<0&&(e=(n-1)/(i.t+i.b),i.t=Math.floor(e*i.t),i.b=Math.floor(e*i.b))}},w.clearAutoMarginIds=function(t){t._fullLayout._pushmarginIds={}},w.allowAutoMargin=function(t,e){t._fullLayout._pushmarginIds[e]=1},w.autoMargin=function(t,e,r){var n=t._fullLayout,i=n.width,a=n.height,o=n.margin,s=n.minreducedwidth,l=n.minreducedheight,u=h.constrain(i-o.l-o.r,2,s),c=h.constrain(a-o.t-o.b,2,l),p=Math.max(0,i-u),f=Math.max(0,a-c),d=n._pushmargin,m=n._pushmarginIds;if(!1!==o.autoexpand){if(r){var y=r.pad;if(void 0===y&&(y=Math.min(12,o.l,o.r,o.t,o.b)),p){var v=(r.l+r.r)/p;v>1&&(r.l/=v,r.r/=v)}if(f){var g=(r.t+r.b)/f;g>1&&(r.t/=g,r.b/=g)}var _=void 0!==r.xl?r.xl:r.x,x=void 0!==r.xr?r.xr:r.x,b=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:_,size:r.l+y},r:{val:x,size:r.r+y},b:{val:T,size:r.b+y},t:{val:b,size:r.t+y}},m[e]=1}else delete d[e],delete m[e];if(!n._replotting)return w.doAutoMargin(t)}},w.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),E(e);var i=e._size,a=e.margin,s={t:0,b:0,l:0,r:0},u=h.extendFlat({},i),c=a.l,p=a.r,f=a.t,m=a.b,y=e._pushmargin,v=e._pushmarginIds,g=e.minreducedwidth,_=e.minreducedheight;if(!1!==a.autoexpand){for(var x in y)v[x]||delete y[x];var b=t._fullLayout._reservedMargin;for(var T in b)for(var k in b[T]){var M=b[T][k];s[k]=Math.max(s[k],M)}for(var A in y.base={l:{val:0,size:c},r:{val:1,size:p},t:{val:1,size:f},b:{val:0,size:m}},s){var S=0;for(var L in y)"base"!==L&&o(y[L][A].size)&&(S=y[L][A].size>S?y[L][A].size:S);var C=Math.max(0,a[A]-S);s[A]=Math.max(0,s[A]-C)}for(var P in y){var I=y[P].l||{},D=y[P].b||{},z=I.val,O=I.size,R=D.val,F=D.size,B=r-s.r-s.l,N=n-s.t-s.b;for(var U in y){if(o(O)&&y[U].r){var j=y[U].r.val,V=y[U].r.size;if(j>z){var q=(O*j+(V-B)*z)/(j-z),H=(V*(1-z)+(O-B)*(1-j))/(j-z);q+H>c+p&&(c=q,p=H)}}if(o(F)&&y[U].t){var G=y[U].t.val,Z=y[U].t.size;if(G>R){var Y=(F*G+(Z-N)*R)/(G-R),W=(Z*(1-R)+(F-N)*(1-G))/(G-R);Y+W>m+f&&(m=Y,f=W)}}}}}var X=h.constrain(r-a.l-a.r,2,g),J=h.constrain(n-a.t-a.b,2,_),K=Math.max(0,r-X),Q=Math.max(0,n-J);if(K){var $=(c+p)/K;$>1&&(c/=$,p/=$)}if(Q){var tt=(m+f)/Q;tt>1&&(m/=tt,f/=tt)}if(i.l=Math.round(c)+s.l,i.r=Math.round(p)+s.r,i.t=Math.round(f)+s.t,i.b=Math.round(m)+s.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(w.didMarginChange(u,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=d.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var et=3*(1+Object.keys(v).length);if(e._redrawFromAutoMarginCount<et)return l.call("_doPlot",t);e._size=u,h.warn("Too many auto-margin redraws.")}!function(t){var e=d.list(t,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach((function(t){for(var r=0;r<e.length;r++){var n=e[r][t];n&&n()}}))}(t)};var D=["l","r","t","b","p","w","h"];function z(t,e,r){var n=!1,i=[w.previousPromises,function(){if(t._transitionData)return t._transitioning=!1,function(t){var e=Promise.resolve();if(!t)return e;for(;t.length;)e=e.then(t.shift());return e}(t._transitionData._interruptCallbacks)},r.prepareFn,w.rehover,w.reselect,function(){return t.emit("plotly_transitioning",[]),new Promise((function(i){t._transitioning=!0,e.duration>0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return l.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function s(){return a++,function(){var e;o++,n||o!==a||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return l.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(s),setTimeout(s())}))}],a=h.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}w.didMarginChange=function(t,e){for(var r=0;r<D.length;r++){var n=D[r],i=t[n],a=e[n];if(!o(i)||Math.abs(a-i)>1)return!0}return!1},w.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&w.supplyDefaults(t);var o=i?t._fullData:t.data,l=i?t._fullLayout:t.layout,u=(t._transitionData||{})._frames;function c(t,e){if("function"==typeof t)return e?"_function_":null;if(h.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!h.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=c(t[a],e)}else e&&(i[a]="_function")})),i}var a=Array.isArray(t),o=h.isTypedArray(t);if((a||o)&&t.dtype&&t.shape){var l=t.bdata;return c({dtype:t.dtype,shape:t.shape,bdata:h.isArrayBuffer(l)?s.encode(l):l},e)}return a?t.map((function(t){return c(t,e)})):o?h.simpleMap(t,h.identity):h.isJSDate(t)?h.ms2DateTimeLocal(+t):t}var p={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(p.layout=c(l),i)){var f=l._size;p.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return u&&(p.frames=c(u)),a&&(p.config=c(t._context,!0)),"object"===n?p:JSON.stringify(p)},w.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r<e.length;r++)switch((n=e[r]).type){case"replace":i=n.value;var s=(a[n.index]||{}).name,l=i.name;a[n.index]=o[l]=i,l!==s&&(delete o[s],o[l]=i);break;case"insert":o[(i=n.value).name]=i,a.splice(n.index,0,i);break;case"delete":delete o[(i=a[n.index]).name],a.splice(n.index,1)}return Promise.resolve()},w.computeFrame=function(t,e){var r,n,i,a,o=t._transitionData._frameHash;if(!e)throw new Error("computeFrame must be given a string frame name");var s=o[e.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===u.indexOf(s.name);)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=w.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(c.traces||(c.traces=[]),r=0;r<s.data.length;r++)null!=(i=n[r])&&(-1===(a=c.traces.indexOf(i))&&(a=c.data.length,c.traces[a]=i),c.data[a]=w.extendTrace(c.data[a],s.data[r]))}return c},w.recomputeFrameHash=function(t){for(var e=t._transitionData._frameHash={},r=t._transitionData._frames,n=0;n<r.length;n++){var i=r[n];i&&i.name&&(e[i.name]=i)}},w.extendObjectWithContainers=function(t,e,r){var n,i,a,o,s,l,u,c=h.extendDeepNoArrays({},e||{}),p=h.expandObjectPaths(c),f={};if(r&&r.length)for(a=0;a<r.length;a++)void 0===(i=(n=h.nestedProperty(p,r[a])).get())?h.nestedProperty(f,r[a]).set(null):(n.set(null),h.nestedProperty(f,r[a]).set(i));if(t=h.extendDeepNoArrays(t||{},p),r&&r.length)for(a=0;a<r.length;a++)if(l=h.nestedProperty(f,r[a]).get()){for(u=(s=h.nestedProperty(t,r[a])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<l.length;o++){var d=l[o];u[o]=null===d?null:w.extendObjectWithContainers(u[o],d)}s.set(u)}return t},w.dataArrayContainers=["transforms","dimensions"],w.layoutArrayContainers=l.layoutArrayContainers,w.extendTrace=function(t,e){return w.extendObjectWithContainers(t,e,w.dataArrayContainers)},w.extendLayout=function(t,e){return w.extendObjectWithContainers(t,e,w.layoutArrayContainers)},w.transition=function(t,e,r,n,i,a){var o={redraw:i.redraw},s={},l=[];return o.prepareFn=function(){for(var i=Array.isArray(e)?e.length:0,a=n.slice(0,i),o=0;o<a.length;o++){var u=a[o],c=t._fullData[u]._module;if(c){if(c.animatable){var p=c.basePlotModule.name;s[p]||(s[p]=[]),s[p].push(u)}t.data[a[o]]=w.extendTrace(t.data[a[o]],e[o])}}var f=h.expandObjectPaths(h.extendDeepNoArrays({},r)),d=/^[xy]axis[0-9]*$/;for(var m in f)d.test(m)&&delete f[m].range;w.extendLayout(t.layout,f),delete t.calcdata,w.supplyDefaults(t),w.doCalcdata(t);var y=h.expandObjectPaths(r);if(y){var v=t._fullLayout._plots;for(var g in v){var _=v[g],x=_.xaxis,b=_.yaxis,T=x.range.slice(),k=b.range.slice(),M=null,A=null,S=null,L=null;Array.isArray(y[x._name+".range"])?M=y[x._name+".range"].slice():Array.isArray((y[x._name]||{}).range)&&(M=y[x._name].range.slice()),Array.isArray(y[b._name+".range"])?A=y[b._name+".range"].slice():Array.isArray((y[b._name]||{}).range)&&(A=y[b._name].range.slice()),T&&M&&(x.r2l(T[0])!==x.r2l(M[0])||x.r2l(T[1])!==x.r2l(M[1]))&&(S={xr0:T,xr1:M}),k&&A&&(b.r2l(k[0])!==b.r2l(A[0])||b.r2l(k[1])!==b.r2l(A[1]))&&(L={yr0:k,yr1:A}),(S||L)&&l.push(h.extendFlat({plotinfo:_},S,L))}}return Promise.resolve()},o.runFn=function(e){var n,i,o=t._fullLayout._basePlotModules,u=l.length;if(r)for(i=0;i<o.length;i++)o[i].transitionAxes&&o[i].transitionAxes(t,l,a,e);for(var c in u?((n=h.extendFlat({},a)).duration=0,delete s.cartesian):n=a,s){var p=s[c];t._fullData[p[0]]._module.basePlotModule.plot(t,p,n,e)}},z(t,a,o)},w.transitionFromReact=function(t,e,r,n){var i=t._fullLayout,a=i.transition,o={},s=[];return o.prepareFn=function(){var t=i._plots;for(var a in o.redraw=!1,"some"===e.anim&&(o.redraw=!0),"some"===r.anim&&(o.redraw=!0),t){var l=t[a],u=l.xaxis,c=l.yaxis,p=n[u._name].range.slice(),f=n[c._name].range.slice(),d=u.range.slice(),m=c.range.slice();u.setScale(),c.setScale();var y=null,v=null;u.r2l(p[0])===u.r2l(d[0])&&u.r2l(p[1])===u.r2l(d[1])||(y={xr0:p,xr1:d}),c.r2l(f[0])===c.r2l(m[0])&&c.r2l(f[1])===c.r2l(m[1])||(v={yr0:f,yr1:m}),(y||v)&&s.push(h.extendFlat({plotinfo:l},y,v))}return Promise.resolve()},o.runFn=function(r){for(var n,i,o,l=t._fullData,u=t._fullLayout._basePlotModules,c=[],p=0;p<l.length;p++)c.push(p);function f(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].transitionAxes&&u[e].transitionAxes(t,s,n,r)}function d(){if(t._fullLayout)for(var e=0;e<u.length;e++)u[e].plot(t,o,i,r)}s.length&&e.anim?"traces first"===a.ordering?(n=h.extendFlat({},a,{duration:0}),o=c,i=a,setTimeout(f,a.duration),d()):(n=a,o=null,i=h.extendFlat({},a,{duration:0}),setTimeout(d,n.duration),f()):s.length?(n=a,f()):e.anim&&(o=c,i=a,d())},z(t,a,o)},w.doCalcdata=function(t,e){var r,n,i,a,o=d.list(t),s=t._fullData,c=t._fullLayout,p=new Array(s.length),m=(t.calcdata||[]).slice();for(t.calcdata=p,c._numBoxes=0,c._numViolins=0,c._violinScaleGroupStats={},t._hmpixcount=0,t._hmlumcount=0,c._piecolormap={},c._sunburstcolormap={},c._treemapcolormap={},c._iciclecolormap={},c._funnelareacolormap={},i=0;i<s.length;i++)Array.isArray(e)&&-1===e.indexOf(i)&&(p[i]=m[i]);for(i=0;i<s.length;i++)(r=s[i])._arrayAttrs=u.findArrayAttributes(r),r._extremes={};var y=c._subplots.polar||[];for(i=0;i<y.length;i++)o.push(c[y[i]].radialaxis,c[y[i]].angularaxis);for(var v in c._colorAxes){var g=c[v];!1!==g.cauto&&(delete g.cmin,delete g.cmax)}var _=!1;function x(e){if(r=s[e],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var i=n.calc(t,r);i[0]&&i[0].t&&i[0].t._scene&&delete i[0].t._scene.dirty}for(a=0;a<r.transforms.length;a++){var o=r.transforms[a];(n=T[o.type])&&n.calcTransform&&(r._hasCalcTransform=!0,_=!0,n.calcTransform(t,r,o))}}}function b(e,i){if(r=s[e],!!(n=r._module).isContainer===i){var o=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var l=r.transforms||[];for(a=l.length-1;a>=0;a--)if(l[a].enabled){r._indexToPoints=l[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:f,y:f}]),o[0].t||(o[0].t={}),o[0].trace=r,p[e]=o}}for(R(o,s,c),i=0;i<s.length;i++)b(i,!0);for(i=0;i<s.length;i++)x(i);for(_&&R(o,s,c),i=0;i<s.length;i++)b(i,!0);for(i=0;i<s.length;i++)b(i,!1);F(t);var w=function(t,e){var r,n,i,a,o,s=[];function u(t,r,n){var i=r._id.charAt(0);if("histogram2dcontour"===t){var a=r._counterAxes[0],o=d.getFromId(e,a),s="x"===i||"x"===a&&"category"===o.type,l="y"===i||"y"===a&&"category"===o.type;return function(t,e){return 0===t||0===e||s&&t===n[e].length-1||l&&e===n.length-1?-1:("y"===i?e:t)-1}}return function(t,e){return"y"===i?e:t}}var c={min:function(t){return h.aggNums(Math.min,null,t)},max:function(t){return h.aggNums(Math.max,null,t)},sum:function(t){return h.aggNums((function(t,e){return t+e}),null,t)},total:function(t){return h.aggNums((function(t,e){return t+e}),null,t)},mean:function(t){return h.mean(t)},median:function(t){return h.median(t)}};function p(t,e){return t[1]-e[1]}function f(t,e){return e[1]-t[1]}for(r=0;r<t.length;r++){var m=t[r];if("category"===m.type){var y=m.categoryorder.match(O);if(y){var v=y[1],g=y[2],_=m._id.charAt(0),x="x"===_,b=[];for(n=0;n<m._categories.length;n++)b.push([m._categories[n],[]]);for(n=0;n<m._traceIndices.length;n++){var w=m._traceIndices[n],T=e._fullData[w];if(!0===T.visible){var k=T.type;l.traceIs(T,"histogram")&&(delete T._xautoBinFinished,delete T._yautoBinFinished);var M="splom"===k,A="scattergl"===k,S=e.calcdata[w];for(i=0;i<S.length;i++){var L,C,P=S[i];if(M){var I=T._axesDim[m._id];if(!x){var E=T._diag[I][0];E&&(m=e._fullLayout[d.id2name(E)])}var D=P.trace.dimensions[I].values;for(a=0;a<D.length;a++)for(L=m._categoriesMap[D[a]],o=0;o<P.trace.dimensions.length;o++)if(o!==I){var z=P.trace.dimensions[o];b[L][1].push(z.values[a])}}else if(A){for(a=0;a<P.t.x.length;a++)x?(L=P.t.x[a],C=P.t.y[a]):(L=P.t.y[a],C=P.t.x[a]),b[L][1].push(C);P.t&&P.t._scene&&delete P.t._scene.dirty}else if(P.hasOwnProperty("z")){C=P.z;var R=u(T.type,m,C);for(a=0;a<C.length;a++)for(o=0;o<C[a].length;o++)(L=R(o,a))+1&&b[L][1].push(C[a][o])}else for(void 0===(L=P.p)&&(L=P[_]),void 0===(C=P.s)&&(C=P.v),void 0===C&&(C=x?P.y:P.x),Array.isArray(C)||(C=void 0===C?[]:[C]),a=0;a<C.length;a++)b[L][1].push(C[a])}}}m._categoriesValue=b;var F=[];for(n=0;n<b.length;n++)F.push([b[n][0],c[v](b[n][1])]);F.sort("descending"===g?f:p),m._categoriesAggregatedValue=F,m._initialCategories=F.map((function(t){return t[0]})),s=s.concat(m.sortByInitialCategories())}}}return s}(o,t);if(w.length){for(c._numBoxes=0,c._numViolins=0,i=0;i<w.length;i++)b(w[i],!0);for(i=0;i<w.length;i++)b(w[i],!1);F(t)}l.getComponentMethod("fx","calc")(t),l.getComponentMethod("errorbars","calc")(t)};var O=/(total|sum|min|max|mean|median) (ascending|descending)/;function R(t,e,r){var n={};function i(t){t.clearCalc(),"multicategory"===t.type&&t.setupMultiCategory(e),n[t._id]=1}h.simpleMap(t,i);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])n[s]||i(r[d.id2name(s)])}function F(t){var e,r,n,i=t._fullLayout,a=i._visibleModules,o={};for(r=0;r<a.length;r++){var s=a[r],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;o[u]?h.pushUnique(o[u],l):o[u]=[l]}}for(n in o){var c=o[n],p=i._subplots[n];if(Array.isArray(p))for(e=0;e<p.length;e++){var f=p[e],d="cartesian"===n?i._plots[f]:i[f];for(r=0;r<c.length;r++)c[r](t,d,f)}else for(r=0;r<c.length;r++)c[r](t)}}w.rehover=function(t){t._fullLayout._rehover&&t._fullLayout._rehover()},w.redrag=function(t){t._fullLayout._redrag&&t._fullLayout._redrag()},w.reselect=function(t){var e=t._fullLayout,r=(t.layout||{}).selections,n=e._previousSelections;e._previousSelections=r;var i=e._reselect||JSON.stringify(r)!==JSON.stringify(n);l.getComponentMethod("selections","reselect")(t,i)},w.generalUpdatePerTraceModule=function(t,e,r,n){var i,a=e.traceHash,o={};for(i=0;i<r.length;i++){var s=r[i],l=s[0].trace;l.visible&&(o[l.type]=o[l.type]||[],o[l.type].push(s))}for(var u in a)if(!o[u]){var c=a[u][0];c[0].trace.visible=!1,o[u]=[c]}for(var p in o){var f=o[p];f[0][0].trace._module.plot(t,e,h.filterVisible(f),n)}e.traceHash=o},w.plotBasePlot=function(t,e,r,n,i){var a=l.getModule(t),o=_(e.calcdata,a)[0];a.plot(e,o,n,i)},w.cleanBasePlot=function(t,e,r,n,i){var a=i._has&&i._has(t),o=r._has&&r._has(t);a&&!o&&i["_"+t+"layer"].selectAll("g.trace").remove()}},168:function(t,e,r){"use strict";var n=r(3400),i=r(1780),a=r(6968).Q;t.exports=function(t,e,r,o){var s,l,u=o.type,c=o.attributes,h=o.handleDefaults,p=o.partition||"x",f=e._subplots[u],d=f.length,m=d&&f[0].replace(/\d+$/,"");function y(t,e){return n.coerce(s,l,c,t,e)}for(var v=0;v<d;v++){var g=f[v];s=t[g]?t[g]:t[g]={},l=i.newContainer(e,g,m),o.noUirevision||y("uirevision",e.uirevision);var _={};_[p]=[v/d,(v+1)/d],a(l,e,y,_),o.id=g,h(s,l,y,o)}}},1776:function(t,e,r){"use strict";var n=r(6880);function i(t){var e=t.description?" "+t.description:"",r=t.keys||[];if(r.length>0){for(var n=[],i=0;i<r.length;i++)n[i]="`"+r[i]+"`";e+="Finally, the template string has access to ",e=1===r.length?e+"variable "+n[0]:e+"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return e}n.FORMAT_LINK,n.DATE_FORMAT_LINK,e.Ks=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"none"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.Gw=function(t,e){t=t||{},i(e=e||{});var r={valType:"string",dflt:"",editType:t.editType||"calc"};return!1!==t.arrayOk&&(r.arrayOk=!0),r},e.ye=function(t,e){return e=e||{},(t=t||{}).newshape,i(e),{valType:"string",dflt:"",editType:t.editType||"arraydraw"}}},4040:function(t,e,r){"use strict";var n=r(4248),i=r(6628),a=r(2416),o=r(3620),s=r(2200).addStyleRule,l=r(2880),u=r(5464),c=r(4859),h=l.extendFlat,p=l.extendDeepAll;function f(t){var r=t.name,i=t.categories,a=t.meta;if(e.modules[r])n.log("Type "+r+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in v(t),e.subplotsRegistry[r]=t,e.componentsRegistry)x(i,t.name)}(t.basePlotModule);for(var o={},l=0;l<i.length;l++)o[i[l]]=!0,e.allCategories[i[l]]=!0;for(var u in e.modules[r]={_module:t,categories:o},a&&Object.keys(a).length&&(e.modules[r].meta=a),e.allTypes.push(r),e.componentsRegistry)g(u,r);t.layoutAttributes&&h(e.traceLayoutAttributes,t.layoutAttributes);var c=t.basePlotModule,p=c.name;if("mapbox"===p){var f=c.constants.styleRules;for(var d in f)s(".js-plotly-plot .plotly .mapboxgl-"+d,f[d])}"geo"!==p&&"mapbox"!==p||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function d(t){if("string"!=typeof t.name)throw new Error("Component module *name* must be a string.");var r=t.name;for(var n in e.componentsRegistry[r]=t,t.layoutAttributes&&(t.layoutAttributes._isLinkedToArray&&a(e.layoutArrayContainers,r),v(t)),e.modules)g(r,n);for(var i in e.subplotsRegistry)x(r,i);for(var o in e.transformsRegistry)_(r,o);t.schema&&t.schema.layout&&p(c,t.schema.layout)}function m(t){if("string"!=typeof t.name)throw new Error("Transform module *name* must be a string.");var r="Transform module "+t.name,i="function"==typeof t.transform,a="function"==typeof t.calcTransform;if(!i&&!a)throw new Error(r+" is missing a *transform* or *calcTransform* method.");for(var s in i&&a&&n.log([r+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),o(t.attributes)||n.log(r+" registered without an *attributes* object."),"function"!=typeof t.supplyDefaults&&n.log(r+" registered without a *supplyDefaults* method."),e.transformsRegistry[t.name]=t,e.componentsRegistry)_(s,t.name)}function y(t){var r=t.name,n=r.split("-")[0],i=t.dictionary,a=t.format,o=i&&Object.keys(i).length,s=a&&Object.keys(a).length,l=e.localeRegistry,u=l[r];if(u||(l[r]=u={}),n!==r){var c=l[n];c||(l[n]=c={}),o&&c.dictionary===u.dictionary&&(c.dictionary=i),s&&c.format===u.format&&(c.format=a)}o&&(u.dictionary=i),s&&(u.format=a)}function v(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n<r.length;n++)a(e.layoutArrayRegexes,r[n])}}function g(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.traces){var i=n.traces[r];i&&p(e.modules[r]._module.attributes,i)}}function _(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.transforms){var i=n.transforms[r];i&&p(e.transformsRegistry[r].attributes,i)}}function x(t,r){var n=e.componentsRegistry[t].schema;if(n&&n.subplots){var i=e.subplotsRegistry[r],a=i.layoutAttributes,o="subplot"===i.attr?i.name:i.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];a&&s&&p(a,s)}}function b(t){return"object"==typeof t&&(t=t.type),t}e.modules={},e.allCategories={},e.allTypes=[],e.subplotsRegistry={},e.transformsRegistry={},e.componentsRegistry={},e.layoutArrayContainers=[],e.layoutArrayRegexes=[],e.traceLayoutAttributes={},e.localeRegistry={},e.apiMethodRegistry={},e.collectableSubplotTypes=null,e.register=function(t){if(e.collectableSubplotTypes=null,!t)throw new Error("No argument passed to Plotly.register.");t&&!Array.isArray(t)&&(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":f(n);break;case"transform":m(n);break;case"component":d(n);break;case"locale":y(n);break;case"apiMethod":var i=n.name;e.apiMethodRegistry[i]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},e.getModule=function(t){var r=e.modules[b(t)];return!!r&&r._module},e.traceIs=function(t,r){if("various"===(t=b(t)))return!1;var i=e.modules[t];return i||(t&&n.log("Unrecognized trace type "+t+"."),i=e.modules[u.type.dflt]),!!i.categories[r]},e.getTransformIndices=function(t,e){for(var r=[],n=t.transforms||[],i=0;i<n.length;i++)n[i].type===e&&r.push(i);return r},e.hasTransform=function(t,e){for(var r=t.transforms||[],n=0;n<r.length;n++)if(r[n].type===e)return!0;return!1},e.getComponentMethod=function(t,r){var n=e.componentsRegistry[t];return n&&n[r]||i},e.call=function(){var t=arguments[0],r=[].slice.call(arguments,1);return e.apiMethodRegistry[t].apply(null,r)}},1536:function(t,e,r){"use strict";var n=r(4040),i=r(3400),a=i.extendFlat,o=i.extendDeep;function s(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}t.exports=function(t,e){var r,i,l=t.data,u=t.layout,c=o([],l),h=o({},u,s(e.tileClass)),p=t._context||{};if(e.width&&(h.width=e.width),e.height&&(h.height=e.height),"thumbnail"===e.tileClass||"themes__thumb"===e.tileClass){h.annotations=[];var f=Object.keys(h);for(r=0;r<f.length;r++)i=f[r],["xaxis","yaxis","zaxis"].indexOf(i.slice(0,5))>-1&&(h[f[r]].title={text:""});for(r=0;r<c.length;r++){var d=c[r];d.showscale=!1,d.marker&&(d.marker.showscale=!1),n.traceIs(d,"pie-like")&&(d.textposition="none")}}if(Array.isArray(e.annotations))for(r=0;r<e.annotations.length;r++)h.annotations.push(e.annotations[r]);var m=Object.keys(h).filter((function(t){return t.match(/^scene\d*$/)}));if(m.length){var y={};for("thumbnail"===e.tileClass&&(y={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<m.length;r++){var v=h[m[r]];v.xaxis||(v.xaxis={}),v.yaxis||(v.yaxis={}),v.zaxis||(v.zaxis={}),a(v.xaxis,y),a(v.yaxis,y),a(v.zaxis,y),v._scene=null}}var g=document.createElement("div");e.tileClass&&(g.className=e.tileClass);var _={gd:g,td:g,layout:h,data:c,config:{staticPlot:void 0===e.staticPlot||e.staticPlot,plotGlPixelRatio:void 0===e.plotGlPixelRatio?2:e.plotGlPixelRatio,displaylogo:e.displaylogo||!1,showLink:e.showLink||!1,showTips:e.showTips||!1,mapboxAccessToken:p.mapboxAccessToken}};return"transparent"!==e.setBackground&&(_.config.setBackground=e.setBackground||"opaque"),_.gd.defaultLayout=s(e.tileClass),_}},7412:function(t,e,r){"use strict";var n=r(3400),i=r(7024),a=r(8616),o=r(7030);t.exports=function(t,e){var r;return n.isPlainObject(t)||(r=n.getGraphDiv(t)),(e=e||{}).format=e.format||"png",e.width=e.width||null,e.height=e.height||null,e.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==e.format&&l(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var u=i(t,e),c=e.filename||t.fn||"newplot";c+="."+e.format.replace("-","."),u.then((function(t){return r&&(r._snapshotInProgress=!1),a(t,c,e.format)})).then((function(t){s(t)})).catch((function(t){r&&(r._snapshotInProgress=!1),l(t)}))}))}},8616:function(t,e,r){"use strict";var n=r(3400),i=r(7030);t.exports=function(t,e,r){var a=document.createElement("a"),o="download"in a;return new Promise((function(s,l){var u,c;if(n.isIE())return u=i.createBlob(t,"svg"),window.navigator.msSaveBlob(u,e),u=null,s(e);if(o)return u=i.createBlob(t,r),c=i.createObjectURL(u),a.href=c,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),i.revokeObjectURL(c),u=null,s(e);if(n.isSafari()){var h="svg"===r?",":";base64,";return i.octetStream(h+encodeURIComponent(t)),s(e)}l(new Error("download error"))}))}},7030:function(t,e,r){"use strict";var n=r(4040);e.getDelay=function(t){return t._has&&(t._has("gl3d")||t._has("gl2d")||t._has("mapbox"))?500:0},e.getRedrawFunc=function(t){return function(){n.getComponentMethod("colorbar","draw")(t)}},e.encodeSVG=function(t){return"data:image/svg+xml,"+encodeURIComponent(t)},e.encodeJSON=function(t){return"data:application/json,"+encodeURIComponent(t)};var i=window.URL||window.webkitURL;e.createObjectURL=function(t){return i.createObjectURL(t)},e.revokeObjectURL=function(t){return i.revokeObjectURL(t)},e.createBlob=function(t,e){if("svg"===e)return new window.Blob([t],{type:"image/svg+xml;charset=utf-8"});if("full-json"===e)return new window.Blob([t],{type:"application/json;charset=utf-8"});var r=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r),i=0;i<e;i++)n[i]=t.charCodeAt(i);return r}(window.atob(t));return new window.Blob([r],{type:"image/"+e})},e.octetStream=function(t){document.location.href="data:application/octet-stream"+t},e.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,e.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},8904:function(t,e,r){"use strict";var n=r(7030),i={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:r(1536),toSVG:r(7164),svgToImg:r(3268),toImage:r(1808),downloadImage:r(7412)};t.exports=i},3268:function(t,e,r){"use strict";var n=r(3400),i=r(1252).EventEmitter,a=r(7030);t.exports=function(t){var e=t.emitter||new i,r=new Promise((function(i,o){var s=window.Image,l=t.svg,u=t.format||"png";if(n.isIE()&&"svg"!==u){var c=new Error(a.MSG_IE_BAD_FORMAT);return o(c),t.promise?r:e.emit("error",c)}var h,p,f=t.canvas,d=t.scale||1,m=t.width||300,y=t.height||150,v=d*m,g=d*y,_=f.getContext("2d",{willReadFrequently:!0}),x=new s;"svg"===u||n.isSafari()?p=a.encodeSVG(l):(h=a.createBlob(l,"svg"),p=a.createObjectURL(h)),f.width=v,f.height=g,x.onload=function(){var r;switch(h=null,a.revokeObjectURL(p),"svg"!==u&&_.drawImage(x,0,0,v,g),u){case"jpeg":r=f.toDataURL("image/jpeg");break;case"png":r=f.toDataURL("image/png");break;case"webp":r=f.toDataURL("image/webp");break;case"svg":r=p;break;default:var n="Image format is not jpeg, png, svg or webp.";if(o(new Error(n)),!t.promise)return e.emit("error",n)}i(r),t.promise||e.emit("success",r)},x.onerror=function(r){if(h=null,a.revokeObjectURL(p),o(r),!t.promise)return e.emit("error",r)},x.src=p}));return t.promise?r:e}},1808:function(t,e,r){"use strict";var n=r(1252).EventEmitter,i=r(4040),a=r(3400),o=r(7030),s=r(1536),l=r(7164),u=r(3268);t.exports=function(t,e){var r=new n,c=s(t,{format:"png"}),h=c.gd;h.style.position="absolute",h.style.left="-5000px",document.body.appendChild(h);var p=o.getRedrawFunc(h);return i.call("_doPlot",h,c.data,c.layout,c.config).then(p).then((function(){var t=o.getDelay(h._fullLayout);setTimeout((function(){var t=l(h),n=document.createElement("canvas");n.id=a.randstr(),(r=u({format:e.format,width:h._fullLayout.width,height:h._fullLayout.height,canvas:n,emitter:r,svg:t})).clean=function(){h&&document.body.removeChild(h)}}),t)})).catch((function(t){r.emit("error",t)})),r}},7164:function(t,e,r){"use strict";var n=r(3428),i=r(3400),a=r(3616),o=r(6308),s=r(9616),l=/"/g,u="TOBESTRIPPED",c=new RegExp('("'+u+")|("+u+'")',"g");t.exports=function(t,e,r){var h,p=t._fullLayout,f=p._paper,d=p._toppaper,m=p.width,y=p.height;f.insert("rect",":first-child").call(a.setRect,0,0,m,y).call(o.fill,p.paper_bgcolor);var v=p._basePlotModules||[];for(h=0;h<v.length;h++){var g=v[h];g.toSVG&&g.toSVG(t)}if(d){var _=d.node().childNodes,x=Array.prototype.slice.call(_);for(h=0;h<x.length;h++){var b=x[h];b.childNodes.length&&f.node().appendChild(b)}}p._draggers&&p._draggers.remove(),f.node().style.background="",f.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each((function(){var t=n.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){t.style({visibility:null,display:null});var e=this.style.fontFamily;e&&-1!==e.indexOf('"')&&t.style("font-family",e.replace(l,u))}else t.remove()})),f.selectAll(".gradient_filled,.pattern_filled").each((function(){var t=n.select(this),e=this.style.fill;e&&-1!==e.indexOf("url(")&&t.style("fill",e.replace(l,u));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&t.style("stroke",r.replace(l,u))})),"pdf"!==e&&"eps"!==e||f.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),f.node().setAttributeNS(s.xmlns,"xmlns",s.svg),f.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===e&&r&&(f.attr("width",r*m),f.attr("height",r*y),f.attr("viewBox","0 0 "+m+" "+y));var w=(new window.XMLSerializer).serializeToString(f.node());return w=(w=(w=function(t){var e=n.select("body").append("div").style({display:"none"}).html(""),r=t.replace(/(&[^;]*;)/gi,(function(t){return"<"===t?"<":"&rt;"===t?">":-1!==t.indexOf("<")||-1!==t.indexOf(">")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},6376:function(t,e,r){"use strict";var n=r(8248),i=r(3400).isArrayOrTypedArray,a=r(9032).BADNUM,o=r(4040),s=r(4460),l=r(1888).getAxisGroup,u=r(2592);function c(t,e,r,o,c){if(o.length){var x,b,w,T;switch(function(t,e){var r,a;for(r=0;r<e.length;r++){var o,s=e[r],l=s[0].trace,u="funnel"===l.type?l._base:l.base,c="h"===l.orientation?l.xcalendar:l.ycalendar,h="category"===t.type||"multicategory"===t.type?function(){return null}:t.d2c;if(i(u)){for(a=0;a<Math.min(u.length,s.length);a++)o=h(u[a],0,c),n(o)?(s[a].b=+o,s[a].hasB=1):s[a].b=0;for(;a<s.length;a++)s[a].b=0}else{o=h(u,0,c);var p=n(o);for(o=p?o:0,a=0;a<s.length;a++)s[a].b=o,p&&(s[a].hasB=1)}}}(r,o),c.mode){case"overlay":h(e,r,o,c);break;case"group":for(x=[],b=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.offset?b.push(T):x.push(T);b.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:!1,overlapNoMerge:!i.norm});(function(t,e,r,n){for(var i=t._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,u=r.traces,c=u.length,h=a.length!==o.length,p=s*(1-n.gap),y=l(i,e._id)+u[0][0].trace.orientation,v=i._alignmentOpts[y]||{},g=0;g<c;g++){var _,x,b=u[g],w=b[0].trace,T=v[w.alignmentgroup]||{},k=Object.keys(T.offsetGroups||{}).length,M=(_=k?p/k:h?p/c:p)*(1-(n.groupgap||0));x=k?((2*w._offsetIndex+1-k)*_-M)/2:h?((2*g+1-c)*_-M)/2:-M/2;var A=b[0].t;A.barwidth=M,A.poffset=x,A.bargroupwidth=p,A.bardelta=s}r.binWidth=u[0][0].t.barwidth/100,f(r),d(e,r),m(e,r,h)})(t,e,o,i),function(t,e){for(var r=t.traces,n=0;n<r.length;n++){var i=r[n];if(void 0===i[0].trace.base)for(var o=new u([i],{posAxis:e,sepNegVal:!0,overlapNoMerge:!0}),s=0;s<i.length;s++){var l=i[s];if(l.p!==a){var c=o.put(l.p,l.b+l.s);c&&(l.b=c)}}}}(o,e),i.norm?(v(o),g(r,o,i)):y(r,o)}(t,e,r,b,c),x.length&&h(e,r,x,c);break;case"stack":case"relative":for(x=[],b=[],w=0;w<o.length;w++)void 0===(T=o[w])[0].trace.base?b.push(T):x.push(T);!function(t){if(!(t.length<2)){var e,r,i,a,o,s;for(e=0;e<t.length&&void 0===(a=(r=t[e][0].trace).marker?r.marker.cornerradius:void 0);e++);if(void 0!==a)for(o=n(a)?+a:+a.slice(0,-1),s=n(a)?"px":"%",e=0;e<t.length;e++)(i=t[e][0].t).cornerradiusvalue=o,i.cornerradiusform=s}}(b),b.length&&function(t,e,r,n,i){var o=new u(n,{posAxis:e,sepNegVal:"relative"===i.mode,overlapNoMerge:!(i.norm||"stack"===i.mode||"relative"===i.mode)});p(e,o,i),function(t,e,r){var n,i,o,l,u,c,h=_(t),p=e.traces;for(l=0;l<p.length;l++)if("funnel"===(i=(n=p[l])[0].trace).type)for(u=0;u<n.length;u++)(c=n[u]).s!==a&&e.put(c.p,-.5*c.s);for(l=0;l<p.length;l++){o="funnel"===(i=(n=p[l])[0].trace).type;var f=[];for(u=0;u<n.length;u++)if((c=n[u]).s!==a){var d;d=o?c.s:c.s+c.b;var m=e.put(c.p,d),y=m+d;c.b=m,c[h]=y,r.norm||(f.push(y),c.hasB&&f.push(m))}r.norm||(i._extremes[t._id]=s.findExtremes(t,f,{tozero:!0,padded:!0}))}}(r,o,i);for(var l=0;l<n.length;l++)for(var c=n[l],h=0;h<c.length;h++){var f=c[h];f.s!==a&&f.b+f.s===o.get(f.p,f.s)&&(f._outmost=!0)}i.norm&&g(r,o,i)}(0,e,r,b,c),x.length&&h(e,r,x,c)}!function(t){var e,r,i,a,o,s,l;for(e=0;e<t.length;e++)i=(r=t[e])[0].trace,void 0===(a=r[0].t).cornerradiusvalue&&void 0!==(o=i.marker?i.marker.cornerradius:void 0)&&(s=n(o)?+o:+o.slice(0,-1),l=n(o)?"px":"%",a.cornerradiusvalue=s,a.cornerradiusform=l)}(o),function(t,e){var r,a,o,s=_(e),l={},u=1/0,c=-1/0;for(r=0;r<t.length;r++)for(o=t[r],a=0;a<o.length;a++){var h=o[a].p;n(h)&&(u=Math.min(u,h),c=Math.max(c,h))}var p=1e4/(c-u),f=l.round=function(t){return String(Math.round(p*(t-u)))},d={},m={},y=t.some((function(t){var e=t[0].trace;return"marker"in e&&e.marker.cornerradius}));for(r=0;r<t.length;r++){(o=t[r])[0].t.extents=l;var v=o[0].t.poffset,g=i(v);for(a=0;a<o.length;a++){var x=o[a],b=x[s]-x.w/2;if(n(b)){var w=x[s]+x.w/2,T=f(x.p);l[T]?l[T]=[Math.min(b,l[T][0]),Math.max(w,l[T][1])]:l[T]=[b,w]}if(x.p0=x.p+(g?v[a]:v),x.p1=x.p0+x.w,x.s0=x.b,x.s1=x.s0+x.s,y){var k=Math.min(x.s0,x.s1)||0,M=Math.max(x.s0,x.s1)||0,A=x[s];d[A]=A in d?Math.min(d[A],k):k,m[A]=A in m?Math.max(m[A],M):M}}}y&&function(t,e,r,n){for(var i=_(n),a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s],u=l[i];l._sMin=e[u],l._sMax=r[u]}}(t,d,m,e)}(o,e)}}function h(t,e,r,n){for(var i=0;i<r.length;i++){var a=r[i],o=new u([a],{posAxis:t,sepNegVal:!1,overlapNoMerge:!n.norm});p(t,o,n),n.norm?(v(o),g(e,o,n)):y(e,o)}}function p(t,e,r){for(var n=e.minDiff,i=e.traces,a=n*(1-r.gap),o=a*(1-(r.groupgap||0)),s=-o/2,l=0;l<i.length;l++){var u=i[l][0].t;u.barwidth=o,u.poffset=s,u.bargroupwidth=a,u.bardelta=n}e.binWidth=i[0][0].t.barwidth/100,f(e),d(t,e),m(t,e)}function f(t){var e,r,a=t.traces;for(e=0;e<a.length;e++){var o,s=a[e],l=s[0],u=l.trace,c=l.t,h=u._offset||u.offset,p=c.poffset;if(i(h)){for(o=Array.prototype.slice.call(h,0,s.length),r=0;r<o.length;r++)n(o[r])||(o[r]=p);for(r=o.length;r<s.length;r++)o.push(p);c.poffset=o}else void 0!==h&&(c.poffset=h);var f=u._width||u.width,d=c.barwidth;if(i(f)){var m=Array.prototype.slice.call(f,0,s.length);for(r=0;r<m.length;r++)n(m[r])||(m[r]=d);for(r=m.length;r<s.length;r++)m.push(d);if(c.barwidth=m,void 0===h){for(o=[],r=0;r<s.length;r++)o.push(p+(d-m[r])/2);c.poffset=o}}else void 0!==f&&(c.barwidth=f,void 0===h&&(c.poffset=p+(d-f)/2))}}function d(t,e){for(var r=e.traces,n=_(t),a=0;a<r.length;a++)for(var o=r[a],s=o[0].t,l=s.poffset,u=i(l),c=s.barwidth,h=i(c),p=0;p<o.length;p++){var f=o[p],d=f.w=h?c[p]:c;void 0===f.p&&(f.p=f[n],f["orig_"+n]=f[n]);var m=(u?l[p]:l)+d/2;f[n]=f.p+m}}function m(t,e,r){var n=e.traces,a=e.minDiff/2;s.minDtick(t,e.minDiff,e.distinctPositions[0],r);for(var o=0;o<n.length;o++){var l,u,c,h,p=n[o],f=p[0],d=f.trace,m=[];for(h=0;h<p.length;h++)u=(l=p[h]).p-a,c=l.p+a,m.push(u,c);if(d.width||d.offset){var y=f.t,v=y.poffset,g=y.barwidth,_=i(v),x=i(g);for(h=0;h<p.length;h++){l=p[h];var b=_?v[h]:v,w=x?g[h]:g;c=(u=l.p+b)+w,m.push(u,c)}}d._extremes[t._id]=s.findExtremes(t,m,{padded:!1})}}function y(t,e){for(var r=e.traces,n=_(t),i=0;i<r.length;i++){for(var a=r[i],o=a[0].trace,l="scatter"===o.type,u="v"===o.orientation,c=[],h=!1,p=0;p<a.length;p++){var f=a[p],d=l?0:f.b,m=l?u?f.y:f.x:d+f.s;f[n]=m,c.push(m),f.hasB&&c.push(d),f.hasB&&f.b||(h=!0)}o._extremes[t._id]=s.findExtremes(t,c,{tozero:h,padded:!0})}}function v(t){for(var e=t.traces,r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++){var o=n[i];o.s!==a&&t.put(o.p,o.b+o.s)}}function g(t,e,r){var i=e.traces,o=_(t),l="fraction"===r.norm?1:100,u=l/1e9,c=t.l2c(t.c2l(0)),h="stack"===r.mode?l:c;function p(e){return n(t.c2l(e))&&(e<c-u||e>h+u||!n(c))}for(var f=0;f<i.length;f++){for(var d=i[f],m=d[0].trace,y=[],v=!1,g=!1,x=0;x<d.length;x++){var b=d[x];if(b.s!==a){var w=Math.abs(l/e.get(b.p,b.s));b.b*=w,b.s*=w;var T=b.b,k=T+b.s;b[o]=k,y.push(k),g=g||p(k),b.hasB&&(y.push(T),g=g||p(T)),b.hasB&&b.b||(v=!0)}}m._extremes[t._id]=s.findExtremes(t,y,{tozero:v,padded:g})}}function _(t){return t._id.charAt(0)}t.exports={crossTraceCalc:function(t,e){for(var r=e.xaxis,n=e.yaxis,i=t._fullLayout,a=t._fullData,s=t.calcdata,l=[],u=[],h=0;h<a.length;h++){var p=a[h];if(!0===p.visible&&o.traceIs(p,"bar")&&p.xaxis===r._id&&p.yaxis===n._id&&("h"===p.orientation?l.push(s[h]):u.push(s[h]),p._computePh))for(var f=t.calcdata[h],d=0;d<f.length;d++)"function"==typeof f[d].ph0&&(f[d].ph0=f[d].ph0()),"function"==typeof f[d].ph1&&(f[d].ph1=f[d].ph1())}var m={xCat:"category"===r.type||"multicategory"===r.type,yCat:"category"===n.type||"multicategory"===n.type,mode:i.barmode,norm:i.barnorm,gap:i.bargap,groupgap:i.bargroupgap};c(t,r,n,u,m),c(t,n,r,l,m)},setGroupPositions:c}},2592:function(t,e,r){"use strict";t.exports=i;var n=r(3400).distinctVals;function i(t,e){this.traces=t,this.sepNegVal=e.sepNegVal,this.overlapNoMerge=e.overlapNoMerge;for(var r=1/0,i=e.posAxis._id.charAt(0),a=[],o=0;o<t.length;o++){for(var s=t[o],l=0;l<s.length;l++){var u=s[l],c=u.p;void 0===c&&(c=u[i]),void 0!==c&&a.push(c)}s[0]&&s[0].width1&&(r=Math.min(s[0].width1,r))}this.positions=a;var h=n(a);this.distinctPositions=h.vals,1===h.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(h.minDiff,r);var p=(e.posAxis||{}).type;"category"!==p&&"multicategory"!==p||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}i.prototype.put=function(t,e){var r=this.getLabel(t,e),n=this.bins[r]||0;return this.bins[r]=n+e,n},i.prototype.get=function(t,e){var r=this.getLabel(t,e);return this.bins[r]||0},i.prototype.getLabel=function(t,e){return(e<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?t:Math.round(t/this.binWidth))}},3372:function(t,e,r){"use strict";var n=r(1776).Ks,i=r(6096),a=r(9084),o=r(5464),s=r(2548).defaultLine,l=r(2880).extendFlat,u=i.marker.line;t.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},u.color,{dflt:s}),width:l({},u.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:i.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(t,e,r){"use strict";var n=r(8248),i=r(9032).BADNUM,a=r(7128),o=r(148),s=r(4500);function l(t){return t&&"string"==typeof t}t.exports=function(t,e){var r,u=e._length,c=new Array(u);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var h=0;h<u;h++){var p=c[h]={},f=e.locations[h],d=e.z[h];r(f)&&n(d)?(p.loc=f,p.z=d):(p.loc=null,p.z=i),p.index=h}return o(c,e),a(t,e,{vals:e.z,containerStr:"",cLetter:"z"}),s(c,e),c}},7664:function(t){"use strict";t.exports=function(t,e,r,n,i){t.location=e.location,t.z=e.z;var a=n[i];return a.fIn&&a.fIn.properties&&(t.properties=a.fIn.properties),t.ct=a.ct,t}},4464:function(t,e,r){"use strict";var n=r(4460),i=r(3372),a=r(3400).fillText;t.exports=function(t,e,r){var o,s,l,u,c=t.cd,h=c[0].trace,p=t.subplot,f=[e,r],d=[e+360,r];for(s=0;s<c.length;s++)if(u=!1,(o=c[s])._polygons){for(l=0;l<o._polygons.length;l++)o._polygons[l].contains(f)&&(u=!u),o._polygons[l].contains(d)&&(u=!u);if(u)break}if(u&&o)return t.x0=t.x1=t.xa.c2p(o.ct),t.y0=t.y1=t.ya.c2p(o.ct),t.index=o.index,t.location=o.loc,t.z=o.z,t.zLabel=n.tickText(p.mockAxis,p.mockAxis.c2l(o.z),"hover").text,t.hovertemplate=o.hovertemplate,function(t,e,r){if(!e.hovertemplate){var n=r.hi||e.hoverinfo,o=String(r.loc),s="all"===n?i.hoverinfo.flags:n.split("+"),l=-1!==s.indexOf("name"),u=-1!==s.indexOf("location"),c=-1!==s.indexOf("z"),h=-1!==s.indexOf("text"),p=[];!l&&u?t.nameOverride=o:(l&&(t.nameOverride=e.name),u&&p.push(o)),c&&p.push(t.zLabel),h&&a(r,e,p),t.extraText=p.join("<br>")}}(t,h,o),[t]}},7328:function(t){"use strict";t.exports=function(t,e){var r,n,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)(i=(n=s[r]).ct)&&(a=l.c2p(i),o=u.c2p(i),e.contains([a,o],null,r,t)?(c.push({pointNumber:r,lon:i[0],lat:i[1]}),n.selected=1):n.selected=0);return c}},5608:function(t,e,r){"use strict";var n=r(3372),i=r(9084),a=r(1776).Ks,o=r(5464),s=r(2880).extendFlat;t.exports=s({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:s({},n.featureidkey,{}),below:{valType:"string",editType:"plot"},text:n.text,hovertext:n.hovertext,marker:{line:{color:s({},n.marker.line.color,{editType:"plot"}),width:s({},n.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:s({},n.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:s({},n.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:s({},n.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:n.hoverinfo,hovertemplate:a({},{keys:["properties"]}),showlegend:s({},o.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},3504:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(8932),o=r(3616),s=r(4808).makeBlank,l=r(7144);function u(t){var e,r=t[0].trace,n=r._opts;if(r.selectedpoints){for(var a=o.makeSelectedPointStyleFns(r),s=0;s<t.length;s++){var l=t[s];l.fOut&&(l.fOut.properties.mo2=a.selectedOpacityFn(l))}e={type:"identity",property:"mo2"}}else e=i.isArrayOrTypedArray(r.marker.opacity)?{type:"identity",property:"mo"}:r.marker.opacity;return i.extendFlat(n.fill.paint,{"fill-opacity":e}),i.extendFlat(n.line.paint,{"line-opacity":e}),n}t.exports={convert:function(t){var e=t[0].trace,r=!0===e.visible&&0!==e._length,o={layout:{visibility:"none"},paint:{}},c={layout:{visibility:"none"},paint:{}},h=e._opts={fill:o,line:c,geojson:s()};if(!r)return h;var p=l.extractTraceFeature(t);if(!p)return h;var f,d,m,y=a.makeColorScaleFuncFromTrace(e),v=e.marker,g=v.line||{};i.isArrayOrTypedArray(v.opacity)&&(f=function(t){var e=t.mo;return n(e)?+i.constrain(e,0,1):0}),i.isArrayOrTypedArray(g.color)&&(d=function(t){return t.mlc}),i.isArrayOrTypedArray(g.width)&&(m=function(t){return t.mlw});for(var _=0;_<t.length;_++){var x=t[_],b=x.fOut;if(b){var w=b.properties;w.fc=y(x.z),f&&(w.mo=f(x)),d&&(w.mlc=d(x)),m&&(w.mlw=m(x)),x.ct=w.ct,x._polygons=l.feature2polygons(b)}}var T=f?{type:"identity",property:"mo"}:v.opacity;return i.extendFlat(o.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":T}),i.extendFlat(c.paint,{"line-color":d?{type:"identity",property:"mlc"}:g.color,"line-width":m?{type:"identity",property:"mlw"}:g.width,"line-opacity":T}),o.layout.visibility="visible",c.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:p},u(t),h},convertOnSelect:u}},9352:function(t,e,r){"use strict";var n=r(3400),i=r(7260),a=r(5608);t.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s("locations"),u=s("z"),c=s("geojson");n.isArrayOrTypedArray(l)&&l.length&&n.isArrayOrTypedArray(u)&&u.length&&("string"==typeof c&&""!==c||n.isPlainObject(c))?(s("featureidkey"),e._length=Math.min(l.length,u.length),s("below"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),i(t,e,o,s,{prefix:"",cLetter:"z"}),n.coerceSelectionMarkerOpacity(e,s)):e.visible=!1}},3023:function(t,e,r){"use strict";t.exports={attributes:r(5608),supplyDefaults:r(9352),colorbar:r(6288),calc:r(7924),plot:r(1288),hoverPoints:r(4464),eventData:r(7664),selectPoints:r(7328),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.updateOnSelect(e)},getBelow:function(t,e){for(var r=e.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a<r.length;a++)if("string"==typeof(i=r[a].id)&&-1===i.indexOf("plotly-"))return i}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:r(1308),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}},1288:function(t,e,r){"use strict";var n=r(3504).convert,i=r(3504).convertOnSelect,a=r(7552).traceLayerPrefix;function o(t,e){this.type="choroplethmapbox",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["fill",a+e+"-fill"],["line",a+e+"-line"]],this.below=null}var s=o.prototype;s.update=function(t){this._update(n(t)),t[0].trace._glTrace=this},s.updateOnSelect=function(t){this._update(i(t))},s._update=function(t){var e=this.subplot,r=this.layerList,n=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(t.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(t,n),this.below=n);for(var i=0;i<r.length;i++){var a=r[i],o=a[0],s=a[1],l=t[o];e.setOptions(s,"setLayoutProperty",l.layout),"visible"===l.layout.visibility&&e.setOptions(s,"setPaintProperty",l.paint)}},s._addLayers=function(t,e){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=t[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},e)}},s._removeLayers=function(){for(var t=this.subplot.map,e=this.layerList,r=e.length-1;r>=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},t.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},3928:function(t,e,r){"use strict";var n=r(9084),i=r(1776).Ks,a=r(5464),o=r(1512),s=r(2880).extendFlat;t.exports=s({lon:o.lon,lat:o.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:o.text,hovertext:o.hovertext,hoverinfo:s({},a.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:i(),showlegend:s({},a.showlegend,{dflt:!1})},n("",{cLetter:"z",editTypeOverride:"calc"}))},8496:function(t,e,r){"use strict";var n=r(8248),i=r(3400).isArrayOrTypedArray,a=r(9032).BADNUM,o=r(7128),s=r(3400)._;t.exports=function(t,e){for(var r=e._length,l=new Array(r),u=e.z,c=i(u)&&u.length,h=0;h<r;h++){var p=l[h]={},f=e.lon[h],d=e.lat[h];if(p.lonlat=n(f)&&n(d)?[+f,+d]:[a,a],c){var m=u[h];p.z=n(m)?m:a}}return o(t,e,{vals:c?u:[0,1],containerStr:"",cLetter:"z"}),r&&(l[0].t={labels:{lat:s(t,"lat:")+" ",lon:s(t,"lon:")+" "}}),l}},4629:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(6308),o=r(8932),s=r(9032).BADNUM,l=r(4808).makeBlank;t.exports=function(t){var e=t[0].trace,r=!0===e.visible&&0!==e._length,u=e._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:l()};if(!r)return u;var c,h=[],p=e.z,f=e.radius,d=i.isArrayOrTypedArray(p)&&p.length,m=i.isArrayOrTypedArray(f);for(c=0;c<t.length;c++){var y=t[c],v=y.lonlat;if(v[0]!==s){var g={};if(d){var _=y.z;g.z=_!==s?_:0}m&&(g.r=n(f[c])&&f[c]>0?+f[c]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:g})}}var x=o.extractOpts(e),b=x.reversescale?o.flipScale(x.colorscale):x.colorscale,w=b[0][1],T=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(c=1;c<b.length;c++)T.push(b[c][0],b[c][1]);var k=["interpolate",["linear"],["get","z"],x.min,0,x.max,1];return i.extendFlat(u.heatmap.paint,{"heatmap-weight":d?k:1/(x.max-x.min),"heatmap-color":T,"heatmap-radius":m?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),u.geojson={type:"FeatureCollection",features:h},u.heatmap.layout.visibility="visible",u}},5284:function(t,e,r){"use strict";var n=r(3400),i=r(7260),a=r(3928);t.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s("lon")||[],u=s("lat")||[],c=Math.min(l.length,u.length);c?(e._length=c,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},6176:function(t){"use strict";t.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},5336:function(t,e,r){"use strict";var n=r(4460),i=r(3312).hoverPoints,a=r(3312).getExtraText;t.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,u=l[0].trace,c=l[s.index];if(delete s.color,"z"in c){var h=s.subplot.mockAxis;s.z=c.z,s.zLabel=n.tickText(h,h.c2l(c.z),"hover").text}return s.extraText=a(u,c,l[0].t.labels),[s]}}},5088:function(t,e,r){"use strict";t.exports={attributes:r(3928),supplyDefaults:r(5284),colorbar:r(6288),formatLabels:r(1960),calc:r(8496),plot:r(5256),hoverPoints:r(5336),eventData:r(6176),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n<r.length;n++){var i=r[n],a=i.id;if("symbol"===i.type&&"string"==typeof a&&-1===a.indexOf("plotly-"))return a}},moduleType:"trace",name:"densitymapbox",basePlotModule:r(1308),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},5256:function(t,e,r){"use strict";var n=r(4629),i=r(7552).traceLayerPrefix;function a(t,e){this.type="densitymapbox",this.subplot=t,this.uid=e,this.sourceId="source-"+e,this.layerList=[["heatmap",i+e+"-heatmap"]],this.below=null}var o=a.prototype;o.update=function(t){var e=this.subplot,r=this.layerList,i=n(t),a=e.belowLookup["trace-"+this.uid];e.map.getSource(this.sourceId).setData(i.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(i,a),this.below=a);for(var o=0;o<r.length;o++){var s=r[o],l=s[0],u=s[1],c=i[l];e.setOptions(u,"setLayoutProperty",c.layout),"visible"===c.layout.visibility&&e.setOptions(u,"setPaintProperty",c.paint)}},o._addLayers=function(t,e){for(var r=this.subplot,n=this.layerList,i=this.sourceId,a=0;a<n.length;a++){var o=n[a],s=o[0],l=t[s];r.addLayer({type:s,id:o[1],source:i,layout:l.layout,paint:l.paint},e)}},o._removeLayers=function(){for(var t=this.subplot.map,e=this.layerList,r=e.length-1;r>=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},t.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},6288:function(t){"use strict";t.exports={min:"zmin",max:"zmax"}},1552:function(t,e,r){"use strict";var n=r(3616),i=r(6308);t.exports=function(t,e,r,a){var o=r.marker.pattern;o&&o.shape?n.pointStyle(t,r,a,e):i.fill(t,e.color)}},9656:function(t,e,r){"use strict";var n=r(3400);function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}e.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},e.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},e.getFirstFilled=function(t,e){if(n.isArrayOrTypedArray(t))for(var r=0;r<e.length;r++){var i=t[e[r]];if(i||0===i||""===i)return i}},e.castOption=function(t,r){return n.isArrayOrTypedArray(t)?e.getFirstFilled(t,r):t||void 0},e.getRotationAngle=function(t){return("auto"===t?0:t)*Math.PI/180}},528:function(t,e,r){"use strict";var n=r(6308),i=r(9656).castOption,a=r(1552);t.exports=function(t,e,r,o){var s=r.marker.line,l=i(s.color,e.pts)||n.defaultLine,u=i(s.width,e.pts)||0;t.call(a,e,r,o).style("stroke-width",u).call(n.stroke,l)}},148:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){for(var r=0;r<t.length;r++)t[r].i=r;n.mergeArray(e.text,t,"tx"),n.mergeArray(e.texttemplate,t,"txt"),n.mergeArray(e.hovertext,t,"htx"),n.mergeArray(e.customdata,t,"data"),n.mergeArray(e.textposition,t,"tp"),e.textfont&&(n.mergeArrayCastPositive(e.textfont.size,t,"ts"),n.mergeArray(e.textfont.color,t,"tc"),n.mergeArray(e.textfont.family,t,"tf"));var i=e.marker;if(i){n.mergeArrayCastPositive(i.size,t,"ms"),n.mergeArrayCastPositive(i.opacity,t,"mo"),n.mergeArray(i.symbol,t,"mx"),n.mergeArray(i.angle,t,"ma"),n.mergeArray(i.standoff,t,"mf"),n.mergeArray(i.color,t,"mc");var a=i.line;i.line&&(n.mergeArray(a.color,t,"mlc"),n.mergeArrayCastPositive(a.width,t,"mlw"));var o=i.gradient;o&&"none"!==o.type&&(n.mergeArray(o.type,t,"mgt"),n.mergeArray(o.color,t,"mgc"))}}},2904:function(t,e,r){"use strict";var n=r(9736).axisHoverFormat,i=r(1776).Gw,a=r(1776).Ks,o=r(9084),s=r(5376),l=r(8192).u,u=r(8192).c,c=r(3616),h=r(8200),p=r(2880).extendFlat,f=r(3544);t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:n("x"),yhoverformat:n("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:i({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:a({},{keys:h.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:p({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:f(!0),fillgradient:p({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:u,marker:p({symbol:{valType:"enumerated",values:c.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:p({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},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"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}},6356:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(4460),o=r(1220),s=r(9032).BADNUM,l=r(3028),u=r(136),c=r(148),h=r(4500);function p(t,e,r,n,i,o,s){var u=e._length,c=t._fullLayout,h=r._id,p=n._id,f=c._firstScatter[m(e)]===e.uid,d=(y(e,c,r,n)||{}).orientation,v=e.fill;r._minDtick=0,n._minDtick=0;var g={padded:!0},_={padded:!0};s&&(g.ppad=_.ppad=s);var x=u<2||i[0]!==i[u-1]||o[0]!==o[u-1];x&&("tozerox"===v||"tonextx"===v&&(f||"h"===d))?g.tozero=!0:(e.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(l.hasMarkers(e)||l.hasText(e))||(g.padded=!1,g.ppad=0),x&&("tozeroy"===v||"tonexty"===v&&(f||"v"===d))?_.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(_.padded=!1),h&&(e._extremes[h]=a.findExtremes(r,i,g)),p&&(e._extremes[p]=a.findExtremes(n,o,_))}function f(t,e){if(l.hasMarkers(t)){var r,n=t.marker,o=1.6*(t.marker.sizeref||1);if(r="area"===t.marker.sizemode?function(t){return Math.max(Math.sqrt((t||0)/o),3)}:function(t){return Math.max((t||0)/o,3)},i.isArrayOrTypedArray(n.size)){var s={type:"linear"};a.setConvert(s);for(var u=s.makeCalcdata(t.marker,"size"),c=new Array(e),h=0;h<e;h++)c[h]=r(u[h]);return c}return r(n.size)}}function d(t,e){var r=m(e),n=t._firstScatter;n[r]||(n[r]=e.uid)}function m(t){var e=t.stackgroup;return t.xaxis+t.yaxis+t.type+(e?"-"+e:"")}function y(t,e,r,n){var i=t.stackgroup;if(i){var a=e._scatterStackOpts[r._id+n._id][i],o="v"===a.orientation?n:r;return"linear"===o.type||"log"===o.type?a:void 0}}t.exports={calc:function(t,e){var r,l,m,v,g,_,x=t._fullLayout,b=e._xA=a.getFromId(t,e.xaxis||"x","x"),w=e._yA=a.getFromId(t,e.yaxis||"y","y"),T=b.makeCalcdata(e,"x"),k=w.makeCalcdata(e,"y"),M=o(e,b,"x",T),A=o(e,w,"y",k),S=M.vals,L=A.vals,C=e._length,P=new Array(C),I=e.ids,E=y(e,x,b,w),D=!1;d(x,e);var z,O="x",R="y";E?(i.pushUnique(E.traceIndices,e._expandedIndex),(r="v"===E.orientation)?(R="s",z="x"):(O="s",z="y"),g="interpolate"===E.stackgaps):p(t,e,b,w,S,L,f(e,C));var F=!!e.xperiodalignment,B=!!e.yperiodalignment;for(l=0;l<C;l++){var N=P[l]={},U=n(S[l]),j=n(L[l]);U&&j?(N[O]=S[l],N[R]=L[l],F&&(N.orig_x=T[l],N.xEnd=M.ends[l],N.xStart=M.starts[l]),B&&(N.orig_y=k[l],N.yEnd=A.ends[l],N.yStart=A.starts[l])):E&&(r?U:j)?(N[z]=r?S[l]:L[l],N.gap=!0,g?(N.s=s,D=!0):N.s=0):N[O]=N[R]=s,I&&(N.id=String(I[l]))}if(c(P,e),u(t,e),h(P,e),E){for(l=0;l<P.length;)P[l][z]===s?P.splice(l,1):l++;if(i.sort(P,(function(t,e){return t[z]-e[z]||t.i-e.i})),D){for(l=0;l<P.length-1&&P[l].gap;)l++;for((_=P[l].s)||(_=P[l].s=0),m=0;m<l;m++)P[m].s=_;for(v=P.length-1;v>l&&P[v].gap;)v--;for(_=P[v].s,m=P.length-1;m>v;m--)P[m].s=_;for(;l<v;)if(P[++l].gap){for(m=l+1;P[m].gap;)m++;for(var V=P[l-1][z],q=P[l-1].s,H=(P[m].s-q)/(P[m][z]-V);l<m;)P[l].s=q+(P[l][z]-V)*H,l++}}}return P},calcMarkerSize:f,calcAxisExpansion:p,setFirstScatter:d,getStackOpts:y}},4500:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e){n.isArrayOrTypedArray(e.selectedpoints)&&n.tagSelected(t,e)}},136:function(t,e,r){"use strict";var n=r(4288).hasColorscale,i=r(7128),a=r(3028);t.exports=function(t,e){a.hasLines(e)&&n(e,"line")&&i(t,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),a.hasMarkers(e)&&(n(e,"marker")&&i(t,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),n(e,"marker.line")&&i(t,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},8200:function(t){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},6664:function(t,e,r){"use strict";var n=r(6356),i=r(6376).setGroupPositions;function a(t,e,r,n,i,a,o){i[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,t.splice(e,0,s),e&&r===t[e-1][o]){var l=t[e-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=function(t,e,r,n){var i=t[e-1],a=t[e+1];return a?i?i.s+(a.s-i.s)*(r-i[n])/(a[n]-i[n]):a.s:i.s}(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)}t.exports=function(t,e){"group"===t._fullLayout.scattermode&&function(t,e){for(var r=e.xaxis,n=e.yaxis,a=t._fullLayout,o=t._fullData,s=t.calcdata,l=[],u=[],c=0;c<o.length;c++){var h=o[c];!0===h.visible&&"scatter"===h.type&&h.xaxis===r._id&&h.yaxis===n._id&&("h"===h.orientation?l.push(s[c]):"v"===h.orientation&&u.push(s[c]))}var p={mode:a.scattermode,gap:a.scattergap};i(t,r,n,u,p),i(t,n,r,l,p)}(t,e);var r=e.xaxis,o=e.yaxis,s=r._id+o._id,l=t._fullLayout._scatterStackOpts[s];if(l){var u,c,h,p,f,d,m,y,v,g,_,x,b,w,T,k=t.calcdata;for(var M in l){var A=(g=l[M]).traceIndices;if(A.length){for(_="interpolate"===g.stackgaps,x=g.groupnorm,"v"===g.orientation?(b="x",w="y"):(b="y",w="x"),T=new Array(A.length),u=0;u<T.length;u++)T[u]=!1;d=k[A[0]];var S=new Array(d.length);for(u=0;u<d.length;u++)S[u]=d[u][b];for(u=1;u<A.length;u++){for(f=k[A[u]],c=h=0;c<f.length;c++){for(m=f[c][b];m>S[h]&&h<S.length;h++)a(f,c,S[h],u,T,_,b),c++;if(m!==S[h]){for(p=0;p<u;p++)a(k[A[p]],h,m,p,T,_,b);S.splice(h,0,m)}h++}for(;h<S.length;h++)a(f,c,S[h],u,T,_,b),c++}var L=S.length;for(c=0;c<d.length;c++){for(y=d[c][w]=d[c].s,u=1;u<A.length;u++)(f=k[A[u]])[0].trace._rawLength=f[0].trace._length,f[0].trace._length=L,y+=f[c].s,f[c][w]=y;if(x)for(v=("fraction"===x?y:y/100)||1,u=0;u<A.length;u++){var C=k[A[u]][c];C[w]/=v,C.sNorm=C.s/v}}for(u=0;u<A.length;u++){var P=(f=k[A[u]])[0].trace,I=n.calcMarkerSize(P,P._rawLength),E=Array.isArray(I);if(I&&T[u]||E){var D=I;for(I=new Array(L),c=0;c<L;c++)I[c]=f[c].gap?0:E?D[f[c].i]:D}var z=new Array(L),O=new Array(L);for(c=0;c<L;c++)z[c]=f[c].x,O[c]=f[c].y;n.calcAxisExpansion(t,P,r,o,z,O,I),f[0].t.orientation=g.orientation}}}}}},5036:function(t,e,r){"use strict";var n=r(3400),i=r(11),a=r(2904);t.exports=function(t,e){var r,o,s;function l(t){return n.coerce(o._input,o,a,t)}if("group"===e.scattermode)for(s=0;s<t.length;s++)"scatter"===(o=t[s]).type&&(r=o._input,i(r,o,e,l));for(s=0;s<t.length;s++){var u=t[s];if("scatter"===u.type){var c=u.fill;if("none"!==c&&"toself"!==c&&(u.opacity=void 0,"tonexty"===c||"tonextx"===c))for(var h=s-1;h>=0;h--){var p=t[h];if("scatter"===p.type&&p.xaxis===u.xaxis&&p.yaxis===u.yaxis){p.opacity=void 0;break}}}}}},8800:function(t,e,r){"use strict";var n=r(3400),i=r(4040),a=r(2904),o=r(8200),s=r(3028),l=r(3980),u=r(1147),c=r(3912),h=r(4428),p=r(6828),f=r(1731),d=r(124),m=r(840),y=r(3400).coercePattern;t.exports=function(t,e,r,v){function g(r,i){return n.coerce(t,e,a,r,i)}var _=l(t,e,v,g);if(_||(e.visible=!1),e.visible){u(t,e,v,g),g("xhoverformat"),g("yhoverformat"),g("zorder");var x=c(t,e,v,g);"group"===v.scattermode&&void 0===e.orientation&&g("orientation","v");var b=!x&&_<o.PTS_LINESONLY?"lines+markers":"lines";g("text"),g("hovertext"),g("mode",b),s.hasMarkers(e)&&h(t,e,r,v,g,{gradient:!0}),s.hasLines(e)&&(p(t,e,r,v,g,{backoff:!0}),f(t,e,g),g("connectgaps"),g("line.simplify")),s.hasText(e)&&(g("texttemplate"),d(t,e,v,g));var w=[];(s.hasMarkers(e)||s.hasText(e))&&(g("cliponaxis"),g("marker.maxdisplayed"),w.push("points")),g("fill",x?x.fillDflt:"none"),"none"!==e.fill&&(m(t,e,r,g,{moduleHasFillgradient:!0}),s.hasLines(e)||f(t,e,g),y(g,"fillpattern",e.fillcolor,!1));var T=(e.line||{}).color,k=(e.marker||{}).color;"tonext"!==e.fill&&"toself"!==e.fill||w.push("fills"),g("hoveron",w.join("+")||"points"),"fills"!==e.hoveron&&g("hovertemplate");var M=i.getComponentMethod("errorbars","supplyDefaults");M(t,e,T||k||r,{axis:"y"}),M(t,e,T||k||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(e,g)}}},3544:function(t){"use strict";t.exports=function(t){return{valType:"color",editType:"style",anim:!0}}},840:function(t,e,r){"use strict";var n=r(6308),i=r(3400).isArrayOrTypedArray;t.exports=function(t,e,r,a,o){o||(o={});var s,l=!1;if(e.marker){var u=e.marker.color,c=(e.marker.line||{}).color;u&&!i(u)?l=u:c&&!i(c)&&(l=c)}if(o.moduleHasFillgradient&&"none"!==a("fillgradient.type")){a("fillgradient.start"),a("fillgradient.stop");var h=a("fillgradient.colorscale");h&&(s=function(t){for(var e=n.interpolate(t[0][1],t[1][1],.5),r=2;r<t.length;r++){var i=n.interpolate(t[r-1][1],t[r][1],.5);e=n.interpolate(e,i,t[r-1][0]/t[r][0])}return e}(h))}a("fillcolor",n.addOpacity((e.line||{}).color||l||s||r,.5))}},6688:function(t,e,r){"use strict";var n=r(4460);t.exports=function(t,e,r){var i={},a={_fullLayout:r},o=n.getFromTrace(a,e,"x"),s=n.getFromTrace(a,e,"y"),l=t.orig_x;void 0===l&&(l=t.x);var u=t.orig_y;return void 0===u&&(u=t.y),i.xLabel=n.tickText(o,o.c2l(l),!0).text,i.yLabel=n.tickText(s,s.c2l(u),!0).text,i}},4928:function(t,e,r){"use strict";var n=r(6308),i=r(3028);t.exports=function(t,e){var r,a;if("lines"===t.mode)return(r=t.line.color)&&n.opacity(r)?r:t.fillcolor;if("none"===t.mode)return t.fill?t.fillcolor:"";var o=e.mcc||(t.marker||{}).color,s=e.mlcc||((t.marker||{}).line||{}).color;return(a=o&&n.opacity(o)?o:s&&n.opacity(s)&&(e.mlw||((t.marker||{}).line||{}).width)?s:"")?n.opacity(a)<.3?n.addOpacity(a,.3):a:(r=(t.line||{}).color)&&n.opacity(r)&&i.hasLines(t)&&t.line.width?r:t.fillcolor}},11:function(t,e,r){"use strict";var n=r(1888).getAxisGroup;t.exports=function(t,e,r,i){var a=e.orientation,o=e[{v:"x",h:"y"}[a]+"axis"],s=n(r,o)+a,l=r._alignmentOpts||{},u=i("alignmentgroup"),c=l[s];c||(c=l[s]={});var h=c[u];h?h.traces.push(e):h=c[u]={traces:[e],alignmentIndex:Object.keys(c).length,offsetGroups:{}};var p=i("offsetgroup"),f=h.offsetGroups,d=f[p];p&&(d||(d=f[p]={offsetIndex:Object.keys(f).length}),e._offsetIndex=d.offsetIndex)}},8723:function(t,e,r){"use strict";var n=r(3400),i=r(3024),a=r(4040),o=r(4928),s=r(6308),l=n.fillText;t.exports=function(t,e,r,u){var c=t.cd,h=c[0].trace,p=t.xa,f=t.ya,d=p.c2p(e),m=f.c2p(r),y=[d,m],v=h.hoveron||"",g=-1!==h.mode.indexOf("markers")?3:.5,_=!!h.xperiodalignment,x=!!h.yperiodalignment;if(-1!==v.indexOf("points")){var b=function(t){var e=Math.max(g,t.mrc||0),r=p.c2p(t.x)-d,n=f.c2p(t.y)-m;return Math.max(Math.sqrt(r*r+n*n)-e,1-g/e)},w=i.getDistanceFunction(u,(function(t){if(_){var e=p.c2p(t.xStart),r=p.c2p(t.xEnd);return d>=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.x)-d);return a<n?i*a/n:a-n+i}),(function(t){if(x){var e=f.c2p(t.yStart),r=f.c2p(t.yEnd);return m>=Math.min(e,r)&&m<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(f.c2p(t.y)-m);return a<n?i*a/n:a-n+i}),b);if(i.getClosest(c,w,t),!1!==t.index){var T=c[t.index],k=p.c2p(T.x,!0),M=f.c2p(T.y,!0),A=T.mrc||1;t.index=T.i;var S=c[0].t.orientation,L=S&&(T.sNorm||T.s),C="h"===S?L:void 0!==T.orig_x?T.orig_x:T.x,P="v"===S?L:void 0!==T.orig_y?T.orig_y:T.y;return n.extendFlat(t,{color:o(h,T),x0:k-A,x1:k+A,xLabelVal:C,y0:M-A,y1:M+A,yLabelVal:P,spikeDistance:b(T),hovertemplate:h.hovertemplate}),l(T,h,t),a.getComponentMethod("errorbars","hoverInfo")(T,h,t),[t]}}function I(t){if(!t)return!1;var e=t.node();try{var r=new DOMPoint(y[0],y[1]);return e.isPointInFill(r)}catch(t){var n=e.ownerSVGElement.createSVGPoint();return n.x=y[0],n.y=y[1],e.isPointInFill(n)}}if(-1!==v.indexOf("fills")&&h._fillElement&&I(h._fillElement)&&!I(h._fillExclusionElement)){var E=function(t){var e,r,n,i,a,o,s,l,u,c=[],h=1/0,d=-1/0,m=1/0,v=-1/0;for(e=0;e<t.length;e++){var g=t[e];g.contains(y)&&(c.push(g),m=Math.min(m,g.ymin),v=Math.max(v,g.ymax))}if(0===c.length)return null;for(r=((m=Math.max(m,0))+(v=Math.min(v,f._length)))/2,e=0;e<c.length;e++)for(i=c[e].pts,n=1;n<i.length;n++)(l=i[n-1][1])>r!=(u=i[n][1])>=r&&(o=i[n-1][0],s=i[n][0],u-l&&(a=o+(s-o)*(r-l)/(u-l),h=Math.min(h,a),d=Math.max(d,a)));return{x0:h=Math.max(h,0),x1:d=Math.min(d,p._length),y0:r,y1:r}}(h._polygons);null===E&&(E={x0:y[0],x1:y[0],y0:y[1],y1:y[1]});var D=s.defaultLine;return s.opacity(h.fillcolor)?D=h.fillcolor:s.opacity((h.line||{}).color)&&(D=h.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:E.x0,x1:E.x1,y0:E.y0,y1:E.y1,color:D,hovertemplate:!1}),delete t.index,h.text&&!n.isArrayOrTypedArray(h.text)?t.text=String(h.text):t.text=h.name,[t]}}},5875:function(t,e,r){"use strict";var n=r(3028);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(2904),layoutAttributes:r(5308),supplyDefaults:r(8800),crossTraceDefaults:r(5036),supplyLayoutDefaults:r(9748),calc:r(6356).calc,crossTraceCalc:r(6664),arraysToCalcdata:r(148),plot:r(6504),colorbar:r(5528),formatLabels:r(6688),style:r(6844).style,styleOnSelect:r(6844).styleOnSelect,hoverPoints:r(8723),selectPoints:r(1560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(7952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},5308:function(t){"use strict";t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},9748:function(t,e,r){"use strict";var n=r(3400),i=r(5308);t.exports=function(t,e){var r,a="group"===e.barmode;"group"===e.scattermode&&("scattergap",r=a?e.bargap:.2,n.coerce(t,e,i,"scattergap",r))}},6828:function(t,e,r){"use strict";var n=r(3400).isArrayOrTypedArray,i=r(4288).hasColorscale,a=r(7260);t.exports=function(t,e,r,o,s,l){l||(l={});var u=(t.marker||{}).color;u&&u._inputArray&&(u=u._inputArray),s("line.color",r),i(t,"line")?a(t,e,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(u)&&u||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},2340:function(t,e,r){"use strict";var n=r(3616),i=r(9032),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,u=r(3400),c=u.segmentsIntersect,h=u.constrain,p=r(8200);t.exports=function(t,e){var r,i,o,f,d,m,y,v,g,_,x,b,w,T,k,M,A,S,L=e.trace||{},C=e.xaxis,P=e.yaxis,I="log"===C.type,E="log"===P.type,D=C._length,z=P._length,O=e.backoff,R=L.marker,F=e.connectGaps,B=e.baseTolerance,N=e.shape,U="linear"===N,j=L.fill&&"none"!==L.fill,V=[],q=p.minTolerance,H=t.length,G=new Array(H),Z=0;function Y(r){var n=t[r];if(!n)return!1;var i=e.linearized?C.l2p(n.x):C.c2p(n.x),o=e.linearized?P.l2p(n.y):P.c2p(n.y);if(i===a){if(I&&(i=C.c2p(n.x,!0)),i===a)return!1;E&&o===a&&(i*=Math.abs(C._m*z*(C._m>0?s:l)/(P._m*D*(P._m>0?s:l)))),i*=1e3}if(o===a){if(E&&(o=P.c2p(n.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function W(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,u=i*o+a*s;if(u>0&&u<l){var c=o*a-s*i;if(c*c<l)return!0}}function X(t,e){var r=t[0]/D,n=t[1]/z,i=Math.max(0,-r,r-1,-n,n-1);return i&&void 0!==A&&W(r,n,A,S)&&(i=0),i&&e&&W(r,n,e[0]/D,e[1]/z)&&(i=0),(1+p.toleranceGrowth*i)*B}function J(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}var K,Q,$,tt,et,rt,nt,it=p.maxScreensAway,at=-D*it,ot=D*(1+it),st=-z*it,lt=z*(1+it),ut=[[at,st,ot,st],[ot,st,ot,lt],[ot,lt,at,lt],[at,lt,at,st]];function ct(t){if(t[0]<at||t[0]>ot||t[1]<st||t[1]>lt)return[h(t[0],at,ot),h(t[1],st,lt)]}function ht(t,e){return t[0]===e[0]&&(t[0]===at||t[0]===ot)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function pt(t,e,r){return function(n,i){var a=ct(n),o=ct(i),s=[];if(a&&o&&ht(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*u.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);return l&&((a&&o?l>0==a[t]>o[t]?a:o:a||o)[t]+=l),s}}function ft(t){var e=t[0],r=t[1],n=e===G[Z-1][0],i=r===G[Z-1][1];if(!n||!i)if(Z>1){var a=e===G[Z-2][0],o=r===G[Z-2][1];n&&(e===at||e===ot)&&a?o?Z--:G[Z-1]=t:i&&(r===st||r===lt)&&o?a?Z--:G[Z-1]=t:G[Z++]=t}else G[Z++]=t}function dt(t){G[Z-1][0]!==t[0]&&G[Z-1][1]!==t[1]&&ft([$,tt]),ft(t),et=null,$=tt=0}"linear"===N||"spline"===N?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=ut[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&J(o,t)<J(r[0],t)?r.unshift(o):r.push(o),n++)}return r}:"hv"===N||"vh"===N?nt=function(t,e){var r=[],n=ct(t),i=ct(e);return n&&i&&ht(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===N?nt=pt(0,at,ot):"vhv"===N&&(nt=pt(1,st,lt));var mt=u.isArrayOrTypedArray(R);function yt(e){if(e&&O&&(e.i=r,e.d=t,e.trace=L,e.marker=mt?R[e.i]:R,e.backoff=O),A=e[0]/D,S=e[1]/z,K=e[0]<at?at:e[0]>ot?ot:0,Q=e[1]<st?st:e[1]>lt?lt:0,K||Q){if(Z)if(et){var n=nt(et,e);n.length>1&&(dt(n[0]),G[Z++]=n[1])}else rt=nt(G[Z-1],e)[0],G[Z++]=rt;else G[Z++]=[K||e[0],Q||e[1]];var i=G[Z-1];K&&Q&&(i[0]!==K||i[1]!==Q)?(et&&($!==K&&tt!==Q?ft($&&tt?(a=et,s=(o=e)[0]-a[0],l=(o[1]-a[1])/s,(a[1]*o[0]-o[1]*a[0])/s>0?[l>0?at:ot,lt]:[l>0?ot:at,st]):[$||K,tt||Q]):$&&tt&&ft([$,tt])),ft([K,Q])):$-K&&tt-Q&&ft([K||$,Q||tt]),et=e,$=K,tt=Q}else et&&dt(nt(et,e)[0]),G[Z++]=e;var a,o,s,l}for(r=0;r<H;r++)if(i=Y(r)){for(Z=0,et=null,yt(i),r++;r<H;r++){if(!(f=Y(r))){if(F)continue;break}if(U&&e.simplify){var vt=Y(r+1);if(_=J(f,i),j&&(0===Z||Z===H-1)||!(_<X(f,vt)*q)){for(v=[(f[0]-i[0])/_,(f[1]-i[1])/_],d=i,x=_,b=T=k=0,y=!1,o=f,r++;r<t.length;r++){if(m=vt,vt=Y(r+1),!m){if(F)continue;break}if(M=(g=[m[0]-i[0],m[1]-i[1]])[0]*v[1]-g[1]*v[0],T=Math.min(T,M),(k=Math.max(k,M))-T>X(m,vt))break;o=m,(w=g[0]*v[0]+g[1]*v[1])>x?(x=w,f=m,y=!1):w<b&&(b=w,d=m,y=!0)}if(y?(yt(f),o!==d&&yt(d)):(d!==i&&yt(d),o!==f&&yt(f)),yt(o),r>=t.length||!m)break;yt(m),i=m}}else yt(f)}et&&ft([$||et[0],tt||et[1]]),V.push(G.slice(0,Z))}var gt=N.slice(N.length-1);if(O&&"h"!==gt&&"v"!==gt){for(var _t=!1,xt=-1,bt=[],wt=0;wt<V.length;wt++)for(var Tt=0;Tt<V[wt].length-1;Tt++){var kt=V[wt][Tt],Mt=V[wt][Tt+1],At=n.applyBackoff(Mt,kt);At[0]===Mt[0]&&At[1]===Mt[1]||(_t=!0),bt[xt+1]||(bt[++xt]=[kt,[At[0],At[1]]])}return _t?bt:V}return V}},1731:function(t){"use strict";t.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},4328:function(t){"use strict";var e={tonextx:1,tonexty:1,tonext:1};t.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,h=-1,p=0,f=-1;for(a=0;a<n.length;a++)(o=(i=n[a][0].trace).stackgroup||"")?o in u?l=u[o]:(l=u[o]=p,p++):i.fill in e&&f>=0?l=f:(l=f=p,p++),l<h&&(c=!0),i._groupIndex=h=l;var d=n.slice();c&&d.sort((function(t,e){var r=t[0].trace,n=e[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index}));var m={};for(a=0;a<d.length;a++)o=(i=d[a][0].trace).stackgroup||"",!0===i.visible?(i._nexttrace=null,i.fill in e&&(s=m[o],i._prevtrace=s||null,s&&(s._nexttrace=i)),i._ownfill=i.fill&&("tozero"===i.fill.substr(0,6)||"toself"===i.fill||"to"===i.fill.substr(0,2)&&!i._prevtrace),m[o]=i):i._prevtrace=i._nexttrace=i._ownfill=null;return d}},7152:function(t,e,r){"use strict";var n=r(8248);t.exports=function(t,e){e||(e=2);var r=t.marker,i=r.sizeref||1,a=r.sizemin||0,o="area"===r.sizemode?function(t){return Math.sqrt(t/i)}:function(t){return t/i};return function(t){var r=o(t/e);return n(r)&&r>0?Math.max(r,a):0}}},5528:function(t){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},4428:function(t,e,r){"use strict";var n=r(6308),i=r(4288).hasColorscale,a=r(7260),o=r(3028);t.exports=function(t,e,r,s,l,u){var c=o.isBubble(t),h=(t.line||{}).color;u=u||{},h&&(r=h),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),u.noAngle||(l("marker.angle"),u.noAngleRef||l("marker.angleref"),u.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),u.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),u.noLine||(l("marker.line.color",h&&!Array.isArray(h)&&e.marker.color!==h?h:c?n.background:n.defaultLine),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0)),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),u.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},1147:function(t,e,r){"use strict";var n=r(3400).dateTick0,i=r(9032).ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}t.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",a(s,e.ycalendar)),n("yperiodalignment"))}}},6504:function(t,e,r){"use strict";var n=r(3428),i=r(4040),a=r(3400),o=a.ensureSingle,s=a.identity,l=r(3616),u=r(3028),c=r(2340),h=r(4328),p=r(2065).tester;function f(t,e,r,h,f,d,m){var y,v=t._context.staticPlot;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,c=n.extent(a.simpleMap(s.range,s.r2c)),h=n.extent(a.simpleMap(l.range,l.r2c)),p=i[0].trace;if(u.hasMarkers(p)){var f=p.marker.maxdisplayed;if(0!==f){var d=i.filter((function(t){return t.x>=c[0]&&t.x<=c[1]&&t.y>=h[0]&&t.y<=h[1]})),m=Math.ceil(d.length/f),y=0;o.forEach((function(t,r){var n=t[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<e&&y++}));var v=Math.round(y*m/3+Math.floor(y/3)*m/7.1);i.forEach((function(t){delete t.vis})),d.forEach((function(t,e){0===Math.round((e+v)%m)&&(t.vis=!0)}))}}}(0,e,r,h,f);var g=!!m&&m.duration>0;function _(t){return g?t.transition():t}var x=r.xaxis,b=r.yaxis,w=h[0].trace,T=w.line,k=n.select(d),M=o(k,"g","errorbars"),A=o(k,"g","lines"),S=o(k,"g","points"),L=o(k,"g","text");if(i.getComponentMethod("errorbars","plot")(t,M,r,m),!0===w.visible){var C,P;_(k).style("opacity",w.opacity);var I,E,D=w.fill.charAt(w.fill.length-1);"x"!==D&&"y"!==D&&(D=""),"y"===D?(I=1,E=b.c2p(0,!0)):"x"===D&&(I=0,E=x.c2p(0,!0)),h[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var z,O,R="",F=[],B=w._prevtrace,N=null,U=null;B&&(R=B._prevRevpath||"",P=B._nextFill,F=B._ownPolygons,N=B._fillsegments,U=B._fillElement);var j,V,q,H,G,Z,Y="",W="",X=[];w._polygons=[];var J=[],K=[],Q=a.noop;if(C=w._ownFill,u.hasLines(w)||"none"!==w.fill){P&&P.datum(h),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(j=l.steps(T.shape),V=l.steps(T.shape.split("").reverse().join(""))):j=V="spline"===T.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),T.smoothing):l.smoothopen(t,T.smoothing)}:function(t){return"M"+t.join("L")},q=function(t){return V(t.reverse())},K=c(h,{xaxis:x,yaxis:b,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill}),J=new Array(K.length);var $=0;for(y=0;y<K.length;y++){var tt,et=K[y];tt&&D?tt.push.apply(tt,et):(tt=et.slice(),J[$]=tt,$++)}w._fillElement=null,w._fillExclusionElement=U,w._fillsegments=J.slice(0,$),J=w._fillsegments,K.length&&(H=K[0][0].slice(),Z=(G=K[K.length-1])[G.length-1].slice()),Q=function(t){return function(e){if(z=j(e),O=q(e),Y?D?(Y+="L"+z.substr(1),W=O+"L"+W.substr(1)):(Y+="Z"+z,W=O+"Z"+W):(Y=z,W=O),u.hasLines(w)){var r=n.select(this);if(r.datum(h),t)_(r.style("opacity",0).attr("d",z).call(l.lineGroupStyle)).style("opacity",1);else{var i=_(r);i.attr("d",z),l.singleLineStyle(h,i)}}}}}var rt=A.selectAll(".js-line").data(K);_(rt.exit()).style("opacity",0).remove(),rt.each(Q(!1)),rt.enter().append("path").classed("js-line",!0).style("vector-effect",v?"none":"non-scaling-stroke").call(l.lineGroupStyle).each(Q(!0)),l.setClipUrl(rt,r.layerClipId,t);var nt=function(){var t=new Array(J.length);for(y=0;y<J.length;y++)t[y]=p(J[y]);return t},it=function(t){var e,r;if(t&&0!==t.length){for(e=new Array(t.length-1+J.length),r=0;r<t.length-1;r++)e[r]=p(t[r]);var n=t[t.length-1].slice();for(n.reverse(),r=0;r<J.length;r++)e[t.length-1+r]=p(J[r].concat(n))}else for(e=new Array(J.length),r=0;r<J.length;r++){var i=J[r][0].slice(),a=J[r][J[r].length-1].slice();i[I]=a[I]=E;var o=[a,i].concat(J[r]);e[r]=p(o)}return e};K.length?(C?(C.datum(h),H&&Z&&(D?(H[I]=Z[I]=E,_(C).attr("d","M"+Z+"L"+H+"L"+Y.substr(1)).call(l.singleFillStyle,t),X=it(null)):(_(C).attr("d",Y+"Z").call(l.singleFillStyle,t),X=nt())),w._polygons=X,w._fillElement=C):P&&("tonext"===w.fill.substr(0,6)&&Y&&R?("tonext"===w.fill?(_(P).attr("d",Y+"Z"+R+"Z").call(l.singleFillStyle,t),X=nt(),w._polygons=X.concat(F)):(_(P).attr("d",Y+"L"+R.substr(1)+"Z").call(l.singleFillStyle,t),X=it(N),w._polygons=X),w._fillElement=P):ot(P)),w._prevRevpath=W):(C?ot(C):P&&ot(P),w._prevRevpath=null),w._ownPolygons=X,S.datum(h),L.datum(h),function(e,i,a){var o,c=a[0].trace,h=u.hasMarkers(c),p=u.hasText(c),f=ht(c),d=pt,m=pt;if(h||p){var y=s,v=c.stackgroup,w=v&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][v].stackgaps;c.marker.maxdisplayed||c._needsCull?y=w?lt:st:v&&!w&&(y=ut),h&&(d=y),p&&(m=y)}var T,k=(o=e.selectAll("path.point").data(d,f)).enter().append("path").classed("point",!0);g&&k.call(l.pointStyle,c,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),h&&(T=l.makePointStyleFns(c)),o.each((function(e){var i=n.select(this),a=_(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,c,T,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,c.xcalendar,c.ycalendar),c.customdata&&i.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):a.remove()})),g?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=i.selectAll("g").data(m,f)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(t){var e=n.select(this),i=_(e.select("text"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,c.xcalendar,c.ycalendar):e.remove()})),o.selectAll("text").call(l.textPointStyle,c,t).each((function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll("tspan.line").each((function(){_(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(S,L,h);var at=!1===w.cliponaxis?null:r.layerClipId;l.setClipUrl(S,at,t),l.setClipUrl(L,at,t)}function ot(t){_(t).attr("d","M0,0Z")}function st(t){return t.filter((function(t){return!t.gap&&t.vis}))}function lt(t){return t.filter((function(t){return t.vis}))}function ut(t){return t.filter((function(t){return!t.gap}))}function ct(t){return t.id}function ht(t){if(t.ids)return ct}function pt(){return!1}}t.exports=function(t,e,r,i,a,u){var c,p,d=!a,m=!!a&&a.duration>0,y=h(t,e,r);(c=i.selectAll("g.trace").data(y,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),c.order(),function(t,e,r){e.each((function(e){var i=o(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,u=[];a._ownfill&&u.push("_ownFill"),a._nexttrace&&u.push("_nextFill");var c=i.selectAll("g").data(u,s);c.enter().append("g"),c.exit().each((function(t){a[t]=null})).remove(),c.order().each((function(t){a[t]=o(n.select(this),"path","js-fill")}))}))}(t,c,e),m?(u&&(p=u()),n.transition().duration(a.duration).ease(a.easing).each("end",(function(){p&&p()})).each("interrupt",(function(){p&&p()})).each((function(){i.selectAll("g.trace").each((function(r,n){f(t,n,e,r,y,this,a)}))}))):c.each((function(r,n){f(t,n,e,r,y,this,a)})),d&&c.exit().remove(),i.selectAll("path:not([d])").remove()}},1560:function(t,e,r){"use strict";var n=r(3028);t.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],h=s[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===e)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)i=s[r],a=l.c2p(i.x),o=u.c2p(i.y),null!==i.i&&e.contains([a,o],!1,r,t)?(c.push({pointNumber:i.i,x:l.c2d(i.x),y:u.c2d(i.y)}),i.selected=1):i.selected=0;return c}},3912:function(t){"use strict";var e=["orientation","groupnorm","stackgaps"];t.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var h={orientation:r.x&&!r.y?"h":"v"},p=0;p<e.length;p++){var f=e[p],d=f+"Found";if(!u[d]){var m=void 0!==t[f],y="orientation"===f;if((m||c)&&(u[f]=i(f,h[f]),y&&(u.fillDflt="h"===u[f]?"tonextx":"tonexty"),m&&(u[d]=!0,!c&&(delete u.traces[0][f],y))))for(var v=0;v<u.traces.length-1;v++){var g=u.traces[v];g._input.fill!==g.fill&&(g.fill=u.fillDflt)}}}return u}}},6844:function(t,e,r){"use strict";var n=r(3428),i=r(3616),a=r(4040);function o(t,e,r){i.pointStyle(t.selectAll("path.point"),e,r)}function s(t,e,r){i.textPointStyle(t.selectAll("text"),e,r)}t.exports={style:function(t){var e=n.select(t).selectAll("g.trace.scatter");e.style("opacity",(function(t){return t[0].trace.opacity})),e.selectAll("g.points").each((function(e){o(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.text").each((function(e){s(n.select(this),e.trace||e[0].trace,t)})),e.selectAll("g.trace path.js-line").call(i.lineGroupStyle),e.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,t,!1),a.getComponentMethod("errorbars","style")(e)},stylePoints:o,styleText:s,styleOnSelect:function(t,e,r){var n=e[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(o(r,n,t),s(r,n,t))}}},3028:function(t,e,r){"use strict";var n=r(3400),i=r(8116).isTypedArraySpec;t.exports={hasLines:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("lines")},hasMarkers:function(t){return t.visible&&(t.mode&&-1!==t.mode.indexOf("markers")||"splom"===t.type)},hasText:function(t){return t.visible&&t.mode&&-1!==t.mode.indexOf("text")},isBubble:function(t){var e=t.marker;return n.isPlainObject(e)&&(n.isArrayOrTypedArray(e.size)||i(e.size))}}},124:function(t,e,r){"use strict";var n=r(3400);t.exports=function(t,e,r,i,a){a=a||{},i("textposition"),n.coerceFont(i,"textfont",a.font||r.font),a.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}},3980:function(t,e,r){"use strict";var n=r(3400),i=r(4040);t.exports=function(t,e,r,a){var o,s=a("x"),l=a("y");if(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],r),s){var u=n.minRowLength(s);l?o=Math.min(u,n.minRowLength(l)):(o=u,a("y0"),a("dy"))}else{if(!l)return 0;o=n.minRowLength(l),a("x0"),a("dx")}return e._length=o,o}},6096:function(t,e,r){"use strict";var n=r(1776).Ks,i=r(1776).Gw,a=r(3544),o=r(2904),s=r(5464),l=r(9084),u=r(8192).u,c=r(2880).extendFlat,h=r(7824).overrideAll,p=o.marker,f=o.line,d=p.line;t.exports=h({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:c({},o.mode,{dflt:"markers"}),text:c({},o.text,{}),texttemplate:i({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:c({},o.hovertext,{}),textfont:o.textfont,textposition:o.textposition,line:{color:f.color,width:f.width,dash:u},connectgaps:o.connectgaps,marker:c({symbol:p.symbol,opacity:p.opacity,angle:p.angle,angleref:c({},p.angleref,{values:["previous","up","north"]}),standoff:p.standoff,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode,colorbar:p.colorbar,line:c({width:d.width},l("marker.line")),gradient:p.gradient},l("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:a(),selected:o.selected,unselected:o.unselected,hoverinfo:c({},s.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:n()},"calc","nested")},5212:function(t,e,r){"use strict";var n=r(8248),i=r(9032).BADNUM,a=r(136),o=r(148),s=r(4500),l=r(3400).isArrayOrTypedArray,u=r(3400)._;function c(t){return t&&"string"==typeof t}t.exports=function(t,e){var r,h=l(e.locations),p=h?e.locations.length:e._length,f=new Array(p);r=e.geojson?function(t){return c(t)||n(t)}:c;for(var d=0;d<p;d++){var m=f[d]={};if(h){var y=e.locations[d];m.loc=r(y)?y:null}else{var v=e.lon[d],g=e.lat[d];n(v)&&n(g)?m.lonlat=[+v,+g]:m.lonlat=[i,i]}}return o(f,e),a(t,e),s(f,e),p&&(f[0].t={labels:{lat:u(t,"lat:")+" ",lon:u(t,"lon:")+" "}}),f}},1512:function(t,e,r){"use strict";var n=r(1776).Ks,i=r(1776).Gw,a=r(3544),o=r(6096),s=r(2904),l=r(5232),u=r(5464),c=r(9084),h=r(2880).extendFlat,p=r(7824).overrideAll,f=r(5232),d=o.line,m=o.marker;t.exports=p({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},f.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:i({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:h({},s.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},c("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},u.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:n()},"calc","nested")},9392:function(t,e,r){"use strict";var n=r(8248),i=r(3400),a=r(9032).BADNUM,o=r(4808),s=r(8932),l=r(3616),u=r(7152),c=r(3028),h=r(4270),p=r(624).appendArrayPointValue,f=r(2736).NEWLINES,d=r(2736).BR_TAG_ALL;function m(t){return{type:t,geojson:o.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(t,e){return i.isArrayOrTypedArray(t)?e?function(e){return n(t[e])?+t[e]:0}:function(e){return t[e]}:t?function(){return t}:v}function v(){return""}function g(t){return t[0]===a}function _(t,e){var r;if(i.isArrayOrTypedArray(t)&&i.isArrayOrTypedArray(e)){r=["step",["get","point_count"],t[0]];for(var n=1;n<t.length;n++)r.push(e[n-1],t[n])}else r=t;return r}t.exports=function(t,e){var r,a=e[0].trace,x=!0===a.visible&&0!==a._length,b="none"!==a.fill,w=c.hasLines(a),T=c.hasMarkers(a),k=c.hasText(a),M=T&&"circle"===a.marker.symbol,A=T&&"circle"!==a.marker.symbol,S=a.cluster&&a.cluster.enabled,L=m("fill"),C=m("line"),P=m("circle"),I=m("symbol"),E={fill:L,line:C,circle:P,symbol:I};if(!x)return E;if((b||w)&&(r=o.calcTraceToLineCoords(e)),b&&(L.geojson=o.makePolygon(r),L.layout.visibility="visible",i.extendFlat(L.paint,{"fill-color":a.fillcolor})),w&&(C.geojson=o.makeLine(r),C.layout.visibility="visible",i.extendFlat(C.paint,{"line-width":a.line.width,"line-color":a.line.color,"line-opacity":a.opacity})),M){var D=function(t){var e,r,a,o,c=t[0].trace,h=c.marker,p=c.selectedpoints,f=i.isArrayOrTypedArray(h.color),d=i.isArrayOrTypedArray(h.size),m=i.isArrayOrTypedArray(h.opacity);function y(t){return c.opacity*t}f&&(r=s.hasColorscale(c,"marker")?s.makeColorScaleFuncFromTrace(h):i.identity),d&&(a=u(c)),m&&(o=function(t){return y(n(t)?+i.constrain(t,0,1):0)});var v,_,x=[];for(e=0;e<t.length;e++){var b=t[e],w=b.lonlat;if(!g(w)){var T={};r&&(T.mcc=b.mcc=r(b.mc)),a&&(T.mrc=b.mrc=a(b.ms)),o&&(T.mo=o(b.mo)),p&&(T.selected=b.selected||0),x.push({type:"Feature",id:e+1,geometry:{type:"Point",coordinates:w},properties:T})}}if(p)for(v=l.makeSelectedPointStyleFns(c),e=0;e<x.length;e++){var k=x[e].properties;v.selectedOpacityFn&&(k.mo=y(v.selectedOpacityFn(k))),v.selectedColorFn&&(k.mcc=v.selectedColorFn(k)),v.selectedSizeFn&&(k.mrc=v.selectedSizeFn(k))}return{geojson:{type:"FeatureCollection",features:x},mcc:f||v&&v.selectedColorFn?{type:"identity",property:"mcc"}:h.color,mrc:d||v&&v.selectedSizeFn?{type:"identity",property:"mrc"}:(_=h.size,_/2),mo:m||v&&v.selectedOpacityFn?{type:"identity",property:"mo"}:y(h.opacity)}}(e);P.geojson=D.geojson,P.layout.visibility="visible",S&&(P.filter=["!",["has","point_count"]],E.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":_(a.cluster.color,a.cluster.step),"circle-radius":_(a.cluster.size,a.cluster.step),"circle-opacity":_(a.cluster.opacity,a.cluster.step)}},E.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":["Open Sans Regular","Arial Unicode MS Regular"],"text-size":12}}),i.extendFlat(P.paint,{"circle-color":D.mcc,"circle-radius":D.mrc,"circle-opacity":D.mo})}if(M&&S&&(P.filter=["!",["has","point_count"]]),(A||k)&&(I.geojson=function(t,e){for(var r=e._fullLayout,n=t[0].trace,a=n.marker||{},o=a.symbol,s=a.angle,l="circle"!==o?y(o):v,u="auto"!==s?y(s,!0):v,h=c.hasText(n)?y(n.text):v,m=[],_=0;_<t.length;_++){var x=t[_];if(!g(x.lonlat)){var b,w=n.texttemplate;if(w){var T=Array.isArray(w)?w[_]||"":w,k=n._module.formatLabels(x,n,r),M={};p(M,n,x.i);var A=n._meta||{};b=i.texttemplateString(T,k,r._d3locale,M,x,A)}else b=h(_);b&&(b=b.replace(f,"").replace(d,"\n")),m.push({type:"Feature",geometry:{type:"Point",coordinates:x.lonlat},properties:{symbol:l(_),angle:u(_),text:b}})}}return{type:"FeatureCollection",features:m}}(e,t),i.extendFlat(I.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),A&&(i.extendFlat(I.layout,{"icon-size":a.marker.size/10}),"angle"in a.marker&&"auto"!==a.marker.angle&&i.extendFlat(I.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),I.layout["icon-allow-overlap"]=a.marker.allowoverlap,i.extendFlat(I.paint,{"icon-opacity":a.opacity*a.marker.opacity,"icon-color":a.marker.color})),k)){var z=(a.marker||{}).size,O=h(a.textposition,z);i.extendFlat(I.layout,{"text-size":a.textfont.size,"text-anchor":O.anchor,"text-offset":O.offset,"text-font":a.textfont.family.split(", ")}),i.extendFlat(I.paint,{"text-color":a.textfont.color,"text-opacity":a.opacity})}return E}},5752:function(t,e,r){"use strict";var n=r(3400),i=r(3028),a=r(4428),o=r(6828),s=r(124),l=r(840),u=r(1512),c=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extra Bold Italic","Open Sans Extra Bold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];t.exports=function(t,e,r,h){function p(r,i){return n.coerce(t,e,u,r,i)}function f(r,i){return n.coerce2(t,e,u,r,i)}var d=function(t,e,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return e._length=a,a}(0,e,p);if(d){if(p("text"),p("texttemplate"),p("hovertext"),p("hovertemplate"),p("mode"),p("below"),i.hasMarkers(e)){a(t,e,r,h,p,{noLine:!0,noAngle:!0}),p("marker.allowoverlap"),p("marker.angle");var m=e.marker;"circle"!==m.symbol&&(n.isArrayOrTypedArray(m.size)&&(m.size=m.size[0]),n.isArrayOrTypedArray(m.color)&&(m.color=m.color[0]))}i.hasLines(e)&&(o(t,e,r,h,p,{noDash:!0}),p("connectgaps"));var y=f("cluster.maxzoom"),v=f("cluster.step"),g=f("cluster.color",e.marker&&e.marker.color||r),_=f("cluster.size"),x=f("cluster.opacity");p("cluster.enabled",!1!==y||!1!==v||!1!==g||!1!==_||!1!==x),i.hasText(e)&&s(t,e,h,p,{noSelect:!0,font:{family:-1!==c.indexOf(h.font.family)?h.font.family:"Open Sans Regular",size:h.font.size,color:h.font.color}}),p("fill"),"none"!==e.fill&&l(t,e,r,p),n.coerceSelectionMarkerOpacity(e,p)}else e.visible=!1}},7920:function(t){"use strict";t.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t}},1960:function(t,e,r){"use strict";var n=r(4460);t.exports=function(t,e,r){var i={},a=r[e.subplot]._subplot.mockAxis,o=t.lonlat;return i.lonLabel=n.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=n.tickText(a,a.c2l(o[1]),!0).text,i}},3312:function(t,e,r){"use strict";var n=r(3024),i=r(3400),a=r(4928),o=i.fillText,s=r(9032).BADNUM,l=r(7552).traceLayerPrefix;function u(t,e,r){if(!t.hovertemplate){var n=(e.hi||t.hoverinfo).split("+"),i=-1!==n.indexOf("all"),a=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,u=[];return i||a&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):a?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(i||-1!==n.indexOf("text"))&&o(e,t,u),u.join("<br>")}function c(t){return t+"°"}}t.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[0].trace,h=t.xa,p=t.ya,f=t.subplot,d=[],m=l+c.uid+"-circle",y=c.cluster&&c.cluster.enabled;if(y){var v=f.map.queryRenderedFeatures(null,{layers:[m]});d=v.map((function(t){return t.id}))}var g=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),_=e-g;if(n.getClosest(o,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;if(y&&-1===d.indexOf(t.i+1))return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=f.project([n,a]),l=o.x-h.c2p([_,a]),u=o.y-p.c2p([n,r]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+u*u)-c,1-3/c)}),t),!1!==t.index){var x=o[t.index],b=x.lonlat,w=[i.modHalf(b[0],360)+g,b[1]],T=h.c2p(w),k=p.c2p(w),M=x.mrc||1;t.x0=T-M,t.x1=T+M,t.y0=k-M,t.y1=k+M;var A={};A[c.subplot]={_subplot:f};var S=c._module.formatLabels(x,c,A);return t.lonLabel=S.lonLabel,t.latLabel=S.latLabel,t.color=a(c,x),t.extraText=u(c,x,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:u}},1572:function(t,e,r){"use strict";t.exports={attributes:r(1512),supplyDefaults:r(5752),colorbar:r(5528),formatLabels:r(1960),calc:r(5212),plot:r(9660),hoverPoints:r(3312).hoverPoints,eventData:r(7920),selectPoints:r(404),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:r(1308),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(t,e,r){"use strict";var n=r(3400),i=r(9392),a=r(7552).traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(t,e,r,n){this.type="scattermapbox",this.subplot=t,this.uid=e,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol",cluster:"source-"+e+"-circle",clusterCount:"source-"+e+"-circle"},this.layerIds={fill:a+e+"-fill",line:a+e+"-line",circle:a+e+"-circle",symbol:a+e+"-symbol",cluster:a+e+"-cluster",clusterCount:a+e+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(t,e,r){var i={type:"geojson",data:e.geojson};r&&r.enabled&&n.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[t]);a?a.setData(e.geojson):this.subplot.map.addSource(this.sourceIds[t],i)},l.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},l.addLayer=function(t,e,r){var n={type:e.type,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint};e.filter&&(n.filter=e.filter);for(var i,a=this.layerIds[t],o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===a){i=!0;break}i?(this.subplot.setOptions(a,"setLayoutProperty",n.layout),"visible"===n.layout.visibility&&this.subplot.setOptions(a,"setPaintProperty",n.paint)):this.subplot.addLayer(n,r)},l.update=function(t){var e=t[0].trace,r=this.subplot,n=r.map,a=i(r.gd,t),s=r.belowLookup["trace-"+this.uid],l=!(!e.cluster||!e.cluster.enabled),u=!!this.clusterEnabled,c=this;function h(t){u?function(t){for(var e=o.cluster,r=e.length-1;r>=0;r--){var i=e[r];n.removeLayer(c.layerIds[i])}t||n.removeSource(c.sourceIds.circle)}(t):function(t){for(var e=o.nonCluster,r=e.length-1;r>=0;r--){var i=e[r];n.removeLayer(c.layerIds[i]),t||n.removeSource(c.sourceIds[i])}}(t)}function p(t){l?function(t){t||c.addSource("circle",a.circle,e.cluster);for(var r=o.cluster,n=0;n<r.length;n++){var i=r[n],l=a[i];c.addLayer(i,l,s)}}(t):function(t){for(var e=o.nonCluster,r=0;r<e.length;r++){var n=e[r],i=a[n];t||c.addSource(n,i),c.addLayer(n,i,s)}}(t)}function f(){for(var t=l?o.cluster:o.nonCluster,e=0;e<t.length;e++){var n=t[e],i=a[n];i&&(r.setOptions(c.layerIds[n],"setLayoutProperty",i.layout),"visible"===i.layout.visibility&&("cluster"!==n&&c.setSourceData(n,i),r.setOptions(c.layerIds[n],"setPaintProperty",i.paint)))}}var d=this.isHidden,m=!0!==e.visible;m?d||h():d?m||p():u!==l?(h(),p()):this.below!==s?(h(!0),p(!0),f()):f(),this.clusterEnabled=l,this.isHidden=m,this.below=s,t[0].trace._glTrace=this},l.dispose=function(){for(var t=this.subplot.map,e=this.clusterEnabled?o.cluster:o.nonCluster,r=e.length-1;r>=0;r--){var n=e[r];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}},t.exports=function(t,e){var r,n,a,l=e[0].trace,u=l.cluster&&l.cluster.enabled,c=!0!==l.visible,h=new s(t,l.uid,u,c),p=i(t.gd,e),f=h.below=t.belowLookup["trace-"+l.uid];if(u)for(h.addSource("circle",p.circle,l.cluster),r=0;r<o.cluster.length;r++)a=p[n=o.cluster[r]],h.addLayer(n,a,f);else for(r=0;r<o.nonCluster.length;r++)a=p[n=o.nonCluster[r]],h.addSource(n,a,l.cluster),h.addLayer(n,a,f);return e[0].trace._glTrace=h,h}},404:function(t,e,r){"use strict";var n=r(3400),i=r(3028),a=r(9032).BADNUM;t.exports=function(t,e){var r,o=t.cd,s=t.xaxis,l=t.yaxis,u=[],c=o[0].trace;if(!i.hasMarkers(c))return[];if(!1===e)for(r=0;r<o.length;r++)o[r].selected=0;else for(r=0;r<o.length;r++){var h=o[r],p=h.lonlat;if(p[0]!==a){var f=[n.modHalf(p[0],360),p[1]],d=[s.c2p(f),l.c2p(f)];e.contains(d,null,r,t)?(u.push({pointNumber:r,lon:p[0],lat:p[1]}),h.selected=1):h.selected=0}}return u}},1843:function(t,e,r){"use strict";var n=r(4460),i=r(3400),a=r(3060),o=r(468).W,s=r(9032).BADNUM;e.moduleType="transform",e.name="aggregate";var l=e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},u=l.aggregations;function c(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),u=l.get(),c=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case"count":return h;case"first":return p;case"last":return f;case"sum":return function(t,e){for(var r=0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r+=o)}return a(r)};case"avg":return function(t,e){for(var r=0,i=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l,i++)}return i?a(r/i):s};case"min":return function(t,e){for(var r=1/0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r=Math.min(r,o))}return r===1/0?s:a(r)};case"max":return function(t,e){for(var r=-1/0,i=0;i<e.length;i++){var o=n(t[e[i]]);o!==s&&(r=Math.max(r,o))}return r===-1/0?s:a(r)};case"range":return function(t,e){for(var r=1/0,i=-1/0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r=Math.min(r,l),i=Math.max(i,l))}return i===-1/0||r===1/0?s:a(i-r)};case"change":return function(t,e){var r=n(t[e[0]]),i=n(t[e[e.length-1]]);return r===s||i===s?s:a(i-r)};case"median":return function(t,e){for(var r=[],o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&r.push(l)}if(!r.length)return s;r.sort(i.sorterAsc);var u=(r.length-1)/2;return a((r[Math.floor(u)]+r[Math.ceil(u)])/2)};case"mode":return function(t,e){for(var r={},i=0,o=s,l=0;l<e.length;l++){var u=n(t[e[l]]);if(u!==s){var c=r[u]=(r[u]||0)+1;c>i&&(i=c,o=u)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o<e.length;o++){var l=n(t[e[o]]);l!==s&&(r+=l*l,i++)}return i?a(Math.sqrt(r/i)):s};case"stddev":return function(e,r){var i,a=0,o=0,l=1,u=s;for(i=0;i<r.length&&u===s;i++)u=n(e[r[i]]);if(u===s)return s;for(;i<r.length;i++){var c=n(e[r[i]]);if(c!==s){var h=c-u;a+=h,o+=h*h,l++}}var p="sample"===t.funcmode?l-1:l;return p?Math.sqrt((o-a*a/l)/p):0}}}(a,n.getDataConversions(t,e,o,u)),d=new Array(r.length),m=0;m<r.length;m++)d[m]=c(u,r[m]);l.set(d),"count"===a.func&&i.pushUnique(e._arrayAttrs,o)}}function h(t,e){return e.length}function p(t,e){return t[e[0]]}function f(t,e){return t[e[e.length-1]]}e.supplyDefaults=function(t,e){var r,n={};function o(e,r){return i.coerce(t,n,l,e,r)}if(!o("enabled"))return n;var s=a.findArrayAttributes(e),c={};for(r=0;r<s.length;r++)c[s[r]]=1;var h=o("groups");if(!Array.isArray(h)){if(!c[h])return n.enabled=!1,n;c[h]=0}var p,f=t.aggregations||[],d=n.aggregations=new Array(f.length);function m(t,e){return i.coerce(f[r],p,u,t,e)}for(r=0;r<f.length;r++){p={_index:r};var y=m("target"),v=m("func");m("enabled")&&y&&(c[y]||"count"===v&&void 0===c[y])?("stddev"===v&&m("funcmode"),c[y]=0,d[r]=p):d[r]={enabled:!1,_index:r}}for(r=0;r<s.length;r++)c[s[r]]&&d.push({target:s[r],func:u.func.dflt,enabled:!0,_index:-1});return n},e.calcTransform=function(t,e,r){if(r.enabled){var n=r.groups,a=i.getTargetArray(e,{target:n});if(a){var s,l,u,h,p={},f={},d=[],m=o(e.transforms,r),y=a.length;for(e._length&&(y=Math.min(y,e._length)),s=0;s<y;s++)void 0===(u=p[l=a[s]])?(p[l]=d.length,h=[s],d.push(h),f[p[l]]=m(s)):(d[u].push(s),f[p[l]]=(f[p[l]]||[]).concat(m(s)));r._indexToPoints=f;var v=r.aggregations;for(s=0;s<v.length;s++)c(t,e,d,v[s]);"string"==typeof n&&c(t,e,d,{target:n,func:"first",enabled:!0}),e._length=d.length}}}},6744:function(t,e,r){"use strict";var n=r(3400),i=r(4040),a=r(4460),o=r(468).W,s=r(9104),l=s.COMPARISON_OPS,u=s.INTERVAL_OPS,c=s.SET_OPS;e.moduleType="transform",e.name="filter",e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(l).concat(u).concat(c),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},e.supplyDefaults=function(t){var r={};function a(i,a){return n.coerce(t,r,e.attributes,i,a)}if(a("enabled")){var o=a("target");if(n.isArrayOrTypedArray(o)&&0===o.length)return r.enabled=!1,r;a("preservegaps"),a("operation"),a("value");var s=i.getComponentMethod("calendars","handleDefaults");s(t,r,"valuecalendar",null),s(t,r,"targetcalendar",null)}return r},e.calcTransform=function(t,e,r){if(r.enabled){var i=n.getTargetArray(e,r);if(i){var s=r.target,h=i.length;e._length&&(h=Math.min(h,e._length));var p=r.targetcalendar,f=e._arrayAttrs,d=r.preservegaps;if("string"==typeof s){var m=n.nestedProperty(e,s+"calendar").get();m&&(p=m)}var y,v,g=function(t,e,r){var i=t.operation,a=t.value,o=n.isArrayOrTypedArray(a);function s(t){return-1!==t.indexOf(i)}var h,p=function(r){return e(r,0,t.valuecalendar)},f=function(t){return e(t,0,r)};switch(s(l)?h=p(o?a[0]:a):s(u)?h=o?[p(a[0]),p(a[1])]:[p(a),p(a)]:s(c)&&(h=o?a.map(p):[p(a)]),i){case"=":return function(t){return f(t)===h};case"!=":return function(t){return f(t)!==h};case"<":return function(t){return f(t)<h};case"<=":return function(t){return f(t)<=h};case">":return function(t){return f(t)>h};case">=":return function(t){return f(t)>=h};case"[]":return function(t){var e=f(t);return e>=h[0]&&e<=h[1]};case"()":return function(t){var e=f(t);return e>h[0]&&e<h[1]};case"[)":return function(t){var e=f(t);return e>=h[0]&&e<h[1]};case"(]":return function(t){var e=f(t);return e>h[0]&&e<=h[1]};case"][":return function(t){var e=f(t);return e<=h[0]||e>=h[1]};case")(":return function(t){var e=f(t);return e<h[0]||e>h[1]};case"](":return function(t){var e=f(t);return e<=h[0]||e>h[1]};case")[":return function(t){var e=f(t);return e<h[0]||e>=h[1]};case"{}":return function(t){return-1!==h.indexOf(f(t))};case"}{":return function(t){return-1===h.indexOf(f(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),p),_={},x={},b=0;d?(y=function(t){_[t.astr]=n.extendDeep([],t.get()),t.set(new Array(h))},v=function(t,e){var r=_[t.astr][e];t.get()[e]=r}):(y=function(t){_[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=_[t.astr][e];t.get().push(r)}),k(y);for(var w=o(e.transforms,r),T=0;T<h;T++)g(i[T])?(k(v,T),x[b++]=w(T)):d&&b++;r._indexToPoints=x,e._length=b}}function k(t,r){for(var i=0;i<f.length;i++)t(n.nestedProperty(e,f[i]),r)}}},2028:function(t,e,r){"use strict";var n=r(3400),i=r(3060),a=r(7316),o=r(468).W;function s(t,e){var r,s,l,u,c,h,p,f,d,m,y=e.transform,v=e.transformIndex,g=t.transforms[v].groups,_=o(t.transforms,y);if(!n.isArrayOrTypedArray(g)||0===g.length)return[t];var x=n.filterUnique(g),b=new Array(x.length),w=g.length,T=i.findArrayAttributes(t),k=y.styles||[],M={};for(r=0;r<k.length;r++)M[k[r].target]=k[r].value;y.styles&&(m=n.keyedContainer(y,"styles","target","value.name"));var A={},S={};for(r=0;r<x.length;r++){A[h=x[r]]=r,S[h]=0,(p=b[r]=n.extendDeepNoArrays({},t))._group=h,p.transforms[v]._indexToPoints={};var L=null;for(m&&(L=m.get(h)),p.name=L||""===L?L:n.templateString(y.nameformat,{trace:t.name,group:h}),f=p.transforms,p.transforms=[],s=0;s<f.length;s++)p.transforms[s]=n.extendDeepNoArrays({},f[s]);for(s=0;s<T.length;s++)n.nestedProperty(p,T[s]).set([])}for(l=0;l<T.length;l++){for(u=T[l],s=0,d=[];s<x.length;s++)d[s]=n.nestedProperty(b[s],u).get();for(c=n.nestedProperty(t,u).get(),s=0;s<w;s++)d[A[g[s]]].push(c[s])}for(s=0;s<w;s++)(p=b[A[g[s]]]).transforms[v]._indexToPoints[S[g[s]]]=_(s),S[g[s]]++;for(r=0;r<x.length;r++)h=x[r],p=b[r],a.clearExpandedTraceDefaultColors(p),p=n.extendDeepNoArrays(p,M[h]||{});return b}e.moduleType="transform",e.name="groupby",e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},e.supplyDefaults=function(t,r,i){var a,o={};function s(r,i){return n.coerce(t,o,e.attributes,r,i)}if(!s("enabled"))return o;s("groups"),s("nameformat",i._dataLength>1?"%{group} (%{trace})":"%{group}");var l=t.styles,u=o.styles=[];if(l)for(a=0;a<l.length;a++){var c=u[a]={};n.coerce(l[a],u[a],e.attributes.styles,"target");var h=n.coerce(l[a],u[a],e.attributes.styles,"value");n.isPlainObject(h)?c.value=n.extendDeep({},h):h&&delete c.value}return o},e.transform=function(t,e){var r,n,i,a=[];for(n=0;n<t.length;n++)for(r=s(t[n],e),i=0;i<r.length;i++)a.push(r[i]);return a}},468:function(t,e){"use strict";e.W=function(t,e){for(var r,n,i=0;i<t.length&&(r=t[i])!==e;i++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);var a=n?function(t){return n[t]}:function(t){return[t]};return a}},6272:function(t,e,r){"use strict";var n=r(3400),i=r(4460),a=r(468).W,o=r(9032).BADNUM;e.moduleType="transform",e.name="sort",e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},e.supplyDefaults=function(t){var r={};function i(i,a){return n.coerce(t,r,e.attributes,i,a)}return i("enabled")&&(i("target"),i("order")),r},e.calcTransform=function(t,e,r){if(r.enabled){var s=n.getTargetArray(e,r);if(s){var l=r.target,u=s.length;e._length&&(u=Math.min(u,e._length));var c,h,p=e._arrayAttrs,f=function(t,e,r,n){var i,a=new Array(n),s=new Array(n);for(i=0;i<n;i++)a[i]={v:e[i],i:i};for(a.sort(function(t,e){switch(t.order){case"ascending":return function(t,r){var n=e(t.v),i=e(r.v);return n===o?1:i===o?-1:n-i};case"descending":return function(t,r){var n=e(t.v),i=e(r.v);return n===o?1:i===o?-1:i-n}}}(t,r)),i=0;i<n;i++)s[i]=a[i].i;return s}(r,s,i.getDataToCoordFunc(t,e,l,s),u),d=a(e.transforms,r),m={};for(c=0;c<p.length;c++){var y=n.nestedProperty(e,p[c]),v=y.get(),g=new Array(u);for(h=0;h<u;h++)g[h]=v[f[h]];y.set(g)}for(h=0;h<u;h++)m[h]=d(f[h]);r._indexToPoints=m,e._length=u}}}},5788:function(t,e){"use strict";e.version="2.31.0"},5928:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var a=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!a&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},3428:function(t,e,r){var n,i;(function(){var a={version:"3.8.0"},o=[].slice,s=function(t){return o.call(t)},l=self.document;function u(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=this.Element.prototype,p=h.setAttribute,f=h.setAttributeNS,d=this.CSSStyleDeclaration.prototype,m=d.setProperty;h.setAttribute=function(t,e){p.call(this,t,e+"")},h.setAttributeNS=function(t,e,r){f.call(this,t,e,r+"")},d.setProperty=function(t,e,r){m.call(this,t,e+"",r)}}function y(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function g(t){return!isNaN(t)}function _(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n<i;){var a=n+i>>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}a.ascending=y,a.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},a.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&r>n&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&r>n&&(r=n)}return r},a.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(n=t[i])&&n>=n){r=n;break}for(;++i<a;)null!=(n=t[i])&&n>r&&(r=n)}else{for(;++i<a;)if(null!=(n=e.call(t,t[i],i))&&n>=n){r=n;break}for(;++i<a;)null!=(n=e.call(t,t[i],i))&&n>r&&(r=n)}return r},a.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(n=t[a])&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else{for(;++a<o;)if(null!=(n=e.call(t,t[a],a))&&n>=n){r=i=n;break}for(;++a<o;)null!=(n=e.call(t,t[a],a))&&(r>n&&(r=n),i<n&&(i=n))}return[r,i]},a.sum=function(t,e){var r,n=0,i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)g(r=+t[a])&&(n+=r);else for(;++a<i;)g(r=+e.call(t,t[a],a))&&(n+=r);return n},a.mean=function(t,e){var r,n=0,i=t.length,a=-1,o=i;if(1===arguments.length)for(;++a<i;)g(r=v(t[a]))?n+=r:--o;else for(;++a<i;)g(r=v(e.call(t,t[a],a)))?n+=r:--o;if(o)return n/o},a.quantile=function(t,e){var r=(t.length-1)*e+1,n=Math.floor(r),i=+t[n-1],a=r-n;return a?i+a*(t[n]-i):i},a.median=function(t,e){var r,n=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)g(r=v(t[o]))&&n.push(r);else for(;++o<i;)g(r=v(e.call(t,t[o],o)))&&n.push(r);if(n.length)return a.quantile(n.sort(y),.5)},a.variance=function(t,e){var r,n,i=t.length,a=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)g(r=v(t[s]))&&(o+=(n=r-a)*(r-(a+=n/++l)));else for(;++s<i;)g(r=v(e.call(t,t[s],s)))&&(o+=(n=r-a)*(r-(a+=n/++l)));if(l>1)return o/(l-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var x=_(y);function b(t){return t.length}a.bisectLeft=x.left,a.bisect=a.bisectRight=x.right,a.bisector=function(t){return _(1===t.length?function(e,r){return y(t(e),r)}:t)},a.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},a.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},a.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e<r;)i[e]=[n,n=t[++e]];return i},a.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,r=a.min(t,b),n=new Array(r);++e<r;)for(var i,o=-1,s=n[e]=new Array(i);++o<i;)s[o]=t[o][e];return n},a.zip=function(){return a.transpose(arguments)},a.keys=function(t){var e=[];for(var r in t)e.push(r);return e},a.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},a.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},a.merge=function(t){for(var e,r,n,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(r=new Array(o);--i>=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var w=Math.abs;function T(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function k(){this._=Object.create(null)}a.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=function(t){for(var e=1;t*e%1;)e*=10;return e}(w(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)<e;)i.push(n/a);return i},a.map=function(t,e){var r=new k;if(t instanceof k)t.forEach((function(t,e){r.set(t,e)}));else if(Array.isArray(t)){var n,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)r.set(i,t[i]);else for(;++i<a;)r.set(e.call(t,n=t[i],i),n)}else for(var o in t)r.set(o,t[o]);return r};var M="__proto__",A="\0";function S(t){return(t+="")===M||t[0]===A?A+t:t}function L(t){return(t+="")[0]===A?t.slice(1):t}function C(t){return S(t)in this._}function P(t){return(t=S(t))in this._&&delete this._[t]}function I(){var t=[];for(var e in this._)t.push(L(e));return t}function E(){var t=0;for(var e in this._)++t;return t}function D(){for(var t in this._)return!1;return!0}function z(){this._=Object.create(null)}function O(t){return t}function R(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function F(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=B.length;r<n;++r){var i=B[r]+e;if(i in t)return i}}T(k,{has:C,get:function(t){return this._[S(t)]},set:function(t,e){return this._[S(t)]=e},remove:P,keys:I,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:L(e),value:this._[e]});return t},size:E,empty:D,forEach:function(t){for(var e in this._)t.call(this,L(e),this._[e])}}),a.nest=function(){var t,e,r={},n=[],i=[];function o(i,a,s){if(s>=n.length)return e?e.call(r,a):t?a.sort(t):a;for(var l,u,c,h,p=-1,f=a.length,d=n[s++],m=new k;++p<f;)(h=m.get(l=d(u=a[p])))?h.push(u):m.set(l,[u]);return i?(u=i(),c=function(t,e){u.set(t,o(i,e,s))}):(u={},c=function(t,e){u[t]=o(i,e,s)}),m.forEach(c),u}function s(t,e){if(e>=n.length)return t;var r=[],a=i[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),a?r.sort((function(t,e){return a(t.key,e.key)})):r}return r.map=function(t,e){return o(e,t,0)},r.entries=function(t){return s(o(a.map,t,0),0)},r.key=function(t){return n.push(t),r},r.sortKeys=function(t){return i[n.length-1]=t,r},r.sortValues=function(e){return t=e,r},r.rollup=function(t){return e=t,r},r},a.set=function(t){var e=new z;if(t)for(var r=0,n=t.length;r<n;++r)e.add(t[r]);return e},T(z,{has:C,add:function(t){return this._[S(t+="")]=!0,t},remove:P,values:I,size:E,empty:D,forEach:function(t){for(var e in this._)t.call(this,L(e))}}),a.behavior={},a.rebind=function(t,e){for(var r,n=1,i=arguments.length;++n<i;)t[r=arguments[n]]=R(t,e,e[r]);return t};var B=["webkit","ms","moz","Moz","o","O"];function N(){}function U(){}function j(t){var e=[],r=new k;function n(){for(var r,n=e,i=-1,a=n.length;++i<a;)(r=n[i].on)&&r.apply(this,arguments);return t}return n.on=function(n,i){var a,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function V(){a.event.preventDefault()}function q(){for(var t,e=a.event;t=e.sourceEvent;)e=t;return e}function H(t){for(var e=new U,r=0,n=arguments.length;++r<n;)e[arguments[r]]=j(e);return e.of=function(r,n){return function(i){try{var o=i.sourceEvent=a.event;i.target=t,a.event=i,e[i.type].apply(r,n)}finally{a.event=o}}},e}a.dispatch=function(){for(var t=new U,e=-1,r=arguments.length;++e<r;)t[arguments[e]]=j(t);return t},U.prototype.on=function(t,e){var r=t.indexOf("."),n="";if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},a.event=null,a.requote=function(t){return t.replace(G,"\\$&")};var G=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Z={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function Y(t){return Z(t,K),t}var W=function(t,e){return e.querySelector(t)},X=function(t,e){return e.querySelectorAll(t)},J=function(t,e){var r=t.matches||t[F(t,"matchesSelector")];return J=function(t,e){return r.call(t,e)},J(t,e)};"function"==typeof Sizzle&&(W=function(t,e){return Sizzle(t,e)[0]||null},X=Sizzle,J=Sizzle.matchesSelector),a.selection=function(){return a.select(l.documentElement)};var K=a.selection.prototype=[];function Q(t){return"function"==typeof t?t:function(){return W(t,this)}}function $(t){return"function"==typeof t?t:function(){return X(t,this)}}K.select=function(t){var e,r,n,i,a=[];t=Q(t);for(var o=-1,s=this.length;++o<s;){a.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var l=-1,u=n.length;++l<u;)(i=n[l])?(e.push(r=t.call(i,i.__data__,l,o)),r&&"__data__"in i&&(r.__data__=i.__data__)):e.push(null)}return Y(a)},K.selectAll=function(t){var e,r,n=[];t=$(t);for(var i=-1,a=this.length;++i<a;)for(var o=this[i],l=-1,u=o.length;++l<u;)(r=o[l])&&(n.push(e=s(t.call(r,r.__data__,l,i))),e.parentNode=r);return Y(n)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rt(t,e){return t=a.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}:function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function nt(t){return t.trim().replace(/\s+/g," ")}function it(t){return new RegExp("(?:^|\\s+)"+a.requote(t)+"(?:\\s+|$)","g")}function at(t){return(t+"").trim().split(/^|\s+/)}function ot(t,e){var r=(t=at(t).map(st)).length;return"function"==typeof e?function(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}:function(){for(var n=-1;++n<r;)t[n](this,e)}}function st(t){var e=it(t);return function(r,n){if(i=r.classList)return n?i.add(t):i.remove(t);var i=r.getAttribute("class")||"";n?(e.lastIndex=0,e.test(i)||r.setAttribute("class",nt(i+" "+t))):r.setAttribute("class",nt(i.replace(e," ")))}}function lt(t,e,r){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function ut(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}:function(){this[t]=e}}function ct(t){return"function"==typeof t?t:(t=a.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,r=this.namespaceURI;return r===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(r,t)}}function ht(){var t=this.parentNode;t&&t.removeChild(this)}function pt(t){return{__data__:t}}function ft(t){return function(){return J(this,t)}}function dt(t){return arguments.length||(t=y),function(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}}function mt(t,e){for(var r=0,n=t.length;r<n;r++)for(var i,a=t[r],o=0,s=a.length;o<s;o++)(i=a[o])&&e(i,o,r);return t}function yt(t){return Z(t,vt),t}a.ns={prefix:et,qualify:function(t){var e=t.indexOf(":"),r=t;return e>=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(r)?{space:et[r],local:t}:t}},K.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=a.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(rt(e,t[e]));return this}return this.each(rt(t,e))},K.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=at(t)).length,i=-1;if(e=r.classList){for(;++i<n;)if(!e.contains(t[i]))return!1}else for(e=r.getAttribute("class");++i<n;)if(!it(t[i]).test(e))return!1;return!0}for(e in t)this.each(ot(e,t[e]));return this}return this.each(ot(t,e))},K.style=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=""),t)this.each(lt(r,t[r],e));return this}if(n<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(t)}r=""}return this.each(lt(t,e,r))},K.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(ut(e,t[e]));return this}return this.each(ut(t,e))},K.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},K.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},K.append=function(t){return t=ct(t),this.select((function(){return this.appendChild(t.apply(this,arguments))}))},K.insert=function(t,e){return t=ct(t),e=Q(e),this.select((function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)}))},K.remove=function(){return this.each(ht)},K.data=function(t,e){var r,n,i=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++i<a;)(n=r[i])&&(t[i]=n.__data__);return t}function o(t,r){var n,i,a,o=t.length,c=r.length,h=Math.min(o,c),p=new Array(c),f=new Array(c),d=new Array(o);if(e){var m,y=new k,v=new Array(o);for(n=-1;++n<o;)(i=t[n])&&(y.has(m=e.call(i,i.__data__,n))?d[n]=i:y.set(m,i),v[n]=m);for(n=-1;++n<c;)(i=y.get(m=e.call(r,a=r[n],n)))?!0!==i&&(p[n]=i,i.__data__=a):f[n]=pt(a),y.set(m,!0);for(n=-1;++n<o;)n in v&&!0!==y.get(v[n])&&(d[n]=t[n])}else{for(n=-1;++n<h;)i=t[n],a=r[n],i?(i.__data__=a,p[n]=i):f[n]=pt(a);for(;n<c;++n)f[n]=pt(r[n]);for(;n<o;++n)d[n]=t[n]}f.update=p,f.parentNode=p.parentNode=d.parentNode=t.parentNode,s.push(f),l.push(p),u.push(d)}var s=yt([]),l=Y([]),u=Y([]);if("function"==typeof t)for(;++i<a;)o(r=this[i],t.call(r,r.parentNode.__data__,i));else for(;++i<a;)o(r=this[i],t);return l.enter=function(){return s},l.exit=function(){return u},l},K.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},K.filter=function(t){var e,r,n,i=[];"function"!=typeof t&&(t=ft(t));for(var a=0,o=this.length;a<o;a++){i.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&t.call(n,n.__data__,s,a)&&e.push(n)}return Y(i)},K.order=function(){for(var t=-1,e=this.length;++t<e;)for(var r,n=this[t],i=n.length-1,a=n[i];--i>=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},K.sort=function(t){t=dt.apply(this,arguments);for(var e=-1,r=this.length;++e<r;)this[e].sort(t);return this.order()},K.each=function(t){return mt(this,(function(e,r,n){t.call(e,e.__data__,r,n)}))},K.call=function(t){var e=s(arguments);return t.apply(e[0]=this,e),this},K.empty=function(){return!this.node()},K.node=function(){for(var t=0,e=this.length;t<e;t++)for(var r=this[t],n=0,i=r.length;n<i;n++){var a=r[n];if(a)return a}return null},K.size=function(){var t=0;return mt(this,(function(){++t})),t};var vt=[];function gt(t,e,r){var n="__on"+t,i=t.indexOf("."),o=xt;i>0&&(t=t.slice(0,i));var l=_t.get(t);function u(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,o=bt),i?e?function(){var i=o(e,s(arguments));u.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:u:e?N:function(){var e,r=new RegExp("^__on([^.]+)"+a.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}a.selection.enter=yt,a.selection.enter.prototype=vt,vt.append=K.append,vt.empty=K.empty,vt.node=K.node,vt.call=K.call,vt.size=K.size,vt.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s<l;){n=(i=this[s]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)(a=i[u])?(e.push(n[u]=r=t.call(i.parentNode,a.__data__,u,s)),r.__data__=a.__data__):e.push(null)}return Y(o)},vt.insert=function(t,e){var r,n,i;return arguments.length<2&&(r=this,e=function(t,e,a){var o,s=r[a].update,l=s.length;for(a!=i&&(i=a,n=0),e>=n&&(n=e+1);!(o=s[n])&&++n<l;);return o}),K.insert.call(this,t,e)},a.select=function(t){var e;return"string"==typeof t?(e=[W(t,l)]).parentNode=l.documentElement:(e=[t]).parentNode=u(t),Y([e])},a.selectAll=function(t){var e;return"string"==typeof t?(e=s(X(t,l))).parentNode=l.documentElement:(e=s(t)).parentNode=null,Y([e])},K.on=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=!1),t)this.each(gt(r,t[r],e));return this}if(n<2)return(n=this.node()["__on"+t])&&n._;r=!1}return this.each(gt(t,e,r))};var _t=a.map({mouseenter:"mouseover",mouseleave:"mouseout"});function xt(t,e){return function(r){var n=a.event;a.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{a.event=n}}}function bt(t,e){var r=xt(t,e);return function(t){var e=this,n=t.relatedTarget;n&&(n===e||8&n.compareDocumentPosition(e))||r.call(e,t)}}l&&_t.forEach((function(t){"on"+t in l&&_t.remove(t)}));var wt,Tt=0;function kt(t){var e=".dragsuppress-"+ ++Tt,r="click"+e,n=a.select(c(t)).on("touchmove"+e,V).on("dragstart"+e,V).on("selectstart"+e,V);if(null==wt&&(wt=!("onselectstart"in t)&&F(t.style,"userSelect")),wt){var i=u(t).style,o=i[wt];i[wt]="none"}return function(t){if(n.on(e,null),wt&&(i[wt]=o),t){var a=function(){n.on(r,null)};n.on(r,(function(){V(),a()}),!0),setTimeout(a,0)}}}a.mouse=function(t){return At(t,q())};var Mt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function At(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();if(Mt<0){var i=c(t);if(i.scrollX||i.scrollY){var o=(r=a.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Mt=!(o.f||o.e),r.remove()}}return Mt?(n.x=e.pageX,n.y=e.pageY):(n.x=e.clientX,n.y=e.clientY),[(n=n.matrixTransform(t.getScreenCTM().inverse())).x,n.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function St(){return a.event.changedTouches[0].identifier}a.touch=function(t,e,r){if(arguments.length<3&&(r=e,e=q().changedTouches),e)for(var n,i=0,a=e.length;i<a;++i)if((n=e[i]).identifier===r)return At(t,n)},a.behavior.drag=function(){var t=H(i,"drag","dragstart","dragend"),e=null,r=o(N,a.mouse,c,"mousemove","mouseup"),n=o(St,a.touch,O,"touchmove","touchend");function i(){this.on("mousedown.drag",r).on("touchstart.drag",n)}function o(r,n,i,o,s){return function(){var l,u=this,c=a.event.target.correspondingElement||a.event.target,h=u.parentNode,p=t.of(u,arguments),f=0,d=r(),m=".drag"+(null==d?"":"-"+d),y=a.select(i(c)).on(o+m,(function(){var t,e,r=n(h,d);r&&(t=r[0]-g[0],e=r[1]-g[1],f|=t|e,g=r,p({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e}))})).on(s+m,(function(){n(h,d)&&(y.on(o+m,null).on(s+m,null),v(f),p({type:"dragend"}))})),v=kt(c),g=n(h,d);l=e?[(l=e.apply(u,arguments)).x-g[0],l.y-g[1]]:[0,0],p({type:"dragstart"})}}return i.origin=function(t){return arguments.length?(e=t,i):e},a.rebind(i,t,"on")},a.touches=function(t,e){return arguments.length<2&&(e=q().touches),e?s(e).map((function(e){var r=At(t,e);return r.identifier=e.identifier,r})):[]};var Lt=1e-6,Ct=Lt*Lt,Pt=Math.PI,It=2*Pt,Et=It-Lt,Dt=Pt/2,zt=Pt/180,Ot=180/Pt;function Rt(t){return t>1?Dt:t<-1?-Dt:Math.asin(t)}function Ft(t){return((t=Math.exp(t))+1/t)/2}var Bt=Math.SQRT2;a.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],c=s-i,h=l-a,p=c*c+h*h;if(p<Ct)n=Math.log(u/o)/Bt,r=function(t){return[i+t*c,a+t*h,o*Math.exp(Bt*t*n)]};else{var f=Math.sqrt(p),d=(u*u-o*o+4*p)/(2*o*2*f),m=(u*u-o*o-4*p)/(2*u*2*f),y=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-y)/Bt,r=function(t){var e,r=t*n,s=Ft(y),l=o/(2*f)*(s*(e=Bt*r+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+l*c,a+l*h,o*s/Ft(Bt*r+y)]}}return r.duration=1e3*n,r},a.behavior.zoom=function(){var t,e,r,n,i,o,s,u,h,p={x:0,y:0,k:1},f=[960,500],d=jt,m=250,y=0,v="mousedown.zoom",g="mousemove.zoom",_="mouseup.zoom",x="touchstart.zoom",b=H(w,"zoomstart","zoom","zoomend");function w(t){t.on(v,I).on(Ut+".zoom",D).on("dblclick.zoom",z).on(x,E)}function T(t){return[(t[0]-p.x)/p.k,(t[1]-p.y)/p.k]}function k(t){p.k=Math.max(d[0],Math.min(d[1],t))}function M(t,e){e=function(t){return[t[0]*p.k+p.x,t[1]*p.k+p.y]}(e),p.x+=t[0]-e[0],p.y+=t[1]-e[1]}function A(t,r,n,i){t.__chart__={x:p.x,y:p.y,k:p.k},k(Math.pow(2,i)),M(e=r,n),t=a.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){s&&s.domain(o.range().map((function(t){return(t-p.x)/p.k})).map(o.invert)),h&&h.domain(u.range().map((function(t){return(t-p.y)/p.k})).map(u.invert))}function L(t){y++||t({type:"zoomstart"})}function C(t){S(),t({type:"zoom",scale:p.k,translate:[p.x,p.y]})}function P(t){--y||(t({type:"zoomend"}),e=null)}function I(){var t=this,e=b.of(t,arguments),r=0,n=a.select(c(t)).on(g,(function(){r=1,M(a.mouse(t),i),C(e)})).on(_,(function(){n.on(g,null).on(_,null),o(r),P(e)})),i=T(a.mouse(t)),o=kt(t);Ji.call(t),L(e)}function E(){var t,e=this,r=b.of(e,arguments),n={},o=0,s=".zoom-"+a.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],h=a.select(e),f=kt(e);function d(){var r=a.touches(e);return t=p.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=T(t))})),r}function m(){var t=a.event.target;a.select(t).on(l,y).on(u,g),c.push(t);for(var r=a.event.changedTouches,s=0,h=r.length;s<h;++s)n[r[s].identifier]=null;var f=d(),m=Date.now();if(1===f.length){if(m-i<500){var v=f[0];A(e,v,n[v.identifier],Math.floor(Math.log(p.k)/Math.LN2)+1),V()}i=m}else if(f.length>1){v=f[0];var _=f[1],x=v[0]-_[0],b=v[1]-_[1];o=x*x+b*b}}function y(){var s,l,u,c,h=a.touches(e);Ji.call(e);for(var p=0,f=h.length;p<f;++p,c=null)if(u=h[p],c=n[u.identifier]){if(l)break;s=u,l=c}if(c){var d=(d=u[0]-s[0])*d+(d=u[1]-s[1])*d,m=o&&Math.sqrt(d/o);s=[(s[0]+u[0])/2,(s[1]+u[1])/2],l=[(l[0]+c[0])/2,(l[1]+c[1])/2],k(m*t)}i=null,M(s,l),C(r)}function g(){if(a.event.touches.length){for(var t=a.event.changedTouches,e=0,i=t.length;e<i;++e)delete n[t[e].identifier];for(var o in n)return void d()}a.selectAll(c).on(s,null),h.on(v,I).on(x,E),f(),P(r)}m(),L(r),h.on(v,null).on(x,m)}function D(){var i=b.of(this,arguments);n?clearTimeout(n):(Ji.call(this),t=T(e=r||a.mouse(this)),L(i)),n=setTimeout((function(){n=null,P(i)}),50),V(),k(Math.pow(2,.002*Nt())*p.k),M(e,t),C(i)}function z(){var t=a.mouse(this),e=Math.log(p.k)/Math.LN2;A(this,t,T(t),a.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return Ut||(Ut="onwheel"in l?(Nt=function(){return-a.event.deltaY*(a.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(Nt=function(){return a.event.wheelDelta},"mousewheel"):(Nt=function(){return-a.event.detail},"MozMousePixelScroll")),w.event=function(t){t.each((function(){var t=b.of(this,arguments),r=p;$i?a.select(this).transition().each("start.zoom",(function(){p=this.__chart__||{x:0,y:0,k:1},L(t)})).tween("zoom:zoom",(function(){var n=f[0],i=f[1],o=e?e[0]:n/2,s=e?e[1]:i/2,l=a.interpolateZoom([(o-p.x)/p.k,(s-p.y)/p.k,n/p.k],[(o-r.x)/r.k,(s-r.y)/r.k,n/r.k]);return function(e){var r=l(e),i=n/r[2];this.__chart__=p={x:o-r[0]*i,y:s-r[1]*i,k:i},C(t)}})).each("interrupt.zoom",(function(){P(t)})).each("end.zoom",(function(){P(t)})):(this.__chart__=p,L(t),C(t),P(t))}))},w.translate=function(t){return arguments.length?(p={x:+t[0],y:+t[1],k:p.k},S(),w):[p.x,p.y]},w.scale=function(t){return arguments.length?(p={x:p.x,y:p.y,k:null},k(+t),S(),w):p.k},w.scaleExtent=function(t){return arguments.length?(d=null==t?jt:[+t[0],+t[1]],w):d},w.center=function(t){return arguments.length?(r=t&&[+t[0],+t[1]],w):r},w.size=function(t){return arguments.length?(f=t&&[+t[0],+t[1]],w):f},w.duration=function(t){return arguments.length?(m=+t,w):m},w.x=function(t){return arguments.length?(s=t,o=t.copy(),p={x:0,y:0,k:1},w):s},w.y=function(t){return arguments.length?(h=t,u=t.copy(),p={x:0,y:0,k:1},w):h},a.rebind(w,b,"on")};var Nt,Ut,jt=[0,1/0];function Vt(){}function qt(t,e,r){return this instanceof qt?(this.h=+t,this.s=+e,void(this.l=+r)):arguments.length<2?t instanceof qt?new qt(t.h,t.s,t.l):ce(""+t,he,qt):new qt(t,e,r)}a.color=Vt,Vt.prototype.toString=function(){return this.rgb()+""},a.hsl=qt;var Ht=qt.prototype=new Vt;function Gt(t,e,r){var n,i;function a(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ae(a(t+120),a(t),a(t-120))}function Zt(t,e,r){return this instanceof Zt?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof Zt?new Zt(t.h,t.c,t.l):function(t,e,r){return t>0?new Zt(Math.atan2(r,e)*Ot,Math.sqrt(e*e+r*r),t):new Zt(NaN,NaN,t)}(t instanceof Xt?t.l:(t=pe((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Zt(t,e,r)}Ht.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new qt(this.h,this.s,this.l/t)},Ht.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new qt(this.h,this.s,t*this.l)},Ht.rgb=function(){return Gt(this.h,this.s,this.l)},a.hcl=Zt;var Yt=Zt.prototype=new Vt;function Wt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Xt(r,Math.cos(t*=zt)*e,Math.sin(t)*e)}function Xt(t,e,r){return this instanceof Xt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Xt?new Xt(t.l,t.a,t.b):t instanceof Zt?Wt(t.h,t.c,t.l):pe((t=ae(t)).r,t.g,t.b):new Xt(t,e,r)}Yt.brighter=function(t){return new Zt(this.h,this.c,Math.min(100,this.l+Jt*(arguments.length?t:1)))},Yt.darker=function(t){return new Zt(this.h,this.c,Math.max(0,this.l-Jt*(arguments.length?t:1)))},Yt.rgb=function(){return Wt(this.h,this.c,this.l).rgb()},a.lab=Xt;var Jt=18,Kt=.95047,Qt=1,$t=1.08883,te=Xt.prototype=new Vt;function ee(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ae(ie(3.2404542*(i=re(i)*Kt)-1.5371385*(n=re(n)*Qt)-.4985314*(a=re(a)*$t)),ie(-.969266*i+1.8760108*n+.041556*a),ie(.0556434*i-.2040259*n+1.0572252*a))}function re(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ne(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ie(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ae(t,e,r){return this instanceof ae?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ae?new ae(t.r,t.g,t.b):ce(""+t,ae,Gt):new ae(t,e,r)}function oe(t){return new ae(t>>16,t>>8&255,255&t)}function se(t){return oe(t)+""}te.brighter=function(t){return new Xt(Math.min(100,this.l+Jt*(arguments.length?t:1)),this.a,this.b)},te.darker=function(t){return new Xt(Math.max(0,this.l-Jt*(arguments.length?t:1)),this.a,this.b)},te.rgb=function(){return ee(this.l,this.a,this.b)},a.rgb=ae;var le=ae.prototype=new Vt;function ue(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ce(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(de(i[0]),de(i[1]),de(i[2]))}return(a=me.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function he(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e<r?6:0):e==o?(r-t)/s+2:(t-e)/s+4,n*=60):(n=NaN,i=l>0&&l<1?0:n),new qt(n,i,l)}function pe(t,e,r){var n=ne((.4124564*(t=fe(t))+.3575761*(e=fe(e))+.1804375*(r=fe(r)))/Kt),i=ne((.2126729*t+.7151522*e+.072175*r)/Qt);return Xt(116*i-16,500*(n-i),200*(i-ne((.0193339*t+.119192*e+.9503041*r)/$t)))}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function de(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}le.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e<i&&(e=i),r&&r<i&&(r=i),n&&n<i&&(n=i),new ae(Math.min(255,e/t),Math.min(255,r/t),Math.min(255,n/t))):new ae(i,i,i)},le.darker=function(t){return new ae((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},le.hsl=function(){return he(this.r,this.g,this.b)},le.toString=function(){return"#"+ue(this.r)+ue(this.g)+ue(this.b)};var me=a.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function ye(t){return"function"==typeof t?t:function(){return t}}function ve(t){return function(e,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),ge(e,r,t,n)}}function ge(t,e,r,n){var i={},o=a.dispatch("beforesend","progress","load","error"),l={},u=new XMLHttpRequest,c=null;function h(){var t,e=u.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(u)||e>=200&&e<300||304===e){try{t=r.call(i,u)}catch(t){return void o.error.call(i,t)}o.load.call(i,t)}else o.error.call(i,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=h:u.onreadystatechange=function(){u.readyState>3&&h()},u.onprogress=function(t){var e=a.event;a.event=t;try{o.progress.call(i,u)}finally{a.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(c=t,i):c},i.response=function(t){return r=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(r,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),u.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=e&&u.overrideMimeType&&u.overrideMimeType(e),null!=c&&(u.responseType=c),null!=a&&i.on("error",a).on("load",(function(t){a(null,t)})),o.beforesend.call(i,u),u.send(null==n?null:n),i},i.abort=function(){return u.abort(),i},a.rebind(i,o,"on"),null==n?i:i.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}me.forEach((function(t,e){me.set(t,oe(e))})),a.functor=ye,a.xhr=ve(O),a.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ge(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i<n;++i)r[t[i]]=e[i];return r};r=e?function(t,r){return e(i(t),r)}:i}))},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,u=0,c=0;function h(){if(u>=l)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++<l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return u=r+2,13===(s=t.charCodeAt(r+1))?(i=!0,10===t.charCodeAt(r+2)&&++u):10===s&&(i=!0),t.slice(e+1,r).replace(/""/g,'"')}for(;u<l;){var s,c=1;if(10===(s=t.charCodeAt(u++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(u)&&(++u,++c);else if(s!==n)continue;return t.slice(e,u-c)}return t.slice(e)}for(;(r=h())!==o;){for(var p=[];r!==a&&r!==o;)p.push(r),r=h();e&&null==(p=e(p,c++))||s.push(p)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var r=new z,n=[];return e.forEach((function(t){for(var e in t)r.has(e)||n.push(r.add(e))})),[n.map(l).join(t)].concat(e.map((function(e){return n.map((function(t){return l(e[t])})).join(t)}))).join("\n")},i.formatRows=function(t){return t.map(s).join("\n")},i},a.csv=a.dsv(",","text/csv"),a.tsv=a.dsv("\t","text/tab-separated-values");var _e,xe,be,we,Te=this[F(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function ke(t,e,r){var n=arguments.length;n<2&&(e=0),n<3&&(r=Date.now());var i={c:t,t:r+e,n:null};return xe?xe.n=i:_e=i,xe=i,be||(we=clearTimeout(we),be=1,Te(Me)),i}function Me(){var t=Ae(),e=Se()-t;e>24?(isFinite(e)&&(clearTimeout(we),we=setTimeout(Me,e)),be=0):(be=1,Te(Me))}function Ae(){for(var t=Date.now(),e=_e;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Se(){for(var t,e=_e,r=1/0;e;)e.c?(e.t<r&&(r=e.t),e=(t=e).n):e=t?t.n=e.n:_e=e.n;return xe=t,r}function Le(t){return t[0]}function Ce(t){return t[1]}function Pe(t){for(var e,r,n,i=t.length,a=[0,1],o=2,s=2;s<i;s++){for(;o>1&&(e=t[a[o-2]],r=t[a[o-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function Ie(t,e){return t[0]-e[0]||t[1]-e[1]}a.timer=function(){ke.apply(this,arguments)},a.timer.flush=function(){Ae(),Se()},a.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},a.geom={},a.geom.hull=function(t){var e=Le,r=Ce;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ye(e),a=ye(r),o=t.length,s=[],l=[];for(n=0;n<o;n++)s.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(s.sort(Ie),n=0;n<o;n++)l.push([s[n][0],-s[n][1]]);var u=Pe(s),c=Pe(l),h=c[0]===u[0],p=c[c.length-1]===u[u.length-1],f=[];for(n=u.length-1;n>=0;--n)f.push(t[s[u[n]][2]]);for(n=+h;n<c.length-p;++n)f.push(t[s[c[n]][2]]);return f}return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n},a.geom.polygon=function(t){return Z(t,Ee),t};var Ee=a.geom.polygon.prototype=[];function De(t,e,r){return(r[0]-e[0])*(t[1]-e[1])<(r[1]-e[1])*(t[0]-e[0])}function ze(t,e,r,n){var i=t[0],a=r[0],o=e[0]-i,s=n[0]-a,l=t[1],u=r[1],c=e[1]-l,h=n[1]-u,p=(s*(l-u)-h*(i-a))/(h*o-s*c);return[i+p*o,l+p*c]}function Oe(t){var e=t[0],r=t[t.length-1];return!(e[0]-r[0]||e[1]-r[1])}Ee.area=function(){for(var t,e=-1,r=this.length,n=this[r-1],i=0;++e<r;)t=n,n=this[e],i+=t[1]*n[0]-t[0]*n[1];return.5*i},Ee.centroid=function(t){var e,r,n=-1,i=this.length,a=0,o=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++n<i;)e=s,s=this[n],r=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*r,o+=(e[1]+s[1])*r;return[a*t,o*t]},Ee.clip=function(t){for(var e,r,n,i,a,o,s=Oe(t),l=-1,u=this.length-Oe(this),c=this[u-1];++l<u;){for(e=t.slice(),t.length=0,i=this[l],a=e[(n=e.length-s)-1],r=-1;++r<n;)De(o=e[r],c,i)?(De(a,c,i)||t.push(ze(a,o,c,i)),t.push(o)):De(a,c,i)&&t.push(ze(a,o,c,i)),a=o;s&&t.push(t[0]),c=i}return t};var Re,Fe,Be,Ne,Ue,je=[],Ve=[];function qe(){sr(this),this.edge=this.site=this.circle=null}function He(t){var e=je.pop()||new qe;return e.site=t,e}function Ge(t){tr(t),Be.remove(t),je.push(t),sr(t)}function Ze(t){var e=t.circle,r=e.x,n=e.cy,i={x:r,y:n},a=t.P,o=t.N,s=[t];Ge(t);for(var l=a;l.circle&&w(r-l.circle.x)<Lt&&w(n-l.circle.cy)<Lt;)a=l.P,s.unshift(l),Ge(l),l=a;s.unshift(l),tr(l);for(var u=o;u.circle&&w(r-u.circle.x)<Lt&&w(n-u.circle.cy)<Lt;)o=u.N,s.push(u),Ge(u),u=o;s.push(u),tr(u);var c,h=s.length;for(c=1;c<h;++c)u=s[c],l=s[c-1],ir(u.edge,l.site,u.site,i);l=s[0],(u=s[h-1]).edge=nr(l.site,u.site,null,i),$e(l),$e(u)}function Ye(t){for(var e,r,n,i,a=t.x,o=t.y,s=Be._;s;)if((n=We(s,o)-a)>Lt)s=s.L;else{if(!((i=a-Xe(s,o))>Lt)){n>-Lt?(e=s.P,r=s):i>-Lt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=He(t);if(Be.insert(e,l),e||r){if(e===r)return tr(e),r=He(e.site),Be.insert(l,r),l.edge=r.edge=nr(e.site,l.site),$e(e),void $e(r);if(r){tr(e),tr(r);var u=e.site,c=u.x,h=u.y,p=t.x-c,f=t.y-h,d=r.site,m=d.x-c,y=d.y-h,v=2*(p*y-f*m),g=p*p+f*f,_=m*m+y*y,x={x:(y*g-f*_)/v+c,y:(p*_-m*g)/v+h};ir(r.edge,u,d,x),l.edge=nr(u,t,null,x),r.edge=nr(t,d,null,x),$e(e),$e(r)}else l.edge=nr(e.site,l.site)}}function We(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,u=l-e;if(!u)return s;var c=s-n,h=1/a-1/u,p=c/u;return h?(-p+Math.sqrt(p*p-2*h*(c*c/(-2*u)-l+u/2+i-a/2)))/h+n:(n+s)/2}function Xe(t,e){var r=t.N;if(r)return We(r,e);var n=t.site;return n.y===e?n.x:1/0}function Je(t){this.site=t,this.edges=[]}function Ke(t,e){return e.angle-t.angle}function Qe(){sr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,u=n.y-s,c=a.x-o,h=2*(l*(y=a.y-s)-u*c);if(!(h>=-Ct)){var p=l*l+u*u,f=c*c+y*y,d=(y*p-u*f)/h,m=(l*f-c*p)/h,y=m+s,v=Ve.pop()||new Qe;v.arc=t,v.site=i,v.x=d+o,v.y=y+Math.sqrt(d*d+m*m),v.cy=y,t.circle=v;for(var g=null,_=Ue._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){g=_.P;break}_=_.L}else{if(!_.R){g=_;break}_=_.R}Ue.insert(g,v),g||(Ne=v)}}}}function tr(t){var e=t.circle;e&&(e.P||(Ne=e.N),Ue.remove(e),Ve.push(e),sr(e),t.circle=null)}function er(t,e){var r=t.b;if(r)return!0;var n,i,a=t.a,o=e[0][0],s=e[1][0],l=e[0][1],u=e[1][1],c=t.l,h=t.r,p=c.x,f=c.y,d=h.x,m=h.y,y=(p+d)/2,v=(f+m)/2;if(m===f){if(y<o||y>=s)return;if(p>d){if(a){if(a.y>=u)return}else a={x:y,y:l};r={x:y,y:u}}else{if(a){if(a.y<l)return}else a={x:y,y:u};r={x:y,y:l}}}else if(i=v-(n=(p-d)/(m-f))*y,n<-1||n>1)if(p>d){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y<l)return}else a={x:(u-i)/n,y:u};r={x:(l-i)/n,y:l}}else if(f<m){if(a){if(a.x>=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x<o)return}else a={x:s,y:n*s+i};r={x:o,y:n*o+i}}return t.a=a,t.b=r,!0}function rr(t,e){this.l=t,this.r=e,this.a=this.b=null}function nr(t,e,r,n){var i=new rr(t,e);return Re.push(i),r&&ir(i,t,e,r),n&&ir(i,e,t,n),Fe[t.i].edges.push(new ar(i,t,e)),Fe[e.i].edges.push(new ar(i,e,t)),i}function ir(t,e,r,n){t.a||t.b?t.l===r?t.b=n:t.a=n:(t.a=n,t.l=e,t.r=r)}function ar(t,e,r){var n=t.a,i=t.b;this.edge=t,this.site=e,this.angle=r?Math.atan2(r.y-e.y,r.x-e.x):t.l===e?Math.atan2(i.x-n.x,n.y-i.y):Math.atan2(n.x-i.x,i.y-n.y)}function or(){this._=null}function sr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function lr(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function ur(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function cr(t){for(;t.L;)t=t.L;return t}function hr(t,e){var r,n,i,a=t.sort(pr).pop();for(Re=[],Fe=new Array(t.length),Be=new or,Ue=new or;;)if(i=Ne,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))a.x===r&&a.y===n||(Fe[a.i]=new Je(a),Ye(a),r=a.x,n=a.y),a=t.pop();else{if(!i)break;Ze(i.arc)}e&&(function(t){for(var e,r,n,i,a,o=Re,s=(r=t[0][0],n=t[0][1],i=t[1][0],a=t[1][1],function(t){var e,o=t.a,s=t.b,l=o.x,u=o.y,c=0,h=1,p=s.x-l,f=s.y-u;if(e=r-l,p||!(e>0)){if(e/=p,p<0){if(e<c)return;e<h&&(h=e)}else if(p>0){if(e>h)return;e>c&&(c=e)}if(e=i-l,p||!(e<0)){if(e/=p,p<0){if(e>h)return;e>c&&(c=e)}else if(p>0){if(e<c)return;e<h&&(h=e)}if(e=n-u,f||!(e>0)){if(e/=f,f<0){if(e<c)return;e<h&&(h=e)}else if(f>0){if(e>h)return;e>c&&(c=e)}if(e=a-u,f||!(e<0)){if(e/=f,f<0){if(e>h)return;e>c&&(c=e)}else if(f>0){if(e<c)return;e<h&&(h=e)}return c>0&&(t.a={x:l+c*p,y:u+c*f}),h<1&&(t.b={x:l+h*p,y:u+h*f}),t}}}}}),l=o.length;l--;)(!er(e=o[l],t)||!s(e)||w(e.a.x-e.b.x)<Lt&&w(e.a.y-e.b.y)<Lt)&&(e.a=e.b=null,o.splice(l,1))}(e),function(t){for(var e,r,n,i,a,o,s,l,u,c,h=t[0][0],p=t[1][0],f=t[0][1],d=t[1][1],m=Fe,y=m.length;y--;)if((a=m[y])&&a.prepare())for(l=(s=a.edges).length,o=0;o<l;)n=(c=s[o].end()).x,i=c.y,e=(u=s[++o%l].start()).x,r=u.y,(w(n-e)>Lt||w(i-r)>Lt)&&(s.splice(o,0,new ar((v=a.site,g=c,_=w(n-h)<Lt&&d-i>Lt?{x:h,y:w(e-h)<Lt?r:d}:w(i-d)<Lt&&p-n>Lt?{x:w(r-d)<Lt?e:p,y:d}:w(n-p)<Lt&&i-f>Lt?{x:p,y:w(e-p)<Lt?r:f}:w(i-f)<Lt&&n-h>Lt?{x:w(r-f)<Lt?e:h,y:f}:null,x=void 0,(x=new rr(v,null)).a=g,x.b=_,Re.push(x),x),a.site,null)),++l);var v,g,_,x}(e));var o={cells:Fe,edges:Re};return Be=Ue=Re=Fe=null,o}function pr(t,e){return e.y-t.y||e.x-t.x}Je.prototype.prepare=function(){for(var t,e=this.edges,r=e.length;r--;)(t=e[r].edge).b&&t.a||e.splice(r,1);return e.sort(Ke),e.length},ar.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},or.prototype={insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=cr(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)r===(n=r.U).L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(lr(this,r),r=(t=r).U),r.C=!1,n.C=!0,ur(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(ur(this,r),r=(t=r).U),r.C=!1,n.C=!0,lr(this,n)),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,r,n,i=t.U,a=t.L,o=t.R;if(r=a?o?cr(o):a:o,i?i.L===t?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=t.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=t.U,t=r.R,i.L=t,r.R=o,o.U=r):(r.U=i,i=r,t=r.R)):(n=t.C,t=r),t&&(t.U=i),!n)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,lr(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,ur(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,lr(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,ur(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,lr(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,ur(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},a.geom.voronoi=function(t){var e=Le,r=Ce,n=e,i=r,a=fr;if(t)return o(t);function o(t){var e=new Array(t.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return hr(s(t),a).cells.forEach((function(a,s){var l=a.edges,u=a.site;(e[s]=l.length?l.map((function(t){var e=t.start();return[e.x,e.y]})):u.x>=r&&u.x<=i&&u.y>=n&&u.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/Lt)*Lt,y:Math.round(i(t,e)/Lt)*Lt,i:e}}))}return o.links=function(t){return hr(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},o.triangles=function(t){var e=[];return hr(s(t)).cells.forEach((function(r,n){for(var i,a,o,s,l=r.site,u=r.edges.sort(Ke),c=-1,h=u.length,p=u[h-1].edge,f=p.l===l?p.r:p.l;++c<h;)i=f,f=(p=u[c].edge).l===l?p.r:p.l,n<i.i&&n<f.i&&(o=i,s=f,((a=l).x-s.x)*(o.y-a.y)-(a.x-o.x)*(s.y-a.y)<0)&&e.push([t[n],t[i.i],t[f.i]])})),e},o.x=function(t){return arguments.length?(n=ye(e=t),o):e},o.y=function(t){return arguments.length?(i=ye(r=t),o):r},o.clipExtent=function(t){return arguments.length?(a=null==t?fr:t,o):a===fr?null:a},o.size=function(t){return arguments.length?o.clipExtent(t&&[[0,0],t]):a===fr?null:a&&a[1]},o};var fr=[[-1e6,-1e6],[1e6,1e6]];function dr(t){return t.x}function mr(t){return t.y}function yr(t,e,r,n,i,a){if(!t(e,r,n,i,a)){var o=.5*(r+i),s=.5*(n+a),l=e.nodes;l[0]&&yr(t,l[0],r,n,o,s),l[1]&&yr(t,l[1],o,n,i,s),l[2]&&yr(t,l[2],r,s,o,a),l[3]&&yr(t,l[3],o,s,i,a)}}function vr(t,e){t=a.rgb(t),e=a.rgb(e);var r=t.r,n=t.g,i=t.b,o=e.r-r,s=e.g-n,l=e.b-i;return function(t){return"#"+ue(Math.round(r+o*t))+ue(Math.round(n+s*t))+ue(Math.round(i+l*t))}}function gr(t,e){var r,n={},i={};for(r in t)r in e?n[r]=Tr(t[r],e[r]):i[r]=t[r];for(r in e)r in t||(i[r]=e[r]);return function(t){for(r in n)i[r]=n[r](t);return i}}function _r(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function xr(t,e){var r,n,i,a=br.lastIndex=wr.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(r=br.exec(t))&&(n=wr.exec(e));)(i=n.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:_r(r,n)})),a=wr.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var r,n=0;n<e;++n)s[(r=l[n]).i]=r.x(t);return s.join("")})}a.geom.delaunay=function(t){return a.geom.voronoi().triangles(t)},a.geom.quadtree=function(t,e,r,n,i){var a,o=Le,s=Ce;if(a=arguments.length)return o=dr,s=mr,3===a&&(i=r,n=e,r=e=0),l(t);function l(t){var l,u,c,h,p,f,d,m,y,v=ye(o),g=ye(s);if(null!=e)f=e,d=r,m=n,y=i;else if(m=y=-(f=d=1/0),u=[],c=[],p=t.length,a)for(h=0;h<p;++h)(l=t[h]).x<f&&(f=l.x),l.y<d&&(d=l.y),l.x>m&&(m=l.x),l.y>y&&(y=l.y),u.push(l.x),c.push(l.y);else for(h=0;h<p;++h){var _=+v(l=t[h],h),x=+g(l,h);_<f&&(f=_),x<d&&(d=x),_>m&&(m=_),x>y&&(y=x),u.push(_),c.push(x)}var b=m-f,T=y-d;function k(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,u=t.y;if(null!=l)if(w(l-r)+w(u-n)<.01)M(t,e,r,n,i,a,o,s);else{var c=t.point;t.x=t.y=t.point=null,M(t,c,l,u,i,a,o,s),M(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else M(t,e,r,n,i,a,o,s)}function M(t,e,r,n,i,a,o,s){var l=.5*(i+o),u=.5*(a+s),c=r>=l,h=n>=u,p=h<<1|c;t.leaf=!1,c?i=l:o=l,h?a=u:s=u,k(t=t.nodes[p]||(t.nodes[p]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,a,o,s)}b>T?y=d+b:m=f+T;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(A,t,+v(t,++h),+g(t,h),f,d,m,y)}};if(A.visit=function(t){yr(t,A,f,d,m,y)},A.find=function(t){return function(t,e,r,n,i,a,o){var s,l=1/0;return function t(u,c,h,p,f){if(!(c>a||h>o||p<n||f<i)){if(d=u.point){var d,m=e-u.x,y=r-u.y,v=m*m+y*y;if(v<l){var g=Math.sqrt(l=v);n=e-g,i=r-g,a=e+g,o=r+g,s=d}}for(var _=u.nodes,x=.5*(c+p),b=.5*(h+f),w=(r>=b)<<1|e>=x,T=w+4;w<T;++w)if(u=_[3&w])switch(3&w){case 0:t(u,c,h,x,b);break;case 1:t(u,x,h,p,b);break;case 2:t(u,c,b,x,f);break;case 3:t(u,x,b,p,f)}}}(t,n,i,a,o),s}(A,t[0],t[1],f,d,m,y)},h=-1,null==e){for(;++h<p;)k(A,t[h],u[h],c[h],f,d,m,y);--h}else t.forEach(A.add);return u=c=t=l=null,A}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(s=t,l):s},l.extent=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=+t[0][0],r=+t[0][1],n=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,r],[n,i]]},l.size=function(t){return arguments.length?(null==t?e=r=n=i=null:(e=r=0,n=+t[0],i=+t[1]),l):null==e?null:[n-e,i-r]},l},a.interpolateRgb=vr,a.interpolateObject=gr,a.interpolateNumber=_r,a.interpolateString=xr;var br=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wr=new RegExp(br.source,"g");function Tr(t,e){for(var r,n=a.interpolators.length;--n>=0&&!(r=a.interpolators[n](t,e)););return r}function kr(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r<s;++r)n.push(Tr(t[r],e[r]));for(;r<a;++r)i[r]=t[r];for(;r<o;++r)i[r]=e[r];return function(t){for(r=0;r<s;++r)i[r]=n[r](t);return i}}a.interpolate=Tr,a.interpolators=[function(t,e){var r=typeof e;return("string"===r?me.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?vr:xr:e instanceof Vt?vr:Array.isArray(e)?kr:"object"===r&&isNaN(e)?gr:_r)(t,e)}],a.interpolateArray=kr;var Mr=function(){return O},Ar=a.map({linear:Mr,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return Pr},cubic:function(){return Ir},sin:function(){return Dr},exp:function(){return zr},circle:function(){return Or},elastic:function(t,e){var r;return arguments.length<2&&(e=.45),arguments.length?r=e/It*Math.asin(1/t):(t=1,r=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*It/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return Rr}}),Sr=a.map({in:O,out:Lr,"in-out":Cr,"out-in":function(t){return Cr(Lr(t))}});function Lr(t){return function(e){return 1-t(1-e)}}function Cr(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Pr(t){return t*t}function Ir(t){return t*t*t}function Er(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Dr(t){return 1-Math.cos(t*Dt)}function zr(t){return Math.pow(2,10*(t-1))}function Or(t){return 1-Math.sqrt(1-t*t)}function Rr(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Fr(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Br(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=Ur(i),s=Nr(i,a),l=Ur(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]<a[0]*i[1]&&(i[0]*=-1,i[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-a[0],a[1]))*Ot,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Ot:0}function Nr(t,e){return t[0]*e[0]+t[1]*e[1]}function Ur(t){var e=Math.sqrt(Nr(t,t));return e&&(t[0]/=e,t[1]/=e),e}a.ease=function(t){var e,r=t.indexOf("-"),n=r>=0?t.slice(0,r):t,i=r>=0?t.slice(r+1):"in";return n=Ar.get(n)||Mr,i=Sr.get(i)||O,e=i(n.apply(null,o.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},a.interpolateHcl=function(t,e){t=a.hcl(t),e=a.hcl(e);var r=t.h,n=t.c,i=t.l,o=e.h-r,s=e.c-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.c:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return Wt(r+o*t,n+s*t,i+l*t)+""}},a.interpolateHsl=function(t,e){t=a.hsl(t),e=a.hsl(e);var r=t.h,n=t.s,i=t.l,o=e.h-r,s=e.s-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.s:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return Gt(r+o*t,n+s*t,i+l*t)+""}},a.interpolateLab=function(t,e){t=a.lab(t),e=a.lab(e);var r=t.l,n=t.a,i=t.b,o=e.l-r,s=e.a-n,l=e.b-i;return function(t){return ee(r+o*t,n+s*t,i+l*t)+""}},a.interpolateRound=Fr,a.transform=function(t){var e=l.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Br(r?r.matrix:jr)})(t)},Br.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var jr={a:1,b:0,c:0,d:1,e:0,f:0};function Vr(t){return t.length?t.pop()+",":""}function qr(t,e){var r=[],n=[];return t=a.transform(t),e=a.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:_r(t[0],e[0])},{i:i-2,x:_r(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Vr(r)+"rotate(",null,")")-2,x:_r(t,e)})):e&&r.push(Vr(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(Vr(r)+"skewX(",null,")")-2,x:_r(t,e)}):e&&r.push(Vr(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Vr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:_r(t[0],e[0])},{i:i-2,x:_r(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Vr(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i<a;)r[(e=n[i]).i]=e.x(t);return r.join("")}}function Hr(t,e){return e=(e-=t=+t)||1/e,function(r){return(r-t)/e}}function Gr(t,e){return e=(e-=t=+t)||1/e,function(r){return Math.max(0,Math.min(1,(r-t)/e))}}function Zr(t){for(var e=t.source,r=t.target,n=function(t,e){if(t===e)return t;for(var r=Yr(t),n=Yr(e),i=r.pop(),a=n.pop(),o=null;i===a;)o=i,i=r.pop(),a=n.pop();return o}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i}function Yr(t){for(var e=[],r=t.parent;null!=r;)e.push(t),t=r,r=r.parent;return e.push(t),e}function Wr(t){t.fixed|=2}function Xr(t){t.fixed&=-7}function Jr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Kr(t){t.fixed&=-5}function Qr(t,e,r){var n=0,i=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++l<s;)null!=(a=o[l])&&(Qr(a,e,r),t.charge+=a.charge,n+=a.charge*a.cx,i+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=e*r[t.point.index];t.charge+=t.pointCharge=u,n+=u*t.point.x,i+=u*t.point.y}t.cx=n/t.charge,t.cy=i/t.charge}a.interpolateTransform=qr,a.layout={},a.layout.bundle=function(){return function(t){for(var e=[],r=-1,n=t.length;++r<n;)e.push(Zr(t[r]));return e}},a.layout.chord=function(){var t,e,r,n,i,o,s,l={},u=0;function c(){var l,c,p,f,d,m={},y=[],v=a.range(n),g=[];for(t=[],e=[],l=0,f=-1;++f<n;){for(c=0,d=-1;++d<n;)c+=r[f][d];y.push(c),g.push(a.range(n)),l+=c}for(i&&v.sort((function(t,e){return i(y[t],y[e])})),o&&g.forEach((function(t,e){t.sort((function(t,n){return o(r[e][t],r[e][n])}))})),l=(It-u*n)/l,c=0,f=-1;++f<n;){for(p=c,d=-1;++d<n;){var _=v[f],x=g[_][d],b=r[_][x],w=c,T=c+=b*l;m[_+"-"+x]={index:_,subindex:x,startAngle:w,endAngle:T,value:b}}e[_]={index:_,startAngle:p,endAngle:c,value:y[_]},c+=u}for(f=-1;++f<n;)for(d=f-1;++d<n;){var k=m[f+"-"+d],M=m[d+"-"+f];(k.value||M.value)&&t.push(k.value<M.value?{source:M,target:k}:{source:k,target:M})}s&&h()}function h(){t.sort((function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)}))}return l.matrix=function(i){return arguments.length?(n=(r=i)&&r.length,t=e=null,l):r},l.padding=function(r){return arguments.length?(u=r,t=e=null,l):u},l.sortGroups=function(r){return arguments.length?(i=r,t=e=null,l):i},l.sortSubgroups=function(e){return arguments.length?(o=e,t=null,l):o},l.sortChords=function(e){return arguments.length?(s=e,t&&h(),l):s},l.chords=function(){return t||c(),t},l.groups=function(){return e||c(),e},l},a.layout.force=function(){var t,e,r,n,i,o,s={},l=a.dispatch("start","tick","end"),u=[1,1],c=.9,h=$r,p=tn,f=-30,d=en,m=.1,y=.64,v=[],g=[];function _(t){return function(e,r,n,i){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=i-r,l=a*a+o*o;if(s*s/y<l){if(l<d){var u=e.charge/l;t.px-=a*u,t.py-=o*u}return!0}e.point&&l&&l<d&&(u=e.pointCharge/l,t.px-=a*u,t.py-=o*u)}return!e.charge}}function x(t){t.px=a.event.x,t.py=a.event.y,s.resume()}return s.tick=function(){if((r*=.99)<.005)return t=null,l.end({type:"end",alpha:r=0}),!0;var e,s,h,p,d,y,x,b,w,T=v.length,k=g.length;for(s=0;s<k;++s)p=(h=g[s]).source,(y=(b=(d=h.target).x-p.x)*b+(w=d.y-p.y)*w)&&(b*=y=r*i[s]*((y=Math.sqrt(y))-n[s])/y,w*=y,d.x-=b*(x=p.weight+d.weight?p.weight/(p.weight+d.weight):.5),d.y-=w*x,p.x+=b*(x=1-x),p.y+=w*x);if((x=r*m)&&(b=u[0]/2,w=u[1]/2,s=-1,x))for(;++s<T;)(h=v[s]).x+=(b-h.x)*x,h.y+=(w-h.y)*x;if(f)for(Qr(e=a.geom.quadtree(v),r,o),s=-1;++s<T;)(h=v[s]).fixed||e.visit(_(h));for(s=-1;++s<T;)(h=v[s]).fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*c,h.y-=(h.py-(h.py=h.y))*c);l.tick({type:"tick",alpha:r})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(g=t,s):g},s.size=function(t){return arguments.length?(u=t,s):u},s.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(p="function"==typeof t?t:+t,s):p},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(f="function"==typeof t?t:+t,s):f},s.chargeDistance=function(t){return arguments.length?(d=t*t,s):Math.sqrt(d)},s.gravity=function(t){return arguments.length?(m=+t,s):m},s.theta=function(t){return arguments.length?(y=t*t,s):Math.sqrt(y)},s.alpha=function(e){return arguments.length?(e=+e,r?e>0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=ke(s.tick)),s):r},s.start=function(){var t,e,r,a=v.length,l=g.length,c=u[0],d=u[1];for(t=0;t<a;++t)(r=v[t]).index=t,r.weight=0;for(t=0;t<l;++t)"number"==typeof(r=g[t]).source&&(r.source=v[r.source]),"number"==typeof r.target&&(r.target=v[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<a;++t)r=v[t],isNaN(r.x)&&(r.x=m("x",c)),isNaN(r.y)&&(r.y=m("y",d)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(n=[],"function"==typeof h)for(t=0;t<l;++t)n[t]=+h.call(this,g[t],t);else for(t=0;t<l;++t)n[t]=h;if(i=[],"function"==typeof p)for(t=0;t<l;++t)i[t]=+p.call(this,g[t],t);else for(t=0;t<l;++t)i[t]=p;if(o=[],"function"==typeof f)for(t=0;t<a;++t)o[t]=+f.call(this,v[t],t);else for(t=0;t<a;++t)o[t]=f;function m(r,n){if(!e){for(e=new Array(a),u=0;u<a;++u)e[u]=[];for(u=0;u<l;++u){var i=g[u];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var o,s=e[t],u=-1,c=s.length;++u<c;)if(!isNaN(o=s[u][r]))return o;return Math.random()*n}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(e||(e=a.behavior.drag().origin(O).on("dragstart.force",Wr).on("drag.force",x).on("dragend.force",Xr)),!arguments.length)return e;this.on("mouseover.force",Jr).on("mouseout.force",Kr).call(e)},a.rebind(s,l,"on")};var $r=20,tn=1,en=1/0;function rn(t,e){return a.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=un,t}function nn(t,e){for(var r=[t];null!=(t=r.pop());)if(e(t),(i=t.children)&&(n=i.length))for(var n,i;--n>=0;)r.push(i[n])}function an(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o<i;)r.push(a[o]);for(;null!=(t=n.pop());)e(t)}function on(t){return t.children}function sn(t){return t.value}function ln(t,e){return e.value-t.value}function un(t){return a.merge(t.map((function(t){return(t.children||[]).map((function(e){return{source:t,target:e}}))})))}a.layout.hierarchy=function(){var t=ln,e=on,r=sn;function n(i){var a,o=[i],s=[];for(i.depth=0;null!=(a=o.pop());)if(s.push(a),(u=e.call(n,a,a.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;r&&(a.value=0),a.children=u}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return an(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(nn(t,(function(t){t.children&&(t.value=0)})),an(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},a.layout.partition=function(){var t=a.layout.hierarchy(),e=[1,1];function r(t,e,n,i){var a=t.children;if(t.x=e,t.y=t.depth*i,t.dx=n,t.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=t.value?n/t.value:0;++u<o;)r(s=a[u],e,l=s.value*n,i),e+=l}}function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,a=-1;++a<i;)r=Math.max(r,n(e[a]));return 1+r}function i(i,a){var o=t.call(this,i,a);return r(o[0],0,e[0],e[1]/n(o[0])),o}return i.size=function(t){return arguments.length?(e=t,i):e},rn(i,t)},a.layout.pie=function(){var t=Number,e=cn,r=0,n=It,i=0;function o(s){var l,u=s.length,c=s.map((function(e,r){return+t.call(o,e,r)})),h=+("function"==typeof r?r.apply(this,arguments):r),p=("function"==typeof n?n.apply(this,arguments):n)-h,f=Math.min(Math.abs(p)/u,+("function"==typeof i?i.apply(this,arguments):i)),d=f*(p<0?-1:1),m=a.sum(c),y=m?(p-u*d)/m:0,v=a.range(u),g=[];return null!=e&&v.sort(e===cn?function(t,e){return c[e]-c[t]}:function(t,r){return e(s[t],s[r])}),v.forEach((function(t){g[t]={data:s[t],value:l=c[t],startAngle:h,endAngle:h+=l*y+d,padAngle:f}})),g}return o.value=function(e){return arguments.length?(t=e,o):t},o.sort=function(t){return arguments.length?(e=t,o):e},o.startAngle=function(t){return arguments.length?(r=t,o):r},o.endAngle=function(t){return arguments.length?(n=t,o):n},o.padAngle=function(t){return arguments.length?(i=t,o):i},o};var cn={};function hn(t){return t.x}function pn(t){return t.y}function fn(t,e,r){t.y0=e,t.y=r}a.layout.stack=function(){var t=O,e=yn,r=vn,n=fn,i=hn,o=pn;function s(l,u){if(!(f=l.length))return l;var c=l.map((function(e,r){return t.call(s,e,r)})),h=c.map((function(t){return t.map((function(t,e){return[i.call(s,t,e),o.call(s,t,e)]}))})),p=e.call(s,h,u);c=a.permute(c,p),h=a.permute(h,p);var f,d,m,y,v=r.call(s,h,u),g=c[0].length;for(m=0;m<g;++m)for(n.call(s,c[0][m],y=v[m],h[0][m][1]),d=1;d<f;++d)n.call(s,c[d][m],y+=h[d-1][m][1],h[d][m][1]);return l}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(t){return arguments.length?(e="function"==typeof t?t:dn.get(t)||yn,s):e},s.offset=function(t){return arguments.length?(r="function"==typeof t?t:mn.get(t)||vn,s):r},s.x=function(t){return arguments.length?(i=t,s):i},s.y=function(t){return arguments.length?(o=t,s):o},s.out=function(t){return arguments.length?(n=t,s):n},s};var dn=a.map({"inside-out":function(t){var e,r,n=t.length,i=t.map(gn),o=t.map(_n),s=a.range(n).sort((function(t,e){return i[t]-i[e]})),l=0,u=0,c=[],h=[];for(e=0;e<n;++e)r=s[e],l<u?(l+=o[r],c.push(r)):(u+=o[r],h.push(r));return h.reverse().concat(c)},reverse:function(t){return a.range(t.length).reverse()},default:yn}),mn=a.map({silhouette:function(t){var e,r,n,i=t.length,a=t[0].length,o=[],s=0,l=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<a;++r)l[r]=(s-o[r])/2;return l},wiggle:function(t){var e,r,n,i,a,o,s,l,u,c=t.length,h=t[0],p=h.length,f=[];for(f[0]=l=u=0,r=1;r<p;++r){for(e=0,i=0;e<c;++e)i+=t[e][r][1];for(e=0,a=0,s=h[r][0]-h[r-1][0];e<c;++e){for(n=0,o=(t[e][r][1]-t[e][r-1][1])/(2*s);n<e;++n)o+=(t[n][r][1]-t[n][r-1][1])/s;a+=o*t[e][r][1]}f[r]=l-=i?a/i*s:0,l<u&&(u=l)}for(r=0;r<p;++r)f[r]-=u;return f},expand:function(t){var e,r,n,i=t.length,a=t[0].length,o=1/i,s=[];for(r=0;r<a;++r){for(e=0,n=0;e<i;e++)n+=t[e][r][1];if(n)for(e=0;e<i;e++)t[e][r][1]/=n;else for(e=0;e<i;e++)t[e][r][1]=o}for(r=0;r<a;++r)s[r]=0;return s},zero:vn});function yn(t){return a.range(t.length)}function vn(t){for(var e=-1,r=t[0].length,n=[];++e<r;)n[e]=0;return n}function gn(t){for(var e,r=1,n=0,i=t[0][1],a=t.length;r<a;++r)(e=t[r][1])>i&&(n=r,i=e);return n}function _n(t){return t.reduce(xn,0)}function xn(t,e){return t+e[1]}function bn(t,e){return wn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function wn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Tn(t){return[a.min(t),a.max(t)]}function kn(t,e){return t.value-e.value}function Mn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function An(t,e){t._pack_next=e,e._pack_prev=t}function Sn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ln(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,u=1/0,c=-1/0,h=1/0,p=-1/0;if(e.forEach(Cn),(r=e[0]).x=-r.r,r.y=0,_(r),l>1&&((n=e[1]).x=n.r,n.y=0,_(n),l>2))for(En(r,n,i=e[2]),_(i),Mn(r,i),r._pack_prev=i,Mn(i,n),n=r._pack_next,a=3;a<l;a++){En(r,n,i=e[a]);var f=0,d=1,m=1;for(o=n._pack_next;o!==n;o=o._pack_next,d++)if(Sn(o,i)){f=1;break}if(1==f)for(s=r._pack_prev;s!==o._pack_prev&&!Sn(s,i);s=s._pack_prev,m++);f?(d<m||d==m&&n.r<r.r?An(r,n=o):An(r=s,n),a--):(Mn(r,i),n=i,_(i))}var y=(u+c)/2,v=(h+p)/2,g=0;for(a=0;a<l;a++)(i=e[a]).x-=y,i.y-=v,g=Math.max(g,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=g,e.forEach(Pn)}function _(t){u=Math.min(t.x-t.r,u),c=Math.max(t.x+t.r,c),h=Math.min(t.y-t.r,h),p=Math.max(t.y+t.r,p)}}function Cn(t){t._pack_next=t._pack_prev=t}function Pn(t){delete t._pack_next,delete t._pack_prev}function In(t,e,r,n){var i=t.children;if(t.x=e+=n*t.x,t.y=r+=n*t.y,t.r*=n,i)for(var a=-1,o=i.length;++a<o;)In(i[a],e,r,n)}function En(t,e,r){var n=t.r+r.r,i=e.x-t.x,a=e.y-t.y;if(n&&(i||a)){var o=e.r+r.r,s=i*i+a*a,l=.5+((n*=n)-(o*=o))/(2*s),u=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=t.x+l*i+u*a,r.y=t.y+l*a-u*i}else r.x=t.x+n,r.y=t.y}function Dn(t,e){return t.parent==e.parent?1:2}function zn(t){var e=t.children;return e.length?e[0]:t.t}function On(t){var e,r=t.children;return(e=r.length)?r[e-1]:t.t}function Rn(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function Fn(t,e,r){return t.a.parent===e.parent?t.a:r}function Bn(t){var e=t.children;return e&&e.length?Bn(e[0]):t}function Nn(t){var e,r=t.children;return r&&(e=r.length)?Nn(r[e-1]):t}function Un(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function jn(t,e){var r=t.x+e[3],n=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return i<0&&(r+=i/2,i=0),a<0&&(n+=a/2,a=0),{x:r,y:n,dx:i,dy:a}}function Vn(t){var e=t[0],r=t[t.length-1];return e<r?[e,r]:[r,e]}function qn(t){return t.rangeExtent?t.rangeExtent():Vn(t.range())}function Hn(t,e,r,n){var i=r(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(i(t))}}function Gn(t,e){var r,n=0,i=t.length-1,a=t[n],o=t[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),t[n]=e.floor(a),t[i]=e.ceil(o),t}function Zn(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Yn}a.layout.histogram=function(){var t=!0,e=Number,r=Tn,n=bn;function i(i,o){for(var s,l,u=[],c=i.map(e,this),h=r.call(this,c,o),p=n.call(this,h,c,o),f=(o=-1,c.length),d=p.length-1,m=t?1:1/f;++o<d;)(s=u[o]=[]).dx=p[o+1]-(s.x=p[o]),s.y=0;if(d>0)for(o=-1;++o<f;)(l=c[o])>=h[0]&&l<=h[1]&&((s=u[a.bisect(p,l,1,d)-1]).y+=m,s.push(i[o]));return u}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(r=ye(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return wn(e,t)}:ye(t),i):n},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},a.layout.pack=function(){var t,e=a.layout.hierarchy().sort(kn),r=0,n=[1,1];function i(i,a){var o=e.call(this,i,a),s=o[0],l=n[0],u=n[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,an(s,(function(t){t.r=+c(t.value)})),an(s,Ln),r){var h=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;an(s,(function(t){t.r+=h})),an(s,Ln),an(s,(function(t){t.r-=h}))}return In(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),o}return i.size=function(t){return arguments.length?(n=t,i):n},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(r=+t,i):r},rn(i,e)},a.layout.tree=function(){var t=a.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=null;function i(i,a){var u=t.call(this,i,a),c=u[0],h=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;o<s;++o)n.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return r.children[0]}(c);if(an(h,o),h.parent.m=-h.z,nn(h,s),n)nn(c,l);else{var p=c,f=c,d=c;nn(c,(function(t){t.x<p.x&&(p=t),t.x>f.x&&(f=t),t.depth>d.depth&&(d=t)}));var m=e(p,f)/2-p.x,y=r[0]/(f.x+e(f,p)/2+m),v=r[1]/(d.depth||1);nn(c,(function(t){t.x=(t.x+m)*y,t.y=t.depth*v}))}return u}function o(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r.length){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,a=t,o=t,s=r,l=a.parent.children[0],u=a.m,c=o.m,h=s.m,p=l.m;s=On(s),a=zn(a),s&&a;)l=zn(l),(o=On(o)).a=t,(i=s.z+h-a.z-u+e(s._,a._))>0&&(Rn(Fn(s,t,n),t,i),u+=i,c+=i),h+=s.m,u+=a.m,p+=l.m,c+=o.m;s&&!On(o)&&(o.t=s,o.m+=h-c),a&&!zn(l)&&(l.t=a,l.m+=u-p,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=r[0],t.y=t.depth*r[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t)?l:null,i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null==(r=t)?null:l,i):n?r:null},rn(i,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=!1;function i(i,o){var s,l=t.call(this,i,o),u=l[0],c=0;an(u,(function(t){var r=t.children;r&&r.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(r),t.y=function(t){return 1+a.max(t,(function(t){return t.y}))}(r)):(t.x=s?c+=e(t,s):0,t.y=0,s=t)}));var h=Bn(u),p=Nn(u),f=h.x-e(h,p)/2,d=p.x+e(p,h)/2;return an(u,n?function(t){t.x=(t.x-u.x)*r[0],t.y=(u.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(d-f)*r[0],t.y=(1-(u.y?t.y/u.y:1))*r[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t),i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null!=(r=t),i):n?r:null},rn(i,t)},a.layout.treemap=function(){var t,e=a.layout.hierarchy(),r=Math.round,n=[1,1],i=null,o=Un,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(t,e){for(var r,n,i=-1,a=t.length;++i<a;)n=(r=t[i]).value*(e<0?0:e),r.area=isNaN(n)||n<=0?0:n}function h(t){var e=t.children;if(e&&e.length){var r,n,i,a=o(t),s=[],u=e.slice(),p=1/0,m="slice"===l?a.dx:"dice"===l?a.dy:"slice-dice"===l?1&t.depth?a.dy:a.dx:Math.min(a.dx,a.dy);for(c(u,a.dx*a.dy/t.value),s.area=0;(i=u.length)>0;)s.push(r=u[i-1]),s.area+=r.area,"squarify"!==l||(n=f(s,m))<=p?(u.pop(),p=n):(s.area-=s.pop().area,d(s,m,a,!1),m=Math.min(a.dx,a.dy),s.length=s.area=0,p=1/0);s.length&&(d(s,m,a,!0),s.length=s.area=0),e.forEach(h)}}function p(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(c(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(p)}}function f(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++o<s;)(r=t[o].area)&&(r<a&&(a=r),r>i&&(i=r));return e*=e,(n*=n)?Math.max(e*i*u/n,n/(e*a*u)):1/0}function d(t,e,n,i){var a,o=-1,s=t.length,l=n.x,u=n.y,c=e?r(t.area/e):0;if(e==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<s;)(a=t[o]).x=l,a.y=u,a.dy=c,l+=a.dx=Math.min(n.x+n.dx-l,c?r(a.area/c):0);a.z=!0,a.dx+=n.x+n.dx-l,n.y+=c,n.dy-=c}else{for((i||c>n.dx)&&(c=n.dx);++o<s;)(a=t[o]).x=l,a.y=u,a.dx=c,u+=a.dy=Math.min(n.y+n.dy-u,c?r(a.area/c):0);a.z=!1,a.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function m(r){var i=t||e(r),a=i[0];return a.x=a.y=0,a.value?(a.dx=n[0],a.dy=n[1]):a.dx=a.dy=0,t&&e.revalue(a),c([a],a.dx*a.dy/a.value),(t?p:h)(a),s&&(t=i),i}return m.size=function(t){return arguments.length?(n=t,m):n},m.padding=function(t){if(!arguments.length)return i;function e(e){return jn(e,t)}var r;return o=null==(i=t)?Un:"function"==(r=typeof t)?function(e){var r=t.call(m,e,e.depth);return null==r?Un(e):jn(e,"number"==typeof r?[r,r,r,r]:r)}:"number"===r?(t=[t,t,t,t],e):e,m},m.round=function(t){return arguments.length?(r=t?Math.round:Number,m):r!=Number},m.sticky=function(e){return arguments.length?(s=e,t=null,m):s},m.ratio=function(t){return arguments.length?(u=t,m):u},m.mode=function(t){return arguments.length?(l=t+"",m):l},rn(m,e)},a.random={normal:function(t,e){var r=arguments.length;return r<2&&(e=1),r<1&&(t=0),function(){var r,n,i;do{i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!i||i>1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=a.random.normal.apply(a,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=a.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r<t;r++)e+=Math.random();return e}}},a.scale={};var Yn={floor:O,ceil:O};function Wn(t,e,r,n){var i=[],o=[],s=0,l=Math.min(t.length,e.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=l;)i.push(r(t[s-1],t[s])),o.push(n(e[s-1],e[s]));return function(e){var r=a.bisect(t,e,1,l)-1;return o[r](i[r](e))}}function Xn(t,e,r,n){var i,a;function o(){var o=Math.min(t.length,e.length)>2?Wn:Hn,l=n?Gr:Hr;return i=o(t,e,l,r),a=o(e,t,l,Tr),s}function s(t){return i(t)}return s.invert=function(t){return a(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},s.range=function(t){return arguments.length?(e=t,o()):e},s.rangeRound=function(t){return s.range(t).interpolate(Fr)},s.clamp=function(t){return arguments.length?(n=t,o()):n},s.interpolate=function(t){return arguments.length?(r=t,o()):r},s.ticks=function(e){return $n(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return Kn(t,e),o()},s.copy=function(){return Xn(t,e,r,n)},o()}function Jn(t,e){return a.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Kn(t,e){return Gn(t,Zn(Qn(t,e)[2])),Gn(t,Zn(Qn(t,e)[2])),t}function Qn(t,e){null==e&&(e=10);var r=Vn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function $n(t,e){return a.range.apply(a,Qn(t,e))}function ti(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Gn(n.map(i),r?Math:ei);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Vn(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(c-u)){if(r){for(;u<c;u++)for(var p=1;p<h;p++)o.push(a(u)*p);o.push(a(u))}else for(o.push(a(u));u++<c;)for(p=h-1;p>0;p--)o.push(a(u)*p);for(u=0;o[u]<s;u++);for(c=o.length;o[c-1]>l;c--);o=o.slice(u,c)}return o},o.copy=function(){return ti(t.copy(),e,r,n)},Jn(o,t)}a.scale.linear=function(){return Xn([0,1],[0,1],Tr,!1)},a.scale.log=function(){return ti(a.scale.linear().domain([0,1]),10,!0,[1,10])};var ei={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function ri(t,e,r){var n=ni(e),i=ni(1/e);function a(e){return t(n(e))}return a.invert=function(e){return i(t.invert(e))},a.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),a):r},a.ticks=function(t){return $n(r,t)},a.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},a.nice=function(t){return a.domain(Kn(r,t))},a.exponent=function(o){return arguments.length?(n=ni(e=o),i=ni(1/e),t.domain(r.map(n)),a):e},a.copy=function(){return ri(t.copy(),e,r)},Jn(a,t)}function ni(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ii(t,e){var r,n,i;function o(i){return n[((r.get(i)||("range"===e.t?r.set(i,t.push(i)):NaN))-1)%n.length]}function s(e,r){return a.range(t.length).map((function(t){return e+r*t}))}return o.domain=function(n){if(!arguments.length)return t;t=[],r=new k;for(var i,a=-1,s=n.length;++a<s;)r.has(i=n[a])||r.set(i,t.push(i));return o[e.t].apply(o,e.a)},o.range=function(t){return arguments.length?(n=t,i=0,e={t:"range",a:arguments},o):n},o.rangePoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],u=r[1],c=t.length<2?(l=(l+u)/2,0):(u-l)/(t.length-1+a);return n=s(l+c*a/2,c),i=0,e={t:"rangePoints",a:arguments},o},o.rangeRoundPoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],u=r[1],c=t.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(t.length-1+a)|0;return n=s(l+Math.round(c*a/2+(u-l-(t.length-1+a)*c)/2),c),i=0,e={t:"rangeRoundPoints",a:arguments},o},o.rangeBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var u=r[1]<r[0],c=r[u-0],h=(r[1-u]-c)/(t.length-a+2*l);return n=s(c+h*l,h),u&&n.reverse(),i=h*(1-a),e={t:"rangeBands",a:arguments},o},o.rangeRoundBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var u=r[1]<r[0],c=r[u-0],h=r[1-u],p=Math.floor((h-c)/(t.length-a+2*l));return n=s(c+Math.round((h-c-(t.length-a)*p)/2),p),u&&n.reverse(),i=Math.round(p*(1-a)),e={t:"rangeRoundBands",a:arguments},o},o.rangeBand=function(){return i},o.rangeExtent=function(){return Vn(e.a[0])},o.copy=function(){return ii(t,e)},o.domain(t)}a.scale.pow=function(){return ri(a.scale.linear(),1,[0,1])},a.scale.sqrt=function(){return a.scale.pow().exponent(.5)},a.scale.ordinal=function(){return ii([],{t:"range",a:[[]]})},a.scale.category10=function(){return a.scale.ordinal().range(ai)},a.scale.category20=function(){return a.scale.ordinal().range(oi)},a.scale.category20b=function(){return a.scale.ordinal().range(si)},a.scale.category20c=function(){return a.scale.ordinal().range(li)};var ai=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(se),oi=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(se),si=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(se),li=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(se);function ui(t,e){var r;function n(){var n=0,o=e.length;for(r=[];++n<o;)r[n-1]=a.quantile(t,n/o);return i}function i(t){if(!isNaN(t=+t))return e[a.bisect(r,t)]}return i.domain=function(e){return arguments.length?(t=e.map(v).filter(g).sort(y),n()):t},i.range=function(t){return arguments.length?(e=t,n()):e},i.quantiles=function(){return r},i.invertExtent=function(n){return(n=e.indexOf(n))<0?[NaN,NaN]:[n>0?r[n-1]:t[0],n<r.length?r[n]:t[t.length-1]]},i.copy=function(){return ui(t,e)},n()}function ci(t,e,r){var n,i;function a(e){return r[Math.max(0,Math.min(i,Math.floor(n*(e-t))))]}function o(){return n=r.length/(e-t),i=r.length-1,a}return a.domain=function(r){return arguments.length?(t=+r[0],e=+r[r.length-1],o()):[t,e]},a.range=function(t){return arguments.length?(r=t,o()):r},a.invertExtent=function(e){return[e=(e=r.indexOf(e))<0?NaN:e/n+t,e+1/n]},a.copy=function(){return ci(t,e,r)},o()}function hi(t,e){function r(r){if(r<=r)return e[a.bisect(t,r)]}return r.domain=function(e){return arguments.length?(t=e,r):t},r.range=function(t){return arguments.length?(e=t,r):e},r.invertExtent=function(r){return r=e.indexOf(r),[t[r-1],t[r]]},r.copy=function(){return hi(t,e)},r}function pi(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(r){return arguments.length?(t=r.map(e),e):t},e.ticks=function(e){return $n(t,e)},e.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},e.copy=function(){return pi(t)},e}function fi(){return 0}a.scale.quantile=function(){return ui([],[])},a.scale.quantize=function(){return ci(0,1,[0,1])},a.scale.threshold=function(){return hi([.5],[0,1])},a.scale.identity=function(){return pi([0,1])},a.svg={},a.svg.arc=function(){var t=mi,e=yi,r=fi,n=di,i=vi,a=gi,o=_i;function s(){var s=Math.max(0,+t.apply(this,arguments)),u=Math.max(0,+e.apply(this,arguments)),c=i.apply(this,arguments)-Dt,h=a.apply(this,arguments)-Dt,p=Math.abs(h-c),f=c>h?0:1;if(u<s&&(d=u,u=s,s=d),p>=Et)return l(u,f)+(s?l(s,1-f):"")+"Z";var d,m,y,v,g,_,x,b,w,T,k,M,A=0,S=0,L=[];if((v=(+o.apply(this,arguments)||0)/2)&&(y=n===di?Math.sqrt(s*s+u*u):+n.apply(this,arguments),f||(S*=-1),u&&(S=Rt(y/u*Math.sin(v))),s&&(A=Rt(y/s*Math.sin(v)))),u){g=u*Math.cos(c+S),_=u*Math.sin(c+S),x=u*Math.cos(h-S),b=u*Math.sin(h-S);var C=Math.abs(h-c-2*S)<=Pt?0:1;if(S&&xi(g,_,x,b)===f^C){var P=(c+h)/2;g=u*Math.cos(P),_=u*Math.sin(P),x=b=null}}else g=_=0;if(s){w=s*Math.cos(h-A),T=s*Math.sin(h-A),k=s*Math.cos(c+A),M=s*Math.sin(c+A);var I=Math.abs(c-h+2*A)<=Pt?0:1;if(A&&xi(w,T,k,M)===1-f^I){var E=(c+h)/2;w=s*Math.cos(E),T=s*Math.sin(E),k=M=null}}else w=T=0;if(p>Lt&&(d=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){m=s<u^f?0:1;var D=d,z=d;if(p<Pt){var O=null==k?[w,T]:null==x?[g,_]:ze([g,_],[k,M],[x,b],[w,T]),R=g-O[0],F=_-O[1],B=x-O[0],N=b-O[1],U=1/Math.sin(Math.acos((R*B+F*N)/(Math.sqrt(R*R+F*F)*Math.sqrt(B*B+N*N)))/2),j=Math.sqrt(O[0]*O[0]+O[1]*O[1]);z=Math.min(d,(s-j)/(U-1)),D=Math.min(d,(u-j)/(U+1))}if(null!=x){var V=bi(null==k?[w,T]:[k,M],[g,_],u,D,f),q=bi([x,b],[w,T],u,D,f);d===D?L.push("M",V[0],"A",D,",",D," 0 0,",m," ",V[1],"A",u,",",u," 0 ",1-f^xi(V[1][0],V[1][1],q[1][0],q[1][1]),",",f," ",q[1],"A",D,",",D," 0 0,",m," ",q[0]):L.push("M",V[0],"A",D,",",D," 0 1,",m," ",q[0])}else L.push("M",g,",",_);if(null!=k){var H=bi([g,_],[k,M],s,-z,f),G=bi([w,T],null==x?[g,_]:[x,b],s,-z,f);d===z?L.push("L",G[0],"A",z,",",z," 0 0,",m," ",G[1],"A",s,",",s," 0 ",f^xi(G[1][0],G[1][1],H[1][0],H[1][1]),",",1-f," ",H[1],"A",z,",",z," 0 0,",m," ",H[0]):L.push("L",G[0],"A",z,",",z," 0 0,",m," ",H[0])}else L.push("L",w,",",T)}else L.push("M",g,",",_),null!=x&&L.push("A",u,",",u," 0 ",C,",",f," ",x,",",b),L.push("L",w,",",T),null!=k&&L.push("A",s,",",s," 0 ",I,",",1-f," ",k,",",M);return L.push("Z"),L.join("")}function l(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}return s.innerRadius=function(e){return arguments.length?(t=ye(e),s):t},s.outerRadius=function(t){return arguments.length?(e=ye(t),s):e},s.cornerRadius=function(t){return arguments.length?(r=ye(t),s):r},s.padRadius=function(t){return arguments.length?(n=t==di?di:ye(t),s):n},s.startAngle=function(t){return arguments.length?(i=ye(t),s):i},s.endAngle=function(t){return arguments.length?(a=ye(t),s):a},s.padAngle=function(t){return arguments.length?(o=ye(t),s):o},s.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Dt;return[Math.cos(n)*r,Math.sin(n)*r]},s};var di="auto";function mi(t){return t.innerRadius}function yi(t){return t.outerRadius}function vi(t){return t.startAngle}function gi(t){return t.endAngle}function _i(t){return t&&t.padAngle}function xi(t,e,r,n){return(t-r)*e-(e-n)*t>0?0:1}function bi(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,h=t[1]+u,p=e[0]+l,f=e[1]+u,d=(c+p)/2,m=(h+f)/2,y=p-c,v=f-h,g=y*y+v*v,_=r-n,x=c*f-p*h,b=(v<0?-1:1)*Math.sqrt(Math.max(0,_*_*g-x*x)),w=(x*v-y*b)/g,T=(-x*y-v*b)/g,k=(x*v+y*b)/g,M=(-x*y+v*b)/g,A=w-d,S=T-m,L=k-d,C=M-m;return A*A+S*S>L*L+C*C&&(w=k,T=M),[[w-l,T-u],[w*r/_,T*r/_]]}function wi(){return!0}function Ti(t){var e=Le,r=Ce,n=wi,i=Mi,a=i.key,o=.7;function s(a){var s,l=[],u=[],c=-1,h=a.length,p=ye(e),f=ye(r);function d(){l.push("M",i(t(u),o))}for(;++c<h;)n.call(this,s=a[c],c)?u.push([+p.call(this,s,c),+f.call(this,s,c)]):u.length&&(d(),u=[]);return u.length&&d(),l.length?l.join(""):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(r=t,s):r},s.defined=function(t){return arguments.length?(n=t,s):n},s.interpolate=function(t){return arguments.length?(a="function"==typeof t?i=t:(i=ki.get(t)||Mi).key,s):a},s.tension=function(t){return arguments.length?(o=t,s):o},s}a.svg.line=function(){return Ti(O)};var ki=a.map({linear:Mi,"linear-closed":Ai,step:function(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e<r;)i.push("H",(n[0]+(n=t[e])[0])/2,"V",n[1]);return r>1&&i.push("H",n[0]),i.join("")},"step-before":Si,"step-after":Li,basis:Ii,"basis-open":function(t){if(t.length<4)return Mi(t);for(var e,r=[],n=-1,i=t.length,a=[0],o=[0];++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);for(r.push(Ei(Oi,a)+","+Ei(Oi,o)),--n;++n<i;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),Ri(r,a,o);return r.join("")},"basis-closed":function(t){for(var e,r,n=-1,i=t.length,a=i+4,o=[],s=[];++n<4;)r=t[n%i],o.push(r[0]),s.push(r[1]);for(e=[Ei(Oi,o),",",Ei(Oi,s)],--n;++n<a;)r=t[n%i],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),Ri(e,o,s);return e.join("")},bundle:function(t,e){var r=t.length-1;if(r)for(var n,i,a=t[0][0],o=t[0][1],s=t[r][0]-a,l=t[r][1]-o,u=-1;++u<=r;)i=u/r,(n=t[u])[0]=e*n[0]+(1-e)*(a+i*s),n[1]=e*n[1]+(1-e)*(o+i*l);return Ii(t)},cardinal:function(t,e){return t.length<3?Mi(t):t[0]+Ci(t,Pi(t,e))},"cardinal-open":function(t,e){return t.length<4?Mi(t):t[1]+Ci(t.slice(1,-1),Pi(t,e))},"cardinal-closed":function(t,e){return t.length<3?Ai(t):t[0]+Ci((t.push(t[0]),t),Pi([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Mi(t):t[0]+Ci(t,function(t){for(var e,r,n,i,a=[],o=function(t){for(var e=0,r=t.length-1,n=[],i=t[0],a=t[1],o=n[0]=Fi(i,a);++e<r;)n[e]=(o+(o=Fi(i=a,a=t[e+1])))/2;return n[e]=o,n}(t),s=-1,l=t.length-1;++s<l;)e=Fi(t[s],t[s+1]),w(e)<Lt?o[s]=o[s+1]=0:(i=(r=o[s]/e)*r+(n=o[s+1]/e)*n)>9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Mi(t){return t.length>1?t.join("L"):t+"Z"}function Ai(t){return t.join("L")+"Z"}function Si(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e<r;)i.push("V",(n=t[e])[1],"H",n[0]);return i.join("")}function Li(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e<r;)i.push("H",(n=t[e])[0],"V",n[1]);return i.join("")}function Ci(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Mi(t);var r=t.length!=e.length,n="",i=t[0],a=t[1],o=e[0],s=o,l=1;if(r&&(n+="Q"+(a[0]-2*o[0]/3)+","+(a[1]-2*o[1]/3)+","+a[0]+","+a[1],i=t[1],l=2),e.length>1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;u<e.length;u++,l++)a=t[l],s=e[u],n+="S"+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1]}if(r){var c=t[l];n+="Q"+(a[0]+2*s[0]/3)+","+(a[1]+2*s[1]/3)+","+c[0]+","+c[1]}return n}function Pi(t,e){for(var r,n=[],i=(1-e)/2,a=t[0],o=t[1],s=1,l=t.length;++s<l;)r=a,a=o,o=t[s],n.push([i*(o[0]-r[0]),i*(o[1]-r[1])]);return n}function Ii(t){if(t.length<3)return Mi(t);var e=1,r=t.length,n=t[0],i=n[0],a=n[1],o=[i,i,i,(n=t[1])[0]],s=[a,a,a,n[1]],l=[i,",",a,"L",Ei(Oi,o),",",Ei(Oi,s)];for(t.push(t[r-1]);++e<=r;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),Ri(l,o,s);return t.pop(),l.push("L",n),l.join("")}function Ei(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}ki.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var Di=[0,2/3,1/3,0],zi=[0,1/3,2/3,0],Oi=[0,1/6,2/3,1/6];function Ri(t,e,r){t.push("C",Ei(Di,e),",",Ei(Di,r),",",Ei(zi,e),",",Ei(zi,r),",",Ei(Oi,e),",",Ei(Oi,r))}function Fi(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Bi(t){for(var e,r,n,i=-1,a=t.length;++i<a;)r=(e=t[i])[0],n=e[1]-Dt,e[0]=r*Math.cos(n),e[1]=r*Math.sin(n);return t}function Ni(t){var e=Le,r=Le,n=0,i=Ce,a=wi,o=Mi,s=o.key,l=o,u="L",c=.7;function h(s){var h,p,f,d=[],m=[],y=[],v=-1,g=s.length,_=ye(e),x=ye(n),b=e===r?function(){return p}:ye(r),w=n===i?function(){return f}:ye(i);function T(){d.push("M",o(t(y),c),u,l(t(m.reverse()),c),"Z")}for(;++v<g;)a.call(this,h=s[v],v)?(m.push([p=+_.call(this,h,v),f=+x.call(this,h,v)]),y.push([+b.call(this,h,v),+w.call(this,h,v)])):m.length&&(T(),m=[],y=[]);return m.length&&T(),d.length?d.join(""):null}return h.x=function(t){return arguments.length?(e=r=t,h):r},h.x0=function(t){return arguments.length?(e=t,h):e},h.x1=function(t){return arguments.length?(r=t,h):r},h.y=function(t){return arguments.length?(n=i=t,h):i},h.y0=function(t){return arguments.length?(n=t,h):n},h.y1=function(t){return arguments.length?(i=t,h):i},h.defined=function(t){return arguments.length?(a=t,h):a},h.interpolate=function(t){return arguments.length?(s="function"==typeof t?o=t:(o=ki.get(t)||Mi).key,l=o.reverse||o,u=o.closed?"M":"L",h):s},h.tension=function(t){return arguments.length?(c=t,h):c},h}function Ui(t){return t.source}function ji(t){return t.target}function Vi(t){return t.radius}function qi(t){return[t.x,t.y]}function Hi(){return 64}function Gi(){return"circle"}function Zi(t){var e=Math.sqrt(t/Pt);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}a.svg.line.radial=function(){var t=Ti(Bi);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Si.reverse=Li,Li.reverse=Si,a.svg.area=function(){return Ni(O)},a.svg.area.radial=function(){var t=Ni(Bi);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},a.svg.chord=function(){var t=Ui,e=ji,r=Vi,n=vi,i=gi;function a(r,n){var i,a,u=o(this,t,r,n),c=o(this,e,r,n);return"M"+u.p0+s(u.r,u.p1,u.a1-u.a0)+(a=c,((i=u).a0==a.a0&&i.a1==a.a1?l(u.r,u.p1,u.r,u.p0):l(u.r,u.p1,c.r,c.p0)+s(c.r,c.p1,c.a1-c.a0)+l(c.r,c.p1,u.r,u.p0))+"Z")}function o(t,e,a,o){var s=e.call(t,a,o),l=r.call(t,s,o),u=n.call(t,s,o)-Dt,c=i.call(t,s,o)-Dt;return{r:l,a0:u,a1:c,p0:[l*Math.cos(u),l*Math.sin(u)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function s(t,e,r){return"A"+t+","+t+" 0 "+ +(r>Pt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return a.radius=function(t){return arguments.length?(r=ye(t),a):r},a.source=function(e){return arguments.length?(t=ye(e),a):t},a.target=function(t){return arguments.length?(e=ye(t),a):e},a.startAngle=function(t){return arguments.length?(n=ye(t),a):n},a.endAngle=function(t){return arguments.length?(i=ye(t),a):i},a},a.svg.diagonal=function(){var t=Ui,e=ji,r=qi;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ye(e),n):t},n.target=function(t){return arguments.length?(e=ye(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},a.svg.diagonal.radial=function(){var t=a.svg.diagonal(),e=qi,r=t.projection;return t.projection=function(t){return arguments.length?r(function(t){return function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-Dt;return[r*Math.cos(n),r*Math.sin(n)]}}(e=t)):e},t},a.svg.symbol=function(){var t=Gi,e=Hi;function r(r,n){return(Yi.get(t.call(this,r,n))||Zi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ye(e),r):t},r.size=function(t){return arguments.length?(e=ye(t),r):e},r};var Yi=a.map({circle:Zi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Xi)),r=e*Xi;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Wi),r=e*Wi/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Wi),r=e*Wi/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});a.svg.symbolTypes=Yi.keys();var Wi=Math.sqrt(3),Xi=Math.tan(30*zt);K.transition=function(t){for(var e,r,n=$i||++ra,i=aa(t),a=[],o=ta||{time:Date.now(),ease:Er,delay:0,duration:250},s=-1,l=this.length;++s<l;){a.push(e=[]);for(var u=this[s],c=-1,h=u.length;++c<h;)(r=u[c])&&oa(r,c,i,n,o),e.push(r)}return Qi(a,i,n)},K.interrupt=function(t){return this.each(null==t?Ji:Ki(aa(t)))};var Ji=Ki(aa());function Ki(t){return function(){var e,r,n;(e=this[t])&&(n=e[r=e.active])&&(n.timer.c=null,n.timer.t=NaN,--e.count?delete e[r]:delete this[t],e.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Qi(t,e,r){return Z(t,ea),t.namespace=e,t.id=r,t}var $i,ta,ea=[],ra=0;function na(t,e,r,n){var i=t.id,a=t.namespace;return mt(t,"function"==typeof r?function(t,o,s){t[a][i].tween.set(e,n(r.call(t,t.__data__,o,s)))}:(r=n(r),function(t){t[a][i].tween.set(e,r)}))}function ia(t){return null==t&&(t=""),function(){this.textContent=t}}function aa(t){return null==t?"__transition__":"__transition_"+t+"__"}function oa(t,e,r,n,i){var a,o,s,l,u,c=t[r]||(t[r]={active:0,count:0}),h=c[n];function p(r){var i=c.active,p=c[i];for(var d in p&&(p.timer.c=null,p.timer.t=NaN,--c.count,delete c[i],p.event&&p.event.interrupt.call(t,t.__data__,p.index)),c)if(+d<n){var m=c[d];m.timer.c=null,m.timer.t=NaN,--c.count,delete c[d]}o.c=f,ke((function(){return o.c&&f(r||1)&&(o.c=null,o.t=NaN),1}),0,a),c.active=n,h.event&&h.event.start.call(t,t.__data__,e),u=[],h.tween.forEach((function(r,n){(n=n.call(t,t.__data__,e))&&u.push(n)})),l=h.ease,s=h.duration}function f(i){for(var a=i/s,o=l(a),p=u.length;p>0;)u[--p].call(t,o);if(a>=1)return h.event&&h.event.end.call(t,t.__data__,e),--c.count?delete c[n]:delete t[r],1}h||(a=i.time,o=ke((function(t){var e=h.delay;if(o.t=e+a,e<=t)return p(t-e);o.c=p}),0,a),h=c[n]={tween:new k,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}ea.call=K.call,ea.empty=K.empty,ea.node=K.node,ea.size=K.size,a.transition=function(t,e){return t&&t.transition?$i?t.transition(e):t:a.selection().transition(t)},a.transition.prototype=ea,ea.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=Q(t);for(var s=-1,l=this.length;++s<l;){o.push(e=[]);for(var u=this[s],c=-1,h=u.length;++c<h;)(n=u[c])&&(r=t.call(n,n.__data__,c,s))?("__data__"in n&&(r.__data__=n.__data__),oa(r,c,a,i,n[a][i]),e.push(r)):e.push(null)}return Qi(o,a,i)},ea.selectAll=function(t){var e,r,n,i,a,o=this.id,s=this.namespace,l=[];t=$(t);for(var u=-1,c=this.length;++u<c;)for(var h=this[u],p=-1,f=h.length;++p<f;)if(n=h[p]){a=n[s][o],r=t.call(n,n.__data__,p,u),l.push(e=[]);for(var d=-1,m=r.length;++d<m;)(i=r[d])&&oa(i,d,s,o,a),e.push(i)}return Qi(l,s,o)},ea.filter=function(t){var e,r,n=[];"function"!=typeof t&&(t=ft(t));for(var i=0,a=this.length;i<a;i++){n.push(e=[]);for(var o,s=0,l=(o=this[i]).length;s<l;s++)(r=o[s])&&t.call(r,r.__data__,s,i)&&e.push(r)}return Qi(n,this.namespace,this.id)},ea.tween=function(t,e){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(t):mt(this,null==e?function(e){e[n][r].tween.remove(t)}:function(i){i[n][r].tween.set(t,e)})},ea.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var r="transform"==t?qr:Tr,n=a.ns.qualify(t);function i(){this.removeAttribute(n)}function o(){this.removeAttributeNS(n.space,n.local)}return na(this,"attr."+t,e,n.local?function(t){return null==t?o:(t+="",function(){var e,i=this.getAttributeNS(n.space,n.local);return i!==t&&(e=r(i,t),function(t){this.setAttributeNS(n.space,n.local,e(t))})})}:function(t){return null==t?i:(t+="",function(){var e,i=this.getAttribute(n);return i!==t&&(e=r(i,t),function(t){this.setAttribute(n,e(t))})})})},ea.attrTween=function(t,e){var r=a.ns.qualify(t);return this.tween("attr."+t,r.local?function(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}:function(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}})},ea.style=function(t,e,r){var n=arguments.length;if(n<3){if("string"!=typeof t){for(r in n<2&&(e=""),t)this.style(r,t[r],e);return this}r=""}function i(){this.style.removeProperty(t)}return na(this,"style."+t,e,(function(e){return null==e?i:(e+="",function(){var n,i=c(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(n=Tr(i,e),function(e){this.style.setProperty(t,n(e),r)})})}))},ea.styleTween=function(t,e,r){return arguments.length<3&&(r=""),this.tween("style."+t,(function(n,i){var a=e.call(this,n,i,c(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),r)}}))},ea.text=function(t){return na(this,"text",t,ia)},ea.remove=function(){var t=this.namespace;return this.each("end.transition",(function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)}))},ea.ease=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].ease:("function"!=typeof t&&(t=a.ease.apply(a,arguments)),mt(this,(function(n){n[r][e].ease=t})))},ea.delay=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].delay:mt(this,"function"==typeof t?function(n,i,a){n[r][e].delay=+t.call(n,n.__data__,i,a)}:(t=+t,function(n){n[r][e].delay=t}))},ea.duration=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].duration:mt(this,"function"==typeof t?function(n,i,a){n[r][e].duration=Math.max(1,t.call(n,n.__data__,i,a))}:(t=Math.max(1,t),function(n){n[r][e].duration=t}))},ea.each=function(t,e){var r=this.id,n=this.namespace;if(arguments.length<2){var i=ta,o=$i;try{$i=r,mt(this,(function(e,i,a){ta=e[n][r],t.call(e,e.__data__,i,a)}))}finally{ta=i,$i=o}}else mt(this,(function(i){var o=i[n][r];(o.event||(o.event=a.dispatch("start","end","interrupt"))).on(t,e)}));return this},ea.transition=function(){for(var t,e,r,n=this.id,i=++ra,a=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(t=[]);for(var u,c=0,h=(u=this[s]).length;c<h;c++)(e=u[c])&&oa(e,c,a,i,{time:(r=e[a][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),t.push(e)}return Qi(o,a,i)},a.svg.axis=function(){var t,e=a.scale.linear(),r=sa,n=6,i=6,o=3,l=[10],u=null;function c(s){s.each((function(){var s,c=a.select(this),h=this.__chart__||e,p=this.__chart__=e.copy(),f=null==u?p.ticks?p.ticks.apply(p,l):p.domain():u,d=null==t?p.tickFormat?p.tickFormat.apply(p,l):O:t,m=c.selectAll(".tick").data(f,p),y=m.enter().insert("g",".domain").attr("class","tick").style("opacity",Lt),v=a.transition(m.exit()).style("opacity",Lt).remove(),g=a.transition(m.order()).style("opacity",1),_=Math.max(n,0)+o,x=qn(p),b=c.selectAll(".domain").data([0]),w=(b.enter().append("path").attr("class","domain"),a.transition(b));y.append("line"),y.append("text");var T,k,M,A,S=y.select("line"),L=g.select("line"),C=m.select("text").text(d),P=y.select("text"),I=g.select("text"),E="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(s=ua,T="x",M="y",k="x2",A="y2",C.attr("dy",E<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+x[0]+","+E*i+"V0H"+x[1]+"V"+E*i)):(s=ca,T="y",M="x",k="y2",A="x2",C.attr("dy",".32em").style("text-anchor",E<0?"end":"start"),w.attr("d","M"+E*i+","+x[0]+"H0V"+x[1]+"H"+E*i)),S.attr(A,E*n),P.attr(M,E*_),L.attr(k,0).attr(A,E*n),I.attr(T,0).attr(M,E*_),p.rangeBand){var D=p,z=D.rangeBand()/2;h=p=function(t){return D(t)+z}}else h.rangeBand?h=p:v.call(s,p,h);y.call(s,h,p),g.call(s,p,p)}))}return c.scale=function(t){return arguments.length?(e=t,c):e},c.orient=function(t){return arguments.length?(r=t in la?t+"":sa,c):r},c.ticks=function(){return arguments.length?(l=s(arguments),c):l},c.tickValues=function(t){return arguments.length?(u=t,c):u},c.tickFormat=function(e){return arguments.length?(t=e,c):t},c.tickSize=function(t){var e=arguments.length;return e?(n=+t,i=+arguments[e-1],c):n},c.innerTickSize=function(t){return arguments.length?(n=+t,c):n},c.outerTickSize=function(t){return arguments.length?(i=+t,c):i},c.tickPadding=function(t){return arguments.length?(o=+t,c):o},c.tickSubdivide=function(){return arguments.length&&c},c};var sa="bottom",la={top:1,right:1,bottom:1,left:1};function ua(t,e,r){t.attr("transform",(function(t){var n=e(t);return"translate("+(isFinite(n)?n:r(t))+",0)"}))}function ca(t,e,r){t.attr("transform",(function(t){var n=e(t);return"translate(0,"+(isFinite(n)?n:r(t))+")"}))}a.svg.brush=function(){var t,e,r=H(p,"brushstart","brush","brushend"),n=null,i=null,o=[0,0],s=[0,0],l=!0,u=!0,h=pa[0];function p(t){t.each((function(){var t=a.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",y).on("touchstart.brush",y),e=t.selectAll(".background").data([0]);e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var r=t.selectAll(".resize").data(h,O);r.exit().remove(),r.enter().append("g").attr("class",(function(t){return"resize "+t})).style("cursor",(function(t){return ha[t]})).append("rect").attr("x",(function(t){return/[ew]$/.test(t)?-3:null})).attr("y",(function(t){return/^[ns]/.test(t)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),r.style("display",p.empty()?"none":null);var o,s=a.transition(t),l=a.transition(e);n&&(o=qn(n),l.attr("x",o[0]).attr("width",o[1]-o[0]),d(s)),i&&(o=qn(i),l.attr("y",o[0]).attr("height",o[1]-o[0]),m(s)),f(s)}))}function f(t){t.selectAll(".resize").attr("transform",(function(t){return"translate("+o[+/e$/.test(t)]+","+s[+/^s/.test(t)]+")"}))}function d(t){t.select(".extent").attr("x",o[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",o[1]-o[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function y(){var h,y,v=this,g=a.select(a.event.target),_=r.of(v,arguments),x=a.select(v),b=g.datum(),w=!/^(n|s)$/.test(b)&&n,T=!/^(e|w)$/.test(b)&&i,k=g.classed("extent"),M=kt(v),A=a.mouse(v),S=a.select(c(v)).on("keydown.brush",(function(){32==a.event.keyCode&&(k||(h=null,A[0]-=o[1],A[1]-=s[1],k=2),V())})).on("keyup.brush",(function(){32==a.event.keyCode&&2==k&&(A[0]+=o[1],A[1]+=s[1],k=0,V())}));if(a.event.changedTouches?S.on("touchmove.brush",P).on("touchend.brush",E):S.on("mousemove.brush",P).on("mouseup.brush",E),x.interrupt().selectAll("*").interrupt(),k)A[0]=o[0]-A[0],A[1]=s[0]-A[1];else if(b){var L=+/w$/.test(b),C=+/^n/.test(b);y=[o[1-L]-A[0],s[1-C]-A[1]],A[0]=o[L],A[1]=s[C]}else a.event.altKey&&(h=A.slice());function P(){var t=a.mouse(v),e=!1;y&&(t[0]+=y[0],t[1]+=y[1]),k||(a.event.altKey?(h||(h=[(o[0]+o[1])/2,(s[0]+s[1])/2]),A[0]=o[+(t[0]<h[0])],A[1]=s[+(t[1]<h[1])]):h=null),w&&I(t,n,0)&&(d(x),e=!0),T&&I(t,i,1)&&(m(x),e=!0),e&&(f(x),_({type:"brush",mode:k?"move":"resize"}))}function I(r,n,i){var a,c,p=qn(n),f=p[0],d=p[1],m=A[i],y=i?s:o,v=y[1]-y[0];if(k&&(f-=m,d-=v+m),a=(i?u:l)?Math.max(f,Math.min(d,r[i])):r[i],k?c=(a+=m)+v:(h&&(m=Math.max(f,Math.min(d,2*h[i]-a))),m<a?(c=a,a=m):c=m),y[0]!=a||y[1]!=c)return i?e=null:t=null,y[0]=a,y[1]=c,!0}function E(){P(),x.style("pointer-events","all").selectAll(".resize").style("display",p.empty()?"none":null),a.select("body").style("cursor",null),S.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),M(),_({type:"brushend"})}x.style("pointer-events","none").selectAll(".resize").style("display",null),a.select("body").style("cursor",g.style("cursor")),_({type:"brushstart"}),P()}return p.event=function(n){n.each((function(){var n=r.of(this,arguments),i={x:o,y:s,i:t,j:e},l=this.__chart__||i;this.__chart__=i,$i?a.select(this).transition().each("start.brush",(function(){t=l.i,e=l.j,o=l.x,s=l.y,n({type:"brushstart"})})).tween("brush:brush",(function(){var r=kr(o,i.x),a=kr(s,i.y);return t=e=null,function(t){o=i.x=r(t),s=i.y=a(t),n({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=i.i,e=i.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})})):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))}))},p.x=function(t){return arguments.length?(h=pa[!(n=t)<<1|!i],p):n},p.y=function(t){return arguments.length?(h=pa[!n<<1|!(i=t)],p):i},p.clamp=function(t){return arguments.length?(n&&i?(l=!!t[0],u=!!t[1]):n?l=!!t:i&&(u=!!t),p):n&&i?[l,u]:n?l:i?u:null},p.extent=function(r){var a,l,u,c,h;return arguments.length?(n&&(a=r[0],l=r[1],i&&(a=a[0],l=l[0]),t=[a,l],n.invert&&(a=n(a),l=n(l)),l<a&&(h=a,a=l,l=h),a==o[0]&&l==o[1]||(o=[a,l])),i&&(u=r[0],c=r[1],n&&(u=u[1],c=c[1]),e=[u,c],i.invert&&(u=i(u),c=i(c)),c<u&&(h=u,u=c,c=h),u==s[0]&&c==s[1]||(s=[u,c])),p):(n&&(t?(a=t[0],l=t[1]):(a=o[0],l=o[1],n.invert&&(a=n.invert(a),l=n.invert(l)),l<a&&(h=a,a=l,l=h))),i&&(e?(u=e[0],c=e[1]):(u=s[0],c=s[1],i.invert&&(u=i.invert(u),c=i.invert(c)),c<u&&(h=u,u=c,c=h))),n&&i?[[a,u],[l,c]]:n?[a,l]:i&&[u,c])},p.clear=function(){return p.empty()||(o=[0,0],s=[0,0],t=e=null),p},p.empty=function(){return!!n&&o[0]==o[1]||!!i&&s[0]==s[1]},a.rebind(p,r,"on")};var ha={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},pa=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function fa(t){return JSON.parse(t.responseText)}function da(t){var e=l.createRange();return e.selectNode(l.body),e.createContextualFragment(t.responseText)}a.text=ve((function(t){return t.responseText})),a.json=function(t,e){return ge(t,"application/json",fa,e)},a.html=function(t,e){return ge(t,"text/html",da,e)},a.xml=ve((function(t){return t.responseXML})),void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i)}).apply(self)},3480:function(t){t.exports=function(){"use strict";var t,e,r;function n(n,i){if(t)if(e){var a="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",o={};t(o),r=i(o),"undefined"!=typeof window&&(r.workerUrl=window.URL.createObjectURL(new Blob([a],{type:"text/javascript"})))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r="1.13.4",n=i;function i(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)<e)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=a/s}if((i=t)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(a=this.sampleCurveX(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var a=o;function o(t,e){this.x=t,this.y=e}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var s="undefined"!=typeof self?self:{};var l=Math.pow(2,53)-1;function u(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}}var c=u(.25,.1,.25,1);function h(t,e,r){return Math.min(r,Math.max(e,t))}function p(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function f(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}var d=1;function m(){return d++}function y(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function v(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function _(t,e){return-1!==t.indexOf(e,t.length-e.length)}function x(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function b(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function w(t){return Array.isArray(t)?t.map(w):"object"==typeof t&&t?x(t,w):t}var T={};function k(t){T[t]||("undefined"!=typeof console&&console.warn(t),T[t]=!0)}function M(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function A(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r<n;i=r++)a=t[r],e+=((o=t[i]).x-a.x)*(a.y+o.y);return e}function S(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function L(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),""})),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}var C=null;function P(t){if(null==C){var e=t.navigator?t.navigator.userAgent:null;C=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return C}function I(t){try{var e=s[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var E,D,z,O,R=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),F=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,B=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,N={now:R,frame:function(t){var e=F(t);return{cancel:function(){return B(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=s.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return E||(E=s.document.createElement("a")),E.href=t,E.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return!!s.matchMedia&&(null==D&&(D=s.matchMedia("(prefers-reduced-motion: reduce)")),D.matches)}},U={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},j={supported:!1,testSupport:function(t){!V&&O&&(q?H(t):z=t)}},V=!1,q=!1;function H(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,O),t.isContextLost())return;j.supported=!0}catch(t){}t.deleteTexture(e),V=!0}s.document&&((O=s.document.createElement("img")).onload=function(){z&&H(z),z=null,q=!0},O.onerror=function(){V=!0,z=null},O.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var G="01";var Z=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function Y(t){return 0===t.indexOf("mapbox:")}Z.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",G,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},Z.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Z.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},Z.prototype.normalizeStyleURL=function(t,e){if(!Y(t))return t;var r=K(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeGlyphsURL=function(t,e){if(!Y(t))return t;var r=K(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeSourceURL=function(t,e){if(!Y(t))return t;var r=K(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},Z.prototype.normalizeSpriteURL=function(t,e,r,n){var i=K(t);return Y(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+e+r,Q(i))},Z.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!Y(t))return t;var r=K(t),n=N.devicePixelRatio>=2||512===e?"@2x":"",i=j.supported?".webp":"$1";r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+n+i),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e<r.length;e+=1){var n=r[e].match(/^access_token=(.*)$/);if(n)return n[1]}return null}(r.params)||U.ACCESS_TOKEN;return U.REQUIRE_ACCESS_TOKEN&&a&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,a)},Z.prototype.canonicalizeTileURL=function(t,e){var r=K(t);if(!r.path.match(/(^\/v4\/)/)||!r.path.match(/\.[\w]+$/))return t;var n="mapbox://tiles/";n+=r.path.replace("/v4/","");var i=r.params;return e&&(i=i.filter((function(t){return!t.match(/^access_token=/)}))),i.length&&(n+="?"+i.join("&")),n},Z.prototype.canonicalizeTileset=function(t,e){for(var r=!!e&&Y(e),n=[],i=0,a=t.tiles||[];i<a.length;i+=1){var o=a[i];X(o)?n.push(this.canonicalizeTileURL(o,r)):n.push(o)}return n},Z.prototype._makeAPIURL=function(t,e){var r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",n=K(U.API_URL);if(t.protocol=n.protocol,t.authority=n.authority,"http"===t.protocol){var i=t.params.indexOf("secure");i>=0&&t.params.splice(i,1)}if("/"!==n.path&&(t.path=""+n.path+t.path),!U.REQUIRE_ACCESS_TOKEN)return Q(t);if(!(e=e||U.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return t.params=t.params.filter((function(t){return-1===t.indexOf("access_token")})),t.params.push("access_token="+e),Q(t)};var W=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function X(t){return W.test(t)}var J=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(t){var e=t.match(J);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function Q(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}var $="mapbox.eventData";function tt(t){if(!t)return null;var e,r=t.split(".");if(!r||3!==r.length)return null;try{return JSON.parse((e=r[1],decodeURIComponent(s.atob(e).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(t){return null}}var et=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};et.prototype.getStorageKey=function(t){var e,r,n=tt(U.ACCESS_TOKEN);return e=n&&n.u?(r=n.u,s.btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number("0x"+e))})))):U.ACCESS_TOKEN||"",t?$+"."+t+":"+e:$+":"+e},et.prototype.fetchEventData=function(){var t=I("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var n=s.localStorage.getItem(e);n&&(this.eventData=JSON.parse(n));var i=s.localStorage.getItem(r);i&&(this.anonId=i)}catch(t){k("Unable to read from LocalStorage")}},et.prototype.saveEventData=function(){var t=I("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{s.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&s.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){k("Unable to write to LocalStorage")}},et.prototype.processRequests=function(t){},et.prototype.postEvent=function(t,e,n,i){var a=this;if(U.EVENTS_URL){var o=K(U.EVENTS_URL);o.params.push("access_token="+(i||U.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:G,userId:this.anonId},l=e?f(s,e):s,u={url:Q(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=St(u,(function(t){a.pendingRequest=null,n(t),a.saveEventData(),a.processRequests(i)}))}},et.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var rt,nt,it=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(U.EVENTS_URL&&n||U.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return Y(t)||X(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),v(this.anonId)||(this.anonId=y()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(et),at=function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){U.EVENTS_URL&&U.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return Y(t)||X(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=tt(U.ACCESS_TOKEN),n=r?r.u:U.ACCESS_TOKEN,i=n!==this.eventData.tokenU;v(this.anonId)||(this.anonId=y(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(et),ot=new at,st=ot.postTurnstileEvent.bind(ot),lt=new it,ut=lt.postMapLoadEvent.bind(lt),ct="mapbox-tiles",ht=500,pt=50,ft=42e4;function dt(){s.caches&&!rt&&(rt=s.caches.open(ct))}function mt(t,e,r){if(dt(),rt){var n={status:e.status,statusText:e.statusText,headers:new s.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=L(e.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<ft||function(t,e){if(void 0===nt)try{new Response(new ReadableStream),nt=!0}catch(t){nt=!1}nt?e(t.body):t.blob().then(e)}(e,(function(e){var r=new s.Response(e,n);dt(),rt&&rt.then((function(e){return e.put(yt(t.url),r)})).catch((function(t){return k(t.message)}))})))}}function yt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}function vt(t,e){if(dt(),!rt)return e(null);var r=yt(t.url);rt.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),r=L(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var gt,_t=1/0;function xt(){return null==gt&&(gt=s.OffscreenCanvas&&new s.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof s.createImageBitmap),gt}var bt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(bt);var wt=function(t){function e(e,r,n){401===r&&X(n)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),Tt=S()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===s.location.protocol?s.parent:s).location.href};function kt(t,e){var r,n=new s.AbortController,i=new s.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:Tt(),signal:n.signal}),a=!1,o=!1,l=(r=i.url).indexOf("sku=")>0&&X(r);"json"===t.type&&i.headers.set("Accept","application/json");var u=function(r,n,a){if(!o){if(r&&"SecurityError"!==r.message&&k(r),n&&a)return c(n);var u=Date.now();s.fetch(i).then((function(r){if(r.ok){var n=l?r.clone():null;return c(r,n,u)}return e(new wt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then((function(t){o||(n&&s&&mt(i,n,s),a=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(t){o||e(new Error(t.message))}))};return l?vt(i,u):u(null,null),{cancel:function(){o=!0,a||n.abort()}}}var Mt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(Tt())&&!/^\w+:/.test(r))){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return kt(t,e);if(S()&&self.worker&&self.worker.actor){return self.worker.actor.send("getResource",t,e,void 0,!0)}}var r;return function(t,e){var r=new s.XMLHttpRequest;for(var n in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(n,t.headers[n]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new wt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},At=function(t,e){return Mt(f(t,{type:"arrayBuffer"}),e)},St=function(t,e){return Mt(f(t,{method:"POST"}),e)};var Lt,Ct,Pt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Lt=[],Ct=0;var It=function(t,e){if(j.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Ct>=U.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return Lt.push(r),r}Ct++;var n=!1,i=function(){if(!n)for(n=!0,Ct--;Lt.length&&Ct<U.MAX_PARALLEL_IMAGE_REQUESTS;){var t=Lt.shift(),e=t.requestParameters,r=t.callback;t.cancelled||(t.cancel=It(e,r).cancel)}},a=At(t,(function(t,r,n,a){i(),t?e(t):r&&(xt()?function(t,e){var r=new s.Blob([new Uint8Array(t)],{type:"image/png"});s.createImageBitmap(r).then((function(t){e(null,t)})).catch((function(t){e(new Error("Could not load image because of "+t.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}(r,e):function(t,e,r,n){var i=new s.Image,a=s.URL;i.onload=function(){e(null,i),a.revokeObjectURL(i.src),i.onload=null,s.requestAnimationFrame((function(){i.src=Pt}))},i.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var o=new s.Blob([new Uint8Array(t)],{type:"image/png"});i.cacheControl=r,i.expires=n,i.src=t.byteLength?a.createObjectURL(o):Pt}(r,e,n,a))}));return{cancel:function(){a.cancel(),i()}}};function Et(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function Dt(t,e,r){if(r&&r[t]){var n=r[t].indexOf(e);-1!==n&&r[t].splice(n,1)}}var zt=function(t,e){void 0===e&&(e={}),f(this,e),this.type=t},Ot=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,"error",f({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(zt),Rt=function(){};Rt.prototype.on=function(t,e){return this._listeners=this._listeners||{},Et(t,e,this._listeners),this},Rt.prototype.off=function(t,e){return Dt(t,e,this._listeners),Dt(t,e,this._oneTimeListeners),this},Rt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},Et(t,e,this._oneTimeListeners),this},Rt.prototype.fire=function(t,e){"string"==typeof t&&(t=new zt(t,e||{}));var r=t.type;if(this.listens(r)){t.target=this;for(var n=0,i=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];n<i.length;n+=1)i[n].call(this,t);for(var a=0,o=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];a<o.length;a+=1){var s=o[a];Dt(r,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(f(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof Ot&&console.error(t.error);return this},Rt.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Rt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Ft={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Bt=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Nt(t){var e=t.key,r=t.value;return r?[new Bt(e,r,"constants have been deprecated as of v8")]:[]}function Ut(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n<i.length;n+=1){var a=i[n];for(var o in a)t[o]=a[o]}return t}function jt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Vt(t){if(Array.isArray(t))return t.map(Vt);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var r in t)e[r]=Vt(t[r]);return e}return jt(t)}var qt=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Ht=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,n=e;r<n.length;r+=1){var i=n[r],a=i[0],o=i[1];this.bindings[a]=o}};Ht.prototype.concat=function(t){return new Ht(this,t)},Ht.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Ht.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Gt={kind:"null"},Zt={kind:"number"},Yt={kind:"string"},Wt={kind:"boolean"},Xt={kind:"color"},Jt={kind:"object"},Kt={kind:"value"},Qt={kind:"collator"},$t={kind:"formatted"},te={kind:"resolvedImage"};function ee(t,e){return{kind:"array",itemType:t,N:e}}function re(t){if("array"===t.kind){var e=re(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var ne=[Gt,Zt,Yt,Wt,Xt,$t,Jt,ee(Kt),te];function ie(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!ie(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=ne;r<n.length;r+=1)if(!ie(n[r],e))return null}return"Expected "+re(t)+" but found "+re(e)+" instead."}function ae(t,e){return e.some((function(e){return e.kind===t.kind}))}function oe(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var se=e((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf("("),u=i.indexOf(")");if(-1!==l&&u+1===i.length){var c=i.substr(0,l),h=i.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),p];case"hsla":if(4!==h.length)return null;p=o(h.pop());case"hsl":if(3!==h.length)return null;var f=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),m=o(h[2]),y=m<=.5?m*(d+1):m+d-m*d,v=2*m-y;return[n(255*s(v,y,f+1/3)),n(255*s(v,y,f)),n(255*s(v,y,f-1/3)),p];default:return null}}return null}}catch(t){}})),le=se.parseCSSColor,ue=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};ue.parse=function(t){if(t){if(t instanceof ue)return t;if("string"==typeof t){var e=le(t);if(e)return new ue(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ue.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+i+")"},ue.prototype.toArray=function(){var t=this,e=t.r,r=t.g,n=t.b,i=t.a;return 0===i?[0,0,0,0]:[255*e/i,255*r/i,255*n/i,i]},ue.black=new ue(0,0,0,1),ue.white=new ue(1,1,1,1),ue.transparent=new ue(0,0,0,0),ue.red=new ue(1,0,0,1);var ce=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ce.prototype.compare=function(t,e){return this.collator.compare(t,e)},ce.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var he=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},pe=function(t){this.sections=t};pe.fromString=function(t){return new pe([new he(t,null,null,null,null)])},pe.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},pe.factory=function(t){return t instanceof pe?t:pe.fromString(t)},pe.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},pe.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];if(n.image)t.push(["image",n.image.name]);else{t.push(n.text);var i={};n.fontStack&&(i["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(i["font-scale"]=n.scale),n.textColor&&(i["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(i)}}return t};var fe=function(t){this.name=t.name,this.available=t.available};function de(t,e,r,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function me(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof ue)return!0;if(t instanceof ce)return!0;if(t instanceof pe)return!0;if(t instanceof fe)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1)if(!me(r[e]))return!1;return!0}if("object"==typeof t){for(var n in t)if(!me(t[n]))return!1;return!0}return!1}function ye(t){if(null===t)return Gt;if("string"==typeof t)return Yt;if("boolean"==typeof t)return Wt;if("number"==typeof t)return Zt;if(t instanceof ue)return Xt;if(t instanceof ce)return Qt;if(t instanceof pe)return $t;if(t instanceof fe)return te;if(Array.isArray(t)){for(var e,r=t.length,n=0,i=t;n<i.length;n+=1){var a=ye(i[n]);if(e){if(e===a)continue;e=Kt;break}e=a}return ee(e||Kt,r)}return Jt}function ve(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof ue||t instanceof pe||t instanceof fe?t.toString():JSON.stringify(t)}fe.prototype.toString=function(){return this.name},fe.fromString=function(t){return t?new fe({name:t,available:!1}):null},fe.prototype.serialize=function(){return["image",this.name]};var ge=function(t,e){this.type=t,this.value=e};ge.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!me(t[1]))return e.error("invalid value");var r=t[1],n=ye(r),i=e.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new ge(n,r)},ge.prototype.evaluate=function(){return this.value},ge.prototype.eachChild=function(){},ge.prototype.outputDefined=function(){return!0},ge.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ue?["rgba"].concat(this.value.toArray()):this.value instanceof pe?this.value.serialize():this.value};var _e=function(t){this.name="ExpressionEvaluationError",this.message=t};_e.prototype.toJSON=function(){return this.message};var xe={string:Yt,number:Zt,boolean:Wt,object:Jt},be=function(t,e){this.type=t,this.args=e};be.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,n=1,i=t[0];if("array"===i){var a,o;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in xe)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=xe[s],n++}else a=Kt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}r=ee(a,o)}else r=xe[i];for(var l=[];n<t.length;n++){var u=e.parse(t[n],n,Kt);if(!u)return null;l.push(u)}return new be(r,l)},be.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!ie(this.type,ye(r)))return r;if(e===this.args.length-1)throw new _e("Expected value to be of type "+re(this.type)+", but found "+re(ye(r))+" instead.")}return null},be.prototype.eachChild=function(t){this.args.forEach(t)},be.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},be.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var we=function(t){this.type=$t,this.sections=t};we.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=e.parse(o["font-scale"],1,Zt)))return null;var l=null;if(o["text-font"]&&!(l=e.parse(o["text-font"],1,ee(Yt))))return null;var u=null;if(o["text-color"]&&!(u=e.parse(o["text-color"],1,Xt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var h=e.parse(t[a],1,Kt);if(!h)return null;var p=h.type.kind;if("string"!==p&&"value"!==p&&"null"!==p&&"resolvedImage"!==p)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new we(n)},we.prototype.evaluate=function(t){return new pe(this.sections.map((function(e){var r=e.content.evaluate(t);return ye(r)===te?new he("",r,null,null,null):new he(ve(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},we.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor)}},we.prototype.outputDefined=function(){return!1},we.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var n=r[e];t.push(n.content.serialize());var i={};n.scale&&(i["font-scale"]=n.scale.serialize()),n.font&&(i["text-font"]=n.font.serialize()),n.textColor&&(i["text-color"]=n.textColor.serialize()),t.push(i)}return t};var Te=function(t){this.type=te,this.input=t};Te.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Yt);return r?new Te(r):e.error("No image name provided.")},Te.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=fe.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r},Te.prototype.eachChild=function(t){t(this.input)},Te.prototype.outputDefined=function(){return!1},Te.prototype.serialize=function(){return["image",this.input.serialize()]};var ke={"to-boolean":Wt,"to-color":Xt,"to-number":Zt,"to-string":Yt},Me=function(t,e){this.type=t,this.args=e};Me.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=ke[r],i=[],a=1;a<t.length;a++){var o=e.parse(t[a],a,Kt);if(!o)return null;i.push(o)}return new Me(n,i)},Me.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,n=0,i=this.args;n<i.length;n+=1){if(r=null,(e=i[n].evaluate(t))instanceof ue)return e;if("string"==typeof e){var a=t.parseColor(e);if(a)return a}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":de(e[0],e[1],e[2],e[3])))return new ue(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new _e(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s<l.length;s+=1){if(null===(o=l[s].evaluate(t)))return 0;var u=Number(o);if(!isNaN(u))return u}throw new _e("Could not convert "+JSON.stringify(o)+" to number.")}return"formatted"===this.type.kind?pe.fromString(ve(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?fe.fromString(ve(this.args[0].evaluate(t))):ve(this.args[0].evaluate(t))},Me.prototype.eachChild=function(t){this.args.forEach(t)},Me.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},Me.prototype.serialize=function(){if("formatted"===this.type.kind)return new we([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Te(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ae=["Unknown","Point","LineString","Polygon"],Se=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Se.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Se.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Ae[this.feature.type]:this.feature.type:null},Se.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Se.prototype.canonicalID=function(){return this.canonical},Se.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Se.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=ue.parse(t)),e};var Le=function(t,e,r,n){this.name=t,this.type=e,this._evaluate=r,this.args=n};Le.prototype.evaluate=function(t){return this._evaluate(t,this.args)},Le.prototype.eachChild=function(t){this.args.forEach(t)},Le.prototype.outputDefined=function(){return!1},Le.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},Le.parse=function(t,e){var r,n=t[0],i=Le.definitions[n];if(!i)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var a=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=o.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),l=null,u=0,c=s;u<c.length;u+=1){var h=c[u],p=h[0],f=h[1];l=new Ke(e.registry,e.path,null,e.scope);for(var d=[],m=!1,y=1;y<t.length;y++){var v=t[y],g=Array.isArray(p)?p[y-1]:p.type,_=l.parse(v,1+d.length,g);if(!_){m=!0;break}d.push(_)}if(!m)if(Array.isArray(p)&&p.length!==d.length)l.error("Expected "+p.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(p)?p[x]:p.type,w=d[x];l.concat(x+1).checkSubtype(b,w.type)}if(0===l.errors.length)return new Le(n,a,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,l.errors);else{for(var T=(s.length?s:o).map((function(t){return e=t[0],Array.isArray(e)?"("+e.map(re).join(", ")+")":"("+re(e.type)+"...)";var e})).join(" | "),k=[],M=1;M<t.length;M++){var A=e.parse(t[M],1+k.length);if(!A)return null;k.push(re(A.type))}e.error("Expected arguments of type "+T+", but found ("+k.join(", ")+") instead.")}return null},Le.register=function(t,e){for(var r in Le.definitions=e,e)t[r]=Le};var Ce=function(t,e,r){this.type=Qt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};Ce.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Wt);if(!n)return null;var i=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Wt);if(!i)return null;var a=null;return r.locale&&!(a=e.parse(r.locale,1,Yt))?null:new Ce(n,i,a)},Ce.prototype.evaluate=function(t){return new ce(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Ce.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Ce.prototype.outputDefined=function(){return!1},Ce.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var Pe=8192;function Ie(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Ee(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function De(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*Pe),Math.round(i*a*Pe)]}function ze(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Oe(t,e){for(var r=!1,n=0,i=e.length;n<i;n++)for(var a=e[n],o=0,s=a.length;o<s-1;o++){if(l=t,u=a[o],c=a[o+1],h=void 0,p=void 0,f=void 0,d=void 0,h=l[0]-u[0],p=l[1]-u[1],f=l[0]-c[0],d=l[1]-c[1],h*d-f*p==0&&h*f<=0&&p*d<=0)return!1;ze(t,a[o],a[o+1])&&(r=!r)}var l,u,c,h,p,f,d;return r}function Re(t,e){for(var r=0;r<e.length;r++)if(Oe(t,e[r]))return!0;return!1}function Fe(t,e,r,n){var i=t[0]-r[0],a=t[1]-r[1],o=e[0]-r[0],s=e[1]-r[1],l=n[0]-r[0],u=n[1]-r[1],c=i*u-l*a,h=o*u-l*s;return c>0&&h<0||c<0&&h>0}function Be(t,e,r){for(var n=0,i=r;n<i.length;n+=1)for(var a=i[n],o=0;o<a.length-1;++o)if(s=t,l=e,u=a[o],c=a[o+1],h=void 0,p=void 0,f=void 0,f=[l[0]-s[0],l[1]-s[1]],0!=(h=[c[0]-u[0],c[1]-u[1]],p=f,h[0]*p[1]-h[1]*p[0])&&Fe(s,l,u,c)&&Fe(u,c,s,l))return!0;var s,l,u,c,h,p,f;return!1}function Ne(t,e){for(var r=0;r<t.length;++r)if(!Oe(t[r],e))return!1;for(var n=0;n<t.length-1;++n)if(Be(t[n],t[n+1],e))return!1;return!0}function Ue(t,e){for(var r=0;r<e.length;r++)if(Ne(t,e[r]))return!0;return!1}function je(t,e,r){for(var n=[],i=0;i<t.length;i++){for(var a=[],o=0;o<t[i].length;o++){var s=De(t[i][o],r);Ie(e,s),a.push(s)}n.push(a)}return n}function Ve(t,e,r){for(var n=[],i=0;i<t.length;i++){var a=je(t[i],e,r);n.push(a)}return n}function qe(t,e,r,n){if(t[0]<r[0]||t[0]>r[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}Ie(e,t)}function He(t,e,r,n){for(var i=Math.pow(2,n.z)*Pe,a=[n.x*Pe,n.y*Pe],o=[],s=0,l=t;s<l.length;s+=1)for(var u=0,c=l[s];u<c.length;u+=1){var h=c[u],p=[h.x+a[0],h.y+a[1]];qe(p,e,r,i),o.push(p)}return o}function Ge(t,e,r,n){for(var i=Math.pow(2,n.z)*Pe,a=[n.x*Pe,n.y*Pe],o=[],s=0,l=t;s<l.length;s+=1){for(var u=[],c=0,h=l[s];c<h.length;c+=1){var p=h[c],f=[p.x+a[0],p.y+a[1]];Ie(e,f),u.push(f)}o.push(u)}if(e[2]-e[0]<=i/2){(g=e)[0]=g[1]=1/0,g[2]=g[3]=-1/0;for(var d=0,m=o;d<m.length;d+=1)for(var y=0,v=m[d];y<v.length;y+=1)qe(v[y],e,r,i)}var g;return o}var Ze=function(t,e){this.type=Wt,this.geojson=t,this.geometries=e};function Ye(t){if(t instanceof Le){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Ze)return!1;var e=!0;return t.eachChild((function(t){e&&!Ye(t)&&(e=!1)})),e}function We(t){if(t instanceof Le&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!We(t)&&(e=!1)})),e}function Xe(t,e){if(t instanceof Le&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Xe(t,e)&&(r=!1)})),r}Ze.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(me(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;n<r.features.length;++n){var i=r.features[n].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new Ze(r,r.features[n].geometry)}else if("Feature"===r.type){var a=r.geometry.type;if("Polygon"===a||"MultiPolygon"===a)return new Ze(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new Ze(r,r)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Ze.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var a=je(e.coordinates,n,i),o=He(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var s=0,l=o;s<l.length;s+=1)if(!Oe(l[s],a))return!1}if("MultiPolygon"===e.type){var u=Ve(e.coordinates,n,i),c=He(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var h=0,p=c;h<p.length;h+=1)if(!Re(p[h],u))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===e.type){var a=je(e.coordinates,n,i),o=Ge(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var s=0,l=o;s<l.length;s+=1)if(!Ne(l[s],a))return!1}if("MultiPolygon"===e.type){var u=Ve(e.coordinates,n,i),c=Ge(t.geometry(),r,n,i);if(!Ee(r,n))return!1;for(var h=0,p=c;h<p.length;h+=1)if(!Ue(p[h],u))return!1}return!0}(t,this.geometries)}return!1},Ze.prototype.eachChild=function(){},Ze.prototype.outputDefined=function(){return!0},Ze.prototype.serialize=function(){return["within",this.geojson]};var Je=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Je.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Je(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Je.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Je.prototype.eachChild=function(){},Je.prototype.outputDefined=function(){return!1},Je.prototype.serialize=function(){return["var",this.name]};var Ke=function(t,e,r,n,i){void 0===e&&(e=[]),void 0===n&&(n=new Ht),void 0===i&&(i=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=n,this.errors=i,this.expectedType=r};function Qe(t){if(t instanceof Je)return Qe(t.boundExpression);if(t instanceof Le&&"error"===t.name)return!1;if(t instanceof Ce)return!1;if(t instanceof Ze)return!1;var e=t instanceof Me||t instanceof be,r=!0;return t.eachChild((function(t){r=e?r&&Qe(t):r&&t instanceof ge})),!!r&&Ye(t)&&Xe(t,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function $e(t,e){for(var r,n,i=t.length-1,a=0,o=i,s=0;a<=o;)if(r=t[s=Math.floor((a+o)/2)],n=t[s+1],r<=e){if(s===i||e<n)return s;a=s+1}else{if(!(r>e))throw new _e("Input is not a number.");o=s-1}return 0}Ke.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Ke.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new be(e,[t]):"coerce"===r?new Me(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||"coerce");else a=r(a,o,e.typeAnnotation||"assert")}if(!(a instanceof ge)&&"resolvedImage"!==a.type.kind&&Qe(a)){var l=new Se;try{a=new ge(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Ke.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Ke(this.registry,n,e||null,i,this.errors)},Ke.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new qt(n,t))},Ke.prototype.checkSubtype=function(t,e){var r=ie(t,e);return r&&this.error(r),r};var tr=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n<i.length;n+=1){var a=i[n],o=a[0],s=a[1];this.labels.push(o),this.outputs.push(s)}};function er(t,e,r){return t*(1-r)+e*r}tr.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(t[1],1,Zt);if(!r)return null;var n=[],i=null;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var a=1;a<t.length;a+=2){var o=1===a?-1/0:t[a],s=t[a+1],l=a,u=a+1;if("number"!=typeof o)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,i);if(!c)return null;i=i||c.type,n.push([o,c])}return new tr(i,r,n)},tr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[$e(e,n)].evaluate(t)},tr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},tr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},tr.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var rr=Object.freeze({__proto__:null,number:er,color:function(t,e,r){return new ue(er(t.r,e.r,r),er(t.g,e.g,r),er(t.b,e.b,r),er(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return er(t,e[n],r)}))}}),nr=.95047,ir=1,ar=1.08883,or=4/29,sr=6/29,lr=3*sr*sr,ur=sr*sr*sr,cr=Math.PI/180,hr=180/Math.PI;function pr(t){return t>ur?Math.pow(t,1/3):t/lr+or}function fr(t){return t>sr?t*t*t:lr*(t-or)}function dr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function mr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){var e=mr(t.r),r=mr(t.g),n=mr(t.b),i=pr((.4124564*e+.3575761*r+.1804375*n)/nr),a=pr((.2126729*e+.7151522*r+.072175*n)/ir);return{l:116*a-16,a:500*(i-a),b:200*(a-pr((.0193339*e+.119192*r+.9503041*n)/ar)),alpha:t.a}}function vr(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=ir*fr(e),r=nr*fr(r),n=ar*fr(n),new ue(dr(3.2404542*r-1.5371385*e-.4985314*n),dr(-.969266*r+1.8760108*e+.041556*n),dr(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function gr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var _r={forward:yr,reverse:vr,interpolate:function(t,e,r){return{l:er(t.l,e.l,r),a:er(t.a,e.a,r),b:er(t.b,e.b,r),alpha:er(t.alpha,e.alpha,r)}}},xr={forward:function(t){var e=yr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*hr;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*cr,r=t.c;return vr({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:gr(t.h,e.h,r),c:er(t.c,e.c,r),l:er(t.l,e.l,r),alpha:er(t.alpha,e.alpha,r)}}},br=Object.freeze({__proto__:null,lab:_r,hcl:xr}),wr=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a<o.length;a+=1){var s=o[a],l=s[0],u=s[1];this.labels.push(l),this.outputs.push(u)}};function Tr(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}wr.interpolationFactor=function(t,e,r,i){var a=0;if("exponential"===t.name)a=Tr(e,t.base,r,i);else if("linear"===t.name)a=Tr(e,1,r,i);else if("cubic-bezier"===t.name){var o=t.controlPoints;a=new n(o[0],o[1],o[2],o[3]).solve(Tr(e,1,r,i))}return a},wr.parse=function(t,e){var r=t[0],n=t[1],i=t[2],a=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var o=n[1];if("number"!=typeof o)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:o}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,Zt)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=Xt:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<a.length;c+=2){var h=a[c],p=a[c+1],f=c+3,d=c+4;if("number"!=typeof h)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=h)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(p,d,u);if(!m)return null;u=u||m.type,l.push([h,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new wr(u,r,n,i,l):e.error("Type "+re(u)+" is not interpolatable.")},wr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=$e(e,n),o=e[a],s=e[a+1],l=wr.interpolationFactor(this.interpolation,n,o,s),u=r[a].evaluate(t),c=r[a+1].evaluate(t);return"interpolate"===this.operator?rr[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?xr.reverse(xr.interpolate(xr.forward(u),xr.forward(c),l)):_r.reverse(_r.interpolate(_r.forward(u),_r.forward(c),l))},wr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},wr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},wr.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var kr=function(t,e){this.type=t,this.args=e};kr.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,n=e.expectedType;n&&"value"!==n.kind&&(r=n);for(var i=[],a=0,o=t.slice(1);a<o.length;a+=1){var s=o[a],l=e.parse(s,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,i.push(l)}var u=n&&i.some((function(t){return ie(n,t.type)}));return new kr(u?Kt:r,i)},kr.prototype.evaluate=function(t){for(var e,r=null,n=0,i=0,a=this.args;i<a.length&&(n++,(r=a[i].evaluate(t))&&r instanceof fe&&!r.available&&(e||(e=r.name),r=null,n===this.args.length&&(r=e)),null===r);i+=1);return r},kr.prototype.eachChild=function(t){this.args.forEach(t)},kr.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},kr.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Mr=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};Mr.prototype.evaluate=function(t){return this.result.evaluate(t)},Mr.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},Mr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],n=1;n<t.length-1;n+=2){var i=t[n];if("string"!=typeof i)return e.error("Expected string, but found "+typeof i+" instead.",n);if(/[^a-zA-Z0-9_]/.test(i))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var a=e.parse(t[n+1],n+1);if(!a)return null;r.push([i,a])}var o=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return o?new Mr(r,o):null},Mr.prototype.outputDefined=function(){return this.result.outputDefined()},Mr.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t.push(i,a.serialize())}return t.push(this.result.serialize()),t};var Ar=function(t,e,r){this.type=t,this.index=e,this.input=r};Ar.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Zt),n=e.parse(t[2],2,ee(e.expectedType||Kt));if(!r||!n)return null;var i=n.type;return new Ar(i.itemType,r,n)},Ar.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new _e("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new _e("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new _e("Array index must be an integer, but found "+e+" instead.");return r[e]},Ar.prototype.eachChild=function(t){t(this.index),t(this.input)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Sr=function(t,e){this.type=Wt,this.needle=t,this.haystack=e};Sr.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Kt),n=e.parse(t[2],2,Kt);return r&&n?ae(r.type,[Wt,Yt,Zt,Gt,Kt])?new Sr(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+re(r.type)+" instead"):null},Sr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!oe(e,["boolean","string","number","null"]))throw new _e("Expected first argument to be of type boolean, string, number or null, but found "+re(ye(e))+" instead.");if(!oe(r,["string","array"]))throw new _e("Expected second argument to be of type array or string, but found "+re(ye(r))+" instead.");return r.indexOf(e)>=0},Sr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Sr.prototype.outputDefined=function(){return!0},Sr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Lr=function(t,e,r){this.type=Zt,this.needle=t,this.haystack=e,this.fromIndex=r};Lr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Kt),n=e.parse(t[2],2,Kt);if(!r||!n)return null;if(!ae(r.type,[Wt,Yt,Zt,Gt,Kt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+re(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Zt);return i?new Lr(r,n,i):null}return new Lr(r,n)},Lr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!oe(e,["boolean","string","number","null"]))throw new _e("Expected first argument to be of type boolean, string, number or null, but found "+re(ye(e))+" instead.");if(!oe(r,["string","array"]))throw new _e("Expected second argument to be of type array or string, but found "+re(ye(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},Lr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},Lr.prototype.outputDefined=function(){return!1},Lr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Cr=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Cr.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;o<t.length-1;o+=2){var s=t[o],l=t[o+1];Array.isArray(s)||(s=[s]);var u=e.concat(o);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var p=h[c];if("number"!=typeof p&&"string"!=typeof p)return u.error("Branch labels must be numbers or strings.");if("number"==typeof p&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,ye(p)))return null}else r=ye(p);if(void 0!==i[String(p)])return u.error("Branch labels must be unique.");i[String(p)]=a.length}var f=e.parse(l,o,n);if(!f)return null;n=n||f.type,a.push(f)}var d=e.parse(t[1],1,Kt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,n);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new Cr(r,n,d,i,a,m):null},Cr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ye(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Cr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Cr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},Cr.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i<a.length;i+=1){var o=a[i];void 0===(h=n[this.cases[o]])?(n[this.cases[o]]=r.length,r.push([this.cases[o],[o]])):r[h][1].push(o)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=r;l<u.length;l+=1){var c=u[l],h=c[0],p=c[1];1===p.length?e.push(s(p[0])):e.push(p.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Pr=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};Pr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var n=[],i=1;i<t.length-1;i+=2){var a=e.parse(t[i],i,Wt);if(!a)return null;var o=e.parse(t[i+1],i+1,r);if(!o)return null;n.push([a,o]),r=r||o.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Pr(r,n,s):null},Pr.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];if(i.evaluate(t))return a.evaluate(t)}return this.otherwise.evaluate(t)},Pr.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var n=r[e],i=n[0],a=n[1];t(i),t(a)}t(this.otherwise)},Pr.prototype.outputDefined=function(){return this.branches.every((function(t){return t[0],t[1].outputDefined()}))&&this.otherwise.outputDefined()},Pr.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ir=function(t,e,r,n){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=n};function Er(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Dr(t,e,r,n){return 0===n.compare(e,r)}function zr(t,e,r){var n="=="!==t&&"!="!==t;return function(){function i(t,e,r){this.type=Wt,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return i.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],a=e.parse(t[1],1,Kt);if(!a)return null;if(!Er(r,a.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+re(a.type)+"'.");var o=e.parse(t[2],2,Kt);if(!o)return null;if(!Er(r,o.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+re(o.type)+"'.");if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error("Cannot compare types '"+re(a.type)+"' and '"+re(o.type)+"'.");n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new be(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new be(a.type,[o])));var s=null;if(4===t.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Qt)))return null}return new i(a,o,s)},i.prototype.evaluate=function(i){var a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=ye(a),l=ye(o);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new _e('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var u=ye(a),c=ye(o);if("string"!==u.kind||"string"!==c.kind)return e(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):e(i,a,o)},i.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},i.prototype.outputDefined=function(){return!0},i.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},i}()}Ir.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Kt),n=e.parse(t[2],2,Zt);if(!r||!n)return null;if(!ae(r.type,[ee(Kt),Yt,Kt]))return e.error("Expected first argument to be of type array or string, but found "+re(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Zt);return i?new Ir(r.type,r,n,i):null}return new Ir(r.type,r,n)},Ir.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!oe(e,["string","array"]))throw new _e("Expected first argument to be of type array or string, but found "+re(ye(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},Ir.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Ir.prototype.outputDefined=function(){return!1},Ir.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Or=zr("==",(function(t,e,r){return e===r}),Dr),Rr=zr("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!Dr(0,e,r,n)})),Fr=zr("<",(function(t,e,r){return e<r}),(function(t,e,r,n){return n.compare(e,r)<0})),Br=zr(">",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Nr=zr("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Ur=zr(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),jr=function(t,e,r,n,i){this.type=Yt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};jr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Zt);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Yt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Yt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,Zt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Zt))?null:new jr(r,i,a,o,s)},jr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},jr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},jr.prototype.outputDefined=function(){return!1},jr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Vr=function(t){this.type=Zt,this.input=t};Vr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+re(r.type)+" instead."):new Vr(r):null},Vr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new _e("Expected value to be of type string or array, but found "+re(ye(e))+" instead.")},Vr.prototype.eachChild=function(t){t(this.input)},Vr.prototype.outputDefined=function(){return!1},Vr.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var qr={"==":Or,"!=":Rr,">":Br,"<":Fr,">=":Ur,"<=":Nr,array:be,at:Ar,boolean:be,case:Pr,coalesce:kr,collator:Ce,format:we,image:Te,in:Sr,"index-of":Lr,interpolate:wr,"interpolate-hcl":wr,"interpolate-lab":wr,length:Vr,let:Mr,literal:ge,match:Cr,number:be,"number-format":jr,object:be,slice:Ir,step:tr,string:be,"to-boolean":Me,"to-color":Me,"to-number":Me,"to-string":Me,var:Je,within:Ze};function Hr(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=de(r,n,i,o);if(s)throw new _e(s);return new ue(r/255*o,n/255*o,i/255*o,o)}function Gr(t,e){return t in e}function Zr(t,e){var r=e[t];return void 0===r?null:r}function Yr(t){return{type:t}}function Wr(t){return{result:"success",value:t}}function Xr(t){return{result:"error",value:t}}function Jr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Kr(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Qr(t){return!!t.expression&&t.expression.interpolated}function $r(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function tn(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function en(t){return t}function rn(t,e){var r,n,i,a="color"===e.type,o=t.stops&&"object"==typeof t.stops[0][0],s=o||void 0!==t.property,l=o||!s,u=t.type||(Qr(e)?"exponential":"interval");if(a&&((t=Ut({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],ue.parse(t[1])]}))),t.default?t.default=ue.parse(t.default):t.default=ue.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!br[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===u)r=sn;else if("interval"===u)r=on;else if("categorical"===u){r=an,n=Object.create(null);for(var c=0,h=t.stops;c<h.length;c+=1){var p=h[c];n[p[0]]=p[1]}i=typeof t.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');r=ln}if(o){for(var f={},d=[],m=0;m<t.stops.length;m++){var y=t.stops[m],v=y[0].zoom;void 0===f[v]&&(f[v]={zoom:v,type:t.type,property:t.property,default:t.default,stops:[]},d.push(v)),f[v].stops.push([y[0].value,y[1]])}for(var g=[],_=0,x=d;_<x.length;_+=1){var b=x[_];g.push([f[b].zoom,rn(f[b],e)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:wr.interpolationFactor.bind(void 0,w),zoomStops:g.map((function(t){return t[0]})),evaluate:function(r,n){var i=r.zoom;return sn({stops:g,base:t.base},e,i).evaluate(i,n)}}}if(l){var T="exponential"===u?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:T,interpolationFactor:wr.interpolationFactor.bind(void 0,T),zoomStops:t.stops.map((function(t){return t[0]})),evaluate:function(a){var o=a.zoom;return r(t,e,o,n,i)}}}return{kind:"source",evaluate:function(a,o){var s=o&&o.properties?o.properties[t.property]:void 0;return void 0===s?nn(t.default,e.default):r(t,e,s,n,i)}}}function nn(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function an(t,e,r,n,i){return nn(typeof r===i?n[r]:void 0,t.default,e.default)}function on(t,e,r){if("number"!==$r(r))return nn(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=$e(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function sn(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==$r(r))return nn(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var a=$e(t.stops.map((function(t){return t[0]})),r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],u=rr[e.type]||en;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=br[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return u(r,n,o)}}:u(s,l,o)}function ln(t,e,r){return"color"===e.type?r=ue.parse(r):"formatted"===e.type?r=pe.fromString(r.toString()):"resolvedImage"===e.type?r=fe.fromString(r.toString()):$r(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),nn(r,t.default,e.default)}Le.register(qr,{error:[{kind:"error"},[Yt],function(t,e){var r=e[0];throw new _e(r.evaluate(t))}],typeof:[Yt,[Kt],function(t,e){return re(ye(e[0].evaluate(t)))}],"to-rgba":[ee(Zt,4),[Xt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Xt,[Zt,Zt,Zt],Hr],rgba:[Xt,[Zt,Zt,Zt,Zt],Hr],has:{type:Wt,overloads:[[[Yt],function(t,e){return Gr(e[0].evaluate(t),t.properties())}],[[Yt,Jt],function(t,e){var r=e[0],n=e[1];return Gr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Kt,overloads:[[[Yt],function(t,e){return Zr(e[0].evaluate(t),t.properties())}],[[Yt,Jt],function(t,e){var r=e[0],n=e[1];return Zr(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Kt,[Yt],function(t,e){return Zr(e[0].evaluate(t),t.featureState||{})}],properties:[Jt,[],function(t){return t.properties()}],"geometry-type":[Yt,[],function(t){return t.geometryType()}],id:[Kt,[],function(t){return t.id()}],zoom:[Zt,[],function(t){return t.globals.zoom}],"heatmap-density":[Zt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Zt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Kt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Zt,Yr(Zt),function(t,e){for(var r=0,n=0,i=e;n<i.length;n+=1)r+=i[n].evaluate(t);return r}],"*":[Zt,Yr(Zt),function(t,e){for(var r=1,n=0,i=e;n<i.length;n+=1)r*=i[n].evaluate(t);return r}],"-":{type:Zt,overloads:[[[Zt,Zt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)-n.evaluate(t)}],[[Zt],function(t,e){return-e[0].evaluate(t)}]]},"/":[Zt,[Zt,Zt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)/n.evaluate(t)}],"%":[Zt,[Zt,Zt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)%n.evaluate(t)}],ln2:[Zt,[],function(){return Math.LN2}],pi:[Zt,[],function(){return Math.PI}],e:[Zt,[],function(){return Math.E}],"^":[Zt,[Zt,Zt],function(t,e){var r=e[0],n=e[1];return Math.pow(r.evaluate(t),n.evaluate(t))}],sqrt:[Zt,[Zt],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[Zt,[Zt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[Zt,[Zt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[Zt,[Zt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[Zt,[Zt],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[Zt,[Zt],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[Zt,[Zt],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[Zt,[Zt],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[Zt,[Zt],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[Zt,[Zt],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[Zt,Yr(Zt),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[Zt,Yr(Zt),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[Zt,[Zt],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[Zt,[Zt],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Zt,[Zt],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[Zt,[Zt],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[Wt,[Yt,Kt],function(t,e){var r=e[0],n=e[1];return t.properties()[r.value]===n.value}],"filter-id-==":[Wt,[Kt],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[Wt,[Yt],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[Wt,[Yt,Kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<a}],"filter-id-<":[Wt,[Kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<i}],"filter->":[Wt,[Yt,Kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],"filter-id->":[Wt,[Kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[Wt,[Yt,Kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],"filter-id-<=":[Wt,[Kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[Wt,[Yt,Kt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],"filter-id->=":[Wt,[Kt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[Wt,[Kt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Wt,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Wt,[ee(Yt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Wt,[ee(Kt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Wt,[Yt,ee(Kt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Wt,[Yt,ee(Kt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Wt,overloads:[[[Wt,Wt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Yr(Wt),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(!n[r].evaluate(t))return!1;return!0}]]},any:{type:Wt,overloads:[[[Wt,Wt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)||n.evaluate(t)}],[Yr(Wt),function(t,e){for(var r=0,n=e;r<n.length;r+=1)if(n[r].evaluate(t))return!0;return!1}]]},"!":[Wt,[Wt],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Wt,[Yt],function(t,e){var r=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(r.evaluate(t))}],upcase:[Yt,[Yt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Yt,[Yt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Yt,Yr(Kt),function(t,e){return e.map((function(e){return ve(e.evaluate(t))})).join("")}],"resolved-locale":[Yt,[Qt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var un=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new Se,this._defaultValue=e?function(t){return"color"===t.type&&tn(t.default)?new ue(0,0,0,0):"color"===t.type?ue.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null};function cn(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in qr}function hn(t,e){var r=new Ke(qr,[],e?function(t){var e={color:Xt,string:Yt,number:Zt,enum:Yt,boolean:Wt,formatted:$t,resolvedImage:te};return"array"===t.type?ee(e[t.value]||Kt,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Wr(new un(n,e)):Xr(r.errors)}un.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},un.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new _e("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var pn=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!We(e.expression)};pn.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},pn.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var fn=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!We(e.expression),this.interpolationType=n};function dn(t,e){if("error"===(t=hn(t,e)).result)return t;var r=t.value.expression,n=Ye(r);if(!n&&!Jr(e))return Xr([new qt("","data expressions not supported")]);var i=Xe(r,["zoom"]);if(!i&&!Kr(e))return Xr([new qt("","zoom expressions not supported")]);var a=yn(r);if(!a&&!i)return Xr([new qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof qt)return Xr([a]);if(a instanceof wr&&!Qr(e))return Xr([new qt("",'"interpolate" expressions cannot be used with this property')]);if(!a)return Wr(new pn(n?"constant":"source",t.value));var o=a instanceof wr?a.interpolation:void 0;return Wr(new fn(n?"camera":"composite",t.value,a.labels,o))}fn.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},fn.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)},fn.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?wr.interpolationFactor(this.interpolationType,t,e,r):0};var mn=function(t,e){this._parameters=t,this._specification=e,Ut(this,rn(this._parameters,this._specification))};function yn(t){var e=null;if(t instanceof Mr)e=yn(t.result);else if(t instanceof kr)for(var r=0,n=t.args;r<n.length;r+=1){var i=n[r];if(e=yn(i))break}else(t instanceof tr||t instanceof wr)&&t.input instanceof Le&&"zoom"===t.input.name&&(e=t);return e instanceof qt||t.eachChild((function(t){var r=yn(t);r instanceof qt?e=r:!e&&r?e=new qt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new qt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function vn(t){var e=t.key,r=t.value,n=t.valueSpec||{},i=t.objectElementValidators||{},a=t.style,o=t.styleSpec,s=[],l=$r(r);if("object"!==l)return[new Bt(e,r,"object expected, "+l+" found")];for(var u in r){var c=u.split(".")[0],h=n[c]||n["*"],p=void 0;if(i[c])p=i[c];else if(n[c])p=Hn;else if(i["*"])p=i["*"];else{if(!n["*"]){s.push(new Bt(e,r[u],'unknown property "'+u+'"'));continue}p=Hn}s=s.concat(p({key:(e?e+".":e)+u,value:r[u],valueSpec:h,style:a,styleSpec:o,object:r,objectKey:u},r))}for(var f in n)i[f]||n[f].required&&void 0===n[f].default&&void 0===r[f]&&s.push(new Bt(e,r,'missing required property "'+f+'"'));return s}function gn(t){var e=t.value,r=t.valueSpec,n=t.style,i=t.styleSpec,a=t.key,o=t.arrayElementValidator||Hn;if("array"!==$r(e))return[new Bt(a,e,"array expected, "+$r(e)+" found")];if(r.length&&e.length!==r.length)return[new Bt(a,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new Bt(a,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value,values:r.values};i.$version<7&&(s.function=r.function),"object"===$r(r.value)&&(s=r.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(o({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:n,styleSpec:i,key:a+"["+u+"]"}));return l}function _n(t){var e=t.key,r=t.value,n=t.valueSpec,i=$r(r);return"number"===i&&r!=r&&(i="NaN"),"number"!==i?[new Bt(e,r,"number expected, "+i+" found")]:"minimum"in n&&r<n.minimum?[new Bt(e,r,r+" is less than the minimum value "+n.minimum)]:"maximum"in n&&r>n.maximum?[new Bt(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function xn(t){var e,r,n,i=t.valueSpec,a=jt(t.value.type),o={},s="categorical"!==a&&void 0===t.value.property,l=!s,u="array"===$r(t.value.stops)&&"array"===$r(t.value.stops[0])&&"object"===$r(t.value.stops[0][0]),c=vn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===a)return[new Bt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(gn({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===$r(r)&&0===r.length&&e.push(new Bt(t.key,r,"array must have at least one stop")),e},default:function(t){return Hn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===a&&s&&c.push(new Bt(t.key,t.value,'missing required property "property"')),"identity"===a||t.value.stops||c.push(new Bt(t.key,t.value,'missing required property "stops"')),"exponential"===a&&t.valueSpec.expression&&!Qr(t.valueSpec)&&c.push(new Bt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Jr(t.valueSpec)?c.push(new Bt(t.key,t.value,"property functions not supported")):s&&!Kr(t.valueSpec)&&c.push(new Bt(t.key,t.value,"zoom functions not supported"))),"categorical"!==a&&!u||void 0!==t.value.property||c.push(new Bt(t.key,t.value,'"property" property is required')),c;function h(t){var e=[],a=t.value,s=t.key;if("array"!==$r(a))return[new Bt(s,a,"array expected, "+$r(a)+" found")];if(2!==a.length)return[new Bt(s,a,"array length 2 expected, length "+a.length+" found")];if(u){if("object"!==$r(a[0]))return[new Bt(s,a,"object expected, "+$r(a[0])+" found")];if(void 0===a[0].zoom)return[new Bt(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new Bt(s,a,"object stop key must have value")];if(n&&n>jt(a[0].zoom))return[new Bt(s,a[0].zoom,"stop zoom values must appear in ascending order")];jt(a[0].zoom)!==n&&(n=jt(a[0].zoom),r=void 0,o={}),e=e.concat(vn({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:_n,value:p}}))}else e=e.concat(p({key:s+"[0]",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return cn(Vt(a[1]))?e.concat([new Bt(s+"[1]",a[1],"expressions are not allowed in function stops.")]):e.concat(Hn({key:s+"[1]",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function p(t,n){var s=$r(t.value),l=jt(t.value),u=null!==t.value?t.value:n;if(e){if(s!==e)return[new Bt(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Bt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var c="number expected, "+s+" found";return Jr(i)&&void 0===a&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Bt(t.key,u,c)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l<r?[new Bt(t.key,u,"stop domain values must appear in ascending order")]:(r=l,"categorical"===a&&l in o?[new Bt(t.key,u,"stop domain values must be unique")]:(o[l]=!0,[])):[new Bt(t.key,u,"integer expected, found "+l)]}}function bn(t){var e=("property"===t.expressionContext?dn:hn)(Vt(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new Bt(""+t.key+e.key,t.value,e.message)}));var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return[new Bt(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!We(r))return[new Bt(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!We(r))return[new Bt(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Xe(r,["zoom","feature-state"]))return[new Bt(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!Ye(r))return[new Bt(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function wn(t){var e=t.key,r=t.value,n=t.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(jt(r))&&i.push(new Bt(e,r,"expected one of ["+n.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(n.values).indexOf(jt(r))&&i.push(new Bt(e,r,"expected one of ["+Object.keys(n.values).join(", ")+"], "+JSON.stringify(r)+" found")),i}function Tn(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var n=r[e];if(!Tn(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}mn.deserialize=function(t){return new mn(t._parameters,t._specification)},mn.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var kn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Mn(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};Tn(t)||(t=Ln(t));var e=hn(t,kn);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return{filter:function(t,r,n){return e.value.evaluate(t,r,{},n)},needGeometry:Sn(t)}}function An(t,e){return t<e?-1:t>e?1:0}function Sn(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var e=1;e<t.length;e++)if(Sn(t[e]))return!0;return!1}function Ln(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Cn(t[1],t[2],"=="):"!="===r?En(Cn(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Cn(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(Ln))):"all"===r?["all"].concat(t.slice(1).map(Ln)):"none"===r?["all"].concat(t.slice(1).map(Ln).map(En)):"in"===r?Pn(t[1],t.slice(2)):"!in"===r?En(Pn(t[1],t.slice(2))):"has"===r?In(t[1]):"!has"===r?En(In(t[1])):"within"!==r||t}function Cn(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function Pn(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(An)]]:["filter-in-small",t,["literal",e]]}}function In(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function En(t){return["!",t]}function Dn(t){return Tn(Vt(t.value))?bn(Ut({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):zn(t)}function zn(t){var e=t.value,r=t.key;if("array"!==$r(e))return[new Bt(r,e,"array expected, "+$r(e)+" found")];var n,i=t.styleSpec,a=[];if(e.length<1)return[new Bt(r,e,"filter array must have at least 1 element")];switch(a=a.concat(wn({key:r+"[0]",value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),jt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===jt(e[1])&&a.push(new Bt(r,e,'"$type" cannot be use with operator "'+e[0]+'"'));case"==":case"!=":3!==e.length&&a.push(new Bt(r,e,'filter array for operator "'+e[0]+'" must have 3 elements'));case"in":case"!in":e.length>=2&&"string"!==(n=$r(e[1]))&&a.push(new Bt(r+"[1]",e[1],"string expected, "+n+" found"));for(var o=2;o<e.length;o++)n=$r(e[o]),"$type"===jt(e[1])?a=a.concat(wn({key:r+"["+o+"]",value:e[o],valueSpec:i.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&a.push(new Bt(r+"["+o+"]",e[o],"string, number, or boolean expected, "+n+" found"));break;case"any":case"all":case"none":for(var s=1;s<e.length;s++)a=a.concat(zn({key:r+"["+s+"]",value:e[s],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":n=$r(e[1]),2!==e.length?a.push(new Bt(r,e,'filter array for "'+e[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new Bt(r+"[1]",e[1],"string expected, "+n+" found"));break;case"within":n=$r(e[1]),2!==e.length?a.push(new Bt(r,e,'filter array for "'+e[0]+'" operator must have 2 elements')):"object"!==n&&a.push(new Bt(r+"[1]",e[1],"object expected, "+n+" found"))}return a}function On(t,e){var r=t.key,n=t.style,i=t.styleSpec,a=t.value,o=t.objectKey,s=i[e+"_"+t.layerType];if(!s)return[];var l=o.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return Hn({key:r,value:a,valueSpec:i.transition,style:n,styleSpec:i});var u,c=t.valueSpec||s[o];if(!c)return[new Bt(r,a,'unknown property "'+o+'"')];if("string"===$r(a)&&Jr(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(a)))return[new Bt(r,a,'"'+o+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var h=[];return"symbol"===t.layerType&&("text-field"===o&&n&&!n.glyphs&&h.push(new Bt(r,a,'use of "text-field" requires a style "glyphs" property')),"text-font"===o&&tn(Vt(a))&&"identity"===jt(a.type)&&h.push(new Bt(r,a,'"text-font" does not support identity functions'))),h.concat(Hn({key:t.key,value:a,valueSpec:c,style:n,styleSpec:i,expressionContext:"property",propertyType:e,propertyKey:o}))}function Rn(t){return On(t,"paint")}function Fn(t){return On(t,"layout")}function Bn(t){var e=[],r=t.value,n=t.key,i=t.style,a=t.styleSpec;r.type||r.ref||e.push(new Bt(n,r,'either "type" or "ref" is required'));var o,s=jt(r.type),l=jt(r.ref);if(r.id)for(var u=jt(r.id),c=0;c<t.arrayIndex;c++){var h=i.layers[c];jt(h.id)===u&&e.push(new Bt(n,r.id,'duplicate layer id "'+r.id+'", previously used at line '+h.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(t){t in r&&e.push(new Bt(n,r[t],'"'+t+'" is prohibited for ref layers'))})),i.layers.forEach((function(t){jt(t.id)===l&&(o=t)})),o?o.ref?e.push(new Bt(n,r.ref,"ref cannot reference another ref layer")):s=jt(o.type):e.push(new Bt(n,r.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(r.source){var p=i.sources&&i.sources[r.source],f=p&&jt(p.type);p?"vector"===f&&"raster"===s?e.push(new Bt(n,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new Bt(n,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new Bt(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&p.lineMetrics||e.push(new Bt(n,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new Bt(n,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new Bt(n,r.source,'source "'+r.source+'" not found'))}else e.push(new Bt(n,r,'missing required property "source"'));return e=e.concat(vn({key:n,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Hn({key:n+".type",value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Dn,layout:function(t){return vn({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Fn(Ut({layerType:s},t))}}})},paint:function(t){return vn({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Rn(Ut({layerType:s},t))}}})}}})),e}function Nn(t){var e=t.value,r=t.key,n=$r(e);return"string"!==n?[new Bt(r,e,"string expected, "+n+" found")]:[]}var Un={promoteId:function(t){var e=t.key,r=t.value;if("string"===$r(r))return Nn({key:e,value:r});var n=[];for(var i in r)n.push.apply(n,Nn({key:e+"."+i,value:r[i]}));return n}};function jn(t){var e=t.value,r=t.key,n=t.styleSpec,i=t.style;if(!e.type)return[new Bt(r,e,'"type" is required')];var a,o=jt(e.type);switch(o){case"vector":case"raster":case"raster-dem":return vn({key:r,value:e,valueSpec:n["source_"+o.replace("-","_")],style:t.style,styleSpec:n,objectElementValidators:Un});case"geojson":if(a=vn({key:r,value:e,valueSpec:n.source_geojson,style:i,styleSpec:n,objectElementValidators:Un}),e.cluster)for(var s in e.clusterProperties){var l=e.clusterProperties[s],u=l[0],c=l[1],h="string"==typeof u?[u,["accumulated"],["get",s]]:u;a.push.apply(a,bn({key:r+"."+s+".map",value:c,expressionContext:"cluster-map"})),a.push.apply(a,bn({key:r+"."+s+".reduce",value:h,expressionContext:"cluster-reduce"}))}return a;case"video":return vn({key:r,value:e,valueSpec:n.source_video,style:i,styleSpec:n});case"image":return vn({key:r,value:e,valueSpec:n.source_image,style:i,styleSpec:n});case"canvas":return[new Bt(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return wn({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,styleSpec:n})}}function Vn(t){var e=t.value,r=t.styleSpec,n=r.light,i=t.style,a=[],o=$r(e);if(void 0===e)return a;if("object"!==o)return a.concat([new Bt("light",e,"object expected, "+o+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);a=l&&n[l[1]]&&n[l[1]].transition?a.concat(Hn({key:s,value:e[s],valueSpec:r.transition,style:i,styleSpec:r})):n[s]?a.concat(Hn({key:s,value:e[s],valueSpec:n[s],style:i,styleSpec:r})):a.concat([new Bt(s,e[s],'unknown property "'+s+'"')])}return a}var qn={"*":function(){return[]},array:gn,boolean:function(t){var e=t.value,r=t.key,n=$r(e);return"boolean"!==n?[new Bt(r,e,"boolean expected, "+n+" found")]:[]},number:_n,color:function(t){var e=t.key,r=t.value,n=$r(r);return"string"!==n?[new Bt(e,r,"color expected, "+n+" found")]:null===le(r)?[new Bt(e,r,'color expected, "'+r+'" found')]:[]},constants:Nt,enum:wn,filter:Dn,function:xn,layer:Bn,object:vn,source:jn,light:Vn,string:Nn,formatted:function(t){return 0===Nn(t).length?[]:bn(t)},resolvedImage:function(t){return 0===Nn(t).length?[]:bn(t)}};function Hn(t){var e=t.value,r=t.valueSpec,n=t.styleSpec;return r.expression&&tn(jt(e))?xn(t):r.expression&&cn(Vt(e))?bn(t):r.type&&qn[r.type]?qn[r.type](t):vn(Ut({},t,{valueSpec:r.type?n[r.type]:r}))}function Gn(t){var e=t.value,r=t.key,n=Nn(t);return n.length||(-1===e.indexOf("{fontstack}")&&n.push(new Bt(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&n.push(new Bt(r,e,'"glyphs" url must include a "{range}" token'))),n}function Zn(t,e){void 0===e&&(e=Ft);var r=[];return r=r.concat(Hn({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Gn,"*":function(){return[]}}})),t.constants&&(r=r.concat(Nt({key:"constants",value:t.constants,style:t,styleSpec:e}))),Yn(r)}function Yn(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function Wn(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Yn(t.apply(this,e))}}Zn.source=Wn(jn),Zn.light=Wn(Vn),Zn.layer=Wn(Bn),Zn.filter=Wn(Dn),Zn.paintProperty=Wn(Rn),Zn.layoutProperty=Wn(Fn);var Xn=Zn,Jn=Xn.light,Kn=Xn.paintProperty,Qn=Xn.layoutProperty;function $n(t,e){var r=!1;if(e&&e.length)for(var n=0,i=e;n<i.length;n+=1){var a=i[n];t.fire(new Ot(new Error(a.message))),r=!0}return r}var ti=ri,ei=3;function ri(t,e,r){var n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var i=new Int32Array(this.arrayBuffer);t=i[0],e=i[1],r=i[2],this.d=e+2*r;for(var a=0;a<this.d*this.d;a++){var o=i[ei+a],s=i[ei+a+1];n.push(o===s?null:i.subarray(o,s))}var l=i[ei+n.length],u=i[ei+n.length+1];this.keys=i.subarray(l,u),this.bboxes=i.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var c=0;c<this.d*this.d;c++)n.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}ri.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},ri.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ri.prototype._insertCell=function(t,e,r,n,i,a){this.cells[i].push(a)},ri.prototype.query=function(t,e,r,n,i){var a=this.min,o=this.max;if(t<=a&&e<=a&&o<=r&&o<=n&&!i)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,n,this._queryCell,s,{},i),s},ri.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=this.cells[i];if(null!==l)for(var u=this.keys,c=this.bboxes,h=0;h<l.length;h++){var p=l[h];if(void 0===o[p]){var f=4*p;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):t<=c[f+2]&&e<=c[f+3]&&r>=c[f+0]&&n>=c[f+1])?(o[p]=!0,a.push(u[p])):o[p]=!1}}},ri.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),h=this._convertToCellCoord(n),p=l;p<=c;p++)for(var f=u;f<=h;f++){var d=this.d*f+p;if((!s||s(this._convertFromCellCoord(p),this._convertFromCellCoord(f),this._convertFromCellCoord(p+1),this._convertFromCellCoord(f+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},ri.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},ri.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ri.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ei+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var i=new Int32Array(e+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;for(var a=e,o=0;o<t.length;o++){var s=t[o];i[ei+o]=a,i.set(s,a),a+=s.length}return i[ei+t.length]=a,i.set(this.keys,a),a+=this.keys.length,i[ei+t.length+1]=a,i.set(this.bboxes,a),a+=this.bboxes.length,i.buffer};var ni=s.ImageData,ii=s.ImageBitmap,ai={};function oi(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),ai[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var si in oi("Object",Object),ti.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),{buffer:r}},ti.deserialize=function(t){return new ti(t.buffer)},oi("Grid",ti),oi("Color",ue),oi("Error",Error),oi("ResolvedImage",fe),oi("StylePropertyFunction",mn),oi("StyleExpression",un,{omit:["_evaluator"]}),oi("ZoomDependentExpression",fn),oi("ZoomConstantExpression",pn),oi("CompoundExpression",Le,{omit:["_evaluate"]}),qr)qr[si]._classRegistryKey||oi("Expression_"+si,qr[si]);function li(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function ui(t){return ii&&t instanceof ii}function ci(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(li(t)||ui(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof ni)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var n=[],i=0,a=t;i<a.length;i+=1){var o=a[i];n.push(ci(o,e))}return n}if("object"==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u=s.serialize?s.serialize(t,e):{};if(!s.serialize){for(var c in t)if(t.hasOwnProperty(c)&&!(ai[l].omit.indexOf(c)>=0)){var h=t[c];u[c]=ai[l].shallow.indexOf(c)>=0?h:ci(h,e)}t instanceof Error&&(u.message=t.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof t)}function hi(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||li(t)||ui(t)||ArrayBuffer.isView(t)||t instanceof ni)return t;if(Array.isArray(t))return t.map(hi);if("object"==typeof t){var e=t.$name||"Object",r=ai[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i<a.length;i+=1){var o=a[i];if("$name"!==o){var s=t[o];n[o]=ai[e].shallow.indexOf(o)>=0?s:hi(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var pi=function(){this.first=!0};pi.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var fi={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function di(t){for(var e=0,r=t;e<r.length;e+=1)if(mi(r[e].charCodeAt(0)))return!0;return!1}function mi(t){return!(746!==t&&747!==t&&(t<4352||!(fi["Bopomofo Extended"](t)||fi.Bopomofo(t)||fi["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||fi["CJK Compatibility Ideographs"](t)||fi["CJK Compatibility"](t)||fi["CJK Radicals Supplement"](t)||fi["CJK Strokes"](t)||!(!fi["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||fi["CJK Unified Ideographs Extension A"](t)||fi["CJK Unified Ideographs"](t)||fi["Enclosed CJK Letters and Months"](t)||fi["Hangul Compatibility Jamo"](t)||fi["Hangul Jamo Extended-A"](t)||fi["Hangul Jamo Extended-B"](t)||fi["Hangul Jamo"](t)||fi["Hangul Syllables"](t)||fi.Hiragana(t)||fi["Ideographic Description Characters"](t)||fi.Kanbun(t)||fi["Kangxi Radicals"](t)||fi["Katakana Phonetic Extensions"](t)||fi.Katakana(t)&&12540!==t||!(!fi["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!fi["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||fi["Unified Canadian Aboriginal Syllabics"](t)||fi["Unified Canadian Aboriginal Syllabics Extended"](t)||fi["Vertical Forms"](t)||fi["Yijing Hexagram Symbols"](t)||fi["Yi Syllables"](t)||fi["Yi Radicals"](t))))}function yi(t){return!(mi(t)||function(t){return!!(fi["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||fi["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||fi["Letterlike Symbols"](t)||fi["Number Forms"](t)||fi["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||fi["Control Pictures"](t)&&9251!==t||fi["Optical Character Recognition"](t)||fi["Enclosed Alphanumerics"](t)||fi["Geometric Shapes"](t)||fi["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||fi["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||fi["CJK Symbols and Punctuation"](t)||fi.Katakana(t)||fi["Private Use Area"](t)||fi["CJK Compatibility Forms"](t)||fi["Small Form Variants"](t)||fi["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function vi(t){return fi.Arabic(t)||fi["Arabic Supplement"](t)||fi["Arabic Extended-A"](t)||fi["Arabic Presentation Forms-A"](t)||fi["Arabic Presentation Forms-B"](t)}function gi(t){return t>=1424&&t<=2303||fi["Arabic Presentation Forms-A"](t)||fi["Arabic Presentation Forms-B"](t)}function _i(t,e){return!(!e&&gi(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||fi.Khmer(t))}function xi(t){for(var e=0,r=t;e<r.length;e+=1)if(gi(r[e].charCodeAt(0)))return!0;return!1}var bi="deferred",wi="loading",Ti="loaded",ki="error",Mi=null,Ai="unavailable",Si=null,Li=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(Ai=ki),Mi&&Mi(t)};function Ci(){Pi.fire(new zt("pluginStateChange",{pluginStatus:Ai,pluginURL:Si}))}var Pi=new Rt,Ii=function(){return Ai},Ei=function(){if(Ai!==bi||!Si)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ai=wi,Ci(),Si&&At({url:Si},(function(t){t?Li(t):(Ai=Ti,Ci())}))},Di={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ai===Ti||null!=Di.applyArabicShaping},isLoading:function(){return Ai===wi},setState:function(t){Ai=t.pluginStatus,Si=t.pluginURL},isParsed:function(){return null!=Di.applyArabicShaping&&null!=Di.processBidirectionalText&&null!=Di.processStyledBidirectionalText},getPluginURL:function(){return Si}},zi=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new pi,this.transition={})};zi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;r<n.length;r+=1)if(!_i(n[r].charCodeAt(0),e))return!1;return!0}(t,Di.isLoaded())},zi.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},zi.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var Oi=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(tn(t))return new mn(t,e);if(cn(t)){var r=dn(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=ue.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};Oi.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Oi.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var Ri=function(t){this.property=t,this.value=new Oi(t,void 0)};Ri.prototype.transitioned=function(t,e){return new Bi(this.property,this.value,e,f({},t.transition,this.transition),t.now)},Ri.prototype.untransitioned=function(){return new Bi(this.property,this.value,null,{},0)};var Fi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Fi.prototype.getValue=function(t){return w(this._values[t].value.value)},Fi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ri(this._values[t].property)),this._values[t].value=new Oi(this._values[t].property,null===e?void 0:w(e))},Fi.prototype.getTransition=function(t){return w(this._values[t].transition)},Fi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ri(this._values[t].property)),this._values[t].transition=w(e)||void 0},Fi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i);var a=this.getTransition(n);void 0!==a&&(t[n+"-transition"]=a)}return t},Fi.prototype.transitioned=function(t,e){for(var r=new Ni(this._properties),n=0,i=Object.keys(this._values);n<i.length;n+=1){var a=i[n];r._values[a]=this._values[a].transitioned(t,e._values[a])}return r},Fi.prototype.untransitioned=function(){for(var t=new Ni(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e];t._values[n]=this._values[n].untransitioned()}return t};var Bi=function(t,e,r,n,i){this.property=t,this.value=e,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,t.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};Bi.prototype.possiblyEvaluate=function(t,e,r){var n=t.now||0,i=this.value.possiblyEvaluate(t,e,r),a=this.prior;if(a){if(n>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n<this.begin)return a.possiblyEvaluate(t,e,r);var o=(n-this.begin)/(this.end-this.begin);return this.property.interpolate(a.possiblyEvaluate(t,e,r),i,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var Ni=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Ni.prototype.possiblyEvaluate=function(t,e,r){for(var n=new Vi(this._properties),i=0,a=Object.keys(this._values);i<a.length;i+=1){var o=a[i];n._values[o]=this._values[o].possiblyEvaluate(t,e,r)}return n},Ni.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Ui=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Ui.prototype.getValue=function(t){return w(this._values[t].value)},Ui.prototype.setValue=function(t,e){this._values[t]=new Oi(this._values[t].property,null===e?void 0:w(e))},Ui.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var n=r[e],i=this.getValue(n);void 0!==i&&(t[n]=i)}return t},Ui.prototype.possiblyEvaluate=function(t,e,r){for(var n=new Vi(this._properties),i=0,a=Object.keys(this._values);i<a.length;i+=1){var o=a[i];n._values[o]=this._values[o].possiblyEvaluate(t,e,r)}return n};var ji=function(t,e,r){this.property=t,this.value=e,this.parameters=r};ji.prototype.isConstant=function(){return"constant"===this.value.kind},ji.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},ji.prototype.evaluate=function(t,e,r,n){return this.property.evaluate(this.value,this.parameters,t,e,r,n)};var Vi=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Vi.prototype.get=function(t){return this._values[t]};var qi=function(t){this.specification=t};qi.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},qi.prototype.interpolate=function(t,e,r){var n=rr[this.specification.type];return n?n(t,e,r):t};var Hi=function(t,e){this.specification=t,this.overrides=e};Hi.prototype.possiblyEvaluate=function(t,e,r,n){return"constant"===t.expression.kind||"camera"===t.expression.kind?new ji(this,{kind:"constant",value:t.expression.evaluate(e,null,{},r,n)},e):new ji(this,t.expression,e)},Hi.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new ji(this,{kind:"constant",value:void 0},t.parameters);var n=rr[this.specification.type];return n?new ji(this,{kind:"constant",value:n(t.value.value,e.value.value,r)},t.parameters):t},Hi.prototype.evaluate=function(t,e,r,n,i,a){return"constant"===t.kind?t.value:t.evaluate(e,r,n,i,a)};var Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0===t.value)return new ji(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n),a="resolvedImage"===t.property.specification.type&&"string"!=typeof i?i.name:i,o=this._calculate(a,a,a,e);return new ji(this,{kind:"constant",value:o},e)}if("camera"===t.expression.kind){var s=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new ji(this,{kind:"constant",value:s},e)}return new ji(this,t.expression,e)},e.prototype.evaluate=function(t,e,r,n,i,a){if("source"===t.kind){var o=t.evaluate(e,r,n,i,a);return this._calculate(o,o,o,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,n),t.evaluate({zoom:Math.floor(e.zoom)},r,n),t.evaluate({zoom:Math.floor(e.zoom)+1},r,n),e):t.value},e.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Hi),Zi=function(t){this.specification=t};Zi.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new zi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new zi(Math.floor(e.zoom),e)),t.expression.evaluate(new zi(Math.floor(e.zoom+1),e)),e)}},Zi.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Zi.prototype.interpolate=function(t){return t};var Yi=function(t){this.specification=t};Yi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Yi.prototype.interpolate=function(){return!1};var Wi=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new Oi(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Ri(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};oi("DataDrivenProperty",Hi),oi("DataConstantProperty",qi),oi("CrossFadedDataDrivenProperty",Gi),oi("CrossFadedProperty",Zi),oi("ColorRampProperty",Yi);var Xi="-transition",Ji=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new Ui(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Fi(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Vi(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".layout."+t;if(this._validate(Qn,n,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return _(t,Xi)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".paint."+t;if(this._validate(Kn,n,t,e,r))return!1}if(_(t,Xi))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;var i=this._transitionablePaint._values[t],a="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),b(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&$n(this,t.call(Xn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Ft,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof ji&&Jr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(Rt),Ki={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Qi=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},$i=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function ta(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Ki[i].BYTES_PER_ELEMENT),o=r=ea(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}})),size:ea(r,Math.max(n,e)),alignment:e}}function ea(t,e){return Math.ceil(t/e)*e}$i.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},$i.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},$i.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},$i.prototype.clear=function(){this.length=0},$i.prototype.resize=function(t){this.reserve(t),this.length=t},$i.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},$i.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}($i);ra.prototype.bytesPerElement=4,oi("StructArrayLayout2i4",ra);var na=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}($i);na.prototype.bytesPerElement=8,oi("StructArrayLayout4i8",na);var ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}($i);ia.prototype.bytesPerElement=12,oi("StructArrayLayout2i4i12",ia);var aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}($i);aa.prototype.bytesPerElement=8,oi("StructArrayLayout2i4ub8",aa);var oa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}($i);oa.prototype.bytesPerElement=8,oi("StructArrayLayout2f8",oa);var sa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l,u)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c){var h=10*t;return this.uint16[h+0]=e,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=u,this.uint16[h+9]=c,t},e}($i);sa.prototype.bytesPerElement=20,oi("StructArrayLayout10ui20",sa);var la=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,h){var p=this.length;return this.resize(p+1),this.emplace(p,t,e,r,n,i,a,o,s,l,u,c,h)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,h,p){var f=12*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=n,this.int16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=h,this.int16[f+11]=p,t},e}($i);la.prototype.bytesPerElement=24,oi("StructArrayLayout4i4ui4i24",la);var ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}($i);ua.prototype.bytesPerElement=12,oi("StructArrayLayout3f12",ua);var ca=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}($i);ca.prototype.bytesPerElement=4,oi("StructArrayLayout1ul4",ca);var ha=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u){var c=10*t,h=5*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.int16[c+4]=a,this.int16[c+5]=o,this.uint32[h+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}($i);ha.prototype.bytesPerElement=20,oi("StructArrayLayout6i1ul2ui20",ha);var pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}($i);pa.prototype.bytesPerElement=12,oi("StructArrayLayout2i2i2i12",pa);var fa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}($i);fa.prototype.bytesPerElement=16,oi("StructArrayLayout2f1f2i16",fa);var da=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}($i);da.prototype.bytesPerElement=12,oi("StructArrayLayout2ub2f12",da);var ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}($i);ma.prototype.bytesPerElement=6,oi("StructArrayLayout3ui6",ma);var ya=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m,y){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m,y)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m,y,v){var g=24*t,_=12*t,x=48*t;return this.int16[g+0]=e,this.int16[g+1]=r,this.uint16[g+2]=n,this.uint16[g+3]=i,this.uint32[_+2]=a,this.uint32[_+3]=o,this.uint32[_+4]=s,this.uint16[g+10]=l,this.uint16[g+11]=u,this.uint16[g+12]=c,this.float32[_+7]=h,this.float32[_+8]=p,this.uint8[x+36]=f,this.uint8[x+37]=d,this.uint8[x+38]=m,this.uint32[_+10]=y,this.int16[g+22]=v,t},e}($i);ya.prototype.bytesPerElement=48,oi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ya);var va=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m,y,v,g,_,x,b,w,T,k,M,A,S){var L=this.length;return this.resize(L+1),this.emplace(L,t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m,y,v,g,_,x,b,w,T,k,M,A,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m,y,v,g,_,x,b,w,T,k,M,A,S,L){var C=34*t,P=17*t;return this.int16[C+0]=e,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=u,this.uint16[C+9]=c,this.uint16[C+10]=h,this.uint16[C+11]=p,this.uint16[C+12]=f,this.uint16[C+13]=d,this.uint16[C+14]=m,this.uint16[C+15]=y,this.uint16[C+16]=v,this.uint16[C+17]=g,this.uint16[C+18]=_,this.uint16[C+19]=x,this.uint16[C+20]=b,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[P+12]=k,this.float32[P+13]=M,this.float32[P+14]=A,this.float32[P+15]=S,this.float32[P+16]=L,t},e}($i);va.prototype.bytesPerElement=68,oi("StructArrayLayout8i15ui1ul4f68",va);var ga=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}($i);ga.prototype.bytesPerElement=4,oi("StructArrayLayout1f4",ga);var _a=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}($i);_a.prototype.bytesPerElement=6,oi("StructArrayLayout3i6",_a);var xa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}($i);xa.prototype.bytesPerElement=8,oi("StructArrayLayout1ul2ui8",xa);var ba=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}($i);ba.prototype.bytesPerElement=4,oi("StructArrayLayout2ui4",ba);var wa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}($i);wa.prototype.bytesPerElement=2,oi("StructArrayLayout1ui2",wa);var Ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}($i);Ta.prototype.bytesPerElement=16,oi("StructArrayLayout4f16",Ta);var ka=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Qi);ka.prototype.size=20;var Ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new ka(this,t)},e}(ha);oi("CollisionBoxArray",Ma);var Aa=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Qi);Aa.prototype.size=48;var Sa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Aa(this,t)},e}(ya);oi("PlacedSymbolArray",Sa);var La=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Qi);La.prototype.size=68;var Ca=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new La(this,t)},e}(va);oi("SymbolInstanceArray",Ca);var Pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(ga);oi("GlyphOffsetArray",Pa);var Ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(_a);oi("SymbolLineVertexArray",Ia);var Ea=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Qi);Ea.prototype.size=8;var Da=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Ea(this,t)},e}(xa);oi("FeatureIndexArray",Da);var za=ta([{name:"a_pos",components:2,type:"Int16"}],4).members,Oa=function(t){void 0===t&&(t=[]),this.segments=t};function Ra(t,e){return 256*(t=h(Math.floor(t),0,255))+h(Math.floor(e),0,255)}Oa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>Oa.MAX_VERTEX_ARRAY_LENGTH&&k("Max vertices per segment is "+Oa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>Oa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Oa.prototype.get=function(){return this.segments},Oa.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var n in r.vaos)r.vaos[n].destroy()}},Oa.simpleSegment=function(t,e,r,n){return new Oa([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])},Oa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,oi("SegmentVector",Oa);var Fa=ta([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Ba=e((function(t){t.exports=function(t,e){var r,n,i,a,o,s,l,u;for(r=3&t.length,n=t.length-r,i=e,o=3432918353,s=461845907,u=0;u<n;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,i=27492+(65535&(a=5*(65535&(i=(i^=l=(65535&(l=(l=(65535&l)*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),Na=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),Ua=Ba,ja=Ba,Va=Na;Ua.murmur3=ja,Ua.murmur2=Va;var qa=function(){this.ids=[],this.positions=[],this.indexed=!1};qa.prototype.add=function(t,e,r,n){this.ids.push(Ga(t)),this.positions.push(e,r,n)},qa.prototype.getPositions=function(t){for(var e=Ga(t),r=0,n=this.ids.length-1;r<n;){var i=r+n>>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},qa.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Za(r,n,0,r.length-1),e&&e.push(r.buffer,n.buffer),{ids:r,positions:n}},qa.deserialize=function(t){var e=new qa;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var Ha=Math.pow(2,53)-1;function Ga(t){var e=+t;return!isNaN(e)&&e<=Ha?e:Ua(String(t))}function Za(t,e,r,n){for(;r<n;){for(var i=t[r+n>>1],a=r-1,o=n+1;;){do{a++}while(t[a]<i);do{o--}while(t[o]>i);if(a>=o)break;Ya(t,a,o),Ya(e,3*a,3*o),Ya(e,3*a+1,3*o+1),Ya(e,3*a+2,3*o+2)}o-r<n-o?(Za(t,e,r,o),r=o+1):(Za(t,e,o+1,n),n=o)}}function Ya(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}oi("FeaturePositionMap",qa);var Wa=function(t,e){this.gl=t.gl,this.location=e},Xa=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Wa),Ja=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Wa),Ka=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Wa),Qa=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Wa),$a=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Wa),to=function(t){function e(e,r){t.call(this,e,r),this.current=ue.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Wa),eo=new Float32Array(16),ro=function(t){function e(e,r){t.call(this,e,r),this.current=eo}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Wa);function no(t){return[Ra(255*t.r,255*t.g),Ra(255*t.b,255*t.a)]}var io=function(t,e,r){this.value=t,this.uniformNames=e.map((function(t){return"u_"+t})),this.type=r};io.prototype.setUniform=function(t,e,r){t.set(r.constantOr(this.value))},io.prototype.getBinding=function(t,e,r){return"color"===this.type?new to(t,e):new Ja(t,e)};var ao=function(t,e){this.uniformNames=e.map((function(t){return"u_"+t})),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};ao.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr},ao.prototype.setUniform=function(t,e,r,n){var i="u_pattern_to"===n?this.patternTo:"u_pattern_from"===n?this.patternFrom:"u_pixel_ratio_to"===n?this.pixelRatioTo:"u_pixel_ratio_from"===n?this.pixelRatioFrom:null;i&&t.set(i)},ao.prototype.getBinding=function(t,e,r){return"u_pattern"===r.substr(0,9)?new $a(t,e):new Ja(t,e)};var oo=function(t,e,r,n){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}})),this.paintVertexArray=new n};oo.prototype.populatePaintArray=function(t,e,r,n,i){var a=this.paintVertexArray.length,o=this.expression.evaluate(new zi(0),e,{},n,[],i);this.paintVertexArray.resize(t),this._setPaintValue(a,t,o)},oo.prototype.updatePaintArray=function(t,e,r,n){var i=this.expression.evaluate({zoom:0},r,n);this._setPaintValue(t,e,i)},oo.prototype._setPaintValue=function(t,e,r){if("color"===this.type)for(var n=no(r),i=t;i<e;i++)this.paintVertexArray.emplace(i,n[0],n[1]);else{for(var a=t;a<e;a++)this.paintVertexArray.emplace(a,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}},oo.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},oo.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var so=function(t,e,r,n,i,a){this.expression=t,this.uniformNames=e.map((function(t){return"u_"+t+"_t"})),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?4:2,offset:0}})),this.paintVertexArray=new a};so.prototype.populatePaintArray=function(t,e,r,n,i){var a=this.expression.evaluate(new zi(this.zoom),e,{},n,[],i),o=this.expression.evaluate(new zi(this.zoom+1),e,{},n,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,a,o)},so.prototype.updatePaintArray=function(t,e,r,n){var i=this.expression.evaluate({zoom:this.zoom},r,n),a=this.expression.evaluate({zoom:this.zoom+1},r,n);this._setPaintValue(t,e,i,a)},so.prototype._setPaintValue=function(t,e,r,n){if("color"===this.type)for(var i=no(r),a=no(n),o=t;o<e;o++)this.paintVertexArray.emplace(o,i[0],i[1],a[0],a[1]);else{for(var s=t;s<e;s++)this.paintVertexArray.emplace(s,r,n);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(n))}},so.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},so.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},so.prototype.setUniform=function(t,e){var r=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,n=h(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);t.set(n)},so.prototype.getBinding=function(t,e,r){return new Ja(t,e)};var lo=function(t,e,r,n,i,a){this.expression=t,this.type=e,this.useIntegerZoom=r,this.zoom=n,this.layerId=a,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i};lo.prototype.populatePaintArray=function(t,e,r){var n=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(n,t,e.patterns&&e.patterns[this.layerId],r)},lo.prototype.updatePaintArray=function(t,e,r,n,i){this._setPaintValues(t,e,r.patterns&&r.patterns[this.layerId],i)},lo.prototype._setPaintValues=function(t,e,r,n){if(n&&r){var i=r.min,a=r.mid,o=r.max,s=n[i],l=n[a],u=n[o];if(s&&l&&u)for(var c=t;c<e;c++)this.zoomInPaintVertexArray.emplace(c,l.tl[0],l.tl[1],l.br[0],l.br[1],s.tl[0],s.tl[1],s.br[0],s.br[1],l.pixelRatio,s.pixelRatio),this.zoomOutPaintVertexArray.emplace(c,l.tl[0],l.tl[1],l.br[0],l.br[1],u.tl[0],u.tl[1],u.br[0],u.br[1],l.pixelRatio,u.pixelRatio)}},lo.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,Fa.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,Fa.members,this.expression.isStateDependent))},lo.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var uo=function(t,e,r){this.binders={},this._buffers=[];var n=[];for(var i in t.paint._values)if(r(i)){var a=t.paint.get(i);if(a instanceof ji&&Jr(a.property.specification)){var o=ho(i,t.type),s=a.value,l=a.property.specification.type,u=a.property.useIntegerZoom,c=a.property.specification["property-type"],h="cross-faded"===c||"cross-faded-data-driven"===c;if("constant"===s.kind)this.binders[i]=h?new ao(s.value,o):new io(s.value,o,l),n.push("/u_"+i);else if("source"===s.kind||h){var p=po(i,l,"source");this.binders[i]=h?new lo(s,l,u,e,p,t.id):new oo(s,o,l,p),n.push("/a_"+i)}else{var f=po(i,l,"composite");this.binders[i]=new so(s,o,l,u,e,f),n.push("/z_"+i)}}}this.cacheKey=n.sort().join("")};uo.prototype.getMaxValue=function(t){var e=this.binders[t];return e instanceof oo||e instanceof so?e.maxValue:0},uo.prototype.populatePaintArrays=function(t,e,r,n,i){for(var a in this.binders){var o=this.binders[a];(o instanceof oo||o instanceof so||o instanceof lo)&&o.populatePaintArray(t,e,r,n,i)}},uo.prototype.setConstantPatternPositions=function(t,e){for(var r in this.binders){var n=this.binders[r];n instanceof ao&&n.setConstantPatternPositions(t,e)}},uo.prototype.updatePaintArrays=function(t,e,r,n,i){var a=!1;for(var o in t)for(var s=0,l=e.getPositions(o);s<l.length;s+=1){var u=l[s],c=r.feature(u.index);for(var h in this.binders){var p=this.binders[h];if((p instanceof oo||p instanceof so||p instanceof lo)&&!0===p.expression.isStateDependent){var f=n.paint.get(h);p.expression=f.value,p.updatePaintArray(u.start,u.end,c,t[o],i),a=!0}}}return a},uo.prototype.defines=function(){var t=[];for(var e in this.binders){var r=this.binders[e];(r instanceof io||r instanceof ao)&&t.push.apply(t,r.uniformNames.map((function(t){return"#define HAS_UNIFORM_"+t})))}return t},uo.prototype.getBinderAttributes=function(){var t=[];for(var e in this.binders){var r=this.binders[e];if(r instanceof oo||r instanceof so)for(var n=0;n<r.paintVertexAttributes.length;n++)t.push(r.paintVertexAttributes[n].name);else if(r instanceof lo)for(var i=0;i<Fa.members.length;i++)t.push(Fa.members[i].name)}return t},uo.prototype.getBinderUniforms=function(){var t=[];for(var e in this.binders){var r=this.binders[e];if(r instanceof io||r instanceof ao||r instanceof so)for(var n=0,i=r.uniformNames;n<i.length;n+=1){var a=i[n];t.push(a)}}return t},uo.prototype.getPaintVertexBuffers=function(){return this._buffers},uo.prototype.getUniforms=function(t,e){var r=[];for(var n in this.binders){var i=this.binders[n];if(i instanceof io||i instanceof ao||i instanceof so)for(var a=0,o=i.uniformNames;a<o.length;a+=1){var s=o[a];if(e[s]){var l=i.getBinding(t,e[s],s);r.push({name:s,property:n,binding:l})}}}return r},uo.prototype.setUniforms=function(t,e,r,n){for(var i=0,a=e;i<a.length;i+=1){var o=a[i],s=o.name,l=o.property,u=o.binding;this.binders[l].setUniform(u,n,r.get(l),s)}},uo.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var r=this.binders[e];if(t&&r instanceof lo){var n=2===t.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;n&&this._buffers.push(n)}else(r instanceof oo||r instanceof so)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},uo.prototype.upload=function(t){for(var e in this.binders){var r=this.binders[e];(r instanceof oo||r instanceof so||r instanceof lo)&&r.upload(t)}this.updatePaintBuffers()},uo.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof oo||e instanceof so||e instanceof lo)&&e.destroy()}};var co=function(t,e,r){void 0===r&&(r=function(){return!0}),this.programConfigurations={};for(var n=0,i=t;n<i.length;n+=1){var a=i[n];this.programConfigurations[a.id]=new uo(a,e,r)}this.needsUpload=!1,this._featureMap=new qa,this._bufferOffset=0};function ho(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function po(t,e,r){var n={color:{source:oa,composite:Ta},number:{source:ga,composite:oa}},i=function(t){return{"line-pattern":{source:sa,composite:sa},"fill-pattern":{source:sa,composite:sa},"fill-extrusion-pattern":{source:sa,composite:sa}}[t]}(t);return i&&i[r]||n[e][r]}co.prototype.populatePaintArrays=function(t,e,r,n,i,a){for(var o in this.programConfigurations)this.programConfigurations[o].populatePaintArrays(t,e,n,i,a);void 0!==e.id&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0},co.prototype.updatePaintArrays=function(t,e,r,n){for(var i=0,a=r;i<a.length;i+=1){var o=a[i];this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(t,this._featureMap,e,o,n)||this.needsUpload}},co.prototype.get=function(t){return this.programConfigurations[t]},co.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},co.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},oi("ConstantBinder",io),oi("CrossFadedConstantBinder",ao),oi("SourceExpressionBinder",oo),oi("CrossFadedCompositeBinder",lo),oi("CompositeExpressionBinder",so),oi("ProgramConfiguration",uo,{omit:["_buffers"]}),oi("ProgramConfigurationSet",co);var fo=8192,mo=Math.pow(2,14)-1,yo=-mo-1;function vo(t){for(var e=fo/t.extent,r=t.loadGeometry(),n=0;n<r.length;n++)for(var i=r[n],a=0;a<i.length;a++){var o=i[a],s=Math.round(o.x*e),l=Math.round(o.y*e);o.x=h(s,yo,mo),o.y=h(l,yo,mo),(s<o.x||s>o.x+1||l<o.y||l>o.y+1)&&k("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function go(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?vo(t):[]}}function _o(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var xo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new ra,this.indexArray=new ma,this.segments=new Oa,this.programConfigurations=new co(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function bo(t,e){for(var r=0;r<t.length;r++)if(Po(e,t[r]))return!0;for(var n=0;n<e.length;n++)if(Po(t,e[n]))return!0;return!!Mo(t,e)}function wo(t,e,r){return!!Po(t,e)||!!So(e,t,r)}function To(t,e){if(1===t.length)return Co(e,t[0]);for(var r=0;r<e.length;r++)for(var n=e[r],i=0;i<n.length;i++)if(Po(t,n[i]))return!0;for(var a=0;a<t.length;a++)if(Co(e,t[a]))return!0;for(var o=0;o<e.length;o++)if(Mo(t,e[o]))return!0;return!1}function ko(t,e,r){if(t.length>1){if(Mo(t,e))return!0;for(var n=0;n<e.length;n++)if(So(e[n],t,r))return!0}for(var i=0;i<t.length;i++)if(So(t[i],e,r))return!0;return!1}function Mo(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var n=t[r],i=t[r+1],a=0;a<e.length-1;a++)if(Ao(n,i,e[a],e[a+1]))return!0;return!1}function Ao(t,e,r,n){return M(t,r,n)!==M(e,r,n)&&M(t,e,r)!==M(t,e,n)}function So(t,e,r){var n=r*r;if(1===e.length)return t.distSqr(e[0])<n;for(var i=1;i<e.length;i++)if(Lo(t,e[i-1],e[i])<n)return!0;return!1}function Lo(t,e,r){var n=e.distSqr(r);if(0===n)return t.distSqr(e);var i=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n;return i<0?t.distSqr(e):i>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function Co(t,e){for(var r,n,i,a=!1,o=0;o<t.length;o++)for(var s=0,l=(r=t[o]).length-1;s<r.length;l=s++)n=r[s],i=r[l],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Po(t,e){for(var r=!1,n=0,i=t.length-1;n<t.length;i=n++){var a=t[n],o=t[i];a.y>e.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function Io(t,e,r){var n=r[0],i=r[2];if(t.x<n.x&&e.x<n.x||t.x>i.x&&e.x>i.x||t.y<n.y&&e.y<n.y||t.y>i.y&&e.y>i.y)return!1;var a=M(t,e,r[0]);return a!==M(t,e,r[1])||a!==M(t,e,r[2])||a!==M(t,e,r[3])}function Eo(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Do(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function zo(t,e,r,n,i){if(!e[0]&&!e[1])return t;var o=a.convert(e)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l<t.length;l++){var u=t[l];s.push(u.sub(o))}return s}xo.prototype.populate=function(t,e,r){var n=this.layers[0],i=[],a=null;"circle"===n.type&&(a=n.layout.get("circle-sort-key"));for(var o=0,s=t;o<s.length;o+=1){var l=s[o],u=l.feature,c=l.id,h=l.index,p=l.sourceLayerIndex,f=this.layers[0]._featureFilter.needGeometry,d=go(u,f);if(this.layers[0]._featureFilter.filter(new zi(this.zoom),d,r)){var m=a?a.evaluate(d,{},r):void 0,y={id:c,properties:u.properties,type:u.type,sourceLayerIndex:p,index:h,geometry:f?d.geometry:vo(u),patterns:{},sortKey:m};i.push(y)}}a&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var v=0,g=i;v<g.length;v+=1){var _=g[v],x=_,b=x.geometry,w=x.index,T=x.sourceLayerIndex,k=t[w].feature;this.addFeature(_,b,w,r),e.featureIndex.insert(k,b,w,T,this.index)}},xo.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},xo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},xo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},xo.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,za),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},xo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},xo.prototype.addFeature=function(t,e,r,n){for(var i=0,a=e;i<a.length;i+=1)for(var o=0,s=a[i];o<s.length;o+=1){var l=s[o],u=l.x,c=l.y;if(!(u<0||u>=fo||c<0||c>=fo)){var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),p=h.vertexLength;_o(this.layoutVertexArray,u,c,-1,-1),_o(this.layoutVertexArray,u,c,1,-1),_o(this.layoutVertexArray,u,c,1,1),_o(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(p,p+1,p+2),this.indexArray.emplaceBack(p,p+3,p+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},oi("CircleBucket",xo,{omit:["layers"]});var Oo=new Wi({"circle-sort-key":new Hi(Ft.layout_circle["circle-sort-key"])}),Ro={paint:new Wi({"circle-radius":new Hi(Ft.paint_circle["circle-radius"]),"circle-color":new Hi(Ft.paint_circle["circle-color"]),"circle-blur":new Hi(Ft.paint_circle["circle-blur"]),"circle-opacity":new Hi(Ft.paint_circle["circle-opacity"]),"circle-translate":new qi(Ft.paint_circle["circle-translate"]),"circle-translate-anchor":new qi(Ft.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new qi(Ft.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new qi(Ft.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Hi(Ft.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Hi(Ft.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Hi(Ft.paint_circle["circle-stroke-opacity"])}),layout:Oo},Fo="undefined"!=typeof Float32Array?Float32Array:Array;function Bo(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function No(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],m=e[12],y=e[13],v=e[14],g=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*n+x*s+b*h+w*m,t[1]=_*i+x*l+b*p+w*y,t[2]=_*a+x*u+b*f+w*v,t[3]=_*o+x*c+b*d+w*g,_=r[4],x=r[5],b=r[6],w=r[7],t[4]=_*n+x*s+b*h+w*m,t[5]=_*i+x*l+b*p+w*y,t[6]=_*a+x*u+b*f+w*v,t[7]=_*o+x*c+b*d+w*g,_=r[8],x=r[9],b=r[10],w=r[11],t[8]=_*n+x*s+b*h+w*m,t[9]=_*i+x*l+b*p+w*y,t[10]=_*a+x*u+b*f+w*v,t[11]=_*o+x*c+b*d+w*g,_=r[12],x=r[13],b=r[14],w=r[15],t[12]=_*n+x*s+b*h+w*m,t[13]=_*i+x*l+b*p+w*y,t[14]=_*a+x*u+b*f+w*v,t[15]=_*o+x*c+b*d+w*g,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var Uo=No;var jo,Vo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};function qo(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}jo=new Fo(3),Fo!=Float32Array&&(jo[0]=0,jo[1]=0,jo[2]=0),function(){var t=new Fo(4);Fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var Ho=function(t){var e=t[0],r=t[1];return e*e+r*r},Go=(function(){var t=new Fo(2);Fo!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,Ro)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new xo(t)},e.prototype.queryRadius=function(t){var e=t;return Eo("circle-radius",this,e)+Eo("circle-stroke-width",this,e)+Do(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=zo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),c="map"===this.paint.get("circle-pitch-alignment"),h=c?l:function(t,e){return t.map((function(t){return Zo(t,e)}))}(l,s),p=c?u*o:u,f=0,d=n;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var v=y[m],g=c?v:Zo(v,s),_=p,x=qo([],[v.x,v.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?_*=x[3]/a.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(_*=a.cameraToCenterDistance/x[3]),wo(h,g,_))return!0}return!1},e}(Ji));function Zo(t,e){var r=qo([],[t.x,t.y,0,1],e);return new a(r[0]/r[3],r[1]/r[3])}var Yo=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xo);function Wo(t,e,r,n){var i=e.width,a=e.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==i*a*r)throw new RangeError("mismatched image size")}else n=new Uint8Array(i*a*r);return t.width=i,t.height=a,t.data=n,t}function Xo(t,e,r){var n=e.width,i=e.height;if(n!==t.width||i!==t.height){var a=Wo({},{width:n,height:i},r);Jo(t,a,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,n),height:Math.min(t.height,i)},r),t.width=n,t.height=i,t.data=a.data}}function Jo(t,e,r,n,i,a){if(0===i.width||0===i.height)return e;if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=t.data,s=e.data,l=0;l<i.height;l++)for(var u=((r.y+l)*t.width+r.x)*a,c=((n.y+l)*e.width+n.x)*a,h=0;h<i.width*a;h++)s[c+h]=o[u+h];return e}oi("HeatmapBucket",Yo,{omit:["layers"]});var Ko=function(t,e){Wo(this,t,1,e)};Ko.prototype.resize=function(t){Xo(this,t,1)},Ko.prototype.clone=function(){return new Ko({width:this.width,height:this.height},new Uint8Array(this.data))},Ko.copy=function(t,e,r,n,i){Jo(t,e,r,n,i,1)};var Qo=function(t,e){Wo(this,t,4,e)};Qo.prototype.resize=function(t){Xo(this,t,4)},Qo.prototype.replace=function(t,e){e?this.data.set(t):t instanceof Uint8ClampedArray?this.data=new Uint8Array(t.buffer):this.data=t},Qo.prototype.clone=function(){return new Qo({width:this.width,height:this.height},new Uint8Array(this.data))},Qo.copy=function(t,e,r,n,i){Jo(t,e,r,n,i,4)},oi("AlphaImage",Ko),oi("RGBAImage",Qo);var $o={paint:new Wi({"heatmap-radius":new Hi(Ft.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Hi(Ft.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new qi(Ft.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Yi(Ft.paint_heatmap["heatmap-color"]),"heatmap-opacity":new qi(Ft.paint_heatmap["heatmap-opacity"])})};function ts(t){var e={},r=t.resolution||256,n=t.clips?t.clips.length:1,i=t.image||new Qo({width:r,height:n}),a=function(r,n,a){e[t.evaluationKey]=a;var o=t.expression.evaluate(e);i.data[r+n+0]=Math.floor(255*o.r/o.a),i.data[r+n+1]=Math.floor(255*o.g/o.a),i.data[r+n+2]=Math.floor(255*o.b/o.a),i.data[r+n+3]=Math.floor(255*o.a)};if(t.clips)for(var o=0,s=0;o<n;++o,s+=4*r)for(var l=0,u=0;l<r;l++,u+=4){var c=l/(r-1),h=t.clips[o];a(s,u,h.start*(1-c)+h.end*c)}else for(var p=0,f=0;p<r;p++,f+=4)a(0,f,p/(r-1));return i}var es=function(t){function e(e){t.call(this,e,$o),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Yo(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=ts({expression:t,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(Ji),rs={paint:new Wi({"hillshade-illumination-direction":new qi(Ft.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new qi(Ft.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new qi(Ft.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new qi(Ft.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new qi(Ft.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new qi(Ft.paint_hillshade["hillshade-accent-color"])})},ns=function(t){function e(e){t.call(this,e,rs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(Ji),is=ta([{name:"a_pos",components:2,type:"Int16"}],4).members,as=ss,os=ss;function ss(t,e,r){r=r||2;var n,i,a,o,s,l,u,c=e&&e.length,h=c?e[0]*r:t.length,p=ls(t,0,h,r,!0),f=[];if(!p||p.next===p.prev)return f;if(c&&(p=function(t,e,r,n){var i,a,o,s=[];for(i=0,a=e.length;i<a;i++)(o=ls(t,e[i]*n,i<a-1?e[i+1]*n:t.length,n,!1))===o.next&&(o.steiner=!0),s.push(_s(o));for(s.sort(ms),i=0;i<s.length;i++)ys(s[i],r),r=us(r,r.next);return r}(t,e,p,r)),t.length>80*r){n=a=t[0],i=o=t[1];for(var d=r;d<h;d+=r)(s=t[d])<n&&(n=s),(l=t[d+1])<i&&(i=l),s>a&&(a=s),l>o&&(o=l);u=0!==(u=Math.max(a-n,o-i))?1/u:0}return cs(p,f,r,n,i,u),f}function ls(t,e,r,n,i){var a,o;if(i===Es(t,e,r,n)>0)for(a=e;a<r;a+=n)o=Cs(a,t[a],t[a+1],o);else for(a=r-n;a>=e;a-=n)o=Cs(a,t[a],t[a+1],o);return o&&Ts(o,o.next)&&(Ps(o),o=o.next),o}function us(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Ts(n,n.next)&&0!==ws(n.prev,n,n.next))n=n.next;else{if(Ps(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function cs(t,e,r,n,i,a,o){if(t){!o&&a&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=gs(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ);e++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(t,n,i,a);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?ps(t,n,i,a):hs(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Ps(t),t=l.next,u=l.next;else if((t=l)===u){o?1===o?cs(t=fs(us(t),e,r),e,r,n,i,a,2):2===o&&ds(t,e,r,n,i,a):cs(us(t),e,r,n,i,a,1);break}}}function hs(t){var e=t.prev,r=t,n=t.next;if(ws(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(xs(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&ws(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function ps(t,e,r,n){var i=t.prev,a=t,o=t.next;if(ws(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,u=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=gs(s,l,e,r,n),p=gs(u,c,e,r,n),f=t.prevZ,d=t.nextZ;f&&f.z>=h&&d&&d.z<=p;){if(f!==t.prev&&f!==t.next&&xs(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&ws(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&xs(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ws(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=h;){if(f!==t.prev&&f!==t.next&&xs(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&ws(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&xs(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ws(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function fs(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!Ts(i,a)&&ks(i,n,n.next,a)&&Ss(i,a)&&Ss(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),Ps(n),Ps(n.next),n=t=a),n=n.next}while(n!==t);return us(n)}function ds(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&bs(o,s)){var l=Ls(o,s);return o=us(o,o.next),l=us(l,l.next),cs(o,e,r,n,i,a),void cs(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function ms(t,e){return t.x-e.x}function ys(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!r)return null;if(i===o)return r;var l,u=r,c=r.x,h=r.y,p=1/0;n=r;do{i>=n.x&&n.x>=c&&i!==n.x&&xs(a<h?i:o,a,c,h,a<h?o:i,a,n.x,n.y)&&(l=Math.abs(a-n.y)/(i-n.x),Ss(n,t)&&(l<p||l===p&&(n.x>r.x||n.x===r.x&&vs(r,n)))&&(r=n,p=l)),n=n.next}while(n!==u);return r}(t,e)){var r=Ls(e,t);us(e,e.next),us(r,r.next)}}function vs(t,e){return ws(t.prev,t,e.prev)<0&&ws(e.next,t,t.next)<0}function gs(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function _s(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function xs(t,e,r,n,i,a,o,s){return(i-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function bs(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&ks(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(Ss(t,e)&&Ss(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(ws(t.prev,t,e.prev)||ws(t,e.prev,e))||Ts(t,e)&&ws(t.prev,t,t.next)>0&&ws(e.prev,e,e.next)>0)}function ws(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Ts(t,e){return t.x===e.x&&t.y===e.y}function ks(t,e,r,n){var i=As(ws(t,e,r)),a=As(ws(t,e,n)),o=As(ws(r,n,t)),s=As(ws(r,n,e));return i!==a&&o!==s||!(0!==i||!Ms(t,r,e))||!(0!==a||!Ms(t,n,e))||!(0!==o||!Ms(r,t,n))||!(0!==s||!Ms(r,e,n))}function Ms(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function As(t){return t>0?1:t<0?-1:0}function Ss(t,e){return ws(t.prev,t,t.next)<0?ws(t,e,t.next)>=0&&ws(t,t.prev,e)>=0:ws(t,e,t.prev)<0||ws(t,t.next,e)<0}function Ls(t,e){var r=new Is(t.i,t.x,t.y),n=new Is(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Cs(t,e,r,n){var i=new Is(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ps(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Is(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Es(t,e,r,n){for(var i=0,a=e,o=r-n;a<r;a+=n)i+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return i}function Ds(t,e,r,n,i){zs(t,e,r||0,n||t.length-1,i||Rs)}function zs(t,e,r,n,i){for(;n>r;){if(n-r>600){var a=n-r+1,o=e-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);zs(t,e,Math.max(r,Math.floor(e-o*l/a+u)),Math.min(n,Math.floor(e+(a-o)*l/a+u)),i)}var c=t[e],h=r,p=n;for(Os(t,r,e),i(t[n],c)>0&&Os(t,r,n);h<p;){for(Os(t,h,p),h++,p--;i(t[h],c)<0;)h++;for(;i(t[p],c)>0;)p--}0===i(t[r],c)?Os(t,r,p):Os(t,++p,n),p<=e&&(r=p+1),e<=p&&(n=p-1)}}function Os(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Rs(t,e){return t<e?-1:t>e?1:0}function Fs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o<r;o++){var s=A(t[o]);0!==s&&(t[o].area=Math.abs(s),void 0===i&&(i=s<0),i===s<0?(n&&a.push(n),n=[t[o]]):n.push(t[o]))}if(n&&a.push(n),e>1)for(var l=0;l<a.length;l++)a[l].length<=e||(Ds(a[l],e,1,a[l].length-1,Bs),a[l]=a[l].slice(0,e));return a}function Bs(t,e){return e.area-t.area}function Ns(t,e,r){for(var n=r.patternDependencies,i=!1,a=0,o=e;a<o.length;a+=1){var s=o[a].paint.get(t+"-pattern");s.isConstant()||(i=!0);var l=s.constantOr(null);l&&(i=!0,n[l.to]=!0,n[l.from]=!0)}return i}function Us(t,e,r,n,i){for(var a=i.patternDependencies,o=0,s=e;o<s.length;o+=1){var l=s[o],u=l.paint.get(t+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:n-1},r,{},i.availableImages),h=u.evaluate({zoom:n},r,{},i.availableImages),p=u.evaluate({zoom:n+1},r,{},i.availableImages);c=c&&c.name?c.name:c,h=h&&h.name?h.name:h,p=p&&p.name?p.name:p,a[c]=!0,a[h]=!0,a[p]=!0,r.patterns[l.id]={min:c,mid:h,max:p}}}return r}ss.deviation=function(t,e,r,n){var i=e&&e.length,a=i?e[0]*r:t.length,o=Math.abs(Es(t,0,a,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;o-=Math.abs(Es(t,u,c,r))}var h=0;for(s=0;s<n.length;s+=3){var p=n[s]*r,f=n[s+1]*r,d=n[s+2]*r;h+=Math.abs((t[p]-t[d])*(t[f+1]-t[p+1])-(t[p]-t[f])*(t[d+1]-t[p+1]))}return 0===o&&0===h?0:Math.abs((h-o)/o)},ss.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var a=0;a<t[i].length;a++)for(var o=0;o<e;o++)r.vertices.push(t[i][a][o]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r},as.default=os;var js=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ra,this.indexArray=new ma,this.indexArray2=new ba,this.programConfigurations=new co(t.layers,t.zoom),this.segments=new Oa,this.segments2=new Oa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};js.prototype.populate=function(t,e,r){this.hasPattern=Ns("fill",this.layers,e);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=t;a<o.length;a+=1){var s=o[a],l=s.feature,u=s.id,c=s.index,h=s.sourceLayerIndex,p=this.layers[0]._featureFilter.needGeometry,f=go(l,p);if(this.layers[0]._featureFilter.filter(new zi(this.zoom),f,r)){var d=n?n.evaluate(f,{},r,e.availableImages):void 0,m={id:u,properties:l.properties,type:l.type,sourceLayerIndex:h,index:c,geometry:p?f.geometry:vo(l),patterns:{},sortKey:d};i.push(m)}}n&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var y=0,v=i;y<v.length;y+=1){var g=v[y],_=g,x=_.geometry,b=_.index,w=_.sourceLayerIndex;if(this.hasPattern){var T=Us("fill",this.layers,g,this.zoom,e);this.patternFeatures.push(T)}else this.addFeature(g,x,b,r,{});var k=t[b].feature;e.featureIndex.insert(k,x,b,w,this.index)}},js.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},js.prototype.addFeatures=function(t,e,r){for(var n=0,i=this.patternFeatures;n<i.length;n+=1){var a=i[n];this.addFeature(a,a.geometry,a.index,e,r)}},js.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},js.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},js.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,is),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},js.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},js.prototype.addFeature=function(t,e,r,n,i){for(var a=0,o=Fs(e,500);a<o.length;a+=1){for(var s=o[a],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var h=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),p=h.vertexLength,f=[],d=[],m=0,y=s;m<y.length;m+=1){var v=y[m];if(0!==v.length){v!==s[0]&&d.push(f.length/2);var g=this.segments2.prepareSegment(v.length,this.layoutVertexArray,this.indexArray2),_=g.vertexLength;this.layoutVertexArray.emplaceBack(v[0].x,v[0].y),this.indexArray2.emplaceBack(_+v.length-1,_),f.push(v[0].x),f.push(v[0].y);for(var x=1;x<v.length;x++)this.layoutVertexArray.emplaceBack(v[x].x,v[x].y),this.indexArray2.emplaceBack(_+x-1,_+x),f.push(v[x].x),f.push(v[x].y);g.vertexLength+=v.length,g.primitiveLength+=v.length}}for(var b=as(f,d),w=0;w<b.length;w+=3)this.indexArray.emplaceBack(p+b[w],p+b[w+1],p+b[w+2]);h.vertexLength+=l,h.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,n)},oi("FillBucket",js,{omit:["layers","patternFeatures"]});var Vs=new Wi({"fill-sort-key":new Hi(Ft.layout_fill["fill-sort-key"])}),qs={paint:new Wi({"fill-antialias":new qi(Ft.paint_fill["fill-antialias"]),"fill-opacity":new Hi(Ft.paint_fill["fill-opacity"]),"fill-color":new Hi(Ft.paint_fill["fill-color"]),"fill-outline-color":new Hi(Ft.paint_fill["fill-outline-color"]),"fill-translate":new qi(Ft.paint_fill["fill-translate"]),"fill-translate-anchor":new qi(Ft.paint_fill["fill-translate-anchor"]),"fill-pattern":new Gi(Ft.paint_fill["fill-pattern"])}),layout:Vs},Hs=function(t){function e(e){t.call(this,e,qs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r);var n=this.paint._values["fill-outline-color"];"constant"===n.value.kind&&void 0===n.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new js(t)},e.prototype.queryRadius=function(){return Do(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o){return To(zo(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),a.angle,o),n)},e.prototype.isTileClipped=function(){return!0},e}(Ji),Gs=ta([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Zs=Ys;function Ys(t,e,r,n,i){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=n,this._values=i,t.readFields(Ws,this,e)}function Ws(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var n=e._keys[t.readVarint()],i=e._values[t.readVarint()];e.properties[n]=i}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function Xs(t){for(var e,r,n=0,i=0,a=t.length,o=a-1;i<a;o=i++)e=t[i],n+=((r=t[o]).x-e.x)*(e.y+r.y);return n}Ys.types=["Unknown","Point","LineString","Polygon"],Ys.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,n=1,i=0,o=0,s=0,l=[];t.pos<r;){if(i<=0){var u=t.readVarint();n=7&u,i=u>>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Ys.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(n<=0){var c=t.readVarint();r=7&c,n=c>>3}if(n--,1===r||2===r)(i+=t.readSVarint())<o&&(o=i),i>s&&(s=i),(a+=t.readSVarint())<l&&(l=a),a>u&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},Ys.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=Ys.types[this.type];function c(t){for(var e=0;e<t.length;e++){var r=t[e],n=180-360*(r.y+s)/a;t[e]=[360*(r.x+o)/a-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(n=0;n<l.length;n++)h[n]=l[n][0];c(l=h);break;case 2:for(n=0;n<l.length;n++)c(l[n]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,n,i=[],a=0;a<e;a++){var o=Xs(t[a]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&i.push(r),r=[t[a]]):r.push(t[a]))}return r&&i.push(r),i}(l),n=0;n<l.length;n++)for(i=0;i<l[n].length;i++)c(l[n][i])}1===l.length?l=l[0]:u="Multi"+u;var p={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(p.id=this.id),p};var Js=Ks;function Ks(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Qs,this,e),this.length=this._features.length}function Qs(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function $s(t,e,r){if(3===t){var n=new Js(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ks.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Zs(this._pbf,e,this.extent,this._keys,this._values)};var tl={VectorTile:function(t,e){this.layers=t.readFields($s,{},e)},VectorTileFeature:Zs,VectorTileLayer:Js},el=tl.VectorTileFeature.types,rl=Math.pow(2,13);function nl(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*rl)+o,i*rl*2,a*rl*2,Math.round(s))}var il=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new ia,this.indexArray=new ma,this.programConfigurations=new co(t.layers,t.zoom),this.segments=new Oa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function al(t,e){return t.x===e.x&&(t.x<0||t.x>fo)||t.y===e.y&&(t.y<0||t.y>fo)}il.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=Ns("fill-extrusion",this.layers,e);for(var n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.feature,s=a.id,l=a.index,u=a.sourceLayerIndex,c=this.layers[0]._featureFilter.needGeometry,h=go(o,c);if(this.layers[0]._featureFilter.filter(new zi(this.zoom),h,r)){var p={id:s,sourceLayerIndex:u,index:l,geometry:c?h.geometry:vo(o),properties:o.properties,type:o.type,patterns:{}};this.hasPattern?this.features.push(Us("fill-extrusion",this.layers,p,this.zoom,e)):this.addFeature(p,p.geometry,l,r,{}),e.featureIndex.insert(o,p.geometry,l,u,this.index,!0)}}},il.prototype.addFeatures=function(t,e,r){for(var n=0,i=this.features;n<i.length;n+=1){var a=i[n],o=a.geometry;this.addFeature(a,o,a.index,e,r)}},il.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},il.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},il.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},il.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Gs),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},il.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},il.prototype.addFeature=function(t,e,r,n,i){for(var a=0,o=Fs(e,500);a<o.length;a+=1){for(var s=o[a],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),p=0,f=s;p<f.length;p+=1){var d=f[p];if(0!==d.length&&!((E=d).every((function(t){return t.x<0}))||E.every((function(t){return t.x>fo}))||E.every((function(t){return t.y<0}))||E.every((function(t){return t.y>fo}))))for(var m=0,y=0;y<d.length;y++){var v=d[y];if(y>=1){var g=d[y-1];if(!al(v,g)){h.vertexLength+4>Oa.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=v.sub(g)._perp()._unit(),x=g.dist(v);m+x>32768&&(m=0),nl(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,0,m),nl(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,1,m),m+=x,nl(this.layoutVertexArray,g.x,g.y,_.x,_.y,0,0,m),nl(this.layoutVertexArray,g.x,g.y,_.x,_.y,0,1,m);var b=h.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),h.vertexLength+=4,h.primitiveLength+=2}}}}if(h.vertexLength+l>Oa.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===el[t.type]){for(var w=[],T=[],k=h.vertexLength,M=0,A=s;M<A.length;M+=1){var S=A[M];if(0!==S.length){S!==s[0]&&T.push(w.length/2);for(var L=0;L<S.length;L++){var C=S[L];nl(this.layoutVertexArray,C.x,C.y,0,0,1,1,0),w.push(C.x),w.push(C.y)}}}for(var P=as(w,T),I=0;I<P.length;I+=3)this.indexArray.emplaceBack(k+P[I],k+P[I+2],k+P[I+1]);h.primitiveLength+=P.length/3,h.vertexLength+=l}}var E;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,n)},oi("FillExtrusionBucket",il,{omit:["layers","features"]});var ol={paint:new Wi({"fill-extrusion-opacity":new qi(Ft["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Hi(Ft["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new qi(Ft["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new qi(Ft["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Gi(Ft["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Hi(Ft["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Hi(Ft["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new qi(Ft["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},sl=function(t){function e(e){t.call(this,e,ol)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new il(t)},e.prototype.queryRadius=function(){return Do(this.paint.get("fill-extrusion-translate"))},e.prototype.is3D=function(){return!0},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,s,l){var u=zo(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,r),h=this.paint.get("fill-extrusion-base").evaluate(e,r),p=function(t,e,r,n){for(var i=[],o=0,s=t;o<s.length;o+=1){var l=s[o],u=[l.x,l.y,n,1];qo(u,u,e),i.push(new a(u[0]/u[3],u[1]/u[3]))}return i}(u,l,0,0),f=function(t,e,r,n){for(var i=[],o=[],s=n[8]*e,l=n[9]*e,u=n[10]*e,c=n[11]*e,h=n[8]*r,p=n[9]*r,f=n[10]*r,d=n[11]*r,m=0,y=t;m<y.length;m+=1){for(var v=[],g=[],_=0,x=y[m];_<x.length;_+=1){var b=x[_],w=b.x,T=b.y,k=n[0]*w+n[4]*T+n[12],M=n[1]*w+n[5]*T+n[13],A=n[2]*w+n[6]*T+n[14],S=n[3]*w+n[7]*T+n[15],L=A+u,C=S+c,P=k+h,I=M+p,E=A+f,D=S+d,z=new a((k+s)/C,(M+l)/C);z.z=L/C,v.push(z);var O=new a(P/D,I/D);O.z=E/D,g.push(O)}i.push(v),o.push(g)}return[i,o]}(n,h,c,l);return function(t,e,r){var n=1/0;To(r,e)&&(n=ul(r,e[0]));for(var i=0;i<e.length;i++)for(var a=e[i],o=t[i],s=0;s<a.length-1;s++){var l=a[s],u=a[s+1],c=o[s],h=[l,u,o[s+1],c,l];bo(r,h)&&(n=Math.min(n,ul(r,h)))}return n!==1/0&&n}(f[0],f[1],p)},e}(Ji);function ll(t,e){return t.x*e.x+t.y*e.y}function ul(t,e){if(1===t.length){for(var r,n=0,i=e[n++];!r||i.equals(r);)if(!(r=e[n++]))return 1/0;for(;n<e.length;n++){var a=e[n],o=t[0],s=r.sub(i),l=a.sub(i),u=o.sub(i),c=ll(s,s),h=ll(s,l),p=ll(l,l),f=ll(u,s),d=ll(u,l),m=c*p-h*h,y=(p*f-h*d)/m,v=(c*d-h*f)/m,g=1-y-v,_=i.z*g+r.z*y+a.z*v;if(isFinite(_))return _}return 1/0}for(var x=1/0,b=0,w=e;b<w.length;b+=1){var T=w[b];x=Math.min(x,T.z)}return x}var cl=ta([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,hl=ta([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,pl=tl.VectorTileFeature.types,fl=Math.cos(Math.PI/180*37.5),dl=Math.pow(2,14)/.5,ml=function(t){var e=this;this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((function(t){e.gradients[t.id]={}})),this.layoutVertexArray=new aa,this.layoutVertexArray2=new oa,this.indexArray=new ma,this.programConfigurations=new co(t.layers,t.zoom),this.segments=new Oa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ml.prototype.populate=function(t,e,r){this.hasPattern=Ns("line",this.layers,e);for(var n=this.layers[0].layout.get("line-sort-key"),i=[],a=0,o=t;a<o.length;a+=1){var s=o[a],l=s.feature,u=s.id,c=s.index,h=s.sourceLayerIndex,p=this.layers[0]._featureFilter.needGeometry,f=go(l,p);if(this.layers[0]._featureFilter.filter(new zi(this.zoom),f,r)){var d=n?n.evaluate(f,{},r):void 0,m={id:u,properties:l.properties,type:l.type,sourceLayerIndex:h,index:c,geometry:p?f.geometry:vo(l),patterns:{},sortKey:d};i.push(m)}}n&&i.sort((function(t,e){return t.sortKey-e.sortKey}));for(var y=0,v=i;y<v.length;y+=1){var g=v[y],_=g,x=_.geometry,b=_.index,w=_.sourceLayerIndex;if(this.hasPattern){var T=Us("line",this.layers,g,this.zoom,e);this.patternFeatures.push(T)}else this.addFeature(g,x,b,r,{});var k=t[b].feature;e.featureIndex.insert(k,x,b,w,this.index)}},ml.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},ml.prototype.addFeatures=function(t,e,r){for(var n=0,i=this.patternFeatures;n<i.length;n+=1){var a=i[n];this.addFeature(a,a.geometry,a.index,e,r)}},ml.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ml.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ml.prototype.upload=function(t){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,hl)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,cl),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},ml.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ml.prototype.lineFeatureClips=function(t){if(t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}},ml.prototype.addFeature=function(t,e,r,n,i){var a=this.layers[0].layout,o=a.get("line-join").evaluate(t,{}),s=a.get("line-cap"),l=a.get("line-miter-limit"),u=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(var c=0,h=e;c<h.length;c+=1){var p=h[c];this.addLine(p,t,o,s,l,u)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i,n)},ml.prototype.addLine=function(t,e,r,n,i,a){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var o=0;o<t.length-1;o++)this.totalDistance+=t[o].dist(t[o+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var s="Polygon"===pl[e.type],l=t.length;l>=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u<l-1&&t[u].equals(t[u+1]);)u++;if(!(l<(s?3:2))){"bevel"===r&&(i=1.05);var c,h=this.overscaling<=16?15*fo/(512*this.overscaling):0,p=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray),f=void 0,d=void 0,m=void 0,y=void 0;this.e1=this.e2=-1,s&&(c=t[l-2],y=t[u].sub(c)._unit()._perp());for(var v=u;v<l;v++)if(!(d=v===l-1?s?t[u+1]:void 0:t[v+1])||!t[v].equals(d)){y&&(m=y),c&&(f=c),c=t[v],y=d?d.sub(c)._unit()._perp():m;var g=(m=m||y).add(y);0===g.x&&0===g.y||g._unit();var _=m.x*y.x+m.y*y.y,x=g.x*y.x+g.y*y.y,b=0!==x?1/x:1/0,w=2*Math.sqrt(2-2*x),T=x<fl&&f&&d,k=m.x*y.y-m.y*y.x>0;if(T&&v>u){var M=c.dist(f);if(M>2*h){var A=c.sub(c.sub(f)._mult(h/M)._round());this.updateDistance(f,A),this.addCurrentVertex(A,m,0,0,p),f=A}}var S=f&&d,L=S?r:s?"butt":n;if(S&&"round"===L&&(b<a?L="miter":b<=2&&(L="fakeround")),"miter"===L&&b>i&&(L="bevel"),"bevel"===L&&(b>2&&(L="flipbevel"),b<i&&(L="miter")),f&&this.updateDistance(f,c),"miter"===L)g._mult(b),this.addCurrentVertex(c,g,0,0,p);else if("flipbevel"===L){if(b>100)g=y.mult(-1);else{var C=b*m.add(y).mag()/m.sub(y).mag();g._perp()._mult(C*(k?-1:1))}this.addCurrentVertex(c,g,0,0,p),this.addCurrentVertex(c,g.mult(-1),0,0,p)}else if("bevel"===L||"fakeround"===L){var P=-Math.sqrt(b*b-1),I=k?P:0,E=k?0:P;if(f&&this.addCurrentVertex(c,m,I,E,p),"fakeround"===L)for(var D=Math.round(180*w/Math.PI/20),z=1;z<D;z++){var O=z/D;if(.5!==O){var R=O-.5;O+=O*R*(O-1)*((1.0904+_*(_*(3.55645-1.43519*_)-3.2452))*R*R+(.848013+_*(.215638*_-1.06021)))}var F=y.sub(m)._mult(O)._add(m)._unit()._mult(k?-1:1);this.addHalfVertex(c,F.x,F.y,!1,k,0,p)}d&&this.addCurrentVertex(c,y,-I,-E,p)}else if("butt"===L)this.addCurrentVertex(c,g,0,0,p);else if("square"===L){var B=f?1:-1;this.addCurrentVertex(c,g,B,B,p)}else"round"===L&&(f&&(this.addCurrentVertex(c,m,0,0,p),this.addCurrentVertex(c,m,1,1,p,!0)),d&&(this.addCurrentVertex(c,y,-1,-1,p,!0),this.addCurrentVertex(c,y,0,0,p)));if(T&&v<l-1){var N=c.dist(d);if(N>2*h){var U=c.add(d.sub(c)._mult(h/N)._round());this.updateDistance(c,U),this.addCurrentVertex(U,y,0,0,p),c=U}}}}},ml.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,u=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,u,a,!0,-n,i),this.distance>dl/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},ml.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,u=.5*(this.lineClips?this.scaledDistance*(dl-1):this.scaledDistance);if(this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&u)<<2,u>>6),this.lineClips){var c=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(c,this.lineClipsArray.length)}var h=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,h),o.primitiveLength++),i?this.e2=h:this.e1=h},ml.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},ml.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},oi("LineBucket",ml,{omit:["layers","patternFeatures"]});var yl=new Wi({"line-cap":new qi(Ft.layout_line["line-cap"]),"line-join":new Hi(Ft.layout_line["line-join"]),"line-miter-limit":new qi(Ft.layout_line["line-miter-limit"]),"line-round-limit":new qi(Ft.layout_line["line-round-limit"]),"line-sort-key":new Hi(Ft.layout_line["line-sort-key"])}),vl={paint:new Wi({"line-opacity":new Hi(Ft.paint_line["line-opacity"]),"line-color":new Hi(Ft.paint_line["line-color"]),"line-translate":new qi(Ft.paint_line["line-translate"]),"line-translate-anchor":new qi(Ft.paint_line["line-translate-anchor"]),"line-width":new Hi(Ft.paint_line["line-width"]),"line-gap-width":new Hi(Ft.paint_line["line-gap-width"]),"line-offset":new Hi(Ft.paint_line["line-offset"]),"line-blur":new Hi(Ft.paint_line["line-blur"]),"line-dasharray":new Zi(Ft.paint_line["line-dasharray"]),"line-pattern":new Gi(Ft.paint_line["line-pattern"]),"line-gradient":new Yi(Ft.paint_line["line-gradient"])}),layout:yl},gl=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new zi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=f({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Hi),_l=new gl(vl.paint.properties["line-width"].specification);_l.useIntegerZoom=!0;var xl=function(t){function e(e){t.call(this,e,vl),this.gradientVersion=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){if("line-gradient"===t){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=e._styleExpression.expression instanceof tr,this.gradientVersion=(this.gradientVersion+1)%l}},e.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=_l.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new ml(t)},e.prototype.queryRadius=function(t){var e=t,r=bl(Eo("line-width",this,e),Eo("line-gap-width",this,e)),n=Eo("line-offset",this,e);return r/2+Math.abs(n)+Do(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,s){var l=zo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),u=s/2*bl(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),c=this.paint.get("line-offset").evaluate(e,r);return c&&(n=function(t,e){for(var r=[],n=new a(0,0),i=0;i<t.length;i++){for(var o=t[i],s=[],l=0;l<o.length;l++){var u=o[l-1],c=o[l],h=o[l+1],p=0===l?n:c.sub(u)._unit()._perp(),f=l===o.length-1?n:h.sub(c)._unit()._perp(),d=p._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(c))}r.push(s)}return r}(n,c*s)),function(t,e,r){for(var n=0;n<e.length;n++){var i=e[n];if(t.length>=3)for(var a=0;a<i.length;a++)if(Po(t,i[a]))return!0;if(ko(t,i,r))return!0}return!1}(l,n,u)},e.prototype.isTileClipped=function(){return!0},e}(Ji);function bl(t,e){return e>0?e+2*t:t}var wl=ta([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Tl=ta([{name:"a_projected_pos",components:3,type:"Float32"}],4),kl=(ta([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ta([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Ml=(ta([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),ta([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Al=ta([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Sl(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),Di.applyArabicShaping&&(t=Di.applyArabicShaping(t)),t}(t.text,e,r)})),t}ta([{name:"triangle",components:3,type:"Uint16"}]),ta([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ta([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),ta([{type:"Float32",name:"offsetX"}]),ta([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Ll={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Cl=24,Pl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,h=r?i-1:0,p=r?-1:1,f=t[e+h];for(h+=p,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+t[e+h],h+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+h],h+=p,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),a-=u}return(f?-1:1)*o*Math.pow(2,a-n)},Il=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,h=c>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(e*l-1)*Math.pow(2,i),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+f]=255&s,f+=d,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[r+f]=255&o,f+=d,o/=256,u-=8);t[r+f-d]|=128*m},El=Dl;function Dl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Dl.Varint=0,Dl.Fixed64=1,Dl.Bytes=2,Dl.Fixed32=5;var zl=4294967296,Ol=1/zl,Rl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Fl(t){return t.type===Dl.Bytes?t.readVarint()+t.pos:t.pos+1}function Bl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Nl(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Ul(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function jl(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function Vl(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function ql(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function Hl(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function Gl(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function Zl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function Yl(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function Wl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function Xl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Jl(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function Kl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Dl.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Xl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Kl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Xl(this.buf,this.pos)+Xl(this.buf,this.pos+4)*zl;return this.pos+=8,t},readSFixed64:function(){var t=Xl(this.buf,this.pos)+Kl(this.buf,this.pos+4)*zl;return this.pos+=8,t},readFloat:function(){var t=Pl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Pl(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return Bl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return Bl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return Bl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return Bl(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return Bl(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return Bl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Rl?function(t,e,r){return Rl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n="",i=e;i<r;){var a,o,s,l=t[i],u=null,c=l>239?4:l>223?3:l>191?2:1;if(i+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(a=t[i+1]))&&(u=(31&l)<<6|63&a)<=127&&(u=null):3===c?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((u=(15&l)<<12|(63&a)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),i+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Dl.Bytes)return t.push(this.readVarint(e));var r=Fl(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Dl.Bytes)return t.push(this.readSVarint());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Dl.Bytes)return t.push(this.readBoolean());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Dl.Bytes)return t.push(this.readFloat());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Dl.Bytes)return t.push(this.readDouble());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Dl.Bytes)return t.push(this.readFixed32());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Dl.Bytes)return t.push(this.readSFixed32());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Dl.Bytes)return t.push(this.readFixed64());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Dl.Bytes)return t.push(this.readSFixed64());var e=Fl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Dl.Varint)for(;this.buf[this.pos++]>127;);else if(e===Dl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Dl.Fixed32)this.pos+=4;else{if(e!==Dl.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Jl(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Jl(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Jl(this.buf,-1&t,this.pos),Jl(this.buf,Math.floor(t*Ol),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Jl(this.buf,-1&t,this.pos),Jl(this.buf,Math.floor(t*Ol),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a<e.length;a++){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Nl(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Il(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var n=this.pos-r;n>=128&&Nl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,Dl.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Ul,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,jl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Hl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Vl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,ql,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Gl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Zl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Wl,e)},writeBytesField:function(t,e){this.writeTag(t,Dl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Dl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Dl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Dl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Dl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Dl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Dl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Dl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Dl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Dl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Ql=3;function $l(t,e,r){1===t&&r.readMessage(tu,e)}function tu(t,e,r){if(3===t){var n=r.readMessage(eu,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,u=n.top,c=n.advance;e.push({id:i,bitmap:new Ko({width:o+2*Ql,height:s+2*Ql},a),metrics:{width:o,height:s,left:l,top:u,advance:c}})}}function eu(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var ru=Ql;function nu(t){for(var e=0,r=0,n=0,i=t;n<i.length;n+=1){var a=i[n];e+=a.w*a.h,r=Math.max(r,a.w)}t.sort((function(t,e){return e.h-t.h}));for(var o=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,l=0,u=0,c=t;u<c.length;u+=1)for(var h=c[u],p=o.length-1;p>=0;p--){var f=o[p];if(!(h.w>f.w||h.h>f.h)){if(h.x=f.x,h.y=f.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===f.w&&h.h===f.h){var d=o.pop();p<o.length&&(o[p]=d)}else h.h===f.h?(f.x+=h.w,f.w-=h.w):h.w===f.w?(f.y+=h.h,f.h-=h.h):(o.push({x:f.x+h.w,y:f.y,w:f.w-h.w,h:h.h}),f.y+=h.h,f.h-=h.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}var iu=1,au=function(t,e){var r=e.pixelRatio,n=e.version,i=e.stretchX,a=e.stretchY,o=e.content;this.paddedRect=t,this.pixelRatio=r,this.stretchX=i,this.stretchY=a,this.content=o,this.version=n},ou={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};ou.tl.get=function(){return[this.paddedRect.x+iu,this.paddedRect.y+iu]},ou.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-iu,this.paddedRect.y+this.paddedRect.h-iu]},ou.tlbr.get=function(){return this.tl.concat(this.br)},ou.displaySize.get=function(){return[(this.paddedRect.w-2*iu)/this.pixelRatio,(this.paddedRect.h-2*iu)/this.pixelRatio]},Object.defineProperties(au.prototype,ou);var su=function(t,e){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,r,i),this.addImages(e,n,i);var a=nu(i),o=a.w,s=a.h,l=new Qo({width:o||1,height:s||1});for(var u in t){var c=t[u],h=r[u].paddedRect;Qo.copy(c.data,l,{x:0,y:0},{x:h.x+iu,y:h.y+iu},c.data)}for(var p in e){var f=e[p],d=n[p].paddedRect,m=d.x+iu,y=d.y+iu,v=f.data.width,g=f.data.height;Qo.copy(f.data,l,{x:0,y:0},{x:m,y:y},f.data),Qo.copy(f.data,l,{x:0,y:g-1},{x:m,y:y-1},{width:v,height:1}),Qo.copy(f.data,l,{x:0,y:0},{x:m,y:y+g},{width:v,height:1}),Qo.copy(f.data,l,{x:v-1,y:0},{x:m-1,y:y},{width:1,height:g}),Qo.copy(f.data,l,{x:0,y:0},{x:m+v,y:y},{width:1,height:g})}this.image=l,this.iconPositions=r,this.patternPositions=n};su.prototype.addImages=function(t,e,r){for(var n in t){var i=t[n],a={x:0,y:0,w:i.data.width+2*iu,h:i.data.height+2*iu};r.push(a),e[n]=new au(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},su.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},su.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var n=t.tl,i=n[0],a=n[1];r.update(e.data,void 0,{x:i,y:a})}},oi("ImagePosition",au),oi("ImageAtlas",su);var lu={horizontal:1,vertical:2,horizontalOnly:3},uu=-17;var cu=function(){this.scale=1,this.fontStack="",this.imageName=null};cu.forText=function(t,e){var r=new cu;return r.scale=t||1,r.fontStack=e,r},cu.forImage=function(t){var e=new cu;return e.imageName=t,e};var hu=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function pu(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m){var y,v=hu.fromFeature(t,i);h===lu.vertical&&v.verticalizePunctuation();var g=Di.processBidirectionalText,_=Di.processStyledBidirectionalText;if(g&&1===v.sections.length){y=[];for(var x=0,b=g(v.toString(),xu(v,u,a,e,n,f,d));x<b.length;x+=1){var w=b[x],T=new hu;T.text=w,T.sections=v.sections;for(var k=0;k<w.length;k++)T.sectionIndex.push(0);y.push(T)}}else if(_){y=[];for(var M=0,A=_(v.text,v.sectionIndex,xu(v,u,a,e,n,f,d));M<A.length;M+=1){var S=A[M],L=new hu;L.text=S[0],L.sectionIndex=S[1],L.sections=v.sections,y.push(L)}}else y=function(t,e){for(var r=[],n=t.text,i=0,a=0,o=e;a<o.length;a+=1){var s=o[a];r.push(t.substring(i,s)),i=s}return i<n.length&&r.push(t.substring(i,n.length)),r}(v,xu(v,u,a,e,n,f,d));var C=[],P={positionedLines:C,text:v.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:h,iconsInText:!1,verticalizable:!1};return function(t,e,r,n,i,a,o,s,l,u,c,h){for(var p=0,f=uu,d=0,m=0,y="right"===s?1:"left"===s?0:.5,v=0,g=0,_=i;g<_.length;g+=1){var x=_[g];x.trim();var b=x.getMaxScale(),w=(b-1)*Cl,T={positionedGlyphs:[],lineOffset:0};t.positionedLines[v]=T;var k=T.positionedGlyphs,M=0;if(x.length()){for(var A=0;A<x.length();A++){var S=x.getSection(A),L=x.getSectionIndex(A),C=x.getCharCode(A),P=0,I=null,E=null,D=null,z=Cl,O=!(l===lu.horizontal||!c&&!mi(C)||c&&(fu[C]||vi(C)));if(S.imageName){var R=n[S.imageName];if(!R)continue;D=S.imageName,t.iconsInText=t.iconsInText||!0,E=R.paddedRect;var F=R.displaySize;S.scale=S.scale*Cl/h,I={width:F[0],height:F[1],left:iu,top:-ru,advance:O?F[1]:F[0]},P=w+(Cl-F[1]*S.scale),z=I.advance;var B=O?F[0]*S.scale-Cl*b:F[1]*S.scale-Cl*b;B>0&&B>M&&(M=B)}else{var N=r[S.fontStack],U=N&&N[C];if(U&&U.rect)E=U.rect,I=U.metrics;else{var j=e[S.fontStack],V=j&&j[C];if(!V)continue;I=V.metrics}P=(b-S.scale)*Cl}O?(t.verticalizable=!0,k.push({glyph:C,imageName:D,x:p,y:f+P,vertical:O,scale:S.scale,fontStack:S.fontStack,sectionIndex:L,metrics:I,rect:E}),p+=z*S.scale+u):(k.push({glyph:C,imageName:D,x:p,y:f+P,vertical:O,scale:S.scale,fontStack:S.fontStack,sectionIndex:L,metrics:I,rect:E}),p+=I.advance*S.scale+u)}if(0!==k.length){var q=p-u;d=Math.max(q,d),wu(k,0,k.length-1,y,M)}p=0;var H=a*b+M;T.lineOffset=Math.max(M,w),f+=H,m=Math.max(H,m),++v}else f+=a,++v}var G=f-uu,Z=bu(o),Y=Z.horizontalAlign,W=Z.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var u=(e-r)*i,c=0;c=a!==o?-s*n-uu:(-n*l+.5)*o;for(var h=0,p=t;h<p.length;h+=1)for(var f=0,d=p[h].positionedGlyphs;f<d.length;f+=1){var m=d[f];m.x+=u,m.y+=c}})(t.positionedLines,y,Y,W,d,m,a,G,i.length),t.top+=-W*G,t.bottom=t.top+G,t.left+=-Y*d,t.right=t.left+d}(P,e,r,n,y,o,s,l,h,u,p,m),!function(t){for(var e=0,r=t;e<r.length;e+=1)if(0!==r[e].positionedGlyphs.length)return!1;return!0}(C)&&P}hu.fromFeature=function(t,e){for(var r=new hu,n=0;n<t.sections.length;n++){var i=t.sections[n];i.image?r.addImageSection(i):r.addTextSection(i,e)}return r},hu.prototype.length=function(){return this.text.length},hu.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},hu.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},hu.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},hu.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r+1)||null,i=t.charCodeAt(r-1)||null;n&&yi(n)&&!Ll[t[r+1]]||i&&yi(i)&&!Ll[t[r-1]]||!Ll[t[r]]?e+=t[r]:e+=Ll[t[r]]}return e}(this.text)},hu.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&fu[this.text.charCodeAt(e)];e++)t++;for(var r=this.text.length,n=this.text.length-1;n>=0&&n>=t&&fu[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},hu.prototype.substring=function(t,e){var r=new hu;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},hu.prototype.toString=function(){return this.text},hu.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},hu.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(cu.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n<t.text.length;++n)this.sectionIndex.push(r)},hu.prototype.addImageSection=function(t){var e=t.image?t.image.name:"";if(0!==e.length){var r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push(cu.forImage(e)),this.sectionIndex.push(this.sections.length-1)):k("Reached maximum number of images 6401")}else k("Can't add FormattedSection with an empty image.")},hu.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var fu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},du={};function mu(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*Cl/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function yu(t,e,r,n){var i=Math.pow(t-e,2);return n?t<e?i/2:2*i:i+Math.abs(r)*r}function vu(t,e,r){var n=0;return 10===t&&(n-=1e4),r&&(n+=150),40!==t&&65288!==t||(n+=50),41!==e&&65289!==e||(n+=50),n}function gu(t,e,r,n,i,a){for(var o=null,s=yu(e,r,i,a),l=0,u=n;l<u.length;l+=1){var c=u[l],h=yu(e-c.x,r,i,a)+c.badness;h<=s&&(o=c,s=h)}return{index:t,x:e,priorBreak:o,badness:s}}function _u(t){return t?_u(t.priorBreak).concat(t.index):[]}function xu(t,e,r,n,i,a,o){if("point"!==a)return[];if(!t)return[];for(var s=[],l=function(t,e,r,n,i,a){for(var o=0,s=0;s<t.length();s++){var l=t.getSection(s);o+=mu(t.getCharCode(s),l,n,i,e,a)}return o/Math.max(1,Math.ceil(o/r))}(t,e,r,n,i,o),u=t.text.indexOf("")>=0,c=0,h=0;h<t.length();h++){var p=t.getSection(h),f=t.getCharCode(h);if(fu[f]||(c+=mu(f,p,n,i,e,o)),h<t.length()-1){var d=!((m=f)<11904||!(fi["Bopomofo Extended"](m)||fi.Bopomofo(m)||fi["CJK Compatibility Forms"](m)||fi["CJK Compatibility Ideographs"](m)||fi["CJK Compatibility"](m)||fi["CJK Radicals Supplement"](m)||fi["CJK Strokes"](m)||fi["CJK Symbols and Punctuation"](m)||fi["CJK Unified Ideographs Extension A"](m)||fi["CJK Unified Ideographs"](m)||fi["Enclosed CJK Letters and Months"](m)||fi["Halfwidth and Fullwidth Forms"](m)||fi.Hiragana(m)||fi["Ideographic Description Characters"](m)||fi["Kangxi Radicals"](m)||fi["Katakana Phonetic Extensions"](m)||fi.Katakana(m)||fi["Vertical Forms"](m)||fi["Yi Radicals"](m)||fi["Yi Syllables"](m)));(du[f]||d||p.imageName)&&s.push(gu(h+1,c,l,s,vu(f,t.getCharCode(h+1),d&&u),!1))}}var m;return _u(gu(t.length(),c,l,s,0,!0))}function bu(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function wu(t,e,r,n,i){if(n||i)for(var a=t[r],o=a.metrics.advance*a.scale,s=(t[r].x+o)*n,l=e;l<=r;l++)t[l].x-=s,t[l].y+=i}function Tu(t,e,r,n,i,a){var o,s=t.image;if(s.content){var l=s.content,u=s.pixelRatio||1;o=[l[0]/u,l[1]/u,s.displaySize[0]-l[2]/u,s.displaySize[1]-l[3]/u]}var c,h,p,f,d=e.left*a,m=e.right*a;"width"===r||"both"===r?(f=i[0]+d-n[3],h=i[0]+m+n[1]):h=(f=i[0]+(d+m-s.displaySize[0])/2)+s.displaySize[0];var y=e.top*a,v=e.bottom*a;return"height"===r||"both"===r?(c=i[1]+y-n[0],p=i[1]+v+n[2]):p=(c=i[1]+(y+v-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:c,right:h,bottom:p,left:f,collisionPadding:o}}du[10]=!0,du[32]=!0,du[38]=!0,du[40]=!0,du[41]=!0,du[43]=!0,du[45]=!0,du[47]=!0,du[173]=!0,du[183]=!0,du[8203]=!0,du[8208]=!0,du[8211]=!0,du[8231]=!0;var ku=function(t){function e(e,r,n,i){t.call(this,e,r),this.angle=n,void 0!==i&&(this.segment=i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(a);oi("Anchor",ku);var Mu=128;function Au(t,e){var r=e.expression;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new zi(t+1))};if("source"===r.kind)return{kind:"source"};for(var n=r.zoomStops,i=r.interpolationType,a=0;a<n.length&&n[a]<=t;)a++;for(var o=a=Math.max(0,a-1);o<n.length&&n[o]<t+1;)o++;o=Math.min(n.length-1,o);var s=n[a],l=n[o];return"composite"===r.kind?{kind:"composite",minZoom:s,maxZoom:l,interpolationType:i}:{kind:"camera",minZoom:s,maxZoom:l,minSize:r.evaluate(new zi(s)),maxSize:r.evaluate(new zi(l)),interpolationType:i}}function Su(t,e,r){var n=e.uSize,i=e.uSizeT,a=r.lowerSize,o=r.upperSize;return"source"===t.kind?a/Mu:"composite"===t.kind?er(a/Mu,o/Mu,i):n}function Lu(t,e){var r=0,n=0;if("constant"===t.kind)n=t.layoutSize;else if("source"!==t.kind){var i=t.interpolationType,a=t.minZoom,o=t.maxZoom,s=i?h(wr.interpolationFactor(i,e,a,o),0,1):0;"camera"===t.kind?n=er(t.minSize,t.maxSize,s):r=s}return{uSizeT:r,uSize:n}}var Cu=Object.freeze({__proto__:null,getSizeData:Au,evaluateSizeForFeature:Su,evaluateSizeForZoom:Lu,SIZE_PACK_FACTOR:Mu});function Pu(t,e,r,n,i){if(void 0===e.segment)return!0;for(var a=e,o=e.segment+1,s=0;s>-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;s<r/2;){var c=t[o-1],h=t[o],p=t[o+1];if(!p)return!1;var f=c.angleTo(h)-h.angleTo(p);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=h.dist(p)}return!0}function Iu(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function Eu(t,e,r){return t?.6*e*r:0}function Du(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function zu(t,e,r,n,i,a){for(var o=Eu(r,i,a),s=Du(r,n)*a,l=0,u=Iu(t)/2,c=0;c<t.length-1;c++){var h=t[c],p=t[c+1],f=h.dist(p);if(l+f>u){var d=(u-l)/f,m=er(h.x,p.x,d),y=er(h.y,p.y,d),v=new ku(m,y,p.angleTo(h),c);return v._round(),!o||Pu(t,v,s,o,e)?v:void 0}l+=f}}function Ou(t,e,r,n,i,a,o,s,l){var u=Eu(n,a,o),c=Du(n,i),h=c*o,p=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-h<e/4&&(e=h+e/4),Ru(t,p?e/2*s%e:(c/2+2*a)*o*s%e,e,u,r,h,p,!1,l)}function Ru(t,e,r,n,i,a,o,s,l){for(var u=a/2,c=Iu(t),h=0,p=e-r,f=[],d=0;d<t.length-1;d++){for(var m=t[d],y=t[d+1],v=m.dist(y),g=y.angleTo(m);p+r<h+v;){var _=((p+=r)-h)/v,x=er(m.x,y.x,_),b=er(m.y,y.y,_);if(x>=0&&x<l&&b>=0&&b<l&&p-u>=0&&p+u<=c){var w=new ku(x,b,g,d);w._round(),n&&!Pu(t,w,a,n,i)||f.push(w)}}h+=v}return s||f.length||o||(f=Ru(t,h/2,r,n,i,a,o,!0,l)),f}function Fu(t,e,r,n,i){for(var o=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var h=l[c],p=l[c+1];h.x<e&&p.x<e||(h.x<e?h=new a(e,h.y+(p.y-h.y)*((e-h.x)/(p.x-h.x)))._round():p.x<e&&(p=new a(e,h.y+(p.y-h.y)*((e-h.x)/(p.x-h.x)))._round()),h.y<r&&p.y<r||(h.y<r?h=new a(h.x+(p.x-h.x)*((r-h.y)/(p.y-h.y)),r)._round():p.y<r&&(p=new a(h.x+(p.x-h.x)*((r-h.y)/(p.y-h.y)),r)._round()),h.x>=n&&p.x>=n||(h.x>=n?h=new a(n,h.y+(p.y-h.y)*((n-h.x)/(p.x-h.x)))._round():p.x>=n&&(p=new a(n,h.y+(p.y-h.y)*((n-h.x)/(p.x-h.x)))._round()),h.y>=i&&p.y>=i||(h.y>=i?h=new a(h.x+(p.x-h.x)*((i-h.y)/(p.y-h.y)),i)._round():p.y>=i&&(p=new a(h.x+(p.x-h.x)*((i-h.y)/(p.y-h.y)),i)._round()),u&&h.equals(u[u.length-1])||(u=[h],o.push(u)),u.push(p)))))}return o}var Bu=iu;function Nu(t,e,r,n){var i=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2*Bu,u=o.paddedRect.h-2*Bu,c=t.right-t.left,h=t.bottom-t.top,p=o.stretchX||[[0,l]],f=o.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},m=p.reduce(d,0),y=f.reduce(d,0),v=l-m,g=u-y,_=0,x=m,b=0,w=y,T=0,k=v,M=0,A=g;if(o.content&&n){var S=o.content;_=Uu(p,0,S[0]),b=Uu(f,0,S[1]),x=Uu(p,S[0],S[2]),w=Uu(f,S[1],S[3]),T=S[0]-_,M=S[1]-b,k=S[2]-S[0]-x,A=S[3]-S[1]-w}var L=function(n,i,l,u){var p=Vu(n.stretch-_,x,c,t.left),f=qu(n.fixed-T,k,n.stretch,m),d=Vu(i.stretch-b,w,h,t.top),v=qu(i.fixed-M,A,i.stretch,y),g=Vu(l.stretch-_,x,c,t.left),S=qu(l.fixed-T,k,l.stretch,m),L=Vu(u.stretch-b,w,h,t.top),C=qu(u.fixed-M,A,u.stretch,y),P=new a(p,d),I=new a(g,d),E=new a(g,L),D=new a(p,L),z=new a(f/s,v/s),O=new a(S/s,C/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];P._matMult(N),I._matMult(N),D._matMult(N),E._matMult(N)}var U=n.stretch+n.fixed,j=l.stretch+l.fixed,V=i.stretch+i.fixed,q=u.stretch+u.fixed;return{tl:P,tr:I,bl:D,br:E,tex:{x:o.paddedRect.x+Bu+U,y:o.paddedRect.y+Bu+V,w:j-U,h:q-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:O,minFontScaleX:k/s/c,minFontScaleY:A/s/h,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var C=ju(p,v,m),P=ju(f,g,y),I=0;I<C.length-1;I++)for(var E=C[I],D=C[I+1],z=0;z<P.length-1;z++){var O=P[z],R=P[z+1];i.push(L(E,O,D,R))}else i.push(L({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:u+1}));return i}function Uu(t,e,r){for(var n=0,i=0,a=t;i<a.length;i+=1){var o=a[i];n+=Math.max(e,Math.min(r,o[1]))-Math.max(e,Math.min(r,o[0]))}return n}function ju(t,e,r){for(var n=[{fixed:-Bu,stretch:0}],i=0,a=t;i<a.length;i+=1){var o=a[i],s=o[0],l=o[1],u=n[n.length-1];n.push({fixed:s-u.stretch,stretch:u.stretch}),n.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return n.push({fixed:e+Bu,stretch:r}),n}function Vu(t,e,r,n){return t/e*r+n}function qu(t,e,r,n){return t-e*r/n}var Hu=function(t,e,r,n,i,o,s,l,u,c){if(this.boxStartIndex=t.length,u){var h=o.top,p=o.bottom,f=o.collisionPadding;f&&(h-=f[1],p+=f[3]);var d=p-h;d>0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=o.top*s-l,y=o.bottom*s+l,v=o.left*s-l,g=o.right*s+l,_=o.collisionPadding;if(_&&(v-=_[0]*s,m-=_[1]*s,g+=_[2]*s,y+=_[3]*s),c){var x=new a(v,m),b=new a(g,m),w=new a(v,y),T=new a(g,y),k=c*Math.PI/180;x._rotate(k),b._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(x.x,b.x,w.x,T.x),g=Math.max(x.x,b.x,w.x,T.x),m=Math.min(x.y,b.y,w.y,T.y),y=Math.max(x.y,b.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,m,g,y,r,n,i)}this.boxEndIndex=t.length},Gu=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Zu),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Zu(t,e){return t<e?-1:t>e?1:0}function Yu(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=t[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<n)&&(n=c.x),(!u||c.y<i)&&(i=c.y),(!u||c.x>o)&&(o=c.x),(!u||c.y>s)&&(s=c.y)}var h=o-n,p=s-i,f=Math.min(h,p),d=f/2,m=new Gu([],Wu);if(0===f)return new a(n,i);for(var y=n;y<o;y+=f)for(var v=i;v<s;v+=f)m.push(new Xu(y+d,v+d,d,t));for(var g=function(t){for(var e=0,r=0,n=0,i=t[0],a=0,o=i.length,s=o-1;a<o;s=a++){var l=i[a],u=i[s],c=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*c,n+=(l.y+u.y)*c,e+=3*c}return new Xu(r/e,n/e,0,t)}(t),_=m.length;m.length;){var x=m.pop();(x.d>g.d||!g.d)&&(g=x,r&&console.log("found best %d after %d probes",Math.round(1e4*x.d)/1e4,_)),x.max-g.d<=e||(d=x.h/2,m.push(new Xu(x.p.x-d,x.p.y-d,d,t)),m.push(new Xu(x.p.x+d,x.p.y-d,d,t)),m.push(new Xu(x.p.x-d,x.p.y+d,d,t)),m.push(new Xu(x.p.x+d,x.p.y+d,d,t)),_+=4)}return r&&(console.log("num probes: "+_),console.log("best distance: "+g.d)),g.p}function Wu(t,e){return e.max-t.max}function Xu(t,e,r,n){this.p=new a(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;i<e.length;i++)for(var a=e[i],o=0,s=a.length,l=s-1;o<s;l=o++){var u=a[o],c=a[l];u.y>t.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(r=!r),n=Math.min(n,Lo(t,u,c))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}Gu.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Gu.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Gu.prototype.peek=function(){return this.data[0]},Gu.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,a=e[i];if(r(n,a)>=0)break;e[t]=a,t=i}e[t]=n},Gu.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t<n;){var a=1+(t<<1),o=e[a],s=a+1;if(s<this.length&&r(e[s],o)<0&&(a=s,o=e[s]),r(o,i)>=0)break;e[t]=o,t=a}e[t]=i};var Ju=7,Ku=Number.POSITIVE_INFINITY;function Qu(t,e){return e[1]!==Ku?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":i=r-Ju;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+Ju}switch(t){case"top-right":case"bottom-right":case"right":n=-e;break;case"top-left":case"bottom-left":case"left":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=i-Ju;break;case"bottom-right":case"bottom-left":n=-i+Ju;break;case"bottom":n=-e+Ju;break;case"top":n=e-Ju}switch(t){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=e;break;case"right":r=-e}return[r,n]}(t,e[0])}function $u(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var tc=255,ec=tc*Mu;function rc(t,e,r,n,i,o,s,l,u,c,h,p,f,d,m){var y=function(t,e,r,n,i,o,s,l){for(var u=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,c=[],h=0,p=e.positionedLines;h<p.length;h+=1)for(var f=p[h],d=0,m=f.positionedGlyphs;d<m.length;d+=1){var y=m[d];if(y.rect){var v=y.rect||{},g=ru+1,_=!0,x=1,b=0,w=(i||l)&&y.vertical,T=y.metrics.advance*y.scale/2;if(l&&e.verticalizable){var k=(y.scale-1)*Cl,M=(Cl-y.metrics.width*y.scale)/2;b=f.lineOffset/2-(y.imageName?-M:k)}if(y.imageName){var A=s[y.imageName];_=A.sdf,x=A.pixelRatio,g=iu/x}var S=i?[y.x+T,y.y]:[0,0],L=i?[0,0]:[y.x+T+r[0],y.y+r[1]-b],C=[0,0];w&&(C=L,L=[0,0]);var P=(y.metrics.left-g)*y.scale-T+L[0],I=(-y.metrics.top-g)*y.scale+L[1],E=P+v.w*y.scale/x,D=I+v.h*y.scale/x,z=new a(P,I),O=new a(E,I),R=new a(P,D),F=new a(E,D);if(w){var B=new a(-T,T-uu),N=-Math.PI/2,U=Cl/2-T,j=y.imageName?U:0,V=new a(5-uu-U,-j),q=new(Function.prototype.bind.apply(a,[null].concat(C)));z._rotateAround(N,B)._add(V)._add(q),O._rotateAround(N,B)._add(V)._add(q),R._rotateAround(N,B)._add(V)._add(q),F._rotateAround(N,B)._add(V)._add(q)}if(u){var H=Math.sin(u),G=Math.cos(u),Z=[G,-H,H,G];z._matMult(Z),O._matMult(Z),R._matMult(Z),F._matMult(Z)}var Y=new a(0,0),W=new a(0,0);c.push({tl:z,tr:O,bl:R,br:F,tex:v,writingMode:e.writingMode,glyphOffset:S,sectionIndex:y.sectionIndex,isSDF:_,pixelOffsetTL:Y,pixelOffsetBR:W,minFontScaleX:0,minFontScaleY:0})}}return c}(0,r,l,i,o,s,n,t.allowVerticalPlacement),v=t.textSizeData,g=null;"source"===v.kind?(g=[Mu*i.layout.get("text-size").evaluate(s,{})])[0]>ec&&k(t.layerIds[0]+': Value for "text-size" is >= '+tc+'. Reduce your "text-size".'):"composite"===v.kind&&((g=[Mu*d.compositeTextSizes[0].evaluate(s,{},m),Mu*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>ec||g[1]>ec)&&k(t.layerIds[0]+': Value for "text-size" is >= '+tc+'. Reduce your "text-size".'),t.addSymbols(t.text,y,g,l,o,s,c,e,u.lineStartIndex,u.lineLength,f,m);for(var _=0,x=h;_<x.length;_+=1)p[x[_]]=t.text.placedSymbolArray.length-1;return 4*y.length}function nc(t){for(var e in t)return t[e];return null}function ic(t,e,r,n){var i=t.compareText;if(e in i){for(var a=i[e],o=a.length-1;o>=0;o--)if(n.dist(a[o])<r)return!0}else i[e]=[];return i[e].push(n),!1}var ac=tl.VectorTileFeature.types,oc=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function sc(t,e,r,n,i,a,o,s,l,u,c,h,p){var f=s?Math.min(ec,Math.round(s[0])):0,d=s?Math.min(ec,Math.round(s[1])):0;t.emplaceBack(e,r,Math.round(32*n),Math.round(32*i),a,o,(f<<1)+(l?1:0),d,16*u,16*c,256*h,256*p)}function lc(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}function uc(t){for(var e=0,r=t.sections;e<r.length;e+=1)if(xi(r[e].text))return!0;return!1}var cc=function(t){this.layoutVertexArray=new la,this.indexArray=new ma,this.programConfigurations=t,this.segments=new Oa,this.dynamicLayoutVertexArray=new ua,this.opacityVertexArray=new ca,this.placedSymbolArray=new Sa};cc.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},cc.prototype.upload=function(t,e,r,n){this.isEmpty()||(r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,wl.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Tl.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,oc,!0),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(t))},cc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},oi("SymbolBuffers",cc);var hc=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Oa,this.collisionVertexArray=new da};hc.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,kl.members,!0)},hc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},oi("CollisionBuffers",hc);var pc=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Bo([]),this.placementViewportMatrix=Bo([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Au(this.zoom,e["text-size"]),this.iconSizeData=Au(this.zoom,e["icon-size"]);var r=this.layers[0].layout,n=r.get("symbol-sort-key"),i=r.get("symbol-z-order");this.canOverlap=r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==i&&void 0!==n.constantOr(1);var a="viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map((function(t){return lu[t]}))),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id})),this.sourceID=t.sourceID};pc.prototype.createArrays=function(){this.text=new cc(new co(this.layers,this.zoom,(function(t){return/^text/.test(t)}))),this.icon=new cc(new co(this.layers,this.zoom,(function(t){return/^icon/.test(t)}))),this.glyphOffsetArray=new Pa,this.lineVertexArray=new Ia,this.symbolInstances=new Ca},pc.prototype.calculateGlyphDependencies=function(t,e,r,n,i){for(var a=0;a<t.length;a++)if(e[t.charCodeAt(a)]=!0,(r||n)&&i){var o=Ll[t.charAt(a)];o&&(e[o.charCodeAt(0)]=!0)}},pc.prototype.populate=function(t,e,r){var n=this.layers[0],i=n.layout,a=i.get("text-font"),o=i.get("text-field"),s=i.get("icon-image"),l=("constant"!==o.value.kind||o.value.value instanceof pe&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],l||u){for(var h=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,d=new zi(this.zoom),m=0,y=t;m<y.length;m+=1){var v=y[m],g=v.feature,_=v.id,x=v.index,b=v.sourceLayerIndex,w=n._featureFilter.needGeometry,T=go(g,w);if(n._featureFilter.filter(d,T,r)){w||(T.geometry=vo(g));var k=void 0;if(l){var M=n.getValueAndResolveTokens("text-field",T,r,f),A=pe.factory(M);uc(A)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===Ii()||this.hasRTLText&&Di.isParsed())&&(k=Sl(A,n,T))}var S=void 0;if(u){var L=n.getValueAndResolveTokens("icon-image",T,r,f);S=L instanceof fe?L:fe.fromString(L)}if(k||S){var C=this.sortFeaturesByKey?c.evaluate(T,{},r):void 0,P={id:_,text:k,icon:S,index:x,sourceLayerIndex:b,geometry:T.geometry,properties:g.properties,type:ac[g.type],sortKey:C};if(this.features.push(P),S&&(h[S.name]=!0),k){var I=a.evaluate(T,{},r).join(","),E="map"===i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(lu.vertical)>=0;for(var D=0,z=k.sections;D<z.length;D+=1){var O=z[D];if(O.image)h[O.image.name]=!0;else{var R=di(k.toString()),F=O.fontStack||I,B=p[F]=p[F]||{};this.calculateGlyphDependencies(O.text,B,E,this.allowVerticalPlacement,R)}}}}}}"line"===i.get("symbol-placement")&&(this.features=function(t){var e={},r={},n=[],i=0;function a(e){n.push(t[e]),i++}function o(t,e,i){var a=r[t];return delete r[t],r[e]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(t,r,i){var a=e[r];return delete e[r],e[t]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(t,e,r){var n=r?e[0][e[0].length-1]:e[0][0];return t+":"+n.x+":"+n.y}for(var u=0;u<t.length;u++){var c=t[u],h=c.geometry,p=c.text?c.text.toString():null;if(p){var f=l(p,h),d=l(p,h,!0);if(f in r&&d in e&&r[f]!==e[d]){var m=s(f,d,h),y=o(f,d,n[m].geometry);delete e[f],delete r[d],r[l(p,n[y].geometry,!0)]=y,n[m].geometry=null}else f in r?o(f,d,h):d in e?s(f,d,h):(a(u),e[f]=i-1,r[d]=i-1)}else a(u)}return n.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}))}},pc.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},pc.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},pc.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},pc.prototype.upload=function(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},pc.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},pc.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},pc.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var n=t.dist(e[t.segment+1]),i=t.dist(e[t.segment]),a={},o=t.segment+1;o<e.length;o++)a[o]={x:e[o].x,y:e[o].y,tileUnitDistanceFromAnchor:n},o<e.length-1&&(n+=e[o+1].dist(e[o]));for(var s=t.segment||0;s>=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var u=a[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},pc.prototype.addSymbols=function(t,e,r,n,i,a,o,s,l,u,c,h){for(var p=t.indexArray,f=t.layoutVertexArray,d=t.segments.prepareSegment(4*e.length,f,p,this.canOverlap?a.sortKey:void 0),m=this.glyphOffsetArray.length,y=d.vertexLength,v=this.allowVerticalPlacement&&o===lu.vertical?Math.PI/2:0,g=a.text&&a.text.sections,_=0;_<e.length;_++){var x=e[_],b=x.tl,w=x.tr,T=x.bl,k=x.br,M=x.tex,A=x.pixelOffsetTL,S=x.pixelOffsetBR,L=x.minFontScaleX,C=x.minFontScaleY,P=x.glyphOffset,I=x.isSDF,E=x.sectionIndex,D=d.vertexLength,z=P[1];sc(f,s.x,s.y,b.x,z+b.y,M.x,M.y,r,I,A.x,A.y,L,C),sc(f,s.x,s.y,w.x,z+w.y,M.x+M.w,M.y,r,I,S.x,A.y,L,C),sc(f,s.x,s.y,T.x,z+T.y,M.x,M.y+M.h,r,I,A.x,S.y,L,C),sc(f,s.x,s.y,k.x,z+k.y,M.x+M.w,M.y+M.h,r,I,S.x,S.y,L,C),lc(t.dynamicLayoutVertexArray,s,v),p.emplaceBack(D,D+1,D+2),p.emplaceBack(D+1,D+2,D+3),d.vertexLength+=4,d.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(P[0]),_!==e.length-1&&E===e[_+1].sectionIndex||t.programConfigurations.populatePaintArrays(f.length,a,a.index,{},h,g&&g[E])}t.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,y,l,u,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,0,!1,0,c)},pc.prototype._addCollisionDebugVertex=function(t,e,r,n,i,a){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,n,i,Math.round(a.x),Math.round(a.y))},pc.prototype.addCollisionDebugVertices=function(t,e,r,n,i,o,s){var l=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=l.vertexLength,c=i.layoutVertexArray,h=i.collisionVertexArray,p=s.anchorX,f=s.anchorY;this._addCollisionDebugVertex(c,h,o,p,f,new a(t,e)),this._addCollisionDebugVertex(c,h,o,p,f,new a(r,e)),this._addCollisionDebugVertex(c,h,o,p,f,new a(r,n)),this._addCollisionDebugVertex(c,h,o,p,f,new a(t,n)),l.vertexLength+=4;var d=i.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),l.primitiveLength+=4},pc.prototype.addDebugCollisionBoxes=function(t,e,r,n){for(var i=t;i<e;i++){var a=this.collisionBoxArray.get(i),o=a.x1,s=a.y1,l=a.x2,u=a.y2;this.addCollisionDebugVertices(o,s,l,u,n?this.textCollisionBox:this.iconCollisionBox,a.anchorPoint,r)}},pc.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new hc(pa,Ml.members,ba),this.iconCollisionBox=new hc(pa,Ml.members,ba);for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}},pc.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,n,i,a,o,s,l){for(var u={},c=e;c<r;c++){var h=t.get(c);u.textBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},u.textFeatureIndex=h.featureIndex;break}for(var p=n;p<i;p++){var f=t.get(p);u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}for(var d=a;d<o;d++){var m=t.get(d);u.iconBox={x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,anchorPointX:m.anchorPointX,anchorPointY:m.anchorPointY},u.iconFeatureIndex=m.featureIndex;break}for(var y=s;y<l;y++){var v=t.get(y);u.verticalIconBox={x1:v.x1,y1:v.y1,x2:v.x2,y2:v.y2,anchorPointX:v.anchorPointX,anchorPointY:v.anchorPointY},u.verticalIconFeatureIndex=v.featureIndex;break}return u},pc.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}},pc.prototype.hasTextData=function(){return this.text.segments.get().length>0},pc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},pc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},pc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},pc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},pc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i<n;i+=4)t.indexArray.emplaceBack(i,i+1,i+2),t.indexArray.emplaceBack(i+1,i+2,i+3)},pc.prototype.getSortedSymbolIndexes=function(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(t),r=Math.cos(t),n=[],i=[],a=[],o=0;o<this.symbolInstances.length;++o){a.push(o);var s=this.symbolInstances.get(o);n.push(0|Math.round(e*s.anchorX+r*s.anchorY)),i.push(s.featureIndex)}return a.sort((function(t,e){return n[t]-n[e]||i[e]-i[t]})),a},pc.prototype.addToSortKeyRanges=function(t,e){var r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})},pc.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r<n.length;r+=1){var i=n[r],a=this.symbolInstances.get(i);this.featureSortOrder.push(a.featureIndex),[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t,r,n){t>=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},oi("SymbolBucket",pc,{omit:["layers","collisionBoxArray","features","compareText"]}),pc.MAX_GLYPHS=65535,pc.addDynamicAttributes=lc;var fc=new Wi({"symbol-placement":new qi(Ft.layout_symbol["symbol-placement"]),"symbol-spacing":new qi(Ft.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new qi(Ft.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Hi(Ft.layout_symbol["symbol-sort-key"]),"symbol-z-order":new qi(Ft.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new qi(Ft.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new qi(Ft.layout_symbol["icon-ignore-placement"]),"icon-optional":new qi(Ft.layout_symbol["icon-optional"]),"icon-rotation-alignment":new qi(Ft.layout_symbol["icon-rotation-alignment"]),"icon-size":new Hi(Ft.layout_symbol["icon-size"]),"icon-text-fit":new qi(Ft.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new qi(Ft.layout_symbol["icon-text-fit-padding"]),"icon-image":new Hi(Ft.layout_symbol["icon-image"]),"icon-rotate":new Hi(Ft.layout_symbol["icon-rotate"]),"icon-padding":new qi(Ft.layout_symbol["icon-padding"]),"icon-keep-upright":new qi(Ft.layout_symbol["icon-keep-upright"]),"icon-offset":new Hi(Ft.layout_symbol["icon-offset"]),"icon-anchor":new Hi(Ft.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new qi(Ft.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new qi(Ft.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new qi(Ft.layout_symbol["text-rotation-alignment"]),"text-field":new Hi(Ft.layout_symbol["text-field"]),"text-font":new Hi(Ft.layout_symbol["text-font"]),"text-size":new Hi(Ft.layout_symbol["text-size"]),"text-max-width":new Hi(Ft.layout_symbol["text-max-width"]),"text-line-height":new qi(Ft.layout_symbol["text-line-height"]),"text-letter-spacing":new Hi(Ft.layout_symbol["text-letter-spacing"]),"text-justify":new Hi(Ft.layout_symbol["text-justify"]),"text-radial-offset":new Hi(Ft.layout_symbol["text-radial-offset"]),"text-variable-anchor":new qi(Ft.layout_symbol["text-variable-anchor"]),"text-anchor":new Hi(Ft.layout_symbol["text-anchor"]),"text-max-angle":new qi(Ft.layout_symbol["text-max-angle"]),"text-writing-mode":new qi(Ft.layout_symbol["text-writing-mode"]),"text-rotate":new Hi(Ft.layout_symbol["text-rotate"]),"text-padding":new qi(Ft.layout_symbol["text-padding"]),"text-keep-upright":new qi(Ft.layout_symbol["text-keep-upright"]),"text-transform":new Hi(Ft.layout_symbol["text-transform"]),"text-offset":new Hi(Ft.layout_symbol["text-offset"]),"text-allow-overlap":new qi(Ft.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new qi(Ft.layout_symbol["text-ignore-placement"]),"text-optional":new qi(Ft.layout_symbol["text-optional"])}),dc={paint:new Wi({"icon-opacity":new Hi(Ft.paint_symbol["icon-opacity"]),"icon-color":new Hi(Ft.paint_symbol["icon-color"]),"icon-halo-color":new Hi(Ft.paint_symbol["icon-halo-color"]),"icon-halo-width":new Hi(Ft.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Hi(Ft.paint_symbol["icon-halo-blur"]),"icon-translate":new qi(Ft.paint_symbol["icon-translate"]),"icon-translate-anchor":new qi(Ft.paint_symbol["icon-translate-anchor"]),"text-opacity":new Hi(Ft.paint_symbol["text-opacity"]),"text-color":new Hi(Ft.paint_symbol["text-color"],{runtimeType:Xt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new Hi(Ft.paint_symbol["text-halo-color"]),"text-halo-width":new Hi(Ft.paint_symbol["text-halo-width"]),"text-halo-blur":new Hi(Ft.paint_symbol["text-halo-blur"]),"text-translate":new qi(Ft.paint_symbol["text-translate"]),"text-translate-anchor":new qi(Ft.paint_symbol["text-translate-anchor"])}),layout:fc},mc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Gt,this.defaultValue=t};mc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},mc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},mc.prototype.outputDefined=function(){return!1},mc.prototype.serialize=function(){return null},oi("FormatSectionOverride",mc,{omit:["defaultValue"]});var yc=function(t){function e(e){t.call(this,e,dc)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a<o.length;a+=1){var s=o[a];i.indexOf(s)<0&&i.push(s)}this.layout._values["text-writing-mode"]=i}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},e.prototype.getValueAndResolveTokens=function(t,e,r,n){var i=this.layout.get(t).evaluate(e,{},r,n),a=this._unevaluatedLayout._values[t];return a.isDataDriven()||cn(a.value)||!i?i:function(t,e){return e.replace(/{([^{}]+)}/g,(function(e,r){return r in t?String(t[r]):""}))}(e.properties,i)},e.prototype.createBucket=function(t){return new pc(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype._setPaintOverrides=function(){for(var t=0,r=dc.paint.overridableProperties;t<r.length;t+=1){var n=r[t];if(e.hasPaintOverride(this.layout,n)){var i,a=this.paint.get(n),o=new mc(a),s=new un(o,a.property.specification);i="constant"===a.value.kind||"source"===a.value.kind?new pn("source",s):new fn("composite",s,a.value.zoomStops,a.value._interpolationType),this.paint._values[n]=new ji(a.property,i,a.parameters)}}},e.prototype._handleOverridablePaintPropertyUpdate=function(t,r,n){return!(!this.layout||r.isDataDriven()||n.isDataDriven())&&e.hasPaintOverride(this.layout,t)},e.hasPaintOverride=function(t,e){var r=t.get("text-field"),n=dc.paint.properties[e],i=!1,a=function(t){for(var e=0,r=t;e<r.length;e+=1){var a=r[e];if(n.overrides&&n.overrides.hasOverride(a))return void(i=!0)}};if("constant"===r.value.kind&&r.value.value instanceof pe)a(r.value.value.sections);else if("source"===r.value.kind){var o=function(t){if(!i)if(t instanceof ge&&ye(t.value)===$t){var e=t.value;a(e.sections)}else t instanceof we?a(t.sections):t.eachChild(o)},s=r.value;s._styleExpression&&o(s._styleExpression.expression)}return i},e}(Ji),vc={paint:new Wi({"background-color":new qi(Ft.paint_background["background-color"]),"background-pattern":new Zi(Ft.paint_background["background-pattern"]),"background-opacity":new qi(Ft.paint_background["background-opacity"])})},gc=function(t){function e(e){t.call(this,e,vc)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ji),_c={paint:new Wi({"raster-opacity":new qi(Ft.paint_raster["raster-opacity"]),"raster-hue-rotate":new qi(Ft.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new qi(Ft.paint_raster["raster-brightness-min"]),"raster-brightness-max":new qi(Ft.paint_raster["raster-brightness-max"]),"raster-saturation":new qi(Ft.paint_raster["raster-saturation"]),"raster-contrast":new qi(Ft.paint_raster["raster-contrast"]),"raster-resampling":new qi(Ft.paint_raster["raster-resampling"]),"raster-fade-duration":new qi(Ft.paint_raster["raster-fade-duration"])})},xc=function(t){function e(e){t.call(this,e,_c)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ji);var bc=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},e}(Ji),wc={circle:Go,heatmap:es,hillshade:ns,fill:Hs,"fill-extrusion":sl,line:xl,symbol:yc,background:gc,raster:xc};var Tc=s.HTMLImageElement,kc=s.HTMLCanvasElement,Mc=s.HTMLVideoElement,Ac=s.ImageData,Sc=s.ImageBitmap,Lc=function(t,e,r,n){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,n)};Lc.prototype.update=function(t,e,r){var n=t.width,i=t.height,a=!(this.size&&this.size[0]===n&&this.size[1]===i||r),o=this.context,s=o.gl;if(this.useMipmap=Boolean(e&&e.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1),o.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!e||!1!==e.premultiply)),a)this.size=[n,i],t instanceof Tc||t instanceof kc||t instanceof Mc||t instanceof Ac||Sc&&t instanceof Sc?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,n,i,0,this.format,s.UNSIGNED_BYTE,t.data);else{var l=r||{x:0,y:0},u=l.x,c=l.y;t instanceof Tc||t instanceof kc||t instanceof Mc||t instanceof Ac||Sc&&t instanceof Sc?s.texSubImage2D(s.TEXTURE_2D,0,u,c,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,u,c,n,i,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},Lc.prototype.bind=function(t,e,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),t!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)},Lc.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Lc.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Cc=function(t){var e=this;this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})};Cc.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){t._triggered=!1,t._callback()}),0))},Cc.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Pc=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},g(["receive","process"],this),this.invoker=new Cc(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=S()?t:s};function Ic(t,e,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[t*n-2*Math.PI*6378137/2,e*n-2*Math.PI*6378137/2]}Pc.prototype.send=function(t,e,r,n,i){var a=this;void 0===i&&(i=!1);var o=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[o]=r);var s=P(this.globalScope)?void 0:[];return this.target.postMessage({id:o,type:t,hasCallback:!!r,targetMapId:n,mustQueue:i,sourceMapId:this.mapId,data:ci(e,s)},s),{cancel:function(){r&&delete a.callbacks[o],a.target.postMessage({id:o,type:"<cancel>",targetMapId:n,sourceMapId:a.mapId})}}},Pc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else S()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},Pc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Pc.prototype.processTask=function(t,e){var r=this;if("<response>"===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(hi(e.error)):n(null,hi(e.data)))}else{var i=!1,a=P(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"<response>",sourceMapId:r.mapId,error:e?ci(e):null,data:ci(n,a)},a)}:function(t){i=!0},s=null,l=hi(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,o)}else o(new Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Pc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Ec=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};Ec.prototype.setNorthEast=function(t){return this._ne=t instanceof zc?new zc(t.lng,t.lat):zc.convert(t),this},Ec.prototype.setSouthWest=function(t){return this._sw=t instanceof zc?new zc(t.lng,t.lat):zc.convert(t),this},Ec.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof zc)e=t,r=t;else{if(!(t instanceof Ec)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Ec.convert(a))}var o=t;return this.extend(zc.convert(o))}return this}if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new zc(e.lng,e.lat),this._ne=new zc(r.lng,r.lat)),this},Ec.prototype.getCenter=function(){return new zc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Ec.prototype.getSouthWest=function(){return this._sw},Ec.prototype.getNorthEast=function(){return this._ne},Ec.prototype.getNorthWest=function(){return new zc(this.getWest(),this.getNorth())},Ec.prototype.getSouthEast=function(){return new zc(this.getEast(),this.getSouth())},Ec.prototype.getWest=function(){return this._sw.lng},Ec.prototype.getSouth=function(){return this._sw.lat},Ec.prototype.getEast=function(){return this._ne.lng},Ec.prototype.getNorth=function(){return this._ne.lat},Ec.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Ec.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Ec.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Ec.prototype.contains=function(t){var e=zc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Ec.convert=function(t){return!t||t instanceof Ec?t:new Ec(t)};var Dc=6371008.8,zc=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};zc.prototype.wrap=function(){return new zc(p(this.lng,-180,180),this.lat)},zc.prototype.toArray=function(){return[this.lng,this.lat]},zc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},zc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return Dc*Math.acos(Math.min(i,1))},zc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Ec(new zc(this.lng-r,this.lat-e),new zc(this.lng+r,this.lat+e))},zc.convert=function(t){if(t instanceof zc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new zc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new zc(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Oc=2*Math.PI*Dc;function Rc(t){return Oc*Math.cos(t*Math.PI/180)}function Fc(t){return(180+t)/360}function Bc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Nc(t,e){return t/Rc(e)}function Uc(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var jc=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};jc.fromLngLat=function(t,e){void 0===e&&(e=0);var r=zc.convert(t);return new jc(Fc(r.lng),Bc(r.lat),Nc(e,r.lat))},jc.prototype.toLngLat=function(){return new zc(360*this.x-180,Uc(this.y))},jc.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Rc(Uc(e));var t,e},jc.prototype.meterInMercatorCoordinateUnits=function(){return 1/Oc*(t=Uc(this.y),1/Math.cos(t*Math.PI/180));var t};var Vc=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Gc(0,t,t,e,r)};Vc.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Vc.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Ic(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Ic(256*(r+1),256*(n+1),i),a[0]+","+a[1]+","+o[0]+","+o[1]),l=function(t,e,r){for(var n,i="",a=t;a>0;a--)i+=(e&(n=1<<a-1)?1:0)+(r&n?2:0);return i}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",l).replace("{bbox-epsg-3857}",s)},Vc.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new a((t.x*e-this.x)*fo,(t.y*e-this.y)*fo)},Vc.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var qc=function(t,e){this.wrap=t,this.canonical=e,this.key=Gc(t,e.z,e.z,e.x,e.y)},Hc=function(t,e,r,n,i){this.overscaledZ=t,this.wrap=e,this.canonical=new Vc(r,+n,+i),this.key=Gc(e,t,r,n,i)};function Gc(t,e,r,n,i){(t*=2)<0&&(t=-1*t-1);var a=1<<r;return(a*a*t+a*i+n).toString(36)+r.toString(36)+e.toString(36)}Hc.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},Hc.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new Hc(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Hc(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Hc.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?Gc(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Gc(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},Hc.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},Hc.prototype.children=function(t){if(this.overscaledZ>=t)return[new Hc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Hc(e,this.wrap,e,r,n),new Hc(e,this.wrap,e,r+1,n),new Hc(e,this.wrap,e,r,n+1),new Hc(e,this.wrap,e,r+1,n+1)]},Hc.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},Hc.prototype.wrapped=function(){return new Hc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Hc.prototype.unwrapTo=function(t){return new Hc(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},Hc.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Hc.prototype.toUnwrapped=function(){return new qc(this.wrap,this.canonical)},Hc.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Hc.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new jc(t.x-this.wrap,t.y))},oi("CanonicalTileID",Vc),oi("OverscaledTileID",Hc,{omit:["posMatrix"]});var Zc=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return k('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=e.height;var n=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=r||"mapbox";for(var i=0;i<n;i++)this.data[this._idx(-1,i)]=this.data[this._idx(0,i)],this.data[this._idx(n,i)]=this.data[this._idx(n-1,i)],this.data[this._idx(i,-1)]=this.data[this._idx(i,0)],this.data[this._idx(i,n)]=this.data[this._idx(i,n-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(n,-1)]=this.data[this._idx(n-1,0)],this.data[this._idx(-1,n)]=this.data[this._idx(0,n-1)],this.data[this._idx(n,n)]=this.data[this._idx(n-1,n-1)]};Zc.prototype.get=function(t,e){var r=new Uint8Array(this.data.buffer),n=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(r[n],r[n+1],r[n+2])},Zc.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Zc.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},Zc.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Zc.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Zc.prototype.getPixels=function(){return new Qo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Zc.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,u=a;u<o;u++)for(var c=n;c<i;c++)this.data[this._idx(c,u)]=t.data[this._idx(c+s,u+l)]},oi("DEMData",Zc);var Yc=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Yc.prototype.encode=function(t){return this._stringToNumber[t]},Yc.prototype.decode=function(t){return this._numberToString[t]};var Wc=function(t,e,r,n,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=n,this.properties=t.properties,this.id=i},Xc={geometry:{configurable:!0}};Xc.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Xc.geometry.set=function(t){this._geometry=t},Wc.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Wc.prototype,Xc);var Jc=function(){this.state={},this.stateChanges={},this.deletedStates={}};Jc.prototype.updateState=function(t,e,r){var n=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][n]=this.stateChanges[t][n]||{},f(this.stateChanges[t][n],r),null===this.deletedStates[t])for(var i in this.deletedStates[t]={},this.state[t])i!==n&&(this.deletedStates[t][i]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][n])for(var a in this.deletedStates[t][n]={},this.state[t][n])r[a]||(this.deletedStates[t][n][a]=null);else for(var o in r)this.deletedStates[t]&&this.deletedStates[t][n]&&null===this.deletedStates[t][n][o]&&delete this.deletedStates[t][n][o]},Jc.prototype.removeFeatureState=function(t,e,r){if(null!==this.deletedStates[t]){var n=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&void 0!==e)null!==this.deletedStates[t][n]&&(this.deletedStates[t][n]=this.deletedStates[t][n]||{},this.deletedStates[t][n][r]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][n])for(r in this.deletedStates[t][n]={},this.stateChanges[t][n])this.deletedStates[t][n][r]=null;else this.deletedStates[t][n]=null;else this.deletedStates[t]=null}},Jc.prototype.getState=function(t,e){var r=String(e),n=this.state[t]||{},i=this.stateChanges[t]||{},a=f({},n[r],i[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var o=this.deletedStates[t][e];if(null===o)return{};for(var s in o)delete a[s]}return a},Jc.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Jc.prototype.coalesceChanges=function(t,e){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var i={};for(var a in this.stateChanges[n])this.state[n][a]||(this.state[n][a]={}),f(this.state[n][a],this.stateChanges[n][a]),i[a]=this.state[n][a];r[n]=i}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var u in this.deletedStates[o]){if(null===this.deletedStates[o][u])this.state[o][u]={};else for(var c=0,h=Object.keys(this.deletedStates[o][u]);c<h.length;c+=1){var p=h[c];delete this.state[o][u][p]}s[u]=this.state[o][u]}r[o]=r[o]||{},f(r[o],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var d in t)t[d].setFeatureState(r,e)};var Kc=function(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new ti(fo,16,0),this.grid3D=new ti(fo,16,0),this.featureIndexArray=new Da,this.promoteId=e};function Qc(t,e,r,n,i){return x(t,(function(t,a){var o=e instanceof Vi?e.get(a):null;return o&&o.evaluate?o.evaluate(r,n,i):o}))}function $c(t){for(var e=1/0,r=1/0,n=-1/0,i=-1/0,a=0,o=t;a<o.length;a+=1){var s=o[a];e=Math.min(e,s.x),r=Math.min(r,s.y),n=Math.max(n,s.x),i=Math.max(i,s.y)}return{minX:e,minY:r,maxX:n,maxY:i}}function th(t,e){return e-t}Kc.prototype.insert=function(t,e,r,n,i,a){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);for(var s=a?this.grid3D:this.grid,l=0;l<e.length;l++){for(var u=e[l],c=[1/0,1/0,-1/0,-1/0],h=0;h<u.length;h++){var p=u[h];c[0]=Math.min(c[0],p.x),c[1]=Math.min(c[1],p.y),c[2]=Math.max(c[2],p.x),c[3]=Math.max(c[3],p.y)}c[0]<fo&&c[1]<fo&&c[2]>=0&&c[3]>=0&&s.insert(o,c[0],c[1],c[2],c[3])}},Kc.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new tl.VectorTile(new El(this.rawTileData)).layers,this.sourceLayerCoder=new Yc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Kc.prototype.query=function(t,e,r,n){var i=this;this.loadVTLayers();for(var o=t.params||{},s=fo/t.tileSize/t.scale,l=Mn(o.filter),u=t.queryGeometry,c=t.queryPadding*s,h=$c(u),p=this.grid.query(h.minX-c,h.minY-c,h.maxX+c,h.maxY+c),f=$c(t.cameraQueryGeometry),d=0,m=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,(function(e,r,n,i){return function(t,e,r,n,i){for(var o=0,s=t;o<s.length;o+=1){var l=s[o];if(e<=l.x&&r<=l.y&&n>=l.x&&i>=l.y)return!0}var u=[new a(e,r),new a(e,i),new a(n,i),new a(n,r)];if(t.length>2)for(var c=0,h=u;c<h.length;c+=1)if(Po(t,h[c]))return!0;for(var p=0;p<t.length-1;p++)if(Io(t[p],t[p+1],u))return!0;return!1}(t.cameraQueryGeometry,e-c,r-c,n+c,i+c)}));d<m.length;d+=1){var y=m[d];p.push(y)}p.sort(th);for(var v,g={},_=function(a){var c=p[a];if(c!==v){v=c;var h=i.featureIndexArray.get(c),f=null;i.loadMatchingFeature(g,h.bucketIndex,h.sourceLayerIndex,h.featureIndex,l,o.layers,o.availableImages,e,r,n,(function(e,r,n){return f||(f=vo(e)),r.queryIntersectsFeature(u,e,n,f,i.z,t.transform,s,t.pixelPosMatrix)}))}},x=0;x<p.length;x++)_(x);return g},Kc.prototype.loadMatchingFeature=function(t,e,r,n,i,a,o,s,l,u,c){var h=this.bucketLayerIDs[e];if(!a||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(a,h)){var p=this.sourceLayerCoder.decode(r),d=this.vtLayers[p].feature(n);if(i.needGeometry){var m=go(d,!0);if(!i.filter(new zi(this.tileID.overscaledZ),m,this.tileID.canonical))return}else if(!i.filter(new zi(this.tileID.overscaledZ),d))return;for(var y=this.getId(d,p),v=0;v<h.length;v++){var g=h[v];if(!(a&&a.indexOf(g)<0)){var _=s[g];if(_){var x={};void 0!==y&&u&&(x=u.getState(_.sourceLayer||"_geojsonTileLayer",y));var b=f({},l[g]);b.paint=Qc(b.paint,_.paint,d,x,o),b.layout=Qc(b.layout,_.layout,d,x,o);var w=!c||c(d,_,x);if(w){var T=new Wc(d,this.z,this.x,this.y,y);T.layer=b;var k=t[g];void 0===k&&(k=t[g]=[]),k.push({featureIndex:n,feature:T,intersectionZ:w})}}}}}},Kc.prototype.lookupSymbolFeatures=function(t,e,r,n,i,a,o,s){var l={};this.loadVTLayers();for(var u=Mn(i),c=0,h=t;c<h.length;c+=1){var p=h[c];this.loadMatchingFeature(l,r,n,p,u,a,o,s,e)}return l},Kc.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var n=0,i=r[e];n<i.length;n+=1)if(t===i[n])return!0;return!1},Kc.prototype.getId=function(t,e){var r=t.id;if(this.promoteId){var n="string"==typeof this.promoteId?this.promoteId:this.promoteId[e];"boolean"==typeof(r=t.properties[n])&&(r=Number(r))}return r},oi("FeatureIndex",Kc,{omit:["rawTileData","sourceLayerCoder"]});var eh=function(t,e){this.tileID=t,this.uid=m(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};eh.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<N.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},eh.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},eh.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var n in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var n=function(){var t=a[i],n=t.layerIds.map((function(t){return e.getLayer(t)})).filter(Boolean);if(0!==n.length){t.layers=n,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map((function(t){return n.filter((function(e){return e.id===t}))[0]})));for(var o=0,s=n;o<s.length;o+=1){var l=s[o];r[l.id]=t}}},i=0,a=t;i<a.length;i+=1)n();return r}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var i=this.buckets[n];if(i instanceof pc){if(this.hasSymbolBuckets=!0,!r)break;i.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var a in this.buckets){var o=this.buckets[a];if(o instanceof pc&&o.hasRTLText){this.hasRTLText=!0,Di.isLoading()||Di.isLoaded()||"deferred"!==Ii()||Ei();break}}for(var s in this.queryPadding=0,this.buckets){var l=this.buckets[s];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(s).queryRadius(l))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new Ma},eh.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},eh.prototype.getBucket=function(t){return this.buckets[t.id]},eh.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Lc(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Lc(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},eh.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},eh.prototype.queryRenderedFeatures=function(t,e,r,n,i,a,o,s,l,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:n,cameraQueryGeometry:i,scale:a,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:o,queryPadding:this.queryPadding*l},t,e,r):{}},eh.prototype.querySourceFeatures=function(t,e){var r=this.latestFeatureIndex;if(r&&r.rawTileData){var n=r.loadVTLayers(),i=e?e.sourceLayer:"",a=n._geojsonTileLayer||n[i];if(a)for(var o=Mn(e&&e.filter),s=this.tileID.canonical,l=s.z,u=s.x,c=s.y,h={z:l,x:u,y:c},p=0;p<a.length;p++){var f=a.feature(p);if(o.needGeometry){var d=go(f,!0);if(!o.filter(new zi(this.tileID.overscaledZ),d,this.tileID.canonical))continue}else if(!o.filter(new zi(this.tileID.overscaledZ),f))continue;var m=r.getId(f,i),y=new Wc(f,l,u,c,m);y.tile=h,t.push(y)}}},eh.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},eh.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},eh.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=L(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var n=Date.now(),i=!1;if(this.expirationTime>n)i=!1;else if(e)if(this.expirationTime<e)i=!0;else{var a=this.expirationTime-e;a?this.expirationTime=n+Math.max(a,3e4):i=!0}else i=!0;i?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},eh.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},eh.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var n in this.buckets)if(e.style.hasLayer(n)){var i=this.buckets[n],a=i.layers[0].sourceLayer||"_geojsonTileLayer",o=r[a],s=t[a];if(o&&s&&0!==Object.keys(s).length){i.update(s,o,this.imageAtlas&&this.imageAtlas.patternPositions||{});var l=e&&e.style&&e.style.getLayer(n);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(i)))}}}},eh.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},eh.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<N.now()},eh.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},eh.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=N.now()+t},eh.prototype.setDependencies=function(t,e){for(var r={},n=0,i=e;n<i.length;n+=1)r[i[n]]=!0;this.dependencies[t]=r},eh.prototype.hasDependency=function(t,e){for(var r=0,n=t;r<n.length;r+=1){var i=n[r],a=this.dependencies[i];if(a)for(var o=0,s=e;o<s.length;o+=1)if(a[s[o]])return!0}return!1};var rh=s.performance,nh=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},rh.mark(this._marks.start)};nh.prototype.finish=function(){rh.mark(this._marks.end);var t=rh.getEntriesByName(this._marks.measure);return 0===t.length&&(rh.measure(this._marks.measure,this._marks.start,this._marks.end),t=rh.getEntriesByName(this._marks.measure),rh.clearMarks(this._marks.start),rh.clearMarks(this._marks.end),rh.clearMeasures(this._marks.measure)),t},t.Actor=Pc,t.AlphaImage=Ko,t.CanonicalTileID=Vc,t.CollisionBoxArray=Ma,t.Color=ue,t.DEMData=Zc,t.DataConstantProperty=qi,t.DictionaryCoder=Yc,t.EXTENT=fo,t.ErrorEvent=Ot,t.EvaluationParameters=zi,t.Event=zt,t.Evented=Rt,t.FeatureIndex=Kc,t.FillBucket=js,t.FillExtrusionBucket=il,t.ImageAtlas=su,t.ImagePosition=au,t.LineBucket=ml,t.LngLat=zc,t.LngLatBounds=Ec,t.MercatorCoordinate=jc,t.ONE_EM=Cl,t.OverscaledTileID=Hc,t.Point=a,t.Point$1=a,t.Properties=Wi,t.Protobuf=El,t.RGBAImage=Qo,t.RequestManager=Z,t.RequestPerformance=nh,t.ResourceType=bt,t.SegmentVector=Oa,t.SourceFeatureState=Jc,t.StructArrayLayout1ui2=wa,t.StructArrayLayout2f1f2i16=fa,t.StructArrayLayout2i4=ra,t.StructArrayLayout3ui6=ma,t.StructArrayLayout4i8=na,t.SymbolBucket=pc,t.Texture=Lc,t.Tile=eh,t.Transitionable=Fi,t.Uniform1f=Ja,t.Uniform1i=Xa,t.Uniform2f=Ka,t.Uniform3f=Qa,t.Uniform4f=$a,t.UniformColor=to,t.UniformMatrix4f=ro,t.UnwrappedTileID=qc,t.ValidationError=Bt,t.WritingMode=lu,t.ZoomHistory=pi,t.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t},t.addDynamicAttributes=lc,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var n=t.length,i=new Array(t.length),a=null;t.forEach((function(t,o){e(t,(function(t,e){t&&(a=t),i[o]=e,0==--n&&r(a,i)}))}))},t.bezier=u,t.bindAll=g,t.browser=N,t.cacheEntryPossiblyAdded=function(t){++_t>pt&&(t.getActor().send("enforceCacheSizeLimit",ht),_t=0)},t.clamp=h,t.clearTileCache=function(t){var e=s.caches.delete(ct);t&&e.catch(t).then((function(){return t()}))},t.clipLine=Fu,t.clone=function(t){var e=new Fo(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=w,t.clone$2=function(t){var e=new Fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Al,t.config=U,t.create=function(){var t=new Fo(16);return Fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new Fo(9);return Fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new Fo(4);return Fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=hn,t.createLayout=ta,t.createStyleLayer=function(t){return"custom"===t.type?new bc(t):new wc[t.type](t)},t.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!t(e[n],r[n]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==r){if("object"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var i in e)if(!t(e[i],r[i]))return!1;return!0}return e===r},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.dot$1=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},t.ease=c,t.emitValidationErrors=$n,t.endsWith=_,t.enforceCacheSizeLimit=function(t){dt(),rt&&rt.then((function(e){e.keys().then((function(r){for(var n=0;n<r.length-t;n++)e.delete(r[n])}))}))},t.evaluateSizeForFeature=Su,t.evaluateSizeForZoom=Lu,t.evaluateVariableOffset=Qu,t.evented=Pi,t.extend=f,t.featureFilter=Mn,t.filterObject=b,t.fromRotation=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=-r,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=bu,t.getAnchorJustification=$u,t.getArrayBuffer=At,t.getImage=It,t.getJSON=function(t,e){return Mt(f(t,{type:"json"}),e)},t.getRTLTextPluginStatus=Ii,t.getReferrer=Tt,t.getVideo=function(t,e){var r,n,i=s.document.createElement("video");i.muted=!0,i.onloadstart=function(){e(null,i)};for(var a=0;a<t.length;a++){var o=s.document.createElement("source");r=t[a],n=void 0,(n=s.document.createElement("a")).href=r,n.protocol===s.document.location.protocol&&n.host===s.document.location.host||(i.crossOrigin="Anonymous"),o.src=t[a],i.appendChild(o)}return{cancel:function(){}}},t.identity=Bo,t.invert=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15],g=r*s-n*o,_=r*l-i*o,x=r*u-a*o,b=n*l-i*s,w=n*u-a*s,T=i*u-a*l,k=c*m-h*d,M=c*y-p*d,A=c*v-f*d,S=h*y-p*m,L=h*v-f*m,C=p*v-f*y,P=g*C-_*L+x*S+b*A-w*M+T*k;return P?(P=1/P,t[0]=(s*C-l*L+u*S)*P,t[1]=(i*L-n*C-a*S)*P,t[2]=(m*T-y*w+v*b)*P,t[3]=(p*w-h*T-f*b)*P,t[4]=(l*A-o*C-u*M)*P,t[5]=(r*C-i*A+a*M)*P,t[6]=(y*x-d*T-v*_)*P,t[7]=(c*T-p*x+f*_)*P,t[8]=(o*L-s*A+u*k)*P,t[9]=(n*A-r*L-a*k)*P,t[10]=(d*w-m*x+v*g)*P,t[11]=(h*x-c*w-f*g)*P,t[12]=(s*M-o*S-l*k)*P,t[13]=(r*S-n*M+i*k)*P,t[14]=(m*_-d*b-y*g)*P,t[15]=(c*b-h*_+p*g)*P,t):null},t.isChar=fi,t.isMapboxURL=Y,t.keysDifference=function(t,e){var r=[];for(var n in t)n in e||r.push(n);return r},t.makeRequest=Mt,t.mapObject=x,t.mercatorXfromLng=Fc,t.mercatorYfromLat=Bc,t.mercatorZfromAltitude=Nc,t.mul=Uo,t.multiply=No,t.mvt=tl,t.nextPowerOfTwo=function(t){return t<=1?1:Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},t.normalize=function(t,e){var r=e[0],n=e[1],i=e[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=er,t.offscreenCanvasSupported=xt,t.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new El(t).readFields($l,[])},t.pbf=El,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=fo/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,u=t.layers[0]._unevaluatedLayout._values,c={};if("composite"===t.textSizeData.kind){var h=t.textSizeData,p=h.minZoom,f=h.maxZoom;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new zi(p),o),u["text-size"].possiblyEvaluate(new zi(f),o)]}if("composite"===t.iconSizeData.kind){var d=t.iconSizeData,m=d.minZoom,y=d.maxZoom;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new zi(m),o),u["icon-size"].possiblyEvaluate(new zi(y),o)]}c.layoutTextSize=u["text-size"].possiblyEvaluate(new zi(t.zoom+1),o),c.layoutIconSize=u["icon-size"].possiblyEvaluate(new zi(t.zoom+1),o),c.textMaxSize=u["text-size"].possiblyEvaluate(new zi(18));for(var v=l.get("text-line-height")*Cl,g="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),_=l.get("text-keep-upright"),x=l.get("text-size"),b=function(){var a=T[w],s=l.get("text-font").evaluate(a,{},o).join(","),u=x.evaluate(a,{},o),h=c.layoutTextSize.evaluate(a,{},o),p=c.layoutIconSize.evaluate(a,{},o),f={horizontal:{},vertical:void 0},d=a.text,m=[0,0];if(d){var y=d.toString(),b=l.get("text-letter-spacing").evaluate(a,{},o)*Cl,M=function(t){for(var e=0,r=t;e<r.length;e+=1)if(n=r[e].charCodeAt(0),fi.Arabic(n)||fi["Arabic Supplement"](n)||fi["Arabic Extended-A"](n)||fi["Arabic Presentation Forms-A"](n)||fi["Arabic Presentation Forms-B"](n))return!1;var n;return!0}(y)?b:0,A=l.get("text-anchor").evaluate(a,{},o),S=l.get("text-variable-anchor");if(!S){var L=l.get("text-radial-offset").evaluate(a,{},o);m=L?Qu(A,[L*Cl,Ku]):l.get("text-offset").evaluate(a,{},o).map((function(t){return t*Cl}))}var C=g?"center":l.get("text-justify").evaluate(a,{},o),P=l.get("symbol-placement"),I="point"===P?l.get("text-max-width").evaluate(a,{},o)*Cl:0,E=function(){t.allowVerticalPlacement&&di(y)&&(f.vertical=pu(d,e,r,i,s,I,v,A,"left",M,m,lu.vertical,!0,P,h,u))};if(!g&&S){for(var D="auto"===C?S.map((function(t){return $u(t)})):[C],z=!1,O=0;O<D.length;O++){var R=D[O];if(!f.horizontal[R])if(z)f.horizontal[R]=f.horizontal[0];else{var F=pu(d,e,r,i,s,I,v,"center",R,M,m,lu.horizontal,!1,P,h,u);F&&(f.horizontal[R]=F,z=1===F.positionedLines.length)}}E()}else{"auto"===C&&(C=$u(A));var B=pu(d,e,r,i,s,I,v,A,C,M,m,lu.horizontal,!1,P,h,u);B&&(f.horizontal[C]=B),E(),di(y)&&g&&_&&(f.vertical=pu(d,e,r,i,s,I,v,A,C,M,m,lu.vertical,!1,P,h,u))}}var N=void 0,U=!1;if(a.icon&&a.icon.name){var j=n[a.icon.name];j&&(N=function(t,e,r){var n=bu(r),i=n.horizontalAlign,a=n.verticalAlign,o=e[0],s=e[1],l=o-t.displaySize[0]*i,u=l+t.displaySize[0],c=s-t.displaySize[1]*a;return{image:t,top:c,bottom:c+t.displaySize[1],left:l,right:u}}(i[a.icon.name],l.get("icon-offset").evaluate(a,{},o),l.get("icon-anchor").evaluate(a,{},o)),U=j.sdf,void 0===t.sdfIcons?t.sdfIcons=j.sdf:t.sdfIcons!==j.sdf&&k("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(j.pixelRatio!==t.pixelRatio||0!==l.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}var V=nc(f.horizontal)||f.vertical;t.iconsInText=!!V&&V.iconsInText,(V||N)&&function(t,e,r,n,i,a,o,s,l,u,c){var h=a.textMaxSize.evaluate(e,{});void 0===h&&(h=o);var p,f=t.layers[0].layout,d=f.get("icon-offset").evaluate(e,{},c),m=nc(r.horizontal),y=24,v=o/y,g=t.tilePixelRatio*v,_=t.tilePixelRatio*h/y,x=t.tilePixelRatio*s,b=t.tilePixelRatio*f.get("symbol-spacing"),w=f.get("text-padding")*t.tilePixelRatio,T=f.get("icon-padding")*t.tilePixelRatio,M=f.get("text-max-angle")/180*Math.PI,A="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),S="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),L=f.get("symbol-placement"),C=b/2,P=f.get("icon-text-fit");n&&"none"!==P&&(t.allowVerticalPlacement&&r.vertical&&(p=Tu(n,r.vertical,P,f.get("icon-text-fit-padding"),d,v)),m&&(n=Tu(n,m,P,f.get("icon-text-fit-padding"),d,v)));var I=function(s,h){h.x<0||h.x>=fo||h.y<0||h.y>=fo||function(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m,y,v,g,_,x,b,w,T,M){var A,S,L,C,P,I=t.addToLineVertexArray(e,r),E=0,D=0,z=0,O=0,R=-1,F=-1,B={},N=Ua(""),U=0,j=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(U=(A=s.layout.get("text-offset").evaluate(x,{},T).map((function(t){return t*Cl})))[0],j=A[1]):(U=s.layout.get("text-radial-offset").evaluate(x,{},T)*Cl,j=Ku),t.allowVerticalPlacement&&n.vertical){var V=s.layout.get("text-rotate").evaluate(x,{},T)+90,q=n.vertical;C=new Hu(l,e,u,c,h,q,p,f,d,V),o&&(P=new Hu(l,e,u,c,h,o,y,v,d,V))}if(i){var H=s.layout.get("icon-rotate").evaluate(x,{}),G="none"!==s.layout.get("icon-text-fit"),Z=Nu(i,H,w,G),Y=o?Nu(o,H,w,G):void 0;L=new Hu(l,e,u,c,h,i,y,v,!1,H),E=4*Z.length;var W=t.iconSizeData,X=null;"source"===W.kind?(X=[Mu*s.layout.get("icon-size").evaluate(x,{})])[0]>ec&&k(t.layerIds[0]+': Value for "icon-size" is >= '+tc+'. Reduce your "icon-size".'):"composite"===W.kind&&((X=[Mu*b.compositeIconSizes[0].evaluate(x,{},T),Mu*b.compositeIconSizes[1].evaluate(x,{},T)])[0]>ec||X[1]>ec)&&k(t.layerIds[0]+': Value for "icon-size" is >= '+tc+'. Reduce your "icon-size".'),t.addSymbols(t.icon,Z,X,_,g,x,!1,e,I.lineStartIndex,I.lineLength,-1,T),R=t.icon.placedSymbolArray.length-1,Y&&(D=4*Y.length,t.addSymbols(t.icon,Y,X,_,g,x,lu.vertical,e,I.lineStartIndex,I.lineLength,-1,T),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=Ua(K.text);var Q=s.layout.get("text-rotate").evaluate(x,{},T);S=new Hu(l,e,u,c,h,K,p,f,d,Q)}var $=1===K.positionedLines.length;if(z+=rc(t,e,K,a,s,d,x,m,I,n.vertical?lu.horizontal:lu.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,b,T),$)break}n.vertical&&(O+=rc(t,e,n.vertical,a,s,d,x,m,I,lu.vertical,["vertical"],B,F,b,T));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=C?C.boxStartIndex:t.collisionBoxArray.length,nt=C?C.boxEndIndex:t.collisionBoxArray.length,it=L?L.boxStartIndex:t.collisionBoxArray.length,at=L?L.boxEndIndex:t.collisionBoxArray.length,ot=P?P.boxStartIndex:t.collisionBoxArray.length,st=P?P.boxEndIndex:t.collisionBoxArray.length,lt=-1,ut=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ut(S,lt),lt=ut(C,lt),lt=ut(L,lt);var ct=(lt=ut(P,lt))>-1?1:0;ct&&(lt*=M/Cl),t.glyphOffsetArray.length>=pc.MAX_GLYPHS&&k("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,u,z,O,E,D,ct,0,p,U,j,lt)}(t,h,s,r,n,i,p,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,w,A,l,x,T,S,d,e,a,u,c,o)};if("line"===L)for(var E=0,D=Fu(e.geometry,0,0,fo,fo);E<D.length;E+=1)for(var z=D[E],O=0,R=Ou(z,b,M,r.vertical||m,n,y,_,t.overscaling,fo);O<R.length;O+=1){var F=R[O];m&&ic(t,m.text,C,F)||I(z,F)}else if("line-center"===L)for(var B=0,N=e.geometry;B<N.length;B+=1){var U=N[B];if(U.length>1){var j=zu(U,M,r.vertical||m,n,y,_);j&&I(U,j)}}else if("Polygon"===e.type)for(var V=0,q=Fs(e.geometry,0);V<q.length;V+=1){var H=q[V],G=Yu(H,16);I(H[0],new ku(G.x,G.y,0))}else if("LineString"===e.type)for(var Z=0,Y=e.geometry;Z<Y.length;Z+=1){var W=Y[Z];I(W,new ku(W[0].x,W[0].y,0))}else if("Point"===e.type)for(var X=0,J=e.geometry;X<J.length;X+=1)for(var K=0,Q=J[X];K<Q.length;K+=1){var $=Q[K];I([$],new ku($.x,$.y,0))}}(t,a,f,N,n,c,h,p,m,U,o)},w=0,T=t.features;w<T.length;w+=1)b();a&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,r,n,i){var a,o=1/Math.tan(e/2);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(a=1/(n-i),t[10]=(i+n)*a,t[14]=2*i*n*a):(t[10]=-1,t[14]=-2*n),t},t.pick=function(t,e){for(var r={},n=0;n<e.length;n++){var i=e[n];i in t&&(r[i]=t[i])}return r},t.plugin=Di,t.polygonIntersectsPolygon=bo,t.postMapLoadEvent=ut,t.postTurnstileEvent=st,t.potpack=nu,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=oi,t.registerForPluginStateChange=function(t){return t({pluginStatus:Ai,pluginURL:Si}),Pi.on("pluginStateChange",t),t},t.renderColorRamp=ts,t.rotate=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=n*l+a*s,t[1]=i*l+o*s,t[2]=n*-s+a*l,t[3]=i*-s+o*l,t},t.rotateX=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+h*n,t[7]=l*i+p*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=h*i-s*n,t[11]=p*i-l*n,t},t.rotateZ=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+h*n,t[3]=l*i+p*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=h*i-s*n,t[7]=p*i-l*n,t},t.scale=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.scale$1=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},t.scale$2=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t},t.setCacheLimits=function(t,e){ht=t,pt=e},t.setRTLTextPlugin=function(t,e,r){if(void 0===r&&(r=!1),Ai===bi||Ai===wi||Ai===Ti)throw new Error("setRTLTextPlugin cannot be called multiple times.");Si=N.resolveURL(t),Ai=bi,Mi=e,Ci(),r||Ei()},t.sphericalToCartesian=function(t){var e=t[0],r=t[1],n=t[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(n),y:e*Math.sin(r)*Math.sin(n),z:e*Math.cos(n)}},t.sqrLen=Ho,t.styleSpec=Ft,t.sub=Vo,t.symbolSize=Cu,t.transformMat3=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t},t.transformMat4=qo,t.translate=function(t,e,r){var n,i,a,o,s,l,u,c,h,p,f,d,m=r[0],y=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*v+e[12],t[13]=e[1]*m+e[5]*y+e[9]*v+e[13],t[14]=e[2]*m+e[6]*y+e[10]*v+e[14],t[15]=e[3]*m+e[7]*y+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=p,t[10]=f,t[11]=d,t[12]=n*m+s*y+h*v+e[12],t[13]=i*m+l*y+p*v+e[13],t[14]=a*m+u*y+f*v+e[14],t[15]=o*m+c*y+d*v+e[15]),t},t.triggerPluginCompletionEvent=Li,t.uniqueId=m,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:"layers."+r+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+r+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),e},t.validateLight=Jn,t.validateStyle=Xn,t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.vectorTile=tl,t.version=r,t.warnOnce=k,t.webpSupported=j,t.window=s,t.wrap=p})),n(0,(function(t){function e(t){var r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var n="[",i=0,a=t;i<a.length;i+=1)n+=e(a[i])+",";return n+"]"}for(var o=Object.keys(t).sort(),s="{",l=0;l<o.length;l++)s+=JSON.stringify(o[l])+":"+e(t[o[l]])+",";return s+"}"}function r(r){for(var n="",i=0,a=t.refProperties;i<a.length;i+=1)n+="/"+e(r[a[i]]);return n}var n=function(t){this.keyCache={},t&&this.replace(t)};n.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},n.prototype.update=function(e,n){for(var i=this,a=0,o=e;a<o.length;a+=1){var s=o[a];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var u=0,c=n;u<c.length;u+=1){var h=c[u];delete this.keyCache[h],delete this._layerConfigs[h],delete this._layers[h]}this.familiesBySource={};for(var p=0,f=function(t,e){for(var n={},i=0;i<t.length;i++){var a=e&&e[t[i].id]||r(t[i]);e&&(e[t[i].id]=a);var o=n[a];o||(o=n[a]=[]),o.push(t[i])}var s=[];for(var l in n)s.push(n[l]);return s}(t.values(this._layerConfigs),this.keyCache);p<f.length;p+=1){var d=f[p].map((function(t){return i._layers[t.id]})),m=d[0];if("none"!==m.visibility){var y=m.source||"",v=this.familiesBySource[y];v||(v=this.familiesBySource[y]={});var g=m.sourceLayer||"_geojsonTileLayer",_=v[g];_||(_=v[g]=[]),_.push(d)}}};var i=function(e){var r={},n=[];for(var i in e){var a=e[i],o=r[i]={};for(var s in a){var l=a[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var u={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};n.push(u),o[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(n),h=c.w,p=c.h,f=new t.AlphaImage({width:h||1,height:p||1});for(var d in e){var m=e[d];for(var y in m){var v=m[+y];if(v&&0!==v.bitmap.width&&0!==v.bitmap.height){var g=r[d][y].rect;t.AlphaImage.copy(v.bitmap,f,{x:0,y:0},{x:g.x+1,y:g.y+1},v.bitmap)}}}this.image=f,this.positions=r};t.register("GlyphAtlas",i);var a=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId};function o(e,r,n){for(var i=new t.EvaluationParameters(r),a=0,o=e;a<o.length;a+=1)o[a].recalculate(i,n)}function s(e,r){var n=t.getArrayBuffer(e.request,(function(e,n,i,a){e?r(e):n&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(n)),rawData:n,cacheControl:i,expires:a})}));return function(){n.cancel(),r()}}a.prototype.parse=function(e,r,n,a,s){var l=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var u=new t.DictionaryCoder(Object.keys(e.layers).sort()),c=new t.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];var h,p,f,d,m={},y={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:n},v=r.familiesBySource[this.source];for(var g in v){var _=e.layers[g];if(_){1===_.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+g+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var x=u.encode(g),b=[],w=0;w<_.length;w++){var T=_.feature(w),k=c.getId(T,g);b.push({feature:T,id:k,index:w,sourceLayerIndex:x})}for(var M=0,A=v[g];M<A.length;M+=1){var S=A[M],L=S[0];L.minzoom&&this.zoom<Math.floor(L.minzoom)||L.maxzoom&&this.zoom>=L.maxzoom||"none"!==L.visibility&&(o(S,this.zoom,n),(m[L.id]=L.createBucket({index:c.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,y,this.tileID.canonical),c.bucketLayerIDs.push(S.map((function(t){return t.id}))))}}}var C=t.mapObject(y.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(C).length?a.send("getGlyphs",{uid:this.uid,stacks:C},(function(t,e){h||(h=t,p=e,E.call(l))})):p={};var P=Object.keys(y.iconDependencies);P.length?a.send("getImages",{icons:P,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){h||(h=t,f=e,E.call(l))})):f={};var I=Object.keys(y.patternDependencies);function E(){if(h)return s(h);if(p&&f&&d){var e=new i(p),r=new t.ImageAtlas(f,d);for(var a in m){var l=m[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,p,e.positions,f,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(y,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?p:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}I.length?a.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){h||(h=t,d=e,E.call(l))})):d={},E.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status="done",n.loaded[i]=s,r(e);var l=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl);var c={};if(o){var h=o.finish();h&&(c.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,u,c))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};c.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=u&&a instanceof u?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},c.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var h=function t(e,r){var n,i=e&&e.type;if("FeatureCollection"===i)for(n=0;n<e.features.length;n++)t(e.features[n],r);else if("GeometryCollection"===i)for(n=0;n<e.geometries.length;n++)t(e.geometries[n],r);else if("Feature"===i)t(e.geometry,r);else if("Polygon"===i)p(e.coordinates,r);else if("MultiPolygon"===i)for(n=0;n<e.coordinates.length;n++)p(e.coordinates[n],r);return e};function p(t,e){if(0!==t.length){f(t[0],e);for(var r=1;r<t.length;r++)f(t[r],!e)}}function f(t,e){for(var r=0,n=0,i=t.length,a=i-1;n<i;a=n++)r+=(t[n][0]-t[a][0])*(t[a][1]+t[n][1]);r>=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,m=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};m.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r<n.length;r+=1){var i=n[r];e.push([new t.Point$1(i[0],i[1])])}return e}for(var a=[],o=0,s=this._feature.geometry;o<s.length;o+=1){for(var l=[],u=0,c=s[o];u<c.length;u+=1){var h=c[u];l.push(new t.Point$1(h[0],h[1]))}a.push(l)}return a},m.prototype.toGeoJSON=function(t,e,r){return d.call(this,t,e,r)};var y=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};y.prototype.feature=function(t){return new m(this._features[t])};var v=t.vectorTile.VectorTileFeature,g=_;function _(t,e){this.options=e||{},this.features=t,this.length=t.length}function x(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}_.prototype.feature=function(t){return new x(this.features[t],this.options.extent)},x.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var n=e[r],i=[],a=0;a<n.length;a++)i.push(new t.Point$1(n[a][0],n[a][1]));this.geometry.push(i)}return this.geometry},x.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,n=1/0,i=-1/0,a=0;a<t.length;a++)for(var o=t[a],s=0;s<o.length;s++){var l=o[s];e=Math.min(e,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}return[e,n,r,i]},x.prototype.toGeoJSON=v.prototype.toGeoJSON;var b=M,w=M,T=function(t,e){e=e||{};var r={};for(var n in t)r[n]=new g(t[n].features,e),r[n].name=n,r[n].version=e.version,r[n].extent=e.extent;return M({layers:r})},k=g;function M(e){var r=new t.pbf;return function(t,e){for(var r in t.layers)e.writeMessage(3,A,t.layers[r])}(e,r),r.finish()}function A(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)n.feature=t.feature(r),e.writeMessage(2,S,n);var i=n.keys;for(r=0;r<i.length;r++)e.writeStringField(3,i[r]);var a=n.values;for(r=0;r<a.length;r++)e.writeMessage(4,E,a[r])}function S(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,L,t),e.writeVarintField(3,r.type),e.writeMessage(4,I,r)}function L(t,e){var r=t.feature,n=t.keys,i=t.values,a=t.keycache,o=t.valuecache;for(var s in r.properties){var l=a[s];void 0===l&&(n.push(s),l=n.length-1,a[s]=l),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var h=c+":"+u,p=o[h];void 0===p&&(i.push(u),p=i.length-1,o[h]=p),e.writeVarint(p)}}function C(t,e){return(e<<3)+(7&t)}function P(t){return t<<1^t>>31}function I(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s<o;s++){var l=r[s],u=1;1===n&&(u=l.length),e.writeVarint(C(1,u));for(var c=3===n?l.length-1:l.length,h=0;h<c;h++){1===h&&1!==n&&e.writeVarint(C(2,c-1));var p=l[h].x-i,f=l[h].y-a;e.writeVarint(P(p)),e.writeVarint(P(f)),i+=p,a+=f}3===n&&e.writeVarint(C(7,1))}}function E(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function D(t,e,r,n,i,a){if(!(i-n<=r)){var o=n+i>>1;z(t,e,o,n,i,a%2),D(t,e,r,n,o-1,a+1),D(t,e,r,o+1,i,a+1)}}function z(t,e,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(o-u)/o)*(s-o/2<0?-1:1);z(t,e,r,Math.max(n,Math.floor(r-s*u/o+c)),Math.min(i,Math.floor(r+(o-s)*u/o+c)),a)}var h=e[2*r+a],p=n,f=i;for(O(t,e,n,r),e[2*i+a]>h&&O(t,e,n,i);p<f;){for(O(t,e,p,f),p++,f--;e[2*p+a]<h;)p++;for(;e[2*f+a]>h;)f--}e[2*n+a]===h?O(t,e,n,f):O(t,e,++f,i),f<=r&&(n=f+1),r<=f&&(i=f-1)}}function O(t,e,r,n){R(t,r,n),R(e,2*r,2*n),R(e,2*r+1,2*n+1)}function R(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function F(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}b.fromVectorTileJs=w,b.fromGeojsonVt=T,b.GeoJSONWrapper=k;var B=function(t){return t[0]},N=function(t){return t[1]},U=function(t,e,r,n,i){void 0===e&&(e=B),void 0===r&&(r=N),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l<t.length;l++)o[l]=l,s[2*l]=e(t[l]),s[2*l+1]=r(t[l]);D(o,s,n,0,o.length-1,0)};U.prototype.range=function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var h=u.pop(),p=u.pop(),f=u.pop();if(p-f<=o)for(var d=f;d<=p;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[d]);else{var m=Math.floor((f+p)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[m]);var y=(h+1)%2;(0===h?r<=s:n<=l)&&(u.push(f),u.push(m-1),u.push(y)),(0===h?i>=s:a>=l)&&(u.push(m+1),u.push(p),u.push(y))}}return c}(this.ids,this.coords,t,e,r,n,this.nodeSize)},U.prototype.within=function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var u=o.pop(),c=o.pop(),h=o.pop();if(c-h<=a)for(var p=h;p<=c;p++)F(e[2*p],e[2*p+1],r,n)<=l&&s.push(t[p]);else{var f=Math.floor((h+c)/2),d=e[2*f],m=e[2*f+1];F(d,m,r,n)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?r-i<=d:n-i<=m)&&(o.push(h),o.push(f-1),o.push(y)),(0===u?r+i>=d:n+i>=m)&&(o.push(f+1),o.push(c),o.push(y))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},V=function(t){this.options=X(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function q(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function G(t){return{type:"Feature",id:t.id,properties:Z(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function Z(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function X(t,e){for(var r in e)t[r]=e[r];return t}function J(t){return t.x}function K(t){return t.y}function Q(t,e,r,n){for(var i,a=n,o=r-e>>1,s=r-e,l=t[e],u=t[e+1],c=t[r],h=t[r+1],p=e+3;p<r;p+=3){var f=$(t[p],t[p+1],l,u,c,h);if(f>a)i=p,a=f;else if(f===a){var d=Math.abs(p-o);d<s&&(i=p,s=d)}}a>n&&(i-e>3&&Q(t,e,i,n),t[i+2]=a,r-i>3&&Q(t,i,r,n))}function $(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function tt(t,e,r,n){var i={id:void 0===t?null:t,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)et(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n<e.length;n++)et(t,e[n]);else if("MultiPolygon"===r)for(n=0;n<e.length;n++)for(var i=0;i<e[n].length;i++)et(t,e[n][i])}(i),i}function et(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function rt(t,e,r,n){if(e.geometry){var i=e.geometry.coordinates,a=e.geometry.type,o=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],l=e.id;if(r.promoteId?l=e.properties[r.promoteId]:r.generateId&&(l=n||0),"Point"===a)nt(i,s);else if("MultiPoint"===a)for(var u=0;u<i.length;u++)nt(i[u],s);else if("LineString"===a)it(i,s,o,!1);else if("MultiLineString"===a){if(r.lineMetrics){for(u=0;u<i.length;u++)s=[],it(i[u],s,o,!1),t.push(tt(l,"LineString",s,e.properties));return}at(i,s,o,!1)}else if("Polygon"===a)at(i,s,o,!0);else{if("MultiPolygon"!==a){if("GeometryCollection"===a){for(u=0;u<e.geometry.geometries.length;u++)rt(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},r,n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(u=0;u<i.length;u++){var c=[];at(i[u],c,o,!0),s.push(c)}}t.push(tt(l,a,s,e.properties))}}function nt(t,e){e.push(ot(t[0])),e.push(st(t[1])),e.push(0)}function it(t,e,r,n){for(var i,a,o=0,s=0;s<t.length;s++){var l=ot(t[s][0]),u=st(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(o+=n?(i*u-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-a,2))),i=l,a=u}var c=e.length-3;e[2]=1,Q(e,0,c,r),e[c+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function at(t,e,r,n){for(var i=0;i<t.length;i++){var a=[];it(t[i],a,r,n),e.push(a)}}function ot(t){return t/360+.5}function st(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function lt(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o<n)return t;if(o<r||a>=n)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],h=c.geometry,p=c.type,f=0===i?c.minX:c.minY,d=0===i?c.maxX:c.maxY;if(f>=r&&d<n)l.push(c);else if(!(d<r||f>=n)){var m=[];if("Point"===p||"MultiPoint"===p)ut(h,m,r,n,i);else if("LineString"===p)ct(h,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===p)pt(h,m,r,n,i,!1);else if("Polygon"===p)pt(h,m,r,n,i,!0);else if("MultiPolygon"===p)for(var y=0;y<h.length;y++){var v=[];pt(h[y],v,r,n,i,!0),v.length&&m.push(v)}if(m.length){if(s.lineMetrics&&"LineString"===p){for(y=0;y<m.length;y++)l.push(tt(c.id,p,m[y],c.tags));continue}"LineString"!==p&&"MultiLineString"!==p||(1===m.length?(p="LineString",m=m[0]):p="MultiLineString"),"Point"!==p&&"MultiPoint"!==p||(p=3===m.length?"Point":"MultiPoint"),l.push(tt(c.id,p,m,c.tags))}}}return l.length?l:null}function ut(t,e,r,n,i){for(var a=0;a<t.length;a+=3){var o=t[a+i];o>=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function ct(t,e,r,n,i,a,o){for(var s,l,u=ht(t),c=0===i?dt:mt,h=t.start,p=0;p<t.length-3;p+=3){var f=t[p],d=t[p+1],m=t[p+2],y=t[p+3],v=t[p+4],g=0===i?f:d,_=0===i?y:v,x=!1;o&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-v,2))),g<r?_>r&&(l=c(u,f,d,y,v,r),o&&(u.start=h+s*l)):g>n?_<n&&(l=c(u,f,d,y,v,n),o&&(u.start=h+s*l)):ft(u,f,d,m),_<r&&g>=r&&(l=c(u,f,d,y,v,r),x=!0),_>n&&g<=n&&(l=c(u,f,d,y,v,n),x=!0),!a&&x&&(o&&(u.end=h+s*l),e.push(u),u=ht(t)),o&&(h+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(g=0===i?f:d)>=r&&g<=n&&ft(u,f,d,m),b=u.length-3,a&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&ft(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ht(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function pt(t,e,r,n,i,a){for(var o=0;o<t.length;o++)ct(t[o],e,r,n,i,a,!1)}function ft(t,e,r,n){t.push(e),t.push(r),t.push(n)}function dt(t,e,r,n,i,a){var o=(a-e)/(n-e);return t.push(a),t.push(r+(i-r)*o),t.push(1),o}function mt(t,e,r,n,i,a){var o=(a-r)/(i-r);return t.push(e+(n-e)*o),t.push(a),t.push(1),o}function yt(t,e){for(var r=[],n=0;n<t.length;n++){var i,a=t[n],o=a.type;if("Point"===o||"MultiPoint"===o||"LineString"===o)i=vt(a.geometry,e);else if("MultiLineString"===o||"Polygon"===o){i=[];for(var s=0;s<a.geometry.length;s++)i.push(vt(a.geometry[s],e))}else if("MultiPolygon"===o)for(i=[],s=0;s<a.geometry.length;s++){for(var l=[],u=0;u<a.geometry[s].length;u++)l.push(vt(a.geometry[s][u],e));i.push(l)}r.push(tt(a.id,o,i,a.tags))}return r}function vt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var n=0;n<t.length;n+=3)r.push(t[n]+e,t[n+1],t[n+2]);return r}function gt(t,e){if(t.transformed)return t;var r,n,i,a=1<<t.z,o=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(n=0;n<u.length;n+=2)l.geometry.push(_t(u[n],u[n+1],e,a,o,s));else for(n=0;n<u.length;n++){var h=[];for(i=0;i<u[n].length;i+=2)h.push(_t(u[n][i],u[n][i+1],e,a,o,s));l.geometry.push(h)}}return t.transformed=!0,t}function _t(t,e,r,n,i,a){return[Math.round(r*(t*n-i)),Math.round(r*(e*n-a))]}function xt(t,e,r,n,i){for(var a=e===i.maxZoom?0:i.tolerance/((1<<e)*i.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){o.numFeatures++,bt(o,t[s],a,i);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,h=t[s].maxY;l<o.minX&&(o.minX=l),u<o.minY&&(o.minY=u),c>o.maxX&&(o.maxX=c),h>o.maxY&&(o.maxY=h)}return o}function bt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s<i.length;s+=3)o.push(i[s]),o.push(i[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===a)wt(o,i,t,r,!1,!1);else if("MultiLineString"===a||"Polygon"===a)for(s=0;s<i.length;s++)wt(o,i[s],t,r,"Polygon"===a,0===s);else if("MultiPolygon"===a)for(var l=0;l<i.length;l++){var u=i[l];for(s=0;s<u.length;s++)wt(o,u[s],t,r,!0,0===s)}if(o.length){var c=e.tags||null;if("LineString"===a&&n.lineMetrics){for(var h in c={},e.tags)c[h]=e.tags[h];c.mapbox_clip_start=i.start/i.size,c.mapbox_clip_end=i.end/i.size}var p={geometry:o,type:"Polygon"===a||"MultiPolygon"===a?3:"LineString"===a||"MultiLineString"===a?2:1,tags:c};null!==e.id&&(p.id=e.id),t.features.push(p)}}function wt(t,e,r,n,i,a){var o=n*n;if(n>0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===n||e[l+2]>o)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n<i;a=n,n+=2)r+=(t[n]-t[a])*(t[n+1]+t[a+1]);if(r>0===e)for(n=0,i=t.length;n<i/2;n+=2){var o=t[n],s=t[n+1];t[n]=t[i-2-n],t[n+1]=t[i-1-n],t[i-2-n]=o,t[i-1-n]=s}}(s,a),t.push(s)}}function Tt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)rt(r,t.features[n],e,n);else"Feature"===t.type?rt(r,t,e):rt(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=function(t,e){var r=e.buffer/e.extent,n=t,i=lt(t,1,-1-r,r,0,-1,2,e),a=lt(t,1,1-r,2+r,0,-1,2,e);return(i||a)&&(n=lt(t,1,-r,1+r,0,-1,2,e)||[],i&&(n=yt(i,1).concat(n)),a&&(n=n.concat(yt(a,-1)))),n}(n,e)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function kt(t,e,r){return 32*((1<<t)*r+e)+t}function Mt(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return e(null,null);var i=new y(n.features),a=b(i);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),e(null,{vectorTile:i,rawData:a.buffer})}V.prototype.load=function(t){var e=this.options,r=e.log,n=e.minZoom,i=e.maxZoom,a=e.nodeSize;r&&console.time("total time");var o="prepare "+t.length+" points";r&&console.time(o),this.points=t;for(var s=[],l=0;l<t.length;l++)t[l].geometry&&s.push(H(t[l],l));this.trees[i+1]=new U(s,J,K,a,Float32Array),r&&console.timeEnd(o);for(var u=i;u>=n;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new U(s,J,K,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return r&&console.timeEnd("total time"),this},V.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,h=l.range(Y(r),W(a),Y(i),W(n));c<h.length;c+=1){var p=h[c],f=l.points[p];u.push(f.numPoints?G(f):this.points[f.index])}return u},V.prototype.getChildren=function(t){var e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);var a=i.points[e];if(!a)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,u=i.within(a.x,a.y,o);l<u.length;l+=1){var c=u[l],h=i.points[c];h.parentId===t&&s.push(h.numPoints?G(h):this.points[h.index])}if(0===s.length)throw new Error(n);return s},V.prototype.getLeaves=function(t,e,r){e=e||10,r=r||0;var n=[];return this._appendLeaves(n,t,e,r,0),n},V.prototype.getTile=function(t,e,r){var n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),a=this.options,o=a.extent,s=a.radius/o,l=(r-s)/i,u=(r+1+s)/i,c={features:[]};return this._addTileFeatures(n.range((e-s)/i,l,(e+1+s)/i,u),n.points,e,r,i,c),0===e&&this._addTileFeatures(n.range(1-s/i,l,1,u),n.points,i,r,i,c),e===i-1&&this._addTileFeatures(n.range(0,l,s/i,u),n.points,-1,r,i,c),c.features.length?c:null},V.prototype.getClusterExpansionZoom=function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},V.prototype._appendLeaves=function(t,e,r,n,i){for(var a=0,o=this.getChildren(e);a<o.length;a+=1){var s=o[a],l=s.properties;if(l&&l.cluster?i+l.point_count<=n?i+=l.point_count:i=this._appendLeaves(t,l.cluster_id,r,n,i):i<n?i++:t.push(s),t.length===r)break}return i},V.prototype._addTileFeatures=function(t,e,r,n,i,a){for(var o=0,s=t;o<s.length;o+=1){var l=e[s[o]],u=l.numPoints,c={type:1,geometry:[[Math.round(this.options.extent*(l.x*i-r)),Math.round(this.options.extent*(l.y*i-n))]],tags:u?Z(l):this.points[l.index].properties},h=void 0;u?h=l.id:this.options.generateId?h=l.index:this.points[l.index].id&&(h=this.points[l.index].id),void 0!==h&&(c.id=h),a.features.push(c)}},V.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(+t,this.options.maxZoom+1))},V.prototype._cluster=function(t,e){for(var r=[],n=this.options,i=n.radius,a=n.extent,o=n.reduce,s=n.minPoints,l=i/(a*Math.pow(2,e)),u=0;u<t.length;u++){var c=t[u];if(!(c.zoom<=e)){c.zoom=e;for(var h=this.trees[e+1],p=h.within(c.x,c.y,l),f=c.numPoints||1,d=f,m=0,y=p;m<y.length;m+=1){var v=y[m],g=h.points[v];g.zoom>e&&(d+=g.numPoints||1)}if(d>=s){for(var _=c.x*f,x=c.y*f,b=o&&f>1?this._map(c,!0):null,w=(u<<5)+(e+1)+this.points.length,T=0,k=p;T<k.length;T+=1){var M=k[T],A=h.points[M];if(!(A.zoom<=e)){A.zoom=e;var S=A.numPoints||1;_+=A.x*S,x+=A.y*S,A.parentId=w,o&&(b||(b=this._map(c,!0)),o(b,this._map(A)))}}c.parentId=w,r.push(q(_/d,x/d,w,d,b))}else if(r.push(c),d>1)for(var L=0,C=p;L<C.length;L+=1){var P=C[L],I=h.points[P];I.zoom<=e||(I.zoom=e,r.push(I))}}}return r},V.prototype._getOriginId=function(t){return t-this.points.length>>5},V.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},V.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},Tt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Tt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,u=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,h=kt(e,r,n),p=this.tiles[h];if(!p&&(u>1&&console.time("creation"),p=this.tiles[h]=xt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(p.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<<i-e;if(r!==Math.floor(a/d)||n!==Math.floor(o/d))continue}else if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue;if(p.source=null,0!==t.length){u>1&&console.time("clipping");var m,y,v,g,_,x,b=.5*l.buffer/l.extent,w=.5-b,T=.5+b,k=1+b;m=y=v=g=null,_=lt(t,c,r-b,r+T,0,p.minX,p.maxX,l),x=lt(t,c,r+w,r+k,0,p.minX,p.maxX,l),t=null,_&&(m=lt(_,c,n-b,n+T,1,p.minY,p.maxY,l),y=lt(_,c,n+w,n+k,1,p.minY,p.maxY,l),_=null),x&&(v=lt(x,c,n-b,n+T,1,p.minY,p.maxY,l),g=lt(x,c,n+w,n+k,1,p.minY,p.maxY,l),x=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*r,2*n),s.push(y||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(g||[],e+1,2*r+1,2*n+1)}}},Tt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t<0||t>24)return null;var o=1<<t,s=kt(t,e=(e%o+o)%o,r);if(this.tiles[s])return gt(this.tiles[s],i);a>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,u=t,c=e,h=r;!l&&u>0;)u--,c=Math.floor(c/2),h=Math.floor(h/2),l=this.tiles[kt(u,c,h)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",u,c,h),a>1&&console.time("drilling down"),this.splitTile(l.source,u,c,h,t,e,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?gt(this.tiles[s],i):null):null};var At=function(e){function r(t,r,n,i){e.call(this,t,r,n,Mt),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));h(o,!0);try{if(n.filter){var s=t.createExpression(n.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===s.result)throw new Error(s.value.map((function(t){return t.key+": "+t.message})).join(", "));var l=o.features.filter((function(t){return s.value.evaluate({zoom:0},t)}));o={type:"FeatureCollection",features:l}}e._geoJSONIndex=n.cluster?new V(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),u=0,c=l;u<c.length;u+=1){var h=c[u],p=n[h],f=p[0],d=p[1],m=t.createExpression(d),y=t.createExpression("string"==typeof f?[f,["accumulated"],["get",h]]:f);i[h]=m.value,a[h]=y.value}return r.map=function(t){s.properties=t;for(var e={},r=0,n=l;r<n.length;r+=1){var a=n[r];e[a]=i[a].evaluate(o,s)}return e},r.reduce=function(t,e){s.properties=e;for(var r=0,n=l;r<n.length;r+=1){var i=n[r];o.accumulated=t[i],t[i]=a[i].evaluate(o,s)}},r}(n)).load(o.features):function(t,e){return new Tt(t,e)}(o,n.geojsonVtOptions)}catch(a){return r(a)}e.loaded={};var u={};if(i){var c=i.finish();c&&(u.resourceTiming={},u.resourceTiming[n.source]=JSON.parse(JSON.stringify(c)))}r(null,u)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(t,r){var n=this.loaded,i=t.uid;return n&&n[i]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if("string"!=typeof e.data)return r(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},r}(l);var St=function(e){var r=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:At},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return St.prototype.setReferrer=function(t,e){this.referrer=e},St.prototype.setImages=function(t,e,r){for(var n in this.availableImages[t]=e,this.workerSources[t]){var i=this.workerSources[t][n];for(var a in i)i[a].availableImages=e}r()},St.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},St.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},St.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},St.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},St.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},St.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},St.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},St.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},St.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var n=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==n.removeSource?n.removeSource(e,r):r()}},St.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},St.prototype.syncRTLPluginState=function(e,r,n){try{t.plugin.setState(r);var i=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=i){this.self.importScripts(i);var a=t.plugin.isParsed();n(a?void 0:new Error("RTL Text Plugin failed to import scripts from "+i),a)}}catch(t){n(t.toString())}},St.prototype.getAvailableImages=function(t){var e=this.availableImages[t];return e||(e=[]),e},St.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new n),e},St.prototype.getWorkerSource=function(t,e,r){var n=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var i={send:function(e,r,i){n.actor.send(e,r,i,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](i,this.getLayerIndex(t),this.getAvailableImages(t))}return this.workerSources[t][e][r]},St.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new c),this.demWorkerSources[t][e]},St.prototype.enforceCacheSizeLimit=function(e,r){t.enforceCacheSizeLimit(r)},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new St(self)),St})),n(0,(function(t){var e=t.createCommonjsModule((function(t){function e(t){return!r(t)}function r(t){return"undefined"!=typeof window&&"undefined"!=typeof document?Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(r);try{e=new Worker(n),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(n),t}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var r=e.getImageData(0,0,1,1);return r&&r.width===t.width}()?(r=t&&t.failIfMajorPerformanceCaveat,void 0===n[r]&&(n[r]=function(t){var r=function(t){var r=document.createElement("canvas"),n=Object.create(e.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",n)||r.probablySupportsContext("experimental-webgl",n):r.supportsContext?r.supportsContext("webgl",n)||r.supportsContext("experimental-webgl",n):r.getContext("webgl",n)||r.getContext("experimental-webgl",n)}(t);if(!r)return!1;var n=r.createShader(r.VERTEX_SHADER);return!(!n||r.isContextLost())&&(r.shaderSource(n,"void main() {}"),r.compileShader(n),!0===r.getShaderParameter(n,r.COMPILE_STATUS))}(r)),n[r]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support":"not a browser";var r}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=r);var n={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),r={create:function(e,r,n){var i=t.window.document.createElement(e);return void 0!==r&&(i.className=r),n&&n.appendChild(i),i},createNS:function(e,r){return t.window.document.createElementNS(e,r)}},n=t.window.document&&t.window.document.documentElement.style;function i(t){if(!n)return t[0];for(var e=0;e<t.length;e++)if(t[e]in n)return t[e];return t[0]}var a,o=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){n&&o&&(a=n[o],n[o]="none")},r.enableDrag=function(){n&&o&&(n[o]=a)};var s=i(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[s]=e};var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.window.addEventListener("test",u,u),t.window.removeEventListener("test",u,u)}catch(t){l=!1}r.addEventListener=function(t,e,r,n){void 0===n&&(n={}),"passive"in n&&l?t.addEventListener(e,r,n):t.addEventListener(e,r,n.capture)},r.removeEventListener=function(t,e,r,n){void 0===n&&(n={}),"passive"in n&&l?t.removeEventListener(e,r,n):t.removeEventListener(e,r,n.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",c,!0)};function h(t){var e=t.userImage;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}r.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout((function(){t.window.removeEventListener("click",c,!0)}),0)},r.mousePos=function(e,r){var n=e.getBoundingClientRect();return new t.Point(r.clientX-n.left-e.clientLeft,r.clientY-n.top-e.clientTop)},r.touchPos=function(e,r){for(var n=e.getBoundingClientRect(),i=[],a=0;a<r.length;a++)i.push(new t.Point(r[a].clientX-n.left-e.clientLeft,r[a].clientY-n.top-e.clientTop));return i},r.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var p=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var n=r[e],i=n.ids,a=n.callback;this._notify(i,a)}this.requestors=[]}},r.prototype.getImage=function(t){return this.images[t]},r.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},r.prototype._validate=function(e,r){var n=!0;return this._validateStretch(r.stretchX,r.data&&r.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchX" value'))),n=!1),this._validateStretch(r.stretchY,r.data&&r.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchY" value'))),n=!1),this._validateContent(r.content,r)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "content" value'))),n=!1),n},r.prototype._validateStretch=function(t,e){if(!t)return!0;for(var r=0,n=0,i=t;n<i.length;n+=1){var a=i[n];if(a[0]<r||a[1]<a[0]||e<a[1])return!1;r=a[1]}return!0},r.prototype._validateContent=function(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))},r.prototype.updateImage=function(t,e){var r=this.images[t];e.version=r.version+1,this.images[t]=e,this.updatedImages[t]=!0},r.prototype.removeImage=function(t){var e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()},r.prototype.listImages=function(){return Object.keys(this.images)},r.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var n=0,i=t;n<i.length;n+=1){var a=i[n];this.images[a]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},r.prototype._notify=function(e,r){for(var n={},i=0,a=e;i<a.length;i+=1){var o=a[i];this.images[o]||this.fire(new t.Event("styleimagemissing",{id:o}));var s=this.images[o];s?n[o]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image "'+o+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}r(null,n)},r.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},r.prototype.getPattern=function(e){var r=this.patterns[e],n=this.getImage(e);if(!n)return null;if(r&&r.position.version===n.version)return r.position;if(r)r.position.version=n.version;else{var i={w:n.data.width+2,h:n.data.height+2,x:0,y:0},a=new t.ImagePosition(i,n);this.patterns[e]={bin:i,position:a}}return this._updatePatternAtlas(),this.patterns[e].position},r.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},r.prototype._updatePatternAtlas=function(){var e=[];for(var r in this.patterns)e.push(this.patterns[r].bin);var n=t.potpack(e),i=n.w,a=n.h,o=this.atlasImage;for(var s in o.resize({width:i||1,height:a||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,h=this.images[s].data,p=h.width,f=h.height;t.RGBAImage.copy(h,o,{x:0,y:0},{x:u,y:c},{width:p,height:f}),t.RGBAImage.copy(h,o,{x:0,y:f-1},{x:u,y:c-1},{width:p,height:1}),t.RGBAImage.copy(h,o,{x:0,y:0},{x:u,y:c+f},{width:p,height:1}),t.RGBAImage.copy(h,o,{x:p-1,y:0},{x:u-1,y:c},{width:1,height:f}),t.RGBAImage.copy(h,o,{x:0,y:0},{x:u+p,y:c},{width:1,height:f})}this.dirty=!0},r.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},r.prototype.dispatchRenderCallbacks=function(t){for(var e=0,r=t;e<r.length;e+=1){var n=r[e];if(!this.callbackDispatchedThisFrame[n]){this.callbackDispatchedThisFrame[n]=!0;var i=this.images[n];h(i)&&this.updateImage(n,i)}}},r}(t.Evented);var f=y,d=y,m=1e20;function y(t,e,r,n,i,a){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=i||"sans-serif",this.fontWeight=a||"normal",this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s<e;s++){for(var l=0;l<r;l++)n[l]=t[l*e+s];for(g(n,i,a,o,r),l=0;l<r;l++)t[l*e+s]=i[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)n[s]=t[l*e+s];for(g(n,i,a,o,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(i[s])}}function g(t,e,r,n,i){r[0]=0,n[0]=-m,n[1]=+m;for(var a=1,o=0;a<i;a++){for(var s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=n[o];)o--,s=(t[a]+a*a-(t[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);r[++o]=a,n[o]=s,n[o+1]=+m}for(a=0,o=0;a<i;a++){for(;n[o+1]<a;)o++;e[a]=(a-r[o])*(a-r[o])+t[r[o]]}}y.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var i=e.data[4*n+3]/255;this.gridOuter[n]=1===i?0:0===i?m:Math.pow(Math.max(0,.5-i),2),this.gridInner[n]=1===i?m:0===i?0:Math.pow(Math.max(0,i-.5),2)}for(v(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),v(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var a=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(a/this.radius+this.cutoff))))}return r},f.default=d;var _=function(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}};_.prototype.setURL=function(t){this.url=t},_.prototype.getGlyphs=function(e,r){var n=this,i=[];for(var a in e)for(var o=0,s=e[a];o<s.length;o+=1){var l=s[o];i.push({stack:a,id:l})}t.asyncAll(i,(function(t,e){var r=t.stack,i=t.id,a=n.entries[r];a||(a=n.entries[r]={glyphs:{},requests:{},ranges:{}});var o=a.glyphs[i];if(void 0===o){if(o=n._tinySDF(a,r,i))return a.glyphs[i]=o,void e(null,{stack:r,id:i,glyph:o});var s=Math.floor(i/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],_.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i<o.length;i+=1)(0,o[i])(t,e);delete a.requests[s]}))),l.push((function(t,n){t?e(t):n&&e(null,{stack:r,id:i,glyph:n[i]||null})}))}}else e(null,{stack:r,id:i,glyph:o})}),(function(t,e){if(t)r(t);else if(e){for(var n={},i=0,a=e;i<a.length;i+=1){var o=a[i],s=o.stack,l=o.id,u=o.glyph;(n[s]||(n[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}r(null,n)}}))},_.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](e)||t.isChar["Hangul Syllables"](e)||t.isChar.Hiragana(e)||t.isChar.Katakana(e))},_.prototype._tinySDF=function(e,r,n){var i=this.localIdeographFontFamily;if(i&&this._doesCharSupportLocalGlyph(n)){var a=e.tinySDF;if(!a){var o="400";/bold/i.test(r)?o="900":/medium/i.test(r)?o="500":/light/i.test(r)&&(o="200"),a=e.tinySDF=new _.TinySDF(24,3,8,.25,i,o)}return{id:n,bitmap:new t.AlphaImage({width:30,height:30},a.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},_.loadGlyphRange=function(e,r,n,i,a){var o=256*r,s=o+255,l=i.transformRequest(i.normalizeGlyphsURL(n).replace("{fontstack}",e).replace("{range}",o+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,(function(e,r){if(e)a(e);else if(r){for(var n={},i=0,o=t.parseGlyphPBF(r);i<o.length;i+=1){var s=o[i];n[s.id]=s}a(null,n)}}))},_.TinySDF=f;var x=function(){this.specification=t.styleSpec.light.position};x.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},x.prototype.interpolate=function(e,r,n){return{x:t.number(e.x,r.x,n),y:t.number(e.y,r.y,n),z:t.number(e.z,r.z,n)}};var b=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new x,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),w="-transition",T=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(b),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e,r){if(void 0===r&&(r={}),!this._validate(t.validateLight,e,r))for(var n in e){var i=e[n];t.endsWith(n,w)?this._transitionable.setTransition(n.slice(0,-11),i):this._transitionable.setValue(n,i)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r,n){return(!n||!1!==n.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},r}(t.Evented),k=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};k.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.dashEntry[r]||(this.dashEntry[r]=this.addDash(t,e)),this.dashEntry[r]},k.prototype.getDashRanges=function(t,e,r){var n=[],i=t.length%2==1?-t[t.length-1]*r:0,a=t[0]*r,o=!0;n.push({left:i,right:a,isDash:o,zeroLength:0===t[0]});for(var s=t[0],l=1;l<t.length;l++){o=!o;var u=t[l];i=s*r,a=(s+=u)*r,n.push({left:i,right:a,isDash:o,zeroLength:0===u})}return n},k.prototype.addRoundDash=function(t,e,r){for(var n=e/2,i=-r;i<=r;i++)for(var a=this.nextRow+r+i,o=this.width*a,s=0,l=t[s],u=0;u<this.width;u++){u/l.right>1&&(l=t[++s]);var c=Math.abs(u-l.left),h=Math.abs(u-l.right),p=Math.min(c,h),f=void 0,d=i/r*(n+1);if(l.isDash){var m=n-Math.abs(d);f=Math.sqrt(p*p+m*m)}else f=n-Math.sqrt(p*p+d*d);this.data[o+u]=Math.max(0,Math.min(255,f+128))}},k.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],u=0;u<this.width;u++){u/l.right>1&&(l=t[++s]);var c=Math.abs(u-l.left),h=Math.abs(u-l.right),p=Math.min(c,h),f=l.isDash?p:-p;this.data[o+u]=Math.max(0,Math.min(255,f+128))}},k.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o<e.length;o++)a+=e[o];if(0!==a){var s=this.width/a,l=this.getDashRanges(e,this.width,s);r?this.addRoundDash(l,s,n):this.addRegularDash(l)}var u={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:a};return this.nextRow+=i,this.dirty=!0,u},k.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))};var M=function e(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),a=0;a<i.length;a++){var o=i[a],s=new e.Actor(o,n,this.id);s.name="Worker "+a,this.actors.push(s)}};function A(e,r,n){var i=function(i,a){if(i)return n(i);if(a){var o=t.pick(t.extend(a,e),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);a.vector_layers&&(o.vectorLayers=a.vector_layers,o.vectorLayerIds=o.vectorLayers.map((function(t){return t.id}))),o.tiles=r.canonicalizeTileset(o,e.url),n(null,o)}};return e.url?t.getJSON(r.transformRequest(r.normalizeSourceURL(e.url),t.ResourceType.Source),i):t.browser.frame((function(){return i(null,e)}))}M.prototype.broadcast=function(e,r,n){n=n||function(){},t.asyncAll(this.actors,(function(t,n){t.send(e,r,n)}),n)},M.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},M.prototype.remove=function(){this.actors.forEach((function(t){t.remove()})),this.actors=[],this.workerPool.release(this.id)},M.Actor=t.Actor;var S=function(e,r,n){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=n||24};S.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},S.prototype.contains=function(e){var r=Math.pow(2,e.z),n=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*r),i=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*r),a=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*r),o=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*r);return e.x>=n&&e.x<a&&e.y>=i&&e.y<o};var L=function(e){function r(r,n,i,a){if(e.call(this),this.id=r,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(n,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(a)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=A(this._options,this.map._requestManager,(function(r,n){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new S(n.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(n.tiles,e.map._requestManager._customAccessToken),t.postMapLoadEvent(n.tiles,e.map._getMapId(),e.map._requestManager._skuToken,e.map._requestManager._customAccessToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setSourceProperty=function(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},r.prototype.setTiles=function(t){var e=this;return this.setSourceProperty((function(){e._options.tiles=t})),this},r.prototype.setUrl=function(t){var e=this;return this.setSourceProperty((function(){e.url=t,e._options.url=t})),this},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),i={request:this.map._requestManager.transformRequest(n,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function a(n,i){return delete e.request,e.aborted?r(null):n&&404!==n.status?r(n):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}i.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=r:e.request=e.actor.send("reloadTile",i,a.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",i,a.bind(this)))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),C=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.setEventedParent(a),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},n),t.extend(this,t.pick(n,["url","scheme","tileSize"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=A(this._options,this.map._requestManager,(function(r,n){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):n&&(t.extend(e,n),n.bounds&&(e.tileBounds=new S(n.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(n.tiles),t.postMapLoadEvent(n.tiles,e.map._getMapId(),e.map._requestManager._skuToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var n=this,i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(i,t.ResourceType.Tile),(function(i,a){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(i)e.state="errored",r(i);else if(a){n.map._refreshExpiredTiles&&e.setExpiryData(a),delete a.cacheControl,delete a.expires;var o=n.map.painter.context,s=o.gl;e.texture=n.map.painter.getTileTexture(a.width),e.texture?e.texture.update(a,{useMipmap:!0}):(e.texture=new t.Texture(o,a,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),o.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,o.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,o.extTextureFilterAnisotropicMax)),e.state="loaded",t.cacheEntryPossiblyAdded(n.dispatcher),r(null)}}))},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function i(t,n){t&&(e.state="errored",r(t)),n&&(e.dem=n,e.needsHillshadePrepare=!0,e.state="loaded",r(null))}e.request=t.getImage(this.map._requestManager.transformRequest(n,t.ResourceType.Tile),function(n,a){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(n)e.state="errored",r(n);else if(a){this.map._refreshExpiredTiles&&e.setExpiryData(a),delete a.cacheControl,delete a.expires;var o=t.window.ImageBitmap&&a instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported()?a:t.browser.getImageData(a,1),s={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",s,i.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1<n&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&t.actor.send("removeDEMTile",{uid:t.uid,source:this.id})},r}(C),I=function(e){function r(r,n,i,a){e.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=i.getActor(),this.setEventedParent(a),this._data=n.data,this._options=t.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;var o=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:t.EXTENT,radius:(n.clusterRadius||50)*o,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(r){if(r)e.fire(new t.ErrorEvent(r));else{var n={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",n))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?"reloadTile":"loadTile";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),E=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),D=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var n=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;o<s.length;o+=1){var l=s[o];r=Math.min(r,l.x),n=Math.min(n,l.y),i=Math.max(i,l.x),a=Math.max(a,l.y)}var u=i-r,c=a-n,h=Math.max(u,c),p=Math.max(0,Math.floor(-Math.log(h)/Math.LN2)),f=Math.pow(2,p);return new t.CanonicalTileID(p,Math.floor((r+i)/2*f),Math.floor((n+a)/2*f))}(n),this.minzoom=this.maxzoom=this.tileID.z;var i=n.map((function(t){return r.tileID.getTilePoint(t)._round()}));return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(i[0].x,i[0].y,0,0),this._boundsArray.emplaceBack(i[1].x,i[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(i[3].x,i[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(i[2].x,i[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented);var z=function(e){function r(t,r,n,i){e.call(this,t,r,n,i),this.roundZoom=!0,this.type="video",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1;var r=this.options;this.urls=[];for(var n=0,i=r.urls;n<i.length;n+=1){var a=i[n];this.urls.push(this.map._requestManager.transformRequest(a,t.ResourceType.Source).url)}t.getVideo(this.urls,(function(r,n){e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):n&&(e.video=n,e.video.loop=!0,e.video.addEventListener("playing",(function(){e.map.triggerRepaint()})),e.map&&e.video.play(),e._finishLoading())}))},r.prototype.pause=function(){this.video&&this.video.pause()},r.prototype.play=function(){this.video&&this.video.play()},r.prototype.seek=function(e){if(this.video){var r=this.video.seekable;e<r.start(0)||e>r.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(D),O=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(D),R={vector:L,raster:C,"raster-dem":P,geojson:I,video:z,image:D,canvas:O};function F(e,r){var n=t.identity([]);return t.translate(n,n,[1,1,0]),t.scale(n,n,[.5*e.width,.5*e.height,1]),t.multiply(n,n,e.calculatePosMatrix(r.toUnwrapped()))}function B(t,e,r,n,i,a){var o=function(t,e,r){if(t)for(var n=0,i=t;n<i.length;n+=1){var a=e[i[n]];if(a&&a.source===r&&"fill-extrusion"===a.type)return!0}else for(var o in e){var s=e[o];if(s.source===r&&"fill-extrusion"===s.type)return!0}return!1}(i&&i.layers,e,t.id),s=a.maxPitchScaleFactor(),l=t.tilesIn(n,s,o);l.sort(N);for(var u=[],c=0,h=l;c<h.length;c+=1){var p=h[c];u.push({wrappedTileID:p.tileID.wrapped().key,queryResults:p.tile.queryRenderedFeatures(e,r,t._state,p.queryGeometry,p.cameraQueryGeometry,p.scale,i,a,s,F(t.transform,p.tileID))})}var f=function(t){for(var e={},r={},n=0,i=t;n<i.length;n+=1){var a=i[n],o=a.queryResults,s=a.wrappedTileID,l=r[s]=r[s]||{};for(var u in o)for(var c=o[u],h=l[u]=l[u]||{},p=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];h[m.featureIndex]||(h[m.featureIndex]=!0,p.push(m))}}return e}(u);for(var d in f)f[d].forEach((function(e){var r=e.feature,n=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=n}));return f}function N(t,e){var r=t.tileID,n=e.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var U=function(t,e){this.max=t,this.onRemove=e,this.reset()};U.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var n=r[e];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},U.prototype.add=function(t,e,r){var n=this,i=t.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);var a={value:e,timeout:void 0};if(void 0!==r&&(a.timeout=setTimeout((function(){n.remove(t,a)}),r)),this.data[i].push(a),this.order.push(i),this.order.length>this.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},U.prototype.has=function(t){return t.wrapped().key in this.data},U.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},U.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},U.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},U.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},U.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},U.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},U.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n<i.length;n+=1){var a=i[n];t(a.value)||e.push(a)}for(var o=0,s=e;o<s.length;o+=1){var l=s[o];this.remove(l.value.tileID,l)}};var j=function(t,e,r){this.context=t;var n=t.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};j.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},j.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},j.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var V={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},q=function(t,e,r,n){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=n,this.context=t;var i=t.gl;this.buffer=i.createBuffer(),t.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};q.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},q.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},q.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var n=this.attributes[r],i=e.attributes[n.name];void 0!==i&&t.enableVertexAttribArray(i)}},q.prototype.setVertexAttribPointers=function(t,e,r){for(var n=0;n<this.attributes.length;n++){var i=this.attributes[n],a=e.attributes[i.name];void 0!==a&&t.vertexAttribPointer(a,i.components,t[V[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}},q.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var H=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};H.prototype.get=function(){return this.current},H.prototype.set=function(t){},H.prototype.getDefault=function(){return this.default},H.prototype.setDefault=function(){this.set(this.default)};var G=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(H),Z=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(H),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(H),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(H),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(H),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(H),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(H),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(H),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(H),tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(H),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(H),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(H),nt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(H),it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(H),at=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(H),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(H),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(H),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(H),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(H),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(H),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(H),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(H),ft=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(H),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(H),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(H),yt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(H),vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(H),gt=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(H),_t=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(H),xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(H),bt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(H),wt=function(t){function e(e,r){t.call(this,e),this.context=e,this.parent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e}(H),Tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(wt),kt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(wt),Mt=function(t,e,r,n){this.context=t,this.width=e,this.height=r;var i=t.gl,a=this.framebuffer=i.createFramebuffer();this.colorAttachment=new Tt(t,a),n&&(this.depthAttachment=new kt(t,a))};Mt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r)}t.deleteFramebuffer(this.framebuffer)};var At=function(t,e,r){this.func=t,this.mask=e,this.range=r};At.ReadOnly=!1,At.ReadWrite=!0,At.disabled=new At(519,At.ReadOnly,[0,1]);var St=7680,Lt=function(t,e,r,n,i,a){this.test=t,this.ref=e,this.mask=r,this.fail=n,this.depthFail=i,this.pass=a};Lt.disabled=new Lt({func:519,mask:0},0,0,St,St,St);var Ct=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Ct.Replace=[1,0],Ct.disabled=new Ct(Ct.Replace,t.Color.transparent,[!1,!1,!1,!1]),Ct.unblended=new Ct(Ct.Replace,t.Color.transparent,[!0,!0,!0,!0]),Ct.alphaBlended=new Ct([1,771],t.Color.transparent,[!0,!0,!0,!0]);var Pt=function(t,e,r){this.enable=t,this.mode=e,this.frontFace=r};Pt.disabled=new Pt(!1,1029,2305),Pt.backCCW=new Pt(!0,1029,2305);var It=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new G(this),this.clearDepth=new Z(this),this.clearStencil=new Y(this),this.colorMask=new W(this),this.depthMask=new X(this),this.stencilMask=new J(this),this.stencilFunc=new K(this),this.stencilOp=new Q(this),this.stencilTest=new $(this),this.depthRange=new tt(this),this.depthTest=new et(this),this.depthFunc=new rt(this),this.blend=new nt(this),this.blendFunc=new it(this),this.blendColor=new at(this),this.blendEquation=new ot(this),this.cullFace=new st(this),this.cullFaceSide=new lt(this),this.frontFace=new ut(this),this.program=new ct(this),this.activeTexture=new ht(this),this.viewport=new pt(this),this.bindFramebuffer=new ft(this),this.bindRenderbuffer=new dt(this),this.bindTexture=new mt(this),this.bindVertexBuffer=new yt(this),this.bindElementBuffer=new vt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new gt(this),this.pixelStoreUnpack=new _t(this),this.pixelStoreUnpackPremultiplyAlpha=new xt(this),this.pixelStoreUnpackFlipY=new bt(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(t.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE)};It.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},It.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},It.prototype.createIndexBuffer=function(t,e){return new j(this,t,e)},It.prototype.createVertexBuffer=function(t,e,r){return new q(this,t,e,r)},It.prototype.createRenderbuffer=function(t,e,r){var n=this.gl,i=n.createRenderbuffer();return this.bindRenderbuffer.set(i),n.renderbufferStorage(n.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),i},It.prototype.createFramebuffer=function(t,e,r){return new Mt(this,t,e,r)},It.prototype.clear=function(t){var e=t.color,r=t.depth,n=this.gl,i=0;e&&(i|=n.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(i|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(i)},It.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},It.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},It.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},It.prototype.setColorMode=function(e){t.deepEqual(e.blendFunction,Ct.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},It.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Et=function(e){function r(r,n,i){var a=this;e.call(this),this.id=r,this.dispatcher=i,this.on("data",(function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(a._sourceLoaded=!0),a._sourceLoaded&&!a._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(a.reload(),a.transform&&a.update(a.transform))})),this.on("error",(function(){a._sourceErrored=!0})),this._source=function(e,r,n,i){var a=new R[r.type](e,r,n,i);if(a.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+a.id);return t.bindAll(["load","abort","unload","serialize","prepare"],a),a}(r,n,i,this),this._tiles={},this._cache=new U(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,(function(){}))},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,(function(){}))},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var r=this._tiles[e];r.upload(t),r.prepare(this.map.style.imageManager)}},r.prototype.getIds=function(){return t.values(this._tiles).map((function(t){return t.tileID})).sort(Dt).map((function(t){return t.key}))},r.prototype.getRenderableIds=function(e){var r=this,n=[];for(var i in this._tiles)this._isIdRenderable(i,e)&&n.push(this._tiles[i]);return e?n.sort((function(e,n){var i=e.tileID,a=n.tileID,o=new t.Point(i.canonical.x,i.canonical.y)._rotate(r.transform.angle),s=new t.Point(a.canonical.x,a.canonical.y)._rotate(r.transform.angle);return i.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x})).map((function(t){return t.tileID.key})):n.map((function(t){return t.tileID})).sort(Dt).map((function(t){return t.key}))},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,n,i){if(i)return e.state="errored",void(404!==i.status?this._source.fire(new t.ErrorEvent(i,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var n=e[r];if(t.neighboringTiles&&t.neighboringTiles[n]){var i=this.getTileByID(n);a(t,i),a(i,t)}}function a(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,n=e.tileID.canonical.y-t.tileID.canonical.y,i=Math.pow(2,t.tileID.canonical.z),a=e.tileID.key;0===r&&0===n||Math.abs(n)>1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(t){return n._source.hasTile(t)})))):i=[];var a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(zt(this._source.type)){for(var u={},c={},h=0,p=Object.keys(l);h<p.length;h+=1){var f=p[h],d=l[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var y=this.findLoadedParent(d,o);y&&(this._addTile(y.tileID),u[y.tileID.key]=y.tileID),c[f]=d}}for(var v in this._retainLoadedChildren(c,a,s,l),u)l[v]||(this._coveredTiles[v]=!0,l[v]=u[v])}for(var g in l)this._tiles[g].clearFadeHold();for(var _=0,x=t.keysDifference(this._tiles,l);_<x.length;_+=1){var b=x[_],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}this._updateLoadedParentTileCache()}},r.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},r.prototype._updateRetainedTiles=function(t,e){for(var n={},i={},a=Math.max(e-r.maxOverzooming,this._source.minzoom),o=Math.max(e+r.maxUnderzooming,this._source.minzoom),s={},l=0,u=t;l<u.length;l+=1){var c=u[l],h=this._addTile(c);n[c.key]=c,h.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,o,n);for(var p=0,f=t;p<f.length;p+=1){var d=f[p],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var y=d.children(this._source.maxzoom)[0],v=this.getTile(y);if(v&&v.hasData()){n[y.key]=y;continue}}else{var g=d.children(this._source.maxzoom);if(n[g[0].key]&&n[g[1].key]&&n[g[2].key]&&n[g[3].key])continue}for(var _=m.wasRequested(),x=d.overscaledZ-1;x>=a;--x){var b=d.scaledTo(x);if(i[b.key])break;if(i[b.key]=!0,!(m=this.getTile(b))&&_&&(m=this._addTile(b)),m&&(n[b.key]=b,_=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a<o.length;a+=1){var s=o[a];this._loadedParentTiles[s]=r}}},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var n=Boolean(r);return n||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var n=e.getExpiryTimeout();n&&(this._timers[t]=setTimeout((function(){r._reloadTile(t,"expired"),delete r._timers[t]}),n))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),u=s.map((function(t){return o.pointCoordinate(t)})),c=this.getIds(),h=1/0,p=1/0,f=-1/0,d=-1/0,m=0,y=u;m<y.length;m+=1){var v=y[m];h=Math.min(h,v.x),p=Math.min(p,v.y),f=Math.max(f,v.x),d=Math.max(d,v.y)}for(var g=function(e){var n=i._tiles[c[e]];if(!n.holdingForFade()){var s=n.tileID,m=Math.pow(2,o.zoom-n.tileID.overscaledZ),y=r*n.queryPadding*t.EXTENT/n.tileSize/m,v=[s.getTilePoint(new t.MercatorCoordinate(h,p)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(v[0].x-y<t.EXTENT&&v[0].y-y<t.EXTENT&&v[1].x+y>=0&&v[1].y+y>=0){var g=l.map((function(t){return s.getTilePoint(t)})),_=u.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:g,cameraQueryGeometry:_,scale:m})}}},_=0;_<c.length;_++)g(_);return a},r.prototype.getVisibleCoordinates=function(t){for(var e=this,r=this.getRenderableIds(t).map((function(t){return e._tiles[t].tileID})),n=0,i=r;n<i.length;n+=1){var a=i[n];a.posMatrix=this.transform.calculatePosMatrix(a.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(zt(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Dt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function zt(t){return"raster"===t||"image"===t||"video"===t}function Ot(){return new t.window.Worker(oa.workerUrl)}Et.maxOverzooming=10,Et.maxUnderzooming=3;var Rt="mapboxgl_preloaded_worker_pool",Ft=function(){this.active={}};Ft.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<Ft.workerCount;)this.workers.push(new Ot);return this.active[t]=!0,this.workers.slice()},Ft.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach((function(t){t.terminate()})),this.workers=null)},Ft.prototype.isPreloaded=function(){return!!this.active[Rt]},Ft.prototype.numActive=function(){return Object.keys(this.active).length};var Bt,Nt=Math.floor(t.browser.hardwareConcurrency/2);function Ut(){return Bt||(Bt=new Ft),Bt}function jt(e,r){var n={};for(var i in e)"ref"!==i&&(n[i]=e[i]);return t.refProperties.forEach((function(t){t in r&&(n[t]=r[t])})),n}function Vt(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=jt(t[n],e[t[n].ref]));return t}Ft.workerCount=Math.max(Math.min(Nt,6),1);var qt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Ht(t,e,r){r.push({command:qt.addSource,args:[t,e[t]]})}function Gt(t,e,r){e.push({command:qt.removeSource,args:[t]}),r[t]=!0}function Zt(t,e,r,n){Gt(t,r,n),Ht(t,e,r)}function Yt(e,r,n){var i;for(i in e[n])if(e[n].hasOwnProperty(i)&&"data"!==i&&!t.deepEqual(e[n][i],r[n][i]))return!1;for(i in r[n])if(r[n].hasOwnProperty(i)&&"data"!==i&&!t.deepEqual(e[n][i],r[n][i]))return!1;return!0}function Wt(e,r,n,i,a,o){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||n.push({command:o,args:[i,s,r[s],a]}))}function Xt(t){return t.id}function Jt(t,e){return t[e.id]=e,t}function Kt(e,r){if(!e)return[{command:qt.setStyle,args:[r]}];var n=[];try{if(!t.deepEqual(e.version,r.version))return[{command:qt.setStyle,args:[r]}];t.deepEqual(e.center,r.center)||n.push({command:qt.setCenter,args:[r.center]}),t.deepEqual(e.zoom,r.zoom)||n.push({command:qt.setZoom,args:[r.zoom]}),t.deepEqual(e.bearing,r.bearing)||n.push({command:qt.setBearing,args:[r.bearing]}),t.deepEqual(e.pitch,r.pitch)||n.push({command:qt.setPitch,args:[r.pitch]}),t.deepEqual(e.sprite,r.sprite)||n.push({command:qt.setSprite,args:[r.sprite]}),t.deepEqual(e.glyphs,r.glyphs)||n.push({command:qt.setGlyphs,args:[r.glyphs]}),t.deepEqual(e.transition,r.transition)||n.push({command:qt.setTransition,args:[r.transition]}),t.deepEqual(e.light,r.light)||n.push({command:qt.setLight,args:[r.light]});var i={},a=[];!function(e,r,n,i){var a;for(a in r=r||{},e=e||{})e.hasOwnProperty(a)&&(r.hasOwnProperty(a)||Gt(a,n,i));for(a in r)r.hasOwnProperty(a)&&(e.hasOwnProperty(a)?t.deepEqual(e[a],r[a])||("geojson"===e[a].type&&"geojson"===r[a].type&&Yt(e,r,a)?n.push({command:qt.setGeoJSONSourceData,args:[a,r[a].data]}):Zt(a,r,n,i)):Ht(a,r,n))}(e.sources,r.sources,a,i);var o=[];e.layers&&e.layers.forEach((function(t){i[t.source]?n.push({command:qt.removeLayer,args:[t.id]}):o.push(t)})),n=n.concat(a),function(e,r,n){r=r||[];var i,a,o,s,l,u,c,h=(e=e||[]).map(Xt),p=r.map(Xt),f=e.reduce(Jt,{}),d=r.reduce(Jt,{}),m=h.slice(),y=Object.create(null);for(i=0,a=0;i<h.length;i++)o=h[i],d.hasOwnProperty(o)?a++:(n.push({command:qt.removeLayer,args:[o]}),m.splice(m.indexOf(o,a),1));for(i=0,a=0;i<p.length;i++)o=p[p.length-1-i],m[m.length-1-i]!==o&&(f.hasOwnProperty(o)?(n.push({command:qt.removeLayer,args:[o]}),m.splice(m.lastIndexOf(o,m.length-a),1)):a++,u=m[m.length-i],n.push({command:qt.addLayer,args:[d[o],u]}),m.splice(m.length-i,0,o),y[o]=!0);for(i=0;i<p.length;i++)if(s=f[o=p[i]],l=d[o],!y[o]&&!t.deepEqual(s,l))if(t.deepEqual(s.source,l.source)&&t.deepEqual(s["source-layer"],l["source-layer"])&&t.deepEqual(s.type,l.type)){for(c in Wt(s.layout,l.layout,n,o,null,qt.setLayoutProperty),Wt(s.paint,l.paint,n,o,null,qt.setPaintProperty),t.deepEqual(s.filter,l.filter)||n.push({command:qt.setFilter,args:[o,l.filter]}),t.deepEqual(s.minzoom,l.minzoom)&&t.deepEqual(s.maxzoom,l.maxzoom)||n.push({command:qt.setLayerZoomRange,args:[o,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Wt(s[c],l[c],n,o,c.slice(6),qt.setPaintProperty):t.deepEqual(s[c],l[c])||n.push({command:qt.setLayerProperty,args:[o,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Wt(s[c],l[c],n,o,c.slice(6),qt.setPaintProperty):t.deepEqual(s[c],l[c])||n.push({command:qt.setLayerProperty,args:[o,c,l[c]]}))}else n.push({command:qt.removeLayer,args:[o]}),u=m[m.lastIndexOf(o)+1],n.push({command:qt.addLayer,args:[l,u]})}(o,r.layers,n)}catch(t){console.warn("Unable to compute style diff:",t),n=[{command:qt.setStyle,args:[r]}]}return n}var Qt=function(t,e){this.reset(t,e)};Qt.prototype.reset=function(t,e){this.points=t||[],this._distances=[0];for(var r=1;r<this.points.length;r++)this._distances[r]=this._distances[r-1]+this.points[r].dist(this.points[r-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Qt.prototype.lerp=function(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);for(var r=1,n=this._distances[r],i=e*this.paddedLength+this.padding;n<i&&r<this._distances.length;)n=this._distances[++r];var a=r-1,o=this._distances[a],s=n-o,l=s>0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var $t=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a<this.xCellCount*this.yCellCount;a++)n.push([]),i.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};function te(e,r,n,i,a){var o=t.create();return r?(t.scale(o,o,[1/a,1/a,1]),n||t.rotateZ(o,o,i.angle)):t.multiply(o,i.labelPlaneMatrix,e),o}function ee(e,r,n,i,a){if(r){var o=t.clone(e);return t.scale(o,o,[a,a,1]),n||t.rotateZ(o,o,-i.angle),o}return i.glCoordMatrix}function re(e,r){var n=[e.x,e.y,0,1];fe(n,n,r);var i=n[3];return{point:new t.Point(n[0]/i,n[1]/i),signedDistanceFromCamera:i}}function ne(t,e){return.5+t/e*.5}function ie(t,e){var r=t[0]/t[3],n=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ae(e,r,n,i,a,o,s,l){var u=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,n.transform.zoom),h=[256/n.width*2+1,256/n.height*2+1],p=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;p.clear();for(var f=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=n.transform.width/n.transform.height,y=!1,v=0;v<d.length;v++){var g=d.get(v);if(g.hidden||g.writingMode===t.WritingMode.vertical&&!y)pe(g.numGlyphs,p);else{y=!1;var _=[g.anchorX,g.anchorY,0,1];if(t.transformMat4(_,_,r),ie(_,h)){var x=_[3],b=ne(n.transform.cameraToCenterDistance,x),w=t.evaluateSizeForFeature(u,c,g),T=s?w/b:w*b,k=new t.Point(g.anchorX,g.anchorY),M=re(k,a).point,A={},S=le(g,T,!1,l,r,a,o,e.glyphOffsetArray,f,p,M,k,A,m);y=S.useVertical,(S.notEnoughRoom||y||S.needsFlipping&&le(g,T,!0,l,r,a,o,e.glyphOffsetArray,f,p,M,k,A,m).notEnoughRoom)&&pe(g.numGlyphs,p)}else pe(g.numGlyphs,p)}}i?e.text.dynamicLayoutVertexBuffer.updateData(p):e.icon.dynamicLayoutVertexBuffer.updateData(p)}function oe(t,e,r,n,i,a,o,s,l,u,c){var h=s.glyphStartIndex+s.numGlyphs,p=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,d=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(h-1),y=ce(t*d,r,n,i,a,o,s.segment,p,f,l,u,c);if(!y)return null;var v=ce(t*m,r,n,i,a,o,s.segment,p,f,l,u,c);return v?{first:y,last:v}:null}function se(e,r,n,i){return e===t.WritingMode.horizontal&&Math.abs(n.y-r.y)>Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<n.y:r.x>n.x)?{needsFlipping:!0}:null}function le(e,r,n,i,a,o,s,l,u,c,h,p,f,d){var m,y=r/24,v=e.lineOffsetX*y,g=e.lineOffsetY*y;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=oe(y,l,v,g,n,h,p,e,u,o,f);if(!w)return{notEnoughRoom:!0};var T=re(w.first.point,s).point,k=re(w.last.point,s).point;if(i&&!n){var M=se(e.writingMode,T,k,d);if(M)return M}m=[w.first];for(var A=e.glyphStartIndex+1;A<_-1;A++)m.push(ce(y*l.getoffsetX(A),v,g,n,h,p,e.segment,x,b,u,o,f));m.push(w.last)}else{if(i&&!n){var S=re(p,a).point,L=e.lineStartIndex+e.segment+1,C=new t.Point(u.getx(L),u.gety(L)),P=re(C,a),I=P.signedDistanceFromCamera>0?P.point:ue(p,C,S,1,a),E=se(e.writingMode,S,I,d);if(E)return E}var D=ce(y*l.getoffsetX(e.glyphStartIndex),v,g,n,h,p,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,o,f);if(!D)return{notEnoughRoom:!0};m=[D]}for(var z=0,O=m;z<O.length;z+=1){var R=O[z];t.addDynamicAttributes(c,R.point,R.angle)}return{}}function ue(t,e,r,n,i){var a=re(t.add(t.sub(e)._unit()),i).point,o=r.sub(a);return r.add(o._mult(n/o.mag()))}function ce(e,r,n,i,a,o,s,l,u,c,h,p){var f=i?e-r:e+r,d=f>0?1:-1,m=0;i&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var y=d>0?l+s:l+s+1,v=a,g=a,_=0,x=0,b=Math.abs(f),w=[];_+x<=b;){if((y+=d)<l||y>=u)return null;if(g=v,w.push(v),void 0===(v=p[y])){var T=new t.Point(c.getx(y),c.gety(y)),k=re(T,h);if(k.signedDistanceFromCamera>0)v=p[y]=k.point;else{var M=y-d;v=ue(0===_?o:new t.Point(c.getx(M),c.gety(M)),T,g,b-_+1,h)}}_+=x,x=g.dist(v)}var A=(b-_)/x,S=v.sub(g),L=S.mult(A)._add(g);L._add(S._unit()._perp()._mult(n*d));var C=m+Math.atan2(v.y-g.y,v.x-g.x);return w.push(L),{point:L,angle:C,path:w}}$t.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},$t.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},$t.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},$t.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},$t.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},$t.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s<this.boxKeys.length;s++)o.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var u=this.circles[3*l],c=this.circles[3*l+1],h=this.circles[3*l+2];o.push({key:this.circleKeys[l],x1:u-h,y1:c-h,x2:u+h,y2:c+h})}return a?o.filter(a):o}var p={hitTest:i,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,r,n,this._queryCell,o,p,a),i?o.length>0:o},$t.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var u=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,u,c,i),n?u.length>0:u},$t.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},$t.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},$t.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},$t.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,h=0,p=u;h<p.length;h+=1){var f=p[h];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&r>=c[d+0]&&n>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[i];if(null!==m)for(var y=this.circles,v=0,g=m;v<g.length;v+=1){var _=g[v];if(!l.circle[_]){l.circle[_]=!0;var x=3*_;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,r,n)&&(!s||s(this.circleKeys[_]))){if(o.hitTest)return a.push(!0),!0;var b=y[x],w=y[x+1],T=y[x+2];a.push({key:this.circleKeys[_],x1:b-T,y1:w-T,x2:b+T,y2:w+T})}}}},$t.prototype._queryCellCircle=function(t,e,r,n,i,a,o,s){var l=o.circle,u=o.seenUids,c=this.boxCells[i];if(null!==c)for(var h=this.bboxes,p=0,f=c;p<f.length;p+=1){var d=f[p];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,h[m+0],h[m+1],h[m+2],h[m+3])&&(!s||s(this.boxKeys[d])))return a.push(!0),!0}}var y=this.circleCells[i];if(null!==y)for(var v=this.circles,g=0,_=y;g<_.length;g+=1){var x=_[g];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(v[b],v[b+1],v[b+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return a.push(!0),!0}}},$t.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),h=this._convertToYCellCoord(n),p=l;p<=c;p++)for(var f=u;f<=h;f++){var d=this.xCellCount*f+p;if(i.call(this,t,e,r,n,d,a,o,s))return}},$t.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},$t.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},$t.prototype._circlesCollide=function(t,e,r,n,i,a){var o=n-t,s=i-e,l=r+a;return l*l>o*o+s*s},$t.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var u=(o-i)/2,c=Math.abs(e-(i+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var h=l-s,p=c-u;return h*h+p*p<=r*r};var he=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function pe(t,e){for(var r=0;r<t;r++){var n=e.length;e.resize(n+4),e.float32.set(he,3*n)}}function fe(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t[3]=r[3]*n+r[7]*i+r[15],t}var de=100,me=function(t,e,r){void 0===e&&(e=new $t(t.width+200,t.height+200,25)),void 0===r&&(r=new $t(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+de,this.screenBottomBoundary=t.height+de,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function ye(e,r,n){return r*(t.EXTENT/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}me.prototype.placeCollisionBox=function(t,e,r,n,i){var a=this.projectAndGetPerspectiveRatio(n,t.anchorPointX,t.anchorPointY),o=r*a.perspectiveRatio,s=t.x1*o+a.point.x,l=t.y1*o+a.point.y,u=t.x2*o+a.point.x,c=t.y2*o+a.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,i)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},me.prototype.placeCollisionCircles=function(e,r,n,i,a,o,s,l,u,c,h,p,f){var d=[],m=new t.Point(r.anchorX,r.anchorY),y=re(m,o),v=ne(this.transform.cameraToCenterDistance,y.signedDistanceFromCamera),g=(c?a/v:a*v)/t.ONE_EM,_=re(m,s).point,x=oe(g,i,r.lineOffsetX*g,r.lineOffsetY*g,!1,_,m,r,n,s,{}),b=!1,w=!1,T=!0;if(x){for(var k=.5*p*v+f,M=new t.Point(-100,-100),A=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),S=new Qt,L=x.first,C=x.last,P=[],I=L.path.length-1;I>=1;I--)P.push(L.path[I]);for(var E=1;E<C.path.length;E++)P.push(C.path[E]);var D=2.5*k;if(l){var z=P.map((function(t){return re(t,l)}));P=z.some((function(t){return t.signedDistanceFromCamera<=0}))?[]:z.map((function(t){return t.point}))}var O=[];if(P.length>0){for(var R=P[0].clone(),F=P[0].clone(),B=1;B<P.length;B++)R.x=Math.min(R.x,P[B].x),R.y=Math.min(R.y,P[B].y),F.x=Math.max(F.x,P[B].x),F.y=Math.max(F.y,P[B].y);O=R.x>=M.x&&F.x<=A.x&&R.y>=M.y&&F.y<=A.y?[P]:F.x<M.x||R.x>A.x||F.y<M.y||R.y>A.y?[]:t.clipLine([P],M.x,M.y,A.x,A.y)}for(var N=0,U=O;N<U.length;N+=1){var j=U[N];S.reset(j,.25*k);var V;V=S.length<=.5*k?1:Math.ceil(S.paddedLength/D)+1;for(var q=0;q<V;q++){var H=q/Math.max(V-1,1),G=S.lerp(H),Z=G.x+de,Y=G.y+de;d.push(Z,Y,k,0);var W=Z-k,X=Y-k,J=Z+k,K=Y+k;if(T=T&&this.isOffscreen(W,X,J,K),w=w||this.isInsideGrid(W,X,J,K),!e&&this.grid.hitTestCircle(Z,Y,k,h)&&(b=!0,!u))return{circles:[],offscreen:!1,collisionDetected:b}}}}return{circles:!u&&b||!w?[]:d,offscreen:T,collisionDetected:b}},me.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,i=1/0,a=-1/0,o=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t.Point(u.x+de,u.y+de);n=Math.min(n,c.x),i=Math.min(i,c.y),a=Math.max(a,c.x),o=Math.max(o,c.y),r.push(c)}for(var h={},p={},f=0,d=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]={}),!h[y.bucketInstanceId][y.featureIndex]){var v=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(r,v)&&(h[y.bucketInstanceId][y.featureIndex]=!0,void 0===p[y.bucketInstanceId]&&(p[y.bucketInstanceId]=[]),p[y.bucketInstanceId].push(y.featureIndex))}}return p},me.prototype.insertCollisionBox=function(t,e,r,n,i){var a={bucketInstanceId:r,featureIndex:n,collisionGroupID:i};(e?this.ignoredGrid:this.grid).insert(a,t[0],t[1],t[2],t[3])},me.prototype.insertCollisionCircles=function(t,e,r,n,i){for(var a=e?this.ignoredGrid:this.grid,o={bucketInstanceId:r,featureIndex:n,collisionGroupID:i},s=0;s<t.length;s+=4)a.insertCircle(o,t[s],t[s+1],t[s+2])},me.prototype.projectAndGetPerspectiveRatio=function(e,r,n){var i=[r,n,0,1];return fe(i,i,e),{point:new t.Point((i[0]/i[3]+1)/2*this.transform.width+de,(-i[1]/i[3]+1)/2*this.transform.height+de),perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5}},me.prototype.isOffscreen=function(t,e,r,n){return r<de||t>=this.screenRightBoundary||n<de||e>this.screenBottomBoundary},me.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t<this.gridRightBoundary&&n>=0&&e<this.gridBottomBoundary},me.prototype.getViewportMatrix=function(){var e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e};var ve=function(t,e,r,n){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):n&&r?1:0,this.placed=r};ve.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var ge=function(t,e,r,n,i){this.text=new ve(t?t.text:null,e,r,i),this.icon=new ve(t?t.icon:null,e,n,i)};ge.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var _e=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},xe=function(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]},be=function(t,e,r,n,i){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i},we=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};function Te(e,r,n,i,a){var o=t.getAnchorAlignment(e),s=-(o.horizontalAlign-.5)*r,l=-(o.verticalAlign-.5)*n,u=t.evaluateVariableOffset(e,i);return new t.Point(s+u[0]*a,l+u[1]*a)}function ke(e,r,n,i,a,o){var s=e.x1,l=e.x2,u=e.y1,c=e.y2,h=e.anchorPointX,p=e.anchorPointY,f=new t.Point(r,n);return i&&f._rotate(a?o:-o),{x1:s+f.x,y1:u+f.y,x2:l+f.x,y2:c+f.y,anchorPointX:h,anchorPointY:p}}we.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var Me=function(t,e,r,n){this.transform=t.clone(),this.collisionIndex=new me(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new we(r),this.collisionCircleArrays={},this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}};function Ae(t,e,r,n,i){t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0),t.emplaceBack(e?1:0,r?1:0,n||0,i||0)}Me.prototype.getBucketParts=function(e,r,n,i){var a=n.getBucket(r),o=n.latestFeatureIndex;if(a&&o&&r.id===a.layerIds[0]){var s=n.collisionBoxArray,l=a.layers[0].layout,u=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),c=n.tileSize/t.EXTENT,h=this.transform.calculatePosMatrix(n.tileID.toUnwrapped()),p="map"===l.get("text-pitch-alignment"),f="map"===l.get("text-rotation-alignment"),d=ye(n,1,this.transform.zoom),m=te(h,p,f,this.transform,d),y=null;if(p){var v=ee(h,p,f,this.transform,d);y=t.multiply([],this.transform.labelPlaneMatrix,v)}this.retainedQueryData[a.bucketInstanceId]=new be(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,n.tileID);var g={bucket:a,layout:l,posMatrix:h,textLabelPlaneMatrix:m,labelToScreenMatrix:y,scale:u,textPixelRatio:c,holdingForFade:n.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(i)for(var _=0,x=a.sortKeyRanges;_<x.length;_+=1){var b=x[_],w=b.sortKey,T=b.symbolInstanceStart,k=b.symbolInstanceEnd;e.push({sortKey:w,symbolInstanceStart:T,symbolInstanceEnd:k,parameters:g})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:g})}},Me.prototype.attemptAnchorPlacement=function(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d){var m,y=[h.textOffset0,h.textOffset1],v=Te(t,r,n,y,i),g=this.collisionIndex.placeCollisionBox(ke(e,v.x,v.y,a,o,this.transform.angle),c,s,l,u.predicate);if(!d||0!==this.collisionIndex.placeCollisionBox(ke(d,v.x,v.y,a,o,this.transform.angle),c,s,l,u.predicate).box.length)return g.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(m=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={textOffset:y,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:m},this.markUsedJustification(p,t,h,f),p.allowVerticalPlacement&&(this.markUsedOrientation(p,f,h),this.placedOrientations[h.crossTileID]=f),{shift:v,placedGlyphBoxes:g}):void 0},Me.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,u=a.textLabelPlaneMatrix,c=a.labelToScreenMatrix,h=a.textPixelRatio,p=a.holdingForFade,f=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,m=a.collisionGroup,y=s.get("text-optional"),v=s.get("icon-optional"),g=s.get("text-allow-overlap"),_=s.get("icon-allow-overlap"),x="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),T="viewport-y"===s.get("symbol-z-order"),k=g&&(_||!o.hasIconData()||v),M=_&&(g||!o.hasTextData()||y);!o.collisionArrays&&f&&o.deserializeCollisionBoxes(f);var A=function(e,a){if(!r[e.crossTileID])if(p)i.placements[e.crossTileID]=new _e(!1,!1,!1);else{var f,T=!1,A=!1,S=!0,L=null,C={box:null,offscreen:null},P={box:null,offscreen:null},I=null,E=null,D=0,z=0,O=0;a.textFeatureIndex?D=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(D=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i<s.length&&(s[i]===t.WritingMode.vertical?(C=n(),P=C):C=r(),!(C&&C.box&&C.box.length));i+=1);else C=r()};if(s.get("text-variable-anchor")){var N=s.get("text-variable-anchor");if(i.prevPlacement&&i.prevPlacement.variableOffsets[e.crossTileID]){var U=i.prevPlacement.variableOffsets[e.crossTileID];N.indexOf(U.anchor)>0&&(N=N.filter((function(t){return t!==U.anchor}))).unshift(U.anchor)}var j=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!_?r:null,p={box:[],offscreen:!1},f=g?2*N.length:N.length,d=0;d<f;++d){var y=N[d%N.length],v=d>=N.length,k=i.attemptAnchorPlacement(y,t,a,s,u,x,b,h,l,m,v,e,o,n,c);if(k&&(p=k.placedGlyphBoxes)&&p.box&&p.box.length){T=!0,L=k.shift;break}}return p};B((function(){return j(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=C&&C.box&&C.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?j(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),C&&(T=C.box,S=C.offscreen);var V=F(C&&C.box);if(!T&&i.prevPlacement){var q=i.prevPlacement.variableOffsets[e.crossTileID];q&&(i.variableOffsets[e.crossTileID]=q,i.markUsedJustification(o,q.anchor,e,V))}}else{var H=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,g,h,l,m.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return H(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?H(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(C&&C.box&&C.box.length)}}if(T=(f=C)&&f.box&&f.box.length>0,S=f&&f.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Z=t.evaluateSizeForFeature(o.textSizeData,d,G),Y=s.get("text-padding"),W=e.collisionCircleDiameter;I=i.collisionIndex.placeCollisionCircles(g,G,o.lineVertexArray,o.glyphOffsetArray,Z,l,u,c,n,b,m.predicate,W,Y),T=g||I.circles.length>0&&!I.collisionDetected,S=S&&I.offscreen}if(a.iconFeatureIndex&&(O=a.iconFeatureIndex),a.iconBox){var X=function(t){var e=w&&L?ke(t,L.x,L.y,x,b,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,_,h,l,m.predicate)};A=P&&P.box&&P.box.length&&a.verticalIconBox?(E=X(a.verticalIconBox)).box.length>0:(E=X(a.iconBox)).box.length>0,S=S&&E.offscreen}var J=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(A=A&&T):T=A&&T:A=T=A&&T,T&&f&&f.box&&(P&&P.box&&z?i.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),o.bucketInstanceId,z,m.ID):i.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),o.bucketInstanceId,D,m.ID)),A&&E&&i.collisionIndex.insertCollisionBox(E.box,s.get("icon-ignore-placement"),o.bucketInstanceId,O,m.ID),I&&(T&&i.collisionIndex.insertCollisionCircles(I.circles,s.get("text-ignore-placement"),o.bucketInstanceId,D,m.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new xe);for(var tt=0;tt<I.circles.length;tt+=4)$.circles.push(I.circles[tt+0]),$.circles.push(I.circles[tt+1]),$.circles.push(I.circles[tt+2]),$.circles.push(I.collisionDetected?1:0)}i.placements[e.crossTileID]=new _e(T||k,A||M,S||o.justReloaded),r[e.crossTileID]=!0}};if(T)for(var S=o.getSortedSymbolIndexes(this.transform.angle),L=S.length-1;L>=0;--L){var C=S[L];A(o.symbolInstances.get(C),o.collisionArrays[C])}else for(var P=e.symbolInstanceStart;P<e.symbolInstanceEnd;P++)A(o.symbolInstances.get(P),o.collisionArrays[P]);if(n&&o.bucketInstanceId in this.collisionCircleArrays){var I=this.collisionCircleArrays[o.bucketInstanceId];t.invert(I.invProjMatrix,l),I.viewportMatrix=this.collisionIndex.getViewportMatrix()}o.justReloaded=!1},Me.prototype.markUsedJustification=function(e,r,n,i){var a,o={left:n.leftJustifiedTextSymbolIndex,center:n.centerJustifiedTextSymbolIndex,right:n.rightJustifiedTextSymbolIndex};a=i===t.WritingMode.vertical?n.verticalPlacedTextSymbolIndex:o[t.getAnchorJustification(r)];for(var s=0,l=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex,n.verticalPlacedTextSymbolIndex];s<l.length;s+=1){var u=l[s];u>=0&&(e.text.placedSymbolArray.get(u).crossTileID=a>=0&&u!==a?0:n.crossTileID)}},Me.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o<s.length;o+=1){var l=s[o];e.text.placedSymbolArray.get(l).placedOrientation=i}n.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=a)},Me.prototype.commit=function(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;var e=this.prevPlacement,r=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;var n=e?e.symbolFadeChange(t):1,i=e?e.opacities:{},a=e?e.variableOffsets:{},o=e?e.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],u=i[s];u?(this.opacities[s]=new ge(u,n,l.text,l.icon),r=r||l.text!==u.text.placed||l.icon!==u.icon.placed):(this.opacities[s]=new ge(null,n,l.text,l.icon,l.skipFade),r=r||l.text||l.icon)}for(var c in i){var h=i[c];if(!this.opacities[c]){var p=new ge(h,n,!1,!1);p.isHidden()||(this.opacities[c]=p,r=r||h.text.placed||h.icon.placed)}}for(var f in a)this.variableOffsets[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.variableOffsets[f]=a[f]);for(var d in o)this.placedOrientations[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.placedOrientations[d]=o[d]);r?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},Me.prototype.updateLayerOpacities=function(t,e){for(var r={},n=0,i=e;n<i.length;n+=1){var a=i[n],o=a.getBucket(t);o&&a.latestFeatureIndex&&t.id===o.layerIds[0]&&this.updateBucketOpacities(o,r,a.collisionBoxArray)}},Me.prototype.updateBucketOpacities=function(e,r,n){var i=this;e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();var a=e.layers[0].layout,o=new ge(null,0,!1,!1,!0),s=a.get("text-allow-overlap"),l=a.get("icon-allow-overlap"),u=a.get("text-variable-anchor"),c="map"===a.get("text-rotation-alignment"),h="map"===a.get("text-pitch-alignment"),p="none"!==a.get("icon-text-fit"),f=new ge(null,0,s&&(l||!e.hasIconData()||a.get("icon-optional")),l&&(s||!e.hasTextData()||a.get("text-optional")),!0);!e.collisionArrays&&n&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(n);for(var d=function(t,e,r){for(var n=0;n<e/4;n++)t.opacityVertexArray.emplaceBack(r)},m=function(n){var a=e.symbolInstances.get(n),s=a.numHorizontalGlyphVertices,l=a.numVerticalGlyphVertices,m=a.crossTileID,y=r[m],v=i.opacities[m];y?v=o:v||(v=f,i.opacities[m]=v),r[m]=!0;var g=s>0||l>0,_=a.numIconVertices>0,x=i.placedOrientations[a.crossTileID],b=x===t.WritingMode.vertical,w=x===t.WritingMode.horizontal||x===t.WritingMode.horizontalOnly;if(g){var T=ze(v.text),k=b?Oe:T;d(e.text,s,k);var M=w?Oe:T;d(e.text,l,M);var A=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=A||b?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=A||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,x);var L=i.placedOrientations[a.crossTileID];L&&(i.markUsedJustification(e,"left",a,L),i.markUsedOrientation(e,L,a))}if(_){var C=ze(v.icon),P=!(p&&a.verticalPlacedIconSymbolIndex&&b);if(a.placedIconSymbolIndex>=0){var I=P?C:Oe;d(e.icon,a.numIconVertices,I),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var E=P?Oe:C;d(e.icon,a.numVerticalIconVertices,E),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var D=e.collisionArrays[n];if(D){var z=new t.Point(0,0);if(D.textBox||D.verticalTextBox){var O=!0;if(u){var R=i.variableOffsets[m];R?(z=Te(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),c&&z._rotate(h?i.transform.angle:-i.transform.angle)):O=!1}D.textBox&&Ae(e.textCollisionBox.collisionVertexArray,v.text.placed,!O||b,z.x,z.y),D.verticalTextBox&&Ae(e.textCollisionBox.collisionVertexArray,v.text.placed,!O||w,z.x,z.y)}var F=Boolean(!w&&D.verticalIconBox);D.iconBox&&Ae(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,p?z.x:0,p?z.y:0),D.verticalIconBox&&Ae(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,p?z.x:0,p?z.y:0)}}},y=0;y<e.symbolInstances.length;y++)m(y);if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){var v=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=v.invProjMatrix,e.placementViewportMatrix=v.viewportMatrix,e.collisionCircleArray=v.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},Me.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Me.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},Me.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},Me.prototype.stillRecent=function(t,e){var r=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*r>t},Me.prototype.setStale=function(){this.stale=!0};var Se=Math.pow(2,25),Le=Math.pow(2,24),Ce=Math.pow(2,17),Pe=Math.pow(2,16),Ie=Math.pow(2,9),Ee=Math.pow(2,8),De=Math.pow(2,1);function ze(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Se+e*Le+r*Ce+e*Pe+r*Ie+e*Ee+r*De+e}var Oe=0,Re=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Re.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.getBucketParts(a,n,o,this._sortAcrossTiles),this._currentTileIndex++,i())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,a.sort((function(t,e){return t.sortKey-e.sortKey})));this._currentPartIndex<a.length;){var s=a[this._currentPartIndex];if(e.placeLayerBucketPart(s,this._seenCrossTileIDs,r),this._currentPartIndex++,i())return!0}return!1};var Fe=function(t,e,r,n,i,a,o){this.placement=new Me(t,i,a,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};Fe.prototype.isDone=function(){return this._done},Fe.prototype.continuePlacement=function(e,r,n){for(var i=this,a=t.browser.now(),o=function(){var e=t.browser.now()-a;return!i._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Re(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Fe.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Be=512/t.EXTENT/2,Ne=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;n<e.length;n++){var i=e.get(n),a=i.key;this.indexedSymbolInstances[a]||(this.indexedSymbolInstances[a]=[]),this.indexedSymbolInstances[a].push({crossTileID:i.crossTileID,coord:this.getScaledCoordinates(i,t)})}};Ne.prototype.getScaledCoordinates=function(e,r){var n=r.canonical.z-this.tileID.canonical.z,i=Be/Math.pow(2,n);return{x:Math.floor((r.canonical.x*t.EXTENT+e.anchorX)*i),y:Math.floor((r.canonical.y*t.EXTENT+e.anchorY)*i)}},Ne.prototype.findMatches=function(t,e,r){for(var n=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),i=0;i<t.length;i++){var a=t.get(i);if(!a.crossTileID){var o=this.indexedSymbolInstances[a.key];if(o)for(var s=this.getScaledCoordinates(a,e),l=0,u=o;l<u.length;l+=1){var c=u[l];if(Math.abs(c.coord.x-s.x)<=n&&Math.abs(c.coord.y-s.y)<=n&&!r[c.crossTileID]){r[c.crossTileID]=!0,a.crossTileID=c.crossTileID;break}}}}};var Ue=function(){this.maxCrossTileID=0};Ue.prototype.generate=function(){return++this.maxCrossTileID};var je=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};je.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var n=this.indexes[r],i={};for(var a in n){var o=n[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+e),i[o.tileID.key]=o}this.indexes[r]=i}this.lng=t},je.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var n=0;n<e.symbolInstances.length;n++)e.symbolInstances.get(n).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var i=this.usedCrossTileIDs[t.overscaledZ];for(var a in this.indexes){var o=this.indexes[a];if(Number(a)>t.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var u=o[t.scaledTo(Number(a)).key];u&&u.findMatches(e.symbolInstances,t,i)}}for(var c=0;c<e.symbolInstances.length;c++){var h=e.symbolInstances.get(c);h.crossTileID||(h.crossTileID=r.generate(),i[h.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Ne(t,e.symbolInstances,e.bucketInstanceId),!0},je.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var n=0,i=e.indexedSymbolInstances[r];n<i.length;n+=1){var a=i[n];delete this.usedCrossTileIDs[t][a.crossTileID]}},je.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var n=this.indexes[r];for(var i in n)t[n[i].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[i]),delete n[i],e=!0)}return e};var Ve=function(){this.layerIndexes={},this.crossTileIDs=new Ue,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ve.prototype.addLayer=function(t,e,r){var n=this.layerIndexes[t.id];void 0===n&&(n=this.layerIndexes[t.id]=new je);var i=!1,a={};n.handleWrapJump(r);for(var o=0,s=e;o<s.length;o+=1){var l=s[o],u=l.getBucket(t);u&&t.id===u.layerIds[0]&&(u.bucketInstanceId||(u.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,u,this.crossTileIDs)&&(i=!0),a[u.bucketInstanceId]=!0)}return n.removeStaleBuckets(a)&&(i=!0),i},Ve.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach((function(t){e[t]=!0})),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var qe=function(e,r){return t.emitValidationErrors(e,r&&r.filter((function(t){return"source.canvas"!==t.identifier})))},He=t.pick(qt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Ge=t.pick(qt,["setCenter","setZoom","setBearing","setPitch"]),Ze=function(){var e={},r=t.styleSpec.$version;for(var n in t.styleSpec.$root){var i=t.styleSpec.$root[n];if(i.required){var a;null!=(a="version"===n?r:"array"===i.type?[]:{})&&(e[n]=a)}}return e}(),Ye=function(e){function r(n,i){var a=this;void 0===i&&(i={}),e.call(this),this.map=n,this.dispatcher=new M(Ut(),this),this.imageManager=new p,this.imageManager.setEventedParent(this),this.glyphManager=new _(n._requestManager,i.localIdeographFontFamily),this.lineAtlas=new k(256,512),this.crossTileSymbolIndex=new Ve,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var o=this;this._rtlTextPluginCallback=r.registerForPluginStateChange((function(e){var r={pluginStatus:e.pluginStatus,pluginURL:e.pluginURL};o.dispatcher.broadcast("syncRTLPluginState",r,(function(e,r){if(t.triggerPluginCompletionEvent(e),r&&r.every((function(t){return t})))for(var n in o.sourceCaches)o.sourceCaches[n].reload()}))})),this.on("data",(function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=a.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var n in a._layers){var i=a._layers[n];i.source===r.id&&a._validateLayer(i)}}}}))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var i="boolean"==typeof r.validate?r.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,r.accessToken);var a=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(a,(function(e,r){n._request=null,e?n.fire(new t.ErrorEvent(e)):r&&n._load(r,i)}))},r.prototype.loadJSON=function(e,r){var n=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame((function(){n._request=null,n._load(e,!1!==r.validate)}))},r.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(Ze,!1)},r.prototype._load=function(e,r){if(!r||!qe(this,t.validateStyle(e))){for(var n in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(n,e.sources[n],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var i=Vt(this.stylesheet.layers);this._order=i.map((function(t){return t.id})),this._layers={},this._serializedLayers={};for(var a=0,o=i;a<o.length;a+=1){var s=o[a];(s=t.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new T(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},r.prototype._loadSprite=function(e){var r=this;this._spriteRequest=function(e,r,n){var i,a,o,s=t.browser.devicePixelRatio>1?"@2x":"",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,c())})),u=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){u=null,o||(o=t,a=e,c())}));function c(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],u=l.width,c=l.height,h=l.x,p=l.y,f=l.sdf,d=l.pixelRatio,m=l.stretchX,y=l.stretchY,v=l.content,g=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,g,{x:h,y:p},{x:0,y:0},{width:u,height:c}),r[s]={data:g,pixelRatio:d,sdf:f,stretchX:m,stretchY:y,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new t.Event("data",{dataType:"style"}))}))},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,n=t;r<n.length;r+=1){var i=n[r],a=this._layers[i];"custom"!==a.type&&e.push(a.serialize())}return e},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(e){if(this._loaded){var r=this._changed;if(this._changed){var n=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(var a in(n.length||i.length)&&this._updateWorkerLayers(n,i),this._updatedSources){var o=this._updatedSources[a];"reload"===o?this._reloadSource(a):"clear"===o&&this._clearSource(a)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}var l={};for(var u in this.sourceCaches){var c=this.sourceCaches[u];l[u]=c.used,c.used=!1}for(var h=0,p=this._order;h<p.length;h+=1){var f=p[h],d=this._layers[f];d.recalculate(e,this._availableImages),!d.isHidden(e.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(var m in l){var y=this.sourceCaches[m];l[m]!==y.used&&y.fire(new t.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:m}))}this.light.recalculate(e),this.z=e.zoom,r&&this.fire(new t.Event("data",{dataType:"style"}))}},r.prototype._updateTilesForChangedImages=function(){var t=Object.keys(this._changedImages);if(t.length){for(var e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),qe(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=Vt(e.layers);var n=Kt(this.serialize(),e).filter((function(t){return!(t.command in Ge)}));if(0===n.length)return!1;var i=n.filter((function(t){return!(t.command in He)}));if(i.length>0)throw new Error("Unimplemented: "+i.map((function(t){return t.command})).join(", ")+".");return n.forEach((function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this._afterImageUpdated(e)},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._afterImageUpdated(e)},r.prototype._afterImageUpdated=function(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Et(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===e.type){if(qe(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s<l.length;s+=1){var u=l[s][o];if(u)for(var c=0,h=u;c<h.length;c+=1){var p=h[c];i.push(p)}}}}i.sort((function(t,e){return e.intersectionZ-t.intersectionZ}));for(var f=[],d=this._order.length-1;d>=0;d--){var m=this._order[d];if(r(m))for(var y=i.length-1;y>=0;y--){var v=i[y].feature;if(n[v.layer.id]<d)break;f.push(v),i.pop()}else for(var g=0,_=t;g<_.length;g+=1){var x=_[g][m];if(x)for(var b=0,w=x;b<w.length;b+=1){var T=w[b];f.push(T.feature)}}}return f},r.prototype.queryRenderedFeatures=function(e,r,n){r&&r.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",r.filter,null,r);var i={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var a=0,o=r.layers;a<o.length;a+=1){var s=o[a],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];i[l.source]=!0}}var u=[];for(var c in r.availableImages=this._availableImages,this.sourceCaches)r.layers&&!i[c]||u.push(B(this.sourceCaches[c],this._layers,this._serializedLayers,e,r,n));return this.placement&&u.push(function(t,e,r,n,i,a,o){for(var s={},l=a.queryRenderedSymbols(n),u=[],c=0,h=Object.keys(l).map(Number);c<h.length;c+=1){var p=h[c];u.push(o[p])}u.sort(N);for(var f=function(){var r=m[d],n=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],e,r.bucketIndex,r.sourceLayerIndex,i.filter,i.layers,i.availableImages,t);for(var a in n){var o=s[a]=s[a]||[],u=n[a];u.sort((function(t,e){var n=r.featureSortOrder;if(n){var i=n.indexOf(t.featureIndex);return n.indexOf(e.featureIndex)-i}return e.featureIndex-t.featureIndex}));for(var c=0,h=u;c<h.length;c+=1){var p=h[c];o.push(p)}}},d=0,m=u;d<m.length;d+=1)f();var y=function(e){s[e].forEach((function(n){var i=n.feature,a=t[e],o=r[a.source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=o}))};for(var v in s)y(v);return s}(this._layers,this._serializedLayers,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",r.filter,null,r);var n=this.sourceCaches[e];return n?function(t,e){for(var r=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),n=[],i={},a=0;a<r.length;a++){var o=r[a],s=o.tileID.canonical.key;i[s]||(i[s]=!0,o.querySourceFeatures(n,e))}return n}(n,r):[]},r.prototype.addSourceType=function(t,e,n){return r.getSourceType(t)?n(new Error('A source type called "'+t+'" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e,r){void 0===r&&(r={}),this._checkLoaded();var n=this.light.getLight(),i=!1;for(var a in e)if(!t.deepEqual(e[a],n[a])){i=!0;break}if(i){var o={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(o)}},r.prototype._validate=function(e,r,n,i,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&qe(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:n,styleSpec:t.styleSpec},i)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[e].setEventedParent(null);for(var r in this.sourceCaches)this.sourceCaches[r].clearTiles(),this.sourceCaches[r].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,n,i,a){void 0===a&&(a=!1);for(var o=!1,s=!1,l={},u=0,c=this._order;u<c.length;u+=1){var h=c[u],p=this._layers[h];if("symbol"===p.type){if(!l[p.source]){var f=this.sourceCaches[p.source];l[p.source]=f.getRenderableIds(!0).map((function(t){return f.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}))}var d=this.crossTileSymbolIndex.addLayer(p,l[p.source],e.center.lng);o=o||d}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((a=a||this._layerOrderChanged||0===n)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new Fe(e,this._order,a,r,n,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),o&&this.pauseablePlacement.placement.setStale()),s||o)for(var m=0,y=this._order;m<y.length;m+=1){var v=y[m],g=this._layers[v];"symbol"===g.type&&this.placement.updateLayerOpacities(g,l[g.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r),this._updateTilesForChangedImages();var n=this.sourceCaches[e.source];n&&n.setDependencies(e.tileID.key,e.type,e.icons)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r.prototype.getResource=function(e,r,n){return t.makeRequest(r,n)},r}(t.Evented);Ye.getSourceType=function(t){return R[t]},Ye.setSourceType=function(t,e){R[t]=e},Ye.registerForPluginStateChange=t.registerForPluginStateChange;var We=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Xe=br("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Je=br("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ke=br("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Qe=br("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),$e=br("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),tr=br("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),er=br("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),rr=br("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),nr=br("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),ir=br("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),ar=br("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),or=br("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),sr=br("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),lr=br("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),ur=br("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),cr=br("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hr=br("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),pr=br("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),fr=br("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),dr=br("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),mr=br("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),yr=br("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),vr=br("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),gr=br("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),_r=br("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),xr=br("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function br(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=e.match(/attribute ([\w]+) ([\w]+)/g),i=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(i):i,s={};return{fragmentSource:t=t.replace(r,(function(t,e,r,n,i){return s[i]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:e=e.replace(r,(function(t,e,r,n,i){var a="float"===n?"vec2":"vec4",o=i.match(/color/)?"color":a;return s[i]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),staticAttributes:n,staticUniforms:o}}var wr=Object.freeze({__proto__:null,prelude:Xe,background:Je,backgroundPattern:Ke,circle:Qe,clippingMask:$e,heatmap:tr,heatmapTexture:er,collisionBox:rr,collisionCircle:nr,debug:ir,fill:ar,fillOutline:or,fillOutlinePattern:sr,fillPattern:lr,fillExtrusion:ur,fillExtrusionPattern:cr,hillshadePrepare:hr,hillshade:pr,line:fr,lineGradient:dr,linePattern:mr,lineSDF:yr,raster:vr,symbolIcon:gr,symbolSDF:_r,symbolTextAndIcon:xr}),Tr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function kr(t){for(var e=[],r=0;r<t.length;r++)if(null!==t[r]){var n=t[r].split(" ");e.push(n.pop())}return e}Tr.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,u=0;!l&&u<n.length;u++)this.boundPaintVertexBuffers[u]!==n[u]&&(l=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==i||this.boundVertexOffset!==a||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,r,n,i,a,o,s):(t.bindVertexArrayOES.set(this.vao),o&&o.bind(),i&&i.dynamicDraw&&i.bind(),s&&s.bind())},Tr.prototype.freshBind=function(t,e,r,n,i,a,o){var s,l=t.numAttributes,u=this.context,c=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=i,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=o;else{s=u.currentNumAttributes||0;for(var h=l;h<s;h++)c.disableVertexAttribArray(h)}e.enableAttributes(c,t);for(var p=0,f=r;p<f.length;p+=1)f[p].enableAttributes(c,t);a&&a.enableAttributes(c,t),o&&o.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,i);for(var d=0,m=r;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,i)}a&&(a.bind(),a.setVertexAttribPointers(c,t,i)),n&&n.bind(),o&&(o.bind(),o.setVertexAttribPointers(c,t,i)),u.currentNumAttributes=l},Tr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Mr=function(t,e,r,n,i,a){var o=t.gl;this.program=o.createProgram();for(var s=kr(r.staticAttributes),l=n?n.getBinderAttributes():[],u=s.concat(l),c=r.staticUniforms?kr(r.staticUniforms):[],h=n?n.getBinderUniforms():[],p=[],f=0,d=c.concat(h);f<d.length;f+=1){var m=d[f];p.indexOf(m)<0&&p.push(m)}var y=n?n.defines():[];a&&y.push("#define OVERDRAW_INSPECTOR;");var v=y.concat(Xe.fragmentSource,r.fragmentSource).join("\n"),g=y.concat(Xe.vertexSource,r.vertexSource).join("\n"),_=o.createShader(o.FRAGMENT_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(_,v),o.compileShader(_),o.attachShader(this.program,_);var x=o.createShader(o.VERTEX_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(x,g),o.compileShader(x),o.attachShader(this.program,x),this.attributes={};var b={};this.numAttributes=u.length;for(var w=0;w<this.numAttributes;w++)u[w]&&(o.bindAttribLocation(this.program,w,u[w]),this.attributes[u[w]]=w);o.linkProgram(this.program),o.deleteShader(x),o.deleteShader(_);for(var T=0;T<p.length;T++){var k=p[T];if(k&&!b[k]){var M=o.getUniformLocation(this.program,k);M&&(b[k]=M)}}this.fixedUniforms=i(t,b),this.binderUniforms=n?n.getUniforms(t,b):[]}}};function Ar(t,e,r){var n=1/ye(r,1,e.transform.tileZoom),i=Math.pow(2,r.tileID.overscaledZ),a=r.tileSize*Math.pow(2,e.transform.tileZoom)/i,o=a*(r.tileID.canonical.x+r.tileID.wrap*i),s=a*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[n,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[o>>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}Mr.prototype.draw=function(t,e,r,n,i,a,o,s,l,u,c,h,p,f,d,m){var y,v=t.gl;if(!this.failedToCreate){for(var g in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[g].set(o[g]);f&&f.setUniforms(t,this.binderUniforms,h,{zoom:p});for(var _=(y={},y[v.LINES]=2,y[v.TRIANGLES]=3,y[v.LINE_STRIP]=1,y)[e],x=0,b=c.get();x<b.length;x+=1){var w=b[x],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new Tr)).bind(t,this,l,f?f.getPaintVertexBuffers():[],u,w.vertexOffset,d,m),v.drawElements(e,w.primitiveLength*_,v.UNSIGNED_SHORT,w.primitiveOffset*_*2)}}};var Sr=function(e,r,n,i){var a=r.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=t.create$1();"viewport"===a.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var u=a.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+n,u_opacity:i}},Lr=function(e,r,n,i,a,o,s){return t.extend(Sr(e,r,n,i),Ar(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Cr=function(t){return{u_matrix:t}},Pr=function(e,r,n,i){return t.extend(Cr(e),Ar(n,r,i))},Ir=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Pr(e,r,n,i),{u_world:a})},Dr=function(e,r,n,i){var a,o,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=ye(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},zr=function(t,e,r){var n=ye(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Or=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Rr=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Fr=function(t){return{u_matrix:t}},Br=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:ye(e,1,r),u_intensity:n}},Nr=function(e,r,n,i){var a=t.create();t.ortho(a,0,e.width,e.height,0,0,1);var o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_color_ramp:i,u_opacity:r.paint.get("heatmap-opacity")}},Ur=function(e,r,n){var i=n.paint.get("hillshade-shadow-color"),a=n.paint.get("hillshade-highlight-color"),o=n.paint.get("hillshade-accent-color"),s=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);var l,u,c,h=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),h),u_image:0,u_latrange:(l=r.tileID,u=Math.pow(2,l.canonical.z),c=l.canonical.y,[new t.MercatorCoordinate(0,c/u).toLngLat().lat,new t.MercatorCoordinate(0,(c+1)/u).toLngLat().lat]),u_light:[n.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:a,u_accent:o}},jr=function(e,r){var n=r.stride,i=t.create();return t.ortho(i,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(i,i,[0,-t.EXTENT,0]),{u_matrix:i,u_image:1,u_dimension:[n,n],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}};var Vr=function(e,r,n){var i=e.transform;return{u_matrix:Yr(e,r,n),u_ratio:1/ye(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},qr=function(e,r,n,i){return t.extend(Vr(e,r,n),{u_image:0,u_image_height:i})},Hr=function(e,r,n,i){var a=e.transform,o=Zr(r,a);return{u_matrix:Yr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ye(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Gr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=Zr(r,o),u="round"===n.layout.get("line-cap"),c=s.getDash(i.from,u),h=s.getDash(i.to,u),p=c.width*a.fromScale,f=h.width*a.toScale;return t.extend(Vr(e,r,n),{u_patternscale_a:[l/p,-c.height/2],u_patternscale_b:[l/f,-h.height/2],u_sdfgamma:s.width/(256*Math.min(p,f)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:h.y,u_mix:a.t})};function Zr(t,e){return 1/ye(t,1,e.tileZoom)}function Yr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Wr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(o=i.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:Xr(i.paint.get("raster-hue-rotate"))};var a,o};function Xr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var Jr,Kr=function(t,e,r,n,i,a,o,s,l,u){var c=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},Qr=function(e,r,n,i,a,o,s,l,u,c,h){var p=a.transform;return t.extend(Kr(e,r,n,i,a,o,s,l,u,c),{u_gamma_scale:i?Math.cos(p._pitch)*p.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+h})},$r=function(e,r,n,i,a,o,s,l,u,c){return t.extend(Qr(e,r,n,i,a,o,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},tn=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},en=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/u,h=c*(n.tileID.canonical.x+n.tileID.wrap*u),p=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/ye(n,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,p>>16],u_pixel_coord_lower:[65535&h,65535&p]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},rn={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image),u_image_height:new t.Uniform1f(e,r.u_image_height)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function nn(e,r,n,i,a,o,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),h=[],p=0,f=0,d=0;d<i.length;d++){var m=i[d],y=r.getTile(m),v=y.getBucket(n);if(v){var g=m.posMatrix;0===a[0]&&0===a[1]||(g=e.translatePosMatrix(m.posMatrix,y,a,o));var _=s?v.textCollisionBox:v.iconCollisionBox,x=v.collisionCircleArray;if(x.length>0){var b=t.create(),w=g;t.mul(b,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,v.placementViewportMatrix),h.push({circleArray:x,circleOffset:f,transform:w,invTransform:b}),f=p+=x.length/4}_&&c.draw(l,u.LINES,At.disabled,Lt.disabled,e.colorModeForRenderPass(),Pt.disabled,zr(g,e.transform,y),n.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}}if(s&&h.length){var T=e.useProgram("collisionCircle"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*p),k._trim();for(var M=0,A=0,S=h;A<S.length;A+=1)for(var L=S[A],C=0;C<L.circleArray.length/4;C++){var P=4*C,I=L.circleArray[P+0],E=L.circleArray[P+1],D=L.circleArray[P+2],z=L.circleArray[P+3];k.emplace(M++,I,E,D,z,0),k.emplace(M++,I,E,D,z,1),k.emplace(M++,I,E,D,z,2),k.emplace(M++,I,E,D,z,3)}(!Jr||Jr.length<2*p)&&(Jr=function(e){var r=2*e,n=new t.StructArrayLayout3ui6;n.resize(r),n._trim();for(var i=0;i<r;i++){var a=6*i;n.uint16[a+0]=4*i+0,n.uint16[a+1]=4*i+1,n.uint16[a+2]=4*i+2,n.uint16[a+3]=4*i+2,n.uint16[a+4]=4*i+3,n.uint16[a+5]=4*i+0}return n}(p));for(var O=l.createIndexBuffer(Jr,!0),R=l.createVertexBuffer(k,t.collisionCircleLayout.members,!0),F=0,B=h;F<B.length;F+=1){var N=B[F],U=Or(N.transform,N.invTransform,e.transform);T.draw(l,u.TRIANGLES,At.disabled,Lt.disabled,e.colorModeForRenderPass(),Pt.disabled,U,n.id,R,O,t.SegmentVector.simpleSegment(0,2*N.circleOffset,N.circleArray.length,N.circleArray.length/2),null,e.transform.zoom,null,null,null)}R.destroy(),O.destroy()}}var an=t.identity(new Float32Array(16));function on(e,r,n,i,a,o){var s=t.getAnchorAlignment(e),l=-(s.horizontalAlign-.5)*r,u=-(s.verticalAlign-.5)*n,c=t.evaluateVariableOffset(e,i);return new t.Point((l/a+c[0])*o,(u/a+c[1])*o)}function sn(e,r,n,i,a,o,s,l,u,c,h){var p=e.text.placedSymbolArray,f=e.text.dynamicLayoutVertexArray,d=e.icon.dynamicLayoutVertexArray,m={};f.clear();for(var y=0;y<p.length;y++){var v=p.get(y),g=e.allowVerticalPlacement&&!v.placedOrientation,_=v.hidden||!v.crossTileID||g?null:i[v.crossTileID];if(_){var x=new t.Point(v.anchorX,v.anchorY),b=re(x,n?l:s),w=ne(o.cameraToCenterDistance,b.signedDistanceFromCamera),T=a.evaluateSizeForFeature(e.textSizeData,c,v)*w/t.ONE_EM;n&&(T*=e.tilePixelRatio/u);for(var k=_.width,M=_.height,A=on(_.anchor,k,M,_.textOffset,_.textBoxScale,T),S=n?re(x.add(A),s).point:b.point.add(r?A.rotate(-o.angle):A),L=e.allowVerticalPlacement&&v.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,C=0;C<v.numGlyphs;C++)t.addDynamicAttributes(f,S,L);h&&v.associatedIconIndex>=0&&(m[v.associatedIconIndex]={shiftedAnchor:S,angle:L})}else pe(v.numGlyphs,f)}if(h){d.clear();for(var P=e.icon.placedSymbolArray,I=0;I<P.length;I++){var E=P.get(I);if(E.hidden)pe(E.numGlyphs,d);else{var D=m[I];if(D)for(var z=0;z<E.numGlyphs;z++)t.addDynamicAttributes(d,D.shiftedAnchor,D.angle);else pe(E.numGlyphs,d)}}e.icon.dynamicLayoutVertexBuffer.updateData(d)}e.text.dynamicLayoutVertexBuffer.updateData(f)}function ln(t,e,r){return r.iconsInText&&e?"symbolTextAndIcon":t?"symbolSDF":"symbolIcon"}function un(e,r,n,i,a,o,s,l,u,c,h,p){for(var f=e.context,d=f.gl,m=e.transform,y="map"===l,v="map"===u,g=y&&"point"!==n.layout.get("symbol-placement"),_=y&&!v&&!g,x=void 0!==n.layout.get("symbol-sort-key").constantOr(1),b=!1,w=e.depthModeForSublayer(0,At.ReadOnly),T=n.layout.get("text-variable-anchor"),k=[],M=0,A=i;M<A.length;M+=1){var S=A[M],L=r.getTile(S),C=L.getBucket(n);if(C){var P=a?C.text:C.icon;if(P&&P.segments.get().length){var I=P.programConfigurations.get(n.id),E=a||C.sdfIcons,D=a?C.textSizeData:C.iconSizeData,z=v||0!==m.pitch,O=e.useProgram(ln(E,a,C),I),R=t.evaluateSizeForZoom(D,m.zoom),F=void 0,B=[0,0],N=void 0,U=void 0,j=null,V=void 0;if(a){if(N=L.glyphAtlasTexture,U=d.LINEAR,F=L.glyphAtlasTexture.size,C.iconsInText){B=L.imageAtlasTexture.size,j=L.imageAtlasTexture;var q="composite"===D.kind||"camera"===D.kind;V=z||e.options.rotating||e.options.zooming||q?d.LINEAR:d.NEAREST}}else{var H=1!==n.layout.get("icon-size").constantOr(0)||C.iconsNeedLinear;N=L.imageAtlasTexture,U=E||e.options.rotating||e.options.zooming||H||z?d.LINEAR:d.NEAREST,F=L.imageAtlasTexture.size}var G=ye(L,1,e.transform.zoom),Z=te(S.posMatrix,v,y,e.transform,G),Y=ee(S.posMatrix,v,y,e.transform,G),W=T&&C.hasTextData(),X="none"!==n.layout.get("icon-text-fit")&&W&&C.hasIconData();g&&ae(C,S.posMatrix,e,a,Z,Y,v,c);var J=e.translatePosMatrix(S.posMatrix,L,o,s),K=g||a&&T||X?an:Z,Q=e.translatePosMatrix(Y,L,o,s,!0),$=E&&0!==n.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),tt={program:O,buffers:P,uniformValues:E?C.iconsInText?$r(D.kind,R,_,v,e,J,K,Q,F,B):Qr(D.kind,R,_,v,e,J,K,Q,a,F,!0):Kr(D.kind,R,_,v,e,J,K,Q,a,F),atlasTexture:N,atlasTextureIcon:j,atlasInterpolation:U,atlasInterpolationIcon:V,isSDF:E,hasHalo:$};if(x&&C.canOverlap){b=!0;for(var et=0,rt=P.segments.get();et<rt.length;et+=1){var nt=rt[et];k.push({segments:new t.SegmentVector([nt]),sortKey:nt.sortKey,state:tt})}}else k.push({segments:P.segments,sortKey:0,state:tt})}}}b&&k.sort((function(t,e){return t.sortKey-e.sortKey}));for(var it=0,at=k;it<at.length;it+=1){var ot=at[it],st=ot.state;if(f.activeTexture.set(d.TEXTURE0),st.atlasTexture.bind(st.atlasInterpolation,d.CLAMP_TO_EDGE),st.atlasTextureIcon&&(f.activeTexture.set(d.TEXTURE1),st.atlasTextureIcon&&st.atlasTextureIcon.bind(st.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),st.isSDF){var lt=st.uniformValues;st.hasHalo&&(lt.u_is_halo=1,cn(st.buffers,ot.segments,n,e,st.program,w,h,p,lt)),lt.u_is_halo=0}cn(st.buffers,ot.segments,n,e,st.program,w,h,p,st.uniformValues)}}function cn(t,e,r,n,i,a,o,s,l){var u=n.context,c=u.gl;i.draw(u,c.TRIANGLES,a,o,s,Pt.disabled,l,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,n.transform.zoom,t.programConfigurations.get(r.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function hn(t,e,r,n,i,a,o){var s,l,u,c,h,p=t.context.gl,f=r.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=r.getCrossfadeParameters();o?(l=d&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=p.LINES):(l=d?"fillPattern":"fill",s=p.TRIANGLES);for(var y=0,v=n;y<v.length;y+=1){var g=v[y],_=e.getTile(g);if(!d||_.patternsLoaded()){var x=_.getBucket(r);if(x){var b=x.programConfigurations.get(r.id),w=t.useProgram(l,b);d&&(t.context.activeTexture.set(p.TEXTURE0),_.imageAtlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),b.updatePaintBuffers(m));var T=f.constantOr(null);if(T&&_.imageAtlas){var k=_.imageAtlas,M=k.patternPositions[T.to.toString()],A=k.patternPositions[T.from.toString()];M&&A&&b.setConstantPatternPositions(M,A)}var S=t.translatePosMatrix(g.posMatrix,_,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(o){c=x.indexBuffer2,h=x.segments2;var L=[p.drawingBufferWidth,p.drawingBufferHeight];u="fillOutlinePattern"===l&&d?Er(S,t,m,_,L):Ir(S,L)}else c=x.indexBuffer,h=x.segments,u=d?Pr(S,t,m,_):Cr(S);w.draw(t.context,s,i,t.stencilModeForClipping(g),a,Pt.disabled,u,r.id,x.layoutVertexBuffer,c,h,r.paint,t.transform.zoom,b)}}}}function pn(t,e,r,n,i,a,o){for(var s=t.context,l=s.gl,u=r.paint.get("fill-extrusion-pattern"),c=u.constantOr(1),h=r.getCrossfadeParameters(),p=r.paint.get("fill-extrusion-opacity"),f=0,d=n;f<d.length;f+=1){var m=d[f],y=e.getTile(m),v=y.getBucket(r);if(v){var g=v.programConfigurations.get(r.id),_=t.useProgram(c?"fillExtrusionPattern":"fillExtrusion",g);c&&(t.context.activeTexture.set(l.TEXTURE0),y.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),g.updatePaintBuffers(h));var x=u.constantOr(null);if(x&&y.imageAtlas){var b=y.imageAtlas,w=b.patternPositions[x.to.toString()],T=b.patternPositions[x.from.toString()];w&&T&&g.setConstantPatternPositions(w,T)}var k=t.translatePosMatrix(m.posMatrix,y,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),M=r.paint.get("fill-extrusion-vertical-gradient"),A=c?Lr(k,t,M,p,m,h,y):Sr(k,t,M,p);_.draw(s,s.gl.TRIANGLES,i,a,o,Pt.backCCW,A,r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,r.paint,t.transform.zoom,g)}}}function fn(t,e,r,n,i,a){var o=t.context,s=o.gl,l=e.fbo;if(l){var u=t.useProgram("hillshade");o.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,l.colorAttachment.get());var c=Ur(t,e,r);u.draw(o,s.TRIANGLES,n,i,a,Pt.disabled,c,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}}function dn(e,r,n,i,a,o){var s=e.context,l=s.gl,u=r.dem;if(u&&u.data){var c=u.dim,h=u.stride,p=u.getPixels();if(s.activeTexture.set(l.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(h),r.demTexture){var f=r.demTexture;f.update(p,{premultiply:!1}),f.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else r.demTexture=new t.Texture(s,p,l.RGBA,{premultiply:!1}),r.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);s.activeTexture.set(l.TEXTURE0);var d=r.fbo;if(!d){var m=new t.Texture(s,{width:c,height:c,data:null},l.RGBA);m.bind(l.LINEAR,l.CLAMP_TO_EDGE),(d=r.fbo=s.createFramebuffer(c,c,!0)).colorAttachment.set(m.texture)}s.bindFramebuffer.set(d.framebuffer),s.viewport.set([0,0,c,c]),e.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,i,a,o,Pt.disabled,jr(r.tileID,u),n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function mn(e,r,n,i,a){var o=i.paint.get("raster-fade-duration");if(o>0){var s=t.browser.now(),l=(s-e.timeAdded)/o,u=r?(s-r.timeAdded)/o:-1,c=n.getSource(),h=a.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),f=p&&e.refreshedUponExpiration?1:t.clamp(p?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var yn=new t.Color(1,0,0,1),vn=new t.Color(0,1,0,1),gn=new t.Color(0,0,1,1),_n=new t.Color(1,0,1,1),xn=new t.Color(0,1,1,1);function bn(t){var e=t.transform.padding;wn(t,t.transform.height-(e.top||0),3,yn),wn(t,e.bottom||0,3,vn),Tn(t,e.left||0,3,gn),Tn(t,t.transform.width-(e.right||0),3,_n);var r=t.transform.centerPoint;!function(t,e,r,n){var i=20,a=2;kn(t,e-a/2,r-i/2,a,i,n),kn(t,e-i/2,r-a/2,i,a,n)}(t,r.x,t.transform.height-r.y,xn)}function wn(t,e,r,n){kn(t,0,e+r/2,t.transform.width,r,n)}function Tn(t,e,r,n){kn(t,e-r/2,0,r,t.transform.height,n)}function kn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function Mn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=At.disabled,u=Lt.disabled,c=e.colorModeForRenderPass(),h="$debug";i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,u,c,Pt.disabled,Rr(o,t.Color.red),h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=r.getTileByID(n.key).latestRawTileData,f=p&&p.byteLength||0,d=Math.floor(f/1024),m=r.getTile(n).tileSize,y=512/Math.min(m,512)*(n.overscaledZ/e.transform.zoom)*.5,v=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(v+=" => "+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,v+" "+d+"kb"),s.draw(i,a.TRIANGLES,l,u,Ct.alphaBlended,Pt.disabled,Rr(o,t.Color.transparent,y),h,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var An={symbol:function(e,r,n,i,a){if("translucent"===e.renderPass){var o=Lt.disabled,s=e.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(e,r,n,i,a,o,s){for(var l=r.transform,u="map"===a,c="map"===o,h=0,p=e;h<p.length;h+=1){var f=p[h],d=i.getTile(f),m=d.getBucket(n);if(m&&m.text&&m.text.segments.get().length){var y=m.textSizeData,v=t.evaluateSizeForZoom(y,l.zoom),g=ye(d,1,r.transform.zoom),_=te(f.posMatrix,c,u,r.transform,g),x="none"!==n.layout.get("icon-text-fit")&&m.hasIconData();if(v){var b=Math.pow(2,l.zoom-d.tileID.overscaledZ);sn(m,u,c,s,t.symbolSize,l,_,f.posMatrix,b,v,x)}}}}(i,e,n,r,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),a),0!==n.paint.get("icon-opacity").constantOr(1)&&un(e,r,n,i,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),o,s),0!==n.paint.get("text-opacity").constantOr(1)&&un(e,r,n,i,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),o,s),r.map.showCollisionBoxes&&(nn(e,r,n,i,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),!0),nn(e,r,n,i,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),!1))}},circle:function(e,r,n,i){if("translucent"===e.renderPass){var a=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=void 0!==n.layout.get("circle-sort-key").constantOr(1);if(0!==a.constantOr(1)||0!==o.constantOr(1)&&0!==s.constantOr(1)){for(var u=e.context,c=u.gl,h=e.depthModeForSublayer(0,At.ReadOnly),p=Lt.disabled,f=e.colorModeForRenderPass(),d=[],m=0;m<i.length;m++){var y=i[m],v=r.getTile(y),g=v.getBucket(n);if(g){var _=g.programConfigurations.get(n.id),x={programConfiguration:_,program:e.useProgram("circle",_),layoutVertexBuffer:g.layoutVertexBuffer,indexBuffer:g.indexBuffer,uniformValues:Dr(e,y,v,n)};if(l)for(var b=0,w=g.segments.get();b<w.length;b+=1){var T=w[b];d.push({segments:new t.SegmentVector([T]),sortKey:T.sortKey,state:x})}else d.push({segments:g.segments,sortKey:0,state:x})}}l&&d.sort((function(t,e){return t.sortKey-e.sortKey}));for(var k=0,M=d;k<M.length;k+=1){var A=M[k],S=A.state,L=S.programConfiguration,C=S.program,P=S.layoutVertexBuffer,I=S.indexBuffer,E=S.uniformValues,D=A.segments;C.draw(u,c.TRIANGLES,h,p,f,Pt.disabled,E,n.id,P,I,D,n.paint,e.transform.zoom,L)}}}},heatmap:function(e,r,n,i){if(0!==n.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var a=e.context,o=a.gl,s=Lt.disabled,l=new Ct([o.ONE,o.ONE],t.Color.transparent,[!0,!0,!0,!0]);(function(t,e,r){var n=t.gl;t.activeTexture.set(n.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var i=r.heatmapFbo;if(i)n.bindTexture(n.TEXTURE_2D,i.colorAttachment.get()),t.bindFramebuffer.set(i.framebuffer);else{var a=n.createTexture();n.bindTexture(n.TEXTURE_2D,a),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),i=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),function(t,e,r,n){var i=t.gl,a=t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:i.UNSIGNED_BYTE;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,e.width/4,e.height/4,0,i.RGBA,a,null),n.colorAttachment.set(r)}(t,e,a,i)}})(a,e,n),a.clear({color:t.Color.transparent});for(var u=0;u<i.length;u++){var c=i[u];if(!r.hasRenderableParent(c)){var h=r.getTile(c),p=h.getBucket(n);if(p){var f=p.programConfigurations.get(n.id),d=e.useProgram("heatmap",f),m=e.transform.zoom;d.draw(a,o.TRIANGLES,At.disabled,s,l,Pt.disabled,Br(c.posMatrix,h,m,n.paint.get("heatmap-intensity")),n.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,n.paint,e.transform.zoom,f)}}}a.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var n=e.context,i=n.gl,a=r.heatmapFbo;if(a){n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1);var o=r.colorRampTexture;o||(o=r.colorRampTexture=new t.Texture(n,r.colorRamp,i.RGBA)),o.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(n,i.TRIANGLES,At.disabled,Lt.disabled,e.colorModeForRenderPass(),Pt.disabled,Nr(e,r,0,1),r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom)}}(e,n))},line:function(e,r,n,i){if("translucent"===e.renderPass){var a=n.paint.get("line-opacity"),o=n.paint.get("line-width");if(0!==a.constantOr(1)&&0!==o.constantOr(1))for(var s=e.depthModeForSublayer(0,At.ReadOnly),l=e.colorModeForRenderPass(),u=n.paint.get("line-dasharray"),c=n.paint.get("line-pattern"),h=c.constantOr(1),p=n.paint.get("line-gradient"),f=n.getCrossfadeParameters(),d=h?"linePattern":u?"lineSDF":p?"lineGradient":"line",m=e.context,y=m.gl,v=!0,g=0,_=i;g<_.length;g+=1){var x=_[g],b=r.getTile(x);if(!h||b.patternsLoaded()){var w=b.getBucket(n);if(w){var T=w.programConfigurations.get(n.id),k=e.context.program.get(),M=e.useProgram(d,T),A=v||M.program!==k,S=c.constantOr(null);if(S&&b.imageAtlas){var L=b.imageAtlas,C=L.patternPositions[S.to.toString()],P=L.patternPositions[S.from.toString()];C&&P&&T.setConstantPatternPositions(C,P)}var I=h?Hr(e,b,n,f):u?Gr(e,b,n,u,f):p?qr(e,b,n,w.lineClipsArray.length):Vr(e,b,n);if(h)m.activeTexture.set(y.TEXTURE0),b.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),T.updatePaintBuffers(f);else if(u&&(A||e.lineAtlas.dirty))m.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(m);else if(p){var E=w.gradients[n.id],D=E.texture;if(n.gradientVersion!==E.version){var z=256;if(n.stepInterpolant){var O=r.getSource().maxzoom,R=x.canonical.z===O?Math.ceil(1<<e.transform.maxZoom-x.canonical.z):1,F=w.maxLineLength/t.EXTENT*1024*R;z=t.clamp(t.nextPowerOfTwo(F),256,m.maxTextureSize)}E.gradient=t.renderColorRamp({expression:n.gradientExpression(),evaluationKey:"lineProgress",resolution:z,image:E.gradient||void 0,clips:w.lineClipsArray}),E.texture?E.texture.update(E.gradient):E.texture=new t.Texture(m,E.gradient,y.RGBA),E.version=n.gradientVersion,D=E.texture}m.activeTexture.set(y.TEXTURE0),D.bind(n.stepInterpolant?y.NEAREST:y.LINEAR,y.CLAMP_TO_EDGE)}M.draw(m,y.TRIANGLES,s,e.stencilModeForClipping(x),l,Pt.disabled,I,n.id,w.layoutVertexBuffer,w.indexBuffer,w.segments,n.paint,e.transform.zoom,T,w.layoutVertexBuffer2),v=!1}}}}},fill:function(e,r,n,i){var a=n.paint.get("fill-color"),o=n.paint.get("fill-opacity");if(0!==o.constantOr(1)){var s=e.colorModeForRenderPass(),l=n.paint.get("fill-pattern"),u=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===a.constantOr(t.Color.transparent).a&&1===o.constantOr(0)?"opaque":"translucent";if(e.renderPass===u){var c=e.depthModeForSublayer(1,"opaque"===e.renderPass?At.ReadWrite:At.ReadOnly);hn(e,r,n,i,c,s,!1)}if("translucent"===e.renderPass&&n.paint.get("fill-antialias")){var h=e.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,At.ReadOnly);hn(e,r,n,i,h,s,!0)}}},"fill-extrusion":function(t,e,r,n){var i=r.paint.get("fill-extrusion-opacity");if(0!==i&&"translucent"===t.renderPass){var a=new At(t.context.gl.LEQUAL,At.ReadWrite,t.depthRangeFor3D);if(1!==i||r.paint.get("fill-extrusion-pattern").constantOr(1))pn(t,e,r,n,a,Lt.disabled,Ct.disabled),pn(t,e,r,n,a,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var o=t.colorModeForRenderPass();pn(t,e,r,n,a,Lt.disabled,o)}}},hillshade:function(t,e,r,n){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var i=t.context,a=t.depthModeForSublayer(0,At.ReadOnly),o=t.colorModeForRenderPass(),s="translucent"===t.renderPass?t.stencilConfigForOverlap(n):[{},n],l=s[0],u=0,c=s[1];u<c.length;u+=1){var h=c[u],p=e.getTile(h);p.needsHillshadePrepare&&"offscreen"===t.renderPass?dn(t,p,r,a,Lt.disabled,o):"translucent"===t.renderPass&&fn(t,p,r,a,l[h.overscaledZ],o)}i.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,n){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity")&&n.length)for(var i=t.context,a=i.gl,o=e.getSource(),s=t.useProgram("raster"),l=t.colorModeForRenderPass(),u=o instanceof D?[{},n]:t.stencilConfigForOverlap(n),c=u[0],h=u[1],p=h[h.length-1].overscaledZ,f=!t.options.moving,d=0,m=h;d<m.length;d+=1){var y=m[d],v=t.depthModeForSublayer(y.overscaledZ-p,1===r.paint.get("raster-opacity")?At.ReadWrite:At.ReadOnly,a.LESS),g=e.getTile(y),_=t.transform.calculatePosMatrix(y.toUnwrapped(),f);g.registerFadeDuration(r.paint.get("raster-fade-duration"));var x=e.findLoadedParent(y,0),b=mn(g,x,e,r,t.transform),w=void 0,T=void 0,k="nearest"===r.paint.get("raster-resampling")?a.NEAREST:a.LINEAR;i.activeTexture.set(a.TEXTURE0),g.texture.bind(k,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),i.activeTexture.set(a.TEXTURE1),x?(x.texture.bind(k,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,x.tileID.overscaledZ-g.tileID.overscaledZ),T=[g.tileID.canonical.x*w%1,g.tileID.canonical.y*w%1]):g.texture.bind(k,a.CLAMP_TO_EDGE,a.LINEAR_MIPMAP_NEAREST);var M=Wr(_,T||[0,0],w||1,b,r);o instanceof D?s.draw(i,a.TRIANGLES,v,Lt.disabled,l,Pt.disabled,M,r.id,o.boundsBuffer,t.quadTriangleIndexBuffer,o.boundsSegments):s.draw(i,a.TRIANGLES,v,c[y.overscaledZ],l,Pt.disabled,M,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,r){var n=r.paint.get("background-color"),i=r.paint.get("background-opacity");if(0!==i){var a=t.context,o=a.gl,s=t.transform,l=s.tileSize,u=r.paint.get("background-pattern");if(!t.isPatternMissing(u)){var c=!u&&1===n.a&&1===i&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass===c){var h=Lt.disabled,p=t.depthModeForSublayer(0,"opaque"===c?At.ReadWrite:At.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(u?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});u&&(a.activeTexture.set(o.TEXTURE0),t.imageManager.bind(t.context));for(var y=r.getCrossfadeParameters(),v=0,g=m;v<g.length;v+=1){var _=g[v],x=t.transform.calculatePosMatrix(_.toUnwrapped()),b=u?en(x,i,t,u,{tileID:_,tileSize:l},y):tn(x,i,n);d.draw(a,o.TRIANGLES,p,h,f,Pt.disabled,b,r.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,r){for(var n=0;n<r.length;n++)Mn(t,e,r[n])},custom:function(t,e,r){var n=t.context,i=r.implementation;if("offscreen"===t.renderPass){var a=i.prerender;a&&(t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),a.call(i,n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),n.setColorMode(t.colorModeForRenderPass()),n.setStencilMode(Lt.disabled);var o="3d"===i.renderingMode?new At(t.context.gl.LEQUAL,At.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,At.ReadOnly);n.setDepthMode(o),i.render(n.gl,t.transform.customLayerMatrix()),n.setDirty(),t.setBaseState(),n.bindFramebuffer.set(null)}}},Sn=function(t,e){this.context=new It(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=Et.maxUnderzooming+Et.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ve,this.gpuTimers={}};Sn.prototype.resize=function(e,r){if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,i=this.style._order;n<i.length;n+=1){var a=i[n];this.style._layers[a].resize()}},Sn.prototype.setup=function(){var e=this.context,r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(r,We.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var n=new t.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(t.EXTENT,0),n.emplaceBack(0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(n,We.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var i=new t.StructArrayLayout4i8;i.emplaceBack(0,0,0,0),i.emplaceBack(t.EXTENT,0,t.EXTENT,0),i.emplaceBack(0,t.EXTENT,0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(i,E.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout2i4;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,We.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout1ui2;o.emplaceBack(0),o.emplaceBack(1),o.emplaceBack(3),o.emplaceBack(2),o.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(o);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);var l=this.context.gl;this.stencilClearMode=new Lt({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},Sn.prototype.clearStencil=function(){var e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var n=t.create();t.ortho(n,0,this.width,this.height,0,0,1),t.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,At.disabled,this.stencilClearMode,Ct.disabled,Pt.disabled,Fr(n),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Sn.prototype._renderTileClippingMasks=function(t,e){if(this.currentStencilSource!==t.source&&t.isTileClipped()&&e&&e.length){this.currentStencilSource=t.source;var r=this.context,n=r.gl;this.nextStencilID+e.length>256&&this.clearStencil(),r.setColorMode(Ct.disabled),r.setDepthMode(At.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=e;a<o.length;a+=1){var s=o[a],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;i.draw(r,n.TRIANGLES,At.disabled,new Lt({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),Ct.disabled,Pt.disabled,Fr(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Sn.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Lt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},Sn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Lt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},Sn.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s<a;s++)o[s+i]=new Lt({func:r.GEQUAL,mask:255},s+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=a,[o,n]}return[(e={},e[i]=Lt.disabled,e),n]},Sn.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){var r=1/8;return new Ct([e.CONSTANT_COLOR,e.ONE],new t.Color(r,r,r,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?Ct.unblended:Ct.alphaBlended},Sn.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return At.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new At(r||this.context.gl.LEQUAL,e,[n,n])},Sn.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Sn.prototype.render=function(e,r){var n=this;this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var i=this.style._order,a=this.style.sourceCaches;for(var o in a){var s=a[o];s.used&&s.prepare(this.context)}var l,u,c={},h={},p={};for(var f in a){var d=a[f];c[f]=d.getVisibleCoordinates(),h[f]=c[f].slice().reverse(),p[f]=d.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var m=0;m<i.length;m++){var y=i[m];if(this.style._layers[y].is3D()){this.opaquePassCutoff=m;break}}this.renderPass="offscreen";for(var v=0,g=i;v<g.length;v+=1){var _=g[v],x=this.style._layers[_];if(x.hasOffscreenPass()&&!x.isHidden(this.transform.zoom)){var b=h[x.source];("custom"===x.type||b.length)&&this.renderLayer(this,a[x.source],x,b)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=c[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var M=this.style._layers[i[this.currentLayer]],A=a[M.source],S=("symbol"===M.type?p:h)[M.source];this._renderTileClippingMasks(M,c[M.source]),this.renderLayer(this,A,M,S)}this.options.showTileBoundaries&&(t.values(this.style._layers).forEach((function(t){t.source&&!t.isHidden(n.transform.zoom)&&(t.source!==(u&&u.id)&&(u=n.style.sourceCaches[t.source]),(!l||l.getSource().maxzoom<u.getSource().maxzoom)&&(l=u))})),l&&An.debug(this,l,l.getVisibleCoordinates())),this.options.showPadding&&bn(this),this.context.setDefault()},Sn.prototype.renderLayer=function(t,e,r,n){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||n.length)&&(this.id=r.id,this.gpuTimingStart(r),An[r.type](t,e,r,n,this.style.placement.variableOffsets),this.gpuTimingEnd())},Sn.prototype.gpuTimingStart=function(t){if(this.options.gpuTiming){var e=this.context.extTimerQuery,r=this.gpuTimers[t.id];r||(r=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}),r.calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,r.query)}},Sn.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}},Sn.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},Sn.prototype.queryGpuTimers=function(t){var e={};for(var r in t){var n=t[r],i=this.context.extTimerQuery,a=i.getQueryObjectEXT(n.query,i.QUERY_RESULT_EXT)/1e6;i.deleteQueryEXT(n.query),e[r]=a}return e},Sn.prototype.translatePosMatrix=function(e,r,n,i,a){if(!n[0]&&!n[1])return e;var o=a?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(o){var s=Math.sin(o),l=Math.cos(o);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var u=[a?n[0]:ye(r,n[0],this.transform.zoom),a?n[1]:ye(r,n[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},Sn.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},Sn.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},Sn.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},Sn.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new Mr(this.context,t,wr[t],e,rn[t],this._showOverdrawInspector)),this.cache[r]},Sn.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Sn.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},Sn.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},Sn.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Ln=function(t,e){this.points=t,this.planes=e};Ln.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new Ln(a,o)};var Cn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Cn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a<r.length;a++)n[a]=r[a]?this.min[a]:this.center[a],i[a]=r[a]?this.center[a]:this.max[a];return i[2]=this.max[2],new Cn(n,i)},Cn.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},Cn.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},Cn.prototype.intersects=function(e){for(var r=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],n=!0,i=0;i<e.planes.length;i++){for(var a=e.planes[i],o=0,s=0;s<r.length;s++)o+=t.dot$1(a,r[s])>=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<e.points.length;h++){var p=e.points[h][l]-this.min[l];u=Math.min(u,p),c=Math.max(c,p)}if(c<0||u>this.max[l]-this.min[l])return 0}return 1};var Pn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=r,this.right=n};Pn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},Pn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},Pn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},Pn.prototype.clone=function(){return new Pn(this.top,this.bottom,this.left,this.right)},Pn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var In=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Pn,this._posMatrixCache={},this._alignedPosMatrixCache={}},En={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};In.prototype.clone=function(){var t=new In(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},En.minZoom.get=function(){return this._minZoom},En.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},En.maxZoom.get=function(){return this._maxZoom},En.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},En.minPitch.get=function(){return this._minPitch},En.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},En.maxPitch.get=function(){return this._maxPitch},En.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},En.renderWorldCopies.get=function(){return this._renderWorldCopies},En.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},En.worldSize.get=function(){return this.tileSize*this.scale},En.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},En.size.get=function(){return new t.Point(this.width,this.height)},En.bearing.get=function(){return-this.angle/Math.PI*180},En.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},En.pitch.get=function(){return this._pitch/Math.PI*180},En.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},En.fov.get=function(){return this._fov/Math.PI*180},En.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},En.zoom.get=function(){return this._zoom},En.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},En.center.get=function(){return this._center},En.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},En.padding.get=function(){return this._edgeInsets.toJSON()},En.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},En.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},In.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},In.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},In.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},In.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new t.UnwrappedTileID(u,e));return r},In.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=Ln.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var u=function(t){return{aabb:new Cn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],h=[],p=r,f=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var m=c.pop(),y=m.x,v=m.y,g=m.fullyVisible;if(!g){var _=m.aabb.intersects(s);if(0===_)continue;g=2===_}var x=m.aabb.distanceX(o),b=m.aabb.distanceY(o),w=Math.max(Math.abs(x),Math.abs(b)),T=3+(1<<p-m.zoom)-2;if(m.zoom===p||w>T&&m.zoom>=l)h.push({tileID:new t.OverscaledTileID(m.zoom===p?f:m.zoom,m.wrap,m.zoom,y,v),distanceSq:t.sqrLen([o[0]-.5-y,o[1]-.5-v])});else for(var k=0;k<4;k++){var M=(y<<1)+k%2,A=(v<<1)+(k>>1);c.push({aabb:m.aabb.quadrant(k),zoom:m.zoom+1,x:M,y:A,wrap:m.wrap,fullyVisible:g})}}return h.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},In.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},En.unmodified.get=function(){return this._unmodified},In.prototype.zoomScale=function(t){return Math.pow(2,t)},In.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},In.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},In.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},En.point.get=function(){return this.project(this.center)},In.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},In.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},In.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},In.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},In.prototype.coordinateLocation=function(t){return t.toLngLat()},In.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,u=n[1]/a,c=r[2]/i,h=n[2]/a,p=c===h?0:(0-c)/(h-c);return new t.MercatorCoordinate(t.number(o,s,p)/this.worldSize,t.number(l,u,p)/this.worldSize)},In.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},In.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},In.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},In.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},In.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},In.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},In.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var h=this.latRange;a=t.mercatorYfromLat(h[1])*this.worldSize,e=(o=t.mercatorYfromLat(h[0])*this.worldSize)-a<u.y?u.y/(o-a):0}if(this.lngRange){var p=this.lngRange;s=t.mercatorXfromLng(p[0])*this.worldSize,r=(l=t.mercatorXfromLng(p[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var f=this.point,d=Math.max(r||0,e||0);if(d)return this.center=this.unproject(new t.Point(r?(l+s)/2:f.x,e?(o+a)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=f.y,y=u.y/2;m-y<a&&(i=a+y),m+y>o&&(i=o-y)}if(this.lngRange){var v=f.x,g=u.x/2;v-g<s&&(n=s+g),v+g>l&&(n=l-g)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:f.x,void 0!==i?i:f.y))),this._unmodified=c,this._constraining=!1}},In.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,u=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),c=this.height/50,h=new Float64Array(16);t.perspective(h,this._fov,this.width/this.height,c,u),h[8]=2*-r.x/this.width,h[9]=2*r.y/this.height,t.scale(h,h,[1,-1,1]),t.translate(h,h,[0,0,-this.cameraToCenterDistance]),t.rotateX(h,h,this._pitch),t.rotateZ(h,h,this.angle),t.translate(h,h,[-s,-l,0]),this.mercatorMatrix=t.scale([],h,[this.worldSize,this.worldSize,this.worldSize]),t.scale(h,h,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=h,this.invProjMatrix=t.invert([],this.projMatrix);var p=this.width%2/2,f=this.height%2/2,d=Math.cos(this.angle),m=Math.sin(this.angle),y=s-Math.round(s)+d*p+m*f,v=l-Math.round(l)+d*f+m*p,g=new Float64Array(h);if(t.translate(g,g,[y>.5?y-1:y,v>.5?v-1:v,0]),this.alignedProjMatrix=g,h=t.create(),t.scale(h,h,[this.width/2,-this.height/2,1]),t.translate(h,h,[1,-1,0]),this.labelPlaneMatrix=h,h=t.create(),t.scale(h,h,[1,-1,1]),t.translate(h,h,[-1,-1,0]),t.scale(h,h,[2/this.width,2/this.height,1]),this.glCoordMatrix=h,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(h=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=h,this._posMatrixCache={},this._alignedPosMatrixCache={}}},In.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},In.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},In.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s<l.length;s+=1){var u=l[s];n=Math.min(n,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),o=Math.max(o,u.y)}return[new t.Point(n,i),new t.Point(a,i),new t.Point(a,o),new t.Point(n,o),new t.Point(n,i)]},Object.defineProperties(In.prototype,En);var Dn=function(e){var r,n,i,a,o;this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(r=this._updateHashUnthrottled.bind(this),n=300,i=!1,a=null,o=function(){a=null,i&&(r(),a=setTimeout(o,n),i=!1)},function(){return i=!0,a||o(),a})};Dn.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Dn.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Dn.prototype.getHashString=function(e){var r=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,i=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),a=Math.pow(10,i),o=Math.round(r.lng*a)/a,s=Math.round(r.lat*a)/a,l=this._map.getBearing(),u=this._map.getPitch(),c="";if(c+=e?"/"+o+"/"+s+"/"+n:n+"/"+s+"/"+o,(l||u)&&(c+="/"+Math.round(10*l)/10),u&&(c+="/"+Math.round(u)),this._hashName){var h=this._hashName,p=!1,f=t.window.location.hash.slice(1).split("&").map((function(t){var e=t.split("=")[0];return e===h?(p=!0,e+"="+c):t})).filter((function(t){return t}));return p||f.push(h+"="+c),"#"+f.join("&")}return"#"+c},Dn.prototype._getCurrentHash=function(){var e,r=this,n=t.window.location.hash.replace("#","");return this._hashName?(n.split("&").map((function(t){return t.split("=")})).forEach((function(t){t[0]===r._hashName&&(e=t)})),(e&&e[1]||"").split("/")):n.split("/")},Dn.prototype._onHashChange=function(){var t=this._getCurrentHash();if(t.length>=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Dn.prototype._updateHashUnthrottled=function(){var e=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,e)}catch(t){}};var zn={linearity:.3,easing:t.bezier(0,0,.3,1)},On=t.extend({deceleration:2500,maxSpeed:1400},zn),Rn=t.extend({deceleration:20,maxSpeed:1400},zn),Fn=t.extend({deceleration:1e3,maxSpeed:360},zn),Bn=t.extend({deceleration:1e3,maxSpeed:90},zn),Nn=function(t){this._map=t,this.clear()};function Un(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function jn(e,r,n){var i=n.maxSpeed,a=n.linearity,o=n.deceleration,s=t.clamp(e*a/(r/1e3),-i,i),l=Math.abs(s)/(o*a);return{easing:n.easing,duration:1e3*l,amount:s*(l/2)}}Nn.prototype.clear=function(){this._inertiaBuffer=[]},Nn.prototype.record=function(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:e})},Nn.prototype._drainInertiaBuffer=function(){for(var e=this._inertiaBuffer,r=t.browser.now();e.length>0&&r-e[0].time>160;)e.shift()},Nn.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n<i.length;n+=1){var a=i[n].settings;r.zoom+=a.zoomDelta||0,r.bearing+=a.bearingDelta||0,r.pitch+=a.pitchDelta||0,a.panDelta&&r.pan._add(a.panDelta),a.around&&(r.around=a.around),a.pinchAround&&(r.pinchAround=a.pinchAround)}var o=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(r.pan.mag()){var l=jn(r.pan.mag(),o,t.extend({},On,e||{}));s.offset=r.pan.mult(l.amount/r.pan.mag()),s.center=this._map.transform.center,Un(s,l)}if(r.zoom){var u=jn(r.zoom,o,Rn);s.zoom=this._map.transform.zoom+u.amount,Un(s,u)}if(r.bearing){var c=jn(r.bearing,o,Fn);s.bearing=this._map.transform.bearing+t.clamp(c.amount,-179,179),Un(s,c)}if(r.pitch){var h=jn(r.pitch,o,Bn);s.pitch=this._map.transform.pitch+h.amount,Un(s,h)}if(s.zoom||s.bearing){var p=void 0===r.pinchAround?r.around:r.pinchAround;s.around=p?this._map.unproject(p):this._map.getCenter()}return this.clear(),t.extend(s,{noMoveStart:!0})}};var Vn=function(e){function n(n,i,a,o){void 0===o&&(o={});var s=r.mousePos(i.getCanvasContainer(),a),l=i.unproject(s);e.call(this,n,t.extend({point:s,lngLat:l,originalEvent:a},o)),this._defaultPrevented=!1,this.target=i}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),qn=function(e){function n(n,i,a){var o="touchend"===n?a.changedTouches:a.touches,s=r.touchPos(i.getCanvasContainer(),o),l=s.map((function(t){return i.unproject(t)})),u=s.reduce((function(t,e,r,n){return t.add(e.div(n.length))}),new t.Point(0,0)),c=i.unproject(u);e.call(this,n,{points:s,point:u,lngLats:l,lngLat:c,originalEvent:a}),this._defaultPrevented=!1}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var i={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},i.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,i),n}(t.Event),Hn=function(t){function e(e,r,n){t.call(this,e,{originalEvent:n}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Gn=function(t,e){this._map=t,this._clickTolerance=e.clickTolerance};Gn.prototype.reset=function(){delete this._mousedownPos},Gn.prototype.wheel=function(t){return this._firePreventable(new Hn(t.type,this._map,t))},Gn.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Vn(t.type,this._map,t))},Gn.prototype.mouseup=function(t){this._map.fire(new Vn(t.type,this._map,t))},Gn.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Vn(t.type,this._map,t))},Gn.prototype.dblclick=function(t){return this._firePreventable(new Vn(t.type,this._map,t))},Gn.prototype.mouseover=function(t){this._map.fire(new Vn(t.type,this._map,t))},Gn.prototype.mouseout=function(t){this._map.fire(new Vn(t.type,this._map,t))},Gn.prototype.touchstart=function(t){return this._firePreventable(new qn(t.type,this._map,t))},Gn.prototype.touchmove=function(t){this._map.fire(new qn(t.type,this._map,t))},Gn.prototype.touchend=function(t){this._map.fire(new qn(t.type,this._map,t))},Gn.prototype.touchcancel=function(t){this._map.fire(new qn(t.type,this._map,t))},Gn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Gn.prototype.isEnabled=function(){return!0},Gn.prototype.isActive=function(){return!1},Gn.prototype.enable=function(){},Gn.prototype.disable=function(){};var Zn=function(t){this._map=t};Zn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Zn.prototype.mousemove=function(t){this._map.fire(new Vn(t.type,this._map,t))},Zn.prototype.mousedown=function(){this._delayContextMenu=!0},Zn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Vn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Zn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Vn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Zn.prototype.isEnabled=function(){return!0},Zn.prototype.isActive=function(){return!1},Zn.prototype.enable=function(){},Zn.prototype.disable=function(){};var Yn=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Wn(t,e){for(var r={},n=0;n<t.length;n++)r[t[n].identifier]=e[n];return r}Yn.prototype.isEnabled=function(){return!!this._enabled},Yn.prototype.isActive=function(){return!!this._active},Yn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Yn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Yn.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(r.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},Yn.prototype.mousemoveWindow=function(t,e){if(this._active){var n=e;if(!(this._lastPos.equals(n)||!this._box&&n.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=n,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var a=Math.min(i.x,n.x),o=Math.max(i.x,n.x),s=Math.min(i.y,n.y),l=Math.max(i.y,n.y);r.setTransform(this._box,"translate("+a+"px,"+s+"px)"),this._box.style.width=o-a+"px",this._box.style.height=l-s+"px"}}},Yn.prototype.mouseupWindow=function(e,n){var i=this;if(this._active&&0===e.button){var a=this._startPos,o=n;if(this.reset(),r.suppressClick(),a.x!==o.x||a.y!==o.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:function(t){return t.fitScreenCoordinates(a,o,i._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",e)}},Yn.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))},Yn.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},Yn.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Xn=function(t){this.reset(),this.numTouches=t.numTouches};Xn.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Xn.prototype.touchstart=function(e,r,n){(this.centroid||n.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n<i.length;n+=1){var a=i[n];r._add(a)}return r.div(e.length)}(r),this.touches=Wn(n,r)))},Xn.prototype.touchmove=function(t,e,r){if(!this.aborted&&this.centroid){var n=Wn(r,e);for(var i in this.touches){var a=this.touches[i],o=n[i];(!o||o.dist(a)>30)&&(this.aborted=!0)}}},Xn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Jn=function(t){this.singleTap=new Xn(t),this.numTaps=t.numTaps,this.reset()};Jn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Jn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},Jn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},Jn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Kn=function(){this._zoomIn=new Jn({numTouches:1,numTaps:2}),this._zoomOut=new Jn({numTouches:2,numTaps:1}),this.reset()};Kn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Kn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Kn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Kn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Kn.prototype.touchcancel=function(){this.reset()},Kn.prototype.enable=function(){this._enabled=!0},Kn.prototype.disable=function(){this._enabled=!1,this.reset()},Kn.prototype.isEnabled=function(){return this._enabled},Kn.prototype.isActive=function(){return this._active};var Qn={};Qn[0]=1,Qn[2]=2;var $n=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};$n.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},$n.prototype._correctButton=function(t,e){return!1},$n.prototype._move=function(t,e){return{}},$n.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},$n.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r)if(t.preventDefault(),function(t,e){var r=Qn[e];return void 0===t.buttons||(t.buttons&r)!==r}(t,this._eventButton))this.reset();else if(this._moved||!(e.dist(r)<this._clickTolerance))return this._moved=!0,this._lastPoint=e,this._move(r,e)},$n.prototype.mouseupWindow=function(t){this._lastPoint&&r.mouseButton(t)===this._eventButton&&(this._moved&&r.suppressClick(),this.reset())},$n.prototype.enable=function(){this._enabled=!0},$n.prototype.disable=function(){this._enabled=!1,this.reset()},$n.prototype.isEnabled=function(){return this._enabled},$n.prototype.isActive=function(){return this._active};var ti=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.mousedown=function(e,r){t.prototype.mousedown.call(this,e,r),this._lastPoint&&(this._active=!0)},e.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},e.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},e}($n),ei=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=.8*(e.x-t.x);if(r)return this._active=!0,{bearingDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}($n),ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=-.5*(e.y-t.y);if(r)return this._active=!0,{pitchDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}($n),ni=function(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()};ni.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)},ni.prototype.touchstart=function(t,e,r){return this._calculateTransform(t,e,r)},ni.prototype.touchmove=function(t,e,r){if(this._active&&!(r.length<this._minTouches))return t.preventDefault(),this._calculateTransform(t,e,r)},ni.prototype.touchend=function(t,e,r){this._calculateTransform(t,e,r),this._active&&r.length<this._minTouches&&this.reset()},ni.prototype.touchcancel=function(){this.reset()},ni.prototype._calculateTransform=function(e,r,n){n.length>0&&(this._active=!0);var i=Wn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var u=i[l],c=this._touches[l];c&&(a._add(u),o._add(u.sub(c)),s++,i[l]=u)}if(this._touches=i,!(s<this._minTouches)&&o.mag()){var h=o.div(s);if(this._sum._add(h),!(this._sum.mag()<this._clickTolerance))return{around:a.div(s),panDelta:h}}},ni.prototype.enable=function(){this._enabled=!0},ni.prototype.disable=function(){this._enabled=!1,this.reset()},ni.prototype.isEnabled=function(){return this._enabled},ni.prototype.isActive=function(){return this._active};var ii=function(){this.reset()};function ai(t,e,r){for(var n=0;n<t.length;n++)if(t[n].identifier===r)return e[n]}ii.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},ii.prototype._start=function(t){},ii.prototype._move=function(t,e,r){return{}},ii.prototype.touchstart=function(t,e,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([e[0],e[1]]))},ii.prototype.touchmove=function(t,e,r){if(this._firstTwoTouches){t.preventDefault();var n=this._firstTwoTouches,i=n[0],a=n[1],o=ai(r,e,i),s=ai(r,e,a);if(o&&s){var l=this._aroundCenter?null:o.add(s).div(2);return this._move([o,s],l,t)}}},ii.prototype.touchend=function(t,e,n){if(this._firstTwoTouches){var i=this._firstTwoTouches,a=i[0],o=i[1],s=ai(n,e,a),l=ai(n,e,o);s&&l||(this._active&&r.suppressClick(),this.reset())}},ii.prototype.touchcancel=function(){this.reset()},ii.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around},ii.prototype.disable=function(){this._enabled=!1,this.reset()},ii.prototype.isEnabled=function(){return this._enabled},ii.prototype.isActive=function(){return this._active};function oi(t,e){return Math.log(t/e)/Math.LN2}var si=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._distance,delete this._startDistance},e.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(oi(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:oi(this._distance,r),pinchAround:e}},e}(ii);function li(t,e){return 180*t.angleWith(e)/Math.PI}var ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},e.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:li(this._vector,r),pinchAround:e}},e.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,r=li(t,this._startVector);return Math.abs(r)<e},e}(ii);function ci(t){return Math.abs(t.y)>Math.abs(t.x)}var hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ci(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ci(t)&&ci(e)&&a}},e}(ii),pi={panStep:100,bearingStep:15,pitchStep:10},fi=function(){var t=pi;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1};function di(t){return t*(2-t)}fi.prototype.reset=function(){this._active=!1},fi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,i=0),{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:di,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active},fi.prototype.disableRotation=function(){this._rotationDisabled=!0},fi.prototype.enableRotation=function(){this._rotationDisabled=!1};var mi=4.000244140625,yi=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,t.bindAll(["_onTimeout"],this)};yi.prototype.setZoomRate=function(t){this._defaultZoomRate=t},yi.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},yi.prototype.isEnabled=function(){return!!this._enabled},yi.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},yi.prototype.isZooming=function(){return!!this._zooming},yi.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},yi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yi.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%mi==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}},yi.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},yi.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},yi.prototype.renderFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>mi?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var h=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),p=u(h);o=t.number(l,s,p),h<1?this._frameId||(this._frameId=!0):c=!0}else o=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},yi.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},yi.prototype.reset=function(){this._active=!1};var vi=function(t,e){this._clickZoom=t,this._tapZoom=e};vi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},vi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},vi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},vi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var gi=function(){this.reset()};gi.prototype.reset=function(){this._active=!1},gi.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},gi.prototype.enable=function(){this._enabled=!0},gi.prototype.disable=function(){this._enabled=!1,this.reset()},gi.prototype.isEnabled=function(){return this._enabled},gi.prototype.isActive=function(){return this._active};var _i=function(){this._tap=new Jn({numTouches:1,numTaps:1}),this.reset()};_i.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},_i.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},_i.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},_i.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},_i.prototype.touchcancel=function(){this.reset()},_i.prototype.enable=function(){this._enabled=!0},_i.prototype.disable=function(){this._enabled=!1,this.reset()},_i.prototype.isEnabled=function(){return this._enabled},_i.prototype.isActive=function(){return this._active};var xi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};xi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},xi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},xi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},xi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var bi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};bi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},bi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},bi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},bi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var wi=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};wi.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},wi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},wi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},wi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},wi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},wi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ti=function(t){return t.zoom||t.drag||t.pitch||t.rotate},ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.Event);function Mi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var Ai=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Nn(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[t.window,"blur",void 0]];for(var a=0,o=this._listeners;a<o.length;a+=1){var s=o[a],l=s[0],u=s[1],c=s[2];r.addEventListener(l,u,l===t.window.document?this.handleWindowEvent:this.handleEvent,c)}};Ai.prototype.destroy=function(){for(var e=0,n=this._listeners;e<n.length;e+=1){var i=n[e],a=i[0],o=i[1],s=i[2];r.removeEventListener(a,o,a===t.window.document?this.handleWindowEvent:this.handleEvent,s)}},Ai.prototype._addDefaultHandlers=function(t){var e=this._map,r=e.getCanvasContainer();this._add("mapEvent",new Gn(e,t));var n=e.boxZoom=new Yn(e,t);this._add("boxZoom",n);var i=new Kn,a=new gi;e.doubleClickZoom=new vi(a,i),this._add("tapZoom",i),this._add("clickZoom",a);var o=new _i;this._add("tapDragZoom",o);var s=e.touchPitch=new hi;this._add("touchPitch",s);var l=new ei(t),u=new ri(t);e.dragRotate=new bi(t,l,u),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",u,["mouseRotate"]);var c=new ti(t),h=new ni(t);e.dragPan=new xi(r,c,h),this._add("mousePan",c),this._add("touchPan",h,["touchZoom","touchRotate"]);var p=new ui,f=new si;e.touchZoomRotate=new wi(r,f,p,o),this._add("touchRotate",p,["touchPan","touchZoom"]),this._add("touchZoom",f,["touchPan","touchRotate"]);var d=e.scrollZoom=new yi(e,this);this._add("scrollZoom",d,["mousePan"]);var m=e.keyboard=new fi;this._add("keyboard",m),this._add("blockableMapEvent",new Zn(e));for(var y=0,v=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];y<v.length;y+=1){var g=v[y];t.interactive&&t[g]&&e[g].enable(t[g])}},Ai.prototype._add=function(t,e,r){this._handlers.push({handlerName:t,handler:e,allowed:r}),this._handlersById[t]=e},Ai.prototype.stop=function(t){if(!this._updatingCamera){for(var e=0,r=this._handlers;e<r.length;e+=1)r[e].handler.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}},Ai.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},Ai.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Ai.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Ai.prototype.isMoving=function(){return Boolean(Ti(this._eventsInProgress))||this.isZooming()},Ai.prototype._blockedByActive=function(t,e,r){for(var n in t)if(n!==r&&(!e||e.indexOf(n)<0))return!0;return!1},Ai.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},Ai.prototype._getMapTouches=function(t){for(var e=[],r=0,n=t;r<n.length;r+=1){var i=n[r],a=i.target;this._el.contains(a)&&e.push(i)}return e},Ai.prototype.handleEvent=function(t,e){if("blur"!==t.type){this._updatingCamera=!0;for(var n="renderFrame"===t.type?void 0:t,i={needsRenderFrame:!1},a={},o={},s=t.touches?this._getMapTouches(t.touches):void 0,l=s?r.touchPos(this._el,s):r.mousePos(this._el,t),u=0,c=this._handlers;u<c.length;u+=1){var h=c[u],p=h.handlerName,f=h.handler,d=h.allowed;if(f.isEnabled()){var m=void 0;this._blockedByActive(o,d,p)?f.reset():f[e||t.type]&&(m=f[e||t.type](t,l,s),this.mergeHandlerResult(i,a,m,p,n),m&&m.needsRenderFrame&&this._triggerRenderFrame()),(m||f.isActive())&&(o[p]=f)}}var y={};for(var v in this._previousActiveHandlers)o[v]||(y[v]=n);this._previousActiveHandlers=o,(Object.keys(y).length||Mi(i))&&(this._changes.push([i,a,y]),this._triggerRenderFrame()),(Object.keys(o).length||Mi(i))&&this._map._stop(!0),this._updatingCamera=!1;var g=i.cameraAnimation;g&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],g(this._map))}else this.stop(!0)},Ai.prototype.mergeHandlerResult=function(e,r,n,i,a){if(n){t.extend(e,n);var o={handlerName:i,originalEvent:n.originalEvent||a};void 0!==n.zoomDelta&&(r.zoom=o),void 0!==n.panDelta&&(r.drag=o),void 0!==n.pitchDelta&&(r.pitch=o),void 0!==n.bearingDelta&&(r.rotate=o)}},Ai.prototype._applyChanges=function(){for(var e={},r={},n={},i=0,a=this._changes;i<a.length;i+=1){var o=a[i],s=o[0],l=o[1],u=o[2];s.panDelta&&(e.panDelta=(e.panDelta||new t.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(e.around=s.around),void 0!==s.pinchAround&&(e.pinchAround=s.pinchAround),s.noInertia&&(e.noInertia=s.noInertia),t.extend(r,l),t.extend(n,u)}this._updateMapTransform(e,r,n),this._changes=[]},Ai.prototype._updateMapTransform=function(t,e,r){var n=this._map,i=n.transform;if(!Mi(t))return this._fireEvents(e,r,!0);var a=t.panDelta,o=t.zoomDelta,s=t.bearingDelta,l=t.pitchDelta,u=t.around,c=t.pinchAround;void 0!==c&&(u=c),n._stop(!0),u=u||n.transform.centerPoint;var h=i.pointLocation(a?u.sub(a):u);s&&(i.bearing+=s),l&&(i.pitch+=l),o&&(i.zoom+=o),i.setLocationAtPoint(h,u),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,r,!0)},Ai.prototype._fireEvents=function(e,r,n){var i=this,a=Ti(this._eventsInProgress),o=Ti(e),s={};for(var l in e){var u=e[l].originalEvent;this._eventsInProgress[l]||(s[l+"start"]=u),this._eventsInProgress[l]=e[l]}for(var c in!a&&o&&this._fireEvent("movestart",o.originalEvent),s)this._fireEvent(c,s[c]);for(var h in o&&this._fireEvent("move",o.originalEvent),e){var p=e[h].originalEvent;this._fireEvent(h,p)}var f,d={};for(var m in this._eventsInProgress){var y=this._eventsInProgress[m],v=y.handlerName,g=y.originalEvent;this._handlersById[v].isActive()||(delete this._eventsInProgress[m],f=r[v]||g,d[m+"end"]=f)}for(var _ in d)this._fireEvent(_,d[_]);var x=Ti(this._eventsInProgress);if(n&&(a||o)&&!x){this._updatingCamera=!0;var b=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),w=function(t){return 0!==t&&-i._bearingSnap<t&&t<i._bearingSnap};b?(w(b.bearing||this._map.getBearing())&&(b.bearing=0),this._map.easeTo(b,{originalEvent:f})):(this._map.fire(new t.Event("moveend",{originalEvent:f})),w(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Ai.prototype._fireEvent=function(e,r){this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Ai.prototype._requestFrame=function(){var t=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add((function(e){delete t._frameId,t.handleEvent(new ki("renderFrame",{timeStamp:e})),t._applyChanges()}))},Ai.prototype._triggerRenderFrame=function(){void 0===this._frameId&&(this._frameId=this._requestFrame())};var Si=function(e){function r(r,n){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,n){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),n)},r.prototype.panTo=function(e,r,n){return this.easeTo(t.extend({center:e},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,n){return this.easeTo(t.extend({zoom:e},r),n)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.getPadding=function(){return this.transform.padding},r.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},r.prototype.rotateTo=function(e,r,n){return this.easeTo(t.extend({bearing:e},r),n)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.resetNorthPitch=function(e,r){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){e=t.LngLatBounds.convert(e);var n=r&&r.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),n,r)},r.prototype._cameraForBoxAndBearing=function(e,r,n,i){var a={top:0,bottom:0,right:0,left:0};if("number"==typeof(i=t.extend({padding:a,offset:[0,0],maxZoom:this.transform.maxZoom},i)).padding){var o=i.padding;i.padding={top:o,bottom:o,right:o,left:o}}i.padding=t.extend(a,i.padding);var s=this.transform,l=s.padding,u=s.project(t.LngLat.convert(e)),c=s.project(t.LngLat.convert(r)),h=u.rotate(-n*Math.PI/180),p=c.rotate(-n*Math.PI/180),f=new t.Point(Math.max(h.x,p.x),Math.max(h.y,p.y)),d=new t.Point(Math.min(h.x,p.x),Math.min(h.y,p.y)),m=f.sub(d),y=(s.width-(l.left+l.right+i.padding.left+i.padding.right))/m.x,v=(s.height-(l.top+l.bottom+i.padding.top+i.padding.bottom))/m.y;if(!(v<0||y<0)){var g=Math.min(s.scaleZoom(s.scale*Math.min(y,v)),i.maxZoom),_="number"==typeof i.offset.x?new t.Point(i.offset.x,i.offset.y):t.Point.convert(i.offset),x=(i.padding.left-i.padding.right)/2,b=(i.padding.top-i.padding.bottom)/2,w=new t.Point(x,b).rotate(n*Math.PI/180),T=_.add(w).mult(s.scale/s.zoomScale(g));return{center:s.unproject(u.add(c).div(2).sub(T)),zoom:g,bearing:n}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,n,i,a){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),n,i),i,a)},r.prototype._fitInternal=function(e,r,n){return e?(delete(r=t.extend(e,r)).padding,r.linear?this.easeTo(r,n):this.flyTo(r,n)):this},r.prototype.jumpTo=function(e,r){this.stop();var n=this.transform,i=!1,a=!1,o=!1;return"zoom"in e&&n.zoom!==+e.zoom&&(i=!0,n.zoom=+e.zoom),void 0!==e.center&&(n.center=t.LngLat.convert(e.center)),"bearing"in e&&n.bearing!==+e.bearing&&(a=!0,n.bearing=+e.bearing),"pitch"in e&&n.pitch!==+e.pitch&&(o=!0,n.pitch=+e.pitch),null==e.padding||n.isPaddingEqual(e.padding)||(n.padding=e.padding),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),i&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),a&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),o&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var n=this;this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.browser.prefersReducedMotion)&&(e.duration=0);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l=this.getPadding(),u="zoom"in e?+e.zoom:a,c="bearing"in e?this._normalizeBearing(e.bearing,o):o,h="pitch"in e?+e.pitch:s,p="padding"in e?e.padding:i.padding,f=t.Point.convert(e.offset),d=i.centerPoint.add(f),m=i.pointLocation(d),y=t.LngLat.convert(e.center||m);this._normalizeCenter(y);var v,g,_=i.project(m),x=i.project(y).sub(_),b=i.zoomScale(u-a);e.around&&(v=t.LngLat.convert(e.around),g=i.locationPoint(v));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||u!==a,this._rotating=this._rotating||o!==c,this._pitching=this._pitching||h!==s,this._padding=!i.isPaddingEqual(p),this._easeId=e.easeId,this._prepareEase(r,e.noMoveStart,w),this._ease((function(e){if(n._zooming&&(i.zoom=t.number(a,u,e)),n._rotating&&(i.bearing=t.number(o,c,e)),n._pitching&&(i.pitch=t.number(s,h,e)),n._padding&&(i.interpolatePadding(l,p,e),d=i.centerPoint.add(f)),v)i.setLocationAtPoint(v,g);else{var m=i.zoomScale(i.zoom-a),y=u>a?Math.min(2,b):Math.max(.5,b),w=Math.pow(y,1-e),T=i.unproject(_.add(x.mult(e*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),a&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,h="bearing"in e?this._normalizeBearing(e.bearing,s):s,p="pitch"in e?+e.pitch:l,f="padding"in e?e.padding:a.padding,d=a.zoomScale(c-o),m=t.Point.convert(e.offset),y=a.centerPoint.add(m),v=a.pointLocation(y),g=t.LngLat.convert(e.center||v);this._normalizeCenter(g);var _=a.project(v),x=a.project(g).sub(_),b=e.curve,w=Math.max(a.width,a.height),T=w/d,k=x.mag();if("minZoom"in e){var M=t.clamp(Math.min(e.minZoom,o,c),a.minZoom,a.maxZoom),A=w/a.zoomScale(M-o);b=Math.sqrt(A/k*2)}var S=b*b;function L(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function C(t){return(Math.exp(t)-Math.exp(-t))/2}function P(t){return(Math.exp(t)+Math.exp(-t))/2}var I=L(0),E=function(t){return P(I)/P(I+b*t)},D=function(t){return w*((P(I)*(C(e=I+b*t)/P(e))-C(I))/S)/k;var e},z=(L(1)-I)/b;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var O=T<w?-1:1;z=Math.abs(Math.log(T/w))/b,D=function(){return 0},E=function(t){return Math.exp(O*b*t)}}if("duration"in e)e.duration=+e.duration;else{var R="screenSpeed"in e?+e.screenSpeed/b:+e.speed;e.duration=1e3*z/R}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==h,this._pitching=p!==l,this._padding=!a.isPaddingEqual(f),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/E(i);a.zoom=1===e?c:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,h,e)),n._pitching&&(a.pitch=t.number(l,p,e)),n._padding&&(a.interpolatePadding(u,f,e),y=a.centerPoint.add(m));var v=1===e?g:a.unproject(_.add(x.mult(D(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,y),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop(!1)}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)<n&&(e-=360),Math.abs(e+360-r)<n&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),Li=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Li.prototype.getDefaultPosition=function(){return"bottom-right"},Li.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Li.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Li.prototype._setElementTitle=function(t,e){var r=this._map._getUIString("AttributionControl."+e);t.title=r,t.setAttribute("aria-label",r)},Li.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Li.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+"="+e.value+(n<r.length-1?"&":"")),t}),"?");e.href=t.config.FEEDBACK_URL+"/"+n+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener nofollow",this._setElementTitle(e,"MapFeedback")}},Li.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"visibility"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},Li.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((function(t){return"string"!=typeof t?"":t}))):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var n in r){var i=r[n];if(i.used){var a=i.getSource();a.attribution&&t.indexOf(a.attribution)<0&&t.push(a.attribution)}}t.sort((function(t,e){return t.length-e.length}));var o=(t=t.filter((function(e,r){for(var n=r+1;n<t.length;n++)if(t[n].indexOf(e)>=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Li.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Ci=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Ci.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ci.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ci.prototype.getDefaultPosition=function(){return"bottom-left"},Ci.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Ci.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},Ci.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var Pi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Pi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Pi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;r<n.length;r+=1){var i=n[r];if(i.id===t)return void(i.cancelled=!0)}},Pi.prototype.run=function(t){void 0===t&&(t=0);var e=this._currentlyRunning=this._queue;this._queue=[];for(var r=0,n=e;r<n.length;r+=1){var i=n[r];if(!i.cancelled&&(i.callback(t),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Pi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Ii={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},Ei=t.window.HTMLImageElement,Di=t.window.HTMLElement,zi=t.window.ImageBitmap,Oi=60,Ri={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:Oi,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Fi=function(n){function i(e){var r=this;if(null!=(e=t.extend({},Ri,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>Oi)throw new Error("maxPitch must be less than or equal to 60");var i=new In(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new Pi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ii,e.locale),this._clickTolerance=e.clickTolerance,this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Di))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ai(this,e);var a="string"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Dn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new Li({customAttribution:e.customAttribution})),this.addControl(new Ci,e.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){r.fire(new t.Event(e.dataType+"dataloading",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.hasControl=function(t){return this._controls.indexOf(t)>-1},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),a&&this.fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},i.prototype.getMinZoom=function(){return this.transform.minZoom},i.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},i.prototype.getMinPitch=function(){return this.transform.minPitch},i.prototype.setMaxPitch=function(t){if((t=null==t?Oi:t)>Oi)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if("mouseenter"===t||"mouseover"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Vn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"===t||"mouseout"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Vn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Vn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o<a.length;o++){var s=a[o];if(s.layer===e&&s.listener===r){for(var l in s.delegates)i.off(l,s.delegates[l]);return a.splice(o,1),i}}}(this._delegatedListeners),this},i.prototype.queryRenderedFeatures=function(e,r){if(!this.style)return[];var n;if(void 0!==r||void 0===e||e instanceof t.Point||Array.isArray(e)||(r=e,e=void 0),r=r||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])n=[t.Point.convert(e)];else{var i=t.Point.convert(e[0]),a=t.Point.convert(e[1]);n=[i,new t.Point(a.x,i.y),a,new t.Point(i.x,a.y),i]}return this.style.queryRenderedFeatures(n,r,this.transform)},i.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},i.prototype.setStyle=function(e,r){return!1!==(r=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))},i.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error("Missing UI string '"+t+"'");return e},i.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new Ye(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},i.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Ye(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},i.prototype._diffStyle=function(e,r){var n=this;if("string"==typeof e){var i=this._requestManager.normalizeStyleURL(e),a=this._requestManager.transformRequest(i,t.ResourceType.Style);t.getJSON(a,(function(e,i){e?n.fire(new t.ErrorEvent(e)):i&&n._updateDiff(i,r)}))}else"object"==typeof e&&this._updateDiff(e,r)},i.prototype._updateDiff=function(e,r){try{this.style.setState(e)&&this._update(!0)}catch(n){t.warnOnce("Unable to perform style diff: "+(n.message||n.error||n)+". Rebuilding the style from scratch."),this._updateStyle(e,r)}},i.prototype.getStyle=function(){if(this.style)return this.style.serialize()},i.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},i.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},i.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},i.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var n in r){var i=r[n];if("loaded"!==i.state&&"errored"!==i.state)return!1}}return!0},i.prototype.addSourceType=function(t,e,r){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,r)},i.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},i.prototype.getSource=function(t){return this.style.getSource(t)},i.prototype.addImage=function(e,r,n){void 0===n&&(n={});var i=n.pixelRatio;void 0===i&&(i=1);var a=n.sdf;void 0===a&&(a=!1);var o=n.stretchX,s=n.stretchY,l=n.content;this._lazyInitEmptyStyle();if(r instanceof Ei||zi&&r instanceof zi){var u=t.browser.getImageData(r),c=u.width,h=u.height,p=u.data;this.style.addImage(e,{data:new t.RGBAImage({width:c,height:h},p),pixelRatio:i,stretchX:o,stretchY:s,content:l,sdf:a,version:0})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var f=r.width,d=r.height,m=r.data,y=r;this.style.addImage(e,{data:new t.RGBAImage({width:f,height:d},new Uint8Array(m)),pixelRatio:i,stretchX:o,stretchY:s,content:l,sdf:a,version:0,userImage:y}),y.onAdd&&y.onAdd(this,e)}},i.prototype.updateImage=function(e,r){var n=this.style.getImage(e);if(!n)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var i=r instanceof Ei||zi&&r instanceof zi?t.browser.getImageData(r):r,a=i.width,o=i.height,s=i.data;if(void 0===a||void 0===o)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(a!==n.data.width||o!==n.data.height)return this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var l=!(r instanceof Ei||zi&&r instanceof zi);n.data.replace(s,l),this.style.updateImage(e,n)},i.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},i.prototype.removeImage=function(t){this.style.removeImage(t)},i.prototype.loadImage=function(e,r){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),r)},i.prototype.listImages=function(){return this.style.listImages()},i.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},i.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},i.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},i.prototype.getLayer=function(t){return this.style.getLayer(t)},i.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0)},i.prototype.setFilter=function(t,e,r){return void 0===r&&(r={}),this.style.setFilter(t,e,r),this._update(!0)},i.prototype.getFilter=function(t){return this.style.getFilter(t)},i.prototype.setPaintProperty=function(t,e,r,n){return void 0===n&&(n={}),this.style.setPaintProperty(t,e,r,n),this._update(!0)},i.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},i.prototype.setLayoutProperty=function(t,e,r,n){return void 0===n&&(n={}),this.style.setLayoutProperty(t,e,r,n),this._update(!0)},i.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},i.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},i.prototype.getLight=function(){return this.style.getLight()},i.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},i.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},i.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},i.prototype.getContainer=function(){return this._container},i.prototype.getCanvasContainer=function(){return this._canvasContainer},i.prototype.getCanvas=function(){return this._canvas},i.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},i.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},i.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=r.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var n=this._containerDimensions();this._resizeCanvas(n[0],n[1]);var i=this._controlContainer=r.create("div","mapboxgl-control-container",t),a=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(t){a[t]=r.create("div","mapboxgl-ctrl-"+t,i)})),this._container.addEventListener("scroll",this._onMapScroll,!1)},i.prototype._resizeCanvas=function(e,r){var n=t.browser.devicePixelRatio||1;this._canvas.width=n*e,this._canvas.height=n*r,this._canvas.style.width=e+"px",this._canvas.style.height=r+"px"},i.prototype._setupPainter=function(){var r=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);n?(this.painter=new Sn(n,this.transform),t.webpSupported.testSupport(n)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},i.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},i.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},i.prototype._onMapScroll=function(t){if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},i.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},i.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},i.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},i.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},i.prototype._render=function(e){var r,n=this,i=0,a=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(r=a.createQueryEXT(),a.beginQueryEXT(a.TIME_ELAPSED_EXT,r),i=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),!this._removed){var o=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,l=t.browser.now();this.style.zoomHistory.update(s,l);var u=new t.EvaluationParameters(s,{now:l,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=u.crossFadingFactor();1===c&&c===this._crossFadingFactor||(o=!0,this._crossFadingFactor=c),this.style.update(u)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||o)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var h=t.browser.now()-i;a.endQueryEXT(a.TIME_ELAPSED_EXT,r),setTimeout((function(){var e=a.getQueryObjectEXT(r,a.QUERY_RESULT_EXT)/1e6;a.deleteQueryEXT(r),n.fire(new t.Event("gpu-timing-frame",{cpuTime:h,gpuTime:e}))}),50)}if(this.listens("gpu-timing-layer")){var p=this.painter.collectGpuTimers();setTimeout((function(){var e=n.painter.queryGpuTimers(p);n.fire(new t.Event("gpu-timing-layer",{layerTimes:e}))}),50)}var f=this._sourcesDirty||this._styleDirty||this._placementDirty;return f||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),!this._loaded||this._fullyLoaded||f||(this._fullyLoaded=!0),this}},i.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,r=this._controls;e<r.length;e+=1)r[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("orientationchange",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var n=this.painter.context.gl.getExtension("WEBGL_lose_context");n&&n.loseContext&&n.loseContext(),Bi(this._canvasContainer),Bi(this._controlContainer),Bi(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},i.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame((function(t){e._frame=null,e._render(t)})))},i.prototype._onWindowOnline=function(){this._update()},i.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},a.showTileBoundaries.get=function(){return!!this._showTileBoundaries},a.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},a.showPadding.get=function(){return!!this._showPadding},a.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},a.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},a.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},a.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},a.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},a.repaint.get=function(){return!!this._repaint},a.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},a.vertices.get=function(){return!!this._vertices},a.vertices.set=function(t){this._vertices=t,this._update()},i.prototype._setCacheLimits=function(e,r){t.setCacheLimits(e,r)},a.version.get=function(){return t.version},Object.defineProperties(i.prototype,a),i}(Si);function Bi(t){t.parentNode&&t.parentNode.removeChild(t)}var Ni={showCompass:!0,showZoom:!0,visualizePitch:!1},Ui=function(e){var n=this;this.options=t.extend({},Ni,e),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(function(t){return n._map.zoomIn({},{originalEvent:t})})),r.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(function(t){return n._map.zoomOut({},{originalEvent:t})})),r.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(function(t){n.options.visualizePitch?n._map.resetNorthPitch({},{originalEvent:t}):n._map.resetNorth({},{originalEvent:t})})),this._compassIcon=r.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Ui.prototype._updateZoomButtons=function(){var t=this._map.getZoom(),e=t===this._map.getMaxZoom(),r=t===this._map.getMinZoom();this._zoomInButton.disabled=e,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",e.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},Ui.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=t},Ui.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ji(this._map,this._compass,this.options.visualizePitch)),this._container},Ui.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Ui.prototype._createButton=function(t,e){var n=r.create("button",t,this._container);return n.type="button",n.addEventListener("click",e),n},Ui.prototype._setButtonTitle=function(t,e){var r=this._map._getUIString("NavigationControl."+e);t.title=r,t.setAttribute("aria-label",r)};var ji=function(e,n,i){void 0===i&&(i=!1),this._clickTolerance=10,this.element=n,this.mouseRotate=new ei({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,i&&(this.mousePitch=new ri({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener(n,"mousedown",this.mousedown),r.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(n,"touchmove",this.touchmove),r.addEventListener(n,"touchend",this.touchend),r.addEventListener(n,"touchcancel",this.reset)};function Vi(e,r,n){if(e=new t.LngLat(e.lng,e.lat),r){var i=new t.LngLat(e.lng-360,e.lat),a=new t.LngLat(e.lng+360,e.lat),o=n.locationPoint(e).distSqr(r);n.locationPoint(i).distSqr(r)<o?e=i:n.locationPoint(a).distSqr(r)<o&&(e=a)}for(;Math.abs(e.lng-n.center.lng)>180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}ji.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},ji.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},ji.prototype.off=function(){var t=this.element;r.removeEventListener(t,"mousedown",this.mousedown),r.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(t,"touchmove",this.touchmove),r.removeEventListener(t,"touchend",this.touchend),r.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},ji.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,"mousemove",this.mousemove),r.removeEventListener(t.window,"mouseup",this.mouseup)},ji.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,"mousemove",this.mousemove),r.addEventListener(t.window,"mouseup",this.mouseup)},ji.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},ji.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},ji.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},ji.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},ji.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},ji.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var qi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Hi(t,e,r){var n=t.classList;for(var i in qi)n.remove("mapboxgl-"+r+"-anchor-"+i);n.add("mapboxgl-"+r+"-anchor-"+e)}var Gi,Zi=function(e){function n(n,i){if(e.call(this),(n instanceof t.window.HTMLElement||i)&&(n=t.extend({element:n},i)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._scale=n&&n.scale||1,this._draggable=n&&n.draggable||!1,this._clickTolerance=n&&n.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=n&&n.rotation||0,this._rotationAlignment=n&&n.rotationAlignment||"auto",this._pitchAlignment=n&&n.pitchAlignment&&"auto"!==n.pitchAlignment?n.pitchAlignment:this._rotationAlignment,n&&n.element)this._element=n.element,this._offset=t.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var a=r.createNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","41px"),a.setAttributeNS(null,"width","27px"),a.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var u=0,c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];u<c.length;u+=1){var h=c[u],p=r.createNS("http://www.w3.org/2000/svg","ellipse");p.setAttributeNS(null,"opacity","0.04"),p.setAttributeNS(null,"cx","10.5"),p.setAttributeNS(null,"cy","5.80029008"),p.setAttributeNS(null,"rx",h.rx),p.setAttributeNS(null,"ry",h.ry),l.appendChild(p)}var f=r.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"fill",this._color);var d=r.createNS("http://www.w3.org/2000/svg","path");d.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),f.appendChild(d);var m=r.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var y=r.createNS("http://www.w3.org/2000/svg","path");y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(y);var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(6.0, 7.0)"),v.setAttributeNS(null,"fill","#FFFFFF");var g=r.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _=r.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#000000"),_.setAttributeNS(null,"opacity","0.25"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962");var x=r.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),g.appendChild(_),g.appendChild(x),s.appendChild(l),s.appendChild(f),s.appendChild(m),s.appendChild(v),s.appendChild(g),a.appendChild(s),a.setAttributeNS(null,"height",41*this._scale+"px"),a.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(a),this._offset=t.Point.convert(n&&n.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(t){t.preventDefault()})),this._element.addEventListener("mousedown",(function(t){t.preventDefault()})),Hi(this._element,this._anchor,"marker"),this._popup=null}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},n.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},n.prototype.getElement=function(){return this._element},n.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){var e=13.5,r=Math.sqrt(Math.pow(e,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[r,-1*(24.6+r)],"bottom-right":[-r,-1*(24.6+r)],left:[e,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},n.prototype._onKeyPress=function(t){var e=t.code,r=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==r&&13!==r||this.togglePopup()},n.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},n.prototype.getPopup=function(){return this._popup},n.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},n.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Vi(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(e="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var n="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?n="rotateX(0deg)":"map"===this._pitchAlignment&&(n="rotateX("+this._map.getPitch()+"deg)"),t&&"moveend"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,qi[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+n+" "+e)}},n.prototype.getOffset=function(){return this._offset},n.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},n.prototype._onMove=function(e){if(!this._isDragging){var r=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=r}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},n.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},n.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},n.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},n.prototype.isDraggable=function(){return this._draggable},n.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},n.prototype.getRotation=function(){return this._rotation},n.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},n.prototype.getRotationAlignment=function(){return this._rotationAlignment},n.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},n.prototype.getPitchAlignment=function(){return this._pitchAlignment},n}(t.Evented),Yi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};var Wi=0,Xi=!1,Ji=function(e){function n(r){e.call(this),this.options=t.extend({},Yi,r),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),n=this._setupUI,void 0!==Gi?n(Gi):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then((function(t){Gi="denied"!==t.state,n(Gi)})):(Gi=!!t.window.navigator.geolocation,n(Gi)),this._container;var n},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Wi=0,Xi=!1},n.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),r=t.coords;return e&&(r.longitude<e.getWest()||r.longitude>e.getEast()||r.latitude<e.getSouth()||r.latitude>e.getNorth())},n.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Xi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Zi(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Zi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){var r=e.originalEvent&&"resize"===e.originalEvent.type;e.geolocateSource||"ACTIVE_LOCK"!==n._watchState||r||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new t.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wi--,Xi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Wi>1?(e={maximumAge:6e5,timeout:0},Xi=!0):(e=this.options.positionOptions,Xi=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(t.Evented),Ki={maxWidth:100,unit:"metric"},Qi=function(e){this.options=t.extend({},Ki,e),t.bindAll(["_onMove","setUnit"],this)};function $i(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?ta(e,n,l/5280,t._getUIString("ScaleControl.Miles")):ta(e,n,l,t._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?ta(e,n,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?ta(e,n,s/1e3,t._getUIString("ScaleControl.Kilometers")):ta(e,n,s,t._getUIString("ScaleControl.Meters"))}function ta(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(""+Math.floor(i)).length-1))*((o=i/a)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o))),l=s/r;t.style.width=e*l+"px",t.innerHTML=s+" "+n}Qi.prototype.getDefaultPosition=function(){return"bottom-left"},Qi.prototype._onMove=function(){$i(this._map,this._container,this.options)},Qi.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Qi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Qi.prototype.setUnit=function(t){this.options.unit=t,$i(this._map,this._container,this.options)};var ea=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};ea.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ea.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ea.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},ea.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ea.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},ea.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ea.prototype._isFullscreen=function(){return this._fullscreen},ea.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ea.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var ra={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},na=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ia=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(ra),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(t),this._createCloseButton(),this._update(),this._focusFirstElement(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.setOffset=function(t){return this.options.offset=t,this._update(),this},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(t){var e=this,n=this._lngLat||this._trackPointer;if(this._map&&n&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return e._container.classList.add(t)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Vi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)){var i=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),a=this.options.anchor,o=aa(this.options.offset);if(!a){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=i.y+o.bottom.y<u?["top"]:i.y>this._map.transform.height-u?["bottom"]:[],i.x<l/2?s.push("left"):i.x>this._map.transform.width-l/2&&s.push("right"),a=0===s.length?"bottom":s.join("-")}var c=i.add(o[a]).round();r.setTransform(this._container,qi[a]+" translate("+c.x+"px,"+c.y+"px)"),Hi(this._container,a,"popup")}},n.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var t=this._container.querySelector(na);t&&t.focus()}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);function aa(e){if(e){if("number"==typeof e){var r=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new t.Point(0,0),top:new t.Point(0,e),"top-left":new t.Point(r,r),"top-right":new t.Point(-r,r),bottom:new t.Point(0,-e),"bottom-left":new t.Point(r,-r),"bottom-right":new t.Point(-r,-r),left:new t.Point(e,0),right:new t.Point(-e,0)}}if(e instanceof t.Point||Array.isArray(e)){var n=t.Point.convert(e);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(e.center||[0,0]),top:t.Point.convert(e.top||[0,0]),"top-left":t.Point.convert(e["top-left"]||[0,0]),"top-right":t.Point.convert(e["top-right"]||[0,0]),bottom:t.Point.convert(e.bottom||[0,0]),"bottom-left":t.Point.convert(e["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(e["bottom-right"]||[0,0]),left:t.Point.convert(e.left||[0,0]),right:t.Point.convert(e.right||[0,0])}}return aa(new t.Point(0,0))}var oa={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Fi,NavigationControl:Ui,GeolocateControl:Ji,AttributionControl:Li,ScaleControl:Qi,FullscreenControl:ea,Popup:ia,Marker:Zi,Style:Ye,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Ut().acquire(Rt)},clearPrewarmedResources:function(){var t=Bt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Rt),Bt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Ft.workerCount},set workerCount(t){Ft.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return oa})),r}()},440:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3256),i=6378137;function a(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(o(t[r]))}return e}function o(t){var e,r,n,a,o,l,u=0,c=t.length;if(c>2){for(l=0;l<c;l++)l===c-2?(n=c-2,a=c-1,o=0):l===c-1?(n=c-1,a=0,o=1):(n=l,a=l+1,o=l+2),e=t[n],r=t[a],u+=(s(t[o][0])-s(e[0]))*Math.sin(s(r[1]));u=u*i*i/2}return u}function s(t){return t*Math.PI/180}e.default=function(t){return n.geomReduce(t,(function(t,e){return t+function(t){var e,r=0;switch(t.type){case"Polygon":return a(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)r+=a(t.coordinates[e]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(e)}),0)}},6284:function(t,e){"use strict";function r(t,e,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function n(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function i(t,e,n){void 0===n&&(n={});for(var i=0,a=t;i<a.length;i++){var o=a[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:t},e,n)}function a(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:t},e,n)}function o(t,e){void 0===e&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function s(t,e,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:t},e,n)}function l(t,e,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:t},e,n)}function u(t,e,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:t},e,n)}function c(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function h(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=r,e.geometry=function(t,e,r){switch(void 0===r&&(r={}),t){case"Point":return n(e).geometry;case"LineString":return a(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return l(e).geometry;case"MultiLineString":return s(e).geometry;case"MultiPolygon":return u(e).geometry;default:throw new Error(t+" is invalid")}},e.point=n,e.points=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return n(t,e)})),r)},e.polygon=i,e.polygons=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return i(t,e)})),r)},e.lineString=a,e.lineStrings=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return a(t,e)})),r)},e.featureCollection=o,e.multiLineString=s,e.multiPoint=l,e.multiPolygon=u,e.geometryCollection=function(t,e,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:t},e,n)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=c,e.lengthToRadians=h,e.lengthToDegrees=function(t,e){return p(h(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=p,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(h(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var a=e.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},e.isNumber=f,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!f(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},3256:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6284);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,h,p=0,f=0,d=t.type,m="FeatureCollection"===d,y="Feature"===d,v=m?t.features.length:1,g=0;g<v;g++){l=(h=!!(c=m?t.features[g].geometry:y?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var _=0;_<l;_++){var x=0,b=0;if(null!==(s=h?c.geometries[_]:c)){u=s.coordinates;var w=s.type;switch(p=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,f,g,x,b))return!1;f++,x++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===e(u[n],f,g,x,b))return!1;f++,"MultiPoint"===w&&x++}"LineString"===w&&x++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(a=0;a<u[n].length-p;a++){if(!1===e(u[n][a],f,g,x,b))return!1;f++}"MultiLineString"===w&&x++,"Polygon"===w&&b++}"Polygon"===w&&x++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(b=0,a=0;a<u[n].length;a++){for(o=0;o<u[n][a].length-p;o++){if(!1===e(u[n][a][o],f,g,x,b))return!1;f++}b++}x++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===i(s.geometries[n],e,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function a(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length&&!1!==e(t.features[r].properties,r);r++);break;case"Feature":e(t.properties,0)}}function o(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var r=0;r<t.features.length&&!1!==e(t.features[r],r);r++);}function s(t,e){var r,n,i,a,o,s,l,u,c,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,m=f?t.features.length:1;for(r=0;r<m;r++){for(s=f?t.features[r].geometry:d?t.geometry:t,u=f?t.features[r].properties:d?t.properties:{},c=f?t.features[r].bbox:d?t.bbox:void 0,h=f?t.features[r].id:d?t.id:void 0,o=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=l?s.geometries[i]:s))switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(a,p,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===e(a.geometries[n],p,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,u,c,h))return!1;p++}}function l(t,e){s(t,(function(t,r,i,a,o){var s,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(n.feature(t,i,{bbox:a,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var u=0;u<t.coordinates.length;u++){var c={type:s,coordinates:t.coordinates[u]};if(!1===e(n.feature(c,i),r,u))return!1}}))}function u(t,e){l(t,(function(t,r,a){var o=0;if(t.geometry){var s=t.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,u=0,c=0,h=0;return!1!==i(t,(function(i,s,p,f,d){if(void 0===l||r>u||f>c||d>h)return l=i,u=r,c=f,h=d,void(o=0);var m=n.lineString([l,i],t.properties);if(!1===e(m,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===e(n.lineString(o[s],t.properties),r,i,s))return!1}}}))}e.coordEach=i,e.coordReduce=function(t,e,r,n){var a=r;return i(t,(function(t,n,i,o,s){a=0===n&&void 0===r?t:e(a,t,n,i,o,s)}),n),a},e.propEach=a,e.propReduce=function(t,e,r){var n=r;return a(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.featureEach=o,e.featureReduce=function(t,e,r){var n=r;return o(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},e.geomEach=s,e.geomReduce=function(t,e,r){var n=r;return s(t,(function(t,i,a,o,s){n=0===i&&void 0===r?t:e(n,t,i,a,o,s)})),n},e.flattenEach=l,e.flattenReduce=function(t,e,r){var n=r;return l(t,(function(t,i,a){n=0===i&&0===a&&void 0===r?t:e(n,t,i,a)})),n},e.segmentEach=u,e.segmentReduce=function(t,e,r){var n=r,i=!1;return u(t,(function(t,a,o,s,l){n=!1===i&&void 0===r?t:e(n,t,a,o,s,l),i=!0})),n},e.lineEach=c,e.lineReduce=function(t,e,r){var n=r;return c(t,(function(t,i,a,o){n=0===i&&void 0===r?t:e(n,t,i,a,o)})),n},e.findSegment=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":l=l||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=u.length+s-1),n.lineString([u[s],u[s+1]],l,e);case"Polygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),n.lineString([u[o][s],u[o][s+1]],l,e);case"MultiLineString":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),n.lineString([u[a][s],u[a][s+1]],l,e);case"MultiPolygon":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s-1),n.lineString([u[a][o][s],u[a][o][s+1]],l,e)}throw new Error("geojson is invalid")},e.findPoint=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":l=l||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return n.point(u,l,e);case"MultiPoint":return a<0&&(a=u.length+a),n.point(u[a],l,e);case"LineString":return s<0&&(s=u.length+s),n.point(u[s],l,e);case"Polygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),n.point(u[o][s],l,e);case"MultiLineString":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),n.point(u[a][s],l,e);case"MultiPolygon":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s),n.point(u[a][o][s],l,e)}throw new Error("geojson is invalid")}},2428:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2500);function i(t){var e=[1/0,1/0,-1/0,-1/0];return n.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}i.default=i,e.default=i},6796:function(t,e){"use strict";function r(t,e,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function n(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function i(t,e,n){void 0===n&&(n={});for(var i=0,a=t;i<a.length;i++){var o=a[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:t},e,n)}function a(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:t},e,n)}function o(t,e){void 0===e&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function s(t,e,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:t},e,n)}function l(t,e,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:t},e,n)}function u(t,e,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:t},e,n)}function c(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function h(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=r,e.geometry=function(t,e,r){switch(void 0===r&&(r={}),t){case"Point":return n(e).geometry;case"LineString":return a(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return l(e).geometry;case"MultiLineString":return s(e).geometry;case"MultiPolygon":return u(e).geometry;default:throw new Error(t+" is invalid")}},e.point=n,e.points=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return n(t,e)})),r)},e.polygon=i,e.polygons=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return i(t,e)})),r)},e.lineString=a,e.lineStrings=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return a(t,e)})),r)},e.featureCollection=o,e.multiLineString=s,e.multiPoint=l,e.multiPolygon=u,e.geometryCollection=function(t,e,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:t},e,n)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=c,e.lengthToRadians=h,e.lengthToDegrees=function(t,e){return p(h(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=p,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(h(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var a=e.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},e.isNumber=f,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!f(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},2500:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6796);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,h,p=0,f=0,d=t.type,m="FeatureCollection"===d,y="Feature"===d,v=m?t.features.length:1,g=0;g<v;g++){l=(h=!!(c=m?t.features[g].geometry:y?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var _=0;_<l;_++){var x=0,b=0;if(null!==(s=h?c.geometries[_]:c)){u=s.coordinates;var w=s.type;switch(p=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,f,g,x,b))return!1;f++,x++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===e(u[n],f,g,x,b))return!1;f++,"MultiPoint"===w&&x++}"LineString"===w&&x++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(a=0;a<u[n].length-p;a++){if(!1===e(u[n][a],f,g,x,b))return!1;f++}"MultiLineString"===w&&x++,"Polygon"===w&&b++}"Polygon"===w&&x++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(b=0,a=0;a<u[n].length;a++){for(o=0;o<u[n][a].length-p;o++){if(!1===e(u[n][a][o],f,g,x,b))return!1;f++}b++}x++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===i(s.geometries[n],e,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function a(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length&&!1!==e(t.features[r].properties,r);r++);break;case"Feature":e(t.properties,0)}}function o(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var r=0;r<t.features.length&&!1!==e(t.features[r],r);r++);}function s(t,e){var r,n,i,a,o,s,l,u,c,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,m=f?t.features.length:1;for(r=0;r<m;r++){for(s=f?t.features[r].geometry:d?t.geometry:t,u=f?t.features[r].properties:d?t.properties:{},c=f?t.features[r].bbox:d?t.bbox:void 0,h=f?t.features[r].id:d?t.id:void 0,o=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=l?s.geometries[i]:s))switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(a,p,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===e(a.geometries[n],p,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,u,c,h))return!1;p++}}function l(t,e){s(t,(function(t,r,i,a,o){var s,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(n.feature(t,i,{bbox:a,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var u=0;u<t.coordinates.length;u++){var c={type:s,coordinates:t.coordinates[u]};if(!1===e(n.feature(c,i),r,u))return!1}}))}function u(t,e){l(t,(function(t,r,a){var o=0;if(t.geometry){var s=t.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,u=0,c=0,h=0;return!1!==i(t,(function(i,s,p,f,d){if(void 0===l||r>u||f>c||d>h)return l=i,u=r,c=f,h=d,void(o=0);var m=n.lineString([l,i],t.properties);if(!1===e(m,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===e(n.lineString(o[s],t.properties),r,i,s))return!1}}}))}e.coordEach=i,e.coordReduce=function(t,e,r,n){var a=r;return i(t,(function(t,n,i,o,s){a=0===n&&void 0===r?t:e(a,t,n,i,o,s)}),n),a},e.propEach=a,e.propReduce=function(t,e,r){var n=r;return a(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.featureEach=o,e.featureReduce=function(t,e,r){var n=r;return o(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},e.geomEach=s,e.geomReduce=function(t,e,r){var n=r;return s(t,(function(t,i,a,o,s){n=0===i&&void 0===r?t:e(n,t,i,a,o,s)})),n},e.flattenEach=l,e.flattenReduce=function(t,e,r){var n=r;return l(t,(function(t,i,a){n=0===i&&0===a&&void 0===r?t:e(n,t,i,a)})),n},e.segmentEach=u,e.segmentReduce=function(t,e,r){var n=r,i=!1;return u(t,(function(t,a,o,s,l){n=!1===i&&void 0===r?t:e(n,t,a,o,s,l),i=!0})),n},e.lineEach=c,e.lineReduce=function(t,e,r){var n=r;return c(t,(function(t,i,a,o){n=0===i&&void 0===r?t:e(n,t,i,a,o)})),n},e.findSegment=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":l=l||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=u.length+s-1),n.lineString([u[s],u[s+1]],l,e);case"Polygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),n.lineString([u[o][s],u[o][s+1]],l,e);case"MultiLineString":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),n.lineString([u[a][s],u[a][s+1]],l,e);case"MultiPolygon":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s-1),n.lineString([u[a][o][s],u[a][o][s+1]],l,e)}throw new Error("geojson is invalid")},e.findPoint=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":l=l||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return n.point(u,l,e);case"MultiPoint":return a<0&&(a=u.length+a),n.point(u[a],l,e);case"LineString":return s<0&&(s=u.length+s),n.point(u[s],l,e);case"Polygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),n.point(u[o][s],l,e);case"MultiLineString":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),n.point(u[a][s],l,e);case"MultiPolygon":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s),n.point(u[a][o][s],l,e)}throw new Error("geojson is invalid")}},7844:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3752),i=r(9840);e.default=function(t,e){void 0===e&&(e={});var r=0,a=0,o=0;return n.coordEach(t,(function(t){r+=t[0],a+=t[1],o++})),i.point([r/o,a/o],e.properties)}},9840:function(t,e){"use strict";function r(t,e,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function n(t,e,n){return void 0===n&&(n={}),r({type:"Point",coordinates:t},e,n)}function i(t,e,n){void 0===n&&(n={});for(var i=0,a=t;i<a.length;i++){var o=a[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:t},e,n)}function a(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:t},e,n)}function o(t,e){void 0===e&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function s(t,e,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:t},e,n)}function l(t,e,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:t},e,n)}function u(t,e,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:t},e,n)}function c(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t*n}function h(t,r){void 0===r&&(r="kilometers");var n=e.factors[r];if(!n)throw new Error(r+" units is invalid");return t/n}function p(t){return t%(2*Math.PI)*180/Math.PI}function f(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)&&!/^\s*$/.test(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:e.earthRadius/1.0936},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1/1.0936},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=r,e.geometry=function(t,e,r){switch(void 0===r&&(r={}),t){case"Point":return n(e).geometry;case"LineString":return a(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return l(e).geometry;case"MultiLineString":return s(e).geometry;case"MultiPolygon":return u(e).geometry;default:throw new Error(t+" is invalid")}},e.point=n,e.points=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return n(t,e)})),r)},e.polygon=i,e.polygons=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return i(t,e)})),r)},e.lineString=a,e.lineStrings=function(t,e,r){return void 0===r&&(r={}),o(t.map((function(t){return a(t,e)})),r)},e.featureCollection=o,e.multiLineString=s,e.multiPoint=l,e.multiPolygon=u,e.geometryCollection=function(t,e,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:t},e,n)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=c,e.lengthToRadians=h,e.lengthToDegrees=function(t,e){return p(h(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=p,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(h(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var a=e.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},e.isNumber=f,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!f(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},e.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},e.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},e.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},e.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},e.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},e.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},e.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},3752:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(9840);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,h,p=0,f=0,d=t.type,m="FeatureCollection"===d,y="Feature"===d,v=m?t.features.length:1,g=0;g<v;g++){l=(h=!!(c=m?t.features[g].geometry:y?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var _=0;_<l;_++){var x=0,b=0;if(null!==(s=h?c.geometries[_]:c)){u=s.coordinates;var w=s.type;switch(p=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,f,g,x,b))return!1;f++,x++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(!1===e(u[n],f,g,x,b))return!1;f++,"MultiPoint"===w&&x++}"LineString"===w&&x++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(a=0;a<u[n].length-p;a++){if(!1===e(u[n][a],f,g,x,b))return!1;f++}"MultiLineString"===w&&x++,"Polygon"===w&&b++}"Polygon"===w&&x++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(b=0,a=0;a<u[n].length;a++){for(o=0;o<u[n][a].length-p;o++){if(!1===e(u[n][a][o],f,g,x,b))return!1;f++}b++}x++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===i(s.geometries[n],e,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function a(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length&&!1!==e(t.features[r].properties,r);r++);break;case"Feature":e(t.properties,0)}}function o(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var r=0;r<t.features.length&&!1!==e(t.features[r],r);r++);}function s(t,e){var r,n,i,a,o,s,l,u,c,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,m=f?t.features.length:1;for(r=0;r<m;r++){for(s=f?t.features[r].geometry:d?t.geometry:t,u=f?t.features[r].properties:d?t.properties:{},c=f?t.features[r].bbox:d?t.bbox:void 0,h=f?t.features[r].id:d?t.id:void 0,o=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=l?s.geometries[i]:s))switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(a,p,u,c,h))return!1;break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===e(a.geometries[n],p,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,u,c,h))return!1;p++}}function l(t,e){s(t,(function(t,r,i,a,o){var s,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(n.feature(t,i,{bbox:a,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var u=0;u<t.coordinates.length;u++){var c={type:s,coordinates:t.coordinates[u]};if(!1===e(n.feature(c,i),r,u))return!1}}))}function u(t,e){l(t,(function(t,r,a){var o=0;if(t.geometry){var s=t.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,u=0,c=0,h=0;return!1!==i(t,(function(i,s,p,f,d){if(void 0===l||r>u||f>c||d>h)return l=i,u=r,c=f,h=d,void(o=0);var m=n.lineString([l,i],t.properties);if(!1===e(m,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===e(n.lineString(o[s],t.properties),r,i,s))return!1}}}))}e.coordEach=i,e.coordReduce=function(t,e,r,n){var a=r;return i(t,(function(t,n,i,o,s){a=0===n&&void 0===r?t:e(a,t,n,i,o,s)}),n),a},e.propEach=a,e.propReduce=function(t,e,r){var n=r;return a(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.featureEach=o,e.featureReduce=function(t,e,r){var n=r;return o(t,(function(t,i){n=0===i&&void 0===r?t:e(n,t,i)})),n},e.coordAll=function(t){var e=[];return i(t,(function(t){e.push(t)})),e},e.geomEach=s,e.geomReduce=function(t,e,r){var n=r;return s(t,(function(t,i,a,o,s){n=0===i&&void 0===r?t:e(n,t,i,a,o,s)})),n},e.flattenEach=l,e.flattenReduce=function(t,e,r){var n=r;return l(t,(function(t,i,a){n=0===i&&0===a&&void 0===r?t:e(n,t,i,a)})),n},e.segmentEach=u,e.segmentReduce=function(t,e,r){var n=r,i=!1;return u(t,(function(t,a,o,s,l){n=!1===i&&void 0===r?t:e(n,t,a,o,s,l),i=!0})),n},e.lineEach=c,e.lineReduce=function(t,e,r){var n=r;return c(t,(function(t,i,a,o){n=0===i&&void 0===r?t:e(n,t,i,a,o)})),n},e.findSegment=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":l=l||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=u.length+s-1),n.lineString([u[s],u[s+1]],l,e);case"Polygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s-1),n.lineString([u[o][s],u[o][s+1]],l,e);case"MultiLineString":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s-1),n.lineString([u[a][s],u[a][s+1]],l,e);case"MultiPolygon":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s-1),n.lineString([u[a][o][s],u[a][o][s+1]],l,e)}throw new Error("geojson is invalid")},e.findPoint=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var r,i=e.featureIndex||0,a=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,r=t.features[i].geometry;break;case"Feature":l=l||t.properties,r=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=t;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var u=r.coordinates;switch(r.type){case"Point":return n.point(u,l,e);case"MultiPoint":return a<0&&(a=u.length+a),n.point(u[a],l,e);case"LineString":return s<0&&(s=u.length+s),n.point(u[s],l,e);case"Polygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),n.point(u[o][s],l,e);case"MultiLineString":return a<0&&(a=u.length+a),s<0&&(s=u[a].length+s),n.point(u[a][s],l,e);case"MultiPolygon":return a<0&&(a=u.length+a),o<0&&(o=u[a].length+o),s<0&&(s=u[a][o].length-s),n.point(u[a][o][s],l,e)}throw new Error("geojson is invalid")}},3160:function(t,e,r){"use strict";r.r(e),r.d(e,{decode:function(){return s},encode:function(){return o}});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)i[n.charCodeAt(a)]=a;var o=function(t){var e,r=new Uint8Array(t),i=r.length,a="";for(e=0;e<i;e+=3)a+=n[r[e]>>2],a+=n[(3&r[e])<<4|r[e+1]>>4],a+=n[(15&r[e+1])<<2|r[e+2]>>6],a+=n[63&r[e+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a},s=function(t){var e,r,n,a,o,s=.75*t.length,l=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),h=new Uint8Array(c);for(e=0;e<l;e+=4)r=i[t.charCodeAt(e)],n=i[t.charCodeAt(e+1)],a=i[t.charCodeAt(e+2)],o=i[t.charCodeAt(e+3)],h[u++]=r<<2|n>>4,h[u++]=(15&n)<<4|a>>2,h[u++]=(3&a)<<6|63&o;return c}},6116:function(t){t.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},7624:function(t,e,r){"use strict";function n(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{E9:function(){return p},SO:function(){return m}});var i,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(t){if(!(e=a.exec(t)))throw new Error("invalid format: "+t);var e;return new s({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function s(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function l(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var u={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:function(t,e){var r=n(t,e);if(!r)return t+"";var a=r[0],o=r[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+n(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var h,p,f=Array.prototype.map,d=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function m(t){var e,r,a=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",h=void 0===t.decimal?".":t.decimal+"",p=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),m=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"-":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function g(t){var e=(t=o(t)).fill,r=t.align,n=t.sign,c=t.symbol,f=t.zero,g=t.width,_=t.comma,x=t.precision,b=t.trim,w=t.type;"n"===w?(_=!0,w="g"):u[w]||(void 0===x&&(x=12),b=!0,w="g"),(f||"0"===e&&"="===r)&&(f=!0,e="0",r="=");var T="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===c?l:/[%p]/.test(w)?m:"",M=u[w],A=/[defgprs%]/.test(w);function S(t){var o,s,l,u=T,c=k;if("c"===w)c=M(t)+c,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:M(Math.abs(t),x),b&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n<r;++n)switch(t[n]){case".":i=e=n;break;case"0":0===i&&(i=n),e=n;break;default:if(!+t[n])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==n&&(m=!1),u=(m?"("===n?n:y:"-"===n||"("===n?"":n)+u,c=("s"===w?d[8+i/3]:"")+c+(m&&"("===n?")":""),A)for(o=-1,s=t.length;++o<s;)if(48>(l=t.charCodeAt(o))||l>57){c=(46===l?h+t.slice(o+1):t.slice(o))+c,t=t.slice(0,o);break}}_&&!f&&(t=a(t,1/0));var S=u.length+t.length+c.length,L=S<g?new Array(g-S+1).join(e):"";switch(_&&f&&(t=a(L+t,L.length?g-c.length:1/0),L=""),r){case"<":t=u+t+c+L;break;case"=":t=u+L+t+c;break;case"^":t=L.slice(0,S=L.length>>1)+u+t+c+L.slice(S);break;default:t=L+u+t+c}return p(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),S.toString=function(){return t+""},S}return{format:g,formatPrefix:function(t,e){var r,i=g(((t=o(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-a),l=d[8+a/3];return function(t){return i(s*t)+l}}}}h=m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),p=h.format,h.formatPrefix},4336:function(t,e,r){"use strict";r.d(e,{Yn:function(){return d},m_:function(){return p},E9:function(){return m}});var n=r(8208),i=r(8931),a=r(6192),o=r(8936),s=r(2171),l=r(3528);function u(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function c(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function h(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function p(t){var e=t.dateTime,r=t.date,s=t.time,l=t.periods,p=t.days,f=t.shortDays,d=t.months,m=t.shortMonths,v=w(l),g=T(l),_=w(p),x=T(p),b=w(f),St=T(f),Lt=w(d),Ct=T(d),Pt=w(m),It=T(m),Et={a:function(t){return f[t.getDay()]},A:function(t){return p[t.getDay()]},b:function(t){return m[t.getMonth()]},B:function(t){return d[t.getMonth()]},c:null,d:H,e:H,f:X,H:G,I:Z,j:Y,L:W,m:J,M:K,p:function(t){return l[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Mt,s:At,S:Q,u:$,U:tt,V:et,w:rt,W:nt,x:null,X:null,y:it,Y:at,Z:ot,"%":kt},Dt={a:function(t){return f[t.getUTCDay()]},A:function(t){return p[t.getUTCDay()]},b:function(t){return m[t.getUTCMonth()]},B:function(t){return d[t.getUTCMonth()]},c:null,d:st,e:st,f:pt,H:lt,I:ut,j:ct,L:ht,m:ft,M:dt,p:function(t){return l[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Mt,s:At,S:mt,u:yt,U:vt,V:gt,w:_t,W:xt,x:null,X:null,y:bt,Y:wt,Z:Tt,"%":kt},zt={a:function(t,e,r){var n=b.exec(e.slice(r));return n?(t.w=St[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_.exec(e.slice(r));return n?(t.w=x[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=Pt.exec(e.slice(r));return n?(t.m=It[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=Lt.exec(e.slice(r));return n?(t.m=Ct[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Ft(t,e,r,n)},d:z,e:z,f:U,H:R,I:R,j:O,L:N,m:D,M:F,p:function(t,e,r){var n=v.exec(e.slice(r));return n?(t.p=g[n[0].toLowerCase()],r+n[0].length):-1},q:E,Q:V,s:q,S:B,u:M,U:A,V:S,w:k,W:L,x:function(t,e,n){return Ft(t,r,e,n)},X:function(t,e,r){return Ft(t,s,e,r)},y:P,Y:C,Z:I,"%":j};function Ot(t,e){return function(r){var n,i,a,o=[],s=-1,l=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(l,s)),null!=(i=y[n=t.charAt(++s)])?n=t.charAt(++s):i="e"===n?" ":"0",(a=e[n])&&(n=a(r,i)),o.push(n),l=s+1);return o.push(t.slice(l,s)),o.join("")}}function Rt(t,e){return function(r){var s,l,p=h(1900,void 0,1);if(Ft(p,t,r+="",0)!=r.length)return null;if("Q"in p)return new Date(p.Q);if("s"in p)return new Date(1e3*p.s+("L"in p?p.L:0));if(e&&!("Z"in p)&&(p.Z=0),"p"in p&&(p.H=p.H%12+12*p.p),void 0===p.m&&(p.m="q"in p?p.q:0),"V"in p){if(p.V<1||p.V>53)return null;"w"in p||(p.w=1),"Z"in p?(l=(s=c(h(p.y,0,1))).getUTCDay(),s=l>4||0===l?n.ot.ceil(s):(0,n.ot)(s),s=i.c.offset(s,7*(p.V-1)),p.y=s.getUTCFullYear(),p.m=s.getUTCMonth(),p.d=s.getUTCDate()+(p.w+6)%7):(l=(s=u(h(p.y,0,1))).getDay(),s=l>4||0===l?a.qT.ceil(s):(0,a.qT)(s),s=o.c.offset(s,7*(p.V-1)),p.y=s.getFullYear(),p.m=s.getMonth(),p.d=s.getDate()+(p.w+6)%7)}else("W"in p||"U"in p)&&("w"in p||(p.w="u"in p?p.u%7:"W"in p?1:0),l="Z"in p?c(h(p.y,0,1)).getUTCDay():u(h(p.y,0,1)).getDay(),p.m=0,p.d="W"in p?(p.w+6)%7+7*p.W-(l+5)%7:p.w+7*p.U-(l+6)%7);return"Z"in p?(p.H+=p.Z/100|0,p.M+=p.Z%100,c(p)):u(p)}}function Ft(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o<s;){if(n>=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=zt[i in y?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Et.x=Ot(r,Et),Et.X=Ot(s,Et),Et.c=Ot(e,Et),Dt.x=Ot(r,Dt),Dt.X=Ot(s,Dt),Dt.c=Ot(e,Dt),{format:function(t){var e=Ot(t+="",Et);return e.toString=function(){return t},e},parse:function(t){var e=Rt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Ot(t+="",Dt);return e.toString=function(){return t},e},utcParse:function(t){var e=Rt(t+="",!0);return e.toString=function(){return t},e}}}var f,d,m,y={"-":"",_:" ",0:"0"},v=/^\s*\d+/,g=/^%/,_=/[\\^$*+?|[\]().{}]/g;function x(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function b(t){return t.replace(_,"\\$&")}function w(t){return new RegExp("^(?:"+t.map(b).join("|")+")","i")}function T(t){for(var e={},r=-1,n=t.length;++r<n;)e[t[r].toLowerCase()]=r;return e}function k(t,e,r){var n=v.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function M(t,e,r){var n=v.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function A(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function S(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function L(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function C(t,e,r){var n=v.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function P(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function I(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function E(t,e,r){var n=v.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function D(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function z(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function O(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function R(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function F(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function B(t,e,r){var n=v.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function N(t,e,r){var n=v.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function U(t,e,r){var n=v.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function j(t,e,r){var n=g.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function V(t,e,r){var n=v.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function q(t,e,r){var n=v.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function H(t,e){return x(t.getDate(),e,2)}function G(t,e){return x(t.getHours(),e,2)}function Z(t,e){return x(t.getHours()%12||12,e,2)}function Y(t,e){return x(1+o.c.count((0,s.c)(t),t),e,3)}function W(t,e){return x(t.getMilliseconds(),e,3)}function X(t,e){return W(t,e)+"000"}function J(t,e){return x(t.getMonth()+1,e,2)}function K(t,e){return x(t.getMinutes(),e,2)}function Q(t,e){return x(t.getSeconds(),e,2)}function $(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return x(a.uU.count((0,s.c)(t)-1,t),e,2)}function et(t,e){var r=t.getDay();return t=r>=4||0===r?(0,a.kD)(t):a.kD.ceil(t),x(a.kD.count((0,s.c)(t),t)+(4===(0,s.c)(t).getDay()),e,2)}function rt(t){return t.getDay()}function nt(t,e){return x(a.qT.count((0,s.c)(t)-1,t),e,2)}function it(t,e){return x(t.getFullYear()%100,e,2)}function at(t,e){return x(t.getFullYear()%1e4,e,4)}function ot(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+x(e/60|0,"0",2)+x(e%60,"0",2)}function st(t,e){return x(t.getUTCDate(),e,2)}function lt(t,e){return x(t.getUTCHours(),e,2)}function ut(t,e){return x(t.getUTCHours()%12||12,e,2)}function ct(t,e){return x(1+i.c.count((0,l.c)(t),t),e,3)}function ht(t,e){return x(t.getUTCMilliseconds(),e,3)}function pt(t,e){return ht(t,e)+"000"}function ft(t,e){return x(t.getUTCMonth()+1,e,2)}function dt(t,e){return x(t.getUTCMinutes(),e,2)}function mt(t,e){return x(t.getUTCSeconds(),e,2)}function yt(t){var e=t.getUTCDay();return 0===e?7:e}function vt(t,e){return x(n.EV.count((0,l.c)(t)-1,t),e,2)}function gt(t,e){var r=t.getUTCDay();return t=r>=4||0===r?(0,n.yA)(t):n.yA.ceil(t),x(n.yA.count((0,l.c)(t),t)+(4===(0,l.c)(t).getUTCDay()),e,2)}function _t(t){return t.getUTCDay()}function xt(t,e){return x(n.ot.count((0,l.c)(t)-1,t),e,2)}function bt(t,e){return x(t.getUTCFullYear()%100,e,2)}function wt(t,e){return x(t.getUTCFullYear()%1e4,e,4)}function Tt(){return"+0000"}function kt(){return"%"}function Mt(t){return+t}function At(t){return Math.floor(+t/1e3)}f=p({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],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"]}),d=f.format,f.parse,m=f.utcFormat,f.utcParse},8936:function(t,e,r){"use strict";r.d(e,{m:function(){return o}});var n=r(1628),i=r(9792),a=(0,n.c)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.iy)/i.SK}),(function(t){return t.getDate()-1}));e.c=a;var o=a.range},9792:function(t,e,r){"use strict";r.d(e,{KK:function(){return s},SK:function(){return o},cg:function(){return a},iy:function(){return i},yc:function(){return n}});var n=1e3,i=6e4,a=36e5,o=864e5,s=6048e5},3220:function(t,e,r){"use strict";r.r(e),r.d(e,{timeDay:function(){return v.c},timeDays:function(){return v.m},timeFriday:function(){return g.iB},timeFridays:function(){return g.sJ},timeHour:function(){return m},timeHours:function(){return y},timeInterval:function(){return n.c},timeMillisecond:function(){return a},timeMilliseconds:function(){return o},timeMinute:function(){return p},timeMinutes:function(){return f},timeMonday:function(){return g.qT},timeMondays:function(){return g.QP},timeMonth:function(){return x},timeMonths:function(){return b},timeSaturday:function(){return g.Wc},timeSaturdays:function(){return g.aI},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return g.uU},timeSundays:function(){return g.Ab},timeThursday:function(){return g.kD},timeThursdays:function(){return g.eC},timeTuesday:function(){return g.Mf},timeTuesdays:function(){return g.Oc},timeWednesday:function(){return g.eg},timeWednesdays:function(){return g.sn},timeWeek:function(){return g.uU},timeWeeks:function(){return g.Ab},timeYear:function(){return w.c},timeYears:function(){return w.Q},utcDay:function(){return C.c},utcDays:function(){return C.o},utcFriday:function(){return P.od},utcFridays:function(){return P.iG},utcHour:function(){return S},utcHours:function(){return L},utcMillisecond:function(){return a},utcMilliseconds:function(){return o},utcMinute:function(){return k},utcMinutes:function(){return M},utcMonday:function(){return P.ot},utcMondays:function(){return P.iO},utcMonth:function(){return E},utcMonths:function(){return D},utcSaturday:function(){return P.Ad},utcSaturdays:function(){return P.K8},utcSecond:function(){return u},utcSeconds:function(){return c},utcSunday:function(){return P.EV},utcSundays:function(){return P.Wq},utcThursday:function(){return P.yA},utcThursdays:function(){return P.ob},utcTuesday:function(){return P.sG},utcTuesdays:function(){return P.kl},utcWednesday:function(){return P._6},utcWednesdays:function(){return P.W_},utcWeek:function(){return P.EV},utcWeeks:function(){return P.Wq},utcYear:function(){return z.c},utcYears:function(){return z.i}});var n=r(1628),i=(0,n.c)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?(0,n.c)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i,o=i.range,s=r(9792),l=(0,n.c)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*s.yc)}),(function(t,e){return(e-t)/s.yc}),(function(t){return t.getUTCSeconds()})),u=l,c=l.range,h=(0,n.c)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.yc)}),(function(t,e){t.setTime(+t+e*s.iy)}),(function(t,e){return(e-t)/s.iy}),(function(t){return t.getMinutes()})),p=h,f=h.range,d=(0,n.c)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.yc-t.getMinutes()*s.iy)}),(function(t,e){t.setTime(+t+e*s.cg)}),(function(t,e){return(e-t)/s.cg}),(function(t){return t.getHours()})),m=d,y=d.range,v=r(8936),g=r(6192),_=(0,n.c)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),x=_,b=_.range,w=r(2171),T=(0,n.c)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s.iy)}),(function(t,e){return(e-t)/s.iy}),(function(t){return t.getUTCMinutes()})),k=T,M=T.range,A=(0,n.c)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*s.cg)}),(function(t,e){return(e-t)/s.cg}),(function(t){return t.getUTCHours()})),S=A,L=A.range,C=r(8931),P=r(8208),I=(0,n.c)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),E=I,D=I.range,z=r(3528)},1628:function(t,e,r){"use strict";r.d(e,{c:function(){return a}});var n=new Date,i=new Date;function a(t,e,r,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(r){return t(r=new Date(r-1)),e(r,1),t(r),r},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e<r-t?e:r},s.offset=function(t,r){return e(t=new Date(+t),null==r?1:Math.floor(r)),t},s.range=function(r,n,i){var a,o=[];if(r=s.ceil(r),i=null==i?1:Math.floor(i),!(r<n&&i>0))return o;do{o.push(a=new Date(+r)),e(r,i),t(r)}while(a<r&&r<n);return o},s.filter=function(r){return a((function(e){if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}))},r&&(s.count=function(e,a){return n.setTime(+e),i.setTime(+a),t(n),t(i),Math.floor(r(n,i))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}},8931:function(t,e,r){"use strict";r.d(e,{o:function(){return o}});var n=r(1628),i=r(9792),a=(0,n.c)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.SK}),(function(t){return t.getUTCDate()-1}));e.c=a;var o=a.range},8208:function(t,e,r){"use strict";r.d(e,{Ad:function(){return p},EV:function(){return o},K8:function(){return _},W_:function(){return y},Wq:function(){return f},_6:function(){return u},iG:function(){return g},iO:function(){return d},kl:function(){return m},ob:function(){return v},od:function(){return h},ot:function(){return s},sG:function(){return l},yA:function(){return c}});var n=r(1628),i=r(9792);function a(t){return(0,n.c)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.KK}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),h=a(5),p=a(6),f=o.range,d=s.range,m=l.range,y=u.range,v=c.range,g=h.range,_=p.range},3528:function(t,e,r){"use strict";r.d(e,{i:function(){return a}});var n=r(1628),i=(0,n.c)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.c)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null},e.c=i;var a=i.range},6192:function(t,e,r){"use strict";r.d(e,{Ab:function(){return f},Mf:function(){return l},Oc:function(){return m},QP:function(){return d},Wc:function(){return p},aI:function(){return _},eC:function(){return v},eg:function(){return u},iB:function(){return h},kD:function(){return c},qT:function(){return s},sJ:function(){return g},sn:function(){return y},uU:function(){return o}});var n=r(1628),i=r(9792);function a(t){return(0,n.c)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.iy)/i.KK}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),h=a(5),p=a(6),f=o.range,d=s.range,m=l.range,y=u.range,v=c.range,g=h.range,_=p.range},2171:function(t,e,r){"use strict";r.d(e,{Q:function(){return a}});var n=r(1628),i=(0,n.c)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.c)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null},e.c=i;var a=i.range},1252:function(t){"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,a),n(r)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,a,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,a,o,u;if(s(r),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),o=a[e]),void 0===o)o=a[e]=r,++t._eventsCount;else if("function"==typeof o?o=a[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=l(t))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):d(i,i.length)}function f(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function d(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function m(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(a){n.once&&t.removeEventListener(e,i),r(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var u=l.length,c=d(l,u);for(r=0;r<u;++r)n(c[r],this,e)}return!0},a.prototype.addListener=function(t,e){return u(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return u(this,t,e,!0)},a.prototype.once=function(t,e){return s(e),this.on(t,h(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,h(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,a,o;if(s(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},a.prototype.listenerCount=f,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},8248:function(t,e,r){"use strict";var n=r(4576);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},2408:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15];return t[0]=s*(p*v-f*y)-h*(l*v-u*y)+m*(l*f-u*p),t[1]=-(n*(p*v-f*y)-h*(i*v-a*y)+m*(i*f-a*p)),t[2]=n*(l*v-u*y)-s*(i*v-a*y)+m*(i*u-a*l),t[3]=-(n*(l*f-u*p)-s*(i*f-a*p)+h*(i*u-a*l)),t[4]=-(o*(p*v-f*y)-c*(l*v-u*y)+d*(l*f-u*p)),t[5]=r*(p*v-f*y)-c*(i*v-a*y)+d*(i*f-a*p),t[6]=-(r*(l*v-u*y)-o*(i*v-a*y)+d*(i*u-a*l)),t[7]=r*(l*f-u*p)-o*(i*f-a*p)+c*(i*u-a*l),t[8]=o*(h*v-f*m)-c*(s*v-u*m)+d*(s*f-u*h),t[9]=-(r*(h*v-f*m)-c*(n*v-a*m)+d*(n*f-a*h)),t[10]=r*(s*v-u*m)-o*(n*v-a*m)+d*(n*u-a*s),t[11]=-(r*(s*f-u*h)-o*(n*f-a*h)+c*(n*u-a*s)),t[12]=-(o*(h*y-p*m)-c*(s*y-l*m)+d*(s*p-l*h)),t[13]=r*(h*y-p*m)-c*(n*y-i*m)+d*(n*p-i*h),t[14]=-(r*(s*y-l*m)-o*(n*y-i*m)+d*(n*l-i*s)),t[15]=r*(s*p-l*h)-o*(n*p-i*h)+c*(n*l-i*s),t}},6860:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},4492:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},4212:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},800:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],p=t[11],f=t[12],d=t[13],m=t[14],y=t[15];return(e*o-r*a)*(h*y-p*m)-(e*s-n*a)*(c*y-p*d)+(e*l-i*a)*(c*m-h*d)+(r*s-n*o)*(u*y-p*f)-(r*l-i*o)*(u*m-h*f)+(n*l-i*s)*(u*d-c*f)}},1784:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,p=i*o,f=i*s,d=i*l,m=a*o,y=a*s,v=a*l;return t[0]=1-h-d,t[1]=c+v,t[2]=p-y,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=f+m,t[7]=0,t[8]=p+y,t[9]=f-m,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},1616:function(t){t.exports=function(t,e,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(o*=u=1/u,s*=u,l*=u,n=Math.sin(e),a=1-(i=Math.cos(e)),t[0]=o*o*a+i,t[1]=s*o*a+l*n,t[2]=l*o*a-s*n,t[3]=0,t[4]=o*s*a-l*n,t[5]=s*s*a+i,t[6]=l*s*a+o*n,t[7]=0,t[8]=o*l*a+s*n,t[9]=s*l*a-o*n,t[10]=l*l*a+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},1944:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,u=a+a,c=n*s,h=n*l,p=n*u,f=i*l,d=i*u,m=a*u,y=o*s,v=o*l,g=o*u;return t[0]=1-(f+m),t[1]=h+g,t[2]=p-v,t[3]=0,t[4]=h-g,t[5]=1-(c+m),t[6]=d+y,t[7]=0,t[8]=p+v,t[9]=d-y,t[10]=1-(c+f),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},9444:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8268:function(t){t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},1856:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},9216:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},7736:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},8848:function(t){t.exports=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t}},6635:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},6524:function(t,e,r){t.exports={create:r(4212),clone:r(6860),copy:r(4492),identity:r(6635),transpose:r(6520),invert:r(4308),adjoint:r(2408),determinant:r(800),multiply:r(944),translate:r(5176),scale:r(8152),rotate:r(16),rotateX:r(5456),rotateY:r(4840),rotateZ:r(4192),fromRotation:r(1616),fromRotationTranslation:r(1944),fromScaling:r(9444),fromTranslation:r(8268),fromXRotation:r(1856),fromYRotation:r(9216),fromZRotation:r(7736),fromQuat:r(1784),frustum:r(8848),perspective:r(1296),perspectiveFromFieldOfView:r(3688),ortho:r(7688),lookAt:r(6508),str:r(9412)}},4308:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15],g=r*s-n*o,_=r*l-i*o,x=r*u-a*o,b=n*l-i*s,w=n*u-a*s,T=i*u-a*l,k=c*m-h*d,M=c*y-p*d,A=c*v-f*d,S=h*y-p*m,L=h*v-f*m,C=p*v-f*y,P=g*C-_*L+x*S+b*A-w*M+T*k;return P?(P=1/P,t[0]=(s*C-l*L+u*S)*P,t[1]=(i*L-n*C-a*S)*P,t[2]=(m*T-y*w+v*b)*P,t[3]=(p*w-h*T-f*b)*P,t[4]=(l*A-o*C-u*M)*P,t[5]=(r*C-i*A+a*M)*P,t[6]=(y*x-d*T-v*_)*P,t[7]=(c*T-p*x+f*_)*P,t[8]=(o*L-s*A+u*k)*P,t[9]=(n*A-r*L-a*k)*P,t[10]=(d*w-m*x+v*g)*P,t[11]=(h*x-c*w-f*g)*P,t[12]=(s*M-o*S-l*k)*P,t[13]=(r*S-n*M+i*k)*P,t[14]=(m*_-d*b-y*g)*P,t[15]=(c*b-h*_+p*g)*P,t):null}},6508:function(t,e,r){var n=r(6635);t.exports=function(t,e,r,i){var a,o,s,l,u,c,h,p,f,d,m=e[0],y=e[1],v=e[2],g=i[0],_=i[1],x=i[2],b=r[0],w=r[1],T=r[2];return Math.abs(m-b)<1e-6&&Math.abs(y-w)<1e-6&&Math.abs(v-T)<1e-6?n(t):(h=m-b,p=y-w,f=v-T,a=_*(f*=d=1/Math.sqrt(h*h+p*p+f*f))-x*(p*=d),o=x*(h*=d)-g*f,s=g*p-_*h,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0),l=p*s-f*o,u=f*a-h*s,c=h*o-p*a,(d=Math.sqrt(l*l+u*u+c*c))?(l*=d=1/d,u*=d,c*=d):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=h,t[3]=0,t[4]=o,t[5]=u,t[6]=p,t[7]=0,t[8]=s,t[9]=c,t[10]=f,t[11]=0,t[12]=-(a*m+o*y+s*v),t[13]=-(l*m+u*y+c*v),t[14]=-(h*m+p*y+f*v),t[15]=1,t)}},944:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],m=e[12],y=e[13],v=e[14],g=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*n+x*s+b*h+w*m,t[1]=_*i+x*l+b*p+w*y,t[2]=_*a+x*u+b*f+w*v,t[3]=_*o+x*c+b*d+w*g,_=r[4],x=r[5],b=r[6],w=r[7],t[4]=_*n+x*s+b*h+w*m,t[5]=_*i+x*l+b*p+w*y,t[6]=_*a+x*u+b*f+w*v,t[7]=_*o+x*c+b*d+w*g,_=r[8],x=r[9],b=r[10],w=r[11],t[8]=_*n+x*s+b*h+w*m,t[9]=_*i+x*l+b*p+w*y,t[10]=_*a+x*u+b*f+w*v,t[11]=_*o+x*c+b*d+w*g,_=r[12],x=r[13],b=r[14],w=r[15],t[12]=_*n+x*s+b*h+w*m,t[13]=_*i+x*l+b*p+w*y,t[14]=_*a+x*u+b*f+w*v,t[15]=_*o+x*c+b*d+w*g,t}},7688:function(t){t.exports=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t}},1296:function(t){t.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},3688:function(t){t.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},16:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u,c,h,p,f,d,m,y,v,g,_,x,b,w,T,k,M,A,S,L=n[0],C=n[1],P=n[2],I=Math.sqrt(L*L+C*C+P*P);return Math.abs(I)<1e-6?null:(L*=I=1/I,C*=I,P*=I,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],h=e[4],p=e[5],f=e[6],d=e[7],m=e[8],y=e[9],v=e[10],g=e[11],_=L*L*o+a,x=C*L*o+P*i,b=P*L*o-C*i,w=L*C*o-P*i,T=C*C*o+a,k=P*C*o+L*i,M=L*P*o+C*i,A=C*P*o-L*i,S=P*P*o+a,t[0]=s*_+h*x+m*b,t[1]=l*_+p*x+y*b,t[2]=u*_+f*x+v*b,t[3]=c*_+d*x+g*b,t[4]=s*w+h*T+m*k,t[5]=l*w+p*T+y*k,t[6]=u*w+f*T+v*k,t[7]=c*w+d*T+g*k,t[8]=s*M+h*A+m*S,t[9]=l*M+p*A+y*S,t[10]=u*M+f*A+v*S,t[11]=c*M+d*A+g*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},5456:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+h*n,t[7]=l*i+p*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=h*i-s*n,t[11]=p*i-l*n,t}},4840:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[8],c=e[9],h=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-u*n,t[1]=o*i-c*n,t[2]=s*i-h*n,t[3]=l*i-p*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+h*i,t[11]=l*n+p*i,t}},4192:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+h*n,t[3]=l*i+p*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=h*i-s*n,t[7]=p*i-l*n,t}},8152:function(t){t.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},9412:function(t){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},5176:function(t){t.exports=function(t,e,r){var n,i,a,o,s,l,u,c,h,p,f,d,m=r[0],y=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*v+e[12],t[13]=e[1]*m+e[5]*y+e[9]*v+e[13],t[14]=e[2]*m+e[6]*y+e[10]*v+e[14],t[15]=e[3]*m+e[7]*y+e[11]*v+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=p,t[10]=f,t[11]=d,t[12]=n*m+s*y+h*v+e[12],t[13]=i*m+l*y+p*v+e[13],t[14]=a*m+u*y+f*v+e[14],t[15]=o*m+c*y+d*v+e[15]),t}},6520:function(t){t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},2264:function(t,e,r){"use strict";var n,i=r(1820);n="function"==typeof r.g.matchMedia?!r.g.matchMedia("(hover: none)").matches:i,t.exports=n},9184:function(t,e,r){"use strict";var n=r(1820);t.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},1820:function(t){t.exports=!0},4576:function(t){"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n<r;n++)if(((e=t.charCodeAt(n))<9||e>13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},9128:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=t.clientX||0,o=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},8324:function(t,e,r){var n,i,a,o;i="Promise",o=function(){"use strict";var t,e,r,n=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,r,n){return Object.defineProperty(t,e,{value:r,writable:!0,configurable:!1!==n})}}catch(e){t=function(t,e,r){return t[e]=r,t}}function a(t,n){r.add(t,n),e||(e=i(r.drain))}function o(t){var e,r=typeof t;return null==t||"object"!=r&&"function"!=r||(e=t.then),"function"==typeof e&&e}function s(){for(var t=0;t<this.chain.length;t++)l(this,1===this.state?this.chain[t].success:this.chain[t].failure,this.chain[t]);this.chain.length=0}function l(t,e,r){var n,i;try{!1===e?r.reject(t.msg):(n=!0===e?t.msg:e.call(void 0,t.msg))===r.promise?r.reject(TypeError("Promise-chain cycle")):(i=o(n))?i.call(n,r.resolve,r.reject):r.resolve(n)}catch(t){r.reject(t)}}function u(t){var e,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(e=o(t))?a((function(){var n=new p(r);try{e.call(t,(function(){u.apply(n,arguments)}),(function(){c.apply(n,arguments)}))}catch(t){c.call(n,t)}})):(r.msg=t,r.state=1,r.chain.length>0&&a(s,r))}catch(t){c.call(new p(r),t)}}}function c(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&a(s,e))}function h(t,e,r,n){for(var i=0;i<e.length;i++)!function(i){t.resolve(e[i]).then((function(t){r(i,t)}),n)}(i)}function p(t){this.def=t,this.triggered=!1}function f(t){this.promise=t,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function d(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var e=new f(this);this.then=function(t,r){var n={success:"function"!=typeof t||t,failure:"function"==typeof r&&r};return n.promise=new this.constructor((function(t,e){if("function"!=typeof t||"function"!=typeof e)throw TypeError("Not a function");n.resolve=t,n.reject=e})),e.chain.push(n),0!==e.state&&a(s,e),n.promise},this.catch=function(t){return this.then(void 0,t)};try{t.call(void 0,(function(t){u.call(e,t)}),(function(t){c.call(e,t)}))}catch(t){c.call(e,t)}}r=function(){var t,r,n;function i(t,e){this.fn=t,this.self=e,this.next=void 0}return{add:function(e,a){n=new i(e,a),r?r.next=n:t=n,r=n,n=void 0},drain:function(){var n=t;for(t=r=e=void 0;n;)n.fn.call(n.self),n=n.next}}}();var m=t({},"constructor",d,!1);return d.prototype=m,t(m,"__NPO__",0,!1),t(d,"resolve",(function(t){return t&&"object"==typeof t&&1===t.__NPO__?t:new this((function(e,r){if("function"!=typeof e||"function"!=typeof r)throw TypeError("Not a function");e(t)}))})),t(d,"reject",(function(t){return new this((function(e,r){if("function"!=typeof e||"function"!=typeof r)throw TypeError("Not a function");r(t)}))})),t(d,"all",(function(t){var e=this;return"[object Array]"!=n.call(t)?e.reject(TypeError("Not an array")):0===t.length?e.resolve([]):new e((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");var i=t.length,a=Array(i),o=0;h(e,t,(function(t,e){a[t]=e,++o===i&&r(a)}),n)}))})),t(d,"race",(function(t){var e=this;return"[object Array]"!=n.call(t)?e.reject(TypeError("Not an array")):new e((function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");h(e,t,(function(t,e){r(e)}),n)}))})),d},(a=void 0!==r.g?r.g:this)[i]=a[i]||o(),t.exports?t.exports=a[i]:void 0===(n=function(){return a[i]}.call(e,r,e,t))||(t.exports=n)},896:function(t){"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var a,o,s=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))r.call(a,u)&&(s[u]=a[u]);if(e){o=e(a);for(var c=0;c<o.length;c++)n.call(a,o[c])&&(s[o[c]]=a[o[c]])}}return s}},9604:function(t){t.exports=function(t){var i=[];return t.replace(r,(function(t,r,a){var o=r.toLowerCase();for(a=function(t){var e=t.match(n);return e?e.map(Number):[]}(a),"m"==o&&a.length>2&&(i.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==e[o])return a.unshift(r),i.push(a);if(a.length<e[o])throw new Error("malformed path data");i.push([r].concat(a.splice(0,e[o])))}})),i};var e={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi,n=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},1456:function(t){t.exports=function(t,e,r,n){var i=t[0],a=t[1],o=!1;void 0===r&&(r=0),void 0===n&&(n=e.length);for(var s=n-r,l=0,u=s-1;l<s;u=l++){var c=e[l+r][0],h=e[l+r][1],p=e[u+r][0],f=e[u+r][1];h>a!=f>a&&i<(p-c)*(a-h)/(f-h)+c&&(o=!o)}return o}},4756:function(t,e,r){var n,i=r(2928),a=r(8648),o=r(9819),s=r(1403),l=r(2368),u=r(7792),c=!1,h=a();function p(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?c=i():!1===t&&(c=!1),!1!==c&&c.list},epsilon:function(t){return h.epsilon(t)},segments:function(t){var e=o(!0,h,c);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,h,c).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,c),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,c),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,c),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,c),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,c),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,h,c),inverted:t.inverted}},polygonFromGeoJSON:function(t){return u.toPolygon(n,t)},polygonToGeoJSON:function(t){return u.fromPolygon(n,h,t)},union:function(t,e){return p(t,e,n.selectUnion)},intersect:function(t,e){return p(t,e,n.selectIntersect)},difference:function(t,e){return p(t,e,n.selectDifference)},differenceRev:function(t,e){return p(t,e,n.selectDifferenceRev)},xor:function(t,e){return p(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},2928:function(t){t.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},8648:function(t){t.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l<t||l-(a*a+s*s)>-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])<t},pointsSameY:function(e,r){return Math.abs(e[1]-r[1])<t},pointsSame:function(t,r){return e.pointsSameX(t,r)&&e.pointsSameY(t,r)},pointsCompare:function(t,r){return e.pointsSameX(t,r)?e.pointsSameY(t,r)?0:t[1]<r[1]?-1:1:t[0]<r[0]?-1:1},pointsCollinear:function(e,r,n){var i=e[0]-r[0],a=e[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(i*s-o*a)<t},linesIntersect:function(e,r,n,i){var a=r[0]-e[0],o=r[1]-e[1],s=i[0]-n[0],l=i[1]-n[1],u=a*l-o*s;if(Math.abs(u)<t)return!1;var c=e[0]-n[0],h=e[1]-n[1],p=(s*h-l*c)/u,f=(a*h-o*c)/u,d={alongA:0,alongB:0,pt:[e[0]+p*a,e[1]+p*o]};return d.alongA=p<=-t?-2:p<t?-1:p-1<=-t?0:p-1<t?1:2,d.alongB=f<=-t?-2:f<t?-1:f-1<=-t?0:f-1<t?1:2,d},pointInsideRegion:function(e,r){for(var n=e[0],i=e[1],a=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var u=r[l][0],c=r[l][1];c-i>t!=o-i>t&&(a-u)*(i-c)/(o-c)+u-n>t&&(s=!s),a=u,o=c}return s}};return e}},7792:function(t){var e={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i<e.length;i++)n=t.selectDifference(t.combine(n,r(e[i])));return n}if("Polygon"===e.type)return t.polygon(r(e.coordinates));if("MultiPolygon"===e.type){for(var n=t.segments({inverted:!1,regions:[]}),i=0;i<e.coordinates.length;i++)n=t.selectUnion(t.combine(n,r(e.coordinates[i])));return t.polygon(n)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(t,e,r){function n(t,r){return e.pointInsideRegion([.5*(t[0][0]+t[1][0]),.5*(t[0][1]+t[1][1])],r)}function i(t){return{region:t,children:[]}}r=t.polygon(t.segments(r));var a=i(null);function o(t,e){for(var r=0;r<t.children.length;r++)if(n(e,(s=t.children[r]).region))return void o(s,e);var a=i(e);for(r=0;r<t.children.length;r++){var s;n((s=t.children[r]).region,e)&&(a.children.push(s),t.children.splice(r,1),r--)}t.children.push(a)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function u(t,e){for(var r=0,n=t[t.length-1][0],i=t[t.length-1][1],a=[],o=0;o<t.length;o++){var s=t[o][0],l=t[o][1];a.push([s,l]),r+=l*n-s*i,n=s,i=l}return r<0!==e&&a.reverse(),a.push([a[0][0],a[0][1]]),a}var c=[];function h(t){var e=[u(t.region,!1)];c.push(e);for(var r=0;r<t.children.length;r++)e.push(p(t.children[r]))}function p(t){for(var e=0;e<t.children.length;e++)h(t.children[e]);return u(t.region,!0)}for(s=0;s<a.children.length;s++)h(a.children[s]);return c.length<=0?{type:"Polygon",coordinates:[]}:1==c.length?{type:"Polygon",coordinates:c[0]}:{type:"MultiPolygon",coordinates:c}}};t.exports=e},9819:function(t,e,r){var n=r(8088);t.exports=function(t,e,r){function i(t,e,n){return{id:r?r.segmentId():-1,start:t,end:e,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var a=n.create();function o(t,r){a.insertBefore(t,(function(n){return i=t.isStart,a=t.pt,o=r,s=n.isStart,l=n.pt,u=n.other.pt,(0!==(c=e.pointsCompare(a,l))?c:e.pointsSame(o,u)?0:i!==s?i?1:-1:e.pointAboveOrOnLine(o,s?l:u,s?u:l)?1:-1)<0;var i,a,o,s,l,u,c}))}function s(t,e){var r=function(t,e){var r=n.node({isStart:!0,pt:t.start,seg:t,primary:e,other:null,status:null});return o(r,t.end),r}(t,e);return function(t,e,r){var i=n.node({isStart:!1,pt:e.end,seg:e,primary:r,other:t,status:null});t.other=i,o(i,t.pt)}(r,t,e),r}function l(t,e){var n=i(e,t.seg.end,t.seg);return function(t,e){r&&r.segmentChop(t.seg,e),t.other.remove(),t.seg.end=e,t.other.pt=e,o(t.other,t.pt)}(t,e),s(n,t.primary)}function u(i,o){var s=n.create();function u(t){return s.findTransition((function(r){var n,i,a,o,s,l;return n=t,i=r.ev,a=n.seg.start,o=n.seg.end,s=i.seg.start,l=i.seg.end,(e.pointsCollinear(a,s,l)?e.pointsCollinear(o,s,l)||e.pointAboveOrOnLine(o,s,l)?1:-1:e.pointAboveOrOnLine(a,s,l)?1:-1)>0}))}function c(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,u=a.start,c=a.end;r&&r.checkIntersection(i,a);var h=e.linesIntersect(o,s,u,c);if(!1===h){if(!e.pointsCollinear(o,s,u))return!1;if(e.pointsSame(o,c)||e.pointsSame(s,u))return!1;var p=e.pointsSame(o,u),f=e.pointsSame(s,c);if(p&&f)return n;var d=!p&&e.pointBetween(o,u,c),m=!f&&e.pointBetween(s,u,c);if(p)return m?l(n,s):l(t,c),n;d&&(f||(m?l(n,s):l(t,c)),l(n,o))}else 0===h.alongA&&(-1===h.alongB?l(t,u):0===h.alongB?l(t,h.pt):1===h.alongB&&l(t,c)),0===h.alongB&&(-1===h.alongA?l(n,o):0===h.alongA?l(n,h.pt):1===h.alongA&&l(n,s));return!1}for(var h=[];!a.isEmpty();){var p=a.getHead();if(r&&r.vert(p.pt[0]),p.isStart){r&&r.segmentNew(p.seg,p.primary);var f=u(p),d=f.before?f.before.ev:null,m=f.after?f.after.ev:null;function y(){if(d){var t=c(p,d);if(t)return t}return!!m&&c(p,m)}r&&r.tempStatus(p.seg,!!d&&d.seg,!!m&&m.seg);var v,g,_=y();if(_)t?(g=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below)&&(_.seg.myFill.above=!_.seg.myFill.above):_.seg.otherFill=p.seg.myFill,r&&r.segmentUpdate(_.seg),p.other.remove(),p.remove();if(a.getHead()!==p){r&&r.rewind(p.seg);continue}t?(g=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below,p.seg.myFill.below=m?m.seg.myFill.above:i,p.seg.myFill.above=g?!p.seg.myFill.below:p.seg.myFill.below):null===p.seg.otherFill&&(v=m?p.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:p.primary?o:i,p.seg.otherFill={above:v,below:v}),r&&r.status(p.seg,!!d&&d.seg,!!m&&m.seg),p.other.status=f.insert(n.node({ev:p}))}else{var x=p.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(x.prev)&&s.exists(x.next)&&c(x.prev.ev,x.next.ev),r&&r.statusRemove(x.ev.seg),x.remove(),!p.primary){var b=p.seg.myFill;p.seg.myFill=p.seg.otherFill,p.seg.otherFill=b}h.push(p.seg)}a.getHead().remove()}return r&&r.done(),h}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l<t.length;l++){n=o,o=t[l];var u=e.pointsCompare(n,o);0!==u&&s((i=u<0?n:o,a=u<0?o:n,{id:r?r.segmentId():-1,start:i,end:a,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(t){return u(t,!1)}}:{calculate:function(t,e,r,n){return t.forEach((function(t){s(i(t.start,t.end,t),!0)})),r.forEach((function(t){s(i(t.start,t.end,t),!1)})),u(e,n)}}}},8088:function(t){t.exports={create:function(){var t={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==t.root},isEmpty:function(){return null===t.root.next},getHead:function(){return t.root.next},insertBefore:function(e,r){for(var n=t.root,i=t.root.next;null!==i;){if(r(i))return e.prev=i.prev,e.next=i,i.prev.next=e,void(i.prev=e);n=i,i=i.next}n.next=e,e.prev=n,e.next=null},findTransition:function(e){for(var r=t.root,n=t.root.next;null!==n&&!e(n);)r=n,n=n.next;return{before:r===t.root?null:r,after:n,insert:function(t){return t.prev=r,t.next=n,r.next=t,null!==n&&(n.prev=t),t}}}};return t},node:function(t){return t.prev=null,t.next=null,t.remove=function(){t.prev.next=t.next,t.next&&(t.next.prev=t.prev),t.prev=null,t.next=null},t}}},1403:function(t){t.exports=function(t,e,r){var n=[],i=[];return t.forEach((function(t){var a=t.start,o=t.end;if(e.pointsSame(a,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(t);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},u=s,c=0;c<n.length;c++){var h=(y=n[c])[0],p=(y[1],y[y.length-1]);if(y[y.length-2],e.pointsSame(h,a)){if(k(c,!0,!0))break}else if(e.pointsSame(h,o)){if(k(c,!0,!1))break}else if(e.pointsSame(p,a)){if(k(c,!1,!0))break}else if(e.pointsSame(p,o)&&k(c,!1,!1))break}if(u===s)return n.push([a,o]),void(r&&r.chainNew(a,o));if(u===l){r&&r.chainMatch(s.index);var f=s.index,d=s.matches_pt1?o:a,m=s.matches_head,y=n[f],v=m?y[0]:y[y.length-1],g=m?y[1]:y[y.length-2],_=m?y[y.length-1]:y[0],x=m?y[y.length-2]:y[1];return e.pointsCollinear(g,v,d)&&(m?(r&&r.chainRemoveHead(s.index,d),y.shift()):(r&&r.chainRemoveTail(s.index,d),y.pop()),v=g),e.pointsSame(_,d)?(n.splice(f,1),e.pointsCollinear(x,_,v)&&(m?(r&&r.chainRemoveTail(s.index,v),y.pop()):(r&&r.chainRemoveHead(s.index,v),y.shift())),r&&r.chainClose(s.index),void i.push(y)):void(m?(r&&r.chainAddHead(s.index,d),y.unshift(d)):(r&&r.chainAddTail(s.index,d),y.push(d)))}var b=s.index,w=l.index;r&&r.chainConnect(b,w);var T=n[b].length<n[w].length;s.matches_head?l.matches_head?T?(M(b),A(b,w)):(M(w),A(w,b)):A(w,b):l.matches_head?A(b,w):T?(M(b),A(w,b)):(M(w),A(b,w))}function k(t,e,r){return u.index=t,u.matches_head=e,u.matches_pt1=r,u===s?(u=l,!1):(u=null,!0)}function M(t){r&&r.chainReverse(t),n[t].reverse()}function A(t,i){var a=n[t],o=n[i],s=a[a.length-1],l=a[a.length-2],u=o[0],c=o[1];e.pointsCollinear(l,s,u)&&(r&&r.chainRemoveTail(t,s),a.pop(),s=l),e.pointsCollinear(s,u,c)&&(r&&r.chainRemoveHead(i,u),o.shift()),r&&r.chainJoin(t,i),n[t]=a.concat(o),n.splice(i,1)}})),i}},2368:function(t){function e(t,e,r){var n=[];return t.forEach((function(t){var i=(t.myFill.above?8:0)+(t.myFill.below?4:0)+(t.otherFill&&t.otherFill.above?2:0)+(t.otherFill&&t.otherFill.below?1:0);0!==e[i]&&n.push({id:r?r.segmentId():-1,start:t.start,end:t.end,myFill:{above:1===e[i],below:2===e[i]},otherFill:null})})),r&&r.selected(n),n}var r={union:function(t,r){return e(t,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],r)},intersect:function(t,r){return e(t,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],r)},difference:function(t,r){return e(t,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],r)},differenceRev:function(t,r){return e(t,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],r)},xor:function(t,r){return e(t,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],r)}};t.exports=r},9760:function(t,e,r){var n;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,u=i.min,c=i.max,h=i.random;function p(t,e){if(e=e||{},(t=t||"")instanceof p)return t;if(!(this instanceof p))return new p(t,e);var r=function(t){var e,r,n,s={r:0,g:0,b:0},l=1,h=null,p=null,f=null,d=!1,m=!1;return"string"==typeof t&&(t=function(t){t=t.replace(a,"").replace(o,"").toLowerCase();var e,r=!1;if(P[t])t=P[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=q.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=q.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=q.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=q.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=q.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=q.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=q.hex8.exec(t))?{r:O(e[1]),g:O(e[2]),b:O(e[3]),a:N(e[4]),format:r?"name":"hex8"}:(e=q.hex6.exec(t))?{r:O(e[1]),g:O(e[2]),b:O(e[3]),format:r?"name":"hex"}:(e=q.hex4.exec(t))?{r:O(e[1]+""+e[1]),g:O(e[2]+""+e[2]),b:O(e[3]+""+e[3]),a:N(e[4]+""+e[4]),format:r?"name":"hex8"}:!!(e=q.hex3.exec(t))&&{r:O(e[1]+""+e[1]),g:O(e[2]+""+e[2]),b:O(e[3]+""+e[3]),format:r?"name":"hex"}}(t)),"object"==typeof t&&(H(t.r)&&H(t.g)&&H(t.b)?(e=t.r,r=t.g,n=t.b,s={r:255*D(e,255),g:255*D(r,255),b:255*D(n,255)},d=!0,m="%"===String(t.r).substr(-1)?"prgb":"rgb"):H(t.h)&&H(t.s)&&H(t.v)?(h=F(t.s),p=F(t.v),s=function(t,e,r){t=6*D(t,360),e=D(e,100),r=D(r,100);var n=i.floor(t),a=t-n,o=r*(1-e),s=r*(1-a*e),l=r*(1-(1-a)*e),u=n%6;return{r:255*[r,s,o,o,l,r][u],g:255*[l,r,r,s,o,o][u],b:255*[o,o,l,r,r,s][u]}}(t.h,h,p),d=!0,m="hsv"):H(t.h)&&H(t.s)&&H(t.l)&&(h=F(t.s),f=F(t.l),s=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=D(t,360),e=D(e,100),r=D(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,h,f),d=!0,m="hsl"),t.hasOwnProperty("a")&&(l=t.a)),l=E(l),{ok:d,format:t.format||m,r:u(255,c(s.r,0)),g:u(255,c(s.g,0)),b:u(255,c(s.b,0)),a:l}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=r.ok,this._tc_id=s++}function f(t,e,r){t=D(t,255),e=D(e,255),r=D(r,255);var n,i,a=c(t,e,r),o=u(t,e,r),s=(a+o)/2;if(a==o)n=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e<r?6:0);break;case e:n=(r-t)/l+2;break;case r:n=(t-e)/l+4}n/=6}return{h:n,s:i,l:s}}function d(t,e,r){t=D(t,255),e=D(e,255),r=D(r,255);var n,i,a=c(t,e,r),o=u(t,e,r),s=a,l=a-o;if(i=0===a?0:l/a,a==o)n=0;else{switch(a){case t:n=(e-r)/l+(e<r?6:0);break;case e:n=(r-t)/l+2;break;case r:n=(t-e)/l+4}n/=6}return{h:n,s:i,v:s}}function m(t,e,r,n){var i=[R(l(t).toString(16)),R(l(e).toString(16)),R(l(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function y(t,e,r,n){return[R(B(n)),R(l(t).toString(16)),R(l(e).toString(16)),R(l(r).toString(16))].join("")}function v(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.s-=e/100,r.s=z(r.s),p(r)}function g(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.s+=e/100,r.s=z(r.s),p(r)}function _(t){return p(t).desaturate(100)}function x(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.l+=e/100,r.l=z(r.l),p(r)}function b(t,e){e=0===e?0:e||10;var r=p(t).toRgb();return r.r=c(0,u(255,r.r-l(-e/100*255))),r.g=c(0,u(255,r.g-l(-e/100*255))),r.b=c(0,u(255,r.b-l(-e/100*255))),p(r)}function w(t,e){e=0===e?0:e||10;var r=p(t).toHsl();return r.l-=e/100,r.l=z(r.l),p(r)}function T(t,e){var r=p(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,p(r)}function k(t){var e=p(t).toHsl();return e.h=(e.h+180)%360,p(e)}function M(t){var e=p(t).toHsl(),r=e.h;return[p(t),p({h:(r+120)%360,s:e.s,l:e.l}),p({h:(r+240)%360,s:e.s,l:e.l})]}function A(t){var e=p(t).toHsl(),r=e.h;return[p(t),p({h:(r+90)%360,s:e.s,l:e.l}),p({h:(r+180)%360,s:e.s,l:e.l}),p({h:(r+270)%360,s:e.s,l:e.l})]}function S(t){var e=p(t).toHsl(),r=e.h;return[p(t),p({h:(r+72)%360,s:e.s,l:e.l}),p({h:(r+216)%360,s:e.s,l:e.l})]}function L(t,e,r){e=e||6,r=r||30;var n=p(t).toHsl(),i=360/r,a=[p(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(p(n));return a}function C(t,e){e=e||6;for(var r=p(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(p({h:n,s:i,v:a})),a=(a+s)%1;return o}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=E(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=d(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),n=l(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),n=l(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return m(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var a=[R(l(t).toString(16)),R(l(e).toString(16)),R(l(r).toString(16)),R(B(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*D(this._r,255))+"%",g:l(100*D(this._g,255))+"%",b:l(100*D(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*D(this._r,255))+"%, "+l(100*D(this._g,255))+"%, "+l(100*D(this._b,255))+"%)":"rgba("+l(100*D(this._r,255))+"%, "+l(100*D(this._g,255))+"%, "+l(100*D(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(I[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+y(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=p(t);r="#"+y(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(M,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},p.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:F(t[n]));t=r}return p(t,e)},p.equals=function(t,e){return!(!t||!e)&&p(t).toRgbString()==p(e).toRgbString()},p.random=function(){return p.fromRatio({r:h(),g:h(),b:h()})},p.mix=function(t,e,r){r=0===r?0:r||50;var n=p(t).toRgb(),i=p(e).toRgb(),a=r/100;return p({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},p.readability=function(t,e){var r=p(t),n=p(e);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},p.isReadable=function(t,e,r){var n,i,a,o,s,l=p.readability(t,e);switch(i=!1,(a=r,"AA"!==(o=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(s=(a.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:o,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=l>=4.5;break;case"AAlarge":i=l>=3;break;case"AAAsmall":i=l>=7}return i},p.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;u<e.length;u++)(n=p.readability(t,e[u]))>l&&(l=n,s=p(e[u]));return p.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,p.mostReadable(t,["#fff","#000"],r))};var P=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},I=p.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(P);function E(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function D(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=u(e,c(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function z(t){return u(1,c(0,t))}function O(t){return parseInt(t,16)}function R(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function B(t){return i.round(255*parseFloat(t)).toString(16)}function N(t){return O(t)/255}var U,j,V,q=(j="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",V="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function H(t){return!!q.CSS_UNIT.exec(t)}t.exports?t.exports=p:void 0===(n=function(){return p}.call(e,r,e,t))||(t.exports=n)}(Math)},7020:function(t,e,r){var n=r(8700),i=r(896),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"闰"===e[0]&&(r=!0,e=e.substring(1)),"月"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e<r?e+1:e:e+1},intercalaryMonth:function(t){return t=this._validateYear(t),h[t-h[0]]>>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=p[o-p[0]],l=s>>9&4095,u=s>>5&15,c=31&s;(i=a.newDate(l,u,c)).add(4-(i.dayOfWeek()||7),"d");var h=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(h/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=h[t-h[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if("object"==typeof t)o=t,a=e||{};else{var l;if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,a=n):(l=!!n,a={}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var u,c=h[o.year-h[0]],f=c>>13;u=f&&(o.month>f||o.isIntercalary)?o.month:o.month-1;for(var d=0;d<u;d++)s+=c&1<<12-d?30:29;var m=p[o.year-p[0]],y=new Date(m>>9&4095,(m>>5&15)-1,(31&m)+s);return a.year=y.getFullYear(),a.month=1+y.getMonth(),a.day=y.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if("object"==typeof t)i=t,a=e||{};else{if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a={}}var o=p[i.year-p[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=p[a.year-p[0]];var l,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(i.year,i.month-1,i.day);l=Math.round((c-u)/864e5);var f,d=h[a.year-h[0]];for(f=0;f<13;f++){var m=d&1<<12-f?30:29;if(l<m)break;l-=m}var y=d>>13;return!y||f<y?(a.isIntercalary=!1,a.month=1+f):f===y?(a.isIntercalary=!0,a.month=f):(a.isIntercalary=!1,a.month=f),a.day=1+l,a}(e.year(),e.month(),e.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(t){var e=t.match(s),r=this._validateYear(+e[1]),n=+e[2],i=!!e[3],a=this.toMonthIndex(r,n,i),o=+e[4];return this.newDate(r,a,o)},add:function(t,e,r){var n=t.year(),i=t.month(),a=this.isIntercalaryMonth(n,i),s=this.toChineseMonth(n,i),l=Object.getPrototypeOf(o.prototype).add.call(this,t,e,r);if("y"===r){var u=l.year(),c=l.month(),h=this.isIntercalaryMonth(u,s),p=a&&h?this.toMonthIndex(u,s,!0):this.toMonthIndex(u,s,!1);p!==c&&l.month(p)}return l}});var s=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,l=/^\d?\d[iI]?/m,u=/^闰?十?[一二三四五六七八九]?月/m,c=/^闰?十?[一二三四五六七八九]?/m;n.calendars.chinese=o;var h=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},7411:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.coptic=a},5668:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,e,r){return(this._validate(t,e,r,n.local.invalidDate).day()+1)%8},weekDay:function(t,e,r){var n=this.dayOfWeek(t,e,r);return n>=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=a},2787:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},2084:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)||8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s<e;s++)o+=this.daysInMonth(t,s)}else for(s=7;s<e;s++)o+=this.daysInMonth(t,s);return o},_delay1:function(t){var e=Math.floor((235*t-234)/19),r=12084+13753*e,n=29*e+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(t){var e=this._delay1(t-1),r=this._delay1(t);return this._delay1(t+1)-r==356?2:r-e==382?1:0},fromJD:function(t){t=Math.floor(t)+.5;for(var e=Math.floor(98496*(t-this.jdEpoch)/35975351)-1;t>=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=t<this.toJD(e,1,1)?7:1;t>this.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},6368:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},4747:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},5616:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r],10);if(Math.abs(n)>19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o(8+(t-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s(20+(t-=this.jdEpoch),20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},632:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar;var o=n.instance("gregorian");i(a.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s<i.month();s++)a+=this.daysPerMonth[s-1];return a+o.toJD(t+1468,3,13)},fromJD:function(t){t=Math.floor(t+.5);for(var e=Math.floor((t-(this.jdEpoch-1))/366);t>=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},3040:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r<t+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=e)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=a},1104:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 682*((e.year()-(e.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),h=t-this.toJD(l,c,1)+1;return this.newDate(l,c,h)}}),n.calendars.persian=a,n.calendars.jalali=a},9075:function(t,e,r){var n=r(8700),i=r(896),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},4592:function(t,e,r){var n=r(8700),i=r(896),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},5348:function(t,e,r){var n=r(8700),i=r(896);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;a<o.length;a++){if(o[a]>r)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;n<o.length&&!(o[n]>e);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},8700:function(t,e,r){var n=r(896);function i(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return"000000".substring(0,e-(t=""+t).length)+t}function s(){this.shortYearCutoff="+10"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}n(i.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);i=t.day(),"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(t){for(;o<t.minMonth;)a--,o+=t.monthsInYear(a);for(var e=t.monthsInYear(a);o>e-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return u.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(u.instance().fromJSDate(t).toJD())},_validate:function(t,e,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,t.calendar().local.name);return t}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(t,e,r))throw n.replace(/\{0\}/,this.local.name);var i=this.newDate(t,e,r);return this._validateLevel--,i}catch(t){throw this._validateLevel--,t}}}),l.prototype=new s,n(l.prototype,{name:"Gregorian",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==0&&(t%100!=0||t%400==0)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);t=n.year(),e=n.month(),r=n.day(),t<0&&t++,e<3&&(e+=12,t--);var i=Math.floor(t/100),a=2-i+Math.floor(i/4);return Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r+a-1524.5},fromJD:function(t){var e=Math.floor(t+.5),r=Math.floor((e-1867216.25)/36524.25),n=1524+(r=e+1+r-Math.floor(r/4)),i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=t.exports=new i;u.cdate=a,u.baseCalendar=s,u.calendars.gregorian=l},5168:function(t,e,r){var n=r(896),i=r(8700);n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s=(r=r||{}).dayNamesShort||this.local.dayNamesShort,l=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,h=r.monthNames||this.local.monthNames,p=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;b+n<t.length&&t.charAt(b+n)===e;)n++;return b+=n-1,Math.floor(n/(r||1))>1}),f=function(t,e,r,n){var i=""+e;if(p(t,n))for(;i.length<r;)i="0"+i;return i},d=this,m=function(t){return"function"==typeof u?u.call(d,t,p("m")):g(f("m",t.month(),2))},y=function(t,e){return e?"function"==typeof h?h.call(d,t):h[t.month()-d.minMonth]:"function"==typeof c?c.call(d,t):c[t.month()-d.minMonth]},v=this.local.digits,g=function(t){return r.localNumbers&&v?v(t):t},_="",x=!1,b=0;b<t.length;b++)if(x)"'"!==t.charAt(b)||p("'")?_+=t.charAt(b):x=!1;else switch(t.charAt(b)){case"d":_+=g(f("d",e.day(),2));break;case"D":_+=("D",n=e.dayOfWeek(),a=s,o=l,p("D")?o[n]:a[n]);break;case"o":_+=f("o",e.dayOfYear(),3);break;case"w":_+=f("w",e.weekOfYear(),2);break;case"m":_+=m(e);break;case"M":_+=y(e,p("M"));break;case"y":_+=p("y",2)?e.year():(e.year()%100<10?"0":"")+e.year()%100;break;case"Y":p("Y",2),_+=e.formatYear();break;case"J":_+=e.toJD();break;case"@":_+=(e.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":_+=(e.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":p("'")?_+="'":x=!0;break;default:_+=t.charAt(b)}return _},parseDate:function(t,e,r){if(null==e)throw i.local.invalidArguments||i.regionalOptions[""].invalidArguments;if(""===(e="object"==typeof e?e.toString():e+""))return null;t=t||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n="string"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var a=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,u=r.monthNamesShort||this.local.monthNamesShort,c=r.monthNames||this.local.monthNames,h=-1,p=-1,f=-1,d=-1,m=-1,y=!1,v=!1,g=function(e,r){for(var n=1;A+n<t.length&&t.charAt(A+n)===e;)n++;return A+=n-1,Math.floor(n/(r||1))>1},_=function(t,r){var n=g(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},x=this,b=function(){if("function"==typeof l){g("m");var t=l.call(x,e.substring(M));return M+=t.length,t}return _("m")},w=function(t,r,n,a){for(var o=g(t,a)?n:r,s=0;s<o.length;s++)if(e.substr(M,o[s].length).toLowerCase()===o[s].toLowerCase())return M+=o[s].length,s+x.minMonth;throw(i.local.unknownNameAt||i.regionalOptions[""].unknownNameAt).replace(/\{0\}/,M)},T=function(){if("function"==typeof c){var t=g("M")?c.call(x,e.substring(M)):u.call(x,e.substring(M));return M+=t.length,t}return w("M",u,c)},k=function(){if(e.charAt(M)!==t.charAt(A))throw(i.local.unexpectedLiteralAt||i.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,M);M++},M=0,A=0;A<t.length;A++)if(v)"'"!==t.charAt(A)||g("'")?k():v=!1;else switch(t.charAt(A)){case"d":d=_("d");break;case"D":w("D",a,o);break;case"o":m=_("o");break;case"w":_("w");break;case"m":f=b();break;case"M":f=T();break;case"y":var S=A;y=!g("y",2),A=S,p=_("y",2);break;case"Y":p=_("Y",2);break;case"J":h=_("J")+.5,"."===e.charAt(M)&&(M++,_("J"));break;case"@":h=_("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":h=_("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":M=e.length;break;case"'":g("'")?k():v=!0;break;default:k()}if(M<e.length)throw i.local.unexpectedText||i.regionalOptions[""].unexpectedText;if(-1===p?p=this.today().year():p<100&&y&&(p+=-1===n?1900:this.today().year()-this.today().year()%100-(p<=n?0:100)),"string"==typeof f&&(f=s.call(this,p,f)),m>-1){f=1,d=m;for(var L=this.daysInMonth(p,f);d>L;L=this.daysInMonth(p,f))f++,d-=L}return h>-1?this.fromJD(h):this.newDate(p,f,d)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}return r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(488)}()})); |